Commits

Anonymous committed 34bc27a

kso47:#i115372# Load title string from resource

  • Participants
  • Parent commits 39c726a

Comments (0)

Files changed (5)

File fpicker/source/office/OfficeFilePicker.src

     Text [ en-US ] = "File ~type:" ;
 };
 
+String STR_SVT_FILEPICKER_PLACES
+{
+	Text [ en-US ] = "Places";
+};
+
 String STR_SVT_FOLDERPICKER_DEFAULT_TITLE
 {
 	Text [ en-US ] = "Select Path" ;
 {
 	Text [ en-US ] = "Please select a folder.";
 };
-

File fpicker/source/office/iodlg.cxx

     nDelta += ( nBtnCount * aSize.Width() ); // button count * button width
     nDelta += ( n3AppFontInPixel + n3AppFontInPixel / 2 ); // spacing 1*big 1*small
 
-    _pPlacesWin = new fpicker::office::PlacesWindow( this );
+    String aTitle( SvtResId( STR_SVT_FILEPICKER_PLACES ) );
+    _pPlacesWin = new fpicker::office::PlacesWindow( this, aTitle );
     m_bHasPlaces = _pPlacesWin->GetEntryCount() > 0;
 
     long nXOffset = 0;

File fpicker/source/office/placeswin.cxx

 
 using namespace com::sun::star;
 
-#define UNISTRING(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
 namespace
 {
     struct ResMgrHolder
 
 // class PlacesWindow ----------------------------------------------
 
-PlacesWindow::PlacesWindow( Window* pParent ) :
+PlacesWindow::PlacesWindow( Window* pParent, const String& rTitle ) :
 
     Control( pParent, WB_DIALOGCONTROL | WB_BORDER ),
 
         it++;
     }
     aIconCtrl.CreateAutoMnemonics();
-    initHeaderbar();
+    initHeaderbar( rTitle );
 }
 
 PlacesWindow::~PlacesWindow()
 }
 
 // ------------------------------------------------------------------------
-void PlacesWindow::initHeaderbar()
+void PlacesWindow::initHeaderbar( const String& rTitle )
 {
     m_pHeaderBar = new HeaderBar( this, WB_BUTTONSTYLE | WB_BOTTOMBORDER );
 
     m_pHeaderBar->SetPosSizePixel( Point( 0, 0 ), m_pHeaderBar->CalcWindowSizePixel() );
-    m_pHeaderBar->InsertItem( 1, UNISTRING( "Places" ), 600, HIB_LEFT | HIB_VCENTER );
+    m_pHeaderBar->InsertItem( 1, rTitle, 600, HIB_LEFT | HIB_VCENTER );
 
     Size aHeadSize = m_pHeaderBar->GetSizePixel();
     Size aPlacesSize = aIconCtrl.GetSizePixel();

File fpicker/source/office/placeswin.hxx

                                    const Size aSize,
                                    Image& rImage );
     SvxIconChoiceCtrlEntry* GetEntry( const String& rURL ) const;
-    void          initHeaderbar();
+    void          initHeaderbar( const String& rTitle );
 
 public:
-    PlacesWindow( Window* pParent );
+    PlacesWindow( Window* pParent, const String& rTitle  );
     ~PlacesWindow();
 
     virtual void Resize();

File svtools/inc/svtools/svtools.hrc

 #define STR_SVT_FILEPICKER_IMAGE_TEMPLATE			(STR_SVT_FILEPICKER_START+ 9)
 #define STR_SVT_FILEPICKER_SELECTION				(STR_SVT_FILEPICKER_START+10)
 #define STR_SVT_FILEPICKER_FILTER_TITLE				(STR_SVT_FILEPICKER_START+11)
-#define STR_SVT_FOLDERPICKER_DEFAULT_TITLE			(STR_SVT_FILEPICKER_START+12)
-#define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION	(STR_SVT_FILEPICKER_START+13)
+#define STR_SVT_FILEPICKER_PLACES           		(STR_SVT_FILEPICKER_START+12)
+#define STR_SVT_FOLDERPICKER_DEFAULT_TITLE			(STR_SVT_FILEPICKER_START+13)
+#define STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION	(STR_SVT_FILEPICKER_START+14)
 #define STR_SVT_FILEPICKER_END 						(STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION)
 
 // String-Ids for accessibility