Kaydet (Commit) 1b7bfb7b authored tarafından Kohei Yoshida's avatar Kohei Yoshida

UniString to rtl::OUString.

üst 98add982
...@@ -140,9 +140,8 @@ private: ...@@ -140,9 +140,8 @@ private:
FixedText aSymbolHeightFT; FixedText aSymbolHeightFT;
MetricField aSymbolHeightMF; MetricField aSymbolHeightMF;
CheckBox aSymbolRatioCB; CheckBox aSymbolRatioCB;
std::vector<String> aGrfNames; std::vector<rtl::OUString> aGrfNames;
SvxBmpItemInfoList aGrfBrushItems; SvxBmpItemInfoList aGrfBrushItems;
String sNumCharFmtName;
sal_Bool bLastWidthModified; sal_Bool bLastWidthModified;
Size aSymbolLastSize; Size aSymbolLastSize;
Graphic aSymbolGraphic; Graphic aSymbolGraphic;
......
...@@ -1462,19 +1462,17 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) ...@@ -1462,19 +1462,17 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames); GalleryExplorer::FillObjList(GALLERY_THEME_BULLETS, aGrfNames);
PopupMenu* pPopup = new PopupMenu; PopupMenu* pPopup = new PopupMenu;
String aEmptyStr; rtl::OUString aEmptyStr;
const String *pUIName = NULL; const rtl::OUString *pUIName = NULL;
sal_uInt32 i = 0; sal_uInt32 i = 0;
for(std::vector<String>::iterator it = aGrfNames.begin(); it != aGrfNames.end(); ++it, ++i) for(std::vector<rtl::OUString>::iterator it = aGrfNames.begin(); it != aGrfNames.end(); ++it, ++i)
{ {
pUIName = &(*it); pUIName = &(*it);
// convert URL encodings to UI characters (eg %20 for spaces) // convert URL encodings to UI characters (eg %20 for spaces)
String aPhysicalName; rtl::OUString aPhysicalName;
rtl::OUString sTmp; if (utl::LocalFileHelper::ConvertURLToPhysicalName(*it, aPhysicalName))
if( ::utl::LocalFileHelper::ConvertURLToPhysicalName( *it, sTmp ))
{ {
aPhysicalName = sTmp;
pUIName = &aPhysicalName; pUIName = &aPhysicalName;
} }
...@@ -1536,7 +1534,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton ) ...@@ -1536,7 +1534,7 @@ IMPL_LINK( SvxLineTabPage, MenuCreateHdl_Impl, MenuButton *, pButton )
pView->ShowSdrPage(pPage); pView->ShowSdrPage(pPage);
PopupMenu* pPopup = new PopupMenu; PopupMenu* pPopup = new PopupMenu;
String aEmptyStr; rtl::OUString aEmptyStr;
// Generate invisible square to give all symbols a // Generate invisible square to give all symbols a
// bitmap size, which is indepedent from specific glyph // bitmap size, which is indepedent from specific glyph
......
...@@ -231,6 +231,7 @@ public: ...@@ -231,6 +231,7 @@ public:
// FillObjList is filling rObjList with Strings of the internal Gallery Object URL // 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 String& rThemeName, std::vector<String> &rObjList );
static sal_Bool FillObjList( const sal_uInt32 nThemeId, 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 // 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 ); static sal_Bool FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList );
......
...@@ -153,6 +153,23 @@ sal_Bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<St ...@@ -153,6 +153,23 @@ sal_Bool GalleryExplorer::FillObjList( const sal_uInt32 nThemeId, std::vector<St
return FillObjList( pGal->GetThemeName( nThemeId ), rObjList ); 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 ) sal_Bool GalleryExplorer::FillObjListTitle( const sal_uInt32 nThemeId, std::vector< rtl::OUString >& rList )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment