summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 08:58:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-08 10:03:48 +0000
commit4948daa16d98394e19d0f09ed46586599b2be140 (patch)
tree7a59c43b198374eee563e81a05513e9fcfc2c34c /reportdesign
parentc1eebcdac9f2b289fd363399130c485ca5ff444c (diff)
loplugin:expandablemethods in reportdesign
which led to discovering some unused parameters Change-Id: Ie8f67a47aa9ec409637da32ef9bc457952397772 Reviewed-on: https://gerrit.libreoffice.org/30681 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx4
-rw-r--r--reportdesign/source/core/api/FixedText.cxx4
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx4
-rw-r--r--reportdesign/source/core/api/Functions.cxx4
-rw-r--r--reportdesign/source/core/api/Group.cxx10
-rw-r--r--reportdesign/source/core/api/Groups.cxx4
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx4
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx35
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx2
-rw-r--r--reportdesign/source/core/api/Section.cxx6
-rw-r--r--reportdesign/source/core/api/Shape.cxx4
-rw-r--r--reportdesign/source/core/api/Tools.cxx3
-rw-r--r--reportdesign/source/core/inc/Tools.hxx4
-rw-r--r--reportdesign/source/core/inc/core_resource.hxx7
-rw-r--r--reportdesign/source/core/resource/core_resource.cxx16
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx8
-rw-r--r--reportdesign/source/ui/inc/CondFormat.hxx3
-rw-r--r--reportdesign/source/ui/inc/GroupsSorting.hxx4
-rw-r--r--reportdesign/source/ui/inc/ReportController.hxx7
-rw-r--r--reportdesign/source/ui/inc/ViewsWindow.hxx1
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx18
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx8
23 files changed, 50 insertions, 112 deletions
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index a8102db79718..2824b489326e 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -137,7 +137,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
,m_LineTransparence(0)
,m_LineWidth(0)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE);
m_aProps.aComponent.m_nWidth = MIN_WIDTH;
}
@@ -154,7 +154,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
,m_LineTransparence(0)
,m_LineWidth(0)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDLINE);
m_aProps.aComponent.m_xFactory = _xFactory;
osl_atomic_increment( &m_refCount );
try
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 0a11eaed06c6..c0fbb05383b2 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -48,7 +48,7 @@ OFixedText::OFixedText(uno::Reference< uno::XComponentContext > const & _xContex
,FixedTextPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFixedTextOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDTEXT,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDTEXT);
m_aProps.aComponent.m_nBorder = 0; // no border
}
@@ -59,7 +59,7 @@ OFixedText::OFixedText(uno::Reference< uno::XComponentContext > const & _xContex
,FixedTextPropertySet(_xContext,static_cast< Implements >(IMPLEMENTS_PROPERTY_SET),lcl_getFixedTextOptionals())
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDTEXT,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FIXEDTEXT);
m_aProps.aComponent.m_nBorder = 0; // no border
m_aProps.aComponent.m_xFactory = _xFactory;
osl_atomic_increment( &m_refCount );
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 61905623ed5c..4f4056aaebfb 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -55,7 +55,7 @@ OFormattedField::OFormattedField(uno::Reference< uno::XComponentContext > const
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
,m_nFormatKey(0)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FORMATTEDFIELD,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FORMATTEDFIELD);
}
OFormattedField::OFormattedField(uno::Reference< uno::XComponentContext > const & _xContext
@@ -66,7 +66,7 @@ OFormattedField::OFormattedField(uno::Reference< uno::XComponentContext > const
,m_aProps(m_aMutex,static_cast< container::XContainer*>( this ),_xContext)
,m_nFormatKey(0)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FORMATTEDFIELD,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_FORMATTEDFIELD);
m_aProps.aComponent.m_xFactory = _xFactory;
osl_atomic_increment( &m_refCount );
{
diff --git a/reportdesign/source/core/api/Functions.cxx b/reportdesign/source/core/api/Functions.cxx
index e46f5b5aa61d..50f041f10998 100644
--- a/reportdesign/source/core/api/Functions.cxx
+++ b/reportdesign/source/core/api/Functions.cxx
@@ -77,7 +77,7 @@ void SAL_CALL OFunctions::insertByIndex( ::sal_Int32 Index, const uno::Any& aEle
checkIndex(Index);
uno::Reference< report::XFunction > xFunction(aElement,uno::UNO_QUERY);
if ( !xFunction.is() )
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_xContext->getServiceManager()),*this,2);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,2);
if ( bAdd )
m_aFunctions.push_back(xFunction);
@@ -120,7 +120,7 @@ void SAL_CALL OFunctions::replaceByIndex( ::sal_Int32 Index, const uno::Any& Ele
checkIndex(Index);
uno::Reference< report::XFunction > xFunction(Element,uno::UNO_QUERY);
if ( !xFunction.is() )
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_xContext->getServiceManager()),*this,2);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,2);
TFunctions::iterator aPos = m_aFunctions.begin();
::std::advance(aPos,Index);
aOldElement <<= *aPos;
diff --git a/reportdesign/source/core/api/Group.cxx b/reportdesign/source/core/api/Group.cxx
index 7f75c28dc901..c25a8dc39be7 100644
--- a/reportdesign/source/core/api/Group.cxx
+++ b/reportdesign/source/core/api/Group.cxx
@@ -118,7 +118,7 @@ void SAL_CALL OGroup::setHeaderOn( sal_Bool _headeron ) throw (uno::RuntimeExcep
{
if ( bool(_headeron) != m_xHeader.is() )
{
- OUString sName(RPT_RESSTRING(RID_STR_GROUP_HEADER,m_xContext->getServiceManager()));
+ OUString sName(RPT_RESSTRING(RID_STR_GROUP_HEADER));
setSection(PROPERTY_HEADERON,_headeron,sName,m_xHeader);
}
}
@@ -133,7 +133,7 @@ void SAL_CALL OGroup::setFooterOn( sal_Bool _footeron ) throw (uno::RuntimeExcep
{
if ( bool(_footeron) != m_xFooter.is() )
{
- OUString sName(RPT_RESSTRING(RID_STR_GROUP_FOOTER,m_xContext->getServiceManager()));
+ OUString sName(RPT_RESSTRING(RID_STR_GROUP_FOOTER));
setSection(PROPERTY_FOOTERON,_footeron,sName,m_xFooter);
}
}
@@ -175,8 +175,7 @@ void SAL_CALL OGroup::setGroupOn( ::sal_Int16 _groupon ) throw (lang::IllegalArg
if ( _groupon < report::GroupOn::DEFAULT || _groupon > report::GroupOn::INTERVAL )
throwIllegallArgumentException("css::report::GroupOn"
,*this
- ,1
- ,m_xContext);
+ ,1);
set(PROPERTY_GROUPON,_groupon,m_aProps.m_nGroupOn);
}
@@ -202,8 +201,7 @@ void SAL_CALL OGroup::setKeepTogether( ::sal_Int16 _keeptogether ) throw (lang::
if ( _keeptogether < report::KeepTogether::NO || _keeptogether > report::KeepTogether::WITH_FIRST_DETAIL )
throwIllegallArgumentException("css::report::KeepTogether"
,*this
- ,1
- ,m_xContext);
+ ,1);
set(PROPERTY_KEEPTOGETHER,_keeptogether,m_aProps.m_nKeepTogether);
}
diff --git a/reportdesign/source/core/api/Groups.cxx b/reportdesign/source/core/api/Groups.cxx
index 8cc220d32c30..e8e5c3dbc5f4 100644
--- a/reportdesign/source/core/api/Groups.cxx
+++ b/reportdesign/source/core/api/Groups.cxx
@@ -80,7 +80,7 @@ void SAL_CALL OGroups::insertByIndex( ::sal_Int32 Index, const uno::Any& aElemen
checkIndex(Index);
uno::Reference< report::XGroup > xGroup(aElement,uno::UNO_QUERY);
if ( !xGroup.is() )
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_xContext->getServiceManager()),*this,2);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,2);
if ( bAdd )
m_aGroups.push_back(xGroup);
@@ -121,7 +121,7 @@ void SAL_CALL OGroups::replaceByIndex( ::sal_Int32 Index, const uno::Any& Elemen
checkIndex(Index);
uno::Reference< report::XGroup > xGroup(Element,uno::UNO_QUERY);
if ( !xGroup.is() )
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_xContext->getServiceManager()),*this,2);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,2);
TGroups::iterator aPos = m_aGroups.begin();
::std::advance(aPos,Index);
aOldElement <<= *aPos;
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index ad9645733ce9..e020fad66980 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -120,7 +120,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x
,m_nScaleMode(awt::ImageScaleMode::NONE)
,m_bPreserveIRI(true)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL);
}
OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _xContext
@@ -132,7 +132,7 @@ OImageControl::OImageControl(uno::Reference< uno::XComponentContext > const & _x
,m_nScaleMode(awt::ImageScaleMode::NONE)
,m_bPreserveIRI(true)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_IMAGECONTROL);
m_aProps.aComponent.m_xFactory = _xFactory;
osl_atomic_increment( &m_refCount );
{
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 3e5fc118b3b7..cf7a0228d2c3 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -543,13 +543,13 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
,m_aProps(new OReportComponentProperties(_xContext))
,m_pImpl(new OReportDefinitionImpl(m_aMutex))
{
- m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT,m_aProps->m_xContext->getServiceManager());
+ m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT);
osl_atomic_increment(&m_refCount);
{
init();
m_pImpl->m_xGroups = new OGroups(this,m_aProps->m_xContext);
m_pImpl->m_xDetail = OSection::createOSection(this,m_aProps->m_xContext);
- m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL,m_aProps->m_xContext->getServiceManager()));
+ m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL));
}
osl_atomic_decrement( &m_refCount );
}
@@ -562,7 +562,7 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
,m_aProps(new OReportComponentProperties(_xContext))
,m_pImpl(new OReportDefinitionImpl(m_aMutex))
{
- m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT,m_aProps->m_xContext->getServiceManager());
+ m_aProps->m_sName = RPT_RESSTRING(RID_STR_REPORT);
m_aProps->m_xFactory = _xFactory;
osl_atomic_increment(&m_refCount);
{
@@ -570,7 +570,7 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
init();
m_pImpl->m_xGroups = new OGroups(this,m_aProps->m_xContext);
m_pImpl->m_xDetail = OSection::createOSection(this,m_aProps->m_xContext);
- m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL,m_aProps->m_xContext->getServiceManager()));
+ m_pImpl->m_xDetail->setName(RPT_RESSTRING(RID_STR_DETAIL));
}
osl_atomic_decrement( &m_refCount );
}
@@ -769,8 +769,7 @@ void SAL_CALL OReportDefinition::setGroupKeepTogether( ::sal_Int16 _groupkeeptog
if ( _groupkeeptogether < report::GroupKeepTogether::PER_PAGE || _groupkeeptogether > report::GroupKeepTogether::PER_COLUMN )
throwIllegallArgumentException("css::report::GroupKeepTogether"
,*this
- ,1
- ,m_aProps->m_xContext);
+ ,1);
set(PROPERTY_GROUPKEEPTOGETHER,_groupkeeptogether,m_pImpl->m_nGroupKeepTogether);
}
@@ -785,8 +784,7 @@ void SAL_CALL OReportDefinition::setPageHeaderOption( ::sal_Int16 _pageheaderopt
if ( _pageheaderoption < report::ReportPrintOption::ALL_PAGES || _pageheaderoption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER )
throwIllegallArgumentException("css::report::ReportPrintOption"
,*this
- ,1
- ,m_aProps->m_xContext);
+ ,1);
set(PROPERTY_PAGEHEADEROPTION,_pageheaderoption,m_pImpl->m_nPageHeaderOption);
}
@@ -801,8 +799,7 @@ void SAL_CALL OReportDefinition::setPageFooterOption( ::sal_Int16 _pagefooteropt
if ( _pagefooteroption < report::ReportPrintOption::ALL_PAGES || _pagefooteroption > report::ReportPrintOption::NOT_WITH_REPORT_HEADER_FOOTER )
throwIllegallArgumentException("css::report::ReportPrintOption"
,*this
- ,1
- ,m_aProps->m_xContext);
+ ,1);
set(PROPERTY_PAGEFOOTEROPTION,_pagefooteroption,m_pImpl->m_nPageFooterOption);
}
@@ -828,8 +825,7 @@ void SAL_CALL OReportDefinition::setCommandType( ::sal_Int32 _commandtype ) thro
if ( _commandtype < sdb::CommandType::TABLE || _commandtype > sdb::CommandType::COMMAND )
throwIllegallArgumentException("css::sdb::CommandType"
,*this
- ,1
- ,m_aProps->m_xContext);
+ ,1);
set(PROPERTY_COMMANDTYPE,_commandtype,m_pImpl->m_nCommandType);
}
@@ -865,7 +861,7 @@ void SAL_CALL OReportDefinition::setReportHeaderOn( sal_Bool _reportheaderon ) t
{
if ( bool(_reportheaderon) != m_pImpl->m_xReportHeader.is() )
{
- setSection(PROPERTY_REPORTHEADERON,_reportheaderon,RPT_RESSTRING(RID_STR_REPORT_HEADER,m_aProps->m_xContext->getServiceManager()),m_pImpl->m_xReportHeader);
+ setSection(PROPERTY_REPORTHEADERON,_reportheaderon,RPT_RESSTRING(RID_STR_REPORT_HEADER),m_pImpl->m_xReportHeader);
}
}
@@ -879,7 +875,7 @@ void SAL_CALL OReportDefinition::setReportFooterOn( sal_Bool _reportfooteron ) t
{
if ( bool(_reportfooteron) != m_pImpl->m_xReportFooter.is() )
{
- setSection(PROPERTY_REPORTFOOTERON,_reportfooteron,RPT_RESSTRING(RID_STR_REPORT_FOOTER,m_aProps->m_xContext->getServiceManager()),m_pImpl->m_xReportFooter);
+ setSection(PROPERTY_REPORTFOOTERON,_reportfooteron,RPT_RESSTRING(RID_STR_REPORT_FOOTER),m_pImpl->m_xReportFooter);
}
}
@@ -893,7 +889,7 @@ void SAL_CALL OReportDefinition::setPageHeaderOn( sal_Bool _pageheaderon ) throw
{
if ( bool(_pageheaderon) != m_pImpl->m_xPageHeader.is() )
{
- setSection(PROPERTY_PAGEHEADERON,_pageheaderon,RPT_RESSTRING(RID_STR_PAGE_HEADER,m_aProps->m_xContext->getServiceManager()),m_pImpl->m_xPageHeader);
+ setSection(PROPERTY_PAGEHEADERON,_pageheaderon,RPT_RESSTRING(RID_STR_PAGE_HEADER),m_pImpl->m_xPageHeader);
}
}
@@ -907,7 +903,7 @@ void SAL_CALL OReportDefinition::setPageFooterOn( sal_Bool _pagefooteron ) throw
{
if ( bool(_pagefooteron) != m_pImpl->m_xPageFooter.is() )
{
- setSection(PROPERTY_PAGEFOOTERON,_pagefooteron,RPT_RESSTRING(RID_STR_PAGE_FOOTER,m_aProps->m_xContext->getServiceManager()),m_pImpl->m_xPageFooter);
+ setSection(PROPERTY_PAGEFOOTERON,_pagefooteron,RPT_RESSTRING(RID_STR_PAGE_FOOTER),m_pImpl->m_xPageFooter);
}
}
@@ -1286,7 +1282,7 @@ void SAL_CALL OReportDefinition::loadFromStorage( const uno::Reference< embed::X
void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XStorage >& _xStorageToSaveTo, const uno::Sequence< beans::PropertyValue >& _aMediaDescriptor ) throw (lang::IllegalArgumentException, io::IOException, uno::Exception, uno::RuntimeException, std::exception)
{
if ( !_xStorageToSaveTo.is() )
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_aProps->m_xContext->getServiceManager()),*this,1);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,1);
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard(m_aMutex);
@@ -1446,7 +1442,7 @@ void SAL_CALL OReportDefinition::switchToStorage(
throw (lang::IllegalArgumentException, io::IOException, uno::Exception, uno::RuntimeException, std::exception)
{
if (!xStorage.is())
- throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL,m_aProps->m_xContext->getServiceManager()),*this,1);
+ throw lang::IllegalArgumentException(RPT_RESSTRING(RID_STR_ARGUMENT_IS_NULL),*this,1);
{
::osl::MutexGuard aGuard(m_aMutex);
::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
@@ -1971,8 +1967,7 @@ void SAL_CALL OReportDefinition::setMimeType( const OUString& _mimetype ) throw
if ( ::std::find(aList.getConstArray(),pEnd,_mimetype) == pEnd )
throwIllegallArgumentException("getAvailableMimeTypes()"
,*this
- ,1
- ,m_aProps->m_xContext);
+ ,1);
set(PROPERTY_MIMETYPE,_mimetype,m_pImpl->m_sMimeType);
}
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 893441c1becd..7db938913c2b 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -196,7 +196,7 @@ OUString OReportEngineJFree::getNewOutputName()
::utl::TempFile aTestFile(sName, false, &sExt);
if ( !aTestFile.IsValid() )
{
- sName = RPT_RESSTRING(RID_STR_REPORT,m_xContext->getServiceManager());
+ sName = RPT_RESSTRING(RID_STR_REPORT);
::utl::TempFile aFile(sName, false, &sExt);
sFileURL = aFile.GetURL();
}
diff --git a/reportdesign/source/core/api/Section.cxx b/reportdesign/source/core/api/Section.cxx
index 1b5199d3009d..a6e228ca05ad 100644
--- a/reportdesign/source/core/api/Section.cxx
+++ b/reportdesign/source/core/api/Section.cxx
@@ -316,8 +316,7 @@ void SAL_CALL OSection::setForceNewPage( ::sal_Int16 _forcenewpage ) throw (lang
if ( _forcenewpage < report::ForceNewPage::NONE || _forcenewpage > report::ForceNewPage::BEFORE_AFTER_SECTION )
throwIllegallArgumentException("css::report::ForceNewPage"
,*this
- ,1
- ,m_xContext);
+ ,1);
checkNotPageHeaderFooter();
set(PROPERTY_FORCENEWPAGE,_forcenewpage,m_nForceNewPage);
}
@@ -334,8 +333,7 @@ void SAL_CALL OSection::setNewRowOrCol( ::sal_Int16 _newroworcol ) throw (lang::
if ( _newroworcol < report::ForceNewPage::NONE || _newroworcol > report::ForceNewPage::BEFORE_AFTER_SECTION )
throwIllegallArgumentException("css::report::ForceNewPage"
,*this
- ,1
- ,m_xContext);
+ ,1);
checkNotPageHeaderFooter();
set(PROPERTY_NEWROWORCOL,_newroworcol,m_nNewRowOrCol);
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 3ee21c955646..bfbe296ae6b0 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -59,7 +59,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext)
,m_nZOrder(0)
,m_bOpaque(false)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE);
}
OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
@@ -73,7 +73,7 @@ OShape::OShape(uno::Reference< uno::XComponentContext > const & _xContext
,m_bOpaque(false)
,m_sServiceName(_sServiceName)
{
- m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE,m_aProps.aComponent.m_xContext->getServiceManager());
+ m_aProps.aComponent.m_sName = RPT_RESSTRING(RID_STR_SHAPE);
m_aProps.aComponent.m_xFactory = _xFactory;
osl_atomic_increment( &m_refCount );
{
diff --git a/reportdesign/source/core/api/Tools.cxx b/reportdesign/source/core/api/Tools.cxx
index 2762e8acb013..44c2b0e5ed76 100644
--- a/reportdesign/source/core/api/Tools.cxx
+++ b/reportdesign/source/core/api/Tools.cxx
@@ -43,10 +43,9 @@ uno::Reference< report::XSection> lcl_getSection(const uno::Reference< uno::XInt
void throwIllegallArgumentException( const OUString& _sTypeName
,const uno::Reference< uno::XInterface >& ExceptionContext_
,sal_Int16 ArgumentPosition_
- ,const css::uno::Reference< css::uno::XComponentContext >& Context_
)
{
- OUString sErrorMessage(RPT_RESSTRING(RID_STR_ERROR_WRONG_ARGUMENT,Context_->getServiceManager()));
+ OUString sErrorMessage(RPT_RESSTRING(RID_STR_ERROR_WRONG_ARGUMENT));
sErrorMessage = sErrorMessage.replaceAt(sErrorMessage.indexOf('#'),2,_sTypeName);
throw lang::IllegalArgumentException(sErrorMessage,ExceptionContext_,ArgumentPosition_);
}
diff --git a/reportdesign/source/core/inc/Tools.hxx b/reportdesign/source/core/inc/Tools.hxx
index 5b8036683fba..98f6185fb460 100644
--- a/reportdesign/source/core/inc/Tools.hxx
+++ b/reportdesign/source/core/inc/Tools.hxx
@@ -55,12 +55,10 @@ namespace reportdesign
* \param _sTypeName The reference where to look for the correct values.
* \param ExceptionContext_ The exception context.
* \param ArgumentPosition_ The argument position.
- * \param Context_ The context to get the factory service.
*/
void throwIllegallArgumentException(const OUString& _sTypeName
,const css::uno::Reference< css::uno::XInterface >& ExceptionContext_
- ,sal_Int16 ArgumentPosition_
- ,const css::uno::Reference< css::uno::XComponentContext >& Context_);
+ ,sal_Int16 ArgumentPosition_);
/** clones the given object
*
diff --git a/reportdesign/source/core/inc/core_resource.hxx b/reportdesign/source/core/inc/core_resource.hxx
index 9285508dd044..797dc6f77de5 100644
--- a/reportdesign/source/core/inc/core_resource.hxx
+++ b/reportdesign/source/core/inc/core_resource.hxx
@@ -28,7 +28,7 @@ class SimpleResMgr;
namespace reportdesign
{
-#define RPT_RESSTRING(id,_rM) ResourceManager::loadString(id,_rM)
+#define RPT_RESSTRING(id) ResourceManager::loadString(id)
//= ResourceManager
@@ -51,13 +51,10 @@ namespace reportdesign
};
friend class EnsureDelete;
- protected:
- static void ensureImplExists(const css::uno::Reference< css::lang::XMultiComponentFactory >& _rM);
-
public:
/** loads the string with the specified resource id from the FormLayer resource file
*/
- static OUString loadString(sal_uInt16 _nResId,const css::uno::Reference< css::lang::XMultiComponentFactory >& _rM);
+ static OUString loadString(sal_uInt16 _nResId);
};
diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx
index 30bba53cfdbf..67813be52298 100644
--- a/reportdesign/source/core/resource/core_resource.cxx
+++ b/reportdesign/source/core/resource/core_resource.cxx
@@ -46,8 +46,7 @@ namespace reportdesign
delete ResourceManager::m_pImpl;
}
-
- void ResourceManager::ensureImplExists(const uno::Reference< lang::XMultiComponentFactory >& /* _rM */)
+ OUString ResourceManager::loadString(sal_uInt16 _nResId)
{
if (!m_pImpl)
{
@@ -56,18 +55,7 @@ namespace reportdesign
m_pImpl = SimpleResMgr::Create("rpt", Application::GetSettings().GetUILanguageTag());
}
- }
-
-
- OUString ResourceManager::loadString(sal_uInt16 _nResId,const uno::Reference< lang::XMultiComponentFactory >& _rM)
- {
- OUString sReturn;
-
- ensureImplExists(_rM);
- if (m_pImpl)
- sReturn = m_pImpl->ReadString(_nResId);
-
- return sReturn;
+ return m_pImpl->ReadString(_nResId);
}
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 837fb73d377a..da28331e5ab0 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -336,7 +336,7 @@ namespace rptui
impl_layoutConditions();
// scrollbar visibility
- if ( !impl_needScrollBar() )
+ if ( m_aConditions.size() <= MAX_CONDITIONS )
// normalize the position, so it can, in all situations, be used as top index
m_pCondScroll->SetThumbPos( 0 );
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index d757587b18d4..859a9f58d71d 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -1107,7 +1107,8 @@ IMPL_LINK(OGroupsSortingDialog, OnControlFocusGot, Control&, rControl, void )
NumericField* pNumericField = dynamic_cast< NumericField* >( &rControl );
if ( pNumericField )
pNumericField->SaveValue();
- showHelpText(static_cast<sal_uInt16>(i+STR_RPT_HELP_FIELD));
+ //shows the text given by the id in the multiline edit
+ m_pHelpWindow->SetText(OUString(ModuleRes(static_cast<sal_uInt16>(i+STR_RPT_HELP_FIELD))));
break;
}
}
@@ -1197,11 +1198,6 @@ IMPL_LINK( OGroupsSortingDialog, LBChangeHdl, ListBox&, rListBox, void )
}
}
-void OGroupsSortingDialog::showHelpText(sal_uInt16 _nResId)
-{
- m_pHelpWindow->SetText(OUString(ModuleRes(_nResId)));
-}
-
void OGroupsSortingDialog::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw(uno::RuntimeException, std::exception)
{
uno::Reference< report::XGroup > xGroup(_rEvent.Source,uno::UNO_QUERY);
diff --git a/reportdesign/source/ui/inc/CondFormat.hxx b/reportdesign/source/ui/inc/CondFormat.hxx
index d1002dd26b69..9f1daeacc9f2 100644
--- a/reportdesign/source/ui/inc/CondFormat.hxx
+++ b/reportdesign/source/ui/inc/CondFormat.hxx
@@ -155,9 +155,6 @@ namespace rptui
/// updates the scrollbar range. (does not update the scrollbar visibility)
void impl_updateScrollBarRange();
- /// determines whether we need a scrollbar for the conditions
- bool impl_needScrollBar() const { return m_aConditions.size() > MAX_CONDITIONS; }
-
/// scrolls the condition with the given index to the top position
void impl_scrollTo( size_t _nTopCondIndex );
diff --git a/reportdesign/source/ui/inc/GroupsSorting.hxx b/reportdesign/source/ui/inc/GroupsSorting.hxx
index 2da386938a4c..0ba13dedb592 100644
--- a/reportdesign/source/ui/inc/GroupsSorting.hxx
+++ b/reportdesign/source/ui/inc/GroupsSorting.hxx
@@ -117,10 +117,6 @@ private:
*/
sal_Int32 getColumnDataType(const OUString& _sColumnName);
- /** shows the text given by the id in the multiline edit
- @param _nResId the string id
- */
- void showHelpText(sal_uInt16 _nResId);
/** display the group props
@param _xGroup the group to display
*/
diff --git a/reportdesign/source/ui/inc/ReportController.hxx b/reportdesign/source/ui/inc/ReportController.hxx
index c14cb0256995..4ee9b4aac3a5 100644
--- a/reportdesign/source/ui/inc/ReportController.hxx
+++ b/reportdesign/source/ui/inc/ReportController.hxx
@@ -206,9 +206,6 @@ namespace rptui
void executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun);
void alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection = false);
- // open the help agent of report designer at start time
- void doOpenHelpAgent();
-
css::uno::Reference< css::frame::XFrame > getXFrame();
/** shrink a section
@@ -226,10 +223,6 @@ namespace rptui
*/
void insertGraphic();
- /** resets the floater
- */
- void updateFloater();
-
/** creates a new function in the given value context
*
* \param _aValue contains a XNameContainer
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 81baa8897acc..1951426d967b 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -245,7 +245,6 @@ namespace rptui
void EndDragObj_removeInvisibleObjects();
Point m_aDragDelta;
::std::vector<SdrObject*> m_aBegDragTempList;
- bool isObjectInMyTempList(SdrObject *);
public:
void BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionView* _pSection);
void EndDragObj(bool _bDragIntoNewSection,const OSectionView* _pSection,const Point& _aPnt);
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 43a316c7fdbf..7605e292373f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -1017,7 +1017,8 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
SfxUndoManager& rUndoManager( getUndoManager() );
(rUndoManager.*doXDo)();
InvalidateAll();
- updateFloater();
+ if ( m_pGroupsFloater && m_pGroupsFloater->IsVisible() )
+ m_pGroupsFloater->UpdateData();
}
break;
case SID_CUT:
@@ -1725,11 +1726,6 @@ void OReportController::impl_initialize( )
}
}
-IMPL_LINK_NOARG( OReportController, OnOpenHelpAgent, void*, void )
-{
- doOpenHelpAgent();
-}
-
IMPL_LINK( OReportController, OnCreateHdl, OAddFieldWindow& ,_rAddFieldDlg, void)
{
WaitObject aObj( getDesignView() );
@@ -1742,8 +1738,9 @@ IMPL_LINK( OReportController, OnCreateHdl, OAddFieldWindow& ,_rAddFieldDlg, void
}
-void OReportController::doOpenHelpAgent()
+IMPL_LINK_NOARG( OReportController, OnOpenHelpAgent, void*, void )
{
+ // open the help agent of report designer at start time
if (getFrame().is())
{
OUString suURL("vnd.sun.star.help://shared/text/shared/explorer/database/rep_main.xhp?UseDB=no&DbPAR=swriter");
@@ -2837,13 +2834,6 @@ void SAL_CALL OReportController::restoreViewData(const uno::Any& i_data) throw(
}
}
-void OReportController::updateFloater()
-{
- if ( m_pGroupsFloater && m_pGroupsFloater->IsVisible() )
- m_pGroupsFloater->UpdateData();
-}
-
-
Reference<XFrame> OReportController::getXFrame()
{
if ( !m_xFrameLoader.is() )
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 6e2be36bc776..56a78933805e 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1038,12 +1038,6 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const Rectangle& _
}
}
-bool OViewsWindow::isObjectInMyTempList(SdrObject *_pObj)
-{
- return ::std::find(m_aBegDragTempList.begin(),m_aBegDragTempList.end(),_pObj) != m_aBegDragTempList.end();
-}
-
-
void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionView* _pSection)
{
SAL_INFO(
@@ -1091,7 +1085,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi
{
const SdrMark* pM = rView.GetSdrMarkByIndex(i);
SdrObject* pObj = pM->GetMarkedSdrObj();
- if (!isObjectInMyTempList(pObj))
+ if (::std::find(m_aBegDragTempList.begin(),m_aBegDragTempList.end(),pObj) == m_aBegDragTempList.end())
{
Rectangle aRect( pObj->GetCurrentBoundRect() );
aRect.Move(0, aNewObjPos.Y());