Kaydet (Commit) 5a23c290 authored tarafından Rachit Gupta's avatar Rachit Gupta Kaydeden (comit) Jan Holesovsky

Removed hardcoded strings.

Replaced the hardcoded strings with their CUI_RES equivalents.

Change-Id: I1f4e0451839cd9fe10aa9d1c5ae82af9fa13dc4e
üst 3fcd1064
...@@ -47,6 +47,7 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -47,6 +47,7 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optjava.src \ cui/source/options/optjava.src \
cui/source/options/optlingu.src \ cui/source/options/optlingu.src \
cui/source/options/optpath.src \ cui/source/options/optpath.src \
cui/source/options/personalization.src \
cui/source/options/treeopt.src \ cui/source/options/treeopt.src \
cui/source/tabpages/border.src \ cui/source/tabpages/border.src \
cui/source/tabpages/frmdirlbox.src \ cui/source/tabpages/frmdirlbox.src \
......
...@@ -425,6 +425,14 @@ ...@@ -425,6 +425,14 @@
#define RID_SVXSTR_EDITHINT (RID_SVX_START + 1266) #define RID_SVXSTR_EDITHINT (RID_SVX_START + 1266)
// Search Persona Dialog
#define RID_SVXSTR_SEARCHTERM (RID_SVX_START + 1277)
#define RID_SVXSTR_SELECTEDPERSONA (RID_SVX_START + 1278)
#define RID_SVXSTR_SEARCHING (RID_SVX_START + 1279)
#define RID_SVXSTR_SEARCHERROR (RID_SVX_START + 1280)
#define RID_SVXSTR_NORESULTS (RID_SVX_START + 1281)
#define RID_SVXSTR_APPLYPERSONA (RID_SVX_START + 1282)
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <vcl/graphicfilter.hxx> #include <vcl/graphicfilter.hxx>
#include <dialmgr.hxx>
#include "cuires.hrc"
#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/xml/sax/XParser.hpp> #include <com/sun/star/xml/sax/XParser.hpp>
...@@ -63,7 +65,7 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent ) ...@@ -63,7 +65,7 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent )
m_vSearchSuggestions[4]->SetClickHdl( LINK( this, SelectPersonaDialog, SearchPersonas ) ); m_vSearchSuggestions[4]->SetClickHdl( LINK( this, SelectPersonaDialog, SearchPersonas ) );
get( m_pEdit, "search_term" ); get( m_pEdit, "search_term" );
m_pEdit->SetPlaceholderText( "Search term..." ); m_pEdit->SetPlaceholderText( CUI_RES( RID_SVXSTR_SEARCHTERM ) );
get( m_pProgressLabel, "progress_label" ); get( m_pProgressLabel, "progress_label" );
...@@ -170,7 +172,7 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton ) ...@@ -170,7 +172,7 @@ IMPL_LINK( SelectPersonaDialog, SelectPersona, PushButton*, pButton )
// get the persona name from the setting variable to show in the progress. // get the persona name from the setting variable to show in the progress.
sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' ); sal_Int32 nNameIndex = m_aSelectedPersona.indexOf( ';' );
OUString aName = m_aSelectedPersona.copy( 0, nNameIndex ); OUString aName = m_aSelectedPersona.copy( 0, nNameIndex );
OUString aProgress( "Selected Persona: " ); OUString aProgress( CUI_RES( RID_SVXSTR_SELECTEDPERSONA ) );
aProgress += aName; aProgress += aName;
SetProgress( aProgress ); SetProgress( aProgress );
} }
...@@ -542,7 +544,7 @@ void SearchAndParseThread::execute() ...@@ -542,7 +544,7 @@ void SearchAndParseThread::execute()
if( m_aURL.startsWith( "https://" ) ) if( m_aURL.startsWith( "https://" ) )
{ {
m_pPersonaDialog->ClearSearchResults(); m_pPersonaDialog->ClearSearchResults();
OUString sProgress( "Searching.. Please Wait.." ); OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHING ) );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() ); Reference<XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext); Reference< xml::sax::XParser > xParser = xml::sax::Parser::create(xContext);
...@@ -560,7 +562,7 @@ void SearchAndParseThread::execute() ...@@ -560,7 +562,7 @@ void SearchAndParseThread::execute()
} }
catch (...) catch (...)
{ {
sProgress = "Something went wrong. Please try again."; sProgress = CUI_RES( RID_SVXSTR_SEARCHERROR );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
return; return;
} }
...@@ -571,7 +573,7 @@ void SearchAndParseThread::execute() ...@@ -571,7 +573,7 @@ void SearchAndParseThread::execute()
if( !pHandler->hasResults() ) if( !pHandler->hasResults() )
{ {
sProgress = "No results found."; sProgress = CUI_RES( RID_SVXSTR_NORESULTS );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
return; return;
} }
...@@ -611,7 +613,7 @@ void SearchAndParseThread::execute() ...@@ -611,7 +613,7 @@ void SearchAndParseThread::execute()
else else
{ {
OUString sProgress( "Applying persona.." ); OUString sProgress( CUI_RES( RID_SVXSTR_APPLYPERSONA ) );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY ); uno::Reference< ucb::XSimpleFileAccess3 > xFileAccess( ucb::SimpleFileAccess::create( comphelper::getProcessComponentContext() ), uno::UNO_QUERY );
...@@ -660,7 +662,7 @@ void SearchAndParseThread::execute() ...@@ -660,7 +662,7 @@ void SearchAndParseThread::execute()
} }
catch ( const uno::Exception & ) catch ( const uno::Exception & )
{ {
sProgress = "Something went wrong. Please try again."; sProgress = CUI_RES( RID_SVXSTR_SEARCHERROR );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
return; return;
} }
...@@ -688,7 +690,7 @@ void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPrev ...@@ -688,7 +690,7 @@ void SearchAndParseThread::getPreviewFile( const OUString& rURL, OUString *pPrev
} }
catch (...) catch (...)
{ {
OUString sProgress = "Something went wrong. Please try again."; OUString sProgress( CUI_RES( RID_SVXSTR_SEARCHERROR ) );
m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->SetProgress( sProgress );
return; return;
} }
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <cuires.hrc>
String RID_SVXSTR_SEARCHTERM
{
Text [ en-US ] = "Search term...";
};
String RID_SVXSTR_SELECTEDPERSONA
{
Text [ en-US ] = "Selected Persona: ";
};
String RID_SVXSTR_SEARCHING
{
Text [ en-US ] = "Searching.. Please Wait..";
};
String RID_SVXSTR_SEARCHERROR
{
Text [ en-US ] = "Something went wrong. Please try again.";
};
String RID_SVXSTR_NORESULTS
{
Text [ en-US ] = "No results found.";
};
String RID_SVXSTR_APPLYPERSONA
{
Text [ en-US ] = "Applying persona..";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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