export x-comments to sdf file into the 'helptext' field
helptext field has not been in use for a while, so we can use that to hold the x-comment
This commit is contained in:
@@ -72,6 +72,7 @@ typedef boost::unordered_map<rtl::OString, MergeData*, rtl::OStringHash>
|
|||||||
MergeDataHashMap;
|
MergeDataHashMap;
|
||||||
|
|
||||||
#define SOURCE_LANGUAGE rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))
|
#define SOURCE_LANGUAGE rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))
|
||||||
|
#define X_COMMENT rtl::OString(RTL_CONSTASCII_STRINGPARAM("x-comment"))
|
||||||
#define LIST_REFID "LIST_REFID"
|
#define LIST_REFID "LIST_REFID"
|
||||||
|
|
||||||
typedef OStringHashMap ExportListEntry;
|
typedef OStringHashMap ExportListEntry;
|
||||||
|
@@ -51,7 +51,7 @@ class Entry:
|
|||||||
prefix += "%s." % self.items[3]
|
prefix += "%s." % self.items[3]
|
||||||
self.keys = []
|
self.keys = []
|
||||||
# 10..13 are translation types
|
# 10..13 are translation types
|
||||||
for idx in range(10, 14):
|
for idx in [10,12,13]:
|
||||||
try:
|
try:
|
||||||
if len(self.items[idx]):
|
if len(self.items[idx]):
|
||||||
t = {10:'text', 12:'quickhelptext', 13:'title'}[idx]
|
t = {10:'text', 12:'quickhelptext', 13:'title'}[idx]
|
||||||
|
@@ -483,6 +483,7 @@ void CfgExport::WorkOnRessourceEnd()
|
|||||||
if ( pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))].getLength() )
|
if ( pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))].getLength() )
|
||||||
{
|
{
|
||||||
rtl::OString sFallback = pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))];
|
rtl::OString sFallback = pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("en-US"))];
|
||||||
|
rtl::OString sXComment = pStackData->sText[rtl::OString(RTL_CONSTASCII_STRINGPARAM("x-comment"))];
|
||||||
rtl::OString sLocalId = pStackData->sIdentifier;
|
rtl::OString sLocalId = pStackData->sIdentifier;
|
||||||
rtl::OString sGroupId;
|
rtl::OString sGroupId;
|
||||||
if ( aStack.size() == 1 ) {
|
if ( aStack.size() == 1 ) {
|
||||||
@@ -512,7 +513,8 @@ void CfgExport::WorkOnRessourceEnd()
|
|||||||
sOutput += sCur;
|
sOutput += sCur;
|
||||||
sOutput += "\t";
|
sOutput += "\t";
|
||||||
|
|
||||||
sOutput += sText; sOutput += "\t\t\t\t";
|
sOutput += sText; sOutput += "\t";
|
||||||
|
sOutput += sXComment; sOutput += "\t\t\t";
|
||||||
|
|
||||||
pOutputStream << sOutput.getStr() << '\n';
|
pOutputStream << sOutput.getStr() << '\n';
|
||||||
}
|
}
|
||||||
|
@@ -1006,8 +1006,8 @@ sal_Bool Export::WriteData( ResData *pResData, sal_Bool bCreateNew )
|
|||||||
sXText = pResData->sText[ SOURCE_LANGUAGE ];
|
sXText = pResData->sText[ SOURCE_LANGUAGE ];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pResData->sHelpText[ sCur ].isEmpty())
|
if (!pResData->sText[ X_COMMENT ].isEmpty())
|
||||||
sXHText = pResData->sHelpText[ sCur ];
|
sXHText = pResData->sText[ X_COMMENT ];
|
||||||
else {
|
else {
|
||||||
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
|
sXHText = pResData->sHelpText[ SOURCE_LANGUAGE ];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user