summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-16 15:30:04 +0200
committerNoel Grandin <noel@peralex.com>2013-10-18 09:59:31 +0200
commit218775e19cee88cdf7dae1ead787cb4274f52cd4 (patch)
treea151a84be487380857dfd075d9797aee87217c11 /reportdesign
parentcc10a8a4672d85a38164cac3735a830bf75638be (diff)
convert String to OUString in reportdesign module
Change-Id: I6c154dff7c613c8975136f2934df3b0f385dade4
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/inc/UndoActions.hxx4
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx4
-rw-r--r--reportdesign/source/core/sdr/RptObject.cxx2
-rw-r--r--reportdesign/source/core/sdr/UndoActions.cxx2
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx2
-rw-r--r--reportdesign/source/ui/dlg/CondFormat.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx6
-rw-r--r--reportdesign/source/ui/dlg/DateTime.cxx4
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx26
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx4
-rw-r--r--reportdesign/source/ui/dlg/dlgpage.cxx2
-rw-r--r--reportdesign/source/ui/inc/Formula.hxx2
-rw-r--r--reportdesign/source/ui/inc/metadata.hxx8
-rw-r--r--reportdesign/source/ui/inspection/DataProviderHandler.cxx6
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx2
-rw-r--r--reportdesign/source/ui/inspection/GeometryHandler.cxx64
-rw-r--r--reportdesign/source/ui/inspection/metadata.cxx28
-rw-r--r--reportdesign/source/ui/misc/UITools.cxx10
-rw-r--r--reportdesign/source/ui/misc/statusbarcontroller.cxx2
-rw-r--r--reportdesign/source/ui/misc/toolboxcontroller.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx40
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx4
-rw-r--r--reportdesign/source/ui/report/SectionWindow.cxx8
-rw-r--r--reportdesign/source/ui/report/ViewsWindow.cxx2
-rw-r--r--reportdesign/source/ui/report/propbrw.cxx10
25 files changed, 123 insertions, 123 deletions
diff --git a/reportdesign/inc/UndoActions.hxx b/reportdesign/inc/UndoActions.hxx
index 4f8a1d8ec65b..ad7f4ce15ecd 100644
--- a/reportdesign/inc/UndoActions.hxx
+++ b/reportdesign/inc/UndoActions.hxx
@@ -116,7 +116,7 @@ namespace rptui
UndoContext( SfxUndoManager& i_undoManager, const OUString& i_undoTitle )
:m_rUndoManager( i_undoManager )
{
- m_rUndoManager.EnterListAction( i_undoTitle, String() );
+ m_rUndoManager.EnterListAction( i_undoTitle, OUString() );
}
~UndoContext()
@@ -155,7 +155,7 @@ namespace rptui
class REPORTDESIGN_DLLPUBLIC OCommentUndoAction : public SdrUndoAction
{
protected:
- String m_strComment; // undo, redo comment
+ OUString m_strComment; // undo, redo comment
::dbaui::IController* m_pController;
public:
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index ca0c8ebcdab4..709a1c9459af 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -194,8 +194,8 @@ OUString OReportEngineJFree::getNewOutputName()
aConvertedProperties[nPos].Name = OUString("OutputStorage");
OUString sFileURL;
- String sName = m_xReport->getCaption();
- if ( !sName.Len() )
+ OUString sName = m_xReport->getCaption();
+ if ( sName.isEmpty() )
sName = m_xReport->getName();
{
::utl::TempFile aTestFile(sName, false, &sExt);
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 37f61dd07509..dbb11c138584 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -855,7 +855,7 @@ OUString OUnoObject::GetDefaultName(const OUnoObject* _pObj)
}
if (nResId)
- aDefaultName = OUString( String(ModuleRes(nResId)) );
+ aDefaultName = ModuleRes(nResId);
return aDefaultName;
}
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index b43033724c01..ec39535c4678 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -91,7 +91,7 @@ OCommentUndoAction::OCommentUndoAction(SdrModel& _rMod,sal_uInt16 nCommentID)
DBG_CTOR(rpt_OCommentUndoAction,NULL);
m_pController = static_cast< OReportModel& >( _rMod ).getController();
if ( nCommentID )
- m_strComment = String(ModuleRes(nCommentID));
+ m_strComment = ModuleRes(nCommentID);
}
OCommentUndoAction::~OCommentUndoAction()
{
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index cf3686e7adcb..5b4212f4a3d8 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -184,7 +184,7 @@ OAddFieldWindow::OAddFieldWindow(Window* pParent
m_pListBox->SetDeselectHdl(LINK( this, OAddFieldWindow, OnSelectHdl ) );
m_pListBox->SetDoubleClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) );
m_pListBox->Show();
- const String sTitle(ModuleRes(RID_STR_INSERT));
+ const OUString sTitle(ModuleRes(RID_STR_INSERT));
m_aInsertButton.SetText(sTitle);
m_aInsertButton.SetClickHdl(LINK( this, OAddFieldWindow, OnDoubleClickHdl ) );
m_aInsertButton.Show();
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index 5839248267ed..3b6d97d37304 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -449,7 +449,7 @@ namespace rptui
short nRet = ModalDialog::Execute();
if ( nRet == RET_OK )
{
- const String sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) );
+ const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CONDITIONAL_FORMATTING ) );
const UndoContext aUndoContext( m_rController.getUndoManager(), sUndoAction );
try
{
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 854ec4d6b705..5b152c83272c 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -144,7 +144,7 @@ OColorPopup::OColorPopup(Window* _pParent,Condition* _pCondition)
long nCount = pColorList->Count();
XColorEntry* pEntry = NULL;
Color aColWhite( COL_WHITE );
- String aStrWhite( ModuleRes(STR_COLOR_WHITE) );
+ OUString aStrWhite( ModuleRes(STR_COLOR_WHITE) );
if ( nCount > PALETTE_SIZE )
// Show scrollbar if more than PALLETTE_SIZE colors are available
@@ -199,7 +199,7 @@ void OColorPopup::SetSlotId(sal_uInt16 _nSlotId)
if ( SID_ATTR_CHAR_COLOR_BACKGROUND == _nSlotId || SID_BACKGROUND_COLOR == _nSlotId )
{
m_aColorSet.SetStyle( m_aColorSet.GetStyle() | WB_NONEFIELD );
- m_aColorSet.SetText( String(ModuleRes( STR_TRANSPARENT )) );
+ m_aColorSet.SetText( OUString(ModuleRes( STR_TRANSPARENT )) );
}
}
// -----------------------------------------------------------------------------
@@ -333,7 +333,7 @@ IMPL_LINK( Condition, DropdownClick, ToolBox*, /*pToolBar*/ )
break;
}
if ( nTextId )
- m_pColorFloat->SetText(String(ModuleRes(nTextId)));
+ m_pColorFloat->SetText(OUString(ModuleRes(nTextId)));
m_pColorFloat->SetSlotId(nId);
m_pColorFloat->SetPosPixel(m_aActions.GetItemPopupPosition(nId,m_pColorFloat->GetSizePixel()));
m_pColorFloat->StartPopupMode(&m_aActions);
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx
index 43b4198a90b5..ea2f473d3b4f 100644
--- a/reportdesign/source/ui/dlg/DateTime.cxx
+++ b/reportdesign/source/ui/dlg/DateTime.cxx
@@ -146,12 +146,12 @@ short ODateTimeDialog::Execute()
sal_Int32 nWidth = 0;
if ( m_pDate->IsChecked() )
{
- String sDateFormat = m_pDateListBox->GetEntry( m_pDateListBox->GetSelectEntryPos() );
+ OUString sDateFormat = m_pDateListBox->GetEntry( m_pDateListBox->GetSelectEntryPos() );
nWidth = LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM);
}
if ( m_pTime->IsChecked() )
{
- String sDateFormat = m_pTimeListBox->GetEntry( m_pTimeListBox->GetSelectEntryPos() );
+ OUString sDateFormat = m_pTimeListBox->GetEntry( m_pTimeListBox->GetSelectEntryPos() );
nWidth = ::std::max<sal_Int32>(LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM),nWidth);
}
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 5a09d586b8ff..0bfdd4652cb8 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -297,7 +297,7 @@ void OFieldExpressionControl::moveGroups(const uno::Sequence<uno::Any>& _aGroups
m_bIgnoreEvent = true;
{
sal_Int32 nRow = _nRow;
- const String sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_MOVE_GROUP));
const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction );
uno::Reference< report::XGroups> xGroups = m_pParent->getGroups();
@@ -358,7 +358,7 @@ void OFieldExpressionControl::lateInit()
SetFont(aFont);
InsertHandleColumn(static_cast<sal_uInt16>(GetTextWidth(OUString('0')) * 4)/*, sal_True */);
- InsertDataColumn( FIELD_EXPRESSION, String(ModuleRes(STR_RPT_EXPRESSION)), 100);
+ InsertDataColumn( FIELD_EXPRESSION, OUString(ModuleRes(STR_RPT_EXPRESSION)), 100);
m_pComboCell = new ComboBoxControl( &GetDataWindow() );
m_pComboCell->SetSelectHdl(LINK(this,OFieldExpressionControl,CBChangeHdl));
@@ -422,8 +422,8 @@ sal_Bool OFieldExpressionControl::SaveModified(bool _bAppendRow)
if ( m_aGroupPositions[nRow] == NO_GROUP )
{
bAppend = sal_True;
- String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
- m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() );
+ OUString sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
+ m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, OUString() );
xGroup = m_pParent->getGroups()->createGroup();
xGroup->setHeaderOn(sal_True);
@@ -566,7 +566,7 @@ sal_Bool OFieldExpressionControl::SeekRow( long _nRow )
void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const Rectangle& rRect, sal_uInt16 nColumnId ) const
{
DBG_CHKTHIS( rpt_OFieldExpressionControl,NULL);
- String aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId );
+ OUString aText =const_cast< OFieldExpressionControl*>(this)->GetCellText( m_nCurrentPos, nColumnId );
Point aPos( rRect.TopLeft() );
Size aTextSize( GetDataWindow().GetTextHeight(),GetDataWindow().GetTextWidth( aText ));
@@ -778,8 +778,8 @@ void OFieldExpressionControl::DeleteRows()
if ( bFirstTime )
{
bFirstTime = false;
- String sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION));
- m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, String() );
+ OUString sUndoAction(ModuleRes(RID_STR_UNDO_REMOVE_SELECTION));
+ m_pParent->m_pController->getUndoManager().EnterListAction( sUndoAction, OUString() );
}
sal_Int32 nGroupPos = m_aGroupPositions[nIndex];
@@ -885,7 +885,7 @@ void OFieldExpressionControl::InsertRows( long nRow )
{
m_bIgnoreEvent = false;
{
- const String sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_APPEND_GROUP));
const UndoContext aUndoContext( m_pParent->m_pController->getUndoManager(), sUndoAction );
uno::Reference<report::XGroups> xGroups = m_pParent->getGroups();
@@ -984,7 +984,7 @@ OGroupsSortingDialog::OGroupsSortingDialog( Window* _pParent
for (size_t i = 0; i < sizeof (pControlsLst) / sizeof (pControlsLst[0]); ++i)
{
pControls[i]->Show(sal_True);
- String sText = pControls[i]->GetText();
+ OUString sText = pControls[i]->GetText();
OUString sNewText = aMnemonicGenerator.CreateMnemonic(sText);
if ( sText != sNewText )
pControls[i]->SetText(sNewText);
@@ -1253,7 +1253,7 @@ IMPL_LINK( OGroupsSortingDialog, LBChangeHdl, ListBox*, pListBox )
// -----------------------------------------------------------------------------
void OGroupsSortingDialog::showHelpText(sal_uInt16 _nResId)
{
- m_aHelpWindow.SetText(String(ModuleRes(_nResId)));
+ m_aHelpWindow.SetText(OUString(ModuleRes(_nResId)));
}
// -----------------------------------------------------------------------------
void OGroupsSortingDialog::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) throw( uno::RuntimeException)
@@ -1288,7 +1288,7 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
case sdbc::DataType::LONGVARCHAR:
case sdbc::DataType::VARCHAR:
case sdbc::DataType::CHAR:
- m_aGroupOnLst.InsertEntry(String(ModuleRes(STR_RPT_PREFIXCHARS)));
+ m_aGroupOnLst.InsertEntry(OUString(ModuleRes(STR_RPT_PREFIXCHARS)));
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::PREFIX_CHARACTERS));
break;
case sdbc::DataType::DATE:
@@ -1298,13 +1298,13 @@ void OGroupsSortingDialog::displayGroup(const uno::Reference<report::XGroup>& _x
sal_uInt16 nIds[] = { STR_RPT_YEAR, STR_RPT_QUARTER,STR_RPT_MONTH,STR_RPT_WEEK,STR_RPT_DAY,STR_RPT_HOUR,STR_RPT_MINUTE };
for (sal_uInt16 i = 0; i < sizeof (nIds) / sizeof (nIds[0]); ++i)
{
- m_aGroupOnLst.InsertEntry(String(ModuleRes(nIds[i])));
+ m_aGroupOnLst.InsertEntry(OUString(ModuleRes(nIds[i])));
m_aGroupOnLst.SetEntryData(i+1,reinterpret_cast<void*>(i+2));
}
}
break;
default:
- m_aGroupOnLst.InsertEntry(String(ModuleRes(STR_RPT_INTERVAL)));
+ m_aGroupOnLst.InsertEntry(OUString(ModuleRes(STR_RPT_INTERVAL)));
m_aGroupOnLst.SetEntryData(1,reinterpret_cast<void*>(report::GroupOn::INTERVAL));
break;
}
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index b37468cc4be5..3be8f7ab9f32 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -534,7 +534,7 @@ void NavigatorTree::traverseSection(const uno::Reference< report::XSection>& _xS
// -----------------------------------------------------------------------------
void NavigatorTree::traverseFunctions(const uno::Reference< report::XFunctions>& _xFunctions,SvTreeListEntry* _pParent)
{
- SvTreeListEntry* pFunctions = insertEntry(String(ModuleRes(RID_STR_FUNCTIONS)),_pParent,SID_RPT_NEW_FUNCTION,LIST_APPEND,new UserData(this,_xFunctions));
+ SvTreeListEntry* pFunctions = insertEntry(OUString(ModuleRes(RID_STR_FUNCTIONS)), _pParent, SID_RPT_NEW_FUNCTION, LIST_APPEND, new UserData(this,_xFunctions));
const sal_Int32 nCount = _xFunctions->getCount();
for (sal_Int32 i = 0; i< nCount; ++i)
{
@@ -604,7 +604,7 @@ void NavigatorTree::traversePageFooter(const uno::Reference< report::XSection>&
void NavigatorTree::traverseGroups(const uno::Reference< report::XGroups>& _xGroups)
{
SvTreeListEntry* pReport = find(_xGroups->getReportDefinition());
- insertEntry(String(ModuleRes(RID_STR_GROUPS)),pReport,SID_SORTINGANDGROUPING,LIST_APPEND,new UserData(this,_xGroups));
+ insertEntry(OUString(ModuleRes(RID_STR_GROUPS)), pReport, SID_SORTINGANDGROUPING, LIST_APPEND, new UserData(this,_xGroups));
}
// -----------------------------------------------------------------------------
void NavigatorTree::traverseGroup(const uno::Reference< report::XGroup>& _xGroup)
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 25fad2968d2c..97fff040f3d3 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -46,7 +46,7 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
switch( _nPageId )
{
case RID_PAGEDIALOG_BACKGROUND:
- AddTabPage( RID_SVXPAGE_BACKGROUND,String(ModuleRes(1)));
+ AddTabPage( RID_SVXPAGE_BACKGROUND, OUString(ModuleRes(1)));
break;
case RID_PAGEDIALOG_PAGE:
AddTabPage(RID_SVXPAGE_PAGE, pFact->GetTabPageCreatorFunc( RID_SVXPAGE_PAGE ), 0 );
diff --git a/reportdesign/source/ui/inc/Formula.hxx b/reportdesign/source/ui/inc/Formula.hxx
index cc52754476bb..a341094991bf 100644
--- a/reportdesign/source/ui/inc/Formula.hxx
+++ b/reportdesign/source/ui/inc/Formula.hxx
@@ -93,7 +93,7 @@ public:
virtual void ToggleCollapsed( formula::RefEdit* pEdit, formula::RefButton* pButton = NULL );
protected:
- void HighlightFunctionParas(const String& aFormula);
+ void HighlightFunctionParas(const OUString& aFormula);
};
// =============================================================================
diff --git a/reportdesign/source/ui/inc/metadata.hxx b/reportdesign/source/ui/inc/metadata.hxx
index 876d3e8b8d6b..f990d9778603 100644
--- a/reportdesign/source/ui/inc/metadata.hxx
+++ b/reportdesign/source/ui/inc/metadata.hxx
@@ -49,9 +49,9 @@ namespace rptui
OPropertyInfoService(){}
virtual ~OPropertyInfoService(){}
// IPropertyInfoService
- sal_Int32 getPropertyId(const String& _rName) const;
- String getPropertyTranslation(sal_Int32 _nId) const;
- OString getPropertyHelpId(sal_Int32 _nId) const;
+ sal_Int32 getPropertyId(const OUString& _rName) const;
+ OUString getPropertyTranslation(sal_Int32 _nId) const;
+ OString getPropertyHelpId(sal_Int32 _nId) const;
sal_uInt32 getPropertyUIFlags(sal_Int32 _nId) const;
static void getExcludeProperties(::std::vector< com::sun::star::beans::Property >& _rExcludeProperties,const ::com::sun::star::uno::Reference< ::com::sun::star::inspection::XPropertyHandler >& _xFormComponentHandler);
@@ -63,7 +63,7 @@ namespace rptui
protected:
static const OPropertyInfoImpl* getPropertyInfo();
- static const OPropertyInfoImpl* getPropertyInfo(const String& _rName);
+ static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName);
static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
};
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index de062e880fc0..31cdab6db475 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -506,13 +506,13 @@ bool DataProviderHandler::impl_dialogLinkedFields_nothrow( ::osl::ClearableMutex
aSeq[2] <<= aParam;
aParam.Name = OUString("Explanation");
- aParam.Value <<= OUString(String(ModuleRes(RID_STR_EXPLANATION)));
+ aParam.Value <<= OUString(ModuleRes(RID_STR_EXPLANATION));
aSeq[3] <<= aParam;
aParam.Name = OUString("DetailLabel");
- aParam.Value <<= OUString(String(ModuleRes(RID_STR_DETAILLABEL)));
+ aParam.Value <<= OUString(ModuleRes(RID_STR_DETAILLABEL));
aSeq[4] <<= aParam;
aParam.Name = OUString("MasterLabel");
- aParam.Value <<= OUString(String(ModuleRes(RID_STR_MASTERLABEL)));
+ aParam.Value <<= OUString(ModuleRes(RID_STR_MASTERLABEL));
aSeq[5] <<= aParam;
uno::Reference< ui::dialogs::XExecutableDialog > xDialog(
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 0fb154686b65..860bf6eb02ee 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -233,7 +233,7 @@ namespace rptui
for ( size_t i=0; i<nCategories; ++i, ++pReturn )
{
pReturn->ProgrammaticName = OUString::createFromAscii( aCategories[i].programmaticName );
- pReturn->UIName = String( ModuleRes( aCategories[i].uiNameResId ) );
+ pReturn->UIName = ModuleRes( aCategories[i].uiNameResId );
pReturn->HelpURL = HelpIdUrl::getHelpURL( aCategories[i].helpId );
}
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index 892e21785875..754c6c619d54 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1588,7 +1588,7 @@ bool GeometryHandler::impl_dialogFilter_nothrow( OUString& _out_rSelectedClause,
// create the dialog
uno::Reference< ui::dialogs::XExecutableDialog > xDialog = sdb::FilterDialog::createWithQuery(m_xContext, xComposer, m_xRowSet, xInspectorWindow);
- const String aGcc3WorkaroundTemporary( ModuleRes(RID_STR_FILTER));
+ const OUString aGcc3WorkaroundTemporary( ModuleRes(RID_STR_FILTER));
const OUString sPropertyUIName( aGcc3WorkaroundTemporary );
// initialize the dialog
xDialog->setTitle( sPropertyUIName );
@@ -1622,7 +1622,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
::Point aPos(VCLPoint(_aNewPos));
if ( aPos.X() < 0 || aPos.Y() < 0 ) // TODO: have to check size with pos aka || (aPos.X() + aAwtSize.Width) > m_xSection->getReportDefinition()->
- throw beans::PropertyVetoException(String(ModuleRes(RID_STR_ILLEGAL_POSITION)),xSourceReportComponent);
+ throw beans::PropertyVetoException(OUString(ModuleRes(RID_STR_ILLEGAL_POSITION)),xSourceReportComponent);
::Rectangle aSourceRect(aPos,VCLSize(_aSize));
@@ -1635,7 +1635,7 @@ void GeometryHandler::checkPosAndSize( const awt::Point& _aNewPos,
const ::Rectangle aBoundRect(VCLPoint(xReportComponent->getPosition()),VCLSize(xReportComponent->getSize()));
const ::Rectangle aRect = aSourceRect.GetIntersection(aBoundRect);
if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
- throw beans::PropertyVetoException(String(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL)),xSourceReportComponent);
+ throw beans::PropertyVetoException(OUString(ModuleRes( RID_STR_OVERLAP_OTHER_CONTROL)),xSourceReportComponent);
}
}
}
@@ -1758,7 +1758,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS
if ( nCount )
{
const uno::Reference< report::XGroup> xGroup2(xGroups->getByIndex(nCount - 1),uno::UNO_QUERY_THROW);
- OUString sGroupName = String(ModuleRes(RID_STR_SCOPE_GROUP));
+ OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP);
_rsNamePostFix = xGroup2->getExpression();
m_sScope = sGroupName.replaceFirst("%1",_rsNamePostFix);
xReturn = xGroup2.get();
@@ -1783,7 +1783,7 @@ uno::Reference< report::XFunctionsSupplier> GeometryHandler::fillScope_throw(OUS
for (sal_Int32 i = 0 ; i < nCount; ++i)
{
const uno::Reference< report::XGroup> xGroup(xGroups->getByIndex(i),uno::UNO_QUERY_THROW);
- OUString sGroupName = String(ModuleRes(RID_STR_SCOPE_GROUP));
+ OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP);
if ( m_sScope == sGroupName.replaceFirst("%1",xGroup->getExpression()) )
{
_rsNamePostFix = xGroup->getExpression();
@@ -1829,7 +1829,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const OUString& _sQuotedFunction
uno::Reference< report::XGroup> xGroup(aFind.first->second.second,uno::UNO_QUERY);
if ( xGroup.is() )
{
- OUString sGroupName = String(ModuleRes(RID_STR_SCOPE_GROUP));
+ OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP);
m_sScope = sGroupName.replaceFirst("%1",xGroup->getExpression());
}
else
@@ -1856,7 +1856,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
sal_Bool bDefaultFunction = sal_False;
try
{
- const String sFormula( _xFunction->getFormula() );
+ const OUString sFormula( _xFunction->getFormula() );
util::SearchOptions aSearchOptions;
aSearchOptions.algorithmType = util::SearchAlgorithms_REGEXP;
aSearchOptions.searchFlag = 0x00000100;
@@ -1867,14 +1867,14 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
aSearchOptions.searchString = aIter->m_sSearchString;
utl::TextSearch aTextSearch(aSearchOptions);
sal_Int32 start = 0;
- sal_Int32 end = sFormula.Len();
- if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // default function found
+ sal_Int32 end = sFormula.getLength();
+ if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.getLength()) // default function found
{
- aSearchOptions.searchString = OUString("\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]");
+ aSearchOptions.searchString = "\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
utl::TextSearch aDataSearch(aSearchOptions);
aDataSearch.SearchForward(sFormula,&start,&end );
++start;
- _rDataField = sFormula.Copy(start,end-start-1);
+ _rDataField = sFormula.copy(start,end-start-1);
_rsDefaultFunctionName = aIter->m_sName;
break;
}
@@ -1895,9 +1895,9 @@ void GeometryHandler::loadDefaultFunctions()
{
m_aCounterFunction.m_bPreEvaluated = sal_False;
m_aCounterFunction.m_bDeepTraversing = sal_False;
- m_aCounterFunction.m_sName = String(ModuleRes(RID_STR_F_COUNTER));
- m_aCounterFunction.m_sFormula = OUString("rpt:[%FunctionName] + 1");
- m_aCounterFunction.m_sSearchString = OUString("rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*[:digit:]*");
+ m_aCounterFunction.m_sName = ModuleRes(RID_STR_F_COUNTER);
+ m_aCounterFunction.m_sFormula = "rpt:[%FunctionName] + 1";
+ m_aCounterFunction.m_sSearchString = "rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*[:digit:]*";
m_aCounterFunction.m_sInitialFormula.IsPresent = sal_True;
m_aCounterFunction.m_sInitialFormula.Value = OUString("rpt:1");
@@ -1906,25 +1906,25 @@ void GeometryHandler::loadDefaultFunctions()
aDefault.m_bPreEvaluated = sal_True;
- aDefault.m_sName = String(ModuleRes(RID_STR_F_ACCUMULATION));
- aDefault.m_sFormula = OUString("rpt:[%Column] + [%FunctionName]");
- aDefault.m_sSearchString = OUString("rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]");
+ aDefault.m_sName = ModuleRes(RID_STR_F_ACCUMULATION);
+ aDefault.m_sFormula = "rpt:[%Column] + [%FunctionName]";
+ aDefault.m_sSearchString = "rpt:\\[[:alpha:]+([:space:]*[:alnum:]*)*\\][:space:]*\\+[:space:]*\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]";
aDefault.m_sInitialFormula.IsPresent = sal_True;
- aDefault.m_sInitialFormula.Value = OUString("rpt:[%Column]");
+ aDefault.m_sInitialFormula.Value = "rpt:[%Column]";
m_aDefaultFunctions.push_back(aDefault);
- aDefault.m_sName = String(ModuleRes(RID_STR_F_MINIMUM));
- aDefault.m_sFormula = OUString("rpt:IF([%Column] < [%FunctionName];[%Column];[%FunctionName])");
- aDefault.m_sSearchString = OUString("rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*<[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)");
+ aDefault.m_sName = ModuleRes(RID_STR_F_MINIMUM);
+ aDefault.m_sFormula = "rpt:IF([%Column] < [%FunctionName];[%Column];[%FunctionName])";
+ aDefault.m_sSearchString = "rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*<[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)";
aDefault.m_sInitialFormula.IsPresent = sal_True;
- aDefault.m_sInitialFormula.Value = OUString("rpt:[%Column]");
+ aDefault.m_sInitialFormula.Value = "rpt:[%Column]";
m_aDefaultFunctions.push_back(aDefault);
- aDefault.m_sName = String(ModuleRes(RID_STR_F_MAXIMUM));
- aDefault.m_sFormula = OUString("rpt:IF([%Column] > [%FunctionName];[%Column];[%FunctionName])");
- aDefault.m_sSearchString = OUString("rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*>[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)");
+ aDefault.m_sName = ModuleRes(RID_STR_F_MAXIMUM);
+ aDefault.m_sFormula = "rpt:IF([%Column] > [%FunctionName];[%Column];[%FunctionName])";
+ aDefault.m_sSearchString = "rpt:IF\\((\\[[:alpha:]+([:space:]*[:alnum:]*)*\\])[:space:]*>[:space:]*(\\[[:alpha:]+([:space:]*[:alnum:]*)*\\]);[:space:]*\\1[:space:]*;[:space:]*\\3[:space:]*\\)";
aDefault.m_sInitialFormula.IsPresent = sal_True;
- aDefault.m_sInitialFormula.Value = OUString("rpt:[%Column]");
+ aDefault.m_sInitialFormula.Value = "rpt:[%Column]";
m_aDefaultFunctions.push_back(aDefault);
}
}
@@ -2077,20 +2077,20 @@ bool GeometryHandler::impl_isCounterFunction_throw(const OUString& _sQuotedFunct
const beans::Optional< OUString> aInitalFormula = aFind.first->second.first->getInitialFormula();
if ( aInitalFormula.IsPresent )
{
- const String sFormula( aFind.first->second.first->getFormula() );
+ const OUString sFormula( aFind.first->second.first->getFormula() );
util::SearchOptions aSearchOptions;
aSearchOptions.algorithmType = util::SearchAlgorithms_REGEXP;
aSearchOptions.searchFlag = 0x00000100;
aSearchOptions.searchString = m_aCounterFunction.m_sSearchString;
utl::TextSearch aTextSearch(aSearchOptions);
sal_Int32 start = 0;
- sal_Int32 end = sFormula.Len();
- if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.Len()) // counter function found
+ sal_Int32 end = sFormula.getLength();
+ if ( aTextSearch.SearchForward(sFormula,&start,&end) && start == 0 && end == sFormula.getLength()) // counter function found
{
const uno::Reference< report::XGroup > xGroup(aFind.first->second.second,uno::UNO_QUERY);
if ( xGroup.is() )
{
- OUString sGroupName = String(ModuleRes(RID_STR_SCOPE_GROUP));
+ OUString sGroupName = ModuleRes(RID_STR_SCOPE_GROUP);
_Out_sScope = sGroupName.replaceFirst("%1",xGroup->getExpression());
}
else
@@ -2112,8 +2112,8 @@ void GeometryHandler::impl_createFunction(const OUString& _sFunctionName,const O
m_xFunction.set(report::Function::create(m_xContext));
m_xFunction->setName( _sFunctionName );
- const String sPlaceHolder1(RTL_CONSTASCII_USTRINGPARAM("%Column"));
- const String sPlaceHolder2(RTL_CONSTASCII_USTRINGPARAM("%FunctionName"));
+ const OUString sPlaceHolder1("%Column");
+ const OUString sPlaceHolder2("%FunctionName");
OUString sFormula(_aFunction.m_sFormula);
sFormula = sFormula.replaceAll(sPlaceHolder1,_sDataField);
sFormula = sFormula.replaceAll(sPlaceHolder2,_sFunctionName);
diff --git a/reportdesign/source/ui/inspection/metadata.cxx b/reportdesign/source/ui/inspection/metadata.cxx
index 20cb41cdaebb..eeb786d59bf8 100644
--- a/reportdesign/source/ui/inspection/metadata.cxx
+++ b/reportdesign/source/ui/inspection/metadata.cxx
@@ -40,23 +40,23 @@ namespace rptui
//========================================================================
struct OPropertyInfoImpl
{
- String sName;
- String sTranslation;
- OString sHelpId;
+ OUString sName;
+ OUString sTranslation;
+ OString sHelpId;
sal_Int32 nId;
sal_uInt32 nUIFlags;
OPropertyInfoImpl(
- const OUString& rName,
- sal_Int32 _nId,
- const String& aTranslation,
+ const OUString& rName,
+ sal_Int32 _nId,
+ const OUString& aTranslation,
const OString& _sHelpId,
- sal_uInt32 _nUIFlags);
+ sal_uInt32 _nUIFlags);
};
//------------------------------------------------------------------------
OPropertyInfoImpl::OPropertyInfoImpl(const OUString& _rName, sal_Int32 _nId,
- const String& aString, const OString& sHid, sal_uInt32 _nUIFlags)
+ const OUString& aString, const OString& sHid, sal_uInt32 _nUIFlags)
:sName(_rName)
,sTranslation(aString)
,sHelpId(sHid)
@@ -80,7 +80,7 @@ namespace rptui
//========================================================================
#define DEF_INFO( ident, uinameres, helpid, flags ) \
OPropertyInfoImpl( PROPERTY_##ident, PROPERTY_ID_##ident, \
- String( ModuleRes( RID_STR_##uinameres ) ), HID_RPT_PROP_##helpid, flags )
+ OUString( ModuleRes( RID_STR_##uinameres ) ), HID_RPT_PROP_##helpid, flags )
#define DEF_INFO_1( ident, uinameres, helpid, flag1 ) \
DEF_INFO( ident, uinameres, helpid, PROP_FLAG_##flag1 )
@@ -156,17 +156,17 @@ namespace rptui
}
//------------------------------------------------------------------------
- sal_Int32 OPropertyInfoService::getPropertyId(const String& _rName) const
+ sal_Int32 OPropertyInfoService::getPropertyId(const OUString& _rName) const
{
const OPropertyInfoImpl* pInfo = getPropertyInfo(_rName);
return pInfo ? pInfo->nId : -1;
}
//------------------------------------------------------------------------
- String OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
+ OUString OPropertyInfoService::getPropertyTranslation(sal_Int32 _nId) const
{
const OPropertyInfoImpl* pInfo = getPropertyInfo(_nId);
- return (pInfo) ? pInfo->sTranslation : String();
+ return (pInfo) ? pInfo->sTranslation : OUString();
}
//------------------------------------------------------------------------
@@ -184,12 +184,12 @@ namespace rptui
}
//------------------------------------------------------------------------
- const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const String& _rName)
+ const OPropertyInfoImpl* OPropertyInfoService::getPropertyInfo(const OUString& _rName)
{
// intialisierung
if(!s_pPropertyInfos)
getPropertyInfo();
- OPropertyInfoImpl aSearch(_rName, 0L, String(), "", 0);
+ OPropertyInfoImpl aSearch(_rName, 0L, OUString(), "", 0);
const OPropertyInfoImpl* pPropInfo = ::std::lower_bound(
s_pPropertyInfos, s_pPropertyInfos + s_nCount, aSearch, PropertyInfoLessByName() );
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index 683b55f9ffa3..3431008bbc1f 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -161,14 +161,14 @@ void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32
OSL_ENSURE(_xGroup.is(),"Group is NULL -> GPF");
if ( _xGroup->getHeaderOn() && _xGroup->getHeader()->getName().isEmpty() )
{
- OUString sName = String(ModuleRes(RID_STR_GROUPHEADER));
+ OUString sName = ModuleRes(RID_STR_GROUPHEADER);
sName += OUString::number(_nPos);
_xGroup->getHeader()->setName(sName);
}
if ( _xGroup->getFooterOn() && _xGroup->getFooter()->getName().isEmpty() )
{
- OUString sName = String(ModuleRes(RID_STR_GROUPFOOTER));
+ OUString sName = ModuleRes(RID_STR_GROUPFOOTER);
sName += OUString::number(_nPos);
_xGroup->getFooter()->setName(sName);
}
@@ -1032,11 +1032,11 @@ bool openDialogFormula_nothrow( OUString& _in_out_rFormula
bSuccess = aDlg.Execute() == RET_OK;
if ( bSuccess )
{
- String sFormula = aDlg.getCurrentFormula();
+ OUString sFormula = aDlg.getCurrentFormula();
xub_StrLen nIndex = 0;
- if ( sFormula.GetChar(0) == '=' )
+ if ( sFormula[0] == '=' )
nIndex = 1;
- _in_out_rFormula = OUString("rpt:") + sFormula.Copy(nIndex);
+ _in_out_rFormula = "rpt:" + sFormula.copy(nIndex);
}
}
}
diff --git a/reportdesign/source/ui/misc/statusbarcontroller.cxx b/reportdesign/source/ui/misc/statusbarcontroller.cxx
index 4294d5b020bd..e86169ab7266 100644
--- a/reportdesign/source/ui/misc/statusbarcontroller.cxx
+++ b/reportdesign/source/ui/misc/statusbarcontroller.cxx
@@ -93,7 +93,7 @@ void SAL_CALL OStatusbarController::initialize( const Sequence< Any >& _rArgumen
for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
const sal_uInt16 nItemId = pStatusBar->GetItemId(nPos);
- if ( pStatusBar->GetItemCommand(nItemId) == String(m_aCommandURL) )
+ if ( pStatusBar->GetItemCommand(nItemId) == m_aCommandURL )
{
m_nId = nItemId;
break;
diff --git a/reportdesign/source/ui/misc/toolboxcontroller.cxx b/reportdesign/source/ui/misc/toolboxcontroller.cxx
index ebfea204bb05..bfc6c65cef79 100644
--- a/reportdesign/source/ui/misc/toolboxcontroller.cxx
+++ b/reportdesign/source/ui/misc/toolboxcontroller.cxx
@@ -139,7 +139,7 @@ void SAL_CALL OToolboxController::initialize( const Sequence< Any >& _rArguments
for (sal_uInt16 nPos = 0; nPos < nCount; ++nPos)
{
const sal_uInt16 nItemId = pToolBox->GetItemId(nPos);
- if ( pToolBox->GetItemCommand(nItemId) == String(m_aCommandURL) )
+ if ( pToolBox->GetItemCommand(nItemId) == m_aCommandURL )
{
m_nToolBoxId = nItemId;
break;
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 146e01fedf6a..dbeceb9e5f2a 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -424,7 +424,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
case SID_REPORTHEADERFOOTER:
{
aReturn.bEnabled = isEditable();
- OUString sText = String(ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT));
+ OUString sText = ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT);
aReturn.sTitle = sText;
}
break;
@@ -433,7 +433,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
case SID_PAGEHEADERFOOTER:
{
aReturn.bEnabled = isEditable();
- OUString sText = String(ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT));
+ OUString sText = ModuleRes((m_xReportDefinition.is() && m_xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT);
aReturn.sTitle = sText;
}
break;
@@ -586,7 +586,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = !pSectionWindow->getReportSection().isUiActive();
}
{
- OUString sText = String(ModuleRes(RID_STR_DELETE));
+ OUString sText = ModuleRes(RID_STR_DELETE);
aReturn.sTitle = sText;
}
break;
@@ -1172,7 +1172,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
{
uno::Reference< report::XFunctions> xFunctions(xFunction->getParent(),uno::UNO_QUERY_THROW);
sal_Int32 nIndex = getPositionInIndexAccess(xFunctions.get(),xFunction);
- const String sUndoAction = String((ModuleRes(RID_STR_UNDO_REMOVE_FUNCTION)));
+ const OUString sUndoAction = ModuleRes(RID_STR_UNDO_REMOVE_FUNCTION);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
xFunctions->removeByIndex(nIndex);
select(uno::makeAny(xFunctions->getParent()));
@@ -1455,7 +1455,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
::std::vector< uno::Reference< uno::XInterface > > aControlsFormats;
lcl_getReportControlFormat( aArgs, getDesignView(), xWindow, aControlsFormats );
- const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEFONT));
UndoContext aUndoContext( getUndoManager(), sUndoAction );
::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin();
@@ -1531,7 +1531,7 @@ void OReportController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >
if ( !aControlsFormats.empty() )
{
- const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGEFONT ) );
+ const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CHANGEFONT ) );
UndoContext aUndoContext( getUndoManager(), sUndoAction );
::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aControlsFormats.begin();
@@ -2461,7 +2461,7 @@ void OReportController::openPageDialog(const uno::Reference<report::XSection>& _
else
{
uno::Reference< beans::XPropertySet> xProp(getUsedStyle(m_xReportDefinition),uno::UNO_QUERY_THROW);
- const String sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_CHANGEPAGE));
UndoContext aUndoContext( getUndoManager(), sUndoAction );
const SfxPoolItem* pItem = NULL;
if ( SFX_ITEM_SET == pSet->GetItemState( RPTUI_ID_SIZE,sal_True,&pItem))
@@ -2588,7 +2588,7 @@ void OReportController::Notify(SfxBroadcaster & /* _rBc */, SfxHint const & _rHi
// -----------------------------------------------------------------------------
void OReportController::executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std::mem_fun_t<void,ODesignView>& _pMemfun)
{
- const String sUndoAction = String((ModuleRes(_nUndoStrId)));
+ const OUString sUndoAction = ModuleRes(_nUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
_pMemfun( getDesignView() );
InvalidateFeature( SID_SAVEDOC );
@@ -2597,7 +2597,7 @@ void OReportController::executeMethodWithUndo(sal_uInt16 _nUndoStrId,const ::std
// -----------------------------------------------------------------------------
void OReportController::alignControlsWithUndo(sal_uInt16 _nUndoStrId,sal_Int32 _nControlModification,bool _bAlignAtSection)
{
- const String sUndoAction = String((ModuleRes(_nUndoStrId)));
+ const OUString sUndoAction = ModuleRes(_nUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
getDesignView()->alignMarkedObjects(_nControlModification,_bAlignAtSection);
InvalidateFeature( SID_SAVEDOC );
@@ -2676,7 +2676,7 @@ void OReportController::shrinkSection(sal_uInt16 _nUndoStrId, uno::Reference<rep
{
if ( _xSection.is() )
{
- const String sUndoAction = String((ModuleRes(_nUndoStrId)));
+ const OUString sUndoAction = ModuleRes(_nUndoStrId);
UndoContext aUndoContext( getUndoManager(), sUndoAction );
if (_nSid == SID_SECTION_SHRINK)
@@ -2876,7 +2876,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
if ( !bEnabled )
{
sdb::SQLContext aFirstMessage;
- String sInfo = String( ModuleRes( nErrorId ) );
+ OUString sInfo = ModuleRes( nErrorId );
aFirstMessage.Message = sInfo;
aInfo = aFirstMessage;
if ( isEditable() )
@@ -2951,7 +2951,7 @@ uno::Reference<frame::XModel> OReportController::executeReport()
}
if (aInfo.isValid())
{
- const String suSQLContext = String( ModuleRes( RID_STR_COULD_NOT_CREATE_REPORT ) );
+ const OUString suSQLContext = ModuleRes( RID_STR_COULD_NOT_CREATE_REPORT );
aInfo.prepend(suSQLContext);
}
m_bInGeneratePreview = false;
@@ -3007,7 +3007,7 @@ uno::Reference< sdbc::XRowSet > OReportController::getRowSet()
// -----------------------------------------------------------------------------
void OReportController::insertGraphic()
{
- const String sTitle(ModuleRes(RID_STR_IMPORT_GRAPHIC));
+ const OUString sTitle(ModuleRes(RID_STR_IMPORT_GRAPHIC));
// build some arguments for the upcoming dialog
try
{
@@ -3109,7 +3109,7 @@ void SAL_CALL OReportController::removeSelectionChangeListener( const Reference<
void OReportController::createNewFunction(const uno::Any& _aValue)
{
uno::Reference< container::XIndexContainer> xFunctions(_aValue,uno::UNO_QUERY_THROW);
- const OUString sNewName = String(ModuleRes(RID_STR_FUNCTION));
+ const OUString sNewName = ModuleRes(RID_STR_FUNCTION);
uno::Reference< report::XFunction> xFunction(report::Function::create(m_xContext));
xFunction->setName(sNewName);
// the call below will also create an undo action -> listener
@@ -3241,7 +3241,7 @@ void OReportController::createDateTime(const Sequence< PropertyValue >& _aArgs)
{
getDesignView()->unmarkAllObjects(NULL);
- const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
UndoContext aUndoContext( getUndoManager(), sUndoAction );
SequenceAsHashMap aMap(_aArgs);
@@ -3269,7 +3269,7 @@ void OReportController::createPageNumber(const Sequence< PropertyValue >& _aArgs
{
getDesignView()->unmarkAllObjects(NULL);
- const String sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
+ const OUString sUndoAction(ModuleRes(RID_STR_UNDO_INSERT_CONTROL));
UndoContext aUndoContext( getUndoManager(), sUndoAction );
if ( !m_xReportDefinition->getPageHeaderOn() )
@@ -3312,7 +3312,7 @@ void OReportController::addPairControls(const Sequence< PropertyValue >& aArgs)
}
uno::Reference<report::XSection> xCurrentSection = getDesignView()->getCurrentSection();
- UndoContext aUndoContext( getUndoManager(), String( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) );
+ UndoContext aUndoContext( getUndoManager(), OUString( ModuleRes( RID_STR_UNDO_INSERT_CONTROL ) ) );
try
{
@@ -3766,7 +3766,7 @@ void OReportController::switchReportSection(const sal_Int16 _nId)
::boost::scoped_ptr< UndoContext > pUndoContext;
if ( SID_REPORTHEADERFOOTER == _nId )
{
- const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
+ const OUString sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) );
addUndoAction(new OReportSectionUndo(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO
@@ -3815,7 +3815,7 @@ void OReportController::switchPageSection(const sal_Int16 _nId)
::boost::scoped_ptr< UndoContext > pUndoContext;
if ( SID_PAGEHEADERFOOTER == _nId )
{
- const String sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
+ const OUString sUndoAction(ModuleRes(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER));
pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) );
addUndoAction(new OReportSectionUndo(*m_aReportModel
@@ -4166,7 +4166,7 @@ bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndo
lcl_getReportControlFormat( _aArgs, getDesignView(), xWindow, aSelection );
::std::vector< uno::Reference< uno::XInterface > >::iterator aIter = aSelection.begin();
- const String sUndoAction = String( ModuleRes( _nUndoResId ) );
+ const OUString sUndoAction = ModuleRes( _nUndoResId );
UndoContext aUndoContext( getUndoManager(), sUndoAction );
for(; aIter != aSelection.end();++aIter)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index f489319fa89e..430478aca1aa 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -454,12 +454,12 @@ void lcl_insertMenuItemImages(
rContextMenu.SetItemImage(nId,framework::GetImageFromURL(_rFrame,sCommand,sal_False));
if ( nId == SID_PAGEHEADERFOOTER )
{
- String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT));
+ OUString sText = ModuleRes((_xReportDefinition.is() && _xReportDefinition->getPageHeaderOn()) ? RID_STR_PAGEHEADERFOOTER_DELETE : RID_STR_PAGEHEADERFOOTER_INSERT);
rContextMenu.SetItemText(nId,sText);
}
else if ( nId == SID_REPORTHEADERFOOTER )
{
- String sText = String(ModuleRes((_xReportDefinition.is() && _xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT));
+ OUString sText = ModuleRes((_xReportDefinition.is() && _xReportDefinition->getReportHeaderOn()) ? RID_STR_REPORTHEADERFOOTER_DELETE : RID_STR_REPORTHEADERFOOTER_INSERT);
rContextMenu.SetItemText(nId,sText);
}
}
diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx
index 96e03c3d1e4a..a521fa39882c 100644
--- a/reportdesign/source/ui/report/SectionWindow.cxx
+++ b/reportdesign/source/ui/report/SectionWindow.cxx
@@ -142,7 +142,7 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
else
{
- String sTitle = String(ModuleRes(RID_STR_DETAIL));
+ OUString sTitle = ModuleRes(RID_STR_DETAIL);
m_aStartMarker.setTitle(sTitle);
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
}
@@ -164,7 +164,7 @@ bool OSectionWindow::setReportSectionTitle(const uno::Reference< report::XReport
const bool bRet = _pIsSectionOn(&aReportHelper) && _pGetSection(&aReportHelper) == m_aReportSection.getSection();
if ( bRet )
{
- String sTitle = String(ModuleRes(_nResId));
+ OUString sTitle = ModuleRes(_nResId);
m_aStartMarker.setTitle(sTitle);
m_aStartMarker.Invalidate(INVALIDATE_CHILDREN);
}
@@ -313,8 +313,8 @@ void OSectionWindow::zoom(const Fraction& _aZoom)
//-----------------------------------------------------------------------------
IMPL_LINK( OSectionWindow, StartSplitHdl, Splitter*, )
{
- const String sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) );
- getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, String() );
+ const OUString sUndoAction( ModuleRes( RID_STR_UNDO_CHANGE_SIZE ) );
+ getViewsWindow()->getView()->getReportView()->getController().getUndoManager().EnterListAction( sUndoAction, OUString() );
return 0L;
}
//------------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index d7015c6b0e28..d601d7bee6c9 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -1238,7 +1238,7 @@ void OViewsWindow::EndDragObj_removeInvisibleObjects()
// -----------------------------------------------------------------------------
void OViewsWindow::EndDragObj(sal_Bool _bControlKeyPressed, const OSectionView* _pSection,const Point& _aPnt)
{
- const String sUndoAction = String((ModuleRes(RID_STR_UNDO_CHANGEPOSITION)));
+ const OUString sUndoAction = ModuleRes(RID_STR_UNDO_CHANGEPOSITION);
const UndoContext aUndoContext( getView()->getReportView()->getController().getUndoManager(), sUndoAction );
Point aNewPos = _aPnt;
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index bd8a5a325aed..947be02b934a 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -337,11 +337,11 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac
OUString aName;
if ( !_aObjects.getLength() )
{
- aName = String(ModuleRes(RID_STR_BRWTITLE_NO_PROPERTIES));
+ aName = ModuleRes(RID_STR_BRWTITLE_NO_PROPERTIES);
}
else if ( _aObjects.getLength() == 1 ) // single selection
{
- aName = String(ModuleRes(RID_STR_BRWTITLE_PROPERTIES));
+ aName = ModuleRes(RID_STR_BRWTITLE_PROPERTIES);
uno::Reference< container::XNameContainer > xNameCont(_aObjects[0],uno::UNO_QUERY);
Reference< lang::XServiceInfo > xServiceInfo( xNameCont->getByName("ReportComponent"), UNO_QUERY );
@@ -392,14 +392,14 @@ OUString PropBrw::GetHeadlineName( const uno::Sequence< Reference<uno::XInterfac
if (nResId)
{
- aName += String(ModuleRes(nResId));
+ aName += ModuleRes(nResId);
}
}
}
else // multiselection
{
- aName = String(ModuleRes(RID_STR_BRWTITLE_PROPERTIES));
- aName += String(ModuleRes(RID_STR_BRWTITLE_MULTISELECT));
+ aName = ModuleRes(RID_STR_BRWTITLE_PROPERTIES);
+ aName += ModuleRes(RID_STR_BRWTITLE_MULTISELECT);
}
return aName;