[Libreoffice-commits] .: Branch 'feature/cmclayouttrans' - sw/uiconfig vcl/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Aug 8 06:39:18 PDT 2012
sw/uiconfig/sw/ui/20872.ui | 8 ++++----
vcl/source/window/builder.cxx | 12 +++++-------
2 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 267b85930885264fe72865a127380808e2bdf4b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 8 14:39:02 2012 +0100
col ids all have to be 0, use order of appearance instead
Change-Id: I9508e2fa928db822b1776230c83fb48dfeb956de
diff --git a/sw/uiconfig/sw/ui/20872.ui b/sw/uiconfig/sw/ui/20872.ui
index add6a10..777d049 100644
--- a/sw/uiconfig/sw/ui/20872.ui
+++ b/sw/uiconfig/sw/ui/20872.ui
@@ -22,10 +22,10 @@
<col id="0" translatable="yes">Left</col>
</row>
<row>
- <col id="1" translatable="yes">Centered</col>
+ <col id="0" translatable="yes">Centered</col>
</row>
<row>
- <col id="2" translatable="yes">Right</col>
+ <col id="0" translatable="yes">Right</col>
</row>
</data>
</object>
@@ -435,10 +435,10 @@
<col id="0" translatable="yes">Tap stop</col>
</row>
<row>
- <col id="1" translatable="yes">Space</col>
+ <col id="0" translatable="yes">Space</col>
</row>
<row>
- <col id="2" translatable="yes">Nothing</col>
+ <col id="0" translatable="yes">Nothing</col>
</row>
</data>
</object>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 465a806..43f4030 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -649,6 +649,7 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const rtl::OStrin
m_aModels.push_back(ModelAndId(rID, new ListStore));
int nLevel = 1;
+ sal_Int32 nIndex = 0;
while(1)
{
@@ -671,14 +672,9 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const rtl::OStrin
while (reader.nextAttribute(&nsId, &name))
{
- if (name.equals(RTL_CONSTASCII_STRINGPARAM("id")))
- {
- name = reader.getAttributeValue(false);
- sProperty = rtl::OString(name.begin, name.length);
- }
- else if (name.equals(RTL_CONSTASCII_STRINGPARAM("translatable")) && reader.getAttributeValue(false).equals(RTL_CONSTASCII_STRINGPARAM("yes")))
+ if (name.equals(RTL_CONSTASCII_STRINGPARAM("translatable")) && reader.getAttributeValue(false).equals(RTL_CONSTASCII_STRINGPARAM("yes")))
{
- sValue = getTranslation(rID, sProperty);
+ sValue = getTranslation(rID, rtl::OString::valueOf(nIndex));
bTranslated = !sValue.isEmpty();
}
}
@@ -690,6 +686,8 @@ void VclBuilder::handleListStore(xmlreader::XmlReader &reader, const rtl::OStrin
sValue = rtl::OString(name.begin, name.length);
m_aModels.back().m_pModel->m_aEntries.push_back(sValue);
+
+ ++nIndex;
}
}
More information about the Libreoffice-commits
mailing list