summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-08-11 21:13:38 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-08-11 21:53:59 +0400
commitde973a371c64ef796956d67fd18e4a62a451abc8 (patch)
tree190afc47d64d64c58afd36c6e2fa9bd80acdea56 /sd
parent4fa7e7f563e37deabab26c981d1facde6bc537c0 (diff)
String->OUString
Change-Id: I98aae013433adb644d289b5d15625dcce824916e
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/inc/DrawViewShell.hxx10
-rw-r--r--sd/source/ui/inc/View.hxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx10
-rw-r--r--sd/source/ui/view/drviews4.cxx16
-rw-r--r--sd/source/ui/view/drviews6.cxx6
-rw-r--r--sd/source/ui/view/drviews7.cxx30
-rw-r--r--sd/source/ui/view/drviews9.cxx5
-rw-r--r--sd/source/ui/view/drviewsa.cxx6
-rw-r--r--sd/source/ui/view/drviewsb.cxx14
-rw-r--r--sd/source/ui/view/drviewsd.cxx7
-rw-r--r--sd/source/ui/view/drviewse.cxx46
-rw-r--r--sd/source/ui/view/drviewsf.cxx21
-rw-r--r--sd/source/ui/view/drviewsh.cxx2
-rw-r--r--sd/source/ui/view/drviewsi.cxx4
-rw-r--r--sd/source/ui/view/frmview.cxx2
-rw-r--r--sd/source/ui/view/outlnvs2.cxx2
-rw-r--r--sd/source/ui/view/outlnvsh.cxx40
-rw-r--r--sd/source/ui/view/outlview.cxx33
-rw-r--r--sd/source/ui/view/sdview.cxx31
-rw-r--r--sd/source/ui/view/sdview2.cxx22
-rw-r--r--sd/source/ui/view/sdview3.cxx50
-rw-r--r--sd/source/ui/view/sdview4.cxx45
-rw-r--r--sd/source/ui/view/tabcontr.cxx2
23 files changed, 204 insertions, 202 deletions
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index 8dfdea6af7cf..61c8d1ce3da9 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -141,9 +141,9 @@ public:
virtual void SetZoom( long nZoom );
virtual void SetZoomRect( const Rectangle& rZoomRect );
- void InsertURLField(const String& rURL, const String& rText, const String& rTarget,
+ void InsertURLField(const OUString& rURL, const OUString& rText, const OUString& rTarget,
const Point* pPos);
- void InsertURLButton(const String& rURL, const String& rText, const String& rTarget,
+ void InsertURLButton(const OUString& rURL, const OUString& rText, const OUString& rTarget,
const Point* pPos);
virtual void SetUIUnit(FieldUnit eUnit);
@@ -246,7 +246,7 @@ public:
sal_Bool SwitchPage(sal_uInt16 nPage);
sal_Bool IsSwitchPageAllowed() const;
- sal_Bool GotoBookmark(const String& rBookmark);
+ sal_Bool GotoBookmark(const OUString& rBookmark);
void MakeVisible(const Rectangle& rRect, ::Window& rWin);
virtual void ReadFrameViewData(FrameView* pView);
@@ -347,10 +347,10 @@ public:
<p>Implemented in <code>drviews8.cxx</code>.</p>
*/
- bool RenameSlide( sal_uInt16 nPageId, const String & rName );
+ bool RenameSlide( sal_uInt16 nPageId, const OUString & rName );
/** modifies the given layer with the given values */
- void ModifyLayer( SdrLayer* pLayer, const String& rLayerName, const String& rLayerTitle, const String& rLayerDesc, bool bIsVisible, bool bIsLocked, bool bIsPrintable );
+ void ModifyLayer( SdrLayer* pLayer, const OUString& rLayerName, const OUString& rLayerTitle, const OUString& rLayerDesc, bool bIsVisible, bool bIsLocked, bool bIsPrintable );
virtual css::uno::Reference<css::drawing::XDrawSubController> CreateSubController (void);
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index 03e2de29b655..989ff6aada20 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -249,7 +249,7 @@ protected:
SdrDropMarkerOverlay* mpDropMarker;
sal_uInt16 mnDragSrcPgNum;
Point maDropPos;
- ::std::vector< String > maDropFileVector;
+ ::std::vector<OUString> maDropFileVector;
sal_Int8 mnAction;
Timer maDropErrorTimer;
Timer maDropInsertFileTimer;
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 29364d25990a..3607995eea2a 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -236,7 +236,7 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq)
}
// turn on default layer of page
- mpDrawView->SetActiveLayer( String( SdResId(STR_LAYER_LAYOUT) ) );
+ mpDrawView->SetActiveLayer(SD_RESSTR(STR_LAYER_LAYOUT));
ChangeEditMode(EM_PAGE, mbIsLayerModeActive);
@@ -1034,16 +1034,16 @@ void DrawViewShell::GetSnapItemState( SfxItemSet &rSet )
if ( rHelpLine.GetKind() == SDRHELPLINE_POINT )
{
rSet.Put( SfxStringItem( SID_SET_SNAPITEM,
- String( SdResId( STR_POPUP_EDIT_SNAPPOINT))) );
+ SD_RESSTR( STR_POPUP_EDIT_SNAPPOINT)) );
rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM,
- String( SdResId( STR_POPUP_DELETE_SNAPPOINT))) );
+ SD_RESSTR( STR_POPUP_DELETE_SNAPPOINT)) );
}
else
{
rSet.Put( SfxStringItem( SID_SET_SNAPITEM,
- String( SdResId( STR_POPUP_EDIT_SNAPLINE))) );
+ SD_RESSTR( STR_POPUP_EDIT_SNAPLINE)) );
rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM,
- String( SdResId( STR_POPUP_DELETE_SNAPLINE))) );
+ SD_RESSTR( STR_POPUP_DELETE_SNAPLINE)) );
}
}
}
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index fb14df8b1ff0..a0d0dc019ee2 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -95,13 +95,11 @@ void DrawViewShell::DeleteActualPage()
void DrawViewShell::DeleteActualLayer()
{
SdrLayerAdmin& rAdmin = GetDoc()->GetLayerAdmin();
- const String& rName = GetLayerTabControl()->GetPageText(GetLayerTabControl()->GetCurPageId());
- String aString(SdResId(STR_ASK_DELETE_LAYER));
+ const OUString& rName = GetLayerTabControl()->GetPageText(GetLayerTabControl()->GetCurPageId());
+ OUString aString(SD_RESSTR(STR_ASK_DELETE_LAYER));
// replace placeholder
- sal_uInt16 nPos = aString.Search(sal_Unicode('$'));
- aString.Erase(nPos, 1);
- aString.Insert(rName, nPos);
+ aString = aString.replaceFirst("$", rName);
if (QueryBox(GetActiveWindow(), WB_YES_NO, aString).Execute() == RET_YES)
{
@@ -861,21 +859,21 @@ void DrawViewShell::ShowSnapLineContextMenu (
{
pMenu->InsertItem(
SID_SET_SNAPITEM,
- String(SdResId(STR_POPUP_EDIT_SNAPPOINT)));
+ SD_RESSTR(STR_POPUP_EDIT_SNAPPOINT));
pMenu->InsertSeparator();
pMenu->InsertItem(
SID_DELETE_SNAPITEM,
- String(SdResId(STR_POPUP_DELETE_SNAPPOINT)));
+ SD_RESSTR(STR_POPUP_DELETE_SNAPPOINT));
}
else
{
pMenu->InsertItem(
SID_SET_SNAPITEM,
- String(SdResId(STR_POPUP_EDIT_SNAPLINE)));
+ SD_RESSTR(STR_POPUP_EDIT_SNAPLINE));
pMenu->InsertSeparator();
pMenu->InsertItem(
SID_DELETE_SNAPITEM,
- String(SdResId(STR_POPUP_DELETE_SNAPLINE)));
+ SD_RESSTR(STR_POPUP_DELETE_SNAPLINE));
}
pMenu->RemoveDisabledEntries(sal_False, sal_False);
diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index d80e52836ece..97f0017542b5 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -305,7 +305,7 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
if( pNewObj->IsLinkedGraphic() )
{
QueryBox aQBox( (Window*) GetActiveWindow(), WB_YES_NO | WB_DEF_YES,
- String( SdResId( STR_RELEASE_GRAPHICLINK ) ) );
+ SD_RESSTR( STR_RELEASE_GRAPHICLINK ) );
if( RET_YES == aQBox.Execute() )
pNewObj->ReleaseGraphicLink();
@@ -332,8 +332,8 @@ void DrawViewShell::ExecBmpMask( SfxRequest& rReq )
SvxBmpMaskChildWindow::GetChildWindowId() )->GetWindow() )->
Mask( pNewObj->GetGraphic() ) );
- String aStr( mpDrawView->GetDescriptionOfMarkedObjects() );
- aStr += (sal_Unicode)( ' ' ), aStr += String( SdResId( STR_EYEDROPPER ) );
+ OUString aStr( mpDrawView->GetDescriptionOfMarkedObjects() );
+ aStr += " " + SD_RESSTR(STR_EYEDROPPER);
mpDrawView->BegUndo( aStr );
mpDrawView->ReplaceObjectAtView( pObj, *pPV, pNewObj );
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index c9302308964d..fee4ded222e9 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -121,15 +121,15 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
{
case SOT_FORMATSTR_ID_EMBED_SOURCE:
{
- String sName;
+ OUString sName;
TransferableObjectDescriptor aDescriptor;
if (rDataHelper.GetTransferableObjectDescriptor(
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR, aDescriptor))
- {
- sName = aDescriptor.maTypeName;
- }
- if (sName.Len() > 0)
+ {
+ sName = aDescriptor.maTypeName;
+ }
+ if (!sName.isEmpty())
pResult->AddClipbrdFormat(nTestFormat, sName);
else
pResult->AddClipbrdFormat(nTestFormat);
@@ -892,14 +892,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_DELETE_LAYER ) )
{
sal_uInt16 nCurrentLayer = GetLayerTabControl()->GetCurPageId();
- const String& rName = GetLayerTabControl()->GetPageText(nCurrentLayer);
+ const OUString& rName = GetLayerTabControl()->GetPageText(nCurrentLayer);
sal_Bool bDisableIt = !IsLayerModeActive();
- bDisableIt |= (rName == String(SdResId(STR_LAYER_LAYOUT)));
- bDisableIt |= (rName == String(SdResId(STR_LAYER_BCKGRND)));
- bDisableIt |= (rName == String(SdResId(STR_LAYER_BCKGRNDOBJ)));
- bDisableIt |= (rName == String(SdResId(STR_LAYER_CONTROLS)));
- bDisableIt |= (rName == String(SdResId(STR_LAYER_MEASURELINES)));
+ bDisableIt |= (rName == SD_RESSTR(STR_LAYER_LAYOUT));
+ bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRND));
+ bDisableIt |= (rName == SD_RESSTR(STR_LAYER_BCKGRNDOBJ));
+ bDisableIt |= (rName == SD_RESSTR(STR_LAYER_CONTROLS));
+ bDisableIt |= (rName == SD_RESSTR(STR_LAYER_MEASURELINES));
if (bDisableIt)
{
@@ -1054,9 +1054,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
}
SdrPageView* pPV = mpDrawView->GetSdrPageView();
- String aActiveLayer = mpDrawView->GetActiveLayer();
+ OUString aActiveLayer = mpDrawView->GetActiveLayer();
- if ( ( aActiveLayer.Len() != 0 && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
+ if ( ( !aActiveLayer.isEmpty() && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
!pPV->IsLayerVisible(aActiveLayer) ) ) ||
SD_MOD()->GetWaterCan() )
{
@@ -1577,8 +1577,8 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
{
SetOfByte aVisibleLayers = pPage->TRG_GetMasterPageVisibleLayers();
SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin();
- sal_uInt8 aBackgroundId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), sal_False);
- sal_uInt8 aObjectId = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), sal_False);
+ sal_uInt8 aBackgroundId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRND), sal_False);
+ sal_uInt8 aObjectId = rLayerAdmin.GetLayerID(SD_RESSTR(STR_LAYER_BCKGRNDOBJ), sal_False);
rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_BACKGROUND,
aVisibleLayers.IsSet(aBackgroundId)));
rSet.Put(SfxBoolItem(SID_DISPLAY_MASTER_OBJECTS,
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 0ccb477b603e..e3cf6d5e48bc 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -154,9 +154,8 @@ void DrawViewShell::ExecGallery(SfxRequest& rReq)
pNewGrafObj->SetOutlinerParaObject(NULL);
pNewGrafObj->SetGraphic(aGraphic);
- String aStr(mpDrawView->GetDescriptionOfMarkedObjects());
- aStr += sal_Unicode(' ');
- aStr += String(SdResId(STR_UNDO_REPLACE));
+ OUString aStr(mpDrawView->GetDescriptionOfMarkedObjects());
+ aStr += " " + SD_RESSTR(STR_UNDO_REPLACE);
mpDrawView->BegUndo(aStr);
SdrPageView* pPV = mpDrawView->GetSdrPageView();
mpDrawView->ReplaceObjectAtView(pGrafObj, *pPV, pNewGrafObj);
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 1caab1a55f7e..d41c9261e13f 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -778,8 +778,10 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
// Layout
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_STATUS_LAYOUT ) )
{
- String aString = mpActualPage->GetLayoutName();
- aString.Erase( aString.SearchAscii( SD_LT_SEPARATOR ) );
+ OUString aString = mpActualPage->GetLayoutName();
+ sal_Int32 nPos = aString.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aString = aString.copy(0, nPos);
rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aString ) );
}
}
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 5280912d142e..e2e402f7544c 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -65,7 +65,7 @@
namespace sd {
-bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const String & rName )
+bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const OUString & rName )
{
sal_Bool bOutDummy;
if( GetDoc()->GetPageByName( rName, bOutDummy ) != SDRPAGE_NOTFOUND )
@@ -81,8 +81,8 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const String & rName )
// Undo
SdPage* pUndoPage = pPageToRename;
SdrLayerAdmin & rLayerAdmin = GetDoc()->GetLayerAdmin();
- sal_uInt8 nBackground = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRND )), sal_False );
- sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( String( SdResId( STR_LAYER_BCKGRNDOBJ )), sal_False );
+ sal_uInt8 nBackground = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRND), sal_False );
+ sal_uInt8 nBgObj = rLayerAdmin.GetLayerID( SD_RESSTR(STR_LAYER_BCKGRNDOBJ), sal_False );
SetOfByte aVisibleLayers = mpActualPage->TRG_GetMasterPageVisibleLayers();
::svl::IUndoManager* pManager = GetDoc()->GetDocSh()->GetUndoManager();
@@ -109,7 +109,7 @@ bool DrawViewShell::RenameSlide( sal_uInt16 nPageId, const String & rName )
GetDoc()->RenameLayoutTemplate( pPageToRename->GetLayoutName(), rName );
}
- bool bSuccess = ( sal_False != rName.Equals( pPageToRename->GetName()));
+ bool bSuccess = (rName == pPageToRename->GetName());
if( bSuccess )
{
@@ -159,9 +159,9 @@ IMPL_LINK( DrawViewShell, RenameSlideHdl, AbstractSvxNameDialog*, pDialog )
void DrawViewShell::ModifyLayer (
SdrLayer* pLayer,
- const String& rLayerName,
- const String& rLayerTitle,
- const String& rLayerDesc,
+ const OUString& rLayerName,
+ const OUString& rLayerTitle,
+ const OUString& rLayerDesc,
bool bIsVisible,
bool bIsLocked,
bool bIsPrintable)
diff --git a/sd/source/ui/view/drviewsd.cxx b/sd/source/ui/view/drviewsd.cxx
index a3c52e34ec38..bdda90a94200 100644
--- a/sd/source/ui/view/drviewsd.cxx
+++ b/sd/source/ui/view/drviewsd.cxx
@@ -133,10 +133,9 @@ void DrawViewShell::ExecNavigatorWin( SfxRequest& rReq )
}
else if (nSId == SID_NAVIGATOR_OBJECT)
{
- String aBookmarkStr;
- aBookmarkStr += sal_Unicode( '#' );
+ OUString aBookmarkStr("#");
const SfxItemSet* pArgs = rReq.GetArgs();
- String aTarget = ((SfxStringItem&) pArgs->
+ OUString aTarget = ((SfxStringItem&) pArgs->
Get(SID_NAVIGATOR_OBJECT)).GetValue();
aBookmarkStr += aTarget;
SfxStringItem aStrItem(SID_FILE_NAME, aBookmarkStr);
@@ -168,7 +167,7 @@ void DrawViewShell::GetNavigatorWinState( SfxItemSet& rSet )
sal_uInt16 nFirstPage = 0;
sal_uInt16 nLastPage;
sal_Bool bEndless = sal_False;
- String aPageName;
+ OUString aPageName;
rtl::Reference< SlideShow > xSlideshow( SlideShow::GetSlideShow( GetViewShellBase() ) );
if( xSlideshow.is() && xSlideshow->isRunning() )
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 6651519d82ac..f23b16807977 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -112,20 +112,20 @@ void ImpAddPrintableCharactersToTextEdit(SfxRequest& rReq, ::sd::View* pView)
if(pSet)
{
- String aInputString;
+ OUString aInputString;
if(SFX_ITEM_SET == pSet->GetItemState(SID_ATTR_CHAR))
aInputString = ((SfxStringItem&)pSet->Get(SID_ATTR_CHAR)).GetValue();
- if(aInputString.Len())
+ if(!aInputString.isEmpty())
{
OutlinerView* pOLV = pView->GetTextEditOutlinerView();
if(pOLV)
{
- for(sal_uInt16 a(0); a < aInputString.Len(); a++)
+ for(sal_Int32 a(0); a < aInputString.getLength(); a++)
{
- sal_Char aChar = (sal_Char)aInputString.GetChar(a);
+ sal_Char aChar = (sal_Char)aInputString[a];
KeyCode aKeyCode;
KeyEvent aKeyEvent(aChar, aKeyCode);
@@ -331,10 +331,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if ( mpDrawView->IsPresObjSelected() )
{
::sd::Window* pWindow = GetActiveWindow();
- InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
}
else if ( QueryBox(GetActiveWindow(), WB_YES_NO,
- String(SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER) )
+ SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER)
).Execute() == RET_YES )
{
// implicit transformation into bezier
@@ -368,10 +368,10 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
if ( mpDrawView->IsPresObjSelected() )
{
::sd::Window* pWindow = GetActiveWindow();
- InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
}
else if ( QueryBox(GetActiveWindow(), WB_YES_NO,
- String(SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER) )
+ SD_RESSTR(STR_ASK_FOR_CONVERT_TO_BEZIER)
).Execute() == RET_YES )
{
// implicit transformation into bezier
@@ -721,7 +721,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
SdrPathObj* pPathObj = (SdrPathObj*) rMarkList.GetMark(0)->GetMarkedSdrObj();
const bool bUndo = mpDrawView->IsUndoEnabled();
if( bUndo )
- mpDrawView->BegUndo(String(SdResId(STR_UNDO_BEZCLOSE)));
+ mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_BEZCLOSE));
mpDrawView->UnmarkAllPoints();
@@ -742,7 +742,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
- InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
}
else
{
@@ -764,7 +764,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
- InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
}
else
{
@@ -852,7 +852,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
else if ( mpDrawView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) )
{
::sd::Window* pWindow = GetActiveWindow();
- InfoBox(pWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox(pWindow, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
}
else
{
@@ -941,7 +941,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
}
// turn on default layer of MasterPage
- mpDrawView->SetActiveLayer( String( SdResId(STR_LAYER_BCKGRNDOBJ) ) );
+ mpDrawView->SetActiveLayer( SD_RESSTR(STR_LAYER_BCKGRNDOBJ) );
ChangeEditMode(EM_MASTERPAGE, mbIsLayerModeActive);
@@ -1337,7 +1337,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
break;
}
- mpDrawView->BegUndo(String(SdResId(STR_UNDO_COLORRESOLUTION)));
+ mpDrawView->BegUndo(SD_RESSTR(STR_UNDO_COLORRESOLUTION));
const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
for (sal_uLong i=0; i<rMarkList.GetMarkCount(); i++)
@@ -1470,8 +1470,8 @@ void DrawViewShell::FuSupportRotate(SfxRequest &rReq)
}
-void DrawViewShell::InsertURLField(const String& rURL, const String& rText,
- const String& rTarget, const Point* pPos)
+void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,
+ const OUString& rTarget, const Point* pPos)
{
OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
@@ -1529,8 +1529,8 @@ void DrawViewShell::InsertURLField(const String& rURL, const String& rText,
}
-void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
- const String& rTarget, const Point* pPos)
+void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
+ const OUString& rTarget, const Point* pPos)
{
sal_Bool bNewObj = sal_True;
@@ -1552,11 +1552,11 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), UNO_QUERY_THROW );
Reference< beans::XPropertySet > xPropSet( xControlModel, UNO_QUERY_THROW );
- xPropSet->setPropertyValue("Label" , Any( OUString( rText ) ) );
+ xPropSet->setPropertyValue("Label" , Any( rText ) );
xPropSet->setPropertyValue("TargetURL" , Any( sTargetURL ) );
- if( rTarget.Len() )
- xPropSet->setPropertyValue("TargetFrame" , Any( OUString( rTarget ) ) );
+ if( !rTarget.isEmpty() )
+ xPropSet->setPropertyValue("TargetFrame" , Any( rTarget ) );
xPropSet->setPropertyValue( "ButtonType" , Any( form::FormButtonType_URL ) );
if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
@@ -1590,8 +1590,8 @@ void DrawViewShell::InsertURLButton(const String& rURL, const String& rText,
xPropSet->setPropertyValue( "Label" , Any( OUString( rText ) ) );
xPropSet->setPropertyValue( "TargetURL" , Any( sTargetURL ) );
- if( rTarget.Len() )
- xPropSet->setPropertyValue( "TargetFrame" , Any( OUString( rTarget ) ) );
+ if( !rTarget.isEmpty() )
+ xPropSet->setPropertyValue( "TargetFrame" , Any( rTarget ) );
xPropSet->setPropertyValue( "ButtonType" , Any( form::FormButtonType_URL ) );
if ( ::avmedia::MediaWindow::isMediaURL( rURL ) )
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 89c90d0b4908..418ab1fa6305 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -111,8 +111,9 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if (!bField)
{
// use selected text as name for urls
- String sReturn = pOLV->GetSelected();
- sReturn.Erase(255);
+ OUString sReturn = pOLV->GetSelected();
+ if (sReturn.getLength() > 255)
+ sReturn = sReturn.copy(0, 255);
aHLinkItem.SetName(comphelper::string::stripEnd(sReturn, ' '));
}
}
@@ -144,7 +145,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if(xPropInfo->hasPropertyByName(sLabel))
{
if( xPropSet->getPropertyValue(sLabel) >>= aString )
- aHLinkItem.SetName(String( aString ));
+ aHLinkItem.SetName(aString);
}
// URL
@@ -152,7 +153,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if(xPropInfo->hasPropertyByName(sTargetURL))
{
if( xPropSet->getPropertyValue(sTargetURL) >>= aString )
- aHLinkItem.SetURL(String( aString ));
+ aHLinkItem.SetURL(aString);
}
// Target
@@ -160,7 +161,7 @@ void DrawViewShell::GetCtrlState(SfxItemSet &rSet)
if(xPropInfo->hasPropertyByName(sTargetFrame) )
{
if( xPropSet->getPropertyValue(sTargetFrame) >>= aString )
- aHLinkItem.SetTargetFrame(String( aString ));
+ aHLinkItem.SetTargetFrame(aString);
}
aHLinkItem.SetInsertMode(HLINK_BUTTON);
@@ -441,7 +442,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
{
if( nSlotId != SID_STYLE_APPLY && !mpDrawView->AreObjectsMarked() )
{
- SfxTemplateItem aTmpItem( nWhich, String() );
+ SfxTemplateItem aTmpItem( nWhich, OUString() );
aAllSet.Put( aTmpItem, aTmpItem.Which() );
}
else
@@ -462,14 +463,14 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
}
else
{
- SfxTemplateItem aTmpItem(nWhich, String());
+ SfxTemplateItem aTmpItem(nWhich, OUString());
aAllSet.Put(aTmpItem,aTmpItem.Which() );
}
}
}
}
else
- { SfxTemplateItem aItem( nWhich, String() );
+ { SfxTemplateItem aItem( nWhich, OUString() );
aAllSet.Put( aItem, aItem.Which() );
}
}
@@ -745,7 +746,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
String DrawViewShell::GetSelectionText(sal_Bool bCompleteWords)
{
- String aStrSelection;
+ OUString aStrSelection;
::Outliner* pOl = mpDrawView->GetTextEditOutliner();
OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView();
@@ -754,7 +755,7 @@ String DrawViewShell::GetSelectionText(sal_Bool bCompleteWords)
if (bCompleteWords)
{
ESelection aSel = pOlView->GetSelection();
- String aStrCurrentDelimiters = pOl->GetWordDelimiters();
+ OUString aStrCurrentDelimiters = pOl->GetWordDelimiters();
pOl->SetWordDelimiters( OUString(" .,;\"'" ));
aStrSelection = pOl->GetWord( aSel.nEndPara, aSel.nEndPos );
diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx
index 804d8cdadedd..16c89f736fe3 100644
--- a/sd/source/ui/view/drviewsh.cxx
+++ b/sd/source/ui/view/drviewsh.cxx
@@ -45,7 +45,7 @@
namespace sd {
-sal_Bool DrawViewShell::GotoBookmark(const String& rBookmark)
+sal_Bool DrawViewShell::GotoBookmark(const OUString& rBookmark)
{
sal_Bool bRet = sal_False;
::sd::DrawDocShell* pDocSh = GetDocSh();
diff --git a/sd/source/ui/view/drviewsi.cxx b/sd/source/ui/view/drviewsi.cxx
index 245d687fb5df..6a92a7491f3b 100644
--- a/sd/source/ui/view/drviewsi.cxx
+++ b/sd/source/ui/view/drviewsi.cxx
@@ -128,7 +128,7 @@ void DrawViewShell::AssignFrom3DWindow()
p3DWin->GetAttr( aSet );
// own UNDO-compounding also around transformation in 3D
- GetView()->BegUndo(String(SdResId(STR_UNDO_APPLY_3D_FAVOURITE)));
+ GetView()->BegUndo(SD_RESSTR(STR_UNDO_APPLY_3D_FAVOURITE));
if(GetView()->IsConvertTo3DObjPossible())
{
@@ -168,7 +168,7 @@ void DrawViewShell::AssignFrom3DWindow()
{
InfoBox aInfoBox (
GetActiveWindow(),
- String(SdResId(STR_ACTION_NOTPOSSIBLE)));
+ SD_RESSTR(STR_ACTION_NOTPOSSIBLE));
aInfoBox.Execute();
}
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 56efdbea2d04..0f30d4148c46 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -205,7 +205,7 @@ FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK *
maPrintableLayers.SetAll();
SetGridCoarse( Size( 1000, 1000 ) );
SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1));
- SetActiveLayer( String( SdResId(STR_LAYER_LAYOUT) ) );
+ SetActiveLayer( SD_RESSTR(STR_LAYER_LAYOUT) );
mbNoColors = sal_True;
mbNoAttribs = sal_False;
maVisArea = Rectangle( Point(), Size(0, 0) );
diff --git a/sd/source/ui/view/outlnvs2.cxx b/sd/source/ui/view/outlnvs2.cxx
index 87086ac60af3..23ead9a52797 100644
--- a/sd/source/ui/view/outlnvs2.cxx
+++ b/sd/source/ui/view/outlnvs2.cxx
@@ -539,7 +539,7 @@ void OutlineViewShell::FuTemporaryModify(SfxRequest &rReq)
case SID_INSERT_FLD_FILE:
{
- String aName;
+ OUString aName;
if( GetDocSh()->HasName() )
aName = GetDocSh()->GetMedium()->GetName();
//else
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 37e28e90846b..d9e72fd641b6 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -782,8 +782,8 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
sal_Bool bDisable = nParaCount == 0;
if (!bDisable && nParaCount == 1)
{
- String aTest( pOutl->GetText( pOutl->GetParagraph( 0 ) ) );
- if (aTest.Len() == 0)
+ OUString aTest = pOutl->GetText(pOutl->GetParagraph(0));
+ if (aTest.isEmpty())
{
bDisable = sal_True;
}
@@ -860,8 +860,8 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
// if not, the templates must not be edited
SfxItemSet aSet(*rSet.GetPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
GetStatusBarState(aSet);
- String aTest(((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue());
- if (aTest.Len() == 0)
+ OUString aTest = ((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue();
+ if (aTest.isEmpty())
{
bUnique = sal_False;
rSet.DisableItem(SID_PRESENTATION_TEMPLATES);
@@ -1335,7 +1335,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
// page view and layout
sal_uInt16 nPageCount = GetDoc()->GetSdPageCount( PK_STANDARD );
- String aPageStr, aLayoutStr;
+ OUString aPageStr, aLayoutStr;
::sd::Window* pWin = GetActiveWindow();
OutlinerView* pActiveView = pOlView->GetViewByWindow( pWin );
@@ -1376,14 +1376,16 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet)
SdrPage* pPage = GetDoc()->GetSdPage( (sal_uInt16) nPos, PK_STANDARD );
- aPageStr = String(SdResId( STR_SD_PAGE ));
- aPageStr += sal_Unicode(' ');
+ aPageStr = SD_RESSTR(STR_SD_PAGE);
+ aPageStr += " ";
aPageStr += OUString::number( (sal_Int32)(nPos + 1) ); // sal_uLong -> sal_Int32
- aPageStr.AppendAscii( " / " );
+ aPageStr += " / ";
aPageStr += OUString::number( nPageCount );
aLayoutStr = pPage->GetLayoutName();
- aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ sal_Int32 nIndex = aLayoutStr.indexOf(SD_LT_SEPARATOR);
+ if (nIndex != -1)
+ aLayoutStr = aLayoutStr.copy(0, nIndex);
}
rSet.Put( SfxStringItem( SID_STATUS_PAGE, aPageStr ) );
rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aLayoutStr ) );
@@ -1466,7 +1468,7 @@ sal_Bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
*/
String OutlineViewShell::GetSelectionText(sal_Bool bCompleteWords)
{
- String aStrSelection;
+ OUString aStrSelection;
::Outliner* pOl = pOlView->GetOutliner();
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
@@ -1475,7 +1477,7 @@ String OutlineViewShell::GetSelectionText(sal_Bool bCompleteWords)
if (bCompleteWords)
{
ESelection aSel = pOutlinerView->GetSelection();
- String aStrCurrentDelimiters = pOl->GetWordDelimiters();
+ OUString aStrCurrentDelimiters = pOl->GetWordDelimiters();
pOl->SetWordDelimiters( OUString( " .,;\"'" ) );
aStrSelection = pOl->GetWord( aSel.nEndPara, aSel.nEndPos );
@@ -1553,7 +1555,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
if( !pStyleSheet )
{
- SfxTemplateItem aItem( nWhich, String() );
+ SfxTemplateItem aItem( nWhich, OUString() );
aAllSet.Put( aItem, aItem.Which() );
// rSet.DisableItem( nWhich );
}
@@ -1568,9 +1570,8 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
{
SfxItemSet aSet(*rSet.GetPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
GetStatusBarState(aSet);
- String aRealStyle(((SfxStringItem&) aSet.Get(SID_STATUS_LAYOUT)).GetValue());
-
- if (!aRealStyle.Len())
+ OUString aRealStyle = ((SfxStringItem&) aSet.Get(SID_STATUS_LAYOUT)).GetValue();
+ if (aRealStyle.isEmpty())
{
// no unique layout name found
rSet.DisableItem(nWhich);
@@ -1676,8 +1677,8 @@ bool OutlineViewShell::UpdateTitleObject( SdPage* pPage, Paragraph* pPara )
SdrTextObj* pTO = pOlView->GetTitleTextObject( pPage );
OutlinerParaObject* pOPO = NULL;
- String aTest( pOutliner->GetText( pPara ) );
- bool bText = aTest.Len() > 0;
+ OUString aTest = pOutliner->GetText(pPara);
+ bool bText = !aTest.isEmpty();
bool bNewObject = false;
if( bText )
@@ -1895,8 +1896,9 @@ sal_uLong OutlineViewShell::Read(SvStream& rInput, const String& rBaseURL, sal_u
else
{
pOutl->SetDepth( pOutl->GetParagraph( nPara ), nDepth - 1 );
- String aStyleSheetName( pOutlSheet->GetName() );
- aStyleSheetName.Erase( aStyleSheetName.Len() - 1, 1 );
+ OUString aStyleSheetName = pOutlSheet->GetName();
+ if (!aStyleSheetName.isEmpty())
+ aStyleSheetName = aStyleSheetName.copy(0, aStyleSheetName.getLength() - 1);
aStyleSheetName += OUString::number( nDepth );
SfxStyleSheetBasePool* pStylePool = GetDoc()->GetStyleSheetPool();
SfxStyleSheet* pStyle = (SfxStyleSheet*) pStylePool->Find( aStyleSheetName, pOutlSheet->GetFamily() );
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 3c863013afd0..c2553e21ec9e 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -432,8 +432,8 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara )
// paragraph
if (nTarget == 1)
{
- String aTest(mrOutliner.GetText( mrOutliner.GetParagraph( 0 ) ));
- if (aTest.Len() == 0)
+ OUString aTest = mrOutliner.GetText(mrOutliner.GetParagraph(0));
+ if (aTest.isEmpty())
{
nTarget = 0;
}
@@ -630,8 +630,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if( mpProgress )
delete mpProgress;
- const String aStr(SdResId(STR_CREATE_PAGES));
- mpProgress = new SfxProgress( GetDocSh(), aStr, mnPagesToProcess );
+ mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_CREATE_PAGES), mnPagesToProcess );
}
else
{
@@ -775,8 +774,9 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner *, pOutliner )
if( nDepth > 0 )
{
- String aNewStyleSheetName( pStyleSheet->GetName() );
- aNewStyleSheetName.Erase( aNewStyleSheetName.Len()-1, 1 );
+ OUString aNewStyleSheetName = pStyleSheet->GetName();
+ if (!aNewStyleSheetName.isEmpty())
+ aNewStyleSheetName = aNewStyleSheetName.copy(0, aNewStyleSheetName.getLength() - 1);
aNewStyleSheetName += OUString::number( nDepth+1 );
SfxStyleSheetBasePool* pStylePool = mrDoc.GetStyleSheetPool();
pStyleSheet = (SfxStyleSheet*) pStylePool->Find( aNewStyleSheetName, pStyleSheet->GetFamily() );
@@ -1069,8 +1069,7 @@ sal_Bool OutlineView::PrepareClose(sal_Bool)
mrOutliner.GetUndoManager().Clear();
- const String aUndoStr(SdResId(STR_UNDO_CHANGE_TITLE_AND_LAYOUT));
- BegUndo(aUndoStr);
+ BegUndo(SD_RESSTR(STR_UNDO_CHANGE_TITLE_AND_LAYOUT));
UpdateDocument();
EndUndo();
mrDoc.SetSelected(GetActualPage(), sal_True);
@@ -1145,7 +1144,7 @@ void OutlineView::FillOutliner()
if( pPara == 0 ) // no title, insert an empty paragraph
{
- pPara = mrOutliner.Insert(String());
+ pPara = mrOutliner.Insert(OUString());
mrOutliner.SetDepth(pPara, -1);
// do not apply hard attributes from the previous paragraph
@@ -1233,8 +1232,7 @@ IMPL_LINK_NOARG(OutlineView, RemovingPagesHdl)
if( mpProgress )
delete mpProgress;
- String aStr(SdResId(STR_DELETE_PAGES));
- mpProgress = new SfxProgress( GetDocSh(), aStr, mnPagesToProcess );
+ mpProgress = new SfxProgress( GetDocSh(), SD_RESSTR(STR_DELETE_PAGES), mnPagesToProcess );
}
mrOutliner.UpdateFields();
@@ -1540,10 +1538,8 @@ void OutlineView::IgnoreCurrentPageChanges (bool bIgnoreChanges)
and or the drawing document model. It will create needed undo actions */
void OutlineView::BeginModelChange()
{
- const String aEmpty;
- mrOutliner.GetUndoManager().EnterListAction(aEmpty,aEmpty);
- const String aUndoStr(SdResId(STR_UNDO_CHANGE_TITLE_AND_LAYOUT));
- BegUndo(aUndoStr);
+ mrOutliner.GetUndoManager().EnterListAction("", "");
+ BegUndo(SD_RESSTR(STR_UNDO_CHANGE_TITLE_AND_LAYOUT));
}
/** call this method after BeginModelChange(), when all possible model
@@ -1773,7 +1769,7 @@ IMPL_LINK(OutlineView, PaintingFirstLineHdl, PaintFirstLineInfo*, pInfo)
aNewFont.SetOrientation( bVertical ? 2700 : 0 );
aNewFont.SetColor( COL_AUTO );
pInfo->mpOutDev->SetFont( aNewFont );
- String aPageText = OUString::number( nPage );
+ OUString aPageText = OUString::number( nPage );
Size aTextSz;
aTextSz.Width() = pInfo->mpOutDev->GetTextWidth( aPageText );
aTextSz.Height() = pInfo->mpOutDev->GetTextHeight();
@@ -1863,8 +1859,9 @@ void OutlineView::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
const sal_Int16 nDepth = mrOutliner.GetDepth( nPara );
if( nDepth > 0 )
{
- String aStyleSheetName( pStyle->GetName() );
- aStyleSheetName.Erase( aStyleSheetName.Len() - 1, 1 );
+ OUString aStyleSheetName = pStyle->GetName();
+ if (!aStyleSheetName.isEmpty())
+ aStyleSheetName = aStyleSheetName.copy(0, aStyleSheetName.getLength() - 1);
aStyleSheetName += OUString::number( nDepth );
pStyle = static_cast<SfxStyleSheet*>( pStylePool->Find( aStyleSheetName, pStyle->GetFamily() ) );
DBG_ASSERT( pStyle, "sd::OutlineView::OnEndPasteOrDrop(), Style not found!" );
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index bf342e0ea476..9b165c672be8 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -132,7 +132,7 @@ View::View(SdDrawDocument& rDrawDoc, OutputDevice* pOutDev,
SetMinMoveDistancePixel(2);
SetHitTolerancePixel(2);
- SetMeasureLayer(String(SdResId(STR_LAYER_MEASURELINES)));
+ SetMeasureLayer(SD_RESSTR(STR_LAYER_MEASURELINES));
// Timer for delayed drop (has to be for MAC)
maDropErrorTimer.SetTimeoutHdl( LINK(this, View, DropErrorHdl) );
@@ -297,7 +297,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
// is displayed as page directly (MasterPage view)
if(!bSubContentProcessing && bIsMasterPageObject)
{
- String aObjectString;
+ OUString aObjectString;
switch( eKind )
{
@@ -305,7 +305,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
{
- static String aTitleAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_TITLE ) );
+ static OUString aTitleAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_TITLE));
aObjectString = aTitleAreaStr;
}
@@ -313,31 +313,31 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
}
case PRESOBJ_OUTLINE:
{
- static String aOutlineAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_OUTLINE ) );
+ static OUString aOutlineAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_OUTLINE));
aObjectString = aOutlineAreaStr;
break;
}
case PRESOBJ_FOOTER:
{
- static String aFooterAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_FOOTER ) );
+ static OUString aFooterAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_FOOTER));
aObjectString = aFooterAreaStr;
break;
}
case PRESOBJ_HEADER:
{
- static String aHeaderAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_HEADER ) );
+ static OUString aHeaderAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_HEADER));
aObjectString = aHeaderAreaStr;
break;
}
case PRESOBJ_DATETIME:
{
- static String aDateTimeStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_DATETIME ) );
+ static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_DATETIME));
aObjectString = aDateTimeStr;
break;
}
case PRESOBJ_NOTES:
{
- static String aDateTimeStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_NOTES ) );
+ static OUString aDateTimeStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NOTES));
aObjectString = aDateTimeStr;
break;
}
@@ -345,12 +345,12 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
{
if(pObjectsSdPage && pObjectsSdPage->GetPageKind() == PK_STANDARD)
{
- static String aSlideAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_SLIDE ) );
+ static OUString aSlideAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_SLIDE));
aObjectString = aSlideAreaStr;
}
else
{
- static String aNumberAreaStr( SdResId( STR_PLACEHOLDER_DESCRIPTION_NUMBER ) );
+ static OUString aNumberAreaStr(SD_RESSTR(STR_PLACEHOLDER_DESCRIPTION_NUMBER));
aObjectString = aNumberAreaStr;
}
break;
@@ -361,7 +361,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
}
}
- if( aObjectString.Len() )
+ if( !aObjectString.isEmpty() )
{
// decompose object matrix to be able to place text correctly
basegfx::B2DTuple aScale;
@@ -384,7 +384,7 @@ drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedP
// get basic geometry and get text size
drawinglayer::primitive2d::TextLayouterDevice aTextLayouter;
aTextLayouter.setFont(aScaledVclFont);
- const xub_StrLen nTextLength(aObjectString.Len());
+ const sal_Int32 nTextLength(aObjectString.getLength());
// do not forget to use the factor again to get the width for the 500
const double fTextWidth(aTextLayouter.getTextWidth(aObjectString, 0, nTextLength) * (1.0 / nTextSizeFactor));
@@ -892,7 +892,7 @@ void View::SetMarkedOriginalSize()
if( bOK )
{
- pUndoGroup->SetComment( String(SdResId(STR_UNDO_ORIGINALSIZE)) );
+ pUndoGroup->SetComment(SD_RESSTR(STR_UNDO_ORIGINALSIZE));
mpDocSh->GetUndoManager()->AddUndoAction(pUndoGroup);
}
else
@@ -1206,8 +1206,9 @@ void View::OnEndPasteOrDrop( PasteOrDropInfos* pInfos )
SfxStyleSheet* pStyle = 0;
if( nDepth > 0 )
{
- String aStyleSheetName( pStyleSheet->GetName() );
- aStyleSheetName.Erase( aStyleSheetName.Len() - 1, 1 );
+ OUString aStyleSheetName( pStyleSheet->GetName() );
+ if (!aStyleSheetName.isEmpty())
+ aStyleSheetName = aStyleSheetName.copy(0, aStyleSheetName.getLength() - 1);
aStyleSheetName += OUString::number( nDepth );
pStyle = static_cast<SfxStyleSheet*>( pStylePool->Find( aStyleSheetName, pStyleSheet->GetFamily() ) );
DBG_ASSERT( pStyle, "sd::View::OnEndPasteOrDrop(), Style not found!" );
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 7fd7d8f55c04..caa35322ae46 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -172,7 +172,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
SD_MOD()->pTransferDrag = pTransferable;
TransferableObjectDescriptor aObjDesc;
- String aDisplayName;
+ OUString aDisplayName;
SdrOle2Obj* pSdrOleObj = NULL;
if( GetMarkedObjectCount() == 1 )
@@ -221,7 +221,7 @@ struct SdNavigatorDropEvent : public ExecuteDropEvent
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable > xRet( pTransferable );
TransferableObjectDescriptor aObjDesc;
const Rectangle aMarkRect( GetAllMarkedRect() );
- String aDisplayName;
+ OUString aDisplayName;
SD_MOD()->pTransferSelection = pTransferable;
@@ -266,10 +266,10 @@ void View::DoCut(::Window* )
( (OutlinerView*) pOLV)->Cut();
else if( AreObjectsMarked() )
{
- String aStr( SdResId(STR_UNDO_CUT) );
+ OUString aStr(SD_RESSTR(STR_UNDO_CUT));
DoCopy();
- BegUndo( ( aStr += sal_Unicode(' ') ) += GetDescriptionOfMarkedObjects() );
+ BegUndo(aStr + " " + GetDescriptionOfMarkedObjects());
DeleteMarked();
EndUndo();
}
@@ -397,10 +397,8 @@ void View::StartDrag( const Point& rStartPos, ::Window* pWindow )
if( IsUndoEnabled() )
{
- String aStr( SdResId(STR_UNDO_DRAGDROP) );
- aStr += sal_Unicode(' ');
- aStr += mpDragSrcMarkList->GetMarkDescription();
- BegUndo(aStr);
+ OUString aStr(SD_RESSTR(STR_UNDO_DRAGDROP));
+ BegUndo(aStr + " " + mpDragSrcMarkList->GetMarkDescription());
}
CreateDragDataObject( this, *pWindow, rStartPos );
}
@@ -475,7 +473,7 @@ void View::DragFinished( sal_Int8 nDropAction )
sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper,
::sd::Window*, sal_uInt16, sal_uInt16 nLayer )
{
- String aLayerName( GetActiveLayer() );
+ OUString aLayerName = GetActiveLayer();
SdrPageView* pPV = GetSdrPageView();
sal_Int8 nDropAction = rEvt.mnAction;
sal_Int8 nRet = DND_ACTION_NONE;
@@ -657,7 +655,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
::sd::Window* pTargetWindow, sal_uInt16 nPage, sal_uInt16 nLayer )
{
SdrPageView* pPV = GetSdrPageView();
- String aActiveLayer = GetActiveLayer();
+ OUString aActiveLayer = GetActiveLayer();
sal_Int8 nDropAction = rEvt.mnAction;
sal_Int8 nRet = DND_ACTION_NONE;
@@ -736,7 +734,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
// special insert?
if( !nRet && mpViewSh )
{
- String aTmpString1, aTmpString2;
+ OUString aTmpString1, aTmpString2;
INetBookmark aINetBookmark( aTmpString1, aTmpString2 );
// insert bookmark
@@ -824,7 +822,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, DropTargetHelper& rTar
else if( mpViewSh->ISA( DrawViewShell ) )
{
// insert as normal URL button
- ( (DrawViewShell*) mpViewSh )->InsertURLButton( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), String(), &aPos );
+ ( (DrawViewShell*) mpViewSh )->InsertURLButton( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), OUString(), &aPos );
nRet = nDropAction;
}
}
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index cdbe0aeb2a3d..f0f21cf2e0f1 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -317,7 +317,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
pImageMap = new ImageMap;
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pImageMap->Read( *xStm, String() );
+ pImageMap->Read( *xStm, OUString() );
}
}
@@ -372,7 +372,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
SdrLayerAdmin& rLayerAdmin = mrDoc.GetLayerAdmin();
SdrLayer* pLayer = rLayerAdmin.GetLayerPerID( nLayer );
SdrPageView* pPV = GetSdrPageView();
- String aLayer( pLayer->GetName() );
+ OUString aLayer = pLayer->GetName();
if( !pPV->IsLayerLocked( aLayer ) )
{
@@ -389,7 +389,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
// #i11702#
if( IsUndoEnabled() )
{
- BegUndo(String(SdResId(STR_MODIFYLAYER)));
+ BegUndo(SD_RESSTR(STR_MODIFYLAYER));
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoObjectLayerChange(*pO, pO->GetLayer(), (SdrLayerID)nLayer));
EndUndo();
}
@@ -415,7 +415,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( pPage )
{
// drop on other page
- String aActiveLayer( GetActiveLayer() );
+ OUString aActiveLayer = GetActiveLayer();
if( !pPV->IsLayerLocked( aActiveLayer ) )
{
@@ -473,7 +473,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( IsUndoEnabled() )
{
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
+ BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP));
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoNewObject(*pObj));
EndUndo();
}
@@ -606,8 +606,10 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !pPage )
pPage = (SdPage*) GetSdrPageView()->GetPage();
- String aLayout( pPage->GetLayoutName() );
- aLayout.Erase( aLayout.SearchAscii( SD_LT_SEPARATOR ) );
+ OUString aLayout = pPage->GetLayoutName();
+ sal_Int32 nPos = aLayout.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aLayout = aLayout.copy(0, nPos);
pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
pSourceDoc->CreatingDataObj( NULL );
}
@@ -645,8 +647,10 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !pPage )
pPage = (SdPage*) GetSdrPageView()->GetPage();
- String aLayout(pPage->GetLayoutName());
- aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
+ OUString aLayout = pPage->GetLayoutName();
+ sal_Int32 nPos = aLayout.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aLayout = aLayout.copy(0, nPos);
pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
}
@@ -707,7 +711,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo( String( SdResId(STR_UNDO_DRAGDROP ) ) );
+ BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP));
pNewObj->NbcSetLayer( pPickObj->GetLayer() );
SdrPage* pWorkPage = GetSdrPageView()->GetPage();
pWorkPage->InsertObject( pNewObj );
@@ -737,7 +741,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
const bool bUndo = IsUndoEnabled();
if( bUndo )
{
- BegUndo( String( SdResId( STR_UNDO_DRAGDROP ) ) );
+ BegUndo( SD_RESSTR(STR_UNDO_DRAGDROP) );
AddUndo( mrDoc.GetSdrUndoFactory().CreateUndoAttrObject( *pPickObj ) );
}
@@ -848,7 +852,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
::sd::DrawDocShellRef xDocShRef( new ::sd::DrawDocShell( SFX_CREATE_MODE_EMBEDDED, sal_True, mrDoc.GetDocumentType() ) );
// mba: BaseURL doesn't make sense for clipboard functionality
- SfxMedium *pMedium = new SfxMedium( xStore, String() );
+ SfxMedium *pMedium = new SfxMedium( xStore, OUString() );
if( xDocShRef->DoLoad( pMedium ) )
{
SdDrawDocument* pModel = (SdDrawDocument*) xDocShRef->GetDoc();
@@ -879,8 +883,10 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( !pPage )
pPage = (SdPage*) GetSdrPageView()->GetPage();
- String aLayout(pPage->GetLayoutName());
- aLayout.Erase(aLayout.SearchAscii(SD_LT_SEPARATOR));
+ OUString aLayout = pPage->GetLayoutName();
+ sal_Int32 nPos = aLayout.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aLayout = aLayout.copy(0, nPos);
pPage->SetPresentationLayout( aLayout, sal_False, sal_False );
}
@@ -1291,7 +1297,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( IsUndoEnabled() )
{
- BegUndo( String( SdResId( STR_UNDO_DRAGDROP ) ) );
+ BegUndo( SD_RESSTR(STR_UNDO_DRAGDROP) );
AddUndo( GetModel()->GetSdrUndoFactory().CreateUndoAttrObject( *pPickObj ) );
EndUndo();
}
@@ -1304,7 +1310,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
const XFillColorItem& rColItem = (XFillColorItem&) rSet.Get( XATTR_FILLCOLOR );
Color aColor( rColItem.GetColorValue() );
- String aName( rColItem.GetName() );
+ OUString aName( rColItem.GetName() );
SfxItemSet aSet( mrDoc.GetPool() );
sal_Bool bClosed = pPickObj->IsClosedObj();
::sd::Window* pWin = mpViewSh->GetActiveWindow();
@@ -1351,7 +1357,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
{
xStm->Seek( 0 );
// mba: clipboard always must contain absolute URLs (could be from alien source)
- bReturn = SdrView::Paste( *xStm, String(), EE_FORMAT_HTML, maDropPos, pPage, nPasteOptions );
+ bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_HTML, maDropPos, pPage, nPasteOptions );
}
}
@@ -1373,14 +1379,14 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_BIN, sal_False, mpDocSh->GetHeaderAttributes() );
+ pOLV->Read( *xStm, OUString(), EE_FORMAT_BIN, sal_False, mpDocSh->GetHeaderAttributes() );
bReturn = true;
}
}
if( !bReturn )
// mba: clipboard always must contain absolute URLs (could be from alien source)
- bReturn = SdrView::Paste( *xStm, String(), EE_FORMAT_BIN, maDropPos, pPage, nPasteOptions );
+ bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_BIN, maDropPos, pPage, nPasteOptions );
}
}
@@ -1408,14 +1414,14 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if( aRect.IsInside( aPos ) || ( !bDrag && IsTextEdit() ) )
{
// mba: clipboard always must contain absolute URLs (could be from alien source)
- pOLV->Read( *xStm, String(), EE_FORMAT_RTF, sal_False, mpDocSh->GetHeaderAttributes() );
+ pOLV->Read( *xStm, OUString(), EE_FORMAT_RTF, sal_False, mpDocSh->GetHeaderAttributes() );
bReturn = true;
}
}
if( !bReturn )
// mba: clipboard always must contain absolute URLs (could be from alien source)
- bReturn = SdrView::Paste( *xStm, String(), EE_FORMAT_RTF, maDropPos, pPage, nPasteOptions );
+ bReturn = SdrView::Paste( *xStm, OUString(), EE_FORMAT_RTF, maDropPos, pPage, nPasteOptions );
}
}
}
@@ -1439,7 +1445,7 @@ sal_Bool View::InsertData( const TransferableDataHelper& rDataHelper,
if(!bReturn && CHECK_FORMAT_TRANS(FORMAT_FILE))
{
- String aDropFile;
+ OUString aDropFile;
if( aDataHelper.GetString( FORMAT_FILE, aDropFile ) )
{
diff --git a/sd/source/ui/view/sdview4.cxx b/sd/source/ui/view/sdview4.cxx
index 067b677a1f0c..666f19984cd9 100644
--- a/sd/source/ui/view/sdview4.cxx
+++ b/sd/source/ui/view/sdview4.cxx
@@ -100,7 +100,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
if(bIsGraphic || (pPickObj && pPickObj->IsEmptyPresObj() && !bOnMaster)) // #i121603# Do not use pObj, it may be NULL
{
if( IsUndoEnabled() )
- BegUndo(String(SdResId(STR_INSERTGRAPHIC)));
+ BegUndo(SD_RESSTR(STR_INSERTGRAPHIC));
SdPage* pPage = (SdPage*) pPickObj->GetPage();
@@ -144,7 +144,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
// fill object with graphic
if( IsUndoEnabled() )
{
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
+ BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP));
AddUndo(GetModel()->GetSdrUndoFactory().CreateUndoAttrObject(*pPickObj));
EndUndo();
}
@@ -225,7 +225,7 @@ SdrGrafObj* View::InsertGraphic( const Graphic& rGraphic, sal_Int8& rAction,
const bool bUndo = IsUndoEnabled();
if( bUndo )
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
+ BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP));
pNewGrafObj->NbcSetLayer(pPickObj->GetLayer());
SdrPage* pP = pPV->GetPage();
pP->InsertObject(pNewGrafObj);
@@ -303,7 +303,7 @@ SdrMediaObj* View::InsertMediaURL( const OUString& rMediaURL, sal_Int8& rAction,
pNewMediaObj = static_cast< SdrMediaObj* >( pPickObj->Clone() );
pNewMediaObj->setURL( realURL );
- BegUndo(String(SdResId(STR_UNDO_DRAGDROP)));
+ BegUndo(SD_RESSTR(STR_UNDO_DRAGDROP));
ReplaceObjectAtView(pPickObj, *pPV, pNewMediaObj);
EndUndo();
}
@@ -359,11 +359,11 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
SfxErrorContext aEc( ERRCTX_ERROR, mpViewSh->GetActiveWindow(), RID_SO_ERRCTX );
ErrCode nError = 0;
- ::std::vector< String >::const_iterator aIter( maDropFileVector.begin() );
+ ::std::vector< OUString >::const_iterator aIter( maDropFileVector.begin() );
while( (aIter != maDropFileVector.end()) && !nError )
{
- String aCurrentDropFile( *aIter );
+ OUString aCurrentDropFile( *aIter );
INetURLObject aURL( aCurrentDropFile );
sal_Bool bOK = sal_False;
@@ -388,7 +388,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
SdrGrafObj* pGrafObj = InsertGraphic( aGraphic, nTempAction, maDropPos, NULL, NULL );
if(pGrafObj && bLink)
{
- pGrafObj->SetGraphicLink( aCurrentDropFile, String() );
+ pGrafObj->SetGraphicLink( aCurrentDropFile, OUString() );
}
// return action from first inserted graphic
@@ -406,23 +406,22 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
if( pFoundFilter && !nErr )
{
::std::vector< OUString > aFilterVector;
- const String aFilterName( pFoundFilter->GetFilterName() );
- String aLowerAsciiFileName( aCurrentDropFile );
- aLowerAsciiFileName.ToLowerAscii();
+ OUString aFilterName = pFoundFilter->GetFilterName();
+ OUString aLowerAsciiFileName = aCurrentDropFile.toAsciiLowerCase();
FuInsertFile::GetSupportedFilterVector( aFilterVector );
if( ( ::std::find( aFilterVector.begin(), aFilterVector.end(), pFoundFilter->GetMimeType() ) != aFilterVector.end() ) ||
- aFilterName.SearchAscii( "Text" ) != STRING_NOTFOUND ||
- aFilterName.SearchAscii( "Rich" ) != STRING_NOTFOUND ||
- aFilterName.SearchAscii( "RTF" ) != STRING_NOTFOUND ||
- aFilterName.SearchAscii( "HTML" ) != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".sdd") != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".sda") != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".sxd") != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".sxi") != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".std") != STRING_NOTFOUND ||
- aLowerAsciiFileName.SearchAscii(".sti") != STRING_NOTFOUND )
+ aFilterName.indexOf( "Text" ) != -1 ||
+ aFilterName.indexOf( "Rich" ) != -1 ||
+ aFilterName.indexOf( "RTF" ) != -1 ||
+ aFilterName.indexOf( "HTML" ) != -1 ||
+ aLowerAsciiFileName.indexOf(".sdd") != -1 ||
+ aLowerAsciiFileName.indexOf(".sda") != -1 ||
+ aLowerAsciiFileName.indexOf(".sxd") != -1 ||
+ aLowerAsciiFileName.indexOf(".sxi") != -1 ||
+ aLowerAsciiFileName.indexOf(".std") != -1 ||
+ aLowerAsciiFileName.indexOf(".sti") != -1 )
{
::sd::Window* pWin = mpViewSh->GetActiveWindow();
SfxRequest aReq(SID_INSERTFILE, 0, mrDoc.GetItemPool());
@@ -459,7 +458,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
InsertMediaURL( aCurrentDropFile, mnAction, maDropPos, aPrefSize, true ) ;
}
else if( mnAction & DND_ACTION_LINK )
- static_cast< DrawViewShell* >( mpViewSh )->InsertURLButton( aCurrentDropFile, aCurrentDropFile, String(), &maDropPos );
+ static_cast< DrawViewShell* >( mpViewSh )->InsertURLButton( aCurrentDropFile, aCurrentDropFile, OUString(), &maDropPos );
else
{
if( mpViewSh )
@@ -470,7 +469,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
OUString aName;
uno::Sequence < beans::PropertyValue > aMedium(1);
aMedium[0].Name = "URL" ;
- aMedium[0].Value <<= OUString(aCurrentDropFile) ;
+ aMedium[0].Value <<= aCurrentDropFile ;
uno::Reference < embed::XEmbeddedObject > xObj = mpDocSh->GetEmbeddedObjectContainer().
InsertEmbeddedObject( aMedium, aName );
@@ -546,7 +545,7 @@ IMPL_LINK_NOARG(View, DropInsertFileHdl)
*/
IMPL_LINK_NOARG(View, DropErrorHdl)
{
- InfoBox( mpViewSh ? mpViewSh->GetActiveWindow() : 0, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
+ InfoBox( mpViewSh ? mpViewSh->GetActiveWindow() : 0, SD_RESSTR(STR_ACTION_NOTPOSSIBLE) ).Execute();
return 0;
}
diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx
index 92168e298c89..379296e0a795 100644
--- a/sd/source/ui/view/tabcontr.cxx
+++ b/sd/source/ui/view/tabcontr.cxx
@@ -324,7 +324,7 @@ long TabControl::AllowRenaming()
sal_Bool bOK = sal_True;
String aNewName( GetEditText() );
- String aCompareName( GetPageText( GetEditPageId() ) );
+ OUString aCompareName( GetPageText( GetEditPageId() ) );
if( aCompareName != aNewName )
{