[Libreoffice-commits] core.git: compilerplugins/clang editeng/source filter/source framework/source include/uno reportdesign/source sal/qa sc/source sdext/source sd/source sfx2/source stoc/source svx/source sw/qa sw/source tools/qa tools/source vcl/headless vcl/source vcl/unx writerfilter/source xmloff/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 30 06:44:59 UTC 2019
compilerplugins/clang/stringconstant.cxx | 105 +++++-----
compilerplugins/clang/test/stringconstant.cxx | 16 +
editeng/source/misc/swafopt.cxx | 3
filter/source/msfilter/eschesdo.cxx | 4
filter/source/pdf/pdfexport.cxx | 4
framework/source/fwe/classes/addonsoptions.cxx | 2
include/uno/mapping.hxx | 8
reportdesign/source/core/api/ReportComponent.cxx | 6
reportdesign/source/core/api/ReportDefinition.cxx | 6
reportdesign/source/ui/report/dlgedfac.cxx | 2
sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx | 2
sc/source/core/tool/interpr5.cxx | 4
sc/source/filter/excel/excform.cxx | 4
sc/source/filter/excel/excform8.cxx | 4
sc/source/ui/app/scmod.cxx | 2
sd/source/core/stlpool.cxx | 2
sdext/source/presenter/PresenterNotesView.cxx | 2
sdext/source/presenter/PresenterScrollBar.cxx | 2
sdext/source/presenter/PresenterSlidePreview.cxx | 2
sdext/source/presenter/PresenterWindowManager.cxx | 2
sfx2/source/control/unoctitm.cxx | 4
stoc/source/corereflection/crefl.cxx | 8
svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 4
svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx | 8
sw/qa/extras/uiwriter/uiwriter.cxx | 4
sw/source/core/doc/DocumentTimerManager.cxx | 3
sw/source/core/swg/SwXMLTextBlocks1.cxx | 2
sw/source/filter/ww8/rtfexport.cxx | 2
sw/source/uibase/app/appopt.cxx | 6
tools/qa/cppunit/test_config.cxx | 18 -
tools/source/fsys/urlobj.cxx | 3
vcl/headless/svpprn.cxx | 4
vcl/source/app/settings.cxx | 2
vcl/source/filter/GraphicNativeTransform.cxx | 4
vcl/source/gdi/print3.cxx | 38 +--
vcl/source/treelist/treelistbox.cxx | 2
vcl/source/window/builder.cxx | 24 +-
vcl/source/window/settings.cxx | 2
vcl/source/window/toolbox2.cxx | 4
vcl/unx/generic/print/printerjob.cxx | 2
vcl/unx/generic/print/prtsetup.cxx | 12 -
vcl/unx/generic/printer/jobdata.cxx | 12 -
vcl/unx/generic/printer/ppdparser.cxx | 38 +--
vcl/unx/generic/printer/printerinfomanager.cxx | 6
writerfilter/source/rtftok/rtfdispatchdestination.cxx | 2
xmloff/source/style/xmlnumfi.cxx | 4
46 files changed, 210 insertions(+), 190 deletions(-)
New commits:
commit dd8d5e5795358d732a9f7a8af7c35f662321e332
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 29 11:18:21 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Apr 30 08:43:51 2019 +0200
improve loplugin:stringconstant
to find more places we can elide the OUString() constructor at call
sites
Change-Id: Ie09f3c61f2c4b4959c97dc98ebcbaf7c51d5d713
Reviewed-on: https://gerrit.libreoffice.org/71514
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx
index 05cfa03ff711..6a009e510297 100644
--- a/compilerplugins/clang/stringconstant.cxx
+++ b/compilerplugins/clang/stringconstant.cxx
@@ -58,7 +58,19 @@ bool isLhsOfAssignment(FunctionDecl const * decl, unsigned parameter) {
|| (oo >= OO_PlusEqual && oo <= OO_GreaterGreaterEqual);
}
-bool hasOverloads(FunctionDecl const * decl, unsigned arguments) {
+bool typecheckIsOUStringParam(const clang::QualType t) {
+ return bool(loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
+ .LvalueReference().Const().NotSubstTemplateTypeParmType()
+ .Class("OUString").Namespace("rtl").GlobalNamespace());
+}
+
+bool typecheckIsOStringParam(const clang::QualType t) {
+ return bool(loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
+ .LvalueReference().Const().NotSubstTemplateTypeParmType()
+ .Class("OString").Namespace("rtl").GlobalNamespace());
+}
+
+bool hasOverloads(FunctionDecl const * decl, unsigned arguments, unsigned paramIndex) {
int n = 0;
auto ctx = decl->getDeclContext();
if (ctx->getDeclKind() == Decl::LinkageSpec) {
@@ -67,17 +79,32 @@ bool hasOverloads(FunctionDecl const * decl, unsigned arguments) {
auto res = ctx->lookup(decl->getDeclName());
for (auto d = res.begin(); d != res.end(); ++d) {
FunctionDecl const * f = dyn_cast<FunctionDecl>(*d);
- if (f != nullptr && f->getMinRequiredArguments() <= arguments
- && f->getNumParams() >= arguments)
- {
- auto consDecl = dyn_cast<CXXConstructorDecl>(f);
- if (consDecl && consDecl->isCopyOrMoveConstructor()) {
- continue;
- }
- ++n;
- if (n == 2) {
- return true;
- }
+ if (f == nullptr || f->getMinRequiredArguments() > arguments
+ || f->getNumParams() < arguments) {
+ continue;
+ }
+ auto consDecl = dyn_cast<CXXConstructorDecl>(f);
+ if (consDecl && consDecl->isCopyOrMoveConstructor()) {
+ continue;
+ }
+ // Deleted stuff like in ORowSetValueDecorator in connectivity can cause
+ // trouble.
+ if (consDecl && consDecl->isDeleted()) {
+ return true;
+ }
+ if (paramIndex >= f->getNumParams()) {
+ continue;
+ }
+ auto t = f->getParamDecl(paramIndex)->getType();
+ // bool because 'const char *' converts to bool
+ if (!typecheckIsOUStringParam(t) && !typecheckIsOStringParam(t)
+ && !loplugin::TypeCheck(t).Pointer().Const().Char()
+ && !loplugin::TypeCheck(t).AnyBoolean()) {
+ continue;
+ }
+ ++n;
+ if (n == 2) {
+ return true;
}
}
return false;
@@ -269,29 +296,6 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
if (fdecl == nullptr) {
return true;
}
- for (unsigned i = 0; i != fdecl->getNumParams(); ++i) {
- auto t = fdecl->getParamDecl(i)->getType();
- if (loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
- .LvalueReference().Const().NotSubstTemplateTypeParmType()
- .Class("OUString").Namespace("rtl").GlobalNamespace())
- {
- if (!(isLhsOfAssignment(fdecl, i)
- || hasOverloads(fdecl, expr->getNumArgs())))
- {
- handleOUStringCtor(expr, i, fdecl, true);
- }
- }
- if (loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
- .LvalueReference().Const().NotSubstTemplateTypeParmType()
- .Class("OString").Namespace("rtl").GlobalNamespace())
- {
- if (!(isLhsOfAssignment(fdecl, i)
- || hasOverloads(fdecl, expr->getNumArgs())))
- {
- handleOStringCtor(expr, i, fdecl, true);
- }
- }
- }
loplugin::DeclCheck dc(fdecl);
//TODO: u.compareToAscii("foo") -> u.???("foo")
//TODO: u.compareToIgnoreAsciiCaseAscii("foo") -> u.???("foo")
@@ -773,6 +777,25 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
}
return true;
}
+ for (unsigned i = 0; i != fdecl->getNumParams(); ++i) {
+ auto t = fdecl->getParamDecl(i)->getType();
+ if (typecheckIsOUStringParam(t))
+ {
+ if (!(isLhsOfAssignment(fdecl, i)
+ || hasOverloads(fdecl, expr->getNumArgs(), i)))
+ {
+ handleOUStringCtor(expr, i, fdecl, true);
+ }
+ }
+ if (typecheckIsOStringParam(t))
+ {
+ if (!(isLhsOfAssignment(fdecl, i)
+ || hasOverloads(fdecl, expr->getNumArgs(), i)))
+ {
+ handleOStringCtor(expr, i, fdecl, true);
+ }
+ }
+ }
return true;
}
@@ -1176,27 +1199,23 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
auto consDecl = expr->getConstructor();
for (unsigned i = 0; i != consDecl->getNumParams(); ++i) {
auto t = consDecl->getParamDecl(i)->getType();
- if (loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
- .LvalueReference().Const().NotSubstTemplateTypeParmType()
- .Class("OUString").Namespace("rtl").GlobalNamespace())
+ if (typecheckIsOUStringParam(t))
{
auto argExpr = expr->getArg(i);
if (argExpr && i <= consDecl->getNumParams())
{
- if (!hasOverloads(consDecl, expr->getNumArgs()))
+ if (!hasOverloads(consDecl, expr->getNumArgs(), i))
{
handleOUStringCtor(expr, argExpr, consDecl, true);
}
}
}
- if (loplugin::TypeCheck(t).NotSubstTemplateTypeParmType()
- .LvalueReference().Const().NotSubstTemplateTypeParmType()
- .Class("OString").Namespace("rtl").GlobalNamespace())
+ if (typecheckIsOStringParam(t))
{
auto argExpr = expr->getArg(i);
if (argExpr && i <= consDecl->getNumParams())
{
- if (!hasOverloads(consDecl, expr->getNumArgs()))
+ if (!hasOverloads(consDecl, expr->getNumArgs(), i))
{
handleOStringCtor(expr, argExpr, consDecl, true);
}
diff --git a/compilerplugins/clang/test/stringconstant.cxx b/compilerplugins/clang/test/stringconstant.cxx
index 49ae3b68d035..1eda24580ab2 100644
--- a/compilerplugins/clang/test/stringconstant.cxx
+++ b/compilerplugins/clang/test/stringconstant.cxx
@@ -17,6 +17,7 @@
extern void foo(OUString const &);
struct Foo {
+ Foo(int, const OUString &) {}
Foo(OUString const &, int) {}
Foo(OUString const &) {}
void foo(OUString const &) const {}
@@ -28,6 +29,11 @@ struct Foo2 {
void foo(OString const &) const {}
};
+struct NegativeFoo {
+ NegativeFoo(const OString&, const OString& ) {}
+ NegativeFoo(const OString&, const OUString& ) {}
+};
+
int main() {
char const s1[] = "foo";
char const * const s2 = "foo";
@@ -67,9 +73,15 @@ int main() {
(void)aFoo;
Foo aFoo2(OUString("xxx")); // expected-error {{in call of 'Foo::Foo', replace 'OUString' constructed from a string literal directly with the string literal}}
aFoo2.foo(OUString("xxx")); // expected-error {{in call of 'Foo::foo', replace 'OUString' constructed from a string literal directly with the string literal}}
+ Foo aFoo3(1, OUString("xxx")); // expected-error {{in call of 'Foo::Foo', replace 'OUString' constructed from a string literal directly with the string literal}}
+ (void)aFoo3;
+
+ Foo2 aFoo4(OString("xxx")); // expected-error {{in call of 'Foo2::Foo2', replace 'OUString' constructed from a string literal directly with the string literal}}
+ aFoo4.foo(OString("xxx")); // expected-error {{in call of 'Foo2::foo', replace 'OUString' constructed from a string literal directly with the string literal}}
- Foo2 aFoo3(OString("xxx")); // expected-error {{in call of 'Foo2::Foo2', replace 'OUString' constructed from a string literal directly with the string literal}}
- aFoo3.foo(OString("xxx")); // expected-error {{in call of 'Foo2::foo', replace 'OUString' constructed from a string literal directly with the string literal}}
+ // no warning expected
+ NegativeFoo aNegativeFoo(OString("xxx"), OUString("1"));
+ (void)aNegativeFoo;
(void) OUString("xxx", 3, RTL_TEXTENCODING_ASCII_US); // expected-error {{simplify construction of 'OUString' with string constant argument [loplugin:stringconstant]}}
(void) OUString("xxx", 3, RTL_TEXTENCODING_ISO_8859_1); // expected-error {{suspicious 'rtl::OUString' constructor with text encoding 12 but plain ASCII content; use 'RTL_TEXTENCODING_ASCII_US' instead [loplugin:stringconstant]}}
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index b68dcce37c3c..751b3e575a53 100644
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -22,8 +22,7 @@
#include <vcl/keycodes.hxx>
SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
- : aBulletFont( OUString("StarSymbol"),
- Size( 0, 14 ) )
+ : aBulletFont( "StarSymbol", Size( 0, 14 ) )
{
bAutoCorrect =
bCapitalStartSentence =
diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx
index aac095bbe373..8621fd9f6198 100644
--- a/filter/source/msfilter/eschesdo.cxx
+++ b/filter/source/msfilter/eschesdo.cxx
@@ -219,7 +219,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj,
}
break;
}
- rObj.SetAngle( rObj.ImplGetInt32PropertyValue( OUString( "RotateAngle" ) ));
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( "RotateAngle" ));
if( ( rObj.ImplGetPropertyValue( "IsFontwork" ) &&
::cppu::any2bool( rObj.GetUsrAny() ) ) ||
@@ -722,7 +722,7 @@ void ImplEESdrWriter::ImplWriteAdditionalText( ImplEESdrObject& rObj )
if ( !mpPicStrm )
mpPicStrm = mpEscherEx->QueryPictureStream();
EscherPropertyContainer aPropOpt( mpEscherEx->GetGraphicProvider(), mpPicStrm, aRect100thmm );
- rObj.SetAngle( rObj.ImplGetInt32PropertyValue( OUString( "RotateAngle" )));
+ rObj.SetAngle( rObj.ImplGetInt32PropertyValue( "RotateAngle" ));
sal_Int32 nAngle = rObj.GetAngle();
if( rObj.GetType() == "drawing.Line" )
{
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 42ec1e8f23c6..87d07e7d7be5 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1091,7 +1091,7 @@ void PDFExport::ImplExportPage( vcl::PDFWriter& rWriter, vcl::PDFExtOutDevData&
void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSize )
{
- vcl::Font aFont( OUString( "Helvetica" ), Size( 0, 3*rPageSize.Height()/4 ) );
+ vcl::Font aFont( "Helvetica", Size( 0, 3*rPageSize.Height()/4 ) );
aFont.SetItalic( ITALIC_NONE );
aFont.SetWidthType( WIDTH_NORMAL );
aFont.SetWeight( WEIGHT_NORMAL );
@@ -1158,7 +1158,7 @@ void PDFExport::ImplWriteWatermark( vcl::PDFWriter& rWriter, const Size& rPageSi
void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rPageSize )
{
- vcl::Font aFont( OUString( "Liberation Sans" ), Size( 0, 40 ) );
+ vcl::Font aFont( "Liberation Sans", Size( 0, 40 ) );
aFont.SetItalic( ITALIC_NONE );
aFont.SetWidthType( WIDTH_NORMAL );
aFont.SetWeight( WEIGHT_NORMAL );
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index b9463e47e69f..59013a750c89 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star;
#define PROPERTYNAME_CONTEXT ADDONSMENUITEM_STRING_CONTEXT
#define PROPERTYNAME_SUBMENU ADDONSMENUITEM_STRING_SUBMENU
-#define IMAGES_NODENAME OUString("UserDefinedImages" )
+#define IMAGES_NODENAME "UserDefinedImages"
// The following order is mandatory. Please add properties at the end!
#define INDEX_URL 0
diff --git a/include/uno/mapping.hxx b/include/uno/mapping.hxx
index 07518b0fcf3c..698733840058 100644
--- a/include/uno/mapping.hxx
+++ b/include/uno/mapping.hxx
@@ -317,9 +317,7 @@ template< class C >
SAL_DEPRECATED("use uno_Mapping")
inline bool mapToCpp( Reference< C > * ppRet, uno_Interface * pUnoI )
{
- Mapping aMapping(
- ::rtl::OUString( UNO_LB_UNO ),
- ::rtl::OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) );
+ Mapping aMapping( UNO_LB_UNO, CPPU_CURRENT_LANGUAGE_BINDING_NAME );
OSL_ASSERT( aMapping.is() );
aMapping.mapInterface(
reinterpret_cast<void **>(ppRet), pUnoI, ::cppu::getTypeFavourUnsigned( ppRet ) );
@@ -341,9 +339,7 @@ template< class C >
SAL_DEPRECATED("use uno_Mapping")
inline bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x )
{
- Mapping aMapping(
- ::rtl::OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ),
- ::rtl::OUString( UNO_LB_UNO ) );
+ Mapping aMapping( CPPU_CURRENT_LANGUAGE_BINDING_NAME, UNO_LB_UNO );
OSL_ASSERT( aMapping.is() );
aMapping.mapInterface(
reinterpret_cast<void **>(ppRet), x.get(), ::cppu::getTypeFavourUnsigned( &x ) );
diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx
index 189123e76ad0..6c75433e3349 100644
--- a/reportdesign/source/core/api/ReportComponent.cxx
+++ b/reportdesign/source/core/api/ReportComponent.cxx
@@ -84,11 +84,11 @@ OFormatProperties::OFormatProperties()
SvtLinguConfig aLinguConfig;
using namespace ::com::sun::star::i18n::ScriptType;
- aLinguConfig.GetProperty(OUString("DefaultLocale")) >>= aCharLocale;
+ aLinguConfig.GetProperty("DefaultLocale") >>= aCharLocale;
LanguageType eCurLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocale, false), LATIN);
- aLinguConfig.GetProperty(OUString("DefaultLocale_CJK")) >>= aCharLocaleAsian;
+ aLinguConfig.GetProperty("DefaultLocale_CJK") >>= aCharLocaleAsian;
LanguageType eCurLangCJK = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocaleAsian, false), ASIAN);
- aLinguConfig.GetProperty(OUString("DefaultLocale_CTL")) >>= aCharLocaleComplex;
+ aLinguConfig.GetProperty("DefaultLocale_CTL") >>= aCharLocaleComplex;
LanguageType eCurLangCTL = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aCharLocaleComplex, false), COMPLEX);
vcl::Font aLatin,aCJK,aCTL;
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 7aad736fa96d..591c919595d4 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -200,9 +200,9 @@ static void lcl_setModelReadOnly(const uno::Reference< embed::XStorage >& _xStor
}
static void lcl_stripLoadArguments( utl::MediaDescriptor& _rDescriptor, uno::Sequence< beans::PropertyValue >& _rArgs )
{
- _rDescriptor.erase( OUString( "StatusIndicator" ) );
- _rDescriptor.erase( OUString( "InteractionHandler" ) );
- _rDescriptor.erase( OUString( "Model" ) );
+ _rDescriptor.erase( "StatusIndicator" );
+ _rDescriptor.erase( "InteractionHandler" );
+ _rDescriptor.erase( "Model" );
_rDescriptor >> _rArgs;
}
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx
index 4a416838ebda..22af5dfb1f33 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -88,7 +88,7 @@ IMPL_STATIC_LINK(
pNewObj = new OOle2Obj(aParams.rSdrModel, SERVICE_REPORTDEFINITION, OBJ_DLG_SUBREPORT);
break;
case OBJ_OLE2:
- pNewObj = new OOle2Obj(aParams.rSdrModel, OUString("com.sun.star.chart2.ChartDocument"),OBJ_OLE2);
+ pNewObj = new OOle2Obj(aParams.rSdrModel, "com.sun.star.chart2.ChartDocument", OBJ_OLE2);
break;
default:
OSL_FAIL("Unknown object id");
diff --git a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
index c50f9699ad49..139b87bd4295 100644
--- a/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
+++ b/sal/qa/rtl/oustringbuffer/test_oustringbuffer_tostring.cxx
@@ -40,7 +40,7 @@ private:
CPPUNIT_TEST_SUITE_REGISTRATION(test::oustringbuffer::ToString);
void test::oustringbuffer::ToString::testToString() {
- OUStringBuffer sb(OUString("test string"));
+ OUStringBuffer sb("test string");
OUString str = sb.toString();
CPPUNIT_ASSERT_EQUAL( OUString("test string"), str );
// returned OUString must be independent from sb
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 7a02ef58077a..504233a997a4 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -3200,9 +3200,9 @@ void ScInterpreter::ScInfo()
OUString aStr = GetString().getString();
ScCellKeywordTranslator::transKeyword(aStr, ScGlobal::GetLocale(), ocInfo);
if( aStr == "SYSTEM" )
- PushString( OUString( SC_INFO_OSVERSION ) );
+ PushString( SC_INFO_OSVERSION );
else if( aStr == "OSVERSION" )
- PushString( OUString( "Windows (32-bit) NT 5.01" ) );
+ PushString( "Windows (32-bit) NT 5.01" );
else if( aStr == "RELEASE" )
PushString( ::utl::Bootstrap::getBuildIdData( OUString() ) );
else if( aStr == "NUMFILE" )
diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx
index 6e3d4ed93362..74718130b7b4 100644
--- a/sc/source/filter/excel/excform.cxx
+++ b/sc/source/filter/excel/excform.cxx
@@ -195,7 +195,7 @@ ExcelToSc::~ExcelToSc()
std::unique_ptr<ScTokenArray> ExcelToSc::GetDummy()
{
- aPool.Store( OUString("Dummy()") );
+ aPool.Store( "Dummy()" );
aPool >> aStack;
return aPool.GetTokenArray( aStack.Get());
}
@@ -221,7 +221,7 @@ ConvErr ExcelToSc::Convert( std::unique_ptr<ScTokenArray>& pResult, XclImpStream
if( nFormulaLen == 0 )
{
- aPool.Store( OUString("-/-") );
+ aPool.Store( "-/-" );
aPool >> aStack;
pResult = aPool.GetTokenArray( aStack.Get());
return ConvErr::OK;
diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx
index 1aea200bd1c0..7965c1a55c02 100644
--- a/sc/source/filter/excel/excform8.cxx
+++ b/sc/source/filter/excel/excform8.cxx
@@ -149,7 +149,7 @@ ConvErr ExcelToSc8::Convert( std::unique_ptr<ScTokenArray>& rpTokArray, XclImpSt
if( nFormulaLen == 0 )
{
- aPool.Store( OUString( "-/-" ) );
+ aPool.Store( "-/-" );
aPool >> aStack;
rpTokArray = aPool.GetTokenArray( aStack.Get());
return ConvErr::OK;
@@ -1296,7 +1296,7 @@ void ExcelToSc8::ConvertExternName( std::unique_ptr<ScTokenArray>& rpArray, XclI
if (nFormulaLen == 0)
{
- aPool.Store(OUString("-/-"));
+ aPool.Store("-/-");
aPool >> aStack;
rpArray = aPool.GetTokenArray( aStack.Get());
return;
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 082b4e32c929..a1ddebd26de7 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2280,7 +2280,7 @@ void ScModule::SetAutoSpellProperty( bool bSet )
// loading the linguistic component
SvtLinguConfig aConfig;
- aConfig.SetProperty( OUString( LINGUPROP_AUTOSPELL ), uno::Any(bSet) );
+ aConfig.SetProperty( LINGUPROP_AUTOSPELL, uno::Any(bSet) );
}
bool ScModule::HasThesaurusLanguage( LanguageType nLang )
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 29e761897875..e812c68af6b1 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1173,7 +1173,7 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
vcl::Font SdStyleSheetPool::GetBulletFont()
{
- vcl::Font aBulletFont( OUString( "StarSymbol" ), Size(0, 1000) );
+ vcl::Font aBulletFont( "StarSymbol", Size(0, 1000) );
aBulletFont.SetCharSet(RTL_TEXTENCODING_UNICODE);
aBulletFont.SetWeight(WEIGHT_NORMAL);
aBulletFont.SetUnderline(LINESTYLE_NONE);
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index 436202bd67ce..ca3e362fcc19 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -633,7 +633,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
if (pConfiguration == nullptr || !pConfiguration->IsValid())
return;
- pConfiguration->GoToChild(OUString("Font"));
+ pConfiguration->GoToChild("Font");
pConfiguration->SetProperty("Size", Any(static_cast<sal_Int32>(nNewSize+0.5)));
pConfiguration->CommitChanges();
}
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx
index 9be3b86776e2..01b71c3e99cf 100644
--- a/sdext/source/presenter/PresenterScrollBar.cxx
+++ b/sdext/source/presenter/PresenterScrollBar.cxx
@@ -249,7 +249,7 @@ void PresenterScrollBar::SetCanvas (const Reference<css::rendering::XCanvas>& rx
try
{
mpBitmaps.reset(new PresenterBitmapContainer(
- OUString("PresenterScreenSettings/ScrollBar/Bitmaps"),
+ "PresenterScreenSettings/ScrollBar/Bitmaps",
std::shared_ptr<PresenterBitmapContainer>(),
mxComponentContext,
mxCanvas));
diff --git a/sdext/source/presenter/PresenterSlidePreview.cxx b/sdext/source/presenter/PresenterSlidePreview.cxx
index 1c8d813fa9b5..b81c42660b50 100644
--- a/sdext/source/presenter/PresenterSlidePreview.cxx
+++ b/sdext/source/presenter/PresenterSlidePreview.cxx
@@ -97,7 +97,7 @@ PresenterSlidePreview::PresenterSlidePreview (
rxContext),
UNO_QUERY);
mpBitmaps.reset(new PresenterBitmapContainer(
- OUString("PresenterScreenSettings/ScrollBar/Bitmaps"),
+ "PresenterScreenSettings/ScrollBar/Bitmaps",
std::shared_ptr<PresenterBitmapContainer>(),
rxContext,
mxCanvas));
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index 9a5adc481daa..a4ea38e65516 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -498,7 +498,7 @@ void PresenterWindowManager::StoreViewMode (const ViewMode eViewMode)
mxComponentContext,
"/org.openoffice.Office.PresenterScreen/",
PresenterConfigurationAccess::READ_WRITE);
- aConfiguration.GoToChild(OUString("Presenter"));
+ aConfiguration.GoToChild("Presenter");
Any aValue;
switch (eViewMode)
{
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index e7d31019e4b2..94cc07839585 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1046,7 +1046,7 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
const SfxUInt32Item* pUndoConflict = dynamic_cast< const SfxUInt32Item * >( pState );
if ( pUndoConflict && pUndoConflict->GetValue() > 0 )
{
- aBuffer.append(OUString("disabled"));
+ aBuffer.append("disabled");
}
else
{
@@ -1148,7 +1148,7 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
}
else
{
- aBuffer.append(OUString("disabled"));
+ aBuffer.append("disabled");
}
}
else if (aEvent.FeatureURL.Path == "Position")
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index a306a0d441c2..040080a3ba7c 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -318,9 +318,7 @@ const Mapping & IdlReflectionServiceImpl::getCpp2Uno()
MutexGuard aGuard( getMutexAccess() );
if (! _aCpp2Uno.is())
{
- _aCpp2Uno = Mapping(
- OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ),
- OUString( UNO_LB_UNO ) );
+ _aCpp2Uno = Mapping( CPPU_CURRENT_LANGUAGE_BINDING_NAME, UNO_LB_UNO );
OSL_ENSURE( _aCpp2Uno.is(), "### cannot get c++ to uno mapping!" );
if (! _aCpp2Uno.is())
{
@@ -340,9 +338,7 @@ const Mapping & IdlReflectionServiceImpl::getUno2Cpp()
MutexGuard aGuard( getMutexAccess() );
if (! _aUno2Cpp.is())
{
- _aUno2Cpp = Mapping(
- OUString( UNO_LB_UNO ),
- OUString( CPPU_CURRENT_LANGUAGE_BINDING_NAME ) );
+ _aUno2Cpp = Mapping( UNO_LB_UNO, CPPU_CURRENT_LANGUAGE_BINDING_NAME );
OSL_ENSURE( _aUno2Cpp.is(), "### cannot get uno to c++ mapping!" );
if (! _aUno2Cpp.is())
{
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 52ed415d7fbd..0fe2696c98c5 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -324,7 +324,7 @@ ChineseDictionaryDialog::ChineseDictionaryDialog(weld::Window* pParent)
SvtLinguConfig aLngCfg;
bool bValue;
- Any aAny( aLngCfg.GetProperty( OUString( UPN_IS_REVERSE_MAPPING ) ) );
+ Any aAny( aLngCfg.GetProperty( UPN_IS_REVERSE_MAPPING ) );
if( aAny >>= bValue )
m_xCB_Reverse->set_active( bValue );
@@ -637,7 +637,7 @@ short ChineseDictionaryDialog::run()
{
//save settings to configuration
SvtLinguConfig aLngCfg;
- aLngCfg.SetProperty( OUString( UPN_IS_REVERSE_MAPPING ), uno::Any(m_xCB_Reverse->get_active()) );
+ aLngCfg.SetProperty( UPN_IS_REVERSE_MAPPING, uno::Any(m_xCB_Reverse->get_active()) );
m_xCT_DictionaryToSimplified->save();
m_xCT_DictionaryToTraditional->save();
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
index 517570408f40..9bef507b73a9 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_translationdialog.cxx
@@ -40,14 +40,14 @@ ChineseTranslationDialog::ChineseTranslationDialog(weld::Window* pParent)
{
SvtLinguConfig aLngCfg;
bool bValue = false;
- Any aAny( aLngCfg.GetProperty( OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ) ) );
+ Any aAny( aLngCfg.GetProperty( UPN_IS_DIRECTION_TO_SIMPLIFIED ) );
aAny >>= bValue;
if( bValue )
m_xRB_To_Simplified->set_active(true);
else
m_xRB_To_Traditional->set_active(true);
- aAny = aLngCfg.GetProperty( OUString( UPN_IS_TRANSLATE_COMMON_TERMS ) );
+ aAny = aLngCfg.GetProperty( UPN_IS_TRANSLATE_COMMON_TERMS );
if( aAny >>= bValue )
m_xCB_Translate_Commonterms->set_active( bValue );
@@ -72,9 +72,9 @@ IMPL_LINK_NOARG(ChineseTranslationDialog, OkHdl, weld::Button&, void)
SvtLinguConfig aLngCfg;
Any aAny;
aAny <<= m_xRB_To_Simplified->get_active();
- aLngCfg.SetProperty( OUString( UPN_IS_DIRECTION_TO_SIMPLIFIED ), aAny );
+ aLngCfg.SetProperty( UPN_IS_DIRECTION_TO_SIMPLIFIED, aAny );
aAny <<= m_xCB_Translate_Commonterms->get_active();
- aLngCfg.SetProperty( OUString( UPN_IS_TRANSLATE_COMMON_TERMS ), aAny );
+ aLngCfg.SetProperty( UPN_IS_TRANSLATE_COMMON_TERMS, aAny );
m_xDialog->response(RET_OK);
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 21138677443b..d6795ead6620 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -2248,7 +2248,7 @@ void SwUiWriterTest::testTdf69282()
verticalSpace.SetLower(14);
rSourceMasterFormat.SetFormatAttr(verticalSpace);
//Changing the style and copying it to target
- source->ChgPageDesc(OUString("SourceStyle"), *sPageDesc);
+ source->ChgPageDesc("SourceStyle", *sPageDesc);
target->CopyPageDesc(*sPageDesc, *tPageDesc);
//Checking the set values on all Formats in target
SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
@@ -2309,7 +2309,7 @@ void SwUiWriterTest::testTdf69282WithMirror()
verticalSpace.SetLower(14);
rSourceMasterFormat.SetFormatAttr(verticalSpace);
//Changing the style and copying it to target
- source->ChgPageDesc(OUString("SourceStyle"), *sPageDesc);
+ source->ChgPageDesc("SourceStyle", *sPageDesc);
target->CopyPageDesc(*sPageDesc, *tPageDesc);
//Checking the set values on all Formats in target
SwFrameFormat& rTargetMasterFormat = tPageDesc->GetMaster();
diff --git a/sw/source/core/doc/DocumentTimerManager.cxx b/sw/source/core/doc/DocumentTimerManager.cxx
index 1ed1b556ad6a..266ee7386875 100644
--- a/sw/source/core/doc/DocumentTimerManager.cxx
+++ b/sw/source/core/doc/DocumentTimerManager.cxx
@@ -124,8 +124,7 @@ DocumentTimerManager::IdleJob DocumentTimerManager::GetNextIdleJob() const
{
bool bIsOnlineSpell = pShell->GetViewOptions()->IsOnlineSpell();
bool bIsAutoGrammar = false;
- SvtLinguConfig().GetProperty( OUString(
- UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
+ SvtLinguConfig().GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
if( bIsOnlineSpell && bIsAutoGrammar && m_rDoc.StartGrammarChecking( true ) )
return IdleJob::Grammar;
diff --git a/sw/source/core/swg/SwXMLTextBlocks1.cxx b/sw/source/core/swg/SwXMLTextBlocks1.cxx
index 1299cbc1c90e..0a064945be94 100644
--- a/sw/source/core/swg/SwXMLTextBlocks1.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks1.cxx
@@ -68,7 +68,7 @@ ErrCode SwXMLTextBlocks::GetDoc( sal_uInt16 nIdx )
try
{
xRoot = xBlkRoot->openStorageElement( aFolderName, embed::ElementModes::READ );
- xMedium = new SfxMedium( xRoot, GetBaseURL(), OUString( "writer8" ) );
+ xMedium = new SfxMedium( xRoot, GetBaseURL(), "writer8" );
SwReader aReader( *xMedium, aFolderName, m_xDoc.get() );
ReadXML->SetBlockMode( true );
aReader.Read( *ReadXML );
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 2dbd38230402..504424b70d8a 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -259,7 +259,7 @@ void RtfExport::WriteRevTab()
return;
// RTF always seems to use Unknown as the default first entry
- GetRedline(OUString("Unknown"));
+ GetRedline("Unknown");
for (SwRangeRedline* pRedl : m_pDoc->getIDocumentRedlineAccess().GetRedlineTable())
{
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 7929b5a4efd1..9a0b995679a7 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -151,17 +151,17 @@ std::unique_ptr<SfxItemSet> SwModule::CreateItemSet( sal_uInt16 nId )
using namespace ::com::sun::star::i18n::ScriptType;
- Any aLang = aLinguCfg.GetProperty(OUString("DefaultLocale"));
+ Any aLang = aLinguCfg.GetProperty("DefaultLocale");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), LATIN);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_LANGUAGE));
- aLang = aLinguCfg.GetProperty(OUString("DefaultLocale_CJK"));
+ aLang = aLinguCfg.GetProperty("DefaultLocale_CJK");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), ASIAN);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CJK_LANGUAGE));
- aLang = aLinguCfg.GetProperty(OUString("DefaultLocale_CTL"));
+ aLang = aLinguCfg.GetProperty("DefaultLocale_CTL");
aLang >>= aLocale;
nLang = MsLangId::resolveSystemLanguageByScriptType(LanguageTag::convertToLanguageType( aLocale, false), COMPLEX);
pRet->Put(SvxLanguageItem(nLang, SID_ATTR_CHAR_CTL_LANGUAGE));
diff --git a/tools/qa/cppunit/test_config.cxx b/tools/qa/cppunit/test_config.cxx
index eeb1391ab6b8..8002ff99dff7 100644
--- a/tools/qa/cppunit/test_config.cxx
+++ b/tools/qa/cppunit/test_config.cxx
@@ -107,14 +107,14 @@ public:
{
Config aConfig(maConfigFile);
aConfig.SetGroup("TestGroup");
- CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey")));
- CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("nonexistenttestkey")));
+ CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey"));
+ CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("nonexistenttestkey"));
CPPUNIT_ASSERT_EQUAL(OString("notexists"),
aConfig.ReadKey("nonexistenttestkey", "notexists"));
aConfig.SetGroup("TestGroup2");
- CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey2")));
- CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("nonexistenttestkey")));
+ CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey2"));
+ CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("nonexistenttestkey"));
CPPUNIT_ASSERT_EQUAL(OString("notexists"),
aConfig.ReadKey("nonexistenttestkey", "notexists"));
}
@@ -138,14 +138,14 @@ public:
sal_uInt16 nExpected = 2;
sal_uInt16 nActual = aConfig.GetKeyCount();
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
- CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new")));
+ CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new"));
aConfig.DeleteKey("testkey_new");
nExpected = 1;
nActual = aConfig.GetKeyCount();
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
- CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("testkey_new")));
+ CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("testkey_new"));
aConfig.SetGroup("TestGroup2");
aConfig.WriteKey("testkey_new", "testvalue");
@@ -153,14 +153,14 @@ public:
nActual = aConfig.GetKeyCount();
nExpected = 2;
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
- CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new")));
+ CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new"));
aConfig.DeleteKey("testkey_new");
nActual = aConfig.GetKeyCount();
nExpected = 1;
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
- CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey(OString("testkey_new")));
+ CPPUNIT_ASSERT_EQUAL(OString(), aConfig.ReadKey("testkey_new"));
aConfig.SetGroup("TestGroup3");
aConfig.WriteKey("testkey_new_group3", "testvalue");
@@ -168,7 +168,7 @@ public:
nActual = aConfig.GetKeyCount();
nExpected = 1;
CPPUNIT_ASSERT_EQUAL(nExpected, nActual);
- CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey(OString("testkey_new_group3")));
+ CPPUNIT_ASSERT_EQUAL(OString("testvalue"), aConfig.ReadKey("testkey_new_group3"));
nExpected = 3;
CPPUNIT_ASSERT_EQUAL(nExpected, aConfig.GetGroupCount());
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index bd6c25fa66ee..91bdedf699ce 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2302,8 +2302,7 @@ bool INetURLObject::setPassword(OUString const & rThePassword,
}
else if (m_aHost.isPresent())
{
- m_aAbsURIRef.insert(m_aHost.getBegin(),
- OUString( ":@" ));
+ m_aAbsURIRef.insert(m_aHost.getBegin(), ":@" );
m_aUser.set(m_aAbsURIRef, OUString(), m_aHost.getBegin());
nDelta
= m_aAuth.set(m_aAbsURIRef, aNewAuth, m_aHost.getBegin() + 1) + 2;
diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx
index 0bc0ad3dbcbe..03c24eba8217 100644
--- a/vcl/headless/svpprn.cxx
+++ b/vcl/headless/svpprn.cxx
@@ -94,7 +94,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetPaperBin( 0xffff );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( OUString( "InputSlot" ) );
+ pKey = rData.m_pParser->getKey( "InputSlot" );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
@@ -116,7 +116,7 @@ static void copyJobDataToJobSetup( ImplJobSetup* pJobSetup, JobData& rData )
pJobSetup->SetDuplexMode( DuplexMode::Unknown );
if( rData.m_pParser )
- pKey = rData.m_pParser->getKey( OUString( "Duplex" ) );
+ pKey = rData.m_pParser->getKey( "Duplex" );
if( pKey )
pValue = rData.m_aContext.getValue( pKey );
if( pKey && pValue )
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index fccce19ad1f8..4f6e483a0958 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2712,7 +2712,7 @@ namespace
if ( aNode.isValid() )
{
bool bTmp = bool();
- css::uno::Any aValue = aNode.getNodeValue( OUString("UIMirroring") );
+ css::uno::Any aValue = aNode.getNodeValue( "UIMirroring" );
if( aValue >>= bTmp )
{
// found true or false; if it was nil, nothing is changed
diff --git a/vcl/source/filter/GraphicNativeTransform.cxx b/vcl/source/filter/GraphicNativeTransform.cxx
index 9d1941f8fae6..85388fe94b91 100644
--- a/vcl/source/filter/GraphicNativeTransform.cxx
+++ b/vcl/source/filter/GraphicNativeTransform.cxx
@@ -111,7 +111,7 @@ bool GraphicNativeTransform::rotateGeneric(sal_uInt16 aRotation, const OUString&
aStream.Seek( STREAM_SEEK_TO_BEGIN );
Graphic aGraphic;
- rFilter.ImportGraphic( aGraphic, OUString("import"), aStream );
+ rFilter.ImportGraphic( aGraphic, "import", aStream );
mrGraphic = aGraphic;
return true;
@@ -160,7 +160,7 @@ void GraphicNativeTransform::rotateJPEG(sal_uInt16 aRotation)
Graphic aGraphic;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- rFilter.ImportGraphic( aGraphic, OUString("import"), aTargetStream );
+ rFilter.ImportGraphic( aGraphic, "import", aTargetStream );
mrGraphic = aGraphic;
}
}
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 603ec9056212..78715752b711 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -299,7 +299,7 @@ void Printer::PrintJob(const std::shared_ptr<PrinterController>& i_xController,
const JobSetup& i_rInitSetup)
{
bool bSynchronous = false;
- css::beans::PropertyValue* pVal = i_xController->getValue( OUString( "Wait" ) );
+ css::beans::PropertyValue* pVal = i_xController->getValue( "Wait" );
if( pVal )
pVal->Value >>= bSynchronous;
@@ -355,12 +355,12 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
// "Pages" attribute from API is now equivalent to "PageRange"
// AND "PrintContent" = 1 except calc where it is "PrintRange" = 1
// Argh ! That sure needs cleaning up
- css::beans::PropertyValue* pContentVal = xController->getValue(OUString("PrintRange"));
+ css::beans::PropertyValue* pContentVal = xController->getValue("PrintRange");
if( ! pContentVal )
- pContentVal = xController->getValue(OUString("PrintContent"));
+ pContentVal = xController->getValue("PrintContent");
// case 1: UNO API has set "Pages"
- css::beans::PropertyValue* pPagesVal = xController->getValue(OUString("Pages"));
+ css::beans::PropertyValue* pPagesVal = xController->getValue("Pages");
if( pPagesVal )
{
OUString aPagesVal;
@@ -386,7 +386,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
if( nContent == 0 )
{
// do not overwrite PageRange if it is already set
- css::beans::PropertyValue* pRangeVal = xController->getValue(OUString("PageRange"));
+ css::beans::PropertyValue* pRangeVal = xController->getValue("PageRange");
OUString aRange;
if( pRangeVal )
pRangeVal->Value >>= aRange;
@@ -409,7 +409,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
}
}
- css::beans::PropertyValue* pReverseVal = xController->getValue(OUString("PrintReverse"));
+ css::beans::PropertyValue* pReverseVal = xController->getValue("PrintReverse");
if( pReverseVal )
{
bool bReverse = false;
@@ -417,7 +417,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
xController->setReversePrint( bReverse );
}
- css::beans::PropertyValue* pPapersizeFromSetupVal = xController->getValue(OUString("PapersizeFromSetup"));
+ css::beans::PropertyValue* pPapersizeFromSetupVal = xController->getValue("PapersizeFromSetup");
if( pPapersizeFromSetupVal )
{
bool bPapersizeFromSetup = false;
@@ -454,7 +454,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
aMPS.bDrawBorder = xController->getBoolProperty( "NUpDrawBorder", aMPS.bDrawBorder );
aMPS.nOrder = static_cast<NupOrderType>(xController->getIntProperty( "NUpSubPageOrder", static_cast<sal_Int32>(aMPS.nOrder) ));
aMPS.aPaperSize = xController->getPrinter()->PixelToLogic( xController->getPrinter()->GetPaperSizePixel(), MapMode( MapUnit::Map100thMM ) );
- css::beans::PropertyValue* pPgSizeVal = xController->getValue( OUString( "NUpPaperSize" ) );
+ css::beans::PropertyValue* pPgSizeVal = xController->getValue( "NUpPaperSize" );
css::awt::Size aSizeVal;
if( pPgSizeVal && (pPgSizeVal->Value >>= aSizeVal) )
{
@@ -524,7 +524,7 @@ bool Printer::PreparePrintJob(std::shared_ptr<PrinterController> xController,
bool Printer::ExecutePrintJob(const std::shared_ptr<PrinterController>& xController)
{
OUString aJobName;
- css::beans::PropertyValue* pJobNameVal = xController->getValue( OUString( "JobName" ) );
+ css::beans::PropertyValue* pJobNameVal = xController->getValue( "JobName" );
if( pJobNameVal )
pJobNameVal->Value >>= aJobName;
@@ -585,13 +585,13 @@ bool Printer::StartJob( const OUString& i_rJobName, std::shared_ptr<vcl::Printer
return false;
bool bSinglePrintJobs = false;
- css::beans::PropertyValue* pSingleValue = i_xController->getValue(OUString("PrintCollateAsSingleJobs"));
+ css::beans::PropertyValue* pSingleValue = i_xController->getValue("PrintCollateAsSingleJobs");
if( pSingleValue )
{
pSingleValue->Value >>= bSinglePrintJobs;
}
- css::beans::PropertyValue* pFileValue = i_xController->getValue(OUString("LocalFileName"));
+ css::beans::PropertyValue* pFileValue = i_xController->getValue("LocalFileName");
if( pFileValue )
{
OUString aFile;
@@ -1436,7 +1436,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
aResult[nCur++] = rPropVal;
}
// append IsFirstPage
- if( aMergeSet.find( OUString( "IsFirstPage" ) ) == aMergeSet.end() )
+ if( aMergeSet.find( "IsFirstPage" ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsFirstPage";
@@ -1444,7 +1444,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
aResult[nCur++] = aVal;
}
// append IsLastPage
- if( aMergeSet.find( OUString( "IsLastPage" ) ) == aMergeSet.end() )
+ if( aMergeSet.find( "IsLastPage" ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsLastPage";
@@ -1452,7 +1452,7 @@ css::uno::Sequence< css::beans::PropertyValue > PrinterController::getJobPropert
aResult[nCur++] = aVal;
}
// append IsPrinter
- if( aMergeSet.find( OUString( "IsPrinter" ) ) == aMergeSet.end() )
+ if( aMergeSet.find( "IsPrinter" ) == aMergeSet.end() )
{
css::beans::PropertyValue aVal;
aVal.Name = "IsPrinter";
@@ -1683,12 +1683,12 @@ void PrinterController::createProgressDialog()
if (!mpImplData->mxProgress)
{
bool bShow = true;
- css::beans::PropertyValue* pMonitor = getValue( OUString( "MonitorVisible" ) );
+ css::beans::PropertyValue* pMonitor = getValue( "MonitorVisible" );
if( pMonitor )
pMonitor->Value >>= bShow;
else
{
- const css::beans::PropertyValue* pVal = getValue( OUString( "IsApi" ) );
+ const css::beans::PropertyValue* pVal = getValue( "IsApi" );
if( pVal )
{
bool bApi = false;
@@ -1735,17 +1735,17 @@ void PrinterController::pushPropertiesToPrinter()
{
sal_Int32 nCopyCount = 1;
// set copycount and collate
- const css::beans::PropertyValue* pVal = getValue( OUString( "CopyCount" ) );
+ const css::beans::PropertyValue* pVal = getValue( "CopyCount" );
if( pVal )
pVal->Value >>= nCopyCount;
bool bCollate = false;
- pVal = getValue( OUString( "Collate" ) );
+ pVal = getValue( "Collate" );
if( pVal )
pVal->Value >>= bCollate;
mpImplData->mxPrinter->SetCopyCount( static_cast<sal_uInt16>(nCopyCount), bCollate );
// duplex mode
- pVal = getValue( OUString( "DuplexMode" ) );
+ pVal = getValue( "DuplexMode" );
if( pVal )
{
sal_Int16 nDuplex = css::view::DuplexMode::UNKNOWN;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 2a6d7286a03d..e2271167a24a 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -1922,7 +1922,7 @@ void SvTreeListBox::KeyInput( const KeyEvent& rKEvt )
void SvTreeListBox::RequestingChildren( SvTreeListEntry* pParent )
{
if( !pParent->HasChildren() )
- InsertEntry( OUString("<dummy>"), pParent );
+ InsertEntry( "<dummy>", pParent );
}
void SvTreeListBox::GetFocus()
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 9e1e0748d5ef..9cda9210b38d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -800,7 +800,7 @@ namespace
bool extractDrawValue(VclBuilder::stringmap& rMap)
{
bool bDrawValue = true;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("draw_value"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("draw_value");
if (aFind != rMap.end())
{
bDrawValue = toBool(aFind->second);
@@ -812,7 +812,7 @@ namespace
OUString extractPopupMenu(VclBuilder::stringmap& rMap)
{
OUString sRet;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("popup"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("popup");
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -824,7 +824,7 @@ namespace
OUString extractValuePos(VclBuilder::stringmap& rMap)
{
OUString sRet("top");
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("value_pos"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("value_pos");
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -836,7 +836,7 @@ namespace
OUString extractTypeHint(VclBuilder::stringmap &rMap)
{
OUString sRet("normal");
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("type-hint"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("type-hint");
if (aFind != rMap.end())
{
sRet = aFind->second;
@@ -848,7 +848,7 @@ namespace
bool extractResizable(VclBuilder::stringmap &rMap)
{
bool bResizable = true;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("resizable"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("resizable");
if (aFind != rMap.end())
{
bResizable = toBool(aFind->second);
@@ -861,7 +861,7 @@ namespace
bool extractModal(VclBuilder::stringmap &rMap)
{
bool bModal = false;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("modal"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("modal");
if (aFind != rMap.end())
{
bModal = toBool(aFind->second);
@@ -874,7 +874,7 @@ namespace
bool extractDecorated(VclBuilder::stringmap &rMap)
{
bool bDecorated = true;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("decorated"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("decorated");
if (aFind != rMap.end())
{
bDecorated = toBool(aFind->second);
@@ -886,7 +886,7 @@ namespace
bool extractCloseable(VclBuilder::stringmap &rMap)
{
bool bCloseable = true;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("deletable"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("deletable");
if (aFind != rMap.end())
{
bCloseable = toBool(aFind->second);
@@ -898,7 +898,7 @@ namespace
bool extractEntry(VclBuilder::stringmap &rMap)
{
bool bHasEntry = false;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("has-entry"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("has-entry");
if (aFind != rMap.end())
{
bHasEntry = toBool(aFind->second);
@@ -910,7 +910,7 @@ namespace
bool extractOrientation(VclBuilder::stringmap &rMap)
{
bool bVertical = false;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("orientation"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("orientation");
if (aFind != rMap.end())
{
bVertical = aFind->second.equalsIgnoreAsciiCase("vertical");
@@ -922,7 +922,7 @@ namespace
bool extractInconsistent(VclBuilder::stringmap &rMap)
{
bool bInconsistent = false;
- VclBuilder::stringmap::iterator aFind = rMap.find(OString("inconsistent"));
+ VclBuilder::stringmap::iterator aFind = rMap.find("inconsistent");
if (aFind != rMap.end())
{
bInconsistent = toBool(aFind->second);
@@ -1072,7 +1072,7 @@ namespace
sWidthRequest = aFind->second;
rMap.erase(aFind);
}
- aFind = rMap.find(OString("height-request"));
+ aFind = rMap.find("height-request");
if (aFind != rMap.end())
{
sHeightRequest = aFind->second;
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index cd0c17bdc624..9f5633a7d658 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -237,7 +237,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) c
"org.openoffice.Office.Common/Accessibility" ); // note: case sensitive !
if ( aNode.isValid() )
{
- css::uno::Any aValue = aNode.getNodeValue( OUString("AutoDetectSystemHC") );
+ css::uno::Any aValue = aNode.getNodeValue( "AutoDetectSystemHC" );
bool bTmp = false;
if( aValue >>= bTmp )
bAutoHCMode = bTmp;
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 3d7b0de98ea9..2ae429134a28 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1734,7 +1734,7 @@ bool ToolBox::AlwaysLocked()
{
// feature enabled ?
bool bStatesEnabled = bool();
- css::uno::Any aValue = aNode.getNodeValue( OUString("StatesEnabled") );
+ css::uno::Any aValue = aNode.getNodeValue( "StatesEnabled" );
if( aValue >>= bStatesEnabled )
{
if( bStatesEnabled )
@@ -1745,7 +1745,7 @@ bool ToolBox::AlwaysLocked()
"/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ); // note: case sensitive !
bool bLocked = bool();
- css::uno::Any aValue2 = aNode2.getNodeValue( OUString("Locked") );
+ css::uno::Any aValue2 = aNode2.getNodeValue( "Locked" );
if( aValue2 >>= bLocked )
nAlwaysLocked = bLocked ? 1 : 0;
}
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index f79e174225bf..4b00e8924b47 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -789,7 +789,7 @@ void PrinterJob::writeJobPatch( osl::File* pFile, const JobData& rJobData )
const PPDKey* pKey = nullptr;
if( rJobData.m_pParser )
- pKey = rJobData.m_pParser->getKey( OUString( "JobPatchFile" ) );
+ pKey = rJobData.m_pParser->getKey( "JobPatchFile" );
if( ! pKey )
return;
diff --git a/vcl/unx/generic/print/prtsetup.cxx b/vcl/unx/generic/print/prtsetup.cxx
index 6a38db31b1d9..d3c565846c17 100644
--- a/vcl/unx/generic/print/prtsetup.cxx
+++ b/vcl/unx/generic/print/prtsetup.cxx
@@ -178,7 +178,7 @@ void RTSPaperPage::update()
// duplex
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString( "Duplex" ) )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( "Duplex" )) )
{
m_pParent->insertAllPPDValues( *m_xDuplexBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -190,7 +190,7 @@ void RTSPaperPage::update()
// paper
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString( "PageSize" ) )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( "PageSize" )) )
{
m_pParent->insertAllPPDValues( *m_xPaperBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -202,7 +202,7 @@ void RTSPaperPage::update()
// input slots
if( m_pParent->m_aJobData.m_pParser &&
- (pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString("InputSlot") )) )
+ (pKey = m_pParent->m_aJobData.m_pParser->getKey( "InputSlot" )) )
{
m_pParent->insertAllPPDValues( *m_xSlotBox, m_pParent->m_aJobData.m_pParser, pKey );
}
@@ -236,17 +236,17 @@ IMPL_LINK( RTSPaperPage, SelectHdl, weld::ComboBox&, rBox, void )
if( &rBox == m_xPaperBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString( "PageSize" ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( "PageSize" );
}
else if( &rBox == m_xDuplexBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString( "Duplex" ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( "Duplex" );
}
else if( &rBox == m_xSlotBox.get() )
{
if( m_pParent->m_aJobData.m_pParser )
- pKey = m_pParent->m_aJobData.m_pParser->getKey( OUString( "InputSlot" ) );
+ pKey = m_pParent->m_aJobData.m_pParser->getKey( "InputSlot" );
}
else if( &rBox == m_xOrientBox.get() )
{
diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx
index 02d10cf48077..11f1b931ecaf 100644
--- a/vcl/unx/generic/printer/jobdata.cxx
+++ b/vcl/unx/generic/printer/jobdata.cxx
@@ -66,17 +66,17 @@ void JobData::setCollate( bool bCollate )
const PPDParser* pParser = m_aContext.getParser();
if( pParser )
{
- const PPDKey* pKey = pParser->getKey( OUString( "Collate" ) );
+ const PPDKey* pKey = pParser->getKey( "Collate" );
if( pKey )
{
const PPDValue* pVal = nullptr;
if( bCollate )
- pVal = pKey->getValue( OUString( "True" ) );
+ pVal = pKey->getValue( "True" );
else
{
- pVal = pKey->getValue( OUString( "False" ) );
+ pVal = pKey->getValue( "False" );
if( ! pVal )
- pVal = pKey->getValue( OUString( "None" ) );
+ pVal = pKey->getValue( "None" );
}
m_aContext.setValue( pKey, pVal );
}
@@ -89,7 +89,7 @@ void JobData::setPaper( int i_nWidth, int i_nHeight )
{
OUString aPaper( m_pParser->matchPaper( i_nWidth, i_nHeight ) );
- const PPDKey* pKey = m_pParser->getKey( OUString( "PageSize" ) );
+ const PPDKey* pKey = m_pParser->getKey( "PageSize" );
const PPDValue* pValue = pKey ? pKey->getValueCaseInsensitive( aPaper ) : nullptr;
if (pKey && pValue)
@@ -101,7 +101,7 @@ void JobData::setPaperBin( int i_nPaperBin )
{
if( m_pParser )
{
- const PPDKey* pKey = m_pParser->getKey( OUString( "InputSlot" ) );
+ const PPDKey* pKey = m_pParser->getKey( "InputSlot" );
const PPDValue* pValue = pKey ? pKey->getValue( i_nPaperBin ) : nullptr;
if (pKey && pValue)
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index d05455e47d14..4fc3bc79ac61 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -604,7 +604,7 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
// fill in shortcuts
const PPDKey* pKey;
- pKey = getKey( OUString( "PageSize" ) );
+ pKey = getKey( "PageSize" );
if ( pKey ) {
std::unique_ptr<PPDKey> pImageableAreas(new PPDKey("ImageableArea"));
@@ -644,7 +644,7 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
insertKey(std::move(pPaperDimensions));
}
- m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
+ m_pImageableAreas = getKey( "ImageableArea" );
const PPDValue* pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
@@ -655,7 +655,7 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
- m_pPaperDimensions = getKey( OUString( "PaperDimension" ) );
+ m_pPaperDimensions = getKey( "PaperDimension" );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
if (m_pPaperDimensions == nullptr) {
@@ -665,7 +665,7 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- auto pResolutions = getKey( OUString( "Resolution" ) );
+ auto pResolutions = getKey( "Resolution" );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
if (pResolutions == nullptr) {
@@ -673,19 +673,19 @@ PPDParser::PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys)
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- auto pInputSlots = getKey( OUString( "InputSlot" ) );
+ auto pInputSlots = getKey( "InputSlot" );
if( pInputSlots )
m_pDefaultInputSlot = pInputSlots->getDefaultValue();
SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in " << m_aFile);
- auto pFontList = getKey( OUString( "Font" ) );
+ auto pFontList = getKey( "Font" );
if (pFontList == nullptr) {
SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
}
// fill in direct values
- if( (pKey = getKey( OUString( "print-color-mode" ) )) )
+ if( (pKey = getKey( "print-color-mode" )) )
m_bColorDevice = pKey->countValues() > 1;
}
@@ -810,7 +810,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
// fill in shortcuts
const PPDKey* pKey;
- m_pImageableAreas = getKey( OUString( "ImageableArea" ) );
+ m_pImageableAreas = getKey( "ImageableArea" );
const PPDValue * pDefaultImageableArea = nullptr;
if( m_pImageableAreas )
pDefaultImageableArea = m_pImageableAreas->getDefaultValue();
@@ -821,7 +821,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
SAL_WARN( "vcl.unx.print", "no DefaultImageableArea in " << m_aFile);
}
- m_pPaperDimensions = getKey( OUString( "PaperDimension" ) );
+ m_pPaperDimensions = getKey( "PaperDimension" );
if( m_pPaperDimensions )
m_pDefaultPaperDimension = m_pPaperDimensions->getDefaultValue();
if (m_pPaperDimensions == nullptr) {
@@ -831,7 +831,7 @@ PPDParser::PPDParser( const OUString& rFile ) :
SAL_WARN( "vcl.unx.print", "no DefaultPaperDimensions in " << m_aFile);
}
- auto pResolutions = getKey( OUString( "Resolution" ) );
+ auto pResolutions = getKey( "Resolution" );
if( pResolutions )
m_pDefaultResolution = pResolutions->getDefaultValue();
if (pResolutions == nullptr) {
@@ -839,30 +839,30 @@ PPDParser::PPDParser( const OUString& rFile ) :
}
SAL_INFO_IF(!m_pDefaultResolution, "vcl.unx.print", "no DefaultResolution in " + m_aFile);
- auto pInputSlots = getKey( OUString( "InputSlot" ) );
+ auto pInputSlots = getKey( "InputSlot" );
if( pInputSlots )
m_pDefaultInputSlot = pInputSlots->getDefaultValue();
SAL_INFO_IF(!pInputSlots, "vcl.unx.print", "no InputSlot in " << m_aFile);
SAL_INFO_IF(!m_pDefaultInputSlot, "vcl.unx.print", "no DefaultInputSlot in " << m_aFile);
- auto pFontList = getKey( OUString( "Font" ) );
+ auto pFontList = getKey( "Font" );
if (pFontList == nullptr) {
SAL_WARN( "vcl.unx.print", "no Font in " << m_aFile);
}
// fill in direct values
- if ((pKey = getKey(OUString("ColorDevice"))))
+ if ((pKey = getKey("ColorDevice")))
{
if (const PPDValue* pValue = pKey->getValue(0))
m_bColorDevice = pValue->m_aValue.startsWithIgnoreAsciiCase("true");
}
- if ((pKey = getKey(OUString("LanguageLevel"))))
+ if ((pKey = getKey("LanguageLevel")))
{
if (const PPDValue* pValue = pKey->getValue(0))
m_nLanguageLevel = pValue->m_aValue.toInt32();
}
- if ((pKey = getKey(OUString("TTRasterizer"))))
+ if ((pKey = getKey("TTRasterizer")))
{
if (const PPDValue* pValue = pKey->getValue(0))
m_bType42Capable = pValue->m_aValue.equalsIgnoreAsciiCase( "Type42" );
@@ -1757,9 +1757,9 @@ bool PPDContext::resetValue( const PPDKey* pKey, bool bDefaultable )
if( ! pKey || ! m_pParser || ! m_pParser->hasKey( pKey ) )
return false;
- const PPDValue* pResetValue = pKey->getValue( OUString( "None" ) );
+ const PPDValue* pResetValue = pKey->getValue( "None" );
if( ! pResetValue )
- pResetValue = pKey->getValue( OUString( "False" ) );
+ pResetValue = pKey->getValue( "False" );
if( ! pResetValue && bDefaultable )
pResetValue = pKey->getDefaultValue();
@@ -1938,7 +1938,7 @@ int PPDContext::getRenderResolution() const
if( m_pParser )
{
int nDPIx = 300, nDPIy = 300;
- const PPDKey* pKey = m_pParser->getKey( OUString( "Resolution" ) );
+ const PPDKey* pKey = m_pParser->getKey( "Resolution" );
if( pKey )
{
const PPDValue* pValue = getValue( pKey );
@@ -1963,7 +1963,7 @@ void PPDContext::getPageSize( OUString& rPaper, int& rWidth, int& rHeight ) cons
rHeight = 842;
if( m_pParser )
{
- const PPDKey* pKey = m_pParser->getKey( OUString( "PageSize" ) );
+ const PPDKey* pKey = m_pParser->getKey( "PageSize" );
if( pKey )
{
const PPDValue* pValue = getValue( pKey );
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 28ba5eee2e7b..f70141c9e16c 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -501,8 +501,8 @@ void PrinterInfoManager::initialize()
{
PrinterInfo aDefaultInfo( getPrinterInfo( m_aDefaultPrinter ) );
- const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( OUString( "PageSize" ) );
- const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( OUString( "PageSize" ) );
+ const PPDKey* pDefKey = aDefaultInfo.m_pParser->getKey( "PageSize" );
+ const PPDKey* pMergeKey = aMergeInfo.m_pParser->getKey( "PageSize" );
const PPDValue* pDefValue = aDefaultInfo.m_aContext.getValue( pDefKey );
const PPDValue* pMergeValue = pMergeKey ? pMergeKey->getValue( pDefValue->m_aOption ) : nullptr;
if( pMergeKey && pMergeValue )
@@ -603,7 +603,7 @@ void PrinterInfoManager::setDefaultPaper( PPDContext& rContext ) const
if( ! rContext.getParser() )
return;
- const PPDKey* pPageSizeKey = rContext.getParser()->getKey( OUString( "PageSize" ) );
+ const PPDKey* pPageSizeKey = rContext.getParser()->getKey( "PageSize" );
if( ! pPageSizeKey )
return;
diff --git a/writerfilter/source/rtftok/rtfdispatchdestination.cxx b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
index fa93abb624b3..71bec66ba057 100644
--- a/writerfilter/source/rtftok/rtfdispatchdestination.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchdestination.cxx
@@ -107,7 +107,7 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
Strm().Seek(nPos);
// Form data should be handled only for form fields if any
- if (aBuf.toString().indexOf(OString("FORM")) != -1)
+ if (aBuf.toString().indexOf("FORM") != -1)
m_bFormField = true;
singleChar(cFieldStart);
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 100ada1d3ec7..c621360c2fdf 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1297,9 +1297,9 @@ void SvXMLNumFmtElementContext::EndElement()
rParent.AddNumber( aNumInfo ); // simple number
if ( aNumInfo.bExpSign )
- rParent.AddToCode( OUString("E+") );
+ rParent.AddToCode( "E+" );
else
- rParent.AddToCode( OUString("E") );
+ rParent.AddToCode( "E" );
for (sal_Int32 i=0; i<aNumInfo.nExpDigits; i++)
{
rParent.AddToCode( '0' );
More information about the Libreoffice-commits
mailing list