[Libreoffice-commits] .: tools/inc tools/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Mon Jan 10 19:24:31 PST 2011
tools/inc/tools/resid.hxx | 6 ++++++
tools/source/string/strucvt.cxx | 6 ++++++
2 files changed, 12 insertions(+)
New commits:
commit 38b4d22281851e81d465a5580714be78e7b1d0e0
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Mon Jan 10 22:23:29 2011 -0500
Added static toString method to ResId class.
diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx
index 2b5cb21..decd09a 100644
--- a/tools/inc/tools/resid.hxx
+++ b/tools/inc/tools/resid.hxx
@@ -43,6 +43,10 @@ class ResMgr;
//- ResId -
//---------
+namespace rtl {
+ class OUString;
+}
+
class ResId
{
/*
@@ -158,6 +162,8 @@ class ResId
sal_uInt32 GetId() const { return m_nResId & ~RSC_DONTRELEASE; }
RSHEADER_TYPE* GetpResource() const { return m_pResource; }
+
+ static TOOLS_DLLPUBLIC rtl::OUString toString(const ResId& aId);
};
#endif // _RESID_HXX
diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx
index 48801e6..28c1415 100644
--- a/tools/source/string/strucvt.cxx
+++ b/tools/source/string/strucvt.cxx
@@ -212,4 +212,10 @@ UniString::UniString( const ResId& rResId )
pImplResHookProc( *this );
}
+rtl::OUString ResId::toString(const ResId& aId)
+{
+ // TODO: Optimize this.
+ return rtl::OUString(UniString(aId));
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list