diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-29 11:18:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-04-30 08:43:51 +0200 |
commit | dd8d5e5795358d732a9f7a8af7c35f662321e332 (patch) | |
tree | 9983c2a5f0bc3f2c29133aa57e4ceb510eb68a11 /vcl | |
parent | 22f2cf3ccc6d0c9ba2c2860735e789d6b3a25f72 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/headless/svpprn.cxx | 4 | ||||
-rw-r--r-- | vcl/source/app/settings.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/GraphicNativeTransform.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 38 | ||||
-rw-r--r-- | vcl/source/treelist/treelistbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 24 | ||||
-rw-r--r-- | vcl/source/window/settings.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/toolbox2.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/print/printerjob.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/print/prtsetup.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/printer/jobdata.cxx | 12 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 38 | ||||
-rw-r--r-- | vcl/unx/generic/printer/printerinfomanager.cxx | 6 |
13 files changed, 75 insertions, 75 deletions
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; |