[Libreoffice-commits] core.git: 9 commits - forms/source fpicker/source framework/inc framework/source idl/inc idl/source linguistic/source lotuswordpro/source reportdesign/inc reportdesign/source rsc/inc rsc/source
Noel Grandin
noel at peralex.com
Wed Mar 23 08:20:27 UTC 2016
forms/source/component/CheckBox.cxx | 2
forms/source/component/DatabaseForm.cxx | 10 -
forms/source/component/DatabaseForm.hxx | 2
forms/source/component/RadioButton.cxx | 2
forms/source/component/refvaluecomponent.cxx | 18 ---
forms/source/component/refvaluecomponent.hxx | 5
forms/source/helper/controlfeatureinterception.cxx | 6 -
forms/source/inc/controlfeatureinterception.hxx | 2
fpicker/source/office/iodlg.cxx | 50 +-------
fpicker/source/office/iodlg.hxx | 12 --
framework/inc/classes/propertysethelper.hxx | 8 -
framework/inc/classes/taskcreator.hxx | 3
framework/inc/uielement/uielement.hxx | 5
framework/source/accelerators/acceleratorconfiguration.cxx | 8 -
framework/source/accelerators/presethandler.cxx | 17 --
framework/source/classes/taskcreator.cxx | 5
framework/source/fwi/classes/propertysethelper.cxx | 20 ---
framework/source/inc/accelerators/presethandler.hxx | 13 --
framework/source/services/desktop.cxx | 4
framework/source/services/frame.cxx | 8 -
framework/source/services/tabwindowservice.cxx | 4
idl/inc/module.hxx | 5
idl/source/objects/module.cxx | 3
idl/source/prj/database.cxx | 3
idl/source/prj/parser.cxx | 2
linguistic/source/spelldsp.cxx | 17 +-
linguistic/source/spelldsp.hxx | 6 -
lotuswordpro/source/filter/lwpdrawobj.cxx | 6 -
lotuswordpro/source/filter/lwpfont.cxx | 2
lotuswordpro/source/filter/lwpfribmark.cxx | 14 +-
lotuswordpro/source/filter/lwpfribtext.cxx | 2
lotuswordpro/source/filter/lwpobjid.cxx | 4
lotuswordpro/source/filter/lwpobjid.hxx | 2
lotuswordpro/source/filter/lwpparastyle.cxx | 6 -
lotuswordpro/source/filter/lwptools.cxx | 8 -
lotuswordpro/source/filter/xfilter/xfborders.cxx | 10 -
lotuswordpro/source/filter/xfilter/xfborders.hxx | 3
lotuswordpro/source/filter/xfilter/xfdatestyle.hxx | 6 -
lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx | 10 -
lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx | 16 +-
lotuswordpro/source/filter/xfilter/xffontdecl.cxx | 4
lotuswordpro/source/filter/xfilter/xffontdecl.hxx | 2
lotuswordpro/source/filter/xfilter/xftimestyle.hxx | 6 -
reportdesign/inc/RptPage.hxx | 3
reportdesign/source/core/sdr/RptPage.cxx | 5
reportdesign/source/filter/xml/xmlStyleImport.cxx | 4
reportdesign/source/filter/xml/xmlStyleImport.hxx | 3
reportdesign/source/ui/inc/RptUndo.hxx | 3
reportdesign/source/ui/inc/ViewsWindow.hxx | 2
reportdesign/source/ui/misc/RptUndo.cxx | 5
reportdesign/source/ui/report/ReportController.cxx | 4
reportdesign/source/ui/report/ViewsWindow.cxx | 6 -
rsc/inc/rsccont.hxx | 6 -
rsc/inc/rscdb.hxx | 6 -
rsc/source/parser/rscdb.cxx | 74 +++----------
rsc/source/res/rscclass.cxx | 3
rsc/source/res/rsccont.cxx | 8 -
rsc/source/rsc/rsc.cxx | 2
58 files changed, 155 insertions(+), 320 deletions(-)
New commits:
commit aec2477b41ea09e914ff64965099d0cea1411ba7
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 10:04:32 2016 +0200
loplugin:constantparam in forms
Change-Id: Iebce160fd6c3de63ba179d747768fd4cf420baec
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index cece340..f28a766 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -60,7 +60,7 @@ css::uno::Sequence<OUString> SAL_CALL OCheckBoxControl::getSupportedServiceNames
//= OCheckBoxModel
OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory)
- :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, true )
+ :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX )
// use the old control name for compytibility reasons
{
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index bf1b7d1..4245ff9 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -1448,7 +1448,7 @@ Reference< XCloneable > SAL_CALL ODatabaseForm::createClone( ) throw (RuntimeEx
}
-void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount, bool bVetoable )
+void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any* pOldValues, sal_Int32 nCount )
{
// same as in getFastPropertyValue(sal_Int32) : if we're resetting currently don't fire any changes of the
// IsModified property from sal_False to sal_True, as this is only temporary 'til the reset is done
@@ -1474,15 +1474,15 @@ void ODatabaseForm::fire( sal_Int32* pnHandles, const Any* pNewValues, const Any
--nCount;
else
{ // split into two base class calls
- OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nPos, bVetoable);
+ OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nPos, false/*bVetoable*/);
++nPos;
- OPropertySetAggregationHelper::fire(pnHandles + nPos, pNewValues + nPos, pOldValues + nPos, nCount - nPos, bVetoable);
+ OPropertySetAggregationHelper::fire(pnHandles + nPos, pNewValues + nPos, pOldValues + nPos, nCount - nPos, false/*bVetoable*/);
return;
}
}
}
- OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nCount, bVetoable);
+ OPropertySetAggregationHelper::fire(pnHandles, pNewValues, pOldValues, nCount, false/*bVetoable*/);
}
@@ -2337,7 +2337,7 @@ void ODatabaseForm::_propertyChanged(const PropertyChangeEvent& evt) throw( Runt
// the rowset changed its active connection itself (without interaction from our side), so
// we need to fire this event, too
sal_Int32 nHandle = PROPERTY_ID_ACTIVE_CONNECTION;
- fire(&nHandle, &evt.NewValue, &evt.OldValue, 1, false);
+ fire(&nHandle, &evt.NewValue, &evt.OldValue, 1);
}
else // it was one of the statement relevant props
{
diff --git a/forms/source/component/DatabaseForm.hxx b/forms/source/component/DatabaseForm.hxx
index 48ca614..f51f999 100644
--- a/forms/source/component/DatabaseForm.hxx
+++ b/forms/source/component/DatabaseForm.hxx
@@ -240,7 +240,7 @@ public:
css::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle )
throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override;
- void fire( sal_Int32 * pnHandles, const css::uno::Any * pNewValues, const css::uno::Any * pOldValues, sal_Int32 nCount, bool bVetoable );
+ void fire( sal_Int32 * pnHandles, const css::uno::Any * pNewValues, const css::uno::Any * pOldValues, sal_Int32 nCount );
// IPropertyBagHelperContext
virtual ::osl::Mutex& getMutex() override;
diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx
index 182dd89..567eb5c 100644
--- a/forms/source/component/RadioButton.cxx
+++ b/forms/source/component/RadioButton.cxx
@@ -83,7 +83,7 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<css::awt::XToolkit
ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory)
- :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,true )
+ :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON )
// use the old control name for compytibility reasons
{
diff --git a/forms/source/component/refvaluecomponent.cxx b/forms/source/component/refvaluecomponent.cxx
index c1d6ae8..66bc6db 100644
--- a/forms/source/component/refvaluecomponent.cxx
+++ b/forms/source/component/refvaluecomponent.cxx
@@ -37,10 +37,9 @@ namespace frm
//=
- OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault, bool _bSupportNoCheckRefValue )
+ OReferenceValueComponent::OReferenceValueComponent( const Reference< XComponentContext >& _rxFactory, const OUString& _rUnoControlModelTypeName, const OUString& _rDefault )
:OBoundControlModel( _rxFactory, _rUnoControlModelTypeName, _rDefault, false, true, true )
,m_eDefaultChecked( TRISTATE_FALSE )
- ,m_bSupportSecondRefValue( _bSupportNoCheckRefValue )
{
}
@@ -51,7 +50,6 @@ namespace frm
m_sReferenceValue = _pOriginal->m_sReferenceValue;
m_sNoCheckReferenceValue = _pOriginal->m_sNoCheckReferenceValue;
m_eDefaultChecked = _pOriginal->m_eDefaultChecked;
- m_bSupportSecondRefValue = _pOriginal->m_bSupportSecondRefValue;
calculateExternalValueType();
}
@@ -77,7 +75,6 @@ namespace frm
case PROPERTY_ID_DEFAULT_STATE: _rValue <<= (sal_Int16)m_eDefaultChecked; break;
case PROPERTY_ID_UNCHECKED_REFVALUE:
- OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::getFastPropertyValue: not supported!" );
_rValue <<= m_sNoCheckReferenceValue;
break;
@@ -97,7 +94,6 @@ namespace frm
break;
case PROPERTY_ID_UNCHECKED_REFVALUE:
- OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::setFastPropertyValue_NoBroadcast: not supported!" );
OSL_VERIFY( _rValue >>= m_sNoCheckReferenceValue );
break;
@@ -133,7 +129,6 @@ namespace frm
break;
case PROPERTY_ID_UNCHECKED_REFVALUE:
- OSL_ENSURE( m_bSupportSecondRefValue, "OReferenceValueComponent::convertFastPropertyValue: not supported!" );
bModified = tryPropertyValue( _rConvertedValue, _rOldValue, _rValue, m_sNoCheckReferenceValue );
break;
@@ -157,13 +152,10 @@ namespace frm
void OReferenceValueComponent::describeFixedProperties( Sequence< Property >& _rProps ) const
{
- BEGIN_DESCRIBE_PROPERTIES( m_bSupportSecondRefValue ? 3 : 2, OBoundControlModel )
+ BEGIN_DESCRIBE_PROPERTIES( 3, OBoundControlModel )
DECL_PROP1( REFVALUE, OUString, BOUND );
DECL_PROP1( DEFAULT_STATE, sal_Int16, BOUND );
- if ( m_bSupportSecondRefValue )
- {
- DECL_PROP1( UNCHECKED_REFVALUE, OUString, BOUND );
- }
+ DECL_PROP1( UNCHECKED_REFVALUE, OUString, BOUND );
END_DESCRIBE_PROPERTIES();
}
@@ -197,7 +189,7 @@ namespace frm
nState = TRISTATE_TRUE;
else
{
- if ( !m_bSupportSecondRefValue || ( sExternalValue == m_sNoCheckReferenceValue ) )
+ if ( sExternalValue == m_sNoCheckReferenceValue )
nState = TRISTATE_FALSE;
else
nState = TRISTATE_INDET;
@@ -251,7 +243,7 @@ namespace frm
}
else if ( bStringExchange )
{
- aExternalValue <<= (m_bSupportSecondRefValue ? m_sNoCheckReferenceValue : OUString());
+ aExternalValue <<= m_sNoCheckReferenceValue;
}
break;
}
diff --git a/forms/source/component/refvaluecomponent.hxx b/forms/source/component/refvaluecomponent.hxx
index e391702..bedfc4f 100644
--- a/forms/source/component/refvaluecomponent.hxx
+++ b/forms/source/component/refvaluecomponent.hxx
@@ -38,8 +38,6 @@ namespace frm
ToggleState m_eDefaultChecked; // the default check state
// </properties>
- bool m_bSupportSecondRefValue; // do we support the SecondaryRefValue property?
-
protected:
const OUString& getReferenceValue() const { return m_sReferenceValue; }
void setReferenceValue( const OUString& _rRefValue );
@@ -53,8 +51,7 @@ namespace frm
OReferenceValueComponent(
const css::uno::Reference< css::uno::XComponentContext>& _rxFactory,
const OUString& _rUnoControlModelTypeName,
- const OUString& _rDefault,
- bool _bSupportNoCheckRefValue = false
+ const OUString& _rDefault
);
DECLARE_DEFAULT_CLONE_CTOR( OReferenceValueComponent )
virtual ~OReferenceValueComponent();
diff --git a/forms/source/helper/controlfeatureinterception.cxx b/forms/source/helper/controlfeatureinterception.cxx
index bc3dd49..4a3740f 100644
--- a/forms/source/helper/controlfeatureinterception.cxx
+++ b/forms/source/helper/controlfeatureinterception.cxx
@@ -127,18 +127,18 @@ namespace frm
}
}
- Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL, const OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags )
+ Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL, const OUString& _rTargetFrameName )
{
Reference< XDispatch > xDispatcher;
if ( m_xFirstDispatchInterceptor.is() )
- xDispatcher = m_xFirstDispatchInterceptor->queryDispatch( _rURL, _rTargetFrameName, _nSearchFlags );
+ xDispatcher = m_xFirstDispatchInterceptor->queryDispatch( _rURL, _rTargetFrameName, 0 );
return xDispatcher;
}
Reference< XDispatch > ControlFeatureInterception::queryDispatch( const URL& _rURL )
{
- return queryDispatch( _rURL, OUString(), 0 );
+ return queryDispatch( _rURL, OUString() );
}
diff --git a/forms/source/inc/controlfeatureinterception.hxx b/forms/source/inc/controlfeatureinterception.hxx
index 0ef9e90..6c0097f 100644
--- a/forms/source/inc/controlfeatureinterception.hxx
+++ b/forms/source/inc/controlfeatureinterception.hxx
@@ -69,7 +69,7 @@ namespace frm
/** queries the interceptor chain for the given dispatch
*/
css::uno::Reference< css::frame::XDispatch >
- queryDispatch( const css::util::URL& _rURL, const OUString& _rTargetFrameName, ::sal_Int32 _nSearchFlags );
+ queryDispatch( const css::util::URL& _rURL, const OUString& _rTargetFrameName );
/** queries the interceptor chain for the given dispatch, with a blank target frame and no frame search flags
*/
commit 73140c6f3485e3f221fe6f272c21104b8575e12c
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:58:27 2016 +0200
loplugin:constantparam in fpicker
Change-Id: I7225c996030eed494e3ca8a9dabc501fc505e101
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index ec41f73..dc1e570 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -787,7 +787,7 @@ IMPL_LINK_NOARG_TYPED( SvtFileDialog, NewFolderHdl_Impl, Button*, void)
}
}
-bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt )
+bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter )
{
// delete the old user filter and create a new one
DELETEZ( _pImp->_pUserFilter );
@@ -817,13 +817,10 @@ bool SvtFileDialog::createNewUserFilter( const OUString& _rNewFilter, bool _bAll
bUseCurFilterExt = false;
}
- if ( !_bAllowUserDefExt || bUseCurFilterExt )
- {
- if ( _pImp->GetCurFilter( ) )
- SetDefaultExt( _pImp->GetCurFilter( )->GetExtension() );
- else
- EraseDefaultExt();
- }
+ if ( _pImp->GetCurFilter( ) )
+ SetDefaultExt( _pImp->GetCurFilter( )->GetExtension() );
+ else
+ EraseDefaultExt();
// outta here
return bIsAllFiles;
@@ -861,7 +858,7 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter )
{
nReturn |= FLT_USERFILTER;
// no filter found : use it as user defined filter
- if ( createNewUserFilter( _rFilter, false ) )
+ if ( createNewUserFilter( _rFilter ) )
{ // it's the "all files" filter
nReturn |= FLT_ALLFILESFILTER;
@@ -1386,7 +1383,7 @@ SvtFileDialogFilter_Impl* SvtFileDialog::FindFilter_Impl
// activate filter
_rFilterChanged = _pImp->_pUserFilter || ( _pImp->GetCurFilter() != pFilter );
- createNewUserFilter( _rFilter, false );
+ createNewUserFilter( _rFilter );
break;
}
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index c360d52..a83da18 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -239,19 +239,9 @@ private:
/** updates _pUserFilter with a new filter
<p>No checks for necessity are made.</p>
- @param _bAllowUserDefExt
- set to <TRUE/> if a filter like "*.txt" should reset the DefaultExtension to doc.
- <p>
- In a file-save-dialog this would have the following effect:<br/>
- Say that auto-extension is checked, and the user enters *.txt, while a non-txt filter is selected.<br/>
- If _bAllowUserDefExt is set to <TRUE/>, then a user input of "foo" would save a foo.txt, but in a format
- which is determined by the filter selected (which is no txt file as said above).<br/>
- If _bAllowUserDefExt is set to <FALSE/>, the default extension will be the one of the selected filter, means
- in the above scenario a file "foo.<ext>" will be saved where ext is the extension of the selected filter.
- </p>
@return <TRUE/> if the new filter is "*.*"
*/
- bool createNewUserFilter( const OUString& _rNewFilter, bool _bAllowUserDefExt );
+ bool createNewUserFilter( const OUString& _rNewFilter );
sal_uInt16 adjustFilter( const OUString& _rFilter );
commit f8a7bbdacbf00d85745281b843ed01d29657d109
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:55:53 2016 +0200
remove unused AUTOSELECT_USERFILTER code
added in
commit 90fcf5718668f0f9f41ac141a7fc4306633e693a
Author: Oliver Bolte <obo at openoffice.org>
Date: Wed Apr 13 07:54:11 2005 +0000
and untouched since then
Change-Id: I995c094edbd3d85a6f637f7cb3e7aa4a0326c8bb
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 3bc68a1..ec41f73 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -87,11 +87,6 @@
#include <functional>
#include <vector>
-//#define AUTOSELECT_USERFILTER
- // define this for the experimental feature of user-filter auto selection
- // means if the user enters e.g. *.doc<enter>, and there is a filter which is responsible for *.doc files (only),
- // then this filter is selected automatically
-
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::ui::dialogs;
@@ -855,15 +850,6 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter )
// search for a corresponding filter
SvtFileDialogFilter_Impl* pFilter = FindFilter_Impl( _rFilter, false, bFilterChanged );
-#ifdef AUTOSELECT_USERFILTER
- // if we found a filter which without allowing multi-extensions -> select it
- if ( pFilter )
- {
- _pImp->SelectFilterListEntry( pFilter->GetName() );
- _pImp->SetCurFilter( pFilter );
- }
-#endif // AUTOSELECT_USERFILTER
-
// look for multi-ext filters if necessary
if ( !pFilter )
pFilter = FindFilter_Impl( _rFilter, true, bFilterChanged );
@@ -875,30 +861,11 @@ sal_uInt16 SvtFileDialog::adjustFilter( const OUString& _rFilter )
{
nReturn |= FLT_USERFILTER;
// no filter found : use it as user defined filter
-#ifdef AUTOSELECT_USERFILTER
- if ( createNewUserFilter( _rFilter, sal_True ) )
-#else
if ( createNewUserFilter( _rFilter, false ) )
-#endif
{ // it's the "all files" filter
nReturn |= FLT_ALLFILESFILTER;
-#ifdef AUTOSELECT_USERFILTER
- // select the "all files" entry
- OUString sAllFilesFilter( SvtResId( STR_FILTERNAME_ALL ) );
- if ( _pImp->HasFilterListEntry( sAllFilesFilter ) )
- {
- _pImp->SelectFilterListEntry( sAllFilesFilter );
- _pImp->SetCurFilter( _pImp->GetSelectedFilterEntry( sAllFilesFilter ) );
- }
- else
- _pImp->SetNoFilterListSelection( ); // there is no "all files" entry
-#endif // AUTOSELECT_USERFILTER
}
-#ifdef AUTOSELECT_USERFILTER
- else
- _pImp->SetNoFilterListSelection( );
-#endif // AUTOSELECT_USERFILTER
}
}
commit 2f804099b7daa42aecb8fa445072a381671f3385
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:53:05 2016 +0200
loplugin:constantparam in framework
Change-Id: I7b7914365ef5d5c6f120f34c93f359c156aa6a02
diff --git a/framework/inc/classes/propertysethelper.hxx b/framework/inc/classes/propertysethelper.hxx
index f843e98..e09c071 100644
--- a/framework/inc/classes/propertysethelper.hxx
+++ b/framework/inc/classes/propertysethelper.hxx
@@ -60,8 +60,6 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
ListenerHash m_lSimpleChangeListener;
ListenerHash m_lVetoChangeListener;
- bool m_bReleaseLockOnCall;
-
// hold it weak ... otherwise this helper has to be "killed" explicitly .-)
css::uno::WeakReference< css::uno::XInterface > m_xBroadcaster;
@@ -76,13 +74,9 @@ class FWI_DLLPUBLIC PropertySetHelper : public css::beans::XPropertySet
* this helper must be used as a baseclass ...
* but then it should synchronize its own calls
* with the same transaction manager then it's superclass.
- *
- * @param bReleaseLockOnCall
- * see member m_bReleaseLockOnCall
*/
PropertySetHelper( osl::Mutex & mutex,
- TransactionManager* pExternalTransactionManager ,
- bool bReleaseLockOnCall );
+ TransactionManager* pExternalTransactionManager);
/** free all needed memory.
*/
diff --git a/framework/inc/classes/taskcreator.hxx b/framework/inc/classes/taskcreator.hxx
index 57ca358..295fb21 100644
--- a/framework/inc/classes/taskcreator.hxx
+++ b/framework/inc/classes/taskcreator.hxx
@@ -53,8 +53,7 @@ class TaskCreator
TaskCreator( const css::uno::Reference< css::uno::XComponentContext >& xContext );
virtual ~TaskCreator( );
- css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName ,
- bool bVisible );
+ css::uno::Reference< css::frame::XFrame > createTask( const OUString& sName );
// helper
private:
diff --git a/framework/inc/uielement/uielement.hxx b/framework/inc/uielement/uielement.hxx
index aa94bea..177c99c 100644
--- a/framework/inc/uielement/uielement.hxx
+++ b/framework/inc/uielement/uielement.hxx
@@ -72,12 +72,11 @@ struct UIElement
UIElement( const OUString& rName,
const OUString& rType,
- const css::uno::Reference< css::ui::XUIElement >& rUIElement,
- bool bFloating = false
+ const css::uno::Reference< css::ui::XUIElement >& rUIElement
) : m_aType( rType ),
m_aName( rName ),
m_xUIElement( rUIElement ),
- m_bFloating( bFloating ),
+ m_bFloating( false ),
m_bVisible( true ),
m_bUserActive( false ),
m_bCreateNewRowCol0( false ),
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index b575fbe..347cfb0 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -232,10 +232,10 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::reload()
css::uno::Reference< css::io::XStream > xStreamNoLang;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT, true); // sal_True => open or create!
+ xStream = m_aPresetHandler.openTarget(TARGET_CURRENT); // open or create!
try
{
- xStreamNoLang = m_aPresetHandler.openPreset(PRESET_DEFAULT, true);
+ xStreamNoLang = m_aPresetHandler.openPreset(PRESET_DEFAULT);
}
catch(const css::io::IOException&) {} // does not have to exist
}
@@ -273,7 +273,7 @@ void SAL_CALL XMLBasedAcceleratorConfiguration::store()
css::uno::Reference< css::io::XStream > xStream;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT, true); // sal_True => open or create!
+ xStream = m_aPresetHandler.openTarget(TARGET_CURRENT); // open or create!
}
css::uno::Reference< css::io::XOutputStream > xOut;
@@ -329,7 +329,7 @@ sal_Bool SAL_CALL XMLBasedAcceleratorConfiguration::isReadOnly()
css::uno::Reference< css::io::XStream > xStream;
{
SolarMutexGuard g;
- xStream = m_aPresetHandler.openTarget(TARGET_CURRENT, true); // sal_True => open or create!
+ xStream = m_aPresetHandler.openTarget(TARGET_CURRENT); // open or create!
}
css::uno::Reference< css::io::XOutputStream > xOut;
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index 5e2397a..ceb134e 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -566,13 +566,12 @@ void PresetHandler::copyPresetToTarget(const OUString& sPreset,
commitUserChanges();
}
-css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString& sPreset,
- bool bUseNoLangGlobal)
+css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString& sPreset)
{
css::uno::Reference< css::embed::XStorage > xFolder;
{
SolarMutexGuard g;
- xFolder = bUseNoLangGlobal? m_xWorkingStorageNoLang: m_xWorkingStorageShare;
+ xFolder = m_xWorkingStorageNoLang;
}
// e.g. module without any config data ?!
@@ -587,8 +586,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openPreset(const OUString
return xStream;
}
-css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString& sTarget ,
- bool bCreateIfMissing)
+css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString& sTarget)
{
css::uno::Reference< css::embed::XStorage > xFolder;
{
@@ -603,15 +601,11 @@ css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString
OUString sFile(sTarget);
sFile += ".xml";
- sal_Int32 nOpenMode = css::embed::ElementModes::READWRITE;
- if (!bCreateIfMissing)
- nOpenMode |= css::embed::ElementModes::NOCREATE;
-
// try it in read/write mode first and ignore errors.
css::uno::Reference< css::io::XStream > xStream;
try
{
- xStream = xFolder->openStreamElement(sFile, nOpenMode);
+ xStream = xFolder->openStreamElement(sFile, css::embed::ElementModes::READWRITE);
return xStream;
}
catch(const css::uno::RuntimeException&)
@@ -621,8 +615,7 @@ css::uno::Reference< css::io::XStream > PresetHandler::openTarget(const OUString
// try it readonly if it failed before.
// inform user about errors (use original exceptions!)
- nOpenMode &= ~css::embed::ElementModes::WRITE;
- xStream = xFolder->openStreamElement(sFile, nOpenMode);
+ xStream = xFolder->openStreamElement(sFile, css::embed::ElementModes::READ);
return xStream;
}
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 9c32c50d..b5c4a9d 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -57,8 +57,7 @@ TaskCreator::~TaskCreator()
/*-****************************************************************************************************
TODO document me
*//*-*****************************************************************************************************/
-css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUString& sName ,
- bool bVisible )
+css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUString& sName )
{
css::uno::Reference< css::lang::XSingleServiceFactory > xCreator;
OUString sCreator = IMPLEMENTATIONNAME_FWK_TASKCREATOR;
@@ -99,7 +98,7 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const OUStrin
lArgs[1] <<= aArg;
aArg.Name = ARGUMENT_MAKEVISIBLE;
- aArg.Value <<= bVisible;
+ aArg.Value <<= false;
lArgs[2] <<= aArg;
aArg.Name = ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE;
diff --git a/framework/source/fwi/classes/propertysethelper.cxx b/framework/source/fwi/classes/propertysethelper.cxx
index 8595ec3..69c083c 100644
--- a/framework/source/fwi/classes/propertysethelper.cxx
+++ b/framework/source/fwi/classes/propertysethelper.cxx
@@ -27,11 +27,9 @@
namespace framework{
PropertySetHelper::PropertySetHelper( osl::Mutex & mutex,
- TransactionManager* pExternalTransactionManager ,
- bool bReleaseLockOnCall )
+ TransactionManager* pExternalTransactionManager )
: m_lSimpleChangeListener(mutex)
, m_lVetoChangeListener (mutex)
- , m_bReleaseLockOnCall (bReleaseLockOnCall )
, m_rTransactionManager (*pExternalTransactionManager )
{
}
@@ -162,13 +160,6 @@ void SAL_CALL PropertySetHelper::setPropertyValue(const OUString& sProperty,
css::beans::Property aPropInfo = pIt->second;
bool bLocked = true;
- if (m_bReleaseLockOnCall)
- {
- aWriteLock.clear();
- bLocked = false;
- // <- SAFE
- }
-
css::uno::Any aCurrentValue = impl_getPropertyValue(aPropInfo.Name, aPropInfo.Handle);
if (! bLocked)
@@ -189,12 +180,6 @@ void SAL_CALL PropertySetHelper::setPropertyValue(const OUString& sProperty,
aEvent.NewValue = aValue;
aEvent.Source.set(m_xBroadcaster.get(), css::uno::UNO_QUERY);
- if (m_bReleaseLockOnCall)
- {
- aWriteLock.clear();
- // <- SAFE
- }
-
if (impl_existsVeto(aEvent))
throw css::beans::PropertyVetoException();
@@ -219,9 +204,6 @@ css::uno::Any SAL_CALL PropertySetHelper::getPropertyValue(const OUString& sProp
css::beans::Property aPropInfo = pIt->second;
- if (m_bReleaseLockOnCall)
- aReadLock.clear();
-
return impl_getPropertyValue(aPropInfo.Name, aPropInfo.Handle);
}
diff --git a/framework/source/inc/accelerators/presethandler.hxx b/framework/source/inc/accelerators/presethandler.hxx
index 05fd107..c096e68 100644
--- a/framework/source/inc/accelerators/presethandler.hxx
+++ b/framework/source/inc/accelerators/presethandler.hxx
@@ -277,13 +277,11 @@ class PresetHandler
@param sPreset
the ALIAS name of an existing preset.
- @param bNoLangGlobal
- access the global language-independent storage instead of the preset storage
+ Accesses the global language-independent storage instead of the preset storage
@return The opened preset stream ... or NULL if the preset does not exists.
*/
- css::uno::Reference< css::io::XStream > openPreset(const OUString& sPreset,
- bool bUseNoLangGlobal = false);
+ css::uno::Reference< css::io::XStream > openPreset(const OUString& sPreset);
/** @short open the specified target as stream object
and return it.
@@ -296,15 +294,10 @@ class PresetHandler
@param sTarget
the ALIAS name of the target.
- @param bCreateIfMissing
- create target file, if it does not still exists.
- Note: That does not means reseting of an existing file!
-
@return The opened target stream ... or NULL if the target does not exists
or couldnt be created as new one.
*/
- css::uno::Reference< css::io::XStream > openTarget(const OUString& sTarget ,
- bool bCreateIfMissing);
+ css::uno::Reference< css::io::XStream > openTarget(const OUString& sTarget);
/** @short do anything which is necessary to flush all changes
back to disk.
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index d03bc04..f4514f4 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -925,7 +925,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::findFrame( const OUS
if ( sTargetFrameName==SPECIALTARGET_BLANK )
{
TaskCreator aCreator( m_xContext );
- xTarget = aCreator.createTask(sTargetFrameName,false);
+ xTarget = aCreator.createTask(sTargetFrameName);
}
// I.II) "_top"
@@ -1009,7 +1009,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::findFrame( const OUS
)
{
TaskCreator aCreator( m_xContext );
- xTarget = aCreator.createTask(sTargetFrameName,false);
+ xTarget = aCreator.createTask(sTargetFrameName);
}
}
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 2492975..28a6830 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -486,9 +486,7 @@ DEFINE_XTYPEPROVIDER_21 ( Frame
*//*-*****************************************************************************************************/
Frame::Frame( const css::uno::Reference< css::uno::XComponentContext >& xContext )
: TransactionBase ( )
- , PropertySetHelper ( m_aMutex,
- &m_aTransactionManager,
- false) // sal_False => don't release shared mutex on calling us!
+ , PropertySetHelper ( m_aMutex, &m_aTransactionManager)
// init member
, m_xContext ( xContext )
, m_aListenerContainer ( m_aMutex )
@@ -1022,7 +1020,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const OUStr
if ( sTargetFrameName==SPECIALTARGET_BLANK )
{
TaskCreator aCreator(xContext);
- xTarget = aCreator.createTask(sTargetFrameName,false);
+ xTarget = aCreator.createTask(sTargetFrameName);
}
// I.II) "_parent"
@@ -1219,7 +1217,7 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Frame::findFrame( const OUStr
)
{
TaskCreator aCreator(xContext);
- xTarget = aCreator.createTask(sTargetFrameName,false);
+ xTarget = aCreator.createTask(sTargetFrameName);
}
}
diff --git a/framework/source/services/tabwindowservice.cxx b/framework/source/services/tabwindowservice.cxx
index e5c4311..845f964 100644
--- a/framework/source/services/tabwindowservice.cxx
+++ b/framework/source/services/tabwindowservice.cxx
@@ -192,9 +192,7 @@ DEFINE_XTYPEPROVIDER_6 ( TabWindowService ,
TabWindowService::TabWindowService()
: TransactionBase ( )
- , PropertySetHelper ( m_aMutex,
- &m_aTransactionManager ,
- false ) // sal_False => don't release shared mutex on calling us!
+ , PropertySetHelper ( m_aMutex, &m_aTransactionManager)
, OWeakObject ( )
// Init member
commit 5b79f5a4e5126a427c14c46e65b3a0b898024f60
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:44:28 2016 +0200
loplugin:constantparam in idl
Change-Id: I2fa4c74c9709d3a8495341f00d974ba960c18deb
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index 93f335a..dad17bc 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -25,13 +25,10 @@
class SvMetaModule : public SvMetaObject
{
- bool bImported;
public:
SvRefMemberList<SvMetaClass *> aClassList;
- SvMetaModule( bool bImported );
-
- bool IsImported() const { return bImported; }
+ SvMetaModule();
void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
};
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 197666d..0660755 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -26,8 +26,7 @@
#include <osl/file.hxx>
-SvMetaModule::SvMetaModule( bool bImp )
- : bImported( bImp )
+SvMetaModule::SvMetaModule()
{
}
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 4926b59..d001ee4 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -461,8 +461,7 @@ bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
for( n = 0; n < GetModuleList().size(); n++ )
{
SvMetaModule * pModule = GetModuleList()[n];
- if( !pModule->IsImported() )
- pModule->WriteSfx( *this, aTmpStm );
+ pModule->WriteSfx( *this, aTmpStm );
aTmpStm.Seek( 0 );
}
for( n = 0; n < aUsedTypes.size(); n++ )
diff --git a/idl/source/prj/parser.cxx b/idl/source/prj/parser.cxx
index c1a3096..48e7574 100644
--- a/idl/source/prj/parser.cxx
+++ b/idl/source/prj/parser.cxx
@@ -38,7 +38,7 @@ void SvIdlParser::ReadSvIdl( const OUString & rPath )
return;
Read( SvHash_module() );
- tools::SvRef<SvMetaModule> aModule = new SvMetaModule( false/*bImported*/ );
+ tools::SvRef<SvMetaModule> aModule = new SvMetaModule;
ReadModuleHeader(*aModule);
rBase.GetModuleList().push_back( aModule );
}
commit 1e509513d95e810d44246e65fe3d1547772bc06b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:42:08 2016 +0200
loplugin:constantparam in linguistic
Change-Id: Iffdcaae0b7cd99a481068c0c97ee25f5b40ee6ec
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 5c09ae8..26010a1 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -228,7 +228,7 @@ sal_Bool SAL_CALL
throw(IllegalArgumentException, RuntimeException, std::exception)
{
MutexGuard aGuard( GetLinguMutex() );
- return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, true );
+ return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties );
}
@@ -238,7 +238,7 @@ Reference< XSpellAlternatives > SAL_CALL
throw(IllegalArgumentException, RuntimeException, std::exception)
{
MutexGuard aGuard( GetLinguMutex() );
- return spell_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, true );
+ return spell_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties );
}
@@ -279,8 +279,7 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry(
bool SpellCheckerDispatcher::isValid_Impl(
const OUString& rWord,
LanguageType nLanguage,
- const PropertyValues& rProperties,
- bool bCheckDics)
+ const PropertyValues& rProperties)
throw( RuntimeException, IllegalArgumentException, std::exception )
{
MutexGuard aGuard( GetLinguMutex() );
@@ -419,8 +418,7 @@ bool SpellCheckerDispatcher::isValid_Impl(
}
// cross-check against results from dictionaries which have precedence!
- if (bCheckDics &&
- GetDicList().is() && IsUseDicList( rProperties, GetPropSet() ))
+ if (GetDicList().is() && IsUseDicList( rProperties, GetPropSet() ))
{
Reference< XDictionaryEntry > xTmp( lcl_GetRulingDictionaryEntry( aChkWord, nLanguage ) );
if (xTmp.is()) {
@@ -445,8 +443,7 @@ bool SpellCheckerDispatcher::isValid_Impl(
Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
const OUString& rWord,
LanguageType nLanguage,
- const PropertyValues& rProperties,
- bool bCheckDics )
+ const PropertyValues& rProperties )
throw(IllegalArgumentException, RuntimeException, std::exception)
{
MutexGuard aGuard( GetLinguMutex() );
@@ -642,7 +639,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
xDList = GetDicList();
// cross-check against results from user-dictionaries which have precedence!
- if (bCheckDics && xDList.is())
+ if (xDList.is())
{
Reference< XDictionaryEntry > xTmp( lcl_GetRulingDictionaryEntry( aChkWord, nLanguage ) );
if (xTmp.is())
@@ -722,7 +719,7 @@ Reference< XSpellAlternatives > SpellCheckerDispatcher::spell_Impl(
// remove entries listed in negative dictionaries
// (we don't want to display suggestions that will be regarded as misspelled later on)
- if (bCheckDics && xDList.is())
+ if (xDList.is())
SeqRemoveNegEntries( aProposals, xDList, nLanguage );
uno::Reference< linguistic2::XSetSpellAlternatives > xSetAlt( xRes, uno::UNO_QUERY );
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index d6d7863..9dba17c 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -75,15 +75,13 @@ class SpellCheckerDispatcher :
void ClearSvcList();
bool isValid_Impl(const OUString& aWord, LanguageType nLanguage,
- const css::beans::PropertyValues& aProperties,
- bool bCheckDics)
+ const css::beans::PropertyValues& aProperties)
throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception );
css::uno::Reference<
css::linguistic2::XSpellAlternatives >
spell_Impl(const OUString& aWord, LanguageType nLanguage,
- const css::beans::PropertyValues& aProperties,
- bool bCheckDics)
+ const css::beans::PropertyValues& aProperties)
throw( css::uno::RuntimeException, css::lang::IllegalArgumentException, std::exception );
public:
commit b6fc1f033f3c23cac389ddaec32af04dc80cc1a2
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:40:09 2016 +0200
loplugin:constantparam in lotuswordpro
Change-Id: I09c2301adb674fbed68a2659f828c7501a90b0c6
diff --git a/lotuswordpro/source/filter/lwpdrawobj.cxx b/lotuswordpro/source/filter/lwpdrawobj.cxx
index cd1dee6..82e1fc5 100644
--- a/lotuswordpro/source/filter/lwpdrawobj.cxx
+++ b/lotuswordpro/source/filter/lwpdrawobj.cxx
@@ -252,7 +252,7 @@ void LwpDrawObj::SetLineStyle(XFDrawStyle* pStyle, sal_uInt8 nWidth, sal_uInt8 n
if (nLineStyle == LS_DOT)
{
- pStyle->SetLineDashStyle(enumXFLineDash, 1, 1, 0.05, 0.05, 0.05);
+ pStyle->SetLineDashStyle(enumXFLineDash, 0.05, 0.05, 0.05);
}
// line width
@@ -317,11 +317,11 @@ void LwpDrawObj::SetArrowHead(XFDrawStyle* pOpenedObjStyle, sal_uInt8 nArrowFlag
if (nLeftArrow)
{
- pOpenedObjStyle->SetArrowStart( GetArrowName(nLeftArrow), fArrowSize, true);
+ pOpenedObjStyle->SetArrowStart( GetArrowName(nLeftArrow), fArrowSize);
}
if (nRightArrow)
{
- pOpenedObjStyle->SetArrowEnd( GetArrowName(nRightArrow), fArrowSize, true);
+ pOpenedObjStyle->SetArrowEnd( GetArrowName(nRightArrow), fArrowSize);
}
}
diff --git a/lotuswordpro/source/filter/lwpfont.cxx b/lotuswordpro/source/filter/lwpfont.cxx
index 8805533..437a962 100644
--- a/lotuswordpro/source/filter/lwpfont.cxx
+++ b/lotuswordpro/source/filter/lwpfont.cxx
@@ -236,7 +236,7 @@ void LwpFontTableEntry::RegisterFontDecl()
{
if(m_FaceName.str().isEmpty()) return;
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- XFFontDecl aFontDecl1( m_FaceName.str(), m_FaceName.str(), false );
+ XFFontDecl aFontDecl1( m_FaceName.str(), m_FaceName.str() );
pXFStyleManager->AddFontDecl(aFontDecl1);
}
diff --git a/lotuswordpro/source/filter/lwpfribmark.cxx b/lotuswordpro/source/filter/lwpfribmark.cxx
index f562e38..7b77d27 100644
--- a/lotuswordpro/source/filter/lwpfribmark.cxx
+++ b/lotuswordpro/source/filter/lwpfribmark.cxx
@@ -436,7 +436,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pDateStyle->AddText(":");
pDateStyle->AddMinute();
pDateStyle->AddText(":");
- pDateStyle->AddSecond(true,0);
+ pDateStyle->AddSecond();
}
else if (sFormula == "%FLM/D/YY")
{
@@ -887,7 +887,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
pTimeStyle->AddText(":");
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
}
else if (sFormula == "%FLH:mm ampm")
{
@@ -912,7 +912,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
pTimeStyle->AddText(":");
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
pTimeStyle->AddText(" ");
pTimeStyle->SetAmPm(true);
}
@@ -923,7 +923,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
pTimeStyle->AddText(":");
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
}
else if (sFormula == "%FLH ampm")
{
@@ -945,7 +945,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
else if (sFormula == "%FLSS")
{
pTimeStyle = new XFTimeStyle;
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
}
else if (sFormula == "%FLampm")
{
@@ -1002,7 +1002,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
pTimeStyle->AddText(":");
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
pTimeStyle->AddText(" ");
pTimeStyle->SetAmPm(true);
}
@@ -1020,7 +1020,7 @@ void LwpFribField::RegisterDateTimeStyle(const OUString& sFormula)
pTimeStyle->AddText(":");
pTimeStyle->AddMinute();
pTimeStyle->AddText(":");
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
}
//other version end
}
diff --git a/lotuswordpro/source/filter/lwpfribtext.cxx b/lotuswordpro/source/filter/lwpfribtext.cxx
index 50bd3f3..1d2c61e 100644
--- a/lotuswordpro/source/filter/lwpfribtext.cxx
+++ b/lotuswordpro/source/filter/lwpfribtext.cxx
@@ -194,7 +194,7 @@ void LwpFribDocVar::RegisterDefaultTimeStyle()
pDateStyle->AddText(":");
pDateStyle->AddMinute();
pDateStyle->AddText(":");
- pDateStyle->AddSecond(true,0);
+ pDateStyle->AddSecond();
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
m_TimeStyle = pXFStyleManager->AddStyle(pDateStyle).m_pStyle->GetStyleName();
diff --git a/lotuswordpro/source/filter/lwpobjid.cxx b/lotuswordpro/source/filter/lwpobjid.cxx
index 22f4c2f..d9f8440 100644
--- a/lotuswordpro/source/filter/lwpobjid.cxx
+++ b/lotuswordpro/source/filter/lwpobjid.cxx
@@ -63,8 +63,8 @@
#include "lwpobjfactory.hxx"
#include "lwpglobalmgr.hxx"
-LwpObjectID::LwpObjectID(sal_uInt32 low, sal_uInt16 high)
- :m_nLow(low), m_nHigh(high), m_nIndex(0), m_bIsCompressed(false)
+LwpObjectID::LwpObjectID()
+ :m_nLow(0), m_nHigh(0), m_nIndex(0), m_bIsCompressed(false)
{
}
/**
diff --git a/lotuswordpro/source/filter/lwpobjid.hxx b/lotuswordpro/source/filter/lwpobjid.hxx
index b461682..ec276d3 100644
--- a/lotuswordpro/source/filter/lwpobjid.hxx
+++ b/lotuswordpro/source/filter/lwpobjid.hxx
@@ -77,7 +77,7 @@ class LwpObject;
class LwpObjectID
{
public:
- LwpObjectID(sal_uInt32 low=0, sal_uInt16 high=0);
+ LwpObjectID();
private:
sal_uInt32 m_nLow;
sal_uInt16 m_nHigh;
diff --git a/lotuswordpro/source/filter/lwpparastyle.cxx b/lotuswordpro/source/filter/lwpparastyle.cxx
index 6870785..ef7ad92 100644
--- a/lotuswordpro/source/filter/lwpparastyle.cxx
+++ b/lotuswordpro/source/filter/lwpparastyle.cxx
@@ -271,20 +271,20 @@ void LwpParaStyle::ApplySubBorder(LwpBorderStuff* pBorderStuff, LwpBorderStuff::
break;
case 0x15: //double , fall through!
case 0x16: //thick double
- pXFBorders->SetDoubleLine(eXFBorderSide, true, false);
+ pXFBorders->SetDoubleLine(eXFBorderSide);
pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.333));
pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.334));
pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.333));
// pXFBorders->SetWidth(eXFBorderSide, fWidth);
break;
case 0x18: //thick-thin
- pXFBorders->SetDoubleLine(eXFBorderSide, true, false);
+ pXFBorders->SetDoubleLine(eXFBorderSide);
pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.5));
pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.25));
pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.25));
break;
case 0x19: //thin-thick
- pXFBorders->SetDoubleLine(eXFBorderSide, true, false);
+ pXFBorders->SetDoubleLine(eXFBorderSide);
pXFBorders->SetWidthInner(eXFBorderSide, static_cast<float>(fWidth*0.7));
pXFBorders->SetWidthOuter(eXFBorderSide, static_cast<float>(fWidth*0.15));
pXFBorders->SetWidthSpace(eXFBorderSide, static_cast<float>(fWidth*0.15));
diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx
index 8329eeb..118848d 100644
--- a/lotuswordpro/source/filter/lwptools.cxx
+++ b/lotuswordpro/source/filter/lwptools.cxx
@@ -410,9 +410,9 @@ XFDateStyle* LwpTools::GetSystemDateStyle(bool bLongFormat)
}
}
if (j==1)
- pDateStyle->AddSecond(false,0);
+ pDateStyle->AddSecond(false);
else
- pDateStyle->AddSecond(true,0);
+ pDateStyle->AddSecond();
break;
}
case 'S':
@@ -731,9 +731,9 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle()
}
}
if (j==1)
- pTimeStyle->AddSecond(false,0);
+ pTimeStyle->AddSecond(false);
else
- pTimeStyle->AddSecond(true,0);
+ pTimeStyle->AddSecond();
break;
}
case 'S':
diff --git a/lotuswordpro/source/filter/xfilter/xfborders.cxx b/lotuswordpro/source/filter/xfilter/xfborders.cxx
index ec406b9..2d3ef73 100644
--- a/lotuswordpro/source/filter/xfilter/xfborders.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfborders.cxx
@@ -227,21 +227,21 @@ void XFBorders::SetWidth(enumXFBorder side, double width)
}
}
-void XFBorders::SetDoubleLine(enumXFBorder side, bool dual,bool bSameWidth)
+void XFBorders::SetDoubleLine(enumXFBorder side)
{
switch(side)
{
case enumXFBorderLeft:
- m_aBorderLeft.SetDoubleLine(dual,bSameWidth);
+ m_aBorderLeft.SetDoubleLine(true/*dual*/,false/*bSameWidth*/);
break;
case enumXFBorderRight:
- m_aBorderRight.SetDoubleLine(dual,bSameWidth);
+ m_aBorderRight.SetDoubleLine(true/*dual*/,false/*bSameWidth*/);
break;
case enumXFBorderTop:
- m_aBorderTop.SetDoubleLine(dual,bSameWidth);
+ m_aBorderTop.SetDoubleLine(true/*dual*/,false/*bSameWidth*/);
break;
case enumXFBorderBottom:
- m_aBorderBottom.SetDoubleLine(dual,bSameWidth);
+ m_aBorderBottom.SetDoubleLine(true/*dual*/,false/*bSameWidth*/);
break;
default:
break;
diff --git a/lotuswordpro/source/filter/xfilter/xfborders.hxx b/lotuswordpro/source/filter/xfilter/xfborders.hxx
index 57602c2..c537cb0 100644
--- a/lotuswordpro/source/filter/xfilter/xfborders.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfborders.hxx
@@ -148,9 +148,8 @@ public:
/**
* @descr Set border side as double line.
- * @param bSameWidth whether two borders are same width.
*/
- void SetDoubleLine(enumXFBorder side, bool dual,bool bSameWidth);
+ void SetDoubleLine(enumXFBorder side);
/**
* @descr Set inner border with of border side.
diff --git a/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx b/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx
index 1ae8acd..f93af6e 100644
--- a/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfdatestyle.hxx
@@ -101,7 +101,7 @@ public:
void AddMinute( bool bLongFmt = true );
- void AddSecond( bool bLongFmt = true, sal_Int16 nDecimalPos = 2);
+ void AddSecond( bool bLongFmt = true );
void AddAmPm();
@@ -187,12 +187,12 @@ inline void XFDateStyle::AddMinute( bool bLongFmt )
m_aParts.AddStyle(part);
}
-inline void XFDateStyle::AddSecond( bool bLongFmt, sal_Int16 pos)
+inline void XFDateStyle::AddSecond( bool bLongFmt )
{
XFDatePart *part = new XFDatePart();
part->SetPartType(enumXFDateSecond);
part->SetLongFmt(bLongFmt);
- part->SetDecimalPos(pos);
+ part->SetDecimalPos(0);
m_aParts.AddStyle(part);
}
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
index 93ea544..e4f6038 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.cxx
@@ -89,7 +89,7 @@ XFDrawStyle::~XFDrawStyle()
}
}
-void XFDrawStyle::SetLineStyle(double width, XFColor color, sal_Int32 transparency)
+void XFDrawStyle::SetLineStyle(double width, XFColor color)
{
if( !m_pLineStyle )
{
@@ -98,10 +98,10 @@ void XFDrawStyle::SetLineStyle(double width, XFColor color, sal_Int32 transpa
}
m_pLineStyle->SetWidth(width);
m_pLineStyle->SetColor(color);
- m_pLineStyle->SetTransparency(transparency);
+ m_pLineStyle->SetTransparency(0);
}
-void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, int num1, int num2, double len1, double len2, double space )
+void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space )
{
if( !m_pLineStyle )
{
@@ -109,9 +109,9 @@ void XFDrawStyle::SetLineDashStyle(enumXFLineStyle style, int num1, int num2,
m_pLineStyle->SetStyleName( XFGlobal::GenStrokeDashName());
}
m_pLineStyle->SetLineStyle(style);
- m_pLineStyle->SetDot1Number(num1);
+ m_pLineStyle->SetDot1Number(1);
m_pLineStyle->SetDot1Length(len1);
- m_pLineStyle->SetDot2Number(num2);
+ m_pLineStyle->SetDot2Number(1);
m_pLineStyle->SetDot2Length(len2);
m_pLineStyle->SetSpace(space);
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
diff --git a/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx b/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx
index 76cd511..9a4a3af 100644
--- a/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfdrawstyle.hxx
@@ -86,12 +86,12 @@ public:
/**
* @descr Set drawing object border line.
*/
- void SetLineStyle(double width, XFColor color = XFColor(0,0,0), sal_Int32 transparency = 0);
+ void SetLineStyle(double width, XFColor color = XFColor(0,0,0));
/**
* @descr Set drawing object dash border style.
*/
- void SetLineDashStyle(enumXFLineStyle style, int num1, int num2, double len1, double len2, double space );
+ void SetLineDashStyle(enumXFLineStyle style, double len1, double len2, double space );
/**
* @descr Set drawing object area fill color.
@@ -106,12 +106,12 @@ public:
/**
* @descr Set drawing object arrow start style,only lines can have arrows.
*/
- void SetArrowStart(const OUString& start, double size=0.3, bool center = false);
+ void SetArrowStart(const OUString& start, double size=0.3);
/**
* @descr Set drawing object arrow end style,only lines can have arrows.
*/
- void SetArrowEnd(const OUString& end, double size=0.3, bool center = false);
+ void SetArrowEnd(const OUString& end, double size=0.3);
void SetFontWorkStyle(enumXFFWStyle eStyle, enumXFFWAdjust eAdjust);
@@ -133,20 +133,20 @@ private:
bool m_bArrowEndCenter;
};
-inline void XFDrawStyle::SetArrowStart(const OUString& start, double size, bool center)
+inline void XFDrawStyle::SetArrowStart(const OUString& start, double size)
{
assert(size>0);
m_strArrowStart = start;
m_fArrowStartSize = size;
- m_bArrowStartCenter = center;
+ m_bArrowStartCenter = true;
}
-inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size, bool center)
+inline void XFDrawStyle::SetArrowEnd(const OUString& end, double size)
{
assert(size>0);
m_strArrowEnd = end;
m_fArrowEndSize = size;
- m_bArrowEndCenter = center;
+ m_bArrowEndCenter = true;
}
#endif
diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx
index fae8206..64da24e 100644
--- a/lotuswordpro/source/filter/xfilter/xffontdecl.cxx
+++ b/lotuswordpro/source/filter/xfilter/xffontdecl.cxx
@@ -59,11 +59,11 @@
************************************************************************/
#include "xffontdecl.hxx"
-XFFontDecl::XFFontDecl(const OUString& name, const OUString& family, bool fixed)
+XFFontDecl::XFFontDecl(const OUString& name, const OUString& family)
{
m_strFontName = name;
m_strFontFamily = family;
- m_bPitchFixed = fixed;
+ m_bPitchFixed = false;
}
diff --git a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx
index 813033e..d733bdc 100644
--- a/lotuswordpro/source/filter/xfilter/xffontdecl.hxx
+++ b/lotuswordpro/source/filter/xfilter/xffontdecl.hxx
@@ -71,7 +71,7 @@
class XFFontDecl
{
public:
- XFFontDecl(const OUString& name, const OUString& family, bool fixed = false);
+ XFFontDecl(const OUString& name, const OUString& family);
public:
/**
diff --git a/lotuswordpro/source/filter/xfilter/xftimestyle.hxx b/lotuswordpro/source/filter/xfilter/xftimestyle.hxx
index dfdbac0..e12f29f 100644
--- a/lotuswordpro/source/filter/xfilter/xftimestyle.hxx
+++ b/lotuswordpro/source/filter/xfilter/xftimestyle.hxx
@@ -115,7 +115,7 @@ public:
void AddMinute( bool bLongFmt = true );
- void AddSecond( bool bLongFmt = true, sal_Int16 nDecimalPos = 2);
+ void AddSecond( bool bLongFmt = true );
void SetAmPm(bool bAmPm);
@@ -170,12 +170,12 @@ inline void XFTimeStyle::AddMinute( bool bLongFmt )
m_aParts.push_back(part);
}
-inline void XFTimeStyle::AddSecond( bool bLongFmt, sal_Int16 pos)
+inline void XFTimeStyle::AddSecond( bool bLongFmt )
{
XFTimePart part;
part.SetPartType(enumXFDateSecond);
part.SetLongFmt(bLongFmt);
- part.SetDecimalPos(pos);
+ part.SetDecimalPos(0);
m_aParts.push_back(part);
}
commit de0e1e7d4bc99be3e9b9355adf243677914de4c0
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:26:38 2016 +0200
loplugin:constantparam in reportdesign
Change-Id: Ic1bba5e63359894115b3d1e293a5d9efdab041e1
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 4b34eb3..5307ba3 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -54,8 +54,7 @@ protected:
public:
OReportPage( OReportModel& rModel
- ,const css::uno::Reference< css::report::XSection >& _xSection
- ,bool bMasterPage = false );
+ ,const css::uno::Reference< css::report::XSection >& _xSection );
virtual SdrPage* Clone() const override;
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index 9cf1049..fef2864 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -30,9 +30,8 @@ using namespace ::com::sun::star;
OReportPage::OReportPage( OReportModel& _rModel
- ,const uno::Reference< report::XSection >& _xSection
- ,bool bMasterPage )
- :SdrPage( _rModel, bMasterPage )
+ ,const uno::Reference< report::XSection >& _xSection )
+ :SdrPage( _rModel, false/*bMasterPage*/ )
,rModel(_rModel)
,m_xSection(_xSection)
,m_bSpecialInsertMode(false)
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 2888c8b..b32ccf6 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -71,8 +71,8 @@ public:
OControlStyleContext::OControlStyleContext( ORptFilter& rImport,
sal_uInt16 nPrfx, const OUString& rLName,
const Reference< XAttributeList > & xAttrList,
- SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle ) :
- XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, bDefaultStyle ),
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily ) :
+ XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily, false/*bDefaultStyle*/ ),
pStyles(&rStyles),
m_nNumberFormat(-1),
m_rImport(rImport)
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.hxx b/reportdesign/source/filter/xml/xmlStyleImport.hxx
index 74de6bf..34e1d5b 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.hxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.hxx
@@ -57,11 +57,10 @@ namespace rptxml
public:
-
OControlStyleContext( ORptFilter& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
- SvXMLStylesContext& rStyles, sal_uInt16 nFamily, bool bDefaultStyle = false );
+ SvXMLStylesContext& rStyles, sal_uInt16 nFamily );
virtual ~OControlStyleContext();
diff --git a/reportdesign/source/ui/inc/RptUndo.hxx b/reportdesign/source/ui/inc/RptUndo.hxx
index 6b49fb6..09515fe 100644
--- a/reportdesign/source/ui/inc/RptUndo.hxx
+++ b/reportdesign/source/ui/inc/RptUndo.hxx
@@ -80,8 +80,7 @@ namespace rptui
,::std::mem_fun_t< css::uno::Reference< css::report::XSection >
,OReportHelper> _pMemberFunction
,const css::uno::Reference< css::report::XReportDefinition >& _xReport
- ,Action _eAction
- ,sal_uInt16 nCommentID);
+ ,Action _eAction);
virtual ~OReportSectionUndo();
};
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 0d68089..982715b 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -119,7 +119,7 @@ namespace rptui
/** returns the iterator at pos _nPos or the end()
*/
TSectionsMap::iterator getIteratorAtPos(sal_uInt16 _nPos);
- void collectRectangles(TRectangleMap& _rMap,bool _bBoundRects);
+ void collectRectangles(TRectangleMap& _rMap);
static void collectBoundResizeRect(const TRectangleMap& _rSortRectangles,sal_Int32 _nControlModification,bool _bAlignAtSection,bool _bBoundRects,Rectangle& _rBound,Rectangle& _rResize);
void impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Point& _rStartPoint,bool _bSet);
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index dd08cb6..18b423a 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -220,9 +220,8 @@ OReportSectionUndo::OReportSectionUndo(OReportModel& _rMod,sal_uInt16 _nSlot
,::std::mem_fun_t< uno::Reference< report::XSection >
,OReportHelper> _pMemberFunction
,const uno::Reference< report::XReportDefinition >& _xReport
- ,Action _eAction
- ,sal_uInt16 nCommentID)
-: OSectionUndo(_rMod,_nSlot,_eAction,nCommentID)
+ ,Action _eAction)
+: OSectionUndo(_rMod,_nSlot,_eAction,0)
,m_aReportHelper(_xReport)
,m_pMemberFunction(_pMemberFunction)
{
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ca02bc5..579fbb9 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -3793,14 +3793,12 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
,::std::mem_fun(&OReportHelper::getReportHeader)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
- ,0
));
addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO
,::std::mem_fun(&OReportHelper::getReportFooter)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
- ,0
));
}
@@ -3843,7 +3841,6 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
,::std::mem_fun(&OReportHelper::getPageHeader)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
- ,0
));
addUndoAction(new OReportSectionUndo(*m_aReportModel
@@ -3851,7 +3848,6 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
,::std::mem_fun(&OReportHelper::getPageFooter)
,m_xReportDefinition
,bSwitchOn ? Inserted : Removed
- ,0
));
}
switch( _nId )
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 8a21c38..1520e97 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -664,7 +664,7 @@ void OViewsWindow::setMarked(const uno::Sequence< uno::Reference< report::XRepor
}
}
-void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles, bool _bBoundRects)
+void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles)
{
TSectionsMap::iterator aIter = m_aSections.begin();
TSectionsMap::iterator aEnd = m_aSections.end();
@@ -679,7 +679,7 @@ void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles, bool _bBo
{
const SdrMark* pM = rView.GetSdrMarkByIndex(i);
SdrObject* pObj = pM->GetMarkedSdrObj();
- Rectangle aObjRect(_bBoundRects ? pObj->GetCurrentBoundRect() : pObj->GetSnapRect());
+ Rectangle aObjRect(pObj->GetSnapRect());
_rSortRectangles.insert(TRectangleMap::value_type(aObjRect,TRectangleMap::mapped_type(pObj,&rView)));
}
}
@@ -780,7 +780,7 @@ void OViewsWindow::alignMarkedObjects(sal_Int32 _nControlModification,bool _bAli
}
RectangleLess aCompare(eCompareMode,aRefPoint);
TRectangleMap aSortRectangles(aCompare);
- collectRectangles(aSortRectangles,false);
+ collectRectangles(aSortRectangles);
Rectangle aBound;
Rectangle aResize;
commit e73638279b3e6634b47ca77de993cf2be08ae5d5
Author: Noel Grandin <noel at peralex.com>
Date: Wed Mar 23 09:19:06 2016 +0200
loplugin:constantparam in rsc
Change-Id: I54f80c9c759eec4b73d1fd194e3efc8156bd3e2d
diff --git a/rsc/inc/rsccont.hxx b/rsc/inc/rsccont.hxx
index cd1deaa..0f4bece 100644
--- a/rsc/inc/rsccont.hxx
+++ b/rsc/inc/rsccont.hxx
@@ -117,8 +117,7 @@ class RscCont : public RscContWriteSrc
{
public:
RscCont( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper = nullptr,
- bool bNoId = true );
+ RscTop * pSuper = nullptr );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, sal_uInt32, bool bExtra ) override;
};
@@ -127,8 +126,7 @@ class RscContExtraData : public RscContWriteSrc
{
public:
RscContExtraData( Atom nId, sal_uInt32 nTypId,
- RscTop * pSuper = nullptr,
- bool bNoId = true );
+ RscTop * pSuper = nullptr );
ERRTYPE WriteRc( const RSCINST & rInst, RscWriteRc & aMem,
RscTypCont * pTC, sal_uInt32, bool bExtra ) override;
};
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 9aadf3d..fc04f97 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -276,12 +276,10 @@ public:
// deletes all resource objects of this file
void Delete( RscFileTab::Index lFileKey );
RscTop * GetRoot() { return pRoot; }
- sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName, sal_uInt32 nConst,
- sal_uInt32 nId, bool bFirst );
+ sal_uInt32 PutSysName( sal_uInt32 nRscTyp, char * pName );
void ClearSysNames();
ERRTYPE WriteRc( WriteRcContext& rContext );
- void WriteSrc( FILE * fOutput, RscFileTab::Index nFileIndex,
- bool bName = true );
+ void WriteSrc( FILE * fOutput, RscFileTab::Index nFileIndex );
void PutTranslatorKey( sal_uInt64 nKey );
void IncFilePos( sal_uLong nOffset ){ nFilePos += nOffset; }
};
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 2c253e8..ff19a3b 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -254,12 +254,11 @@ RscTop * RscTypCont::SearchType( Atom nId )
return nullptr;
}
-sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName,
- sal_uInt32 nConst, sal_uInt32 nId, bool bFirst )
+sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName )
{
RscSysEntry *pSysEntry;
RscSysEntry *pFoundEntry = nullptr;
- bool bId1 = false;
+ bool bId1 = false;
for ( size_t i = 0, n = aSysLst.size(); i < n; ++i )
{
@@ -268,8 +267,8 @@ sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName,
bId1 = true;
if( !strcmp( pSysEntry->aFileName.getStr(), pFileName ) )
if( pSysEntry->nRscTyp == nRscTyp &&
- pSysEntry->nTyp == nConst &&
- pSysEntry->nRefId == nId)
+ pSysEntry->nTyp == 0 &&
+ pSysEntry->nRefId == 0)
{
pFoundEntry = pSysEntry;
break;
@@ -277,21 +276,15 @@ sal_uInt32 RscTypCont::PutSysName( sal_uInt32 nRscTyp, char * pFileName,
}
pSysEntry = pFoundEntry;
- if ( !pSysEntry || (bFirst && !bId1) )
+ if ( !pSysEntry )
{
pSysEntry = new RscSysEntry;
pSysEntry->nKey = nUniqueId++;
pSysEntry->nRscTyp = nRscTyp;
- pSysEntry->nTyp = nConst;
- pSysEntry->nRefId = nId;
+ pSysEntry->nTyp = 0;
+ pSysEntry->nRefId = 0;
pSysEntry->aFileName = pFileName;
- if( bFirst && !bId1 )
- {
- pSysEntry->nKey = 1;
- aSysLst.insert( aSysLst.begin(), pSysEntry );
- }
- else
- aSysLst.push_back( pSysEntry );
+ aSysLst.push_back( pSysEntry );
}
return pSysEntry->nKey;
@@ -503,8 +496,7 @@ ERRTYPE RscTypCont::WriteRc( WriteRcContext& rContext )
return aError;
}
-void RscTypCont::WriteSrc( FILE * fOutput, RscFileTab::Index nFileKey,
- bool bName )
+void RscTypCont::WriteSrc( FILE * fOutput, RscFileTab::Index nFileKey )
{
RscEnumerateRef aEnumRef( this, pRoot, fOutput );
@@ -512,49 +504,19 @@ void RscTypCont::WriteSrc( FILE * fOutput, RscFileTab::Index nFileKey,
size_t nItems = SAL_N_ELEMENTS(aUTF8BOM);
bool bSuccess = (nItems == fwrite(aUTF8BOM, 1, nItems, fOutput));
SAL_WARN_IF(!bSuccess, "rsc", "short write");
- if( bName )
+ RscId::SetNames( false );
+ if( nFileKey == RscFileTab::IndexNotFound )
{
- RscFile* pFName;
- WriteInc( fOutput, nFileKey );
-
- if( nFileKey == RscFileTab::IndexNotFound )
- {
- RscFileTab::Index aIndex = aFileTab.FirstIndex();
- while( aIndex != RscFileTab::IndexNotFound )
- {
- pFName = aFileTab.Get( aIndex );
- if( !pFName->IsIncFile() )
- pFName->aDefLst.WriteAll( fOutput );
- aEnumRef.WriteSrc( aIndex );
- aIndex = aFileTab.NextIndex( aIndex );
- };
- }
- else
+ RscFileTab::Index aIndex = aFileTab.FirstIndex();
+ while( aIndex != RscFileTab::IndexNotFound )
{
- pFName = aFileTab.Get( nFileKey );
- if( pFName )
- {
- pFName->aDefLst.WriteAll( fOutput );
- aEnumRef.WriteSrc( nFileKey );
- }
- }
+ aEnumRef.WriteSrc( aIndex );
+ aIndex = aFileTab.NextIndex( aIndex );
+ };
}
else
- {
- RscId::SetNames( false );
- if( nFileKey == RscFileTab::IndexNotFound )
- {
- RscFileTab::Index aIndex = aFileTab.FirstIndex();
- while( aIndex != RscFileTab::IndexNotFound )
- {
- aEnumRef.WriteSrc( aIndex );
- aIndex = aFileTab.NextIndex( aIndex );
- };
- }
- else
- aEnumRef.WriteSrc( nFileKey );
- RscId::SetNames();
- };
+ aEnumRef.WriteSrc( nFileKey );
+ RscId::SetNames();
}
class RscDel
diff --git a/rsc/source/res/rscclass.cxx b/rsc/source/res/rscclass.cxx
index 7529de4..c88cf08 100644
--- a/rsc/source/res/rscclass.cxx
+++ b/rsc/source/res/rscclass.cxx
@@ -788,8 +788,7 @@ ERRTYPE RscSysDepend::WriteSysDependRc( const RSCINST & rInst, RscWriteRc & rMem
if( aTmpMem.Size() && pTC && (*aTmpMem.GetUTF8( 0 ) != '\0') )
{
nId = pTC->PutSysName( rInst.pClass->GetTypId(),
- aTmpMem.GetUTF8( 0 ),
- 0, 0, false/*bFirst*/ );
+ aTmpMem.GetUTF8( 0 ) );
}
rMem.Put( nId );
aError = aFileName.pClass->WriteRcHeader( aFileName, rMem, pTC,
diff --git a/rsc/source/res/rsccont.cxx b/rsc/source/res/rsccont.cxx
index d2fe288..5ae59a3 100644
--- a/rsc/source/res/rsccont.cxx
+++ b/rsc/source/res/rsccont.cxx
@@ -749,8 +749,8 @@ void RscContWriteSrc::WriteSrc( const RSCINST & rInst, FILE * fOutput,
fprintf( fOutput, "}" );
}
-RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper, bool bNoIdent )
- : RscContWriteSrc( nId, nTypeId, pSuper, bNoIdent )
+RscCont::RscCont( Atom nId, sal_uInt32 nTypeId, RscTop * pSuper )
+ : RscContWriteSrc( nId, nTypeId, pSuper, true/*bNoIdent*/ )
{
}
@@ -773,8 +773,8 @@ ERRTYPE RscCont::WriteRc( const RSCINST & rInst, RscWriteRc & rMem,
}
RscContExtraData::RscContExtraData( Atom nId, sal_uInt32 nTypeId,
- RscTop * pSuper, bool bNoIdent )
- : RscContWriteSrc( nId, nTypeId, pSuper, bNoIdent )
+ RscTop * pSuper )
+ : RscContWriteSrc( nId, nTypeId, pSuper, true/*bNoIdent*/ )
{
}
diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 6d663a2..fe9107d 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -401,7 +401,7 @@ void RscCompiler::EndCompile()
RscFile* pFN = pTC->aFileTab.Get( aIndex );
if( !pFN->IsIncFile() )
{
- pTC->WriteSrc( foutput, RscFileTab::IndexNotFound, false );
+ pTC->WriteSrc( foutput, RscFileTab::IndexNotFound );
break; // ?T 281091MM only one source file
}
}
More information about the Libreoffice-commits
mailing list