Kaydet (Commit) 7477ab13 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:inlineablemethods in xmloff

Change-Id: I22202f85c65a862ccdafe1d521e2945e3d99252a
üst 281fa6ac
...@@ -297,7 +297,6 @@ public: ...@@ -297,7 +297,6 @@ public:
static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport ); static SvXMLExportPropertyMapper* CreateShapePropMapper( SvXMLExport& rExport );
void enableLayerExport() { mbExportLayer = true; } void enableLayerExport() { mbExportLayer = true; }
bool IsLayerExportEnabled() const { return mbExportLayer; }
/** defines if the export should increment the progress bar or not */ /** defines if the export should increment the progress bar or not */
void enableHandleProgressBar() { mbHandleProgressBar = true; } void enableHandleProgressBar() { mbHandleProgressBar = true; }
......
...@@ -543,9 +543,6 @@ public: ...@@ -543,9 +543,6 @@ public:
/// returns the deterministic version for odf export /// returns the deterministic version for odf export
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const; SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion() const;
/// name of stream in package, e.g., "content.xml"
OUString GetStreamName() const;
// FIXME: this is only for legacy stuff that has not yet been adapted // FIXME: this is only for legacy stuff that has not yet been adapted
// to implement XMetadatable; this can write duplicate IDs! // to implement XMetadatable; this can write duplicate IDs!
/// add xml:id and legacy namespace id /// add xml:id and legacy namespace id
......
...@@ -484,9 +484,6 @@ public: ...@@ -484,9 +484,6 @@ public:
OUString GetBaseURL() const; OUString GetBaseURL() const;
OUString GetDocumentBase() const; OUString GetDocumentBase() const;
/// name of stream in package, e.g., "content.xml"
OUString GetStreamName() const;
/// set the XmlId attribute of given UNO object (for RDF metadata) /// set the XmlId attribute of given UNO object (for RDF metadata)
void SetXmlId(css::uno::Reference< void SetXmlId(css::uno::Reference<
css::uno::XInterface> const & i_xIfc, css::uno::XInterface> const & i_xIfc,
......
...@@ -102,7 +102,7 @@ OString URLParameter::getByName( const char* par ) ...@@ -102,7 +102,7 @@ OString URLParameter::getByName( const char* par )
else if( strcmp( par,"System" ) == 0 ) else if( strcmp( par,"System" ) == 0 )
val = get_system(); val = get_system();
else if( strcmp( par,"HelpPrefix" ) == 0 ) else if( strcmp( par,"HelpPrefix" ) == 0 )
val = get_prefix(); val = m_aPrefix;
return OString( val.getStr(),val.getLength(),RTL_TEXTENCODING_UTF8 ); return OString( val.getStr(),val.getLength(),RTL_TEXTENCODING_UTF8 );
} }
......
...@@ -147,8 +147,6 @@ namespace chelp { ...@@ -147,8 +147,6 @@ namespace chelp {
return m_aModule; return m_aModule;
} }
const OUString& get_prefix() const { return m_aPrefix; }
OUString const & get_language(); OUString const & get_language();
OUString const & get_program(); OUString const & get_program();
......
...@@ -51,8 +51,6 @@ class SdXMLImExTransform2D ...@@ -51,8 +51,6 @@ class SdXMLImExTransform2D
std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList; std::vector< std::shared_ptr< ImpSdXMLExpTransObj2DBase > > maList;
OUString msString; OUString msString;
void EmptyList();
public: public:
SdXMLImExTransform2D() {} SdXMLImExTransform2D() {}
...@@ -73,8 +71,6 @@ class SdXMLImExTransform3D ...@@ -73,8 +71,6 @@ class SdXMLImExTransform3D
std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList; std::vector< std::shared_ptr< ImpSdXMLExpTransObj3DBase > > maList;
OUString msString; OUString msString;
void EmptyList();
public: public:
SdXMLImExTransform3D() {} SdXMLImExTransform3D() {}
SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv); SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnitConverter& rConv);
......
...@@ -125,7 +125,6 @@ class DomExport: public DomVisitor ...@@ -125,7 +125,6 @@ class DomExport: public DomVisitor
vector<SvXMLNamespaceMap> maNamespaces; vector<SvXMLNamespaceMap> maNamespaces;
void pushNamespace(); void pushNamespace();
void popNamespace();
void addNamespace( const OUString& sPrefix, const OUString& sURI ); void addNamespace( const OUString& sPrefix, const OUString& sURI );
OUString qualifiedName( const OUString& sPrefix, const OUString& sURI, OUString qualifiedName( const OUString& sPrefix, const OUString& sURI,
const OUString& sLocalName ); const OUString& sLocalName );
...@@ -161,11 +160,6 @@ void DomExport::pushNamespace() ...@@ -161,11 +160,6 @@ void DomExport::pushNamespace()
maNamespaces.push_back(aMap); maNamespaces.push_back(aMap);
} }
void DomExport::popNamespace()
{
maNamespaces.pop_back();
}
void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI ) void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI )
{ {
SvXMLNamespaceMap& rMap = maNamespaces.back(); SvXMLNamespaceMap& rMap = maNamespaces.back();
...@@ -234,7 +228,7 @@ void DomExport::element( const Reference<XElement>& xElement ) ...@@ -234,7 +228,7 @@ void DomExport::element( const Reference<XElement>& xElement )
void DomExport::endElement( const Reference<XElement>& xElement ) void DomExport::endElement( const Reference<XElement>& xElement )
{ {
mrExport.EndElement( qualifiedName( xElement ), false ); mrExport.EndElement( qualifiedName( xElement ), false );
popNamespace(); maNamespaces.pop_back();
} }
void DomExport::character( const Reference<XCharacterData>& xChars ) void DomExport::character( const Reference<XCharacterData>& xChars )
......
...@@ -2365,11 +2365,6 @@ SvtSaveOptions::ODFSaneDefaultVersion SvXMLExport::getSaneDefaultVersion() const ...@@ -2365,11 +2365,6 @@ SvtSaveOptions::ODFSaneDefaultVersion SvXMLExport::getSaneDefaultVersion() const
return SvtSaveOptions::ODFSVER_LATEST; return SvtSaveOptions::ODFSVER_LATEST;
} }
OUString SvXMLExport::GetStreamName() const
{
return mpImpl->mStreamName;
}
void void
SvXMLExport::AddAttributeIdLegacy( SvXMLExport::AddAttributeIdLegacy(
sal_uInt16 const nLegacyPrefix, OUString const& rValue) sal_uInt16 const nLegacyPrefix, OUString const& rValue)
...@@ -2403,7 +2398,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc) ...@@ -2403,7 +2398,7 @@ SvXMLExport::AddAttributeXmlId(uno::Reference<uno::XInterface> const & i_xIfc)
const beans::StringPair mdref( xMeta->getMetadataReference() ); const beans::StringPair mdref( xMeta->getMetadataReference() );
if ( !mdref.Second.isEmpty() ) if ( !mdref.Second.isEmpty() )
{ {
const OUString streamName( GetStreamName() ); const OUString streamName = mpImpl->mStreamName;
if ( !streamName.isEmpty() ) if ( !streamName.isEmpty() )
{ {
if ( streamName.equals(mdref.First) ) if ( streamName.equals(mdref.First) )
......
...@@ -1929,11 +1929,6 @@ OUString SvXMLImport::GetDocumentBase() const ...@@ -1929,11 +1929,6 @@ OUString SvXMLImport::GetDocumentBase() const
return mpImpl->aDocBase.GetMainURL( INetURLObject::NO_DECODE ); 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#) // Convert drawing object positions from OOo file format to OASIS (#i28749#)
bool SvXMLImport::IsShapePositionInHoriL2R() const bool SvXMLImport::IsShapePositionInHoriL2R() const
{ {
...@@ -2009,7 +2004,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc, ...@@ -2009,7 +2004,7 @@ void SvXMLImport::SetXmlId(uno::Reference<uno::XInterface> const & i_xIfc,
uno::UNO_QUERY); uno::UNO_QUERY);
//FIXME: not yet //FIXME: not yet
if (xMeta.is()) { if (xMeta.is()) {
const beans::StringPair mdref( GetStreamName(), i_rXmlId ); const beans::StringPair mdref( mpImpl->mStreamName, i_rXmlId );
try { try {
xMeta->setMetadataReference(mdref); xMeta->setMetadataReference(mdref);
} catch (lang::IllegalArgumentException &) { } catch (lang::IllegalArgumentException &) {
......
...@@ -518,7 +518,6 @@ public: ...@@ -518,7 +518,6 @@ public:
static void convertPath( OUStringBuffer& sTmp, const Any& rPath ); static void convertPath( OUStringBuffer& sTmp, const Any& rPath );
void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const; void convertValue( XMLTokenEnum eAttributeName, OUStringBuffer& sTmp, const Any& rValue ) const;
void convertTiming( OUStringBuffer& sTmp, const Any& rTiming ) 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 convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const;
void prepareValue( const Any& rValue ); void prepareValue( const Any& rValue );
...@@ -1564,7 +1563,7 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa ...@@ -1564,7 +1563,7 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa
{ {
if( pEvent->Source.hasValue() ) if( pEvent->Source.hasValue() )
{ {
convertSource( sTmp, pEvent->Source ); convertTarget( sTmp, pEvent->Source );
sTmp.append( '.' ); sTmp.append( '.' );
} }
...@@ -1589,11 +1588,6 @@ void AnimationsExporterImpl::convertTiming( OUStringBuffer& sTmp, const Any& rVa ...@@ -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 void AnimationsExporterImpl::convertTarget( OUStringBuffer& sTmp, const Any& rTarget ) const
{ {
if( !rTarget.hasValue() ) if( !rTarget.hasValue() )
......
...@@ -641,7 +641,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName, ...@@ -641,7 +641,7 @@ SvXMLImportContext *SdXMLImport::CreateMetaContext(const OUString& rLocalName,
uno::Reference<document::XDocumentPropertiesSupplier> xDPS( uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
GetModel(), uno::UNO_QUERY_THROW); GetModel(), uno::UNO_QUERY_THROW);
uno::Reference<document::XDocumentProperties> const xDocProps( uno::Reference<document::XDocumentProperties> const xDocProps(
(IsStylesOnlyMode()) ? nullptr : xDPS->getDocumentProperties()); !mbLoadDoc ? nullptr : xDPS->getDocumentProperties());
pContext = new SvXMLMetaDocumentContext(*this, pContext = new SvXMLMetaDocumentContext(*this,
XML_NAMESPACE_OFFICE, rLocalName, XML_NAMESPACE_OFFICE, rLocalName,
xDocProps); xDocProps);
......
...@@ -218,8 +218,6 @@ public: ...@@ -218,8 +218,6 @@ public:
// Styles and AutoStyles contexts // Styles and AutoStyles contexts
bool IsStylesOnlyMode() const { return !mbLoadDoc; }
const SvXMLTokenMap& GetDocElemTokenMap(); const SvXMLTokenMap& GetDocElemTokenMap();
const SvXMLTokenMap& GetBodyElemTokenMap(); const SvXMLTokenMap& GetBodyElemTokenMap();
const SvXMLTokenMap& GetStylesElemTokenMap(); const SvXMLTokenMap& GetStylesElemTokenMap();
......
...@@ -704,7 +704,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape ...@@ -704,7 +704,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
} }
// export layer information // export layer information
if( IsLayerExportEnabled() ) if( mbExportLayer )
{ {
// check for group or scene shape and not export layer if this is one // check for group or scene shape and not export layer if this is one
uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY ); uno::Reference< drawing::XShapes > xShapes( xShape, uno::UNO_QUERY );
......
...@@ -224,13 +224,6 @@ struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase ...@@ -224,13 +224,6 @@ struct ImpSdXMLExpTransObj2DMatrix : public ImpSdXMLExpTransObj2DBase
: ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {} : ImpSdXMLExpTransObj2DBase(IMP_SDXMLEXP_TRANSOBJ2D_MATRIX), maMatrix(rNew) {}
}; };
// delete all entries in list
void SdXMLImExTransform2D::EmptyList()
{
maList.clear();
}
// add members // add members
void SdXMLImExTransform2D::AddRotate(double fNew) void SdXMLImExTransform2D::AddRotate(double fNew)
...@@ -357,7 +350,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& ...@@ -357,7 +350,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter&
void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv) void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv)
{ {
msString = rNew; msString = rNew;
EmptyList(); maList.clear();
if(!msString.isEmpty()) if(!msString.isEmpty())
{ {
...@@ -602,13 +595,6 @@ struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase ...@@ -602,13 +595,6 @@ struct ImpSdXMLExpTransObj3DMatrix : public ImpSdXMLExpTransObj3DBase
: ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {} : ImpSdXMLExpTransObj3DBase(IMP_SDXMLEXP_TRANSOBJ3D_MATRIX), maMatrix(rNew) {}
}; };
// delete all entries in list
void SdXMLImExTransform3D::EmptyList()
{
maList.clear();
}
// add members // add members
void SdXMLImExTransform3D::AddMatrix(const ::basegfx::B3DHomMatrix& rNew) void SdXMLImExTransform3D::AddMatrix(const ::basegfx::B3DHomMatrix& rNew)
...@@ -777,7 +763,7 @@ SdXMLImExTransform3D::SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnit ...@@ -777,7 +763,7 @@ SdXMLImExTransform3D::SdXMLImExTransform3D(const OUString& rNew, const SvXMLUnit
void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv) void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConverter& rConv)
{ {
msString = rNew; msString = rNew;
EmptyList(); maList.clear();
if(!msString.isEmpty()) if(!msString.isEmpty())
{ {
......
...@@ -75,7 +75,7 @@ XMLTextListBlockContext::XMLTextListBlockContext( ...@@ -75,7 +75,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
{ {
XMLTextListBlockContext *pParent = XMLTextListBlockContext *pParent =
static_cast<XMLTextListBlockContext *>(mxParentListBlock.get()); static_cast<XMLTextListBlockContext *>(mxParentListBlock.get());
msListStyleName = pParent->GetListStyleName(); msListStyleName = pParent->msListStyleName;
sParentListStyleName = msListStyleName; sParentListStyleName = msListStyleName;
mxNumRules = pParent->GetNumRules(); mxNumRules = pParent->GetNumRules();
mnLevel = pParent->GetLevel() + 1; mnLevel = pParent->GetLevel() + 1;
......
...@@ -65,7 +65,6 @@ public: ...@@ -65,7 +65,6 @@ public:
const OUString& rLocalName, const OUString& rLocalName,
const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override; const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList ) override;
const OUString& GetListStyleName() const { return msListStyleName; }
sal_Int16 GetLevel() const { return mnLevel; } sal_Int16 GetLevel() const { return mnLevel; }
bool IsRestartNumbering() const { return mbRestartNumbering; } bool IsRestartNumbering() const { return mbRestartNumbering; }
void ResetRestartNumbering() { mbRestartNumbering = false; } void ResetRestartNumbering() { mbRestartNumbering = false; }
......
...@@ -49,8 +49,6 @@ public: ...@@ -49,8 +49,6 @@ public:
virtual void StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) override; virtual void StartElement( const Reference< xml::sax::XAttributeList >& rAttrList ) override;
virtual void EndElement() override; virtual void EndElement() override;
bool IsCategoryAxis() const { return m_bHasCategories;}
private: private:
::rtl::Reference< XMLPersAttrListTContext > & m_rCategoriesContext; ::rtl::Reference< XMLPersAttrListTContext > & m_rCategoriesContext;
bool m_bHasCategories; bool m_bHasCategories;
...@@ -155,7 +153,7 @@ void XMLAxisOASISContext::StartElement( ...@@ -155,7 +153,7 @@ void XMLAxisOASISContext::StartElement(
void XMLAxisOASISContext::EndElement() void XMLAxisOASISContext::EndElement()
{ {
// if we have categories, change the "class" attribute // if we have categories, change the "class" attribute
if( IsCategoryAxis() && if( m_bHasCategories &&
m_rCategoriesContext.is() ) m_rCategoriesContext.is() )
{ {
OSL_ENSURE( GetAttrList().is(), "Invalid attribute list" ); OSL_ENSURE( GetAttrList().is(), "Invalid attribute list" );
......
...@@ -220,10 +220,6 @@ void SecurityEnvironment_NssImpl::addCryptoSlot( PK11SlotInfo* aSlot) throw( Exc ...@@ -220,10 +220,6 @@ void SecurityEnvironment_NssImpl::addCryptoSlot( PK11SlotInfo* aSlot) throw( Exc
m_Slots.push_back(aSlot); m_Slots.push_back(aSlot);
} }
CERTCertDBHandle* SecurityEnvironment_NssImpl::getCertDb() throw( Exception , RuntimeException ) {
return m_pHandler ;
}
//Could we have multiple cert dbs? //Could we have multiple cert dbs?
void SecurityEnvironment_NssImpl::setCertDb( CERTCertDBHandle* aCertDb ) throw( Exception , RuntimeException ) { void SecurityEnvironment_NssImpl::setCertDb( CERTCertDBHandle* aCertDb ) throw( Exception , RuntimeException ) {
m_pHandler = aCertDb ; m_pHandler = aCertDb ;
...@@ -909,7 +905,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Except ...@@ -909,7 +905,7 @@ xmlSecKeysMngrPtr SecurityEnvironment_NssImpl::createKeysManager() throw( Except
SECKEYPrivateKey* priKey = nullptr ; SECKEYPrivateKey* priKey = nullptr ;
xmlSecKeysMngrPtr pKeysMngr = nullptr ; xmlSecKeysMngrPtr pKeysMngr = nullptr ;
handler = this->getCertDb() ; handler = m_pHandler;
/*- /*-
* The following lines is based on the private version of xmlSec-NSS * The following lines is based on the private version of xmlSec-NSS
......
...@@ -105,9 +105,6 @@ private: ...@@ -105,9 +105,6 @@ private:
static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ; static const css::uno::Sequence< sal_Int8 >& getUnoTunnelId() ;
//Native methods
CERTCertDBHandle* getCertDb() throw( css::uno::Exception , css::uno::RuntimeException ) ;
void setCertDb( CERTCertDBHandle* aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ; void setCertDb( CERTCertDBHandle* aCertDb ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
void adoptSymKey( PK11SymKey* aSymKey ) throw( css::uno::Exception , css::uno::RuntimeException ) ; void adoptSymKey( PK11SymKey* aSymKey ) throw( css::uno::Exception , css::uno::RuntimeException ) ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment