summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-24 13:35:09 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-24 13:35:36 +0200
commita41ecf922771904cdebf17b29066389441716b2c (patch)
treee1579addc718e30db872f3dcc030861031393f7e /xmloff
parent258d039798b9ca4cc95a14d62e30bb725ad2c8ec (diff)
loplugin:expandablemethods in xmloff
Change-Id: I995a4167ac4df5ca35d963dcf68ae802a997e1e1
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx11
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.hxx3
-rw-r--r--xmloff/source/core/xmlimp.cxx11
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx12
-rw-r--r--xmloff/source/draw/sdxmlexp_impl.hxx2
-rw-r--r--xmloff/source/style/xmlnumfe.cxx13
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.cxx2
-rw-r--r--xmloff/source/text/XMLTextNumRuleInfo.hxx5
-rw-r--r--xmloff/source/text/txtparae.cxx4
-rw-r--r--xmloff/source/transform/MutableAttrList.cxx10
-rw-r--r--xmloff/source/transform/MutableAttrList.hxx2
-rw-r--r--xmloff/source/transform/OOo2Oasis.cxx9
-rw-r--r--xmloff/source/transform/OOo2Oasis.hxx2
-rw-r--r--xmloff/source/transform/Oasis2OOo.cxx9
-rw-r--r--xmloff/source/transform/Oasis2OOo.hxx2
15 files changed, 21 insertions, 76 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index fe33c1bc4ef9..48a5a9a9f05f 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -666,18 +666,11 @@ SchXMLPositionAttributesHelper::~SchXMLPositionAttributesHelper()
{
}
-bool SchXMLPositionAttributesHelper::hasSize() const
-{
- return m_bHasSizeWidth && m_bHasSizeHeight;
-}
-bool SchXMLPositionAttributesHelper::hasPosition() const
-{
- return m_bHasPositionX && m_bHasPositionY;
-}
bool SchXMLPositionAttributesHelper::hasPosSize() const
{
- return hasPosition() && hasSize();
+ return (m_bHasPositionX && m_bHasPositionY) && (m_bHasSizeWidth && m_bHasSizeHeight);
}
+
bool SchXMLPositionAttributesHelper::isAutomatic() const
{
return m_bAutoSize || m_bAutoPosition;
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
index 17e1a6467cbb..612bdbb26363 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx
@@ -65,9 +65,6 @@ public:
css::awt::Rectangle getRectangle() const { return css::awt::Rectangle( m_aPosition.X, m_aPosition.Y, m_aSize.Width, m_aSize.Height );}
private:
- bool hasSize() const;
- bool hasPosition() const;
-
SvXMLImport& m_rImport;
css::awt::Point m_aPosition;
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 638b5191c289..efce026bdefe 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -456,18 +456,13 @@ namespace
class theSvXMLImportUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theSvXMLImportUnoTunnelId> {};
}
-// XUnoTunnel & co
-const uno::Sequence< sal_Int8 > & SvXMLImport::getUnoTunnelId() throw()
-{
- return theSvXMLImportUnoTunnelId::get().getSeq();
-}
-
// XUnoTunnel
sal_Int64 SAL_CALL SvXMLImport::getSomething( const uno::Sequence< sal_Int8 >& rId )
throw( uno::RuntimeException, std::exception )
{
- if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
+ if( rId.getLength() == 16 &&
+ 0 == memcmp( theSvXMLImportUnoTunnelId::get().getSeq().getConstArray(),
+ rId.getConstArray(), 16 ) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 1a1726b0601d..c884c84eaf62 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1704,14 +1704,6 @@ void SdXMLExport::ImpWritePresentationStyles()
}
}
-void SdXMLExport::SetProgress(sal_Int32 nProg)
-{
- // set progress view
- if(GetStatusIndicator().is())
- GetStatusIndicator()->setValue(nProg);
-}
-
-
void SdXMLExport::ExportMeta_()
{
uno::Sequence<beans::NamedValue> stats { { "ObjectCount", uno::makeAny(mnObjectCount) } };
@@ -1745,7 +1737,9 @@ void SdXMLExport::ExportContent_()
{
uno::Reference<drawing::XDrawPage> xDrawPage( mxDocDrawPages->getByIndex(nPageInd), uno::UNO_QUERY );
- SetProgress(((nPageInd + 1) * 100) / mnDocDrawPageCount);
+ // set progress view
+ if(GetStatusIndicator().is())
+ GetStatusIndicator()->setValue(((nPageInd + 1) * 100) / mnDocDrawPageCount);
if(xDrawPage.is())
{
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index b4c3ea02c426..6e13b5cc3b0c 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -165,8 +165,6 @@ public:
bool bIsDraw, SvXMLExportFlags nExportFlags );
virtual ~SdXMLExport() override;
- void SetProgress(sal_Int32 nProg);
-
// XExporter
virtual void SAL_CALL setSourceDocument( const css::uno::Reference< css::lang::XComponent >& xDoc ) throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) override;
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 3790e79eaafd..98b5c4690539 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -320,14 +320,6 @@ void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar )
}
}
-void SvXMLNumFmtExport::AddTextualAttr_Impl( bool bText )
-{
- if ( bText ) // non-textual
- {
- rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TEXTUAL, XML_TRUE );
- }
-}
-
void SvXMLNumFmtExport::AddStyleAttr_Impl( bool bLong )
{
if ( bLong ) // short is default
@@ -436,7 +428,10 @@ void SvXMLNumFmtExport::WriteMonthElement_Impl( const OUString& rCalendar, bool
AddCalendarAttr_Impl( rCalendar ); // adds to pAttrList
AddStyleAttr_Impl( bLong ); // adds to pAttrList
- AddTextualAttr_Impl( bText ); // adds to pAttrList
+ if ( bText )
+ {
+ rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TEXTUAL, XML_TRUE );
+ }
SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, XML_MONTH,
true, false );
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index e5503aed756e..3e4836fbc3ad 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -226,7 +226,7 @@ bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) con
}
else
{
- bRet = HasSameNumRules( rCmp );
+ bRet = rCmp.msNumRulesName == msNumRulesName;
}
return bRet;
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.hxx b/xmloff/source/text/XMLTextNumRuleInfo.hxx
index b898bb9f4191..ff5b9074b2b2 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.hxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.hxx
@@ -120,11 +120,6 @@ public:
bool BelongsToSameList( const XMLTextNumRuleInfo& rCmp ) const;
- inline bool HasSameNumRules( const XMLTextNumRuleInfo& rCmp ) const
- {
- return rCmp.msNumRulesName == msNumRulesName;
- }
-
inline bool IsContinueingPreviousSubTree() const
{
return mbContinueingPreviousSubTree;
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 12538b114278..e7e1a118e213 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2925,8 +2925,8 @@ void XMLTextParagraphExport::_exportTextFrame(
SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_DRAW,
XML_TEXT_BOX, true, true );
- // frame bound frames
- exportFramesBoundToFrame( xTxtFrame, bIsProgress );
+ // frames bound to frame
+ exportFrameFrames( false, bIsProgress, &xTxtFrame );
exportText( xTxt, false, bIsProgress, true );
}
diff --git a/xmloff/source/transform/MutableAttrList.cxx b/xmloff/source/transform/MutableAttrList.cxx
index d6b98295b5b3..a020147ddd05 100644
--- a/xmloff/source/transform/MutableAttrList.cxx
+++ b/xmloff/source/transform/MutableAttrList.cxx
@@ -68,20 +68,14 @@ namespace
class theXMLMutableAttributeListUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theXMLMutableAttributeListUnoTunnelId> {};
}
-// XUnoTunnel & co
-const Sequence< sal_Int8 > & XMLMutableAttributeList::getUnoTunnelId() throw()
-{
- return theXMLMutableAttributeListUnoTunnelId::get().getSeq();
-}
-
// XUnoTunnel
sal_Int64 SAL_CALL XMLMutableAttributeList::getSomething(
const Sequence< sal_Int8 >& rId )
throw( RuntimeException, std::exception )
{
if( rId.getLength() == 16 &&
- 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
+ 0 == memcmp( theXMLMutableAttributeListUnoTunnelId::get().getSeq().getConstArray(),
+ rId.getConstArray(), 16 ) )
{
return sal::static_int_cast<sal_Int64>(reinterpret_cast<sal_uIntPtr>(this));
}
diff --git a/xmloff/source/transform/MutableAttrList.hxx b/xmloff/source/transform/MutableAttrList.hxx
index 93046c437415..f5df31659ab5 100644
--- a/xmloff/source/transform/MutableAttrList.hxx
+++ b/xmloff/source/transform/MutableAttrList.hxx
@@ -46,8 +46,6 @@ public:
bool bClone=false );
virtual ~XMLMutableAttributeList() override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
-
// XUnoTunnel
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) override;
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 3ea21c55fa1d..b8703cde819f 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1973,18 +1973,13 @@ namespace
class theOOo2OasisTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOOo2OasisTransformerUnoTunnelId> {};
}
-const Sequence< sal_Int8 > & OOo2OasisTransformer::getUnoTunnelId() throw()
-{
- return theOOo2OasisTransformerUnoTunnelId::get().getSeq();
-}
-
// XUnoTunnel
sal_Int64 SAL_CALL OOo2OasisTransformer::getSomething( const Sequence< sal_Int8 >& rId )
throw(RuntimeException, std::exception)
{
if( rId.getLength() == 16
- && 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
+ && 0 == memcmp( theOOo2OasisTransformerUnoTunnelId::get().getSeq().getConstArray(),
+ rId.getConstArray(), 16 ) )
{
return reinterpret_cast< sal_Int64 >( this );
}
diff --git a/xmloff/source/transform/OOo2Oasis.hxx b/xmloff/source/transform/OOo2Oasis.hxx
index 1dbd82c40e3d..f355cacbca45 100644
--- a/xmloff/source/transform/OOo2Oasis.hxx
+++ b/xmloff/source/transform/OOo2Oasis.hxx
@@ -51,8 +51,6 @@ public:
const sal_Char *pSubServiceName=nullptr ) throw();
virtual ~OOo2OasisTransformer() throw() override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
-
// XInterface
// (XInterface methods need to be implemented to disambigouate
diff --git a/xmloff/source/transform/Oasis2OOo.cxx b/xmloff/source/transform/Oasis2OOo.cxx
index 87c898df46a1..8e073c81a0e0 100644
--- a/xmloff/source/transform/Oasis2OOo.cxx
+++ b/xmloff/source/transform/Oasis2OOo.cxx
@@ -1954,18 +1954,13 @@ namespace
class theOasis2OOoTransformerUnoTunnelId : public rtl::Static< UnoTunnelIdInit, theOasis2OOoTransformerUnoTunnelId> {};
}
-const Sequence< sal_Int8 > & Oasis2OOoTransformer::getUnoTunnelId() throw()
-{
- return theOasis2OOoTransformerUnoTunnelId::get().getSeq();
-}
-
// XUnoTunnel
sal_Int64 SAL_CALL Oasis2OOoTransformer::getSomething( const Sequence< sal_Int8 >& rId )
throw(RuntimeException, std::exception)
{
if( rId.getLength() == 16
- && 0 == memcmp( getUnoTunnelId().getConstArray(),
- rId.getConstArray(), 16 ) )
+ && 0 == memcmp( theOasis2OOoTransformerUnoTunnelId::get().getSeq().getConstArray(),
+ rId.getConstArray(), 16 ) )
{
return reinterpret_cast< sal_Int64 >( this );
}
diff --git a/xmloff/source/transform/Oasis2OOo.hxx b/xmloff/source/transform/Oasis2OOo.hxx
index 19adc512f265..2dd880200ec3 100644
--- a/xmloff/source/transform/Oasis2OOo.hxx
+++ b/xmloff/source/transform/Oasis2OOo.hxx
@@ -44,8 +44,6 @@ public:
Oasis2OOoTransformer () throw();
virtual ~Oasis2OOoTransformer() throw() override;
- static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId() throw();
-
// XServiceInfo
virtual OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(css::uno::RuntimeException, std::exception) override;