summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:30:26 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:31 +0100
commitcb9e8bbdb9dd3f2f83ab862ffa6d734af7be79db (patch)
tree3fca04a12a362514eccdb20e7f668dfe28232573 /sd/source/ui
parentb9def20cea8d8364ac1fa14aaf1da775128f0fd3 (diff)
sd: Use appropriate OUString functions on string constants
Change-Id: Ic402f5b5be1f657d9045091056bcb731b3407a9d
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx6
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx6
-rw-r--r--sd/source/ui/dlg/TemplateScanner.cxx10
-rw-r--r--sd/source/ui/dlg/dlgass.cxx2
-rw-r--r--sd/source/ui/dlg/sdpreslt.cxx6
-rw-r--r--sd/source/ui/docshell/docshel4.cxx2
-rw-r--r--sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx4
-rw-r--r--sd/source/ui/unoidl/unopage.cxx2
-rw-r--r--sd/source/ui/unoidl/unopback.cxx4
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
-rw-r--r--sd/source/ui/view/viewshe2.cxx4
13 files changed, 26 insertions, 26 deletions
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 9bee8f3726da..7548ad9e0b88 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -602,11 +602,11 @@ void SlideTransitionPane::updateControls()
if( aEffect.mbSoundAmbiguous )
{
mpLB_SOUND->SetNoSelection();
- maCurrentSoundFile = "";
+ maCurrentSoundFile.clear();
}
else
{
- maCurrentSoundFile = "";
+ maCurrentSoundFile.clear();
if( aEffect.mbStopSound )
{
mpLB_SOUND->SelectEntryPos( 1 );
@@ -813,7 +813,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
// sound
if( mpLB_SOUND->IsEnabled())
{
- maCurrentSoundFile = "";
+ maCurrentSoundFile.clear();
if( mpLB_SOUND->GetSelectEntryCount() > 0 )
{
sal_Int32 nPos = mpLB_SOUND->GetSelectEntryPos();
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 0815c6940a43..92421a3f3a11 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -68,7 +68,7 @@ SdPhotoAlbumDialog::SdPhotoAlbumDialog(vcl::Window* pWindow, SdDrawDocument* pAc
pImagesLst->SetSelectHdl(LINK(this, SdPhotoAlbumDialog, SelectHdl));
mpGraphicFilter = new GraphicFilter;
- sDirUrl = "";
+ sDirUrl.clear();
pAddBtn->GrabFocus();
pImagesLst->Clear();
}
@@ -455,7 +455,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl)
OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
INetURLObject aFile( SvtPathOptions().GetPalettePath() );
- if (sUrl != "")
+ if (!sUrl.isEmpty())
aDlg.SetDisplayDirectory(sUrl);
else
aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -522,7 +522,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, UpHdl)
IMPL_LINK_NOARG(SdPhotoAlbumDialog, DownHdl)
{
sal_uInt16 nActPos = pImagesLst->GetSelectEntryPos();
- if (pImagesLst->GetEntry(nActPos + 1) != OUString("") )
+ if (!pImagesLst->GetEntry(nActPos + 1).isEmpty())
{
OUString sActEntry( pImagesLst->GetEntry(pImagesLst->GetSelectEntryPos()) );
OUString* pActData = (OUString*) pImagesLst->GetEntryData(pImagesLst->GetSelectEntryPos());
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx
index c84c16a701b5..617f6401c813 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -216,9 +216,9 @@ TemplateScanner::State TemplateScanner::InitializeEntryScanning (void)
// We are interested only in three properties: the entry's name,
// its URL, and its content type.
Sequence<OUString> aProps (3);
- aProps[0] = OUString(TITLE);
- aProps[1] = OUString(TARGET_URL);
- aProps[2] = OUString(DESCRIPTION);
+ aProps[0] = TITLE;
+ aProps[1] = TARGET_URL;
+ aProps[2] = DESCRIPTION;
// Create a cursor to iterate over the templates in this folders.
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_DOCUMENTS_ONLY;
@@ -304,8 +304,8 @@ TemplateScanner::State TemplateScanner::InitializeFolderScanning (void)
// Define the list of properties we are interested in.
Sequence<OUString> aProps (2);
- aProps[0] = OUString(TITLE);
- aProps[1] = OUString(TARGET_DIR_URL);
+ aProps[0] = TITLE;
+ aProps[1] = TARGET_DIR_URL;
// Create an cursor to iterate over the template folders.
::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_ONLY;
diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx
index 294892de5ef4..05a0570f9c3f 100644
--- a/sd/source/ui/dlg/dlgass.cxx
+++ b/sd/source/ui/dlg/dlgass.cxx
@@ -1253,7 +1253,7 @@ IMPL_LINK_NOARG(AssistentDlgImpl, UpdateUserDataHdl)
OUString aInfo = mpPage4AskInfoEDT->GetText();
if (aTopic.isEmpty() && aName.isEmpty() && aInfo.isEmpty())
- maDocFile = "";
+ maDocFile.clear();
return 0;
}
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index 6d1c1f90202e..b6e89c44f153 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -79,7 +79,7 @@ void SdPresLayoutDlg::Reset()
if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SfxItemState::SET)
maName = static_cast<const SfxStringItem*>(pPoolItem)->GetValue();
else
- maName = "";
+ maName.clear();
FillValueSet();
@@ -114,7 +114,7 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
{
aLayoutName = maLayoutNames[ nId - 1 ];
if( aLayoutName == maStrNone )
- aLayoutName = ""; // that way we encode "- nothing -" (see below)
+ aLayoutName.clear(); // that way we encode "- nothing -" (see below)
}
rOutAttrs.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aLayoutName ) );
@@ -192,7 +192,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
else
{
// that way we encode "- nothing -"
- maName = "";
+ maName.clear();
}
}
break;
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 07cd46c1d867..deec364c574b 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -474,7 +474,7 @@ bool DrawDocShell::ConvertFrom( SfxMedium& rMedium )
ErrCode nError = ERRCODE_NONE;
bRet = SdXMLFilter( rMedium, *this, true, SDXMLMODE_Normal, SOFFICE_FILEFORMAT_60 ).Import( nError );
}
- else if( aFilterName.equals( "CGM - Computer Graphics Metafile" ) )
+ else if( aFilterName == "CGM - Computer Graphics Metafile" )
{
mpDoc->CreateFirstPages();
mpDoc->StopWorkStartupDelay();
diff --git a/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx b/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx
index cb4dc58ba152..6653a3409550 100644
--- a/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx
+++ b/sd/source/ui/framework/configuration/GenericConfigurationChangeRequest.cxx
@@ -64,7 +64,7 @@ void SAL_CALL GenericConfigurationChangeRequest::execute (
OUString SAL_CALL GenericConfigurationChangeRequest::getName (void)
throw (RuntimeException, std::exception)
{
- return OUString("GenericConfigurationChangeRequest ")
+ return "GenericConfigurationChangeRequest "
+ (meMode==Activation ? OUString("activate ") : OUString("deactivate "))
+ FrameworkHelper::ResourceIdToString(mxResourceId);
}
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 40c62cff4b7d..38a0351771f7 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1917,7 +1917,7 @@ bool SlideshowImpl::keyInput(const KeyEvent& rKEvt)
if( mpSlideController->jumpToSlideNumber( maCharBuffer.toInt32() - 1 ) )
displayCurrentSlide();
}
- maCharBuffer = "";
+ maCharBuffer.clear();
}
else
{
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index bdb30bd56c14..b821f77a081e 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -457,7 +457,7 @@ void SAL_CALL Listener::propertyChange (
static const char sCurrentPagePropertyName[] = "CurrentPage";
static const char sEditModePropertyName[] = "IsMasterPageMode";
- if (rEvent.PropertyName.equals(sCurrentPagePropertyName))
+ if (rEvent.PropertyName == sCurrentPagePropertyName)
{
Any aCurrentPage = rEvent.NewValue;
Reference<beans::XPropertySet> xPageSet (aCurrentPage, UNO_QUERY);
@@ -486,7 +486,7 @@ void SAL_CALL Listener::propertyChange (
}
}
}
- else if (rEvent.PropertyName.equals (sEditModePropertyName))
+ else if (rEvent.PropertyName == sEditModePropertyName)
{
bool bIsMasterPageMode = false;
rEvent.NewValue >>= bIsMasterPageMode;
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 4993a2e28c0c..4319fd79ed5b 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -2173,7 +2173,7 @@ OUString getPageApiNameFromUiName( const OUString& rUIName )
if( rUIName.startsWith( aDefPageName ) )
{
- aApiName = OUString( sEmptyPageName );
+ aApiName = sEmptyPageName;
aApiName += rUIName.copy( aDefPageName.getLength() );
}
else
diff --git a/sd/source/ui/unoidl/unopback.cxx b/sd/source/ui/unoidl/unopback.cxx
index 0bd323a8f3f0..42b295dfec94 100644
--- a/sd/source/ui/unoidl/unopback.cxx
+++ b/sd/source/ui/unoidl/unopback.cxx
@@ -198,8 +198,8 @@ uno::Sequence< OUString > SAL_CALL SdUnoPageBackground::getSupportedServiceNames
uno::Sequence< OUString > aNameSequence( 2 );
OUString* pStrings = aNameSequence.getArray();
- *pStrings++ = OUString( sUNO_Service_PageBackground );
- *pStrings = OUString( sUNO_Service_FillProperties );
+ *pStrings++ = sUNO_Service_PageBackground;
+ *pStrings = sUNO_Service_FillProperties;
return aNameSequence;
}
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 4cf3d54cb16e..57d7736cd0a3 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -1947,7 +1947,7 @@ private:
rInfo.msPageString += " ";
}
else
- rInfo.msPageString = "";
+ rInfo.msPageString.clear();
rInfo.msPageString += rInfo.msTimeDate;
long aPageWidth = aPageSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder();
diff --git a/sd/source/ui/view/viewshe2.cxx b/sd/source/ui/view/viewshe2.cxx
index 3c72e3105302..933714044c2c 100644
--- a/sd/source/ui/view/viewshe2.cxx
+++ b/sd/source/ui/view/viewshe2.cxx
@@ -752,7 +752,7 @@ bool ViewShell::ActivateObject(SdrOle2Obj* pObj, long nVerb)
if( !xObj.is() )
{
- aName = "";
+ aName.clear();
// call dialog "insert OLE object"
GetDocSh()->SetWaitCursor( false );
@@ -967,7 +967,7 @@ void ViewShell::WriteUserDataSequence ( css::uno::Sequence < css::beans::Propert
sal_uInt16 nViewID (IMPRESS_FACTORY_ID);
if (GetViewShellBase().GetMainViewShell().get() != NULL)
nViewID = GetViewShellBase().GetMainViewShell()->mpImpl->GetViewId();
- rSequence[nIndex].Name = OUString( sUNO_View_ViewId );
+ rSequence[nIndex].Name = sUNO_View_ViewId;
OUStringBuffer sBuffer( "view" );
sBuffer.append( static_cast<sal_Int32>(nViewID));
rSequence[nIndex].Value <<= sBuffer.makeStringAndClear();