summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-10-17 16:02:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-10-18 08:51:07 +0200
commit7477ab139142c55da6a7d4fb10903dcb464ee97b (patch)
tree7761955992cff3a8070c4e2860d9524ea7315c04 /xmloff
parent281fa6ac6a7df48dd65f5019d5a74148a096e253 (diff)
loplugin:inlineablemethods in xmloff
Change-Id: I22202f85c65a862ccdafe1d521e2945e3d99252a
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/xexptran.hxx4
-rw-r--r--xmloff/source/core/DomExport.cxx8
-rw-r--r--xmloff/source/core/xmlexp.cxx7
-rw-r--r--xmloff/source/core/xmlimp.cxx7
-rw-r--r--xmloff/source/draw/animationexport.cxx8
-rw-r--r--xmloff/source/draw/sdxmlimp.cxx2
-rw-r--r--xmloff/source/draw/sdxmlimp_impl.hxx2
-rw-r--r--xmloff/source/draw/shapeexport.cxx2
-rw-r--r--xmloff/source/draw/xexptran.cxx18
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.hxx1
-rw-r--r--xmloff/source/transform/ChartPlotAreaOASISTContext.cxx4
12 files changed, 10 insertions, 55 deletions
diff --git a/xmloff/inc/xexptran.hxx b/xmloff/inc/xexptran.hxx
index 129317e16d37..3242d5211e3f 100644
--- a/xmloff/inc/xexptran.hxx
+++ b/xmloff/inc/xexptran.hxx
@@ -51,8 +51,6 @@ class SdXMLImExTransform2D
std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList;
OUString msString;
- void EmptyList();
-
public:
SdXMLImExTransform2D() {}
@@ -73,8 +71,6 @@ class SdXMLImExTransform3D
std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList;
OUString msString;
- void EmptyList();
-
public:
SdXMLImExTransform3D() {}
SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index f271e3c3bdb3..21dc0391123b 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -125,7 +125,6 @@ class DomExport: public DomVisitor
vector<SvXMLNamespaceMap> maNamespaces;
void pushNamespace();
- void popNamespace();
void addNamespace( const OUString& sPrefix, const OUString& sURI );
OUString qualifiedName( const OUString& sPrefix, const OUString& sURI,
const OUString& sLocalName );
@@ -161,11 +160,6 @@ void DomExport::pushNamespace()
maNamespaces.push_back(aMap);
}
-void DomExport::popNamespace()
-{
- maNamespaces.pop_back();
-}
-
void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI )
{
SvXMLNamespaceMap& rMap = maNamespaces.back();
@@ -234,7 +228,7 @@ void DomExport::element( const Reference<XElement>& xElement )
void DomExport::endElement( const Reference<XElement>& xElement )
{
mrExport.EndElement( qualifiedName( xElement ), false );
- popNamespace();
+ maNamespaces.pop_back();
}
void DomExport::character( const Reference<XCharacterData>& xChars )
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 42be779677cc..3bcbd912e0f1 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2365,11 +2365,6 @@ SvtSaveOptions::ODFSaneDefaultVersion SvXMLExport::getSaneDefaultVersion() const
return SvtSaveOptions::ODFSVER_LATEST;
}
-OUString SvXMLExport::GetStreamName() const
-{
- return mpImpl->mStreamName;
-}
-
void
SvXMLExport::AddAttributeIdLegacy(
sal_uInt16 const nLegacyPrefix, OUString const& rValue)
@@ -2403,7 +2398,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
const beans::StringPair mdref( xMeta->getMetadataReference() );
if ( !mdref.Second.isEmpty() )
{
- const OUString streamName( GetStreamName() );
+ const OUString streamName = mpImpl->mStreamName;
if ( !streamName.isEmpty() )
{
if ( streamName.equals(mdref.First) )
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index a8ebb9524a7e..638b5191c289 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1929,11 +1929,6 @@ OUString SvXMLImport::GetDocumentBase() const
return mpImpl->aDocBase.GetMainURL( INetURLObject::NO_DECODE );
}
-OUString SvXMLImport::GetStreamName() const
-{
- return mpImpl->mStreamName;
-}
-
// Convert drawing object positions from OOo file format to OASIS (#i28749#)
bool SvXMLImport::IsShapePositionInHoriL2R() const
{
@@ -2009,7 +2004,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
uno::UNO_QUERY);
//FIXME: not yet
if (xMeta.is()) {
- const beans::StringPair mdref( GetStreamName(), i_rXmlId );
+ const beans::StringPair mdref( mpImpl->mStreamName, i_rXmlId );
try {
xMeta->setMetadataReference(mdref);
} catch (lang::IllegalArgumentException &) {
diff --git a/xmloff/source/draw/animationexport.cxx b/xmloff/source/draw/animationexport.cxx
index 9dcfa584d7f2..88ba4da34785 100644
--- a/xmloff/source/draw/animationexport.cxx
+++ b/xmloff/source/draw/animationexport.cxx
@@ -518,7 +518,6 @@ public:
static void convertPath( OUStringBuffer& sTmp, const Any& rPath );
void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const;
void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ) const;
- void convertSource( OUStringBuffer& sTmp, const Any& rSource ) const;
void convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const;
void prepareValue( const Any& rValue );
@@ -1564,7 +1563,7 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
{
if( pEvent->Source.hasValue() )
{
- convertSource( sTmp, pEvent->Source );
+ convertTarget( sTmp, pEvent->Source );
sTmp.append( '.' );
}
@@ -1589,11 +1588,6 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
}
}
-void AnimationsExporterImpl::convertSource( OUStringBuffer& sTmp, const Any& rSource ) const
-{
- convertTarget( sTmp, rSource );
-}
-
void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const
{
if( !rTarget.hasValue() )
diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx
index fa523c29b1cd..92d40d4643e9 100644
--- a/xmloff/source/draw/sdxmlimp.cxx
+++ b/xmloff/source/draw/sdxmlimp.cxx
@@ -641,7 +641,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> const xDocProps(
- (IsStylesOnlyMode()) ? nullptr : xDPS->getDocumentProperties());
+ !mbLoadDoc ? nullptr : xDPS->getDocumentProperties());
pContext = new SvXMLMetaDocumentContext(*this,
XML_NAMESPACE_OFFICE, rLocalName,
xDocProps);
diff --git a/xmloff/source/draw/sdxmlimp_impl.hxx b/xmloff/source/draw/sdxmlimp_impl.hxx
index 1fc6e3efec80..06fe67013a75 100644
--- a/xmloff/source/draw/sdxmlimp_impl.hxx
+++ b/xmloff/source/draw/sdxmlimp_impl.hxx
@@ -218,8 +218,6 @@ public:
// Styles and AutoStyles contexts
- bool IsStylesOnlyMode() const { return !mbLoadDoc; }
-
const SvXMLTokenMap& GetDocElemTokenMap();
const SvXMLTokenMap& GetBodyElemTokenMap();
const SvXMLTokenMap& GetStylesElemTokenMap();
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 504c4b90f03d..0fd26d7927ef 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -704,7 +704,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
}
// export layer information
- if( IsLayerExportEnabled() )
+ if( mbExportLayer )
{
// check for group or scene shape and not export layer if this is one
uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY );
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index f87f33d54714..925d7966958d 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -224,13 +224,6 @@ struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {}
};
-// delete all entries in list
-
-void SdXMLImExTransform2D::EmptyList()
-{
- maList.clear();
-}
-
// add members
void SdXMLImExTransform2D::AddRotate(double fNew)
@@ -357,7 +350,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter&
void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv)
{
msString = rNew;
- EmptyList();
+ maList.clear();
if(!msString.isEmpty())
{
@@ -602,13 +595,6 @@ struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {}
};
-// delete all entries in list
-
-void SdXMLImExTransform3D::EmptyList()
-{
- maList.clear();
-}
-
// add members
void SdXMLImExTransform3D::AddMatrix(const ::basegfx::B3DHomMatrix& rNew)
@@ -777,7 +763,7 @@ SdXMLImExTransform3D::SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnit
void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv)
{
msString = rNew;
- EmptyList();
+ maList.clear();
if(!msString.isEmpty())
{
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 1637cf39bab4..968b1f5fe7a0 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -75,7 +75,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
{
XMLTextListBlockContext *pParent =
static_cast<XMLTextListBlockContext *>(mxParentListBlock.get());
- msListStyleName = pParent->GetListStyleName();
+ msListStyleName = pParent->msListStyleName;
sParentListStyleName = msListStyleName;
mxNumRules = pParent->GetNumRules();
mnLevel = pParent->GetLevel() + 1;
diff --git a/xmloff/source/text/XMLTextListBlockContext.hxx b/xmloff/source/text/XMLTextListBlockContext.hxx
index cd2fc698aaa1..eb4655489f49 100644
--- a/xmloff/source/text/XMLTextListBlockContext.hxx
+++ b/xmloff/source/text/XMLTextListBlockContext.hxx
@@ -65,7 +65,6 @@ public:
const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
- const OUString& GetListStyleName() const { return msListStyleName; }
sal_Int16 GetLevel() const { return mnLevel; }
bool IsRestartNumbering() const { return mbRestartNumbering; }
void ResetRestartNumbering() { mbRestartNumbering = false; }
diff --git a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
index e1eeb3b4f0b6..8440b20cce4b 100644
--- a/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
+++ b/xmloff/source/transform/ChartPlotAreaOASISTContext.cxx
@@ -49,8 +49,6 @@ public:
virtual void StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) override;
virtual void EndElement() override;
- bool IsCategoryAxis() const { return m_bHasCategories;}
-
private:
::rtl::Reference< XMLPersAttrListTContext > & m_rCategoriesContext;
bool m_bHasCategories;
@@ -155,7 +153,7 @@ void XMLAxisOASISContext::StartElement(
void XMLAxisOASISContext::EndElement()
{
// if we have categories, change the "class" attribute
- if( IsCategoryAxis() &&
+ if( m_bHasCategories &&
m_rCategoriesContext.is() )
{
OSL_ENSURE( GetAttrList().is(), "Invalid attribute list" );