diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-30 07:43:52 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-30 07:43:52 +0200 |
commit | 5536aea8228778e00b9f1ca8199d858cd03780ad (patch) | |
tree | d244654bc3c5aa4e5b3a87df5f004ef61049996c /cui | |
parent | tdf#99402: fix Metafile Font handling (diff) | |
download | core-5536aea8228778e00b9f1ca8199d858cd03780ad.tar.gz core-5536aea8228778e00b9f1ca8199d858cd03780ad.zip |
Let OUStringLiteral1 take its arg as ctor arg, not template arg
...which makes it more flexible, can now also be used on non-const arguments.
The drawback of the argument no longer being a compile-time constant is remedied
by making the ctor constexpr.
Change-Id: Ia4903a2cc86791fece92eac0cb8406b6659dd19d
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/dialogs/hlinettp.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optjava.cxx | 2 | ||||
-rw-r--r-- | cui/source/options/optpath.cxx | 14 | ||||
-rw-r--r-- | cui/source/tabpages/grfpage.cxx | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 7c92332f36a6..2508f123c812 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -407,7 +407,7 @@ void SvxHyperlinkInternetTp::SetMarkStr ( const OUString& aStrMark ) if( nPos != -1 ) aStrURL = aStrURL.copy(0, nPos); - aStrURL += OUStringLiteral1<sUHash>() + aStrMark; + aStrURL += OUStringLiteral1(sUHash) + aStrMark; m_pCbbTarget->SetText ( aStrURL ); } diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx index 9fba0a917e05..70db94543c09 100644 --- a/cui/source/options/optjava.cxx +++ b/cui/source/options/optjava.cxx @@ -1117,7 +1117,7 @@ OUString SvxJavaClassPathDlg::GetClassPath() const for ( sal_Int32 i = 0; i < nCount; ++i ) { if ( !sPath.isEmpty() ) - sPath += OUStringLiteral1<CLASSPATH_DELIMITER>(); + sPath += OUStringLiteral1(CLASSPATH_DELIMITER); OUString* pFullPath = static_cast< OUString* >( m_pPathList->GetEntryData(i) ); if ( pFullPath ) sPath += *pFullPath; diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx index 2380d9a4fa8d..8d332e0dd707 100644 --- a/cui/source/options/optpath.cxx +++ b/cui/source/options/optpath.cxx @@ -161,7 +161,7 @@ static OUString Convert_Impl( const OUString& rValue ) aReturn += aObj.PathToFileName(); if ( nPos < 0 ) break; - aReturn += OUStringLiteral1<MULTIPATH_DELIMITER>(); + aReturn += OUStringLiteral1(MULTIPATH_DELIMITER); } return aReturn; @@ -321,7 +321,7 @@ void SvxPathTabPage::Reset( const SfxItemSet* ) GetPathList( i, sInternal, sUser, sWritable, bReadOnly ); OUString sTmpPath = sUser; if ( !sTmpPath.isEmpty() && !sWritable.isEmpty() ) - sTmpPath += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sTmpPath += OUStringLiteral1(MULTIPATH_DELIMITER); sTmpPath += sWritable; const OUString aValue = Convert_Impl( sTmpPath ); nWidth2 = std::max(nWidth2, pPathBox->GetTextWidth(aValue)); @@ -440,7 +440,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, StandardHdl_Impl, Button*, void) if ( !bFound ) { if ( !sTemp.isEmpty() ) - sTemp += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sTemp += OUStringLiteral1(MULTIPATH_DELIMITER); sTemp += sOnePath; } } @@ -460,7 +460,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, StandardHdl_Impl, Button*, void) break; } if ( !sUserPath.isEmpty() ) - sUserPath += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sUserPath += OUStringLiteral1(MULTIPATH_DELIMITER); sUserPath += sToken; } } @@ -572,7 +572,7 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) OUString sPath( sUser ); if ( !sPath.isEmpty() ) - sPath += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sPath += OUStringLiteral1(MULTIPATH_DELIMITER); sPath += sWritable; pMultiDlg->SetPath( sPath ); @@ -599,12 +599,12 @@ IMPL_LINK_NOARG_TYPED(SvxPathTabPage, PathHdl_Impl, Button*, void) break; } if ( !sUser.isEmpty() ) - sUser += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sUser += OUStringLiteral1(MULTIPATH_DELIMITER); sUser += sToken; } sFullPath = sUser; if ( !sFullPath.isEmpty() ) - sFullPath += OUStringLiteral1<MULTIPATH_DELIMITER>(); + sFullPath += OUStringLiteral1(MULTIPATH_DELIMITER); sFullPath += sWritable; } diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx index b692be407304..f6a1a8716af1 100644 --- a/cui/source/tabpages/grfpage.cxx +++ b/cui/source/tabpages/grfpage.cxx @@ -699,7 +699,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) OUString sTemp = aFld->GetText(); aFld->SetValue( aFld->Normalize( aOrigSize.Height() ), eUnit ); // multiplication sign (U+00D7) - sTemp += OUStringLiteral1<0x00D7>() + aFld->GetText(); + sTemp += OUStringLiteral1(0x00D7) + aFld->GetText(); if ( aOrigPixelSize.Width() && aOrigPixelSize.Height() ) { sal_Int32 ax = sal_Int32(floor((float)aOrigPixelSize.Width() / @@ -710,7 +710,7 @@ void SvxGrfCropPage::GraphicHasChanged( bool bFound ) sTemp += CUI_RESSTR( RID_SVXSTR_PPI ); OUString sPPI = OUString::number(ax); if (abs(ax - ay) > 1) { - sPPI += OUStringLiteral1<0x00D7>() + OUString::number(ay); + sPPI += OUStringLiteral1(0x00D7) + OUString::number(ay); } sTemp = sTemp.replaceAll("%1", sPPI); } |