summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-08-23 15:38:30 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-28 08:48:39 +0100
commit817e876a8df0c969b63cb20b0cb7d85d7280b7fc (patch)
treea045f2cc85746da43e9c7e4db0e118fd26e9f54b /vcl/inc
parent7e1a1d4c846946c6c97078149f176e90438387de (diff)
Move all the state we need just during parsing to one place
and throw the lot away when finished with it Change-Id: Ie64d3fa4cea41fa1ec956538616f73204957f311
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/vcl/builder.hxx20
1 files changed, 13 insertions, 7 deletions
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index 7ee38b504bcd..d77b1397e157 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -75,7 +75,6 @@ private:
{
}
};
- std::vector<ModelAndId> m_aModels;
struct StringPair
{
@@ -89,10 +88,8 @@ private:
};
typedef StringPair RadioButtonGroupMap;
- std::vector<RadioButtonGroupMap> m_aGroupMaps;
-
typedef StringPair ComboBoxModelMap;
- std::vector<ComboBoxModelMap> m_aModelMaps;
+
ListStore *get_model_by_name(rtl::OString sID);
static void mungemodel(ListBox &rTarget, ListStore &rStore);
@@ -108,22 +105,31 @@ private:
m_aAdjustment.swap(rAdjustment);
}
};
- std::vector<AdjustmentAndId> m_aAdjustments;
typedef StringPair SpinButtonAdjustmentMap;
- std::vector<SpinButtonAdjustmentMap> m_aAdjustmentMaps;
+
Adjustment *get_adjustment_by_name(rtl::OString sID);
static void mungeadjustment(NumericFormatter &rTarget, Adjustment &rAdjustment);
typedef std::map<rtl::OString, rtl::OString> WidgetTranslations;
typedef std::map<rtl::OString, WidgetTranslations> Translations;
- Translations m_aTranslations;
+
+ struct ParserState
+ {
+ std::vector<RadioButtonGroupMap> m_aGroupMaps;
+ std::vector<ComboBoxModelMap> m_aModelMaps;
+ std::vector<ModelAndId> m_aModels;
+ std::vector<AdjustmentAndId> m_aAdjustments;
+ std::vector<SpinButtonAdjustmentMap> m_aAdjustmentMaps;
+ Translations m_aTranslations;
+ };
rtl::OString getTranslation(const rtl::OString &rId, const rtl::OString &rProperty) const;
rtl::OString m_sID;
rtl::OString m_sHelpRoot;
Window *m_pParent;
+ ParserState *m_pParserState;
Window *get_by_name(rtl::OString sID);
public: