summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-03-26 14:30:29 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-03-26 16:21:40 -0400
commit1b7bfb7b36964116138d2abd4e2b6aa07b6ef1e2 (patch)
treee0c633c2eda51bb415e841d4355d5133835ab91d /svx
parent98add982f5fe7e30855b5ecf5495ecfa31533852 (diff)
UniString to rtl::OUString.
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/svx/gallery.hxx1
-rw-r--r--svx/source/gallery2/galexpl.cxx17
2 files changed, 18 insertions, 0 deletions
diff --git a/svx/inc/svx/gallery.hxx b/svx/inc/svx/gallery.hxx
index c8ca0218d770..ada3a7572e29 100644
--- a/svx/inc/svx/gallery.hxx
+++ b/svx/inc/svx/gallery.hxx
@@ -231,6 +231,7 @@ public:
// FillObjList is filling rObjList with Strings of the internal Gallery Object URL
static sal_Bool FillObjList( const String& rThemeName, std::vector<String> &rObjList );
static sal_Bool FillObjList( const sal_uInt32 nThemeId, std::vector<String> &rObjList );
+ static bool FillObjList( const sal_uInt32 nThemeId, std::vector<rtl::OUString> &rObjList );
// FillObjTitleList is filling the rList with the title for each gallery object
static sal_Bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList );
diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx
index 45dccd6a1318..45b7b5ae796e 100644
--- a/svx/source/gallery2/galexpl.cxx
+++ b/svx/source/gallery2/galexpl.cxx
@@ -153,6 +153,23 @@ sal_Bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<St
return FillObjList( pGal->GetThemeName( nThemeId ), rObjList );
}
+bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<rtl::OUString> &rObjList )
+{
+ std::vector<String> aObjList;
+ if (!FillObjList(nThemeId, aObjList))
+ return false;
+
+ // Convert UniString to rtl::OUString.
+ std::vector<rtl::OUString> aList;
+ aList.reserve(aObjList.size());
+ std::vector<String>::const_iterator it = aObjList.begin(), itEnd = aObjList.end();
+ for (; it != itEnd; ++it)
+ aList.push_back(*it);
+
+ rObjList.swap(aList);
+ return true;
+}
+
// ------------------------------------------------------------------------
sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList )