diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx index d8bc37fdef1b..4958bf62d8a2 100644 --- a/connectivity/source/commontools/FValue.cxx +++ b/connectivity/source/commontools/FValue.cxx @@ -1077,14 +1077,12 @@ bool ORowSetValue::getBool() const case DataType::LONGVARCHAR: { const OUString sValue(m_aValue.m_pString); - const static OUString s_sTrue("true"); - const static OUString s_sFalse("false"); - if ( sValue.equalsIgnoreAsciiCase(s_sTrue) || (sValue == "1") ) + if ( sValue.equalsIgnoreAsciiCase("true") || (sValue == "1") ) { bRet = true; break; } - else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) || (sValue == "0") ) + else if ( sValue.equalsIgnoreAsciiCase("false") || (sValue == "0") ) { bRet = false; break; diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index d6f58bc0970f..efe0273e66b9 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -1000,8 +1000,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& if ( aReportEngine.isValid() ) { OUString sRet; - const static OUString s_sService("ServiceName"); - aReportEngine.getNodeValue(s_sService) >>= sRet; + aReportEngine.getNodeValue("ServiceName") >>= sRet; return sRet; } } diff --git a/connectivity/source/commontools/parameters.cxx b/connectivity/source/commontools/parameters.cxx index f52bd85878e6..1d0bc62924a6 100644 --- a/connectivity/source/commontools/parameters.cxx +++ b/connectivity/source/commontools/parameters.cxx @@ -381,7 +381,6 @@ namespace dbtools // did we find links where the detail field refers to a detail column (instead of a parameter name)? if ( !aAdditionalFilterComponents.empty() ) { - const static OUString s_sAnd( " AND " ); // build a conjunction of all the filter components OUStringBuffer sAdditionalFilter; for ( ::std::vector< OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin(); @@ -390,7 +389,7 @@ namespace dbtools ) { if ( !sAdditionalFilter.isEmpty() ) - sAdditionalFilter.append(s_sAnd); + sAdditionalFilter.append(" AND "); sAdditionalFilter.appendAscii("( ",((sal_Int32)(sizeof("( ")-1))); sAdditionalFilter.append(*aComponent); diff --git a/filter/source/msfilter/msvbahelper.cxx b/filter/source/msfilter/msvbahelper.cxx index 5bc0ba5c73db..4e29778d8dc4 100644 --- a/filter/source/msfilter/msvbahelper.cxx +++ b/filter/source/msfilter/msvbahelper.cxx @@ -104,11 +104,9 @@ SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath ) OUString aName = xModel->getURL() ; if (aName.isEmpty()) { - - const static OUString sTitle( "Title" ); uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); uno::Reference< beans::XPropertySet > xProps( xFrame, uno::UNO_QUERY_THROW ); - xProps->getPropertyValue(sTitle) >>= aName; + xProps->getPropertyValue("Title") >>= aName; sal_Int32 pos = 0; aName = aName.getToken(0,'-',pos); aName = aName.trim(); diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 2f57ab159259..47e08916bce7 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -309,8 +309,7 @@ public: // XDefaultMethod OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException) { - const static OUString sName( "Item" ); - return sName; + return "Item"; } // XEnumerationAccess virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) = 0; diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index 5550f6c01925..ff433b8aa72b 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -248,8 +248,7 @@ ScVbaWorkbooks::isTextFile( const OUString& sType ) // b) a csv file // c) unknown // returning true basically means treat this like a csv file - const static OUString txtType("generic_Text"); - return sType.equals( txtType ) || sType.isEmpty(); + return sType.equals( "generic_Text" ) || sType.isEmpty(); } bool diff --git a/svtools/source/misc/bindablecontrolhelper.cxx b/svtools/source/misc/bindablecontrolhelper.cxx index bc54fb6d1e83..ab22b2b50cb4 100644 --- a/svtools/source/misc/bindablecontrolhelper.cxx +++ b/svtools/source/misc/bindablecontrolhelper.cxx @@ -41,12 +41,11 @@ using namespace ::com::sun::star; bool lcl_isNamedRange( const OUString& sAddress, const uno::Reference< frame::XModel >& xModel, table::CellRangeAddress& aAddress ) { bool bRes = false; - const static OUString sNamedRanges("NamedRanges"); uno::Reference< sheet::XCellRangeReferrer > xReferrer; try { uno::Reference< beans::XPropertySet > xPropSet( xModel, uno::UNO_QUERY_THROW ); - uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( "NamedRanges" ), uno::UNO_QUERY_THROW ); xReferrer.set ( xNamed->getByName( sAddress ), uno::UNO_QUERY ); } catch( uno::Exception& /*e*/ ) diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx index 6a9a3178688f..a7f027228a20 100644 --- a/svx/source/gallery2/galtheme.cxx +++ b/svx/source/gallery2/galtheme.cxx @@ -1459,9 +1459,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) { if( SGA_OBJ_SVDRAW == pObj->eObjKind ) { - const static OUString aBaseURLStr( "gallery/svdraw/" ); - - OUString aDummyURL( aBaseURLStr ); + OUString aDummyURL( "gallery/svdraw/" ); pObj->aURL = INetURLObject( aDummyURL += aFileName, INET_PROT_PRIV_SOFFICE ); } else diff --git a/sw/source/ui/vba/vbaborders.cxx b/sw/source/ui/vba/vbaborders.cxx index c310ee23b61a..b8eeb818aa60 100644 --- a/sw/source/ui/vba/vbaborders.cxx +++ b/sw/source/ui/vba/vbaborders.cxx @@ -38,8 +38,6 @@ typedef InheritedHelperInterfaceImpl1 SwVbaBorder_Base; // borders, the enumeration will match the order in this list static const sal_Int16 supportedIndexTable[] = { word::WdBorderType::wdBorderBottom, word::WdBorderType::wdBorderDiagonalDown, word::WdBorderType::wdBorderDiagonalUp, word::WdBorderType::wdBorderHorizontal, word::WdBorderType::wdBorderLeft, word::WdBorderType::wdBorderRight, word::WdBorderType::wdBorderTop, word::WdBorderType::wdBorderVertical }; -const static OUString sTableBorder("TableBorder"); - // Equiv widths in in 1/100 mm const static sal_Int32 OOLineHairline = 2; @@ -52,7 +50,7 @@ private: bool setBorderLine( table::BorderLine& rBorderLine ) { table::TableBorder aTableBorder; - m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder; + m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; switch ( m_LineType ) { @@ -89,14 +87,14 @@ private: default: return false; } - m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); + m_xProps->setPropertyValue( "TableBorder", uno::makeAny(aTableBorder) ); return true; } bool getBorderLine( table::BorderLine& rBorderLine ) { table::TableBorder aTableBorder; - m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder; + m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder; switch ( m_LineType ) { case word::WdBorderType::wdBorderLeft: