[Libreoffice-commits] core.git: l10ntools/inc l10ntools/source xmlhelp/util
Gabor Kelemen
kelemeng at ubuntu.com
Fri Jun 23 19:10:01 UTC 2017
l10ntools/inc/xmlparse.hxx | 4 ----
l10ntools/source/gLexXhp.l | 5 -----
l10ntools/source/helpmerge.cxx | 10 ++--------
l10ntools/source/xmlparse.cxx | 11 +----------
xmlhelp/util/compact.xsl | 2 --
5 files changed, 3 insertions(+), 29 deletions(-)
New commits:
commit c9b9224018c5a6acc9b6790db0f321fb8913f8ff
Author: Gabor Kelemen <kelemeng at ubuntu.com>
Date: Mon Jun 12 22:08:55 2017 +0200
Remove support for the oldref attribute in l10ntools
Now that oldref and l10n attributes were removed from
helpcontent in commit eb9ec1c794a0d3b8522375c7a87ac3ee999c8a66
we can as well drop support of these from l10ntools and xmlhelp
Change-Id: Ib6fe30e93f0d7e976bb675beee9395ab543af99c
Reviewed-on: https://gerrit.libreoffice.org/38715
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/l10ntools/inc/xmlparse.hxx b/l10ntools/inc/xmlparse.hxx
index 22ec04469316..037a3843326a 100644
--- a/l10ntools/inc/xmlparse.hxx
+++ b/l10ntools/inc/xmlparse.hxx
@@ -203,7 +203,6 @@ private:
OString m_sElementName;
std::unique_ptr<XMLAttributeList> m_pAttributes;
OString m_sId;
- OString m_sOldRef;
OString m_sLanguageId;
int m_nPos;
@@ -239,9 +238,6 @@ public:
void SetId ( OString const & sTheId ) { m_sId = sTheId; }
void SetLanguageId ( OString const & sLangId ) { m_sLanguageId = sLangId; }
void SetPos ( int nPos ) { m_nPos = nPos; }
- void SetOldRef ( OString const & sOldRef ) { m_sOldRef = sOldRef; }
-
- const OString& GetOldref() const { return m_sOldRef; }
};
/** Holds character data
diff --git a/l10ntools/source/gLexXhp.l b/l10ntools/source/gLexXhp.l
index b8577a44dfa4..93888471d07f 100644
--- a/l10ntools/source/gLexXhp.l
+++ b/l10ntools/source/gLexXhp.l
@@ -82,11 +82,6 @@ IDENT [\.a-zA-Z0-9_-]+
-"oldref="{SP}\"{SP}{IDENT}{SP}\" {
- LOCptr->setRef(yytext);
-}
-
-
"<title " |
"<bookmark " |
"<paragraph " {
diff --git a/l10ntools/source/helpmerge.cxx b/l10ntools/source/helpmerge.cxx
index f1df5aa7881e..007c3e04441d 100644
--- a/l10ntools/source/helpmerge.cxx
+++ b/l10ntools/source/helpmerge.cxx
@@ -126,7 +126,7 @@ bool HelpParser::CreatePO(
common::writePoEntry(
"Helpex", aPoOutput, sHelpFile, rGsi1,
- posm->first, pXMLElement->GetOldref(), OString(), data);
+ posm->first, OString(), OString(), data);
pXMLElement=nullptr;
}
@@ -202,8 +202,6 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
XMLElement* pXMLElement = nullptr;
MergeEntrys *pEntrys = nullptr;
- OString sLId;
-
pEntrys = nullptr;
if( !sCur.equalsIgnoreAsciiCase("en-US") ){
@@ -214,9 +212,6 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
}
if( pXMLElement != nullptr )
{
- sLId = pXMLElement->GetOldref();
- pResData->sId = sLId;
-
OString sNewText;
OString sNewdata;
OString sSourceText(
@@ -264,8 +259,7 @@ void HelpParser::ProcessHelp( LangHashMap* aLangHM , const OString& sCur , ResDa
{
SAL_WARN(
"l10ntools",
- "Can't find GID=" << pResData->sGId << " LID="
- << pResData->sId << " TYP=" << pResData->sResTyp);
+ "Can't find GID=" << pResData->sGId << " TYP=" << pResData->sResTyp);
}
pXMLElement->ChangeLanguageTag(sCur);
}
diff --git a/l10ntools/source/xmlparse.cxx b/l10ntools/source/xmlparse.cxx
index 7717b22d3157..ae93b44437f9 100644
--- a/l10ntools/source/xmlparse.cxx
+++ b/l10ntools/source/xmlparse.cxx
@@ -39,7 +39,6 @@ using namespace osl;
#define XML_LANG "xml-lang"
#define ID "id"
-#define OLDREF "oldref"
// class XMLChildNode
@@ -446,7 +445,7 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos )
bool bInsert = true;
XMLElement *pElement = static_cast<XMLElement*>(pCur);
const OString sName(pElement->GetName().toAsciiLowerCase());
- OString sLanguage, sTmpStrVal, sOldref;
+ OString sLanguage, sTmpStrVal;
if ( pElement->GetAttributeList())
{
for ( size_t j = 0 , cnt = pElement->GetAttributeList()->size(); j < cnt && bInsert; ++j )
@@ -464,14 +463,9 @@ void XMLFile::SearchL10NElements( XMLChildNode *pCur, int nPos )
{
sLanguage=(*pElement->GetAttributeList())[ j ]->GetValue();
}
- if (sTmpStr == OLDREF) // Get the "oldref" Attribute
- {
- sOldref=(*pElement->GetAttributeList())[ j ]->GetValue();
- }
}
pElement->SetLanguageId( sLanguage );
pElement->SetId( sTmpStrVal );
- pElement->SetOldRef( sOldref );
pElement->SetPos( nPos );
}
@@ -555,7 +549,6 @@ XMLElement::XMLElement(
: XMLParentNode( pParent )
, m_sElementName( rName )
, m_sId(OString())
- , m_sOldRef(OString())
, m_sLanguageId(OString())
, m_nPos(0)
{
@@ -565,7 +558,6 @@ XMLElement::XMLElement(const XMLElement& rObj)
: XMLParentNode( rObj )
, m_sElementName( rObj.m_sElementName )
, m_sId( rObj.m_sId )
- , m_sOldRef( rObj.m_sOldRef )
, m_sLanguageId( rObj.m_sLanguageId )
, m_nPos( rObj.m_nPos )
{
@@ -584,7 +576,6 @@ XMLElement& XMLElement::operator=(const XMLElement& rObj)
XMLParentNode::operator=(rObj);
m_sElementName = rObj.m_sElementName;
m_sId = rObj.m_sId;
- m_sOldRef = rObj.m_sOldRef;
m_sLanguageId = rObj.m_sLanguageId;
m_nPos = rObj.m_nPos;
diff --git a/xmlhelp/util/compact.xsl b/xmlhelp/util/compact.xsl
index 3b557fb90700..9d61963ce1b4 100644
--- a/xmlhelp/util/compact.xsl
+++ b/xmlhelp/util/compact.xsl
@@ -41,8 +41,6 @@
<xsl:template match="image/@height"/>
<xsl:template match="link/@name"/>
<xsl:template match="paragraph/@id"/>
- <xsl:template match="paragraph/@l10n"/>
- <xsl:template match="paragraph/@oldref"/>
<xsl:template match="table/@id"/>
<xsl:template match="title/@id"/>
<xsl:template match="topic/@id"/>
More information about the Libreoffice-commits
mailing list