Kaydet (Commit) 60c8df43 authored tarafından Thomas Arnhold's avatar Thomas Arnhold

remove static strings

üst 18c7992d
...@@ -1077,14 +1077,12 @@ bool ORowSetValue::getBool() const ...@@ -1077,14 +1077,12 @@ bool ORowSetValue::getBool() const
case DataType::LONGVARCHAR: case DataType::LONGVARCHAR:
{ {
const OUString sValue(m_aValue.m_pString); const OUString sValue(m_aValue.m_pString);
const static OUString s_sTrue("true"); if ( sValue.equalsIgnoreAsciiCase("true") || (sValue == "1") )
const static OUString s_sFalse("false");
if ( sValue.equalsIgnoreAsciiCase(s_sTrue) || (sValue == "1") )
{ {
bRet = true; bRet = true;
break; break;
} }
else if ( sValue.equalsIgnoreAsciiCase(s_sFalse) || (sValue == "0") ) else if ( sValue.equalsIgnoreAsciiCase("false") || (sValue == "0") )
{ {
bRet = false; bRet = false;
break; break;
......
...@@ -1000,8 +1000,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& ...@@ -1000,8 +1000,7 @@ OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >&
if ( aReportEngine.isValid() ) if ( aReportEngine.isValid() )
{ {
OUString sRet; OUString sRet;
const static OUString s_sService("ServiceName"); aReportEngine.getNodeValue("ServiceName") >>= sRet;
aReportEngine.getNodeValue(s_sService) >>= sRet;
return sRet; return sRet;
} }
} }
......
...@@ -381,7 +381,6 @@ namespace dbtools ...@@ -381,7 +381,6 @@ namespace dbtools
// did we find links where the detail field refers to a detail column (instead of a parameter name)? // did we find links where the detail field refers to a detail column (instead of a parameter name)?
if ( !aAdditionalFilterComponents.empty() ) if ( !aAdditionalFilterComponents.empty() )
{ {
const static OUString s_sAnd( " AND " );
// build a conjunction of all the filter components // build a conjunction of all the filter components
OUStringBuffer sAdditionalFilter; OUStringBuffer sAdditionalFilter;
for ( ::std::vector< OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin(); for ( ::std::vector< OUString >::const_iterator aComponent = aAdditionalFilterComponents.begin();
...@@ -390,7 +389,7 @@ namespace dbtools ...@@ -390,7 +389,7 @@ namespace dbtools
) )
{ {
if ( !sAdditionalFilter.isEmpty() ) if ( !sAdditionalFilter.isEmpty() )
sAdditionalFilter.append(s_sAnd); sAdditionalFilter.append(" AND ");
sAdditionalFilter.appendAscii("( ",((sal_Int32)(sizeof("( ")-1))); sAdditionalFilter.appendAscii("( ",((sal_Int32)(sizeof("( ")-1)));
sAdditionalFilter.append(*aComponent); sAdditionalFilter.append(*aComponent);
......
...@@ -104,11 +104,9 @@ SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath ) ...@@ -104,11 +104,9 @@ SfxObjectShell* findShellForUrl( const OUString& sMacroURLOrPath )
OUString aName = xModel->getURL() ; OUString aName = xModel->getURL() ;
if (aName.isEmpty()) if (aName.isEmpty())
{ {
const static OUString sTitle( "Title" );
uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW ); uno::Reference< frame::XFrame > xFrame( xModel->getCurrentController()->getFrame(), uno::UNO_QUERY_THROW );
uno::Reference< beans::XPropertySet > xProps( xFrame, 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; sal_Int32 pos = 0;
aName = aName.getToken(0,'-',pos); aName = aName.getToken(0,'-',pos);
aName = aName.trim(); aName = aName.trim();
......
...@@ -309,8 +309,7 @@ public: ...@@ -309,8 +309,7 @@ public:
// XDefaultMethod // XDefaultMethod
OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException) OUString SAL_CALL getDefaultMethodName( ) throw (css::uno::RuntimeException)
{ {
const static OUString sName( "Item" ); return "Item";
return sName;
} }
// XEnumerationAccess // XEnumerationAccess
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) = 0; virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException) = 0;
......
...@@ -248,8 +248,7 @@ ScVbaWorkbooks::isTextFile( const OUString& sType ) ...@@ -248,8 +248,7 @@ ScVbaWorkbooks::isTextFile( const OUString& sType )
// b) a csv file // b) a csv file
// c) unknown // c) unknown
// returning true basically means treat this like a csv file // returning true basically means treat this like a csv file
const static OUString txtType("generic_Text"); return sType.equals( "generic_Text" ) || sType.isEmpty();
return sType.equals( txtType ) || sType.isEmpty();
} }
bool bool
......
...@@ -41,12 +41,11 @@ using namespace ::com::sun::star; ...@@ -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 lcl_isNamedRange( const OUString& sAddress, const uno::Reference< frame::XModel >& xModel, table::CellRangeAddress& aAddress )
{ {
bool bRes = false; bool bRes = false;
const static OUString sNamedRanges("NamedRanges");
uno::Reference< sheet::XCellRangeReferrer > xReferrer; uno::Reference< sheet::XCellRangeReferrer > xReferrer;
try try
{ {
uno::Reference< beans::XPropertySet > xPropSet( xModel, uno::UNO_QUERY_THROW ); 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 ); xReferrer.set ( xNamed->getByName( sAddress ), uno::UNO_QUERY );
} }
catch( uno::Exception& /*e*/ ) catch( uno::Exception& /*e*/ )
......
...@@ -1459,9 +1459,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm ) ...@@ -1459,9 +1459,7 @@ SvStream& GalleryTheme::ReadData( SvStream& rIStm )
{ {
if( SGA_OBJ_SVDRAW == pObj->eObjKind ) if( SGA_OBJ_SVDRAW == pObj->eObjKind )
{ {
const static OUString aBaseURLStr( "gallery/svdraw/" ); OUString aDummyURL( "gallery/svdraw/" );
OUString aDummyURL( aBaseURLStr );
pObj->aURL = INetURLObject( aDummyURL += aFileName, INET_PROT_PRIV_SOFFICE ); pObj->aURL = INetURLObject( aDummyURL += aFileName, INET_PROT_PRIV_SOFFICE );
} }
else else
......
...@@ -38,8 +38,6 @@ typedef InheritedHelperInterfaceImpl1<word::XBorder > SwVbaBorder_Base; ...@@ -38,8 +38,6 @@ typedef InheritedHelperInterfaceImpl1<word::XBorder > SwVbaBorder_Base;
// borders, the enumeration will match the order in this list // 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 }; 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 // Equiv widths in in 1/100 mm
const static sal_Int32 OOLineHairline = 2; const static sal_Int32 OOLineHairline = 2;
...@@ -52,7 +50,7 @@ private: ...@@ -52,7 +50,7 @@ private:
bool setBorderLine( table::BorderLine& rBorderLine ) bool setBorderLine( table::BorderLine& rBorderLine )
{ {
table::TableBorder aTableBorder; table::TableBorder aTableBorder;
m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder; m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder;
switch ( m_LineType ) switch ( m_LineType )
{ {
...@@ -89,14 +87,14 @@ private: ...@@ -89,14 +87,14 @@ private:
default: default:
return false; return false;
} }
m_xProps->setPropertyValue( sTableBorder, uno::makeAny(aTableBorder) ); m_xProps->setPropertyValue( "TableBorder", uno::makeAny(aTableBorder) );
return true; return true;
} }
bool getBorderLine( table::BorderLine& rBorderLine ) bool getBorderLine( table::BorderLine& rBorderLine )
{ {
table::TableBorder aTableBorder; table::TableBorder aTableBorder;
m_xProps->getPropertyValue( sTableBorder ) >>= aTableBorder; m_xProps->getPropertyValue( "TableBorder" ) >>= aTableBorder;
switch ( m_LineType ) switch ( m_LineType )
{ {
case word::WdBorderType::wdBorderLeft: case word::WdBorderType::wdBorderLeft:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment