summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accessibility/source/extended/accessibleiconchoicectrlentry.cxx3
-rw-r--r--accessibility/source/extended/accessiblelistboxentry.cxx8
-rw-r--r--accessibility/source/standard/vclxaccessibleedit.cxx3
-rw-r--r--avmedia/source/viewer/mediawindow.cxx4
-rw-r--r--basctl/source/basicide/baside3.cxx4
-rw-r--r--basctl/source/basicide/basides1.cxx12
-rw-r--r--basctl/source/basicide/localizationmgr.cxx6
-rw-r--r--basctl/source/dlged/dlged.cxx6
-rw-r--r--basctl/source/dlged/propbrw.cxx2
-rw-r--r--basic/source/classes/errobject.cxx3
-rw-r--r--basic/source/classes/sbunoobj.cxx2
-rw-r--r--basic/source/classes/sbxmod.cxx28
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx4
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx4
-rw-r--r--chart2/source/model/main/Axis.cxx4
-rw-r--r--chart2/source/model/main/CartesianCoordinateSystem.cxx12
-rw-r--r--chart2/source/model/main/GridProperties.cxx4
-rw-r--r--chart2/source/model/main/Legend.cxx4
-rw-r--r--chart2/source/model/main/PageBackground.cxx4
-rw-r--r--chart2/source/model/main/PolarCoordinateSystem.cxx12
-rw-r--r--chart2/source/model/main/Title.cxx4
-rw-r--r--chart2/source/tools/CachedDataSequence.cxx4
-rw-r--r--chart2/source/tools/ConfigColorScheme.cxx2
-rw-r--r--chart2/source/tools/DataSource.cxx4
-rw-r--r--chart2/source/tools/ErrorBar.cxx4
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx42
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx25
-rw-r--r--chart2/source/tools/ReferenceSizeProvider.cxx4
-rw-r--r--chart2/source/tools/RegressionCurveCalculator.cxx6
-rw-r--r--chart2/source/tools/RegressionEquation.cxx6
-rw-r--r--chart2/source/tools/Scaling.cxx61
-rw-r--r--chart2/source/tools/UncachedDataSequence.cxx4
-rw-r--r--chart2/source/view/axes/DateScaling.cxx20
-rw-r--r--comphelper/source/misc/logging.cxx26
-rw-r--r--comphelper/source/misc/numbers.cxx3
-rw-r--r--connectivity/source/commontools/AutoRetrievingBase.cxx6
-rw-r--r--connectivity/source/commontools/DateConversion.cxx5
-rw-r--r--connectivity/source/commontools/DriversConfig.cxx4
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx12
-rw-r--r--connectivity/source/commontools/conncleanup.cxx15
-rw-r--r--connectivity/source/commontools/dbtools2.cxx30
-rw-r--r--connectivity/source/commontools/predicateinput.cxx8
-rw-r--r--connectivity/source/cpool/ZConnectionPool.cxx18
-rw-r--r--connectivity/source/cpool/ZPoolCollection.cxx25
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx2
-rw-r--r--connectivity/source/drivers/calc/CTable.cxx6
-rw-r--r--connectivity/source/drivers/dbase/DDatabaseMetaData.cxx3
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/file/FDatabaseMetaData.cxx10
-rw-r--r--connectivity/source/drivers/firebird/DatabaseMetaData.cxx6
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx28
-rw-r--r--connectivity/source/drivers/hsqldb/HCatalog.cxx4
-rw-r--r--connectivity/source/drivers/hsqldb/HTables.cxx6
-rw-r--r--connectivity/source/drivers/hsqldb/HUser.cxx20
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx2
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/kab/KResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/macab/MacabResultSetMetaData.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YCatalog.cxx6
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx2
-rw-r--r--connectivity/source/drivers/mysql/YTable.cxx7
-rw-r--r--connectivity/source/drivers/mysql/YTables.cxx16
-rw-r--r--connectivity/source/drivers/mysql/YUser.cxx20
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx9
-rw-r--r--connectivity/source/parse/sqliterator.cxx6
-rw-r--r--cui/source/customize/acccfg.cxx14
-rw-r--r--cui/source/customize/cfgutil.cxx20
-rw-r--r--cui/source/customize/macropg.cxx13
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/options/connpoolconfig.cxx30
-rw-r--r--cui/source/options/optgdlg.cxx17
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx8
-rw-r--r--dbaccess/source/core/api/FilteredContainer.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx18
-rw-r--r--dbaccess/source/core/api/OptimisticSet.cxx10
-rw-r--r--dbaccess/source/core/api/View.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databaseregistrations.cxx15
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx2
-rw-r--r--dbaccess/source/core/misc/DatabaseDataProvider.cxx2
-rw-r--r--dbaccess/source/core/misc/dsntypes.cxx6
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx38
-rw-r--r--dbaccess/source/core/recovery/storagetextstream.cxx22
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx58
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx34
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx22
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx8
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/CollectionView.cxx14
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx6
-rw-r--r--dbaccess/source/ui/dlg/queryorder.cxx4
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx4
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx3
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx11
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx6
-rw-r--r--desktop/source/app/app.cxx6
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx8
-rw-r--r--desktop/source/migration/services/wordbookmigration.cxx4
-rw-r--r--drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx7
-rw-r--r--drawinglayer/source/geometry/viewinformation2d.cxx30
-rw-r--r--drawinglayer/source/geometry/viewinformation3d.cxx45
-rw-r--r--extensions/source/abpilot/fieldmappingimpl.cxx19
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx2
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx10
-rw-r--r--extensions/source/dbpilots/optiongrouplayouter.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx6
-rw-r--r--filter/source/msfilter/escherex.cxx30
-rw-r--r--filter/source/msfilter/mstoolbar.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx38
-rw-r--r--filter/source/svg/svgreader.cxx13
-rw-r--r--forms/source/component/DatabaseForm.cxx2
-rw-r--r--forms/source/component/FormattedField.cxx4
-rw-r--r--fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx4
-rw-r--r--framework/source/classes/menumanager.cxx2
-rw-r--r--framework/source/fwi/jobs/jobconst.cxx9
-rw-r--r--framework/source/jobs/jobdata.cxx2
-rw-r--r--framework/source/jobs/shelljob.cxx10
-rw-r--r--framework/source/loadenv/loadenv.cxx6
-rw-r--r--idlc/source/idlccompile.cxx8
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx4
-rw-r--r--linguistic/source/dicimp.cxx2
-rw-r--r--mysqlc/source/mysqlc_databasemetadata.cxx3
-rw-r--r--oox/source/core/relations.cxx6
-rw-r--r--oox/source/core/xmlfilterbase.cxx6
-rw-r--r--oox/source/ole/axcontrol.cxx4
-rw-r--r--oox/source/ole/vbamodule.cxx2
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx2
-rw-r--r--reportdesign/source/core/api/ReportEngineJFree.cxx6
-rw-r--r--reportdesign/source/core/misc/reportformula.cxx31
-rw-r--r--reportdesign/source/filter/xml/xmlCell.cxx11
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx16
-rw-r--r--reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx12
-rw-r--r--reportdesign/source/filter/xml/xmlFixedContent.cxx11
-rw-r--r--reportdesign/source/filter/xml/xmlFormattedField.cxx4
-rw-r--r--reportdesign/source/filter/xml/xmlGroup.cxx8
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx2
-rw-r--r--reportdesign/source/filter/xml/xmlfilter.cxx10
-rw-r--r--sax/source/tools/converter.cxx10
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/filter/excel/xltoolbar.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx7
-rw-r--r--sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx7
-rw-r--r--sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx4
-rw-r--r--sc/source/ui/StatisticsDialogs/FTestDialog.cxx9
-rw-r--r--sc/source/ui/StatisticsDialogs/TTestDialog.cxx9
-rw-r--r--sc/source/ui/docshell/impex.cxx4
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx3
-rw-r--r--sc/source/ui/vba/vbaborders.cxx2
-rw-r--r--sc/source/ui/vba/vbaformatconditions.cxx10
-rw-r--r--sc/source/ui/vba/vbainterior.cxx6
-rw-r--r--sc/source/ui/vba/vbarange.cxx55
-rw-r--r--sc/source/ui/vba/vbastyle.cxx2
-rw-r--r--sc/source/ui/vba/vbawindow.cxx8
-rw-r--r--sc/source/ui/vba/vbaworkbooks.cxx2
-rw-r--r--sc/source/ui/vba/vbaworksheet.cxx2
-rw-r--r--scaddins/source/analysis/analysis.cxx2
-rw-r--r--scripting/source/dlgprov/dlgevtatt.cxx4
-rw-r--r--scripting/source/dlgprov/dlgprov.cxx37
-rw-r--r--scripting/source/stringresource/stringresource.cxx8
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx28
-rw-r--r--sd/source/filter/eppt/epptso.cxx14
-rw-r--r--sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx3
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx10
-rw-r--r--sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx10
-rw-r--r--sd/source/ui/slidesorter/controller/SlsListener.cxx4
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx2
-rw-r--r--sdext/source/minimizer/configurationaccess.cxx5
-rw-r--r--sdext/source/pdfimport/sax/saxattrlist.cxx5
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx8
-rw-r--r--sfx2/source/appl/appinit.cxx3
-rw-r--r--sfx2/source/appl/appserv.cxx5
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx6
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx16
-rw-r--r--sfx2/source/doc/docfac.cxx14
-rw-r--r--svgio/inc/svgio/svgreader/svgtoken.hxx4
-rw-r--r--svgio/source/svgreader/svgtoken.cxx270
-rw-r--r--svgio/source/svgreader/svgtools.cxx50
-rw-r--r--svgio/source/svguno/xsvgparser.cxx7
-rw-r--r--svl/source/numbers/zforfind.cxx6
-rw-r--r--svtools/source/graphic/grfmgr.cxx2
-rw-r--r--svx/source/accessibility/AccessibleControlShape.cxx22
-rw-r--r--svx/source/accessibility/AccessibleGraphicShape.cxx3
-rw-r--r--svx/source/accessibility/AccessibleOLEShape.cxx3
-rw-r--r--svx/source/accessibility/AccessibleShape.cxx9
-rw-r--r--svx/source/accessibility/ChildrenManagerImpl.cxx4
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx2
-rw-r--r--svx/source/form/fmobj.cxx2
-rw-r--r--svx/source/form/fmscriptingenv.cxx4
-rw-r--r--svx/source/form/fmundo.cxx2
-rw-r--r--svx/source/form/formcontroller.cxx2
-rw-r--r--svx/source/gallery2/gallery1.cxx8
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx3
-rw-r--r--svx/source/svdraw/svdoashp.cxx20
-rw-r--r--svx/source/svdraw/svdoole2.cxx2
-rw-r--r--svx/source/table/accessiblecell.cxx3
-rw-r--r--svx/source/toolbars/extrusionbar.cxx78
-rw-r--r--svx/source/toolbars/fontworkbar.cxx6
-rw-r--r--svx/source/unodraw/unoshape.cxx6
-rw-r--r--sw/qa/tiledrendering/tiledrendering.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx2
-rw-r--r--sw/source/core/unocore/unofield.cxx12
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx6
-rw-r--r--sw/source/ui/vba/vbaapplication.cxx3
-rw-r--r--sw/source/ui/vba/vbafont.cxx3
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx10
-rw-r--r--toolkit/source/controls/stdtabcontroller.cxx2
-rw-r--r--toolkit/source/controls/tabpagemodel.cxx2
-rw-r--r--toolkit/source/controls/tree/treedatamodel.cxx8
-rw-r--r--toolkit/source/helper/formpdfexport.cxx38
-rw-r--r--unotools/source/config/eventcfg.cxx12
-rw-r--r--unotools/source/misc/mediadescriptor.cxx4
-rw-r--r--unoxml/source/rdf/librdf_repository.cxx10
-rw-r--r--vbahelper/source/vbahelper/vbacommandbarhelper.cxx4
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx4
-rw-r--r--vcl/source/components/fontident.cxx4
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx4
-rw-r--r--vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx4
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx8
-rw-r--r--writerfilter/source/dmapper/FormControlHelper.cxx4
-rw-r--r--writerfilter/source/dmapper/OLEHandler.cxx6
-rw-r--r--writerfilter/source/ooxml/OOXMLDocumentImpl.cxx24
-rw-r--r--writerfilter/source/ooxml/OOXMLStreamImpl.cxx92
-rw-r--r--xmlhelp/source/treeview/tvread.cxx2
-rw-r--r--xmloff/source/draw/eventimp.cxx2
-rw-r--r--xmloff/source/forms/elementimport.cxx10
-rw-r--r--xmloff/source/forms/layerimport.cxx2
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx7
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx8
-rw-r--r--xmloff/source/text/XMLTextListBlockContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextListItemContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextMarkImportContext.cxx12
-rw-r--r--xmloff/source/text/txtimp.cxx54
-rw-r--r--xmloff/source/text/txtlists.cxx2
-rw-r--r--xmloff/source/text/txtparae.cxx10
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_export.cxx54
-rw-r--r--xmlscript/source/xmlflat_imexp/xmlbas_import.cxx54
256 files changed, 1228 insertions, 1617 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index 443feb1d5f54..a24d05bc9135 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -681,8 +681,7 @@ throw(RuntimeException, std::exception)
checkActionIndex_Impl( nIndex );
EnsureIsAlive();
- static const OUString sActionDesc( "Select" );
- return sActionDesc;
+ return OUString( "Select" );
}
Reference< XAccessibleKeyBinding > AccessibleIconChoiceCtrlEntry::getAccessibleActionKeyBinding( sal_Int32 nIndex ) throw (IndexOutOfBoundsException, RuntimeException, std::exception)
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index 31f0947307f6..fc296b4eb121 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -819,8 +819,8 @@ namespace accessibility
checkActionIndex_Impl( nIndex );
EnsureIsAlive();
- static const OUString sActionDesc1( "Check" );
- static const OUString sActionDesc2( "UnCheck" );
+ static const char sActionDesc1[] = "Check";
+ static const char sActionDesc2[] = "UnCheck";
// sal_Bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0;
SvTreeListEntry* pEntry = getListBox()->GetEntryFromPath( m_aEntryPath );
SvButtonState state = getListBox()->GetCheckButtonState( pEntry );
@@ -830,9 +830,9 @@ namespace accessibility
if(getAccessibleRole() == AccessibleRole::CHECK_BOX)
{
if ( state == SV_BUTTON_CHECKED )
- return sActionDesc2;
+ return OUString(sActionDesc2);
else if (state == SV_BUTTON_UNCHECKED)
- return sActionDesc1;
+ return OUString(sActionDesc1);
}
else
{
diff --git a/accessibility/source/standard/vclxaccessibleedit.cxx b/accessibility/source/standard/vclxaccessibleedit.cxx
index 8a1fd5c9fdbe..b52bf85eec16 100644
--- a/accessibility/source/standard/vclxaccessibleedit.cxx
+++ b/accessibility/source/standard/vclxaccessibleedit.cxx
@@ -275,8 +275,7 @@ OUString VCLXAccessibleEdit::getAccessibleActionDescription ( sal_Int32 nIndex )
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- static const OUString sAction( "activate" );
- return sAction;
+ return OUString( "activate" );
}
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 2e5d92fd8c1d..a52199a63f66 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -242,9 +242,9 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */,
::sfx2::FileDialogHelper aDlg( (o_pbLink)
? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
- static const OUString aWildcard( "*." );
+ static const char aWildcard[] = "*.";
FilterNameVector aFilters;
- const OUString aSeparator( ";" );
+ static const char aSeparator[] = ";";
OUString aAllTypes;
aDlg.SetTitle( AVMEDIA_RESSTR( (o_pbLink)
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index bd238ba52ac8..b7b7915ba906 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -702,8 +702,6 @@ void DialogWindow::UpdateBrowser()
rLayout.UpdatePropertyBrowser();
}
-static OUString aResourceResolverPropName( "ResourceResolver" );
-
bool DialogWindow::SaveDialog()
{
bool bDone = false;
@@ -771,7 +769,7 @@ bool DialogWindow::SaveDialog()
{
try
{
- Any aResourceResolver = xDialogModelPropSet->getPropertyValue( aResourceResolverPropName );
+ Any aResourceResolver = xDialogModelPropSet->getPropertyValue( "ResourceResolver" );
aResourceResolver >>= xStringResourceResolver;
}
catch(const beans::UnknownPropertyException& )
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 98d0159f3925..b99426439eaf 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -1053,12 +1053,10 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
void Shell::ManageToolbars()
{
- static OUString aLayoutManagerName( "LayoutManager" );
- static OUString aMacroBarResName( "private:resource/toolbar/macrobar" );
- static OUString aDialogBarResName( "private:resource/toolbar/dialogbar" );
- static OUString aInsertControlsBarResName( "private:resource/toolbar/insertcontrolsbar" );
- static OUString aFormControlsBarResName( "private:resource/toolbar/formcontrolsbar" );
- (void)aInsertControlsBarResName;
+ static const char aMacroBarResName[] = "private:resource/toolbar/macrobar";
+ static const char aDialogBarResName[] = "private:resource/toolbar/dialogbar";
+ static const char aInsertControlsBarResName[] = "private:resource/toolbar/insertcontrolsbar";
+ static const char aFormControlsBarResName[] = "private:resource/toolbar/formcontrolsbar";
if( !pCurWin )
return;
@@ -1068,7 +1066,7 @@ void Shell::ManageToolbars()
if ( xFrameProps.is() )
{
Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
- uno::Any a = xFrameProps->getPropertyValue( aLayoutManagerName );
+ uno::Any a = xFrameProps->getPropertyValue( "LayoutManager" );
a >>= xLayoutManager;
if ( xLayoutManager.is() )
{
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index bc442623b6f6..80c11b0c8e3e 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -69,8 +69,8 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
- static OUString const aLayoutManagerName("LayoutManager");
- static OUString const aToolBarResName("private:resource/toolbar/translationbar");
+ static const char aLayoutManagerName[] = "LayoutManager";
+ static const char aToolBarResName[] = "private:resource/toolbar/translationbar";
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
@@ -902,7 +902,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
- static OUString aResourceResolverPropName( "ResourceResolver" );
+ static const char aResourceResolverPropName[] = "ResourceResolver";
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index ba1a87a3ab98..b6d525c5f2ce 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -57,9 +57,9 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::io;
-static OUString aResourceResolverPropName( "ResourceResolver" );
-static OUString aDecorationPropName( "Decoration" );
-static OUString aTitlePropName( "Title" );
+static const char aResourceResolverPropName[] = "ResourceResolver";
+static const char aDecorationPropName[] = "Decoration";
+static const char aTitlePropName[] = "Title";
diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx
index c7346c8f3dbf..e38c26632a82 100644
--- a/basctl/source/dlged/propbrw.cxx
+++ b/basctl/source/dlged/propbrw.cxx
@@ -130,7 +130,7 @@ void PropBrw::ImplReCreateController()
// create a property browser controller
Reference< XMultiComponentFactory > xFactory( xInspectorContext->getServiceManager(), UNO_QUERY_THROW );
- static const OUString s_sControllerServiceName( "com.sun.star.awt.PropertyBrowserController" );
+ static const char s_sControllerServiceName[] = "com.sun.star.awt.PropertyBrowserController";
m_xBrowserController = Reference< XPropertySet >(
xFactory->createInstanceWithContext( s_sControllerServiceName, xInspectorContext ), UNO_QUERY
);
diff --git a/basic/source/classes/errobject.cxx b/basic/source/classes/errobject.cxx
index d5843fe634c9..64f88a2815a8 100644
--- a/basic/source/classes/errobject.cxx
+++ b/basic/source/classes/errobject.cxx
@@ -156,8 +156,7 @@ ErrObject::Raise( const uno::Any& Number, const uno::Any& Source, const uno::Any
OUString SAL_CALL
ErrObject::getDefaultPropertyName( ) throw (uno::RuntimeException, std::exception)
{
- static OUString sDfltPropName( "Number" );
- return sDfltPropName;
+ return OUString( "Number" );
}
void ErrObject::setData( const uno::Any& Number, const uno::Any& Source, const uno::Any& Description, const uno::Any& HelpFile, const uno::Any& HelpContext )
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 0ff639372491..13bc3dc47a3e 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4242,7 +4242,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
(void)pBasic;
(void)bWrite;
- static OUString aTypeTypeString( "type" );
+ static const char aTypeTypeString[] = "type";
// 2 parameters needed
if ( rPar.Count() != 3 )
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 351508c6490e..7d4ae675562b 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -732,9 +732,7 @@ SbxVariable* SbModule::Find( const OUString& rName, SbxClassType t )
const OUString& SbModule::GetSource() const
{
- static OUString aRetStr;
- aRetStr = aOUSource;
- return aRetStr;
+ return aOUSource;
}
// Parent and BASIC are one!
@@ -1000,29 +998,25 @@ static void SendHint( SbxObject* pObj, sal_uIntPtr nId, SbMethod* p )
void ClearUnoObjectsInRTL_Impl_Rek( StarBASIC* pBasic )
{
// delete the return value of CreateUnoService
- static OUString aName("CreateUnoService");
- SbxVariable* pVar = pBasic->GetRtl()->Find( aName, SbxCLASS_METHOD );
+ SbxVariable* pVar = pBasic->GetRtl()->Find( OUString("CreateUnoService"), SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete the return value of CreateUnoDialog
- static OUString aName2("CreateUnoDialog");
- pVar = pBasic->GetRtl()->Find( aName2, SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( OUString("CreateUnoDialog"), SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete the return value of CDec
- static OUString aName3("CDec");
- pVar = pBasic->GetRtl()->Find( aName3, SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( OUString("CDec"), SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
}
// delete return value of CreateObject
- static OUString aName4("CreateObject");
- pVar = pBasic->GetRtl()->Find( aName4, SbxCLASS_METHOD );
+ pVar = pBasic->GetRtl()->Find( OUString("CreateObject"), SbxCLASS_METHOD );
if( pVar )
{
pVar->SbxValue::Clear();
@@ -2548,29 +2542,25 @@ void SbUserFormModule::triggerInitializeEvent( void )
if ( mbInit )
return;
SAL_INFO("basic", "**** SbUserFormModule::triggerInitializeEvent");
- static OUString aInitMethodName( "Userform_Initialize");
- triggerMethod( aInitMethodName );
+ triggerMethod(OUString("Userform_Initialize"));
mbInit = true;
}
void SbUserFormModule::triggerTerminateEvent( void )
{
SAL_INFO("basic", "**** SbUserFormModule::triggerTerminateEvent");
- static OUString aTermMethodName( "Userform_Terminate" );
- triggerMethod( aTermMethodName );
+ triggerMethod(OUString( "Userform_Terminate" ));
mbInit=false;
}
void SbUserFormModule::triggerLayoutEvent( void )
{
- static OUString aMethodName( "Userform_Layout" );
- triggerMethod( aMethodName );
+ triggerMethod(OUString( "Userform_Layout" ));
}
void SbUserFormModule::triggerResizeEvent( void )
{
- static OUString aMethodName("Userform_Resize");
- triggerMethod( aMethodName );
+ triggerMethod(OUString("Userform_Resize"));
}
SbUserFormModuleInstance* SbUserFormModule::CreateInstance()
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 5efb1f06d74c..4f0b6d7b9d53 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -40,7 +40,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Area" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Area";
struct StaticAreaWrapperPropertyArray_Initializer
{
@@ -179,7 +179,7 @@ Sequence< OUString > AreaWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( AreaWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 4643d6ca5883..10da0e77dff4 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -63,7 +63,7 @@ using ::com::sun::star::uno::Any;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Axis" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Axis";
enum
{
@@ -694,7 +694,7 @@ Sequence< OUString > AxisWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( AxisWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 0689070da999..2acabf89d0d1 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -61,7 +61,7 @@ using ::com::sun::star::chart::XDateCategories;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartData" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartData";
uno::Sequence< uno::Sequence< double > > lcl_getNANInsteadDBL_MIN( const uno::Sequence< uno::Sequence< double > >& rData )
{
@@ -726,7 +726,7 @@ uno::Sequence< OUString > ChartDataWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( ChartDataWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index a897eb791be8..dfd565ed2b75 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -65,7 +65,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSeries" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSeries";
enum
{
@@ -881,7 +881,7 @@ uno::Sequence< OUString > DataSeriesPointWrapper::getSupportedServiceNames_Stati
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( DataSeriesPointWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 6fde3c4dd16b..a2c544f065fe 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -79,7 +79,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Diagram" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Diagram";
enum
{
@@ -2081,7 +2081,7 @@ uno::Sequence< OUString > DiagramWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( DiagramWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 57efc982debc..e432ddcc423f 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.Grid" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Grid";
struct StaticGridWrapperPropertyArray_Initializer
{
@@ -185,7 +185,7 @@ Sequence< OUString > GridWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( GridWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( GridWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index e069fc21aba7..cbb734ba5453 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -210,7 +210,7 @@ Any WrappedLegendAlignmentProperty::convertOuterToInnerValue( const Any& rOuterV
namespace
{
-static const OUString lcl_aServiceName("com.sun.star.comp.chart.Legend");
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Legend";
enum
{
@@ -432,7 +432,7 @@ Sequence< OUString > LegendWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( LegendWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index 841df09ad2c1..545575858f8a 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ChartLine" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartLine";
struct StaticMinMaxLineWrapperDefaults_Initializer
{
@@ -418,7 +418,7 @@ Sequence< OUString > MinMaxLineWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( MinMaxLineWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 5197a0955ecd..aaa0c660104e 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -127,7 +127,7 @@ WrappedStackedTextProperty::~WrappedStackedTextProperty()
namespace
{
-static const OUString lcl_aServiceName("com.sun.star.comp.chart.Title");
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.Title";
enum
{
@@ -523,7 +523,7 @@ Sequence< OUString > TitleWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( TitleWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index e3be3b99515e..57de55083d2f 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -41,7 +41,7 @@ using ::com::sun::star::uno::Any;
namespace
{
-static const OUString lcl_aServiceName("com.sun.star.comp.chart.ChartArea");
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ChartArea";
struct StaticUpDownBarWrapperPropertyArray_Initializer
{
@@ -382,7 +382,7 @@ Sequence< OUString > UpDownBarWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( UpDownBarWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 701b86c9e881..58c629bf4c22 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -44,7 +44,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.WallOrFloor" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.WallOrFloor";
struct StaticWallFloorWrapperPropertyArray_Initializer
{
@@ -166,7 +166,7 @@ Sequence< OUString > WallFloorWrapper::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( WallFloorWrapper, OUString(lcl_aServiceName) );
} // namespace wrapper
} // namespace chart
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 1092b580113d..b7a66ec67ace 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -64,7 +64,7 @@ WrappedScaleTextProperty::~WrappedScaleTextProperty()
void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
- static const OUString aRefSizeName( "ReferencePageSize" );
+ static const char aRefSizeName[] = "ReferencePageSize";
if( xInnerPropertySet.is() )
{
@@ -95,7 +95,7 @@ void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const R
Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- static const OUString aRefSizeName( "ReferencePageSize" );
+ static const char aRefSizeName[] = "ReferencePageSize";
Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
if( xInnerPropertySet.is() )
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 76657d5b05a8..df2c6029d184 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -47,7 +47,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.ElementSelectorToolbarController" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.ElementSelectorToolbarController";
}
SelectorListBox::SelectorListBox( vcl::Window* pParent, WinBits nStyle )
@@ -246,7 +246,7 @@ Reference< ::com::sun::star::accessibility::XAccessible > SelectorListBox::Creat
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( ElementSelectorToolbarController, OUString(lcl_aServiceName) );
Sequence< OUString > ElementSelectorToolbarController::getSupportedServiceNames_Static()
{
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index a345bd93f63b..06ae4301f074 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -59,7 +59,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Axis" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Axis";
enum
{
@@ -637,7 +637,7 @@ IMPLEMENT_FORWARD_XINTERFACE2( Axis, Axis_Base, ::property::OPropertySet )
IMPLEMENT_FORWARD_XTYPEPROVIDER2( Axis, Axis_Base, ::property::OPropertySet )
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( Axis, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( Axis, OUString(lcl_aServiceName) );
} // namespace chart
diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx
index d5f2ed60cc31..2339be6d0fd5 100644
--- a/chart2/source/model/main/CartesianCoordinateSystem.cxx
+++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx
@@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceNameCartesian2d( "com.sun.star.chart2.CartesianCoordinateSystem2d" );
-static const OUString lcl_aServiceNameCartesian3d( "com.sun.star.chart2.CartesianCoordinateSystem3d" );
+static const char lcl_aServiceNameCartesian2d[] = "com.sun.star.chart2.CartesianCoordinateSystem2d";
+static const char lcl_aServiceNameCartesian3d[] = "com.sun.star.chart2.CartesianCoordinateSystem3d";
-static const OUString lcl_aImplementationNameCartesian2d( "com.sun.star.comp.chart2.CartesianCoordinateSystem2d" );
-static const OUString lcl_aImplementationNameCartesian3d( "com.sun.star.comp.chart2.CartesianCoordinateSystem3d" );
+static const char lcl_aImplementationNameCartesian2d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem2d";
+static const char lcl_aImplementationNameCartesian3d[] = "com.sun.star.comp.chart2.CartesianCoordinateSystem3d";
}
namespace chart
@@ -108,7 +108,7 @@ Sequence< OUString > CartesianCoordinateSystem2d::getSupportedServiceNames_Stati
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, lcl_aImplementationNameCartesian2d )
+APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem2d, OUString(lcl_aImplementationNameCartesian2d) )
// ==== CartesianCoordinateSystem3d ====
@@ -130,7 +130,7 @@ Sequence< OUString > CartesianCoordinateSystem3d::getSupportedServiceNames_Stati
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, lcl_aImplementationNameCartesian3d )
+APPHELPER_XSERVICEINFO_IMPL( CartesianCoordinateSystem3d, OUString(lcl_aImplementationNameCartesian3d) )
} // namespace chart
diff --git a/chart2/source/model/main/GridProperties.cxx b/chart2/source/model/main/GridProperties.cxx
index f7a282440651..f42c0e76834f 100644
--- a/chart2/source/model/main/GridProperties.cxx
+++ b/chart2/source/model/main/GridProperties.cxx
@@ -38,7 +38,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.GridProperties" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.GridProperties";
enum
{
@@ -243,7 +243,7 @@ Sequence< OUString > GridProperties::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( GridProperties, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( GridProperties, OUString(lcl_aServiceName) );
// needed by MSC compiler
using impl::GridProperties_Base;
diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx
index a0d885c09b6d..be21cd9ec7a2 100644
--- a/chart2/source/model/main/Legend.cxx
+++ b/chart2/source/model/main/Legend.cxx
@@ -47,7 +47,7 @@ using ::com::sun::star::beans::Property;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Legend" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Legend";
enum
{
@@ -301,7 +301,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL Legend::getPropertySetInfo()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( Legend, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( Legend, OUString(lcl_aServiceName) );
// needed by MSC compiler
using impl::Legend_Base;
diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx
index 3b72c388d67a..d9eea37794d3 100644
--- a/chart2/source/model/main/PageBackground.cxx
+++ b/chart2/source/model/main/PageBackground.cxx
@@ -40,7 +40,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.PageBackground" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.PageBackground";
struct StaticPageBackgroundDefaults_Initializer
{
@@ -223,7 +223,7 @@ uno::Sequence< OUString > PageBackground::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( PageBackground, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( PageBackground, OUString(lcl_aServiceName) );
using impl::PageBackground_Base;
diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx
index 3a82754426fa..a48744ac6768 100644
--- a/chart2/source/model/main/PolarCoordinateSystem.cxx
+++ b/chart2/source/model/main/PolarCoordinateSystem.cxx
@@ -30,11 +30,11 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString lcl_aServiceNamePolar2d( "com.sun.star.chart2.PolarCoordinateSystem2d" );
-static const OUString lcl_aServiceNamePolar3d( "com.sun.star.chart2.PolarCoordinateSystem3d" );
+static const char lcl_aServiceNamePolar2d[] = "com.sun.star.chart2.PolarCoordinateSystem2d";
+static const char lcl_aServiceNamePolar3d[] = "com.sun.star.chart2.PolarCoordinateSystem3d";
-static const OUString lcl_aImplementationNamePolar2d( "com.sun.star.comp.chart2.PolarCoordinateSystem2d" );
-static const OUString lcl_aImplementationNamePolar3d( "com.sun.star.comp.chart2.PolarCoordinateSystem3d" );
+static const char lcl_aImplementationNamePolar2d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem2d";
+static const char lcl_aImplementationNamePolar3d[] = "com.sun.star.comp.chart2.PolarCoordinateSystem3d";
}
namespace chart
@@ -108,7 +108,7 @@ Sequence< OUString > PolarCoordinateSystem2d::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, lcl_aImplementationNamePolar2d )
+APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem2d, OUString(lcl_aImplementationNamePolar2d) )
// ==== PolarCoordinateSystem3d ====
@@ -130,7 +130,7 @@ Sequence< OUString > PolarCoordinateSystem3d::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, lcl_aImplementationNamePolar3d )
+APPHELPER_XSERVICEINFO_IMPL( PolarCoordinateSystem3d, OUString(lcl_aImplementationNamePolar3d) )
} // namespace chart
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 35ee2004e13f..d3cac0d24a28 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -46,7 +46,7 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.Title" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.Title";
enum
{
@@ -374,7 +374,7 @@ uno::Sequence< OUString > Title::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( Title, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( Title, OUString(lcl_aServiceName) );
// needed by MSC compiler
using impl::Title_Base;
diff --git a/chart2/source/tools/CachedDataSequence.cxx b/chart2/source/tools/CachedDataSequence.cxx
index 13ce0b899ff5..8c9e8db18402 100644
--- a/chart2/source/tools/CachedDataSequence.cxx
+++ b/chart2/source/tools/CachedDataSequence.cxx
@@ -46,7 +46,7 @@ using ::chart::impl::CachedDataSequence_Base;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.CachedDataSequence" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.CachedDataSequence";
enum
{
@@ -260,7 +260,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL CachedDataSequence::getPropertySet
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, lcl_aServiceName )
+APPHELPER_XSERVICEINFO_IMPL( CachedDataSequence, OUString(lcl_aServiceName) )
// ________ XNumericalDataSequence ________
Sequence< double > SAL_CALL CachedDataSequence::getNumericalData()
diff --git a/chart2/source/tools/ConfigColorScheme.cxx b/chart2/source/tools/ConfigColorScheme.cxx
index f448c3143242..b5d227444131 100644
--- a/chart2/source/tools/ConfigColorScheme.cxx
+++ b/chart2/source/tools/ConfigColorScheme.cxx
@@ -34,7 +34,7 @@ using ::com::sun::star::uno::Sequence;
namespace
{
-static const OUString aSeriesPropName( "Series" );
+static const char aSeriesPropName[] = "Series";
} // anonymous namespace
diff --git a/chart2/source/tools/DataSource.cxx b/chart2/source/tools/DataSource.cxx
index f81571142c31..24f8b5140be1 100644
--- a/chart2/source/tools/DataSource.cxx
+++ b/chart2/source/tools/DataSource.cxx
@@ -30,7 +30,7 @@ using namespace ::com::sun::star;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.DataSource" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.DataSource";
} // anonymous namespace
namespace chart
@@ -69,7 +69,7 @@ Sequence< OUString > DataSource::getSupportedServiceNames_Static()
return aServices;
}
-APPHELPER_XSERVICEINFO_IMPL( DataSource, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( DataSource, OUString(lcl_aServiceName) );
} // namespace chart
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index ea675b92cb98..f3c5abc29d99 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -43,7 +43,7 @@ using namespace ::com::sun::star;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart2.ErrorBar" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart2.ErrorBar";
bool lcl_isInternalData( const uno::Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
@@ -468,7 +468,7 @@ uno::Sequence< OUString > ErrorBar::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( ErrorBar, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( ErrorBar, OUString(lcl_aServiceName) );
// needed by MSC compiler
using impl::ErrorBar_Base;
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index ee2dcfe9a5e4..1452af7c5791 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -59,14 +59,14 @@ namespace
{
// note: in xmloff this name is used to indicate usage of own data
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.InternalDataProvider" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.InternalDataProvider";
-static const OUString lcl_aCategoriesRangeName( "categories" );
-static const OUString lcl_aCategoriesLevelRangeNamePrefix( "categoriesL " ); //L <-> level
-static const OUString lcl_aCategoriesPointRangeNamePrefix( "categoriesP " ); //P <-> point
-static const OUString lcl_aCategoriesRoleName( "categories" );
-static const OUString lcl_aLabelRangePrefix( "label " );
-static const OUString lcl_aCompleteRange( "all" );
+static const char lcl_aCategoriesRangeName[] = "categories";
+static const char lcl_aCategoriesLevelRangeNamePrefix[] = "categoriesL "; //L <-> level
+static const char lcl_aCategoriesPointRangeNamePrefix[] = "categoriesP "; //P <-> point
+static const char lcl_aCategoriesRoleName[] = "categories";
+static const char lcl_aLabelRangePrefix[] = "label ";
+static const char lcl_aCompleteRange[] = "all";
typedef ::std::multimap< OUString, uno::WeakReference< chart2::data::XDataSequence > >
lcl_tSequenceMap;
@@ -780,7 +780,7 @@ Sequence< beans::PropertyValue > SAL_CALL InternalDataProvider::detectArguments(
{
Sequence< beans::PropertyValue > aArguments( 4 );
aArguments[0] = beans::PropertyValue(
- "CellRangeRepresentation", -1, uno::makeAny( lcl_aCompleteRange ),
+ "CellRangeRepresentation", -1, uno::makeAny( OUString(lcl_aCompleteRange) ),
beans::PropertyState_DIRECT_VALUE );
aArguments[1] = beans::PropertyValue(
"DataRowSource", -1, uno::makeAny(
@@ -821,7 +821,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
{
// label
- sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
return createDataSequenceAndAddToMap( lcl_aLabelRangePrefix + OUString::number( nIndex ));
}
else if ( aRangeRepresentation == "last" )
@@ -868,7 +868,7 @@ sal_Bool SAL_CALL InternalDataProvider::hasDataByRangeRepresentation( const OUSt
}
else if( aRange.match( lcl_aLabelRangePrefix ))
{
- sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
bResult = (nIndex < (m_bDataInColumns ? m_aInternalData.getColumnCount(): m_aInternalData.getRowCount()));
}
else
@@ -887,7 +887,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
if( aRange.match( lcl_aLabelRangePrefix ) )
{
- sal_Int32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ sal_Int32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
vector< uno::Any > aComplexLabel = m_bDataInColumns
? m_aInternalData.getComplexColumnLabel( nIndex )
: m_aInternalData.getComplexRowLabel( nIndex );
@@ -896,7 +896,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesPointRangeNamePrefix.getLength() ).toInt32();
+ sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesPointRangeNamePrefix) ).toInt32();
vector< uno::Any > aComplexCategory = m_bDataInColumns
? m_aInternalData.getComplexRowLabel( nPointIndex )
: m_aInternalData.getComplexColumnLabel( nPointIndex );
@@ -905,7 +905,7 @@ Sequence< uno::Any > SAL_CALL InternalDataProvider::getDataByRangeRepresentation
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
- sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength() ).toInt32();
+ sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix) ).toInt32();
vector< vector< uno::Any > > aCategories( m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels());
if( nLevel < lcl_getInnerLevelCount( aCategories ) )
{
@@ -960,7 +960,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
vector< uno::Any > aNewVector( ContainerHelper::SequenceToVector(aNewData) );
if( aRange.match( lcl_aLabelRangePrefix ) )
{
- sal_uInt32 nIndex = aRange.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ sal_uInt32 nIndex = aRange.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
if( m_bDataInColumns )
m_aInternalData.setComplexColumnLabel( nIndex, aNewVector );
else
@@ -968,7 +968,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
}
else if( aRange.match( lcl_aCategoriesPointRangeNamePrefix ) )
{
- sal_Int32 nPointIndex = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
+ sal_Int32 nPointIndex = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
if( m_bDataInColumns )
m_aInternalData.setComplexRowLabel( nPointIndex, aNewVector );
else
@@ -976,7 +976,7 @@ void SAL_CALL InternalDataProvider::setDataByRangeRepresentation(
}
else if( aRange.match( lcl_aCategoriesLevelRangeNamePrefix ) )
{
- sal_Int32 nLevel = aRange.copy( lcl_aCategoriesLevelRangeNamePrefix.getLength()).toInt32();
+ sal_Int32 nLevel = aRange.copy( strlen(lcl_aCategoriesLevelRangeNamePrefix)).toInt32();
vector< vector< uno::Any > > aComplexCategories = m_bDataInColumns ? m_aInternalData.getComplexRowLabels() : m_aInternalData.getComplexColumnLabels();
//ensure equal length
@@ -1204,7 +1204,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeToXML( const OUString& aRang
}
else if( aRangeRepresentation.match( lcl_aLabelRangePrefix ))
{
- sal_Int32 nIndex = aRangeRepresentation.copy( lcl_aLabelRangePrefix.getLength()).toInt32();
+ sal_Int32 nIndex = aRangeRepresentation.copy( strlen(lcl_aLabelRangePrefix)).toInt32();
aRange.aUpperLeft.bIsEmpty = false;
aRange.aLowerRight.bIsEmpty = true;
if( m_bDataInColumns )
@@ -1265,7 +1265,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
if( !aRange.aLowerRight.bIsEmpty &&
( aRange.aUpperLeft.nColumn != aRange.aLowerRight.nColumn ) &&
( aRange.aUpperLeft.nRow != aRange.aLowerRight.nRow ) )
- return lcl_aCompleteRange;
+ return OUString(lcl_aCompleteRange);
// attention: this data provider has the limitation that it stores
// internally if data comes from columns or rows. It is intended for
@@ -1276,7 +1276,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
if( m_bDataInColumns )
{
if( aRange.aUpperLeft.nColumn == 0 )
- return lcl_aCategoriesRangeName;
+ return OUString(lcl_aCategoriesRangeName);
if( aRange.aUpperLeft.nRow == 0 )
return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nColumn - 1 );
@@ -1285,7 +1285,7 @@ OUString SAL_CALL InternalDataProvider::convertRangeFromXML( const OUString& aXM
// data in rows
if( aRange.aUpperLeft.nRow == 0 )
- return lcl_aCategoriesRangeName;
+ return OUString(lcl_aCategoriesRangeName);
if( aRange.aUpperLeft.nColumn == 0 )
return lcl_aLabelRangePrefix + OUString::number( aRange.aUpperLeft.nRow - 1 );
@@ -1549,7 +1549,7 @@ Sequence< OUString > InternalDataProvider::getSupportedServiceNames_Static()
return aServices;
}
-APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, lcl_aServiceName );
+APPHELPER_XSERVICEINFO_IMPL( InternalDataProvider, OUString(lcl_aServiceName) );
} // namespace chart
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 638ca0654a94..d3b480f7c48a 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -46,12 +46,11 @@ using namespace ::com::sun::star::chart2;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Any;
-static OUString m_aMultiClick( "MultiClick" );
-static OUString m_aDragMethodEquals( "DragMethod=" );
-static OUString m_aDragParameterEquals( "DragParameter=" );
-static OUString m_aProtocol( "CID/" );
-static OUString m_aEmptyString;
-static OUString m_aPieSegmentDragMethodServiceName( "PieSegmentDraging" );
+static const char m_aMultiClick[] = "MultiClick";
+static const char m_aDragMethodEquals[] = "DragMethod=";
+static const char m_aDragParameterEquals[] = "DragParameter=";
+static const char m_aProtocol[] = "CID/";
+static const OUString m_aPieSegmentDragMethodServiceName("PieSegmentDraging");
namespace
{
@@ -507,7 +506,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
OUStringBuffer aRet( m_aProtocol );
aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
- if(aRet.getLength()>m_aProtocol.getLength())
+ if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol))
aRet.appendAscii("/");
if(!rParentParticle.isEmpty())
@@ -525,18 +524,16 @@ OUString ObjectIdentifier::createParticleForDiagram(
const Reference< XDiagram >& /*xDiagram*/
, ChartModel& /*xChartModel*/ )
{
- static OUString aRet("D=0");
//todo: if more than one diagram is implemeted, add the correct diagram index here
- return aRet;
+ return OUString("D=0");
}
OUString ObjectIdentifier::createParticleForDiagram(
const Reference< XDiagram >& /*xDiagram*/
, const Reference< frame::XModel >& /*xChartModel*/ )
{
- static OUString aRet("D=0");
//todo: if more than one diagram is implemeted, add the correct diagram index here
- return aRet;
+ return OUString("D=0");
}
OUString ObjectIdentifier::createParticleForCoordinateSystem(
@@ -698,7 +695,7 @@ OUString ObjectIdentifier::createClassifiedIdentifier(
, const OUString& rParticleID )//e.g. SeriesID
{
return createClassifiedIdentifierWithParent(
- eObjectType, rParticleID, m_aEmptyString );
+ eObjectType, rParticleID, OUString() );
}
OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
@@ -714,7 +711,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
OUStringBuffer aRet( m_aProtocol );
aRet.append( lcl_createClassificationStringForType( eObjectType, rDragMethodServiceName, rDragParameterString ));
- if(aRet.getLength()>m_aProtocol.getLength())
+ if(aRet.getLength() > (sal_Int32)strlen(m_aProtocol))
aRet.appendAscii("/");
aRet.append(rParentPartical);
if(!rParentPartical.isEmpty())
@@ -896,7 +893,7 @@ bool ObjectIdentifier::isMultiClickObject( const OUString& rClassifiedIdentifier
//was selected before;
//!!!!! by definition the name of a MultiClickObject starts with "CID/MultiClick:"
- bool bRet = rClassifiedIdentifier.match( m_aMultiClick, m_aProtocol.getLength() );
+ bool bRet = rClassifiedIdentifier.match( m_aMultiClick, strlen(m_aProtocol) );
return bRet;
}
diff --git a/chart2/source/tools/ReferenceSizeProvider.cxx b/chart2/source/tools/ReferenceSizeProvider.cxx
index 268c3d1f5ee3..d612707f73dc 100644
--- a/chart2/source/tools/ReferenceSizeProvider.cxx
+++ b/chart2/source/tools/ReferenceSizeProvider.cxx
@@ -133,7 +133,7 @@ void ReferenceSizeProvider::setValuesAtPropertySet(
if( ! xProp.is())
return;
- static const OUString aRefSizeName( "ReferencePageSize" );
+ static const char aRefSizeName[] = "ReferencePageSize";
try
{
@@ -168,7 +168,7 @@ void ReferenceSizeProvider::getAutoResizeFromPropSet(
const Reference< beans::XPropertySet > & xProp,
ReferenceSizeProvider::AutoResizeState & rInOutState )
{
- static const OUString aRefSizeName( "ReferencePageSize" );
+ static const char aRefSizeName[] = "ReferencePageSize";
AutoResizeState eSingleState = AUTO_RESIZE_UNKNOWN;
if( xProp.is())
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index 694e056e6b9f..d7be7b6136ca 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -55,17 +55,15 @@ bool RegressionCurveCalculator::isLinearScaling(
// no scaling means linear
if( !xScaling.is())
return true;
- static OUString aLinScalingServiceName( "com.sun.star.chart2.LinearScaling" );
uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY );
- return (xServiceName.is() && xServiceName->getServiceName().equals( aLinScalingServiceName ));
+ return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LinearScaling" ));
}
bool RegressionCurveCalculator::isLogarithmicScaling(
const Reference< chart2::XScaling > & xScaling )
{
- static OUString aLogScalingServiceName( "com.sun.star.chart2.LogarithmicScaling" );
uno::Reference< lang::XServiceName > xServiceName( xScaling, uno::UNO_QUERY );
- return (xServiceName.is() && xServiceName->getServiceName().equals( aLogScalingServiceName ));
+ return (xServiceName.is() && xServiceName->getServiceName().equals( "com.sun.star.chart2.LogarithmicScaling" ));
}
void RegressionCurveCalculator::setRegressionProperties(
diff --git a/chart2/source/tools/RegressionEquation.cxx b/chart2/source/tools/RegressionEquation.cxx
index 755b1dacfed7..a29d7d5828d1 100644
--- a/chart2/source/tools/RegressionEquation.cxx
+++ b/chart2/source/tools/RegressionEquation.cxx
@@ -45,8 +45,8 @@ using ::osl::MutexGuard;
namespace
{
-static const OUString lcl_aImplementationName( "com.sun.star.comp.chart2.RegressionEquation" );
-static const OUString lcl_aServiceName( "com.sun.star.chart2.RegressionEquation" );
+static const char lcl_aImplementationName[] = "com.sun.star.comp.chart2.RegressionEquation";
+static const char lcl_aServiceName[] = "com.sun.star.chart2.RegressionEquation";
enum
{
@@ -315,7 +315,7 @@ uno::Sequence< OUString > RegressionEquation::getSupportedServiceNames_Static()
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, lcl_aImplementationName );
+APPHELPER_XSERVICEINFO_IMPL( RegressionEquation, OUString(lcl_aImplementationName) );
using impl::RegressionEquation_Base;
diff --git a/chart2/source/tools/Scaling.cxx b/chart2/source/tools/Scaling.cxx
index e30f8d0b5037..2b4ea673938a 100644
--- a/chart2/source/tools/Scaling.cxx
+++ b/chart2/source/tools/Scaling.cxx
@@ -24,10 +24,10 @@
namespace
{
-static const OUString lcl_aServiceName_Logarithmic( "com.sun.star.chart2.LogarithmicScaling" );
-static const OUString lcl_aServiceName_Exponential( "com.sun.star.chart2.ExponentialScaling" );
-static const OUString lcl_aServiceName_Linear( "com.sun.star.chart2.LinearScaling" );
-static const OUString lcl_aServiceName_Power( "com.sun.star.chart2.PowerScaling" );
+static const char lcl_aServiceName_Logarithmic[] = "com.sun.star.chart2.LogarithmicScaling";
+static const char lcl_aServiceName_Exponential[] = "com.sun.star.chart2.ExponentialScaling";
+static const char lcl_aServiceName_Linear[] = "com.sun.star.chart2.LinearScaling";
+static const char lcl_aServiceName_Power[] = "com.sun.star.chart2.PowerScaling";
}
@@ -53,8 +53,7 @@ LogarithmicScaling::~LogarithmicScaling()
{
}
- double SAL_CALL
-LogarithmicScaling::doScaling( double value )
+double SAL_CALL LogarithmicScaling::doScaling( double value )
throw (uno::RuntimeException, std::exception)
{
double fResult;
@@ -65,27 +64,27 @@ LogarithmicScaling::doScaling( double value )
return fResult;
}
- uno::Reference< XScaling > SAL_CALL
-LogarithmicScaling::getInverseScaling()
+uno::Reference< XScaling > SAL_CALL LogarithmicScaling::getInverseScaling()
throw (uno::RuntimeException, std::exception)
{
return new ExponentialScaling( m_fBase );
}
- OUString SAL_CALL
-LogarithmicScaling::getServiceName()
+OUString SAL_CALL LogarithmicScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_Logarithmic;
+ return OUString(lcl_aServiceName_Logarithmic);
}
uno::Sequence< OUString > LogarithmicScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_Logarithmic, 1 );
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = lcl_aServiceName_Logarithmic;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, lcl_aServiceName_Logarithmic )
+APPHELPER_XSERVICEINFO_IMPL( LogarithmicScaling, OUString(lcl_aServiceName_Logarithmic) )
ExponentialScaling::ExponentialScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
m_fBase( 10.0 ),
@@ -102,8 +101,7 @@ ExponentialScaling::~ExponentialScaling()
{
}
- double SAL_CALL
-ExponentialScaling::doScaling( double value )
+double SAL_CALL ExponentialScaling::doScaling( double value )
throw (uno::RuntimeException, std::exception)
{
double fResult;
@@ -114,27 +112,27 @@ ExponentialScaling::doScaling( double value )
return fResult;
}
- uno::Reference< XScaling > SAL_CALL
-ExponentialScaling::getInverseScaling()
+uno::Reference< XScaling > SAL_CALL ExponentialScaling::getInverseScaling()
throw (uno::RuntimeException, std::exception)
{
return new LogarithmicScaling( m_fBase );
}
- OUString SAL_CALL
-ExponentialScaling::getServiceName()
+OUString SAL_CALL ExponentialScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_Exponential;
+ return OUString(lcl_aServiceName_Exponential);
}
uno::Sequence< OUString > ExponentialScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_Exponential, 1 );
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = lcl_aServiceName_Exponential;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, lcl_aServiceName_Exponential )
+APPHELPER_XSERVICEINFO_IMPL( ExponentialScaling, OUString(lcl_aServiceName_Exponential) )
LinearScaling::LinearScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
m_fSlope( 1.0 ),
@@ -172,20 +170,21 @@ uno::Reference< XScaling > SAL_CALL
return new LinearScaling( 1.0 / m_fSlope, m_fOffset / m_fSlope );
}
- OUString SAL_CALL
-LinearScaling::getServiceName()
+OUString SAL_CALL LinearScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_Linear;
+ return OUString(lcl_aServiceName_Linear);
}
uno::Sequence< OUString > LinearScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_Linear, 1 );
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = lcl_aServiceName_Linear;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( LinearScaling, lcl_aServiceName_Linear )
+APPHELPER_XSERVICEINFO_IMPL( LinearScaling, OUString(lcl_aServiceName_Linear) )
PowerScaling::PowerScaling( const uno::Reference< uno::XComponentContext > & xContext ) :
m_fExponent( 10.0 ),
@@ -225,16 +224,18 @@ uno::Reference< XScaling > SAL_CALL
PowerScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_Power;
+ return OUString(lcl_aServiceName_Power);
}
uno::Sequence< OUString > PowerScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_Power, 1 );
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = lcl_aServiceName_Power;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( PowerScaling, lcl_aServiceName_Power )
+APPHELPER_XSERVICEINFO_IMPL( PowerScaling, OUString(lcl_aServiceName_Power) )
} //namespace chart
diff --git a/chart2/source/tools/UncachedDataSequence.cxx b/chart2/source/tools/UncachedDataSequence.cxx
index 993e495ca939..3ba14aa36afd 100644
--- a/chart2/source/tools/UncachedDataSequence.cxx
+++ b/chart2/source/tools/UncachedDataSequence.cxx
@@ -40,7 +40,7 @@ using ::chart::impl::UncachedDataSequence_Base;
namespace
{
-static const OUString lcl_aServiceName( "com.sun.star.comp.chart.UncachedDataSequence" );
+static const char lcl_aServiceName[] = "com.sun.star.comp.chart.UncachedDataSequence";
enum
{
@@ -156,7 +156,7 @@ Reference< beans::XPropertySetInfo > SAL_CALL UncachedDataSequence::getPropertyS
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, lcl_aServiceName )
+APPHELPER_XSERVICEINFO_IMPL( UncachedDataSequence, OUString(lcl_aServiceName) )
// ________ XNumericalDataSequence ________
Sequence< double > SAL_CALL UncachedDataSequence::getNumericalData()
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index 86eeea128c14..c4931823615a 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -25,8 +25,8 @@
namespace
{
-static const OUString lcl_aServiceName_DateScaling( "com.sun.star.chart2.DateScaling" );
-static const OUString lcl_aServiceName_InverseDateScaling( "com.sun.star.chart2.InverseDateScaling" );
+static const char lcl_aServiceName_DateScaling[] = "com.sun.star.chart2.DateScaling";
+static const char lcl_aServiceName_InverseDateScaling[] = "com.sun.star.chart2.InverseDateScaling";
static const double lcl_fNumberOfMonths = 12.0;//todo: this needs to be offered by basic tools Date class if it should be more generic
}
@@ -100,16 +100,18 @@ uno::Reference< XScaling > SAL_CALL DateScaling::getInverseScaling()
OUString SAL_CALL DateScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_DateScaling;
+ return OUString(lcl_aServiceName_DateScaling);
}
uno::Sequence< OUString > DateScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_DateScaling, 1 );
+ uno::Sequence< OUString > aSeq(1);
+ aSeq.getArray()[0] = lcl_aServiceName_DateScaling;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( DateScaling, lcl_aServiceName_DateScaling )
+APPHELPER_XSERVICEINFO_IMPL( DateScaling, OUString(lcl_aServiceName_DateScaling) )
InverseDateScaling::InverseDateScaling( const Date& rNullDate, sal_Int32 nTimeUnit, bool bShifted )
: m_aNullDate( rNullDate )
@@ -179,16 +181,18 @@ uno::Reference< XScaling > SAL_CALL InverseDateScaling::getInverseScaling()
OUString SAL_CALL InverseDateScaling::getServiceName()
throw (uno::RuntimeException, std::exception)
{
- return lcl_aServiceName_InverseDateScaling;
+ return OUString(lcl_aServiceName_InverseDateScaling);
}
uno::Sequence< OUString > InverseDateScaling::getSupportedServiceNames_Static()
{
- return uno::Sequence< OUString >( & lcl_aServiceName_InverseDateScaling, 1 );
+ uno::Sequence< OUString > aSeq( 1 );
+ aSeq.getArray()[0] = lcl_aServiceName_InverseDateScaling;
+ return aSeq;
}
// implement XServiceInfo methods basing upon getSupportedServiceNames_Static
-APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, lcl_aServiceName_InverseDateScaling )
+APPHELPER_XSERVICEINFO_IMPL( InverseDateScaling, OUString(lcl_aServiceName_InverseDateScaling) )
} //namespace chart
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index e59c4079f73e..d34015753e4f 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -129,14 +129,14 @@ namespace comphelper
namespace
{
- void lcl_replaceParameter( OUString& _inout_Message, const OUString& _rPlaceHolder, const OUString& _rReplacement )
+ void lcl_replaceParameter( OUString& _inout_Message, const char* _rPlaceHolder, const OUString& _rReplacement )
{
- sal_Int32 nPlaceholderPosition = _inout_Message.indexOf( _rPlaceHolder );
+ sal_Int32 nPlaceholderPosition = _inout_Message.indexOfAsciiL( _rPlaceHolder, strlen(_rPlaceHolder) );
OSL_ENSURE( nPlaceholderPosition >= 0, "lcl_replaceParameter: placeholder not found!" );
if ( nPlaceholderPosition < 0 )
return;
- _inout_Message = _inout_Message.replaceAt( nPlaceholderPosition, _rPlaceHolder.getLength(), _rReplacement );
+ _inout_Message = _inout_Message.replaceAt( nPlaceholderPosition, strlen(_rPlaceHolder), _rReplacement );
}
}
@@ -147,32 +147,24 @@ namespace comphelper
const OptionalString& _rArgument3, const OptionalString& _rArgument4,
const OptionalString& _rArgument5, const OptionalString& _rArgument6 ) const
{
- // (if OUString had an indexOfAscii, we could save those ugly statics ...)
- static OUString sPH1( "$1$" );
- static OUString sPH2( "$2$" );
- static OUString sPH3( "$3$" );
- static OUString sPH4( "$4$" );
- static OUString sPH5( "$5$" );
- static OUString sPH6( "$6$" );
-
OUString sMessage( _rMessage );
if ( !!_rArgument1 )
- lcl_replaceParameter( sMessage, sPH1, *_rArgument1 );
+ lcl_replaceParameter( sMessage, "$1$", *_rArgument1 );
if ( !!_rArgument2 )
- lcl_replaceParameter( sMessage, sPH2, *_rArgument2 );
+ lcl_replaceParameter( sMessage, "$2$", *_rArgument2 );
if ( !!_rArgument3 )
- lcl_replaceParameter( sMessage, sPH3, *_rArgument3 );
+ lcl_replaceParameter( sMessage, "$3$", *_rArgument3 );
if ( !!_rArgument4 )
- lcl_replaceParameter( sMessage, sPH4, *_rArgument4 );
+ lcl_replaceParameter( sMessage, "$4$", *_rArgument4 );
if ( !!_rArgument5 )
- lcl_replaceParameter( sMessage, sPH5, *_rArgument5 );
+ lcl_replaceParameter( sMessage, "$5$", *_rArgument5 );
if ( !!_rArgument6 )
- lcl_replaceParameter( sMessage, sPH6, *_rArgument6 );
+ lcl_replaceParameter( sMessage, "$6$", *_rArgument6 );
try
{
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index 6df5a155fd1c..29b460641b98 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -67,8 +67,7 @@ css::uno::Any getNumberFormatDecimals(const css::uno::Reference<css::util::XNumb
css::uno::Reference<css::beans::XPropertySet> xFormat( xFormats->getByKey(nKey));
if (xFormat.is())
{
- static OUString PROPERTY_DECIMALS( "Decimals" );
- return xFormat->getPropertyValue(PROPERTY_DECIMALS);
+ return xFormat->getPropertyValue( "Decimals" );
}
}
catch(...)
diff --git a/connectivity/source/commontools/AutoRetrievingBase.cxx b/connectivity/source/commontools/AutoRetrievingBase.cxx
index 189e7569b7bd..9157e3302680 100644
--- a/connectivity/source/commontools/AutoRetrievingBase.cxx
+++ b/connectivity/source/commontools/AutoRetrievingBase.cxx
@@ -29,8 +29,8 @@ namespace connectivity
if ( sStmt.startsWith("INSERT") )
{
sStatement = m_sGeneratedValueStatement;
- static const OUString sColumn("$column");
- static const OUString sTable("$table");
+ static const char sColumn[] = "$column";
+ static const char sTable[] = "$table";
sal_Int32 nIndex = 0;
nIndex = sStatement.indexOf(sColumn,nIndex);
if ( -1 != nIndex )
@@ -49,7 +49,7 @@ namespace connectivity
nIntoIndex = 0;
OUString sTableName = sStmt.getToken(0,' ',nIntoIndex);
- sStatement = sStatement.replaceAt(nIndex,sTable.getLength(),sTableName);
+ sStatement = sStatement.replaceAt(nIndex, strlen(sTable), sTableName);
}
}
return sStatement;
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index f762c645730f..ffcc94112d17 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -288,10 +288,7 @@ void DBTypeConversion::setValue(const Reference<XColumnUpdate>& xVariant,
// and again a special treatment, this time for percent formats
if ((NumberFormat::NUMBER == nRealUsedTypeClass) && (NumberFormat::PERCENT == nTypeClass))
{ // formatting should be "percent", but the String provides just a simple number -> adjust
- OUString sExpanded(rString);
- static OUString s_sPercentSymbol( "%" );
- // need a method to add a sal_Unicode to a string, 'til then we use a static string
- sExpanded += s_sPercentSymbol;
+ OUString sExpanded = rString + "%";
fValue = xFormatter->convertStringToNumber(nKeyToUse, sExpanded);
}
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index 7804ad9f6fab..391f6ee4f677 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -44,7 +44,7 @@ namespace
if ( aPropertiesNode.isValid() )
{
uno::Sequence< OUString > aStringSeq;
- static const OUString s_sValue("/Value");
+ static const char s_sValue[] = "/Value";
const uno::Sequence< OUString > aProperties = aPropertiesNode.getNodeNames();
const OUString* pPropertiesIter = aProperties.getConstArray();
const OUString* pPropertiesEnd = pPropertiesIter + aProperties.getLength();
@@ -97,7 +97,7 @@ void DriversConfigImpl::Load(const uno::Reference< uno::XComponentContext >& _rx
{
if ( !m_aInstalled.isValid() )
{
- static const OUString s_sNodeName("org.openoffice.Office.DataAccess.Drivers/Installed"); ///Installed
+ static const char s_sNodeName[] = "org.openoffice.Office.DataAccess.Drivers/Installed"; ///Installed
m_aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(_rxORB, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
}
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 4bf877afffbd..1312e7e54c9a 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -122,14 +122,10 @@ namespace connectivity
Reference<XMultiServiceFactory> xFac(_xConnection,UNO_QUERY);
if ( xFac.is() )
{
- static const OUString s_sTableRename("TableRenameServiceName");
- m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableRename)),UNO_QUERY);
- static const OUString s_sTableAlteration("TableAlterationServiceName");
- m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sTableAlteration)),UNO_QUERY);
- static const OUString s_sKeyAlteration("KeyAlterationServiceName");
- m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sKeyAlteration)),UNO_QUERY);
- static const OUString s_sIndexAlteration("IndexAlterationServiceName");
- m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,s_sIndexAlteration)),UNO_QUERY);
+ m_xRename.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableRenameServiceName")),UNO_QUERY);
+ m_xAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"TableAlterationServiceName")),UNO_QUERY);
+ m_xKeyAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"KeyAlterationServiceName")),UNO_QUERY);
+ m_xIndexAlter.set(xFac->createInstance(lcl_getServiceNameForSetting(m_xConnection,"IndexAlterationServiceName")),UNO_QUERY);
}
}
catch(const Exception&)
diff --git a/connectivity/source/commontools/conncleanup.cxx b/connectivity/source/commontools/conncleanup.cxx
index 7a722235b196..b5882d01475a 100644
--- a/connectivity/source/commontools/conncleanup.cxx
+++ b/connectivity/source/commontools/conncleanup.cxx
@@ -32,12 +32,7 @@ namespace dbtools
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
-
- static const OUString& getActiveConnectionPropertyName()
- {
- static const OUString s_sActiveConnectionPropertyName( "ActiveConnection" );
- return s_sActiveConnectionPropertyName;
- }
+ static const char ACTIVE_CONNECTION_PROPERTY_NAME[] = "ActiveConnection";
//= OAutoConnectionDisposer
@@ -56,7 +51,7 @@ namespace dbtools
try
{
- xProps->setPropertyValue( getActiveConnectionPropertyName(), makeAny( _rxConnection ) );
+ xProps->setPropertyValue( ACTIVE_CONNECTION_PROPERTY_NAME, makeAny( _rxConnection ) );
m_xOriginalConnection = _rxConnection;
startPropertyListening( xProps );
}
@@ -71,7 +66,7 @@ namespace dbtools
{
try
{
- _rxRowSet->addPropertyChangeListener( getActiveConnectionPropertyName(), this );
+ _rxRowSet->addPropertyChangeListener( ACTIVE_CONNECTION_PROPERTY_NAME, this );
m_bPropertyListening = true;
}
catch( const Exception& )
@@ -91,7 +86,7 @@ namespace dbtools
OSL_ENSURE( _rxEventSource.is(), "OAutoConnectionDisposer::stopPropertyListening: invalid event source (no XPropertySet)!" );
if ( _rxEventSource.is() )
{
- _rxEventSource->removePropertyChangeListener( getActiveConnectionPropertyName(), this );
+ _rxEventSource->removePropertyChangeListener( ACTIVE_CONNECTION_PROPERTY_NAME, this );
m_bPropertyListening = false;
}
}
@@ -135,7 +130,7 @@ namespace dbtools
void SAL_CALL OAutoConnectionDisposer::propertyChange( const PropertyChangeEvent& _rEvent ) throw (RuntimeException, std::exception)
{
- if ( _rEvent.PropertyName.equals( getActiveConnectionPropertyName() ) )
+ if ( _rEvent.PropertyName == ACTIVE_CONNECTION_PROPERTY_NAME )
{ // somebody set a new ActiveConnection
Reference< XConnection > xNewConnection;
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index a5faf6fc6268..7791385dbba4 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -694,15 +694,15 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
Reference< XRow > xCurrentRow(xPrivileges, UNO_QUERY);
const OUString sUserWorkingFor = _xMetaData->getUserName();
- static const OUString sSELECT( "SELECT" );
- static const OUString sINSERT( "INSERT" );
- static const OUString sUPDATE( "UPDATE" );
- static const OUString sDELETE( "DELETE" );
- static const OUString sREAD( "READ" );
- static const OUString sCREATE( "CREATE" );
- static const OUString sALTER( "ALTER" );
- static const OUString sREFERENCE( "REFERENCE" );
- static const OUString sDROP( "DROP" );
+ static const char sSELECT[] = "SELECT";
+ static const char sINSERT[] = "INSERT";
+ static const char sUPDATE[] = "UPDATE";
+ static const char sDELETE[] = "DELETE";
+ static const char sREAD[] = "READ";
+ static const char sCREATE[] = "CREATE";
+ static const char sALTER[] = "ALTER";
+ static const char sREFERENCE[] = "REFERENCE";
+ static const char sDROP[] = "DROP";
if ( xCurrentRow.is() )
{
@@ -800,9 +800,8 @@ sal_Int32 getTablePrivileges(const Reference< XDatabaseMetaData>& _xMetaData,
}
catch(const SQLException& e)
{
- static OUString sNotSupportedState( "IM001" );
// some drivers don't support any privileges so we assume that we are allowed to do all we want :-)
- if(e.SQLState == sNotSupportedState)
+ if(e.SQLState == "IM001")
nPrivileges |= Privilege::DROP |
Privilege::REFERENCE |
Privilege::ALTER |
@@ -965,20 +964,17 @@ sal_Int32 DBTypeConversion::convertUnicodeStringToLength( const OUString& _rSour
}
OUString lcl_getReportEngines()
{
- static OUString s_sNodeName("org.openoffice.Office.DataAccess/ReportEngines");
- return s_sNodeName;
+ return OUString("org.openoffice.Office.DataAccess/ReportEngines");
}
OUString lcl_getDefaultReportEngine()
{
- static OUString s_sNodeName("DefaultReportEngine");
- return s_sNodeName;
+ return OUString("DefaultReportEngine");
}
OUString lcl_getReportEngineNames()
{
- static OUString s_sNodeName("ReportEngineNames");
- return s_sNodeName;
+ return OUString("ReportEngineNames");
}
OUString getDefaultReportEngineServiceName(const Reference< XComponentContext >& _rxORB)
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 9f9cbeedd1de..4fbd21764d6c 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -156,8 +156,8 @@ namespace dbtools
)
)
{
- static const OUString sSingleQuote( "'" );
- static const OUString sDoubleQuote( "''" );
+ static const char sSingleQuote[] = "'";
+ static const char sDoubleQuote[] = "''";
sal_Int32 nIndex = -1;
sal_Int32 nTemp = 0;
@@ -304,8 +304,8 @@ namespace dbtools
if ( bValidQuotedText )
{
sValue = sValue.copy( 1, sValue.getLength() - 2 );
- static const OUString sSingleQuote( "'" );
- static const OUString sDoubleQuote( "''" );
+ static const char sSingleQuote[] = "'";
+ static const char sDoubleQuote[] = "''";
sal_Int32 nIndex = -1;
sal_Int32 nTemp = 0;
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index e0e1f4c9ba3b..6c4b8ed7ea32 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -48,16 +48,8 @@ void SAL_CALL OPoolTimer::onShot()
{
m_pPool->invalidatePooledConnections();
}
-namespace
-{
- static const OUString& getTimeoutNodeName()
- {
- static OUString s_sNodeName( "Timeout" );
- return s_sNodeName;
- }
-
-}
+static const char TIMEOUT_NODENAME[] = "Timeout";
//= OConnectionPool
@@ -78,9 +70,9 @@ OConnectionPool::OConnectionPool(const Reference< XDriver >& _xDriver,
Reference<XPropertySet> xProp(m_xDriverNode,UNO_QUERY);
if(xProp.is())
- xProp->addPropertyChangeListener(getTimeoutNodeName(),this);
+ xProp->addPropertyChangeListener(TIMEOUT_NODENAME,this);
- OPoolCollection::getNodeValue(getTimeoutNodeName(),m_xDriverNode) >>= m_nALiveCount;
+ OPoolCollection::getNodeValue(TIMEOUT_NODENAME, m_xDriverNode) >>= m_nALiveCount;
calculateTimeOuts();
m_xInvalidator = new OPoolTimer(this,::salhelper::TTimeValue(m_nTimeOut,0));
@@ -161,7 +153,7 @@ void OConnectionPool::clear(bool _bDispose)
xComponent->removeEventListener(this);
Reference< XPropertySet > xProp(m_xDriverNode, UNO_QUERY);
if (xProp.is())
- xProp->removePropertyChangeListener(getTimeoutNodeName(),this);
+ xProp->removePropertyChangeListener(TIMEOUT_NODENAME, this);
m_xDriverNode.clear();
m_xDriver.clear();
@@ -302,7 +294,7 @@ Reference< XConnection> OConnectionPool::getPooledConnection(TConnectionMap::ite
void SAL_CALL OConnectionPool::propertyChange( const PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException, std::exception)
{
- if(getTimeoutNodeName() == evt.PropertyName)
+ if(TIMEOUT_NODENAME == evt.PropertyName)
{
evt.NewValue >>= m_nALiveCount;
calculateTimeOuts();
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx
index 2bc0bd5f79a0..9976b55a64b1 100644
--- a/connectivity/source/cpool/ZPoolCollection.cxx
+++ b/connectivity/source/cpool/ZPoolCollection.cxx
@@ -42,34 +42,29 @@ using namespace ::osl;
using namespace connectivity;
-static const OUString& getConnectionPoolNodeName()
+static OUString getConnectionPoolNodeName()
{
- static OUString s_sNodeName( "org.openoffice.Office.DataAccess/ConnectionPool" );
- return s_sNodeName;
+ return OUString( "org.openoffice.Office.DataAccess/ConnectionPool" );
}
-static const OUString& getEnablePoolingNodeName()
+static OUString getEnablePoolingNodeName()
{
- static OUString s_sNodeName( "EnablePooling" );
- return s_sNodeName;
+ return OUString( "EnablePooling" );
}
-static const OUString& getDriverNameNodeName()
+static OUString getDriverNameNodeName()
{
- static OUString s_sNodeName( "DriverName" );
- return s_sNodeName;
+ return OUString( "DriverName" );
}
-static const OUString& getDriverSettingsNodeName()
+static OUString getDriverSettingsNodeName()
{
- static OUString s_sNodeName( "DriverSettings" );
- return s_sNodeName;
+ return OUString( "DriverSettings" );
}
-static const OUString& getEnableNodeName()
+static OUString getEnableNodeName()
{
- static OUString s_sNodeName( "Enable" );
- return s_sNodeName;
+ return OUString( "Enable" );
}
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index 79abed73a185..319bc688769e 100644
--- a/connectivity/source/drivers/ado/AConnection.cxx
+++ b/connectivity/source/drivers/ado/AConnection.cxx
@@ -435,7 +435,7 @@ void OConnection::buildTypeInfo() throw( SQLException)
if ( bOk )
{
// HACK for access
- static const OUString s_sVarChar("VarChar");
+ static const char s_sVarChar[] = "VarChar";
do
{
sal_Int32 nPos = 1;
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index ee201ee3c0b4..3174f7809061 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -142,11 +142,10 @@ static CellContentType lcl_GetContentOrResultType( const Reference<XCell>& xCell
CellContentType eCellType = xCell->getType();
if ( eCellType == CellContentType_FORMULA )
{
- static const OUString s_sFormulaResultType("FormulaResultType");
Reference<XPropertySet> xProp( xCell, UNO_QUERY );
try
{
- xProp->getPropertyValue( s_sFormulaResultType ) >>= eCellType; // type of formula result
+ xProp->getPropertyValue( "FormulaResultType" ) >>= eCellType; // type of formula result
}
catch (UnknownPropertyException&)
{
@@ -258,10 +257,9 @@ static void lcl_GetColumnInfo( const Reference<XSpreadsheet>& xSheet, const Refe
sal_Int16 nNumType = NumberFormat::NUMBER;
try
{
- static OUString s_NumberFormat("NumberFormat");
sal_Int32 nKey = 0;
- if ( xProp->getPropertyValue( s_NumberFormat ) >>= nKey )
+ if ( xProp->getPropertyValue( "NumberFormat" ) >>= nKey )
{
const Reference<XPropertySet> xFormat = xFormats->getByKey( nKey );
if ( xFormat.is() )
diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
index a75417619cec..d353c360f022 100644
--- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx
@@ -374,9 +374,8 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run
::osl::MutexGuard aGuard( m_aMutex );
bool bReadOnly = false;
- static OUString sReadOnly( "IsReadOnly" );
::ucbhelper::Content aFile(m_pConnection->getContent(),Reference< XCommandEnvironment >(), comphelper::getProcessComponentContext());
- aFile.getPropertyValue(sReadOnly) >>= bReadOnly;
+ aFile.getPropertyValue("IsReadOnly") >>= bReadOnly;
return bReadOnly;
}
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index eebe107ffbad..47d3472ca7a6 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -622,7 +622,7 @@ OUString ODbaseTable::getEntry(OConnection* _pConnection,const OUString& _sName
OUString sName;
OUString sExt;
INetURLObject aURL;
- static const OUString s_sSeparator("/");
+ static const char s_sSeparator[] = "/";
xDir->beforeFirst();
while(xDir->next())
{
@@ -1149,7 +1149,7 @@ bool ODbaseTable::CreateImpl()
return true;
}
-void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId,const OUString& _sColumnName)
+void ODbaseTable::throwInvalidColumnType(const sal_uInt16 _nErrorId, const OUString& _sColumnName)
{
try
{
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 9a114fb75d82..8e6a0746383c 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -42,7 +42,7 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
{
OSQLColumns::Vector::const_iterator aIter;
- static const OUString aName("Name");
+ static const char aName[] = "Name";
for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter)
{
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 5a766df35675..5ab8b44e5b54 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -167,7 +167,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
// check if any type is given
// when no types are given then we have to return all tables e.g. TABLE
- static const OUString aTable("TABLE");
+ static const char aTable[] = "TABLE";
bool bTableFound = true;
sal_Int32 nLength = types.getLength();
@@ -296,7 +296,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
}
if(bNewRow)
{
- aRow.push_back(new ORowSetValueDecorator(aTable));
+ aRow.push_back(new ORowSetValueDecorator(OUString(aTable)));
aRow.push_back(ODatabaseMetaDataResultSet::getEmptyValue());
aRows.push_back(aRow);
@@ -499,8 +499,7 @@ OUString SAL_CALL ODatabaseMetaData::getCatalogTerm( ) throw(SQLException, Runt
OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw( )
{
- static const OUString sQuote("\"");
- return sQuote;
+ return OUString("\"");
}
OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters( ) throw(SQLException, RuntimeException, std::exception)
@@ -853,8 +852,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsANSI92IntermediateSQL( ) throw(SQL
OUString SAL_CALL ODatabaseMetaData::getURL( ) throw(SQLException, RuntimeException, std::exception)
{
- static const OUString aValue( "sdbc:file:" );
- return aValue;
+ return OUString( "sdbc:file:" );
}
OUString SAL_CALL ODatabaseMetaData::getUserName( ) throw(SQLException, RuntimeException, std::exception)
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index 0407c6de1801..5e672fdeb7d4 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -1034,7 +1034,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
uno::Reference< XResultSet > xResultSet = pResultSet;
uno::Reference< XStatement > statement = m_pConnection->createStatement();
- static const OUString wld("%");
+ static const char wld[] = "%";
OUStringBuffer queryBuf(
"SELECT "
"priv.RDB$RELATION_NAME, " // 1 Table name
@@ -1295,7 +1295,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
uno::Reference< XResultSet > xResultSet = pResultSet;
uno::Reference< XStatement > statement = m_pConnection->createStatement();
- static const OUString wld("%");
+ static const char wld[] = "%";
OUStringBuffer queryBuf(
"SELECT "
"RDB$RELATION_NAME, "
@@ -1662,7 +1662,7 @@ uno::Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
// TODO: column specific privileges are included, we may need
// to have WHERE RDB$FIELD_NAME = NULL or similar.
- static const OUString wld("%");
+ static const char wld[] = "%";
OUStringBuffer queryBuf(
"SELECT "
"priv.RDB$RELATION_NAME, " // 1
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index b9e3efee1ecc..ce30f3b29d0d 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -332,14 +332,12 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
if(io_nPrecisions)
{
io_nType = DataType::DECIMAL;
- static const OUString s_sDECIMAL("DECIMAL");
- o_sTypeName = s_sDECIMAL;
+ o_sTypeName = "DECIMAL";
}
else
{
io_nType = DataType::DOUBLE;
- static const OUString s_sDOUBLE("DOUBLE");
- o_sTypeName = s_sDOUBLE;
+ o_sTypeName = "DOUBLE";
}
}
else
@@ -356,33 +354,21 @@ void OFlatTable::impl_fillColumnInfo_nothrow(QuotedTokenizedString& aFirstLine,
{
case NUMBERFORMAT_DATE:
io_nType = DataType::DATE;
- {
- static const OUString s_sDATE("DATE");
- o_sTypeName = s_sDATE;
- }
+ o_sTypeName = "DATE";
break;
case NUMBERFORMAT_DATETIME:
io_nType = DataType::TIMESTAMP;
- {
- static const OUString s_sTIMESTAMP("TIMESTAMP");
- o_sTypeName = s_sTIMESTAMP;
- }
+ o_sTypeName = "TIMESTAMP";
break;
case NUMBERFORMAT_TIME:
io_nType = DataType::TIME;
- {
- static const OUString s_sTIME("TIME");
- o_sTypeName = s_sTIME;
- }
+ o_sTypeName = "TIME";
break;
default:
io_nType = DataType::VARCHAR;
io_nPrecisions = 0; // nyi: Data can be longer!
io_nScales = 0;
- {
- static const OUString s_sVARCHAR("VARCHAR");
- o_sTypeName = s_sVARCHAR;
- }
+ o_sTypeName = "VARCHAR";
};
nFlags |= ColumnSearch::CHAR;
}
@@ -477,7 +463,7 @@ OUString OFlatTable::getEntry()
INetURLObject aURL;
xDir->beforeFirst();
- static const OUString s_sSeparator("/");
+ static const char s_sSeparator[] = "/";
while(xDir->next())
{
sName = xRow->getString(1);
diff --git a/connectivity/source/drivers/hsqldb/HCatalog.cxx b/connectivity/source/drivers/hsqldb/HCatalog.cxx
index 9a87f6e0bdae..975192d1406c 100644
--- a/connectivity/source/drivers/hsqldb/HCatalog.cxx
+++ b/connectivity/source/drivers/hsqldb/HCatalog.cxx
@@ -53,8 +53,8 @@ void OHCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TStrin
void OHCatalog::refreshTables()
{
TStringVector aVector;
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
Sequence< OUString > sTableTypes(2);
sTableTypes[0] = s_sTableTypeView;
diff --git a/connectivity/source/drivers/hsqldb/HTables.cxx b/connectivity/source/drivers/hsqldb/HTables.cxx
index 6ee5c545b045..e1850b51859f 100644
--- a/connectivity/source/drivers/hsqldb/HTables.cxx
+++ b/connectivity/source/drivers/hsqldb/HTables.cxx
@@ -51,9 +51,9 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sAll("%");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
diff --git a/connectivity/source/drivers/hsqldb/HUser.cxx b/connectivity/source/drivers/hsqldb/HUser.cxx
index 98a615fedc8a..124ab58ff641 100644
--- a/connectivity/source/drivers/hsqldb/HUser.cxx
+++ b/connectivity/source/drivers/hsqldb/HUser.cxx
@@ -119,16 +119,16 @@ void OHSQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_In
if ( xRes.is() )
{
- static const OUString sSELECT( "SELECT" );
- static const OUString sINSERT( "INSERT" );
- static const OUString sUPDATE( "UPDATE" );
- static const OUString sDELETE( "DELETE" );
- static const OUString sREAD( "READ" );
- static const OUString sCREATE( "CREATE" );
- static const OUString sALTER( "ALTER" );
- static const OUString sREFERENCE( "REFERENCE" );
- static const OUString sDROP( "DROP" );
- static const OUString sYes( "YES" );
+ static const char sSELECT [] = "SELECT";
+ static const char sINSERT [] = "INSERT";
+ static const char sUPDATE [] = "UPDATE";
+ static const char sDELETE [] = "DELETE";
+ static const char sREAD [] = "READ";
+ static const char sCREATE [] = "CREATE";
+ static const char sALTER [] = "ALTER";
+ static const char sREFERENCE[] = "REFERENCE";
+ static const char sDROP [] = "DROP";
+ static const char sYes [] = "YES";
nRightsWithGrant = nRights = 0;
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 7baccaa0ce2d..1bf1270888b0 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -758,7 +758,7 @@ void java_sql_Connection::loadDriverFromProperties( const OUString& _sDriverClas
OUString java_sql_Connection::impl_getJavaDriverClassPath_nothrow(const OUString& _sDriverClass)
{
- static const OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths");
+ static const char s_sNodeName[] = "org.openoffice.Office.DataAccess/JDBC/DriverClassPaths";
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
OUString sURL;
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index a50529ce700a..c8bda379e966 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -51,9 +51,7 @@ KabDatabaseMetaData::~KabDatabaseMetaData()
const OUString & KabDatabaseMetaData::getAddressBookTableName()
{
- static const OUString aAddressBookTableName
- (OUString::createFromAscii( i18n("Address Book") ));
-
+ static const OUString aAddressBookTableName("Address Book");
return aAddressBookTableName;
}
diff --git a/connectivity/source/drivers/kab/KResultSetMetaData.cxx b/connectivity/source/drivers/kab/KResultSetMetaData.cxx
index 70a760c1d901..640298117ad9 100644
--- a/connectivity/source/drivers/kab/KResultSetMetaData.cxx
+++ b/connectivity/source/drivers/kab/KResultSetMetaData.cxx
@@ -39,7 +39,7 @@ KabResultSetMetaData::~KabResultSetMetaData()
void KabResultSetMetaData::setKabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
{
OSQLColumns::Vector::const_iterator aIter;
- static const OUString aName("Name");
+ static const char aName[] = "Name";
for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter)
{
diff --git a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
index e0586ace407b..5eb0985fe2b0 100644
--- a/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabDatabaseMetaData.cxx
@@ -778,7 +778,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTableTypes( ) throw(
Reference< XResultSet > xRef = pResult;
static ODatabaseMetaDataResultSet::ORows aRows;
- static const OUString aTable("TABLE");
+ static const char aTable[] = "TABLE";
if (aRows.empty())
{
@@ -963,7 +963,7 @@ Reference< XResultSet > SAL_CALL MacabDatabaseMetaData::getTables(
// check whether we have tables in the requested types
// for the moment, we answer only the "TABLE" table type
// when no types are given at all, we return all the tables
- static const OUString aTable("TABLE");
+ static const char aTable[] = "TABLE";
bool bTableFound = false;
const OUString* p = types.getConstArray(),
* pEnd = p + types.getLength();
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
index 24cd1de03a13..6248ade38d6f 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
@@ -44,7 +44,7 @@ MacabResultSetMetaData::~MacabResultSetMetaData()
void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns) throw(SQLException)
{
OSQLColumns::Vector::const_iterator aIter;
- static const OUString aName("Name");
+ static const char aName[] = "Name";
MacabRecords *aRecords;
MacabHeader *aHeader;
diff --git a/connectivity/source/drivers/mysql/YCatalog.cxx b/connectivity/source/drivers/mysql/YCatalog.cxx
index 85adabef944c..cb071e05b4f5 100644
--- a/connectivity/source/drivers/mysql/YCatalog.cxx
+++ b/connectivity/source/drivers/mysql/YCatalog.cxx
@@ -54,9 +54,9 @@ void OMySQLCatalog::refreshObjects(const Sequence< OUString >& _sKindOfObject,TS
void OMySQLCatalog::refreshTables()
{
TStringVector aVector;
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sAll("%");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index c76ade75e6ab..aa776a4234c9 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -278,7 +278,7 @@ namespace connectivity
OUString sAdd;
if ( RTL_TEXTENCODING_UTF8 == (*aLookup).getEncoding() )
{
- static const OUString s_sCharSetOp("useUnicode=true&");
+ static const char s_sCharSetOp[] = "useUnicode=true&";
if ( !sCuttedUrl.matchIgnoreAsciiCase(s_sCharSetOp) )
{
sAdd = s_sCharSetOp;
diff --git a/connectivity/source/drivers/mysql/YTable.cxx b/connectivity/source/drivers/mysql/YTable.cxx
index 37a3ce40ee5c..8fc146324c72 100644
--- a/connectivity/source/drivers/mysql/YTable.cxx
+++ b/connectivity/source/drivers/mysql/YTable.cxx
@@ -196,7 +196,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
::dbtools::OPropertyMap& rProp = OMetaConnection::getPropMap();
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nOldType;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPE)) >>= nNewType;
- // and precsions and scale
+ // and precisions and scale
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION)) >>= nOldPrec;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_PRECISION))>>= nNewPrec;
xProp->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_SCALE)) >>= nOldScale;
@@ -229,7 +229,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
OUString sTypeName;
descriptor->getPropertyValue(rProp.getNameByIndex(PROPERTY_ID_TYPENAME)) >>= sTypeName;
- static OUString s_sAutoIncrement("auto_increment");
+ static const char s_sAutoIncrement[] = "auto_increment";
if ( bAutoIncrement )
{
if ( sTypeName.indexOf(s_sAutoIncrement) == -1 )
@@ -308,8 +308,7 @@ void OMySQLTable::alterColumnType(sal_Int32 nNewType,const OUString& _rColName,
OUString OMySQLTable::getTypeCreatePattern() const
{
- static const OUString s_sCreatePattern("(M,D)");
- return s_sCreatePattern;
+ return OUString("(M,D)");
}
void OMySQLTable::alterDefaultValue(const OUString& _sNewDefault,const OUString& _rColName)
diff --git a/connectivity/source/drivers/mysql/YTables.cxx b/connectivity/source/drivers/mysql/YTables.cxx
index e1773333c623..e1c2fb6e7589 100644
--- a/connectivity/source/drivers/mysql/YTables.cxx
+++ b/connectivity/source/drivers/mysql/YTables.cxx
@@ -51,9 +51,9 @@ sdbcx::ObjectType OTables::createObject(const OUString& _rName)
OUString sCatalog,sSchema,sTable;
::dbtools::qualifiedNameComponents(m_xMetaData,_rName,sCatalog,sSchema,sTable,::dbtools::eInDataManipulation);
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sAll("%");
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sAll[] = "%";
Sequence< OUString > sTableTypes(3);
sTableTypes[0] = s_sTableTypeView;
@@ -164,15 +164,15 @@ void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName)
OUString OTables::adjustSQL(const OUString& _sSql)
{
OUString sSQL = _sSql;
- static const OUString s_sUNSIGNED("UNSIGNED");
+ static const char s_sUNSIGNED[] = "UNSIGNED";
sal_Int32 nIndex = sSQL.indexOf(s_sUNSIGNED);
while(nIndex != -1 )
{
sal_Int32 nParen = sSQL.indexOf(')',nIndex);
- sal_Int32 nPos = nIndex + s_sUNSIGNED.getLength();
+ sal_Int32 nPos = nIndex + strlen(s_sUNSIGNED);
OUString sNewUnsigned( sSQL.copy(nPos,nParen - nPos + 1));
- sSQL = sSQL.replaceAt(nIndex,s_sUNSIGNED.getLength()+sNewUnsigned.getLength(),sNewUnsigned + s_sUNSIGNED);
- nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + s_sUNSIGNED.getLength()+sNewUnsigned.getLength());
+ sSQL = sSQL.replaceAt(nIndex, strlen(s_sUNSIGNED) + sNewUnsigned.getLength(), sNewUnsigned + s_sUNSIGNED);
+ nIndex = sSQL.indexOf(s_sUNSIGNED,nIndex + strlen(s_sUNSIGNED) + sNewUnsigned.getLength());
}
return sSQL;
}
@@ -180,7 +180,7 @@ OUString OTables::adjustSQL(const OUString& _sSql)
void OTables::createTable( const Reference< XPropertySet >& descriptor )
{
const Reference< XConnection > xConnection = static_cast<OMySQLCatalog&>(m_rParent).getConnection();
- static const OUString s_sCreatePattern("(M,D)");
+ static const char s_sCreatePattern[] = "(M,D)";
const OUString aSql = adjustSQL(::dbtools::createSqlCreateTableStatement(descriptor,xConnection,this,s_sCreatePattern));
Reference< XStatement > xStmt = xConnection->createStatement( );
if ( xStmt.is() )
diff --git a/connectivity/source/drivers/mysql/YUser.cxx b/connectivity/source/drivers/mysql/YUser.cxx
index 2a54977a2824..709e98445c82 100644
--- a/connectivity/source/drivers/mysql/YUser.cxx
+++ b/connectivity/source/drivers/mysql/YUser.cxx
@@ -119,16 +119,16 @@ void OMySQLUser::findPrivilegesAndGrantPrivileges(const OUString& objName, sal_I
if ( xRes.is() )
{
- static const OUString sSELECT( "SELECT" );
- static const OUString sINSERT( "INSERT" );
- static const OUString sUPDATE( "UPDATE" );
- static const OUString sDELETE( "DELETE" );
- static const OUString sREAD( "READ" );
- static const OUString sCREATE( "CREATE" );
- static const OUString sALTER( "ALTER" );
- static const OUString sREFERENCE( "REFERENCES" );
- static const OUString sDROP( "DROP" );
- static const OUString sYes( "YES" );
+ static const char sSELECT [] = "SELECT";
+ static const char sINSERT [] = "INSERT";
+ static const char sUPDATE [] = "UPDATE";
+ static const char sDELETE [] = "DELETE";
+ static const char sREAD [] = "READ";
+ static const char sCREATE [] = "CREATE";
+ static const char sALTER [] = "ALTER";
+ static const char sREFERENCE[] = "REFERENCES";
+ static const char sDROP [] = "DROP";
+ static const char sYes [] = "YES";
nRightsWithGrant = nRights = 0;
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 9fb7fe05b11c..c020893df624 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -76,14 +76,7 @@ namespace pq_sdbc_driver
OUString DriverGetImplementationName()
{
- static OUString *p;
- if (! p )
- {
- MutexGuard guard( osl::Mutex::getGlobalMutex() );
- static OUString instance( "org.openoffice.comp.connectivity.pq.Driver.noext" );
- p = &instance;
- }
- return *p;
+ return OUString( "org.openoffice.comp.connectivity.pq.Driver.noext" );
}
Sequence< OUString > DriverGetSupportedServiceNames()
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 0c8a47a1c2af..1c03e35f3443 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -262,9 +262,9 @@ namespace
{
OUString sComposedName;
- static const OUString s_sTableTypeView("VIEW");
- static const OUString s_sTableTypeTable("TABLE");
- static const OUString s_sWildcard( "%" );
+ static const char s_sTableTypeView[] = "VIEW";
+ static const char s_sTableTypeTable[] = "TABLE";
+ static const char s_sWildcard[] = "%" ;
// we want all catalogues, all schemas, all tables
Sequence< OUString > sTableTypes(3);
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index bb7dd750e78d..d324dfebad23 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -78,14 +78,14 @@ using namespace com::sun::star;
-static OUString MODULEPROP_SHORTNAME ("ooSetupFactoryShortName" );
-static OUString MODULEPROP_UINAME ("ooSetupFactoryUIName" );
-static OUString CMDPROP_UINAME ("Name" );
+static const char MODULEPROP_SHORTNAME [] = "ooSetupFactoryShortName";
+static const char MODULEPROP_UINAME [] = "ooSetupFactoryUIName";
+static const char CMDPROP_UINAME [] = "Name";
-static OUString FOLDERNAME_UICONFIG ("Configurations2" );
+static const char FOLDERNAME_UICONFIG [] = "Configurations2";
-static OUString MEDIATYPE_PROPNAME ("MediaType" );
-static OUString MEDIATYPE_UICONFIG ("application/vnd.sun.xml.ui.configuration");
+static const char MEDIATYPE_PROPNAME [] = "MediaType";
+static const char MEDIATYPE_UICONFIG [] = "application/vnd.sun.xml.ui.configuration";
static const sal_uInt16 KEYCODE_ARRAY[] =
@@ -1354,7 +1354,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl)
OUString sMediaType;
xUIConfigProps->getPropertyValue(MEDIATYPE_PROPNAME) >>= sMediaType;
if (sMediaType.isEmpty())
- xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG));
+ xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(OUString(MEDIATYPE_UICONFIG)));
css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( m_xContext );
xCfgMgr2->setStorage(xUIConfig);
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 641f3b46496f..9f63afd4e447 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -75,14 +75,14 @@ void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com:
m_xDoc = xModel;
}
-static OUString CMDURL_SPART (".uno:StyleApply?Style:string=");
-static OUString CMDURL_FPART2 ("&FamilyName:string=");
+static const char CMDURL_SPART [] = ".uno:StyleApply?Style:string=";
+static const char CMDURL_FPART2[] = "&FamilyName:string=";
-static OUString CMDURL_STYLEPROT_ONLY (".uno:StyleApply?");
-static OUString CMDURL_SPART_ONLY ("Style:string=");
-static OUString CMDURL_FPART_ONLY ("FamilyName:string=");
+static const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
+static const char CMDURL_SPART_ONLY [] = "Style:string=";
+static const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
-static OUString STYLEPROP_UINAME ("DisplayName");
+static const char STYLEPROP_UINAME[] = "DisplayName";
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
{
@@ -96,9 +96,9 @@ OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUSt
bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
{
- static sal_Int32 LEN_STYLEPROT = CMDURL_STYLEPROT_ONLY.getLength();
- static sal_Int32 LEN_SPART = CMDURL_SPART_ONLY.getLength();
- static sal_Int32 LEN_FPART = CMDURL_FPART_ONLY.getLength();
+ static const sal_Int32 LEN_STYLEPROT = strlen(CMDURL_STYLEPROT_ONLY);
+ static const sal_Int32 LEN_SPART = strlen(CMDURL_SPART_ONLY);
+ static const sal_Int32 LEN_FPART = strlen(CMDURL_FPART_ONLY);
if (!aStyle.sCommand.startsWith(CMDURL_STYLEPROT_ONLY))
return false;
@@ -205,7 +205,7 @@ void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily)
{
- static OUString PROP_UINAME ("DisplayName");
+ static const char PROP_UINAME[] = "DisplayName";
css::uno::Sequence< OUString > lStyleNames;
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW);
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 1ac54fe04dcc..c2d44516ca7b 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -49,8 +49,8 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-static OUString aVndSunStarUNO( "vnd.sun.star.UNO:" );
-static OUString aVndSunStarScript( "vnd.sun.star.script:" );
+static const char aVndSunStarUNO[] = "vnd.sun.star.UNO:";
+static const char aVndSunStarScript[] = "vnd.sun.star.script:";
_SvxMacroTabPage_Impl::_SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
: pAssignPB(NULL)
@@ -464,13 +464,11 @@ void IconLBoxString::Paint(
OUString aPureMethod;
if( bUNO )
{
- sal_Int32 nBegin = aVndSunStarUNO.getLength();
- aPureMethod = aURL.copy( nBegin );
+ aPureMethod = aURL.copy( strlen(aVndSunStarUNO) );
}
else
{
- sal_Int32 nBegin = aVndSunStarScript.getLength();
- aPureMethod = aURL.copy( nBegin );
+ aPureMethod = aURL.copy( strlen(aVndSunStarScript) );
aPureMethod = aPureMethod.copy( 0, aPureMethod.indexOf( '?' ) );
}
@@ -868,8 +866,7 @@ AssignComponentDialog::AssignComponentDialog( vcl::Window * pParent, const OUStr
OUString aMethodName;
if( maURL.startsWith( aVndSunStarUNO ) )
{
- sal_Int32 nBegin = aVndSunStarUNO.getLength();
- aMethodName = maURL.copy( nBegin );
+ aMethodName = maURL.copy( strlen(aVndSunStarUNO) );
}
mpMethodEdit->SetText( aMethodName, Selection( 0, SELECTION_MAX ) );
}
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 2a90a96a71be..e06c973e3cbf 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -856,7 +856,7 @@ void TPGalleryThemeProperties::FillFilterList()
}
// media filters
- static const OUString aWildcard( "*." );
+ static const char aWildcard[] = "*.";
::avmedia::FilterNameVector aFilters;
::avmedia::MediaWindow::getMediaFilters( aFilters );
diff --git a/cui/source/options/connpoolconfig.cxx b/cui/source/options/connpoolconfig.cxx
index 621f699379a3..b021d6346941 100644
--- a/cui/source/options/connpoolconfig.cxx
+++ b/cui/source/options/connpoolconfig.cxx
@@ -37,45 +37,39 @@ namespace offapp
using namespace ::com::sun::star::uno;
- static const OUString& getConnectionPoolNodeName()
+ static OUString getConnectionPoolNodeName()
{
- static OUString s_sNodeName("org.openoffice.Office.DataAccess/ConnectionPool" );
- return s_sNodeName;
+ return OUString("org.openoffice.Office.DataAccess/ConnectionPool" );
}
- static const OUString& getEnablePoolingNodeName()
+ static OUString getEnablePoolingNodeName()
{
- static OUString s_sNodeName("EnablePooling");
- return s_sNodeName;
+ return OUString("EnablePooling");
}
- static const OUString& getDriverSettingsNodeName()
+ static OUString getDriverSettingsNodeName()
{
- static OUString s_sNodeName("DriverSettings");
- return s_sNodeName;
+ return OUString("DriverSettings");
}
- static const OUString& getDriverNameNodeName()
+ static OUString getDriverNameNodeName()
{
- static OUString s_sNodeName("DriverName");
- return s_sNodeName;
+ return OUString("DriverName");
}
- static const OUString& getEnableNodeName()
+ static OUString getEnableNodeName()
{
- static OUString s_sNodeName("Enable");
- return s_sNodeName;
+ return OUString("Enable");
}
- static const OUString& getTimeoutNodeName()
+ static OUString getTimeoutNodeName()
{
- static OUString s_sNodeName("Timeout");
- return s_sNodeName;
+ return OUString("Timeout");
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5d0a32eef05f..29e1387354c6 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -987,12 +987,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
-static const OUString sAccessSrvc("com.sun.star.configuration.ConfigurationAccess");
-static const OUString sAccessUpdSrvc("com.sun.star.configuration.ConfigurationUpdateAccess");
-static const OUString sInstalledLocalesPath("org.openoffice.Setup/Office/InstalledLocales");
-static OUString sUserLocalePath("org.openoffice.Office.Linguistic/General");
-//static const OUString sUserLocalePath("org.openoffice.Office/Linguistic");
-static const OUString sUserLocaleKey("UILocale");
+static const char sAccessSrvc[] = "com.sun.star.configuration.ConfigurationAccess";
+static const char sAccessUpdSrvc[] = "com.sun.star.configuration.ConfigurationUpdateAccess";
+static const char sInstalledLocalesPath[] = "org.openoffice.Setup/Office/InstalledLocales";
+static const char sUserLocalePath[] = "org.openoffice.Office.Linguistic/General";
+static const char sUserLocaleKey[] = "UILocale";
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
@@ -1059,7 +1058,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
Reference< XNameAccess > theNameAccess;
// find out which locales are currently installed and add them to the listbox
- theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sInstalledLocalesPath)));
+ theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sInstalledLocalesPath))));
theNameAccess = Reference< XNameAccess > (
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW );
seqInstalledLanguages = theNameAccess->getElementNames();
@@ -1078,7 +1077,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(vcl::Window* pParent, const SfxItemSet&
// find out whether the user has a specific locale specified
Sequence< Any > theArgs2(1);
- theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
+ theArgs2[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
theNameAccess = Reference< XNameAccess > (
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW );
if (theNameAccess->hasByName(sUserLocaleKey))
@@ -1236,7 +1235,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
com::sun::star::configuration::theDefaultProvider::get(
comphelper::getProcessComponentContext()));
Sequence< Any > theArgs(1);
- theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(sUserLocalePath)));
+ theArgs[0] = makeAny(NamedValue(OUString("nodepath"), makeAny(OUString(sUserLocalePath))));
Reference< XPropertySet >xProp(
theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
if ( !m_sUserLocaleValue.equals(aLangString))
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index de9d9434db47..9df83208c190 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -157,9 +157,9 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connecti
// set values and column names
OUStringBuffer aValues(" VALUES ( ");
- static OUString aPara("?,");
+ static const char aPara[] = "?,";
OUString aQuote = getIdentifierQuoteString();
- static OUString aComma(",");
+ static const char aComma[] = ",";
sal_Int32 i = 1;
ORowVector< ORowSetValue >::Vector::const_iterator aIter = _rInsertRow->get().begin()+1;
connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end();
@@ -227,8 +227,8 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
OUString aColumnName;
- static OUString aPara("?,");
- static OUString aAnd(" AND ");
+ static const char aPara[] = "?,";
+ static const char aAnd[] = " AND ";
OUString aQuote = getIdentifierQuoteString();
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx
index 122182bdf1d0..3fa7078257e9 100644
--- a/dbaccess/source/core/api/FilteredContainer.cxx
+++ b/dbaccess/source/core/api/FilteredContainer.cxx
@@ -344,7 +344,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, ::std::vecto
}
}
- static const OUString sAll("%");
+ static const char sAll[] = "%";
Reference< XResultSet > xTables = m_xMetaData->getTables( Any(), sAll, sAll, aTableTypeFilter );
Reference< XRow > xCurrentRow( xTables, UNO_QUERY_THROW );
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 28b797671137..9992c15ca227 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -221,7 +221,7 @@ namespace
{
void appendOneKeyColumnClause( const OUString &tblName, const OUString &colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
{
- static const OUString s_sDot(".");
+ static const char s_sDot[] = ".";
OUString fullName;
if (tblName.isEmpty())
fullName = colName;
@@ -255,7 +255,7 @@ OUStringBuffer OKeySet::createKeyFilter()
{
connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aIter = m_aKeyIter->second.first->get().begin();
- static const OUString aAnd(" AND ");
+ static const char aAnd[] = " AND ";
const OUString aQuote = getIdentifierQuoteString();
OUStringBuffer aFilter;
// create the where clause
@@ -471,9 +471,9 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
// list all columns that should be set
const OUString aQuote = getIdentifierQuoteString();
- static OUString aAnd(" AND ");
- static OUString aOr(" OR ");
- static OUString aEqual(" = ?");
+ static const char aAnd[] = " AND ";
+ static const char aOr[] = " OR ";
+ static const char aEqual[] = " = ?";
// use keys for exact positioning
Reference<XNameAccess> xKeyColumns = getKeyColumns();
@@ -486,7 +486,7 @@ Sequence< sal_Int32 > SAL_CALL OKeySet::deleteRows( const Sequence< Any >& rows
{
aCondition.append(::dbtools::quoteName( aQuote,aIter->second.sRealName) + aEqual + aAnd);
}
- aCondition.setLength(aCondition.getLength() - aAnd.getLength());
+ aCondition.setLength(aCondition.getLength() - strlen(aAnd));
// sCon is (parenthesised) the condition to locate ONE row
// e.g. ( colName1 = ? AND colName2 = ? AND colName3 = ? )
const OUString sCon( aCondition.makeStringAndClear() );
@@ -728,9 +728,9 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivi
// set values and column names
OUStringBuffer aValues(" VALUES ( ");
- static OUString aPara("?,");
+ static const char aPara[] = "?,";
OUString aQuote = getIdentifierQuoteString();
- static OUString aComma(",");
+ static const char aComma[] = ",";
SelectColumnsMetaData::const_iterator aIter = m_pColumnNames->begin();
SelectColumnsMetaData::const_iterator aEnd = m_pColumnNames->end();
@@ -967,7 +967,7 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
// list all columns that should be set
OUString aQuote = getIdentifierQuoteString();
- static OUString aAnd(" AND ");
+ static const char aAnd[] = " AND ";
// use keys and indexes for exact positioning
Reference<XNameAccess> xKeyColumns = getKeyColumns();
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 69cfa7d6530f..d3a32358b130 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -179,7 +179,7 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
if ( m_aJoinedKeyColumns.empty() )
throw SQLException();
// list all columns that should be set
- static OUString s_sPara(" = ?");
+ static const char s_sPara[] = " = ?";
OUString aQuote = getIdentifierQuoteString();
::std::map< OUString,bool > aResultSetChanged;
@@ -223,8 +223,8 @@ void SAL_CALL OptimisticSet::updateRow(const ORowSetRow& _rInsertRow ,const ORow
if( aKeyConditions.empty() )
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_CONDITION_FOR_PK ), SQL_GENERAL_ERROR, m_xConnection );
- static const OUString s_sUPDATE("UPDATE ");
- static const OUString s_sSET(" SET ");
+ static const char s_sUPDATE[] = "UPDATE ";
+ static const char s_sSET[] = " SET ";
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
@@ -291,8 +291,8 @@ void SAL_CALL OptimisticSet::insertRow( const ORowSetRow& _rInsertRow,const conn
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_NO_VALUE_CHANGED ), SQL_GENERAL_ERROR, m_xConnection );
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
- static const OUString s_sINSERT("INSERT INTO ");
- static const OUString s_sVALUES(") VALUES ( ");
+ static const char s_sINSERT[] = "INSERT INTO ";
+ static const char s_sVALUES[] = ") VALUES ( ";
TSQLStatements::iterator aSqlIter = aSql.begin();
TSQLStatements::iterator aSqlEnd = aSql.end();
for(;aSqlIter != aSqlEnd ; ++aSqlIter)
diff --git a/dbaccess/source/core/api/View.cxx b/dbaccess/source/core/api/View.cxx
index 2cf497bf8fc8..4ec165dc3482 100644
--- a/dbaccess/source/core/api/View.cxx
+++ b/dbaccess/source/core/api/View.cxx
@@ -64,7 +64,7 @@ namespace dbaccess
try
{
Reference<XMultiServiceFactory> xFac(_rxConnection,UNO_QUERY_THROW);
- static const OUString s_sViewAccess("ViewAccessServiceName");
+ static const char s_sViewAccess[] = "ViewAccessServiceName";
m_xViewAccess.set(xFac->createInstance(lcl_getServiceNameForSetting(_rxConnection,s_sViewAccess)),UNO_QUERY);
}
catch(const Exception& )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index c520f92b60f9..993262befa25 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -367,7 +367,7 @@ namespace
}
}
-static OUString sPictures( "Pictures" );
+static const char sPictures[] = "Pictures";
// base documents seem to have a different behaviour to other documents, the
// root storage contents at least seem to be re-used over different saves, thus if there is a
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 4b7f7026f6e2..7039a1abba43 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -52,22 +52,19 @@ namespace dbaccess
using ::com::sun::star::sdb::DatabaseRegistrationEvent;
using ::com::sun::star::uno::XAggregation;
- static const OUString& getConfigurationRootPath()
+ static OUString getConfigurationRootPath()
{
- static OUString s_sNodeName("org.openoffice.Office.DataAccess/RegisteredNames");
- return s_sNodeName;
+ return OUString("org.openoffice.Office.DataAccess/RegisteredNames");
}
- const OUString& getLocationNodeName()
+ static OUString getLocationNodeName()
{
- static OUString s_sNodeName("Location");
- return s_sNodeName;
+ return OUString("Location");
}
- const OUString& getNameNodeName()
+ static OUString getNameNodeName()
{
- static OUString s_sNodeName("Name");
- return s_sNodeName;
+ return OUString("Name");
}
// DatabaseRegistrations - declaration
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 28c334906215..be531a4f41da 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -218,7 +218,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
bool bNew = sPersistentName.isEmpty();
if ( bNew )
{
- const static OUString sBaseName("Obj");
+ static const char sBaseName[] = "Obj";
sPersistentName = sBaseName;
sPersistentName += OUString::number(rDefinitions.size() + 1);
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 7573bef2f10a..d72667c024f7 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1365,7 +1365,7 @@ bool ODocumentDefinition::saveAs()
try
{
Reference< XStorage> xStorage = getContainerStorage();
- const static OUString sBaseName("Obj");
+ static const char sBaseName[] = "Obj";
OUString sPersistentName = ::dbtools::createUniqueName(xStorage,sBaseName);
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xStorage,sPersistentName);
diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
index 19e800ce1840..d0309308be96 100644
--- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx
+++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx
@@ -293,7 +293,7 @@ uno::Reference< chart2::data::XDataSequence > SAL_CALL DatabaseDataProvider::cre
osl::MutexGuard g(m_aMutex);
uno::Reference< chart2::data::XDataSequence > xData = m_xInternal->createDataSequenceByRangeRepresentation(_sRangeRepresentation);
uno::Reference<beans::XPropertySet> xProp(xData,uno::UNO_QUERY);
- const static OUString s_sNumberFormatKey("NumberFormatKey");
+ static const char s_sNumberFormatKey[] = "NumberFormatKey";
if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(s_sNumberFormatKey) )
{
xProp->setPropertyValue(s_sNumberFormatKey,impl_getNumberFormatKey_nothrow(_sRangeRepresentation));
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 4f7dfaf02c0d..c6b241971c95 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -298,17 +298,17 @@ bool ODsnTypeCollection::isEmbeddedDatabase( const OUString& _sURL ) const
OUString ODsnTypeCollection::getEmbeddedDatabase() const
{
OUString sEmbeddedDatabaseURL;
- static const OUString s_sNodeName("org.openoffice.Office.DataAccess"); ///Installed
+ static const char s_sNodeName[] = "org.openoffice.Office.DataAccess"; ///Installed
const ::utl::OConfigurationTreeRoot aInstalled = ::utl::OConfigurationTreeRoot::createWithComponentContext(m_xContext, s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
if ( aInstalled.isValid() )
{
if ( aInstalled.hasByName("EmbeddedDatabases/DefaultEmbeddedDatabase/Value") )
{
- static const OUString s_sValue("EmbeddedDatabases/DefaultEmbeddedDatabase/Value");
+ static const char s_sValue[] = "EmbeddedDatabases/DefaultEmbeddedDatabase/Value";
aInstalled.getNodeValue(s_sValue) >>= sEmbeddedDatabaseURL;
if ( !sEmbeddedDatabaseURL.isEmpty() )
- aInstalled.getNodeValue(s_sValue + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
+ aInstalled.getNodeValue(OUString(s_sValue) + "/" + sEmbeddedDatabaseURL + "/URL") >>= sEmbeddedDatabaseURL;
}
}
if ( sEmbeddedDatabaseURL.isEmpty() )
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 94cdb4942be4..d19ecac84aaf 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -106,23 +106,9 @@ namespace dbaccess
return true;
}
- static const OUString& lcl_getRecoveryDataSubStorageName()
- {
- static const OUString s_sRecDataStorName( "recovery" );
- return s_sRecDataStorName;
- }
+ static const char sRecoveryDataSubStorageName[] = "recovery";
- static const OUString& lcl_getObjectMapStreamName()
- {
- static const OUString s_sObjectMapStreamName( "storage-component-map.ini" );
- return s_sObjectMapStreamName;
- }
-
- static const OUString& lcl_getMapStreamEncodingName()
- {
- static const OUString s_sMapStreamEncodingName( "UTF-8" );
- return s_sMapStreamEncodingName;
- }
+ static const char sObjectMapStreamName[] = "storage-component-map.ini";
static void lcl_writeObjectMap_throw( const Reference<XComponentContext> & i_rContext, const Reference< XStorage >& i_rStorage,
const MapStringToCompDesc& i_mapStorageToCompDesc )
@@ -131,7 +117,7 @@ namespace dbaccess
// nothing to do
return;
- StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, lcl_getObjectMapStreamName() );
+ StorageTextOutputStream aTextOutput( i_rContext, i_rStorage, sObjectMapStreamName );
aTextOutput.writeLine( "[storages]" );
@@ -171,17 +157,17 @@ namespace dbaccess
MapStringToCompDesc& o_mapStorageToObjectName )
{
ENSURE_OR_THROW( i_rStorage.is(), "invalid storage" );
- if ( !i_rStorage->hasByName( lcl_getObjectMapStreamName() ) )
+ if ( !i_rStorage->hasByName( sObjectMapStreamName ) )
{ // nothing to do, though suspicious
OSL_FAIL( "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
return;
}
Reference< XStream > xIniStream( i_rStorage->openStreamElement(
- lcl_getObjectMapStreamName(), ElementModes::READ ), UNO_SET_THROW );
+ sObjectMapStreamName, ElementModes::READ ), UNO_SET_THROW );
Reference< XTextInputStream2 > xTextInput = TextInputStream::create( i_rxContext );
- xTextInput->setEncoding( lcl_getMapStreamEncodingName() );
+ xTextInput->setEncoding( "UTF-8" );
xTextInput->setInputStream( xIniStream->getInputStream() );
OUString sCurrentSection;
@@ -258,9 +244,9 @@ namespace dbaccess
ENSURE_OR_THROW( i_rTargetStorage.is(), "invalid document storage" );
// create a sub storage for recovery data
- if ( i_rTargetStorage->hasByName( lcl_getRecoveryDataSubStorageName() ) )
- i_rTargetStorage->removeElement( lcl_getRecoveryDataSubStorageName() );
- Reference< XStorage > xRecoveryStorage = i_rTargetStorage->openStorageElement( lcl_getRecoveryDataSubStorageName(), ElementModes::READWRITE );
+ if ( i_rTargetStorage->hasByName( sRecoveryDataSubStorageName ) )
+ i_rTargetStorage->removeElement( sRecoveryDataSubStorageName );
+ Reference< XStorage > xRecoveryStorage = i_rTargetStorage->openStorageElement( sRecoveryDataSubStorageName, ElementModes::READWRITE );
// store recovery data for open sub components of the given controller(s)
if ( !i_rControllers.empty() )
@@ -312,12 +298,12 @@ namespace dbaccess
ENSURE_OR_THROW( i_rDocumentStorage.is(), "illegal document storage" );
Reference< XDatabaseDocumentUI > xDocumentUI( i_rTargetController, UNO_QUERY_THROW );
- if ( !i_rDocumentStorage->hasByName( lcl_getRecoveryDataSubStorageName() ) )
+ if ( !i_rDocumentStorage->hasByName( sRecoveryDataSubStorageName ) )
// that's allowed
return;
// the "recovery" sub storage
- Reference< XStorage > xRecoveryStorage = i_rDocumentStorage->openStorageElement( lcl_getRecoveryDataSubStorageName(), ElementModes::READ );
+ Reference< XStorage > xRecoveryStorage = i_rDocumentStorage->openStorageElement( sRecoveryDataSubStorageName, ElementModes::READ );
// read the map from sub storages to object names
MapCompTypeToCompDescs aMapCompDescs;
@@ -385,7 +371,7 @@ namespace dbaccess
// now that we successfully recovered, removed the "recovery" sub storage
try
{
- i_rDocumentStorage->removeElement( lcl_getRecoveryDataSubStorageName() );
+ i_rDocumentStorage->removeElement( sRecoveryDataSubStorageName );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/core/recovery/storagetextstream.cxx b/dbaccess/source/core/recovery/storagetextstream.cxx
index 05822b651eee..6d5739837d50 100644
--- a/dbaccess/source/core/recovery/storagetextstream.cxx
+++ b/dbaccess/source/core/recovery/storagetextstream.cxx
@@ -49,21 +49,7 @@ namespace dbaccess
Reference< XTextOutputStream2 > xTextOutput;
};
- // helper
- namespace
- {
- static const OUString& lcl_getTextStreamEncodingName()
- {
- static const OUString s_sMapStreamEncodingName( "UTF-8" );
- return s_sMapStreamEncodingName;
- }
-
- static const OUString& lcl_getLineFeed()
- {
- static const OUString s_sLineFeed( '\n' );
- return s_sLineFeed;
- }
- }
+ static const char sLineFeed[] = "\n";
// StorageTextOutputStream
StorageTextOutputStream::StorageTextOutputStream( const Reference<XComponentContext>& i_rContext,
@@ -74,7 +60,7 @@ namespace dbaccess
,m_pData( new StorageTextOutputStream_Data )
{
m_pData->xTextOutput = TextOutputStream::create( i_rContext );
- m_pData->xTextOutput->setEncoding( lcl_getTextStreamEncodingName() );
+ m_pData->xTextOutput->setEncoding( "UTF-8" );
m_pData->xTextOutput->setOutputStream( getOutputStream() );
}
@@ -85,12 +71,12 @@ namespace dbaccess
void StorageTextOutputStream::writeLine( const OUString& i_rLine )
{
m_pData->xTextOutput->writeString( i_rLine );
- m_pData->xTextOutput->writeString( lcl_getLineFeed() );
+ m_pData->xTextOutput->writeString( sLineFeed );
}
void StorageTextOutputStream::writeLine()
{
- m_pData->xTextOutput->writeString( lcl_getLineFeed() );
+ m_pData->xTextOutput->writeString( sLineFeed );
}
} // namespace dbaccess
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index f50d1754b7a0..7ebb09ab5c4b 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -81,30 +81,24 @@ namespace dbaccess
// helper
namespace
{
- static const OUString& lcl_getComponentStorageBaseName( const SubComponentType i_eType )
+ static OUString lcl_getComponentStorageBaseName( const SubComponentType i_eType )
{
- static const OUString s_sFormBaseName( "form" );
- static const OUString s_sReportBaseName( "report" );
- static const OUString s_sTableBaseName( "table" );
- static const OUString s_sQueryBaseName( "query" );
-
switch ( i_eType )
{
case FORM:
- return s_sFormBaseName;
+ return OUString("form");
case REPORT:
- return s_sReportBaseName;
+ return OUString("report");
case TABLE:
- return s_sTableBaseName;
+ return OUString("table");
case QUERY:
- return s_sQueryBaseName;
+ return OUString("query");
default:
break;
}
OSL_FAIL( "lcl_getComponentStorageBaseName: unimplemented case!" );
- static const OUString s_sFallback;
- return s_sFallback;
+ return OUString();
}
static SubComponentType lcl_databaseObjectToSubComponentType( const sal_Int32 i_nObjectType )
@@ -166,17 +160,8 @@ namespace dbaccess
return xCommandProcessor;
}
- static const OUString& lcl_getSettingsStreamName()
- {
- static const OUString s_sStatementStreamName( "settings.xml" );
- return s_sStatementStreamName;
- }
-
- static const OUString& lcl_getCurrentQueryDesignName()
- {
- static const OUString s_sQuerySettingsName( "ooo:current-query-design" );
- return s_sQuerySettingsName;
- }
+ static const char sSettingsStreamName[] = "settings.xml";
+ static const char sCurrentQueryDesignName[] = "ooo:current-query-design";
}
// SettingsExportContext
@@ -362,31 +347,24 @@ namespace dbaccess
// SubComponentRecovery
const OUString SubComponentRecovery::getComponentsStorageName( const SubComponentType i_eType )
{
- static const OUString s_sFormsStorageName( "forms" );
- static const OUString s_sReportsStorageName( "reports" );
- static const OUString s_sTablesStorageName( "tables" );
- static const OUString s_sQueriesStorageName( "queries" );
- static const OUString s_sRelationsStorageName( "relations" );
-
switch ( i_eType )
{
case FORM:
- return s_sFormsStorageName;
+ return OUString("forms");
case REPORT:
- return s_sReportsStorageName;
+ return OUString("reports");
case TABLE:
- return s_sTablesStorageName;
+ return OUString("tables");
case QUERY:
- return s_sQueriesStorageName;
+ return OUString("queries");
case RELATION_DESIGN:
- return s_sRelationsStorageName;
+ return OUString("relations");
default:
break;
}
OSL_FAIL( "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
- static const OUString s_sFallback;
- return s_sFallback;
+ return OUString();
}
void SubComponentRecovery::saveToRecoveryStorage( const Reference< XStorage >& i_rRecoveryStorage,
@@ -498,7 +476,7 @@ namespace dbaccess
OSL_VERIFY( xDesignerProps->getPropertyValue( "CurrentQueryDesign" ) >>= aCurrentQueryDesign );
// write the query design
- StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, lcl_getSettingsStreamName() );
+ StorageXMLOutputStream aDesignOutput( m_rContext, i_rObjectStorage, sSettingsStreamName );
SettingsExportContext aSettingsExportContext( m_rContext, aDesignOutput );
const OUString sWhitespace( " " );
@@ -507,7 +485,7 @@ namespace dbaccess
aDesignOutput.ignorableWhitespace( sWhitespace );
XMLSettingsExportHelper aSettingsExporter( aSettingsExportContext );
- aSettingsExporter.exportAllSettings( aCurrentQueryDesign, lcl_getCurrentQueryDesignName() );
+ aSettingsExporter.exportAllSettings( aCurrentQueryDesign, sCurrentQueryDesignName );
aDesignOutput.ignorableWhitespace( sWhitespace );
aDesignOutput.endElement();
@@ -579,13 +557,13 @@ namespace dbaccess
Reference< XComponent > xSubComponent;
// first read the settings query design settings from the storage
- StorageXMLInputStream aDesignInput( m_rContext, i_rRecoveryStorage, lcl_getSettingsStreamName() );
+ StorageXMLInputStream aDesignInput( m_rContext, i_rRecoveryStorage, sSettingsStreamName );
::rtl::Reference< SettingsDocumentHandler > pDocHandler( new SettingsDocumentHandler );
aDesignInput.import( pDocHandler.get() );
const ::comphelper::NamedValueCollection& rSettings( pDocHandler->getSettings() );
- const Any aCurrentQueryDesign = rSettings.get( lcl_getCurrentQueryDesignName() );
+ const Any aCurrentQueryDesign = rSettings.get( sCurrentQueryDesignName );
#if OSL_DEBUG_LEVEL > 0
Sequence< PropertyValue > aQueryDesignLayout;
OSL_VERIFY( aCurrentQueryDesign >>= aQueryDesignLayout );
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index 5dea02bb9f7b..91d17b2adfd4 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -168,32 +168,22 @@ namespace dbmm
namespace
{
- static const OUString& lcl_getScriptsStorageName()
- {
- static const OUString s_sScriptsStorageName( "Scripts" );
- return s_sScriptsStorageName;
- }
+ static const char sScriptsStorageName[] = "Scripts";
- static const OUString& lcl_getScriptsSubStorageName( const ScriptType _eType )
+ static OUString lcl_getScriptsSubStorageName( const ScriptType _eType )
{
- static const OUString s_sBeanShell ( "beanshell" );
- static const OUString s_sJavaScript( "javascript" );
- static const OUString s_sPython ( "python" ); // TODO: is this correct?
- static const OUString s_sJava ( "java" );
-
switch ( _eType )
{
- case eBeanShell: return s_sBeanShell;
- case eJavaScript: return s_sJavaScript;
- case ePython: return s_sPython;
- case eJava: return s_sJava;
+ case eBeanShell: return OUString("beanshell");
+ case eJavaScript: return OUString("javascript");
+ case ePython: return OUString("python"); // TODO: is this correct?
+ case eJava: return OUString("java");
default:
break;
}
OSL_FAIL( "lcl_getScriptsSubStorageName: illegal type!" );
- static OUString s_sEmpty;
- return s_sEmpty;
+ return OUString();
}
static bool lcl_getScriptTypeFromLanguage( const OUString& _rLanguage, ScriptType& _out_rScriptType )
@@ -650,15 +640,15 @@ namespace dbmm
// the "Scripts" storage exist, or if it does not (yet) exist and we are in write mode
// => open the storage
- if ( ( xDocStorage->hasByName( lcl_getScriptsStorageName() )
- && xDocStorage->isStorageElement( lcl_getScriptsStorageName() )
+ if ( ( xDocStorage->hasByName( sScriptsStorageName )
+ && xDocStorage->isStorageElement( sScriptsStorageName )
)
- || !xDocStorage->hasByName( lcl_getScriptsStorageName() )
+ || !xDocStorage->hasByName( sScriptsStorageName )
)
{
m_xScriptsStorage.set(
xDocStorage->openStorageElement(
- lcl_getScriptsStorageName(), ElementModes::READWRITE
+ sScriptsStorageName, ElementModes::READWRITE
),
UNO_QUERY_THROW
);
@@ -725,7 +715,7 @@ namespace dbmm
{
Reference< XStorageBasedDocument > xStorageDoc( _rxDocument, UNO_QUERY_THROW );
Reference< XStorage > xDocStorage( xStorageDoc->getDocumentStorage(), UNO_QUERY_THROW );
- xDocStorage->removeElement( lcl_getScriptsStorageName() );
+ xDocStorage->removeElement( sScriptsStorageName );
}
catch( const Exception& )
{
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index da522f6b1d6f..c6bc6e947c81 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -138,35 +138,29 @@ namespace dbaxml
{
// possible types we can write (either because we recognize them directly or because we convert _rValue
// into one of these types)
- static const OUString s_sTypeBoolean ("boolean");
- static const OUString s_sTypeShort ("short");
- static const OUString s_sTypeInteger ("int");
- static const OUString s_sTypeLong ("long");
- static const OUString s_sTypeDouble ("double");
- static const OUString s_sTypeString ("string");
// handle the type description
switch (_rType.getTypeClass())
{
case TypeClass_STRING:
- return s_sTypeString;
+ return OUString("string");
case TypeClass_DOUBLE:
- return s_sTypeDouble;
+ return OUString("double");
case TypeClass_BOOLEAN:
- return s_sTypeBoolean;
+ return OUString("boolean");
case TypeClass_BYTE:
case TypeClass_SHORT:
- return s_sTypeShort;
+ return OUString("short");
case TypeClass_LONG:
- return s_sTypeInteger;
+ return OUString("int");
case TypeClass_HYPER:
- return s_sTypeLong;
+ return OUString("long");
case TypeClass_ENUM:
- return s_sTypeInteger;
+ return OUString("int");
default:
OSL_FAIL( "lcl_implGetPropertyXMLType: unsupported value type!" );
- return s_sTypeDouble;
+ return OUString("double");
}
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 538ee5757436..90d29b51778c 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -725,7 +725,7 @@ FeatureState OApplicationController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = xEnumAccess.is();
if ( aReturn.bEnabled )
{
- static OUString s_sReportDesign("org.libreoffice.report.pentaho.SOReportJobFactory");
+ static const char s_sReportDesign[] = "org.libreoffice.report.pentaho.SOReportJobFactory";
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(s_sReportDesign);
aReturn.bEnabled = xEnumDrivers.is() && xEnumDrivers->hasMoreElements();
}
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 06f060ee0d5c..45185eda5691 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -662,7 +662,7 @@ void OApplicationController::onLoadedMenu(const Reference< ::com::sun::star::fra
if ( _xLayoutManager.is() )
{
- static OUString s_sStatusbar("private:resource/statusbar/statusbar");
+ static const char s_sStatusbar[] = "private:resource/statusbar/statusbar";
_xLayoutManager->createElement( s_sStatusbar );
_xLayoutManager->requestElement( s_sStatusbar );
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 9d67df969ea1..1788fc78e683 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2031,7 +2031,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
if ( xCols.is() && xCols->hasByName(sName) )
{
Reference<XPropertySet> xProp(xCols->getByName(sName),UNO_QUERY);
- static OUString sAgg("AggregateFunction");
+ static const char sAgg[] = "AggregateFunction";
if ( xProp->getPropertySetInfo()->hasPropertyByName(sAgg) )
xProp->getPropertyValue(sAgg) >>= bHaving;
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index afbdc240b37a..bc68c796c872 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -82,12 +82,6 @@ using namespace ::comphelper;
typedef ::boost::unordered_map< sal_Int16, sal_Int16 > CommandHashMap;
typedef ::std::list< DispatchInformation > DispatchInfoList;
-const OUString& getConfirmDeletionURL()
-{
- static const OUString sConfirmDeletionURL( ".uno:FormSlots/ConfirmDeletion" );
- return sConfirmDeletionURL;
-}
-
namespace dbaui
{
@@ -659,7 +653,7 @@ Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, co
fillSupportedFeatures();
// URL's we can handle ourself?
- if ( aURL.Complete.equals( getConfirmDeletionURL() )
+ if ( aURL.Complete == ".uno:FormSlots/ConfirmDeletion"
|| ( ( m_aSupportedFeatures.find( aURL.Complete ) != m_aSupportedFeatures.end() )
&& !isUserDefinedFeature( aURL.Complete )
)
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 351a070ddbf2..ab59911c4038 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1183,7 +1183,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
ActivateAggregate( tpScale );
pScale->SetMax(::std::max<sal_Int32>(pFieldType->nMaximumScale,pFieldDescr->GetScale()));
pScale->SetMin(pFieldType->nMinimumScale);
- static const OUString s_sPRECISION("PRECISION");
+ static const char s_sPRECISION[] = "PRECISION";
pScale->SetSpecialReadOnly(pFieldType->aCreateParams.isEmpty() || pFieldType->aCreateParams == s_sPRECISION);
}
else
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx b/dbaccess/source/ui/dlg/CollectionView.cxx
index 0a54a5a92a13..f437d31d9f58 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -267,14 +267,14 @@ void OCollectionView::initCurrentPath()
if ( m_xContent.is() )
{
const OUString sCID = m_xContent->getIdentifier()->getContentIdentifier();
- const static OUString s_sFormsCID("private:forms");
- const static OUString s_sReportsCID("private:reports");
- m_bCreateForm = s_sFormsCID == sCID ;
+ static const char s_sFormsCID[] = "private:forms";
+ static const char s_sReportsCID[] = "private:reports";
+ m_bCreateForm = s_sFormsCID == sCID;
OUString sPath("/");
- if ( m_bCreateForm && sCID.getLength() != s_sFormsCID.getLength())
- sPath = sCID.copy(s_sFormsCID.getLength());
- else if ( !m_bCreateForm && sCID.getLength() != s_sReportsCID.getLength() )
- sPath = sCID.copy(s_sReportsCID.getLength() - 2);
+ if ( m_bCreateForm && sCID.getLength() != (sal_Int32)strlen(s_sFormsCID))
+ sPath = sCID.copy(strlen(s_sFormsCID));
+ else if ( !m_bCreateForm && sCID.getLength() != (sal_Int32)strlen(s_sReportsCID) )
+ sPath = sCID.copy(strlen(s_sReportsCID) - 2);
m_pFTCurrentPath->SetText(sPath);
Reference<XChild> xChild(m_xContent,UNO_QUERY);
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index c686ae53f19b..f8ad536b0f3c 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -318,10 +318,10 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co
}
}
xColumn->getPropertyValue(PROPERTY_REALNAME) >>= _rFilter.Name;
- static OUString sAgg("AggregateFunction");
+ static const char sAgg[] = "AggregateFunction";
if ( xInfo->hasPropertyByName(sAgg) )
xColumn->getPropertyValue(sAgg) >>= bHaving;
- static OUString sFunction("Function");
+ static const char sFunction[] = "Function";
if ( xInfo->hasPropertyByName(sFunction) )
xColumn->getPropertyValue(sFunction) >>= bFunction;
}
@@ -331,7 +331,7 @@ bool DlgFilterCrit::getCondition(const ListBox& _rField,const ListBox& _rComp,co
_rFilter.Name = ::dbtools::quoteName(aQuote,_rFilter.Name);
if ( !sTableName.isEmpty() )
{
- static OUString sSep(".");
+ static const char sSep[] = ".";
sTableName += sSep;
sTableName += _rFilter.Name;
_rFilter.Name = sTableName;
diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx
index 69f5fe4ae4e3..f58d3ad7f0c5 100644
--- a/dbaccess/source/ui/dlg/queryorder.cxx
+++ b/dbaccess/source/ui/dlg/queryorder.cxx
@@ -205,8 +205,8 @@ OUString DlgOrderCrit::GetOrderList( ) const
{
Reference<XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
OUString sQuote = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : OUString();
- static const OUString sDESC(" DESC ");
- static const OUString sASC(" ASC ");
+ static const char sDESC[] = " DESC ";
+ static const char sASC[] = " ASC ";
Reference< XNameAccess> xColumns = Reference< XColumnsSupplier >(m_xQueryComposer,UNO_QUERY)->getColumns();
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 35e1ee977db2..9b8104c505ce 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -442,8 +442,8 @@ namespace dbaui
Sequence< OUString > OTableSubscriptionPage::collectDetailedSelection() const
{
Sequence< OUString > aTableFilter;
- static const OUString sDot(".");
- static const OUString sWildcard("%");
+ static const char sDot[] = ".";
+ static const char sWildcard[] = "%";
OUString sComposedName;
const SvTreeListEntry* pAllObjectsEntry = m_pTablesList->getAllObjectsEntry();
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 392dd7a6b4f4..c192947b4880 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -437,8 +437,8 @@ void fillTypeInfo( const Reference< ::com::sun::star::sdbc::XConnection>& _rxCo
// Information for a single SQL type
if(xRs.is())
{
- static const OUString aB1(" [ ");
- static const OUString aB2(" ]");
+ static const char aB1[] = " [ ";
+ static const char aB2[] = " ]";
Reference<XResultSetMetaData> xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(xRs,UNO_QUERY)->getMetaData();
::connectivity::ORowSetValue aValue;
::std::vector<sal_Int32> aTypes;
diff --git a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
index 02d1759dceda..335ff098515c 100644
--- a/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
+++ b/dbaccess/source/ui/querydesign/ConnectionLineAccess.cxx
@@ -97,8 +97,7 @@ namespace dbaui
}
OUString SAL_CALL OConnectionLineAccess::getAccessibleDescription( ) throw (RuntimeException, std::exception)
{
- static OUString sDescription("Relation");
- return sDescription;
+ return OUString("Relation");
}
Reference< XAccessibleRelationSet > SAL_CALL OConnectionLineAccess::getAccessibleRelationSet( ) throw (RuntimeException, std::exception)
{
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 4914156429f6..5bb7a8d7c443 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -71,8 +71,8 @@ using namespace ::com::sun::star::container;
// please look at the book LargeScale C++ to know why
namespace
{
- static const OUString C_AND(" AND ");
- static const OUString C_OR(" OR ");
+ static const char C_AND[] = " AND ";
+ static const char C_OR[] = " OR ";
// forward declarations
bool InsertJoin( const OQueryDesignView* _pView,
@@ -108,8 +108,7 @@ namespace
if ( _bQuote && !_sAliasName.isEmpty() )
{
sRet = ::dbtools::quoteName(_sQuote,_sAliasName);
- const static OUString sTableSeparater('.');
- sRet += sTableSeparater;
+ sRet += ".";
}
return sRet;
}
@@ -639,8 +638,8 @@ namespace
OJoinTableView::OTableWindowMap& rTabList = _pView->getTableView()->GetTabWinMap();
- const static OUString sFieldSeparator(", ");
- const static OUString s_sAs(" AS ");
+ static const char sFieldSeparator[] = ", ";
+ static const char s_sAs[] = " AS ";
aIter = _rFieldList.begin();
for(;aIter != aEnd;++aIter)
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 1149d5fe6768..3d78dee5f153 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -259,8 +259,8 @@ namespace
if ( xLayoutManager.is() )
{
xLayoutManager->lock();
- static OUString s_sDesignToolbar("private:resource/toolbar/designobjectbar");
- static OUString s_sSqlToolbar("private:resource/toolbar/sqlobjectbar");
+ static const char s_sDesignToolbar[] = "private:resource/toolbar/designobjectbar";
+ static const char s_sSqlToolbar[] = "private:resource/toolbar/sqlobjectbar";
if ( _bDesign )
{
xLayoutManager->destroyElement( s_sSqlToolbar );
@@ -283,7 +283,7 @@ namespace
*/
void grabFocusFromLimitBox( OQueryController& _rController )
{
- static const OUString sResourceURL( "private:resource/toolbar/designobjectbar" );
+ static const char sResourceURL[] = "private:resource/toolbar/designobjectbar";
Reference< XLayoutManager > xLayoutManager = _rController.getLayoutManager( _rController.getFrame() );
Reference< XUIElement > xUIElement = xLayoutManager->getElement(sResourceURL);
if (xUIElement.is())
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index b13727111d78..1158142a4f52 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1075,9 +1075,9 @@ void impl_checkRecoveryState(bool& bCrashed ,
bool impl_callRecoveryUI(bool bEmergencySave ,
bool bExistsRecoveryData)
{
- static OUString SERVICENAME_RECOVERYUI("com.sun.star.comp.svx.RecoveryUI");
- static OUString COMMAND_EMERGENCYSAVE("vnd.sun.star.autorecovery:/doEmergencySave");
- static OUString COMMAND_RECOVERY("vnd.sun.star.autorecovery:/doAutoRecovery");
+ static const char SERVICENAME_RECOVERYUI[] = "com.sun.star.comp.svx.RecoveryUI";
+ static const char COMMAND_EMERGENCYSAVE[] = "vnd.sun.star.autorecovery:/doEmergencySave";
+ static const char COMMAND_RECOVERY[] = "vnd.sun.star.autorecovery:/doAutoRecovery";
css::uno::Reference< css::uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 22085edab261..3ace9469bc50 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -49,10 +49,10 @@ using namespace ::com::sun::star::uno;
namespace migration
{
-static OUString sExtensionSubDir( "/user/uno_packages/" );
-static OUString sSubDirName( "cache" );
-static OUString sDescriptionXmlFile( "/description.xml" );
-static OUString sExtensionRootSubDirName( "/uno_packages" );
+static const char sExtensionSubDir[] = "/user/uno_packages/";
+static const char sSubDirName[] = "cache";
+static const char sDescriptionXmlFile[] = "/description.xml";
+static const char sExtensionRootSubDirName[] = "/uno_packages";
// component operations
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 92b7aa9b2b46..6870450fc559 100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -33,8 +33,8 @@ namespace migration
- static OUString sSourceSubDir( "/user/wordbook" );
- static OUString sTargetSubDir( "/user/wordbook" );
+ static const char sSourceSubDir[] = "/user/wordbook";
+ static const char sTargetSubDir[] = "/user/wordbook";
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 03c12fd60948..4ce1d7b71b83 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -81,10 +81,9 @@ namespace drawinglayer
{
uno::Sequence< OUString > XPrimitive2DRenderer_getSupportedServiceNames()
{
- static OUString aServiceName("com.sun.star.graphic.Primitive2DTools" );
- static uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
-
- return( aServiceNames );
+ OUString aServiceName("com.sun.star.graphic.Primitive2DTools" );
+ uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
+ return aServiceNames;
}
OUString XPrimitive2DRenderer_getImplementationName()
diff --git a/drawinglayer/source/geometry/viewinformation2d.cxx b/drawinglayer/source/geometry/viewinformation2d.cxx
index 6e24fe975f05..8af6781f1e5d 100644
--- a/drawinglayer/source/geometry/viewinformation2d.cxx
+++ b/drawinglayer/source/geometry/viewinformation2d.cxx
@@ -79,40 +79,34 @@ namespace drawinglayer
uno::Sequence< beans::PropertyValue > mxExtendedInformation;
// the local UNO API strings
- const OUString& getNamePropertyObjectTransformation()
+ static OUString getNamePropertyObjectTransformation()
{
- static OUString s_sNameProperty("ObjectTransformation");
- return s_sNameProperty;
+ return OUString("ObjectTransformation");
}
- const OUString& getNamePropertyViewTransformation()
+ static OUString getNamePropertyViewTransformation()
{
- static OUString s_sNameProperty("ViewTransformation");
- return s_sNameProperty;
+ return OUString("ViewTransformation");
}
- const OUString& getNamePropertyViewport()
+ static OUString getNamePropertyViewport()
{
- static OUString s_sNameProperty("Viewport");
- return s_sNameProperty;
+ return OUString("Viewport");
}
- const OUString& getNamePropertyTime()
+ static OUString getNamePropertyTime()
{
- static OUString s_sNameProperty("Time");
- return s_sNameProperty;
+ return OUString("Time");
}
- const OUString& getNamePropertyVisualizedPage()
+ static OUString getNamePropertyVisualizedPage()
{
- static OUString s_sNameProperty("VisualizedPage");
- return s_sNameProperty;
+ return OUString("VisualizedPage");
}
- const OUString& getNamePropertyReducedDisplayQuality()
+ static OUString getNamePropertyReducedDisplayQuality()
{
- static OUString s_sNameProperty("ReducedDisplayQuality");
- return s_sNameProperty;
+ return OUString("ReducedDisplayQuality");
}
void impInterpretPropertyValues(const uno::Sequence< beans::PropertyValue >& rViewParameters)
diff --git a/drawinglayer/source/geometry/viewinformation3d.cxx b/drawinglayer/source/geometry/viewinformation3d.cxx
index 9fe0b010ca78..78e5017d788d 100644
--- a/drawinglayer/source/geometry/viewinformation3d.cxx
+++ b/drawinglayer/source/geometry/viewinformation3d.cxx
@@ -77,58 +77,49 @@ namespace drawinglayer
uno::Sequence< beans::PropertyValue > mxExtendedInformation;
// the local UNO API strings
- const OUString& getNamePropertyObjectTransformation()
+ static OUString getNamePropertyObjectTransformation()
{
- static OUString s_sNameProperty("ObjectTransformation");
- return s_sNameProperty;
+ return OUString("ObjectTransformation");
}
- const OUString& getNamePropertyOrientation()
+ static OUString getNamePropertyOrientation()
{
- static OUString s_sNameProperty("Orientation");
- return s_sNameProperty;
+ return OUString("Orientation");
}
- const OUString& getNamePropertyProjection()
+ static OUString getNamePropertyProjection()
{
- static OUString s_sNameProperty("Projection");
- return s_sNameProperty;
+ return OUString("Projection");
}
- const OUString& getNamePropertyProjection_30()
+ static OUString getNamePropertyProjection_30()
{
- static OUString s_sNameProperty("Projection30");
- return s_sNameProperty;
+ return OUString("Projection30");
}
- const OUString& getNamePropertyProjection_31()
+ static OUString getNamePropertyProjection_31()
{
- static OUString s_sNameProperty("Projection31");
- return s_sNameProperty;
+ return OUString("Projection31");
}
- const OUString& getNamePropertyProjection_32()
+ static OUString getNamePropertyProjection_32()
{
- static OUString s_sNameProperty("Projection32");
- return s_sNameProperty;
+ return OUString("Projection32");
}
- const OUString& getNamePropertyProjection_33()
+ static OUString getNamePropertyProjection_33()
{
- static OUString s_sNameProperty("Projection33");
- return s_sNameProperty;
+ return OUString("Projection33");
}
- const OUString& getNamePropertyDeviceToView()
+ static OUString getNamePropertyDeviceToView()
{
- static OUString s_sNameProperty("DeviceToView");
- return s_sNameProperty;
+ return OUString("DeviceToView");
}
- const OUString& getNamePropertyTime()
+ static OUString getNamePropertyTime()
{
- static OUString s_sNamePropertyTime("Time");
- return s_sNamePropertyTime;
+ return OUString("Time");
}
// a central PropertyValue parsing method to allow transportatin of
diff --git a/extensions/source/abpilot/fieldmappingimpl.cxx b/extensions/source/abpilot/fieldmappingimpl.cxx
index 99c93ef2c58e..7103319d8b6d 100644
--- a/extensions/source/abpilot/fieldmappingimpl.cxx
+++ b/extensions/source/abpilot/fieldmappingimpl.cxx
@@ -50,18 +50,8 @@ namespace abp
using namespace ::com::sun::star::ui::dialogs;
- static const OUString& lcl_getDriverSettingsNodeName()
- {
- static const OUString s_sDriverSettingsNodeName( "/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver" );
- return s_sDriverSettingsNodeName;
- }
-
-
- static const OUString& lcl_getAddressBookNodeName()
- {
- static const OUString s_sAddressBookNodeName( "/org.openoffice.Office.DataAccess/AddressBook" );
- return s_sAddressBookNodeName;
- }
+ static const char sDriverSettingsNodeName[] = "/org.openoffice.Office.DataAccess/DriverSettings/com.sun.star.comp.sdbc.MozabDriver";
+ static const char sAddressBookNodeName[] = "/org.openoffice.Office.DataAccess/AddressBook";
namespace fieldmapping
@@ -169,7 +159,7 @@ namespace abp
// access the configuration information which the driver uses for determining it's column names
- OUString sDriverAliasesNodeName = lcl_getDriverSettingsNodeName();
+ OUString sDriverAliasesNodeName = sDriverSettingsNodeName;
sDriverAliasesNodeName += OUString( "/ColumnAliases" );
// create a config node for this
@@ -224,7 +214,6 @@ namespace abp
MapString2String aFieldAssignment( _rFieldAssignment );
// access the configuration information which the driver uses for determining it's column names
- const OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
@@ -301,7 +290,6 @@ namespace abp
const OUString& _rDataSourceName, const OUString& _rTableName )
{
// access the configuration information which the driver uses for determining it's column names
- const OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
@@ -319,7 +307,6 @@ namespace abp
void markPilotSuccess( const Reference< XComponentContext >& _rxContext )
{
// access the configuration information which the driver uses for determining it's column names
- const OUString& sAddressBookNodeName = lcl_getAddressBookNodeName();
// create a config node for this
OConfigurationTreeRoot aAddressBookSettings = OConfigurationTreeRoot::createWithComponentContext(
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index c67fc94bfbf2..7b3a2dc1f5e6 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -571,7 +571,7 @@ namespace dbp
if (xColumns.is())
{
m_aContext.aFieldNames = xColumns->getElementNames();
- static const OUString s_sFieldTypeProperty("Type");
+ static const char s_sFieldTypeProperty[] = "Type";
const OUString* pBegin = m_aContext.aFieldNames.getConstArray();
const OUString* pEnd = pBegin + m_aContext.aFieldNames.getLength();
for(;pBegin != pEnd;++pBegin)
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 003bd2d029ed..0c68df814ee3 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -103,11 +103,11 @@ namespace dbp
if (!xColumnFactory.is() || !xColumnContainer.is())
return;
- static const OUString s_sDataFieldProperty ("DataField");
- static const OUString s_sLabelProperty ("Label");
- static const OUString s_sWidthProperty ("Width");
- static const OUString s_sMouseWheelBehavior ("MouseWheelBehavior");
- static const OUString s_sEmptyString;
+ static const char s_sDataFieldProperty [] = "DataField";
+ static const char s_sLabelProperty [] = "Label";
+ static const char s_sWidthProperty [] = "Width";
+ static const char s_sMouseWheelBehavior[] = "MouseWheelBehavior";
+ static const char s_sEmptyString[] = "";
// collect "descriptors" for the to-be-created (grid)columns
std::vector< OUString > aColumnServiceNames; // service names to be used with the XGridColumnFactory
diff --git a/extensions/source/dbpilots/optiongrouplayouter.cxx b/extensions/source/dbpilots/optiongrouplayouter.cxx
index aad8888f7e71..c34613fc8fc9 100644
--- a/extensions/source/dbpilots/optiongrouplayouter.cxx
+++ b/extensions/source/dbpilots/optiongrouplayouter.cxx
@@ -188,7 +188,7 @@ namespace dbp
void OOptionGroupLayouter::implAnchorShape(const Reference< XPropertySet >& _rxShapeProps)
{
- static const OUString s_sAnchorPropertyName("AnchorType");
+ static const char s_sAnchorPropertyName[] = "AnchorType";
Reference< XPropertySetInfo > xPropertyInfo;
if (_rxShapeProps.is())
xPropertyInfo = _rxShapeProps->getPropertySetInfo();
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index cebf4294fd09..4495b842e97a 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -219,7 +219,7 @@ namespace pcr
if ( (eType == TypeClass_STRING || eType == TypeClass_SEQUENCE) &&
lcl_isLanguageDependentProperty( _rPropertyName ) )
{
- static const OUString s_sResourceResolverPropName("ResourceResolver");
+ static const char s_sResourceResolverPropName[] = "ResourceResolver";
Reference< resource::XStringResourceResolver > xStringResourceResolver;
try
@@ -372,8 +372,8 @@ namespace pcr
// StringItemList?
else if( eType == TypeClass_SEQUENCE )
{
- static OUString aDot(".");
- static OUString aEsc("&");
+ static const char aDot[] = ".";
+ static const char aEsc[] = "&";
// Put strings into resource using new ids
Sequence< OUString > aNewStrings;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index bfad5c53d524..23fcc48aa218 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -847,13 +847,13 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & rXPropSet,
ESCHER_LineEnd& reLineEnd, sal_Int32& rnArrowLength, sal_Int32& rnArrowWidth )
{
- static OUString sLineStart ( "LineStart" );
- static OUString sLineStartName( "LineStartName" );
- static OUString sLineEnd ( "LineEnd" );
- static OUString sLineEndName ( "LineEndName" );
+ static const char sLineStart [] = "LineStart";
+ static const char sLineStartName[] = "LineStartName";
+ static const char sLineEnd [] = "LineEnd";
+ static const char sLineEndName [] = "LineEndName";
- const OUString sLine ( bLineStart ? sLineStart : sLineEnd );
- const OUString sLineName ( bLineStart ? sLineStartName : sLineEndName );
+ const OUString sLine ( bLineStart ? OUString(sLineStart) : OUString(sLineEnd) );
+ const OUString sLineName ( bLineStart ? OUString(sLineStartName) : OUString(sLineEndName) );
bool bIsArrow = false;
@@ -2015,8 +2015,8 @@ bool EscherPropertyContainer::CreatePolygonProperties(
::com::sun::star::awt::Rectangle& rGeoRect,
Polygon* pPolygon )
{
- static OUString sPolyPolygonBezier ( "PolyPolygonBezier" );
- static OUString sPolyPolygon ( "PolyPolygon" );
+ static const char sPolyPolygonBezier [] = "PolyPolygonBezier";
+ static const char sPolyPolygon [] = "PolyPolygon";
bool bRetValue = true;
bool bLine = ( nFlags & ESCHER_CREATEPOLYGON_LINE ) != 0;
@@ -2029,7 +2029,7 @@ bool EscherPropertyContainer::CreatePolygonProperties(
{
::com::sun::star::uno::Any aAny;
bRetValue = EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet,
- ( bBezier ) ? sPolyPolygonBezier : sPolyPolygon, true );
+ ( bBezier ) ? OUString(sPolyPolygonBezier) : OUString(sPolyPolygon), true );
if ( bRetValue )
{
aPolyPolygon = GetPolyPolygon( aAny );
@@ -2311,12 +2311,12 @@ bool EscherPropertyContainer::CreateConnectorProperties(
EscherSolverContainer& rSolverContainer, ::com::sun::star::awt::Rectangle& rGeoRect,
sal_uInt16& rShapeType, sal_uInt16& rShapeFlags )
{
- static OUString sEdgeKind ( "EdgeKind" );
- static OUString sEdgeStartPoint ( "EdgeStartPoint" );
- static OUString sEdgeEndPoint ( "EdgeEndPoint" );
- static OUString sEdgeStartConnection ( "EdgeStartConnection" );
- static OUString sEdgeEndConnection ( "EdgeEndConnection" );
- static OUString sEdgePath ( "PolyPolygonBezier" );
+ static const char sEdgeKind [] = "EdgeKind";
+ static const char sEdgeStartPoint [] = "EdgeStartPoint";
+ static const char sEdgeEndPoint [] = "EdgeEndPoint";
+ static const char sEdgeStartConnection [] = "EdgeStartConnection";
+ static const char sEdgeEndConnection [] = "EdgeEndConnection";
+ static const char sEdgePath [] = "PolyPolygonBezier";
bool bRetValue = false;
rShapeType = rShapeFlags = 0;
diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx
index c8ff2f0c16fa..328b828318d8 100644
--- a/filter/source/msfilter/mstoolbar.cxx
+++ b/filter/source/msfilter/mstoolbar.cxx
@@ -97,8 +97,8 @@ uno::Any
CustomToolBarImportHelper::createCommandFromMacro( const OUString& sCmd )
{
//"vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
- static OUString scheme( "vnd.sun.star.script:" );
- static OUString part2( "?language=Basic&location=document" );
+ static const char scheme[] = "vnd.sun.star.script:";
+ static const char part2 [] = "?language=Basic&location=document";
// create script url
OUString scriptURL = scheme + sCmd + part2;
return uno::makeAny( scriptURL );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index c2cd0b3ba98c..e570bba424b1 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -7197,7 +7197,7 @@ void CreateTableRows( Reference< XTableRows > xTableRows, const std::set< sal_In
else
nHeight = nTableBottom - nLastPosition;
- static const OUString sWidth( "Height" );
+ static const char sWidth[] = "Height";
Reference< XPropertySet > xPropSet( xTableRows->getByIndex( n ), UNO_QUERY_THROW );
xPropSet->setPropertyValue( sWidth, Any( nHeight ) );
}
@@ -7221,7 +7221,7 @@ void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::se
else
nWidth = nTableRight - nLastPosition;
- static const OUString sWidth( "Width" );
+ static const char sWidth[] = "Width";
Reference< XPropertySet > xPropSet( xTableColumns->getByIndex( n ), UNO_QUERY_THROW );
xPropSet->setPropertyValue( sWidth, Any( nWidth ) );
}
@@ -7256,16 +7256,16 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
const sal_Int32 nRightDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_RIGHTDIST)).GetValue());
const sal_Int32 nUpperDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_UPPERDIST)).GetValue());
const sal_Int32 nLowerDist(static_cast<const SdrMetricItem&>(pObj->GetMergedItem(SDRATTR_TEXT_LOWERDIST)).GetValue());
- static const OUString sTopBorder( "TextUpperDistance" );
- static const OUString sBottomBorder( "TextLowerDistance" );
- static const OUString sLeftBorder( "TextLeftDistance" );
- static const OUString sRightBorder( "TextRightDistance" );
+ static const char sTopBorder[] = "TextUpperDistance";
+ static const char sBottomBorder[] = "TextLowerDistance";
+ static const char sLeftBorder[] = "TextLeftDistance";
+ static const char sRightBorder[] = "TextRightDistance";
xPropSet->setPropertyValue( sTopBorder, Any( nUpperDist ) );
xPropSet->setPropertyValue( sRightBorder, Any( nRightDist ) );
xPropSet->setPropertyValue( sLeftBorder, Any( nLeftDist ) );
xPropSet->setPropertyValue( sBottomBorder, Any( nLowerDist ) );
- static const OUString sTextVerticalAdjust( "TextVerticalAdjust" );
+ static const char sTextVerticalAdjust[] = "TextVerticalAdjust";
const SdrTextVertAdjust eTextVertAdjust(static_cast<const SdrTextVertAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_VERTADJUST)).GetValue());
drawing::TextVerticalAdjust eVA( drawing::TextVerticalAdjust_TOP );
if ( eTextVertAdjust == SDRTEXTVERTADJUST_CENTER )
@@ -7277,8 +7277,8 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
//set textHorizontalAdjust and TextWritingMode attr
const sal_Int32 eHA(static_cast<const SdrTextHorzAdjustItem&>(pObj->GetMergedItem(SDRATTR_TEXT_HORZADJUST)).GetValue());
const SvxFrameDirection eDirection = (const SvxFrameDirection)(static_cast<const SvxFrameDirectionItem&>(pObj->GetMergedItem(EE_PARA_WRITINGDIR)).GetValue());
- static const OUString sHorizontalAdjust( "TextHorizontalAdjust" );
- static const OUString sWritingMode( "TextWritingMode" );
+ static const char sHorizontalAdjust[] = "TextHorizontalAdjust";
+ static const char sWritingMode[] = "TextWritingMode";
xPropSet->setPropertyValue( sHorizontalAdjust , Any( eHA ) );
if ( eDirection == FRMDIR_VERT_TOP_RIGHT )
{//vertical writing
@@ -7291,7 +7291,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
{
case drawing::FillStyle_SOLID :
{
- static const OUString sFillColor( "FillColor" );
+ static const char sFillColor[] = "FillColor";
eFS = com::sun::star::drawing::FillStyle_SOLID;
Color aFillColor( static_cast<const XFillColorItem&>(pObj->GetMergedItem( XATTR_FILLCOLOR )).GetColorValue() );
sal_Int32 nFillColor( aFillColor.GetColor() );
@@ -7315,7 +7315,7 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
aGradient.EndIntensity = aXGradient.GetEndIntens();
aGradient.StepCount = aXGradient.GetSteps();
- static const OUString sFillGradient( "FillGradient" );
+ static const char sFillGradient[] = "FillGradient";
xPropSet->setPropertyValue( sFillGradient, Any( aGradient ) );
}
break;
@@ -7350,12 +7350,12 @@ void ApplyCellAttributes( const SdrObject* pObj, Reference< XCell >& xCell )
break;
}
- static const OUString sFillStyle( "FillStyle" );
+ static const char sFillStyle[] = "FillStyle";
xPropSet->setPropertyValue( sFillStyle, Any( eFS ) );
if ( eFillStyle != drawing::FillStyle_NONE )
{
sal_Int16 nFillTransparence( static_cast<const XFillTransparenceItem&>(pObj->GetMergedItem( XATTR_FILLTRANSPARENCE ) ).GetValue() );
- static const OUString sFillTransparence( "FillTransparence" );
+ static const char sFillTransparence[] = "FillTransparence";
xPropSet->setPropertyValue( sFillTransparence, Any( nFillTransparence ) );
}
}
@@ -7394,12 +7394,12 @@ void ApplyCellLineAttributes( const SdrObject* pLine, Reference< XTable >& xTabl
std::vector< sal_Int32 >::const_iterator aIter( vPositions.begin() );
while( aIter != vPositions.end() )
{
- static const OUString sTopBorder( "TopBorder" );
- static const OUString sBottomBorder( "BottomBorder" );
- static const OUString sLeftBorder( "LeftBorder" );
- static const OUString sRightBorder( "RightBorder" );
- static const OUString sDiagonalTLBR( "DiagonalTLBR" );
- static const OUString sDiagonalBLTR( "DiagonalBLTR" );
+ static const char sTopBorder[] = "TopBorder";
+ static const char sBottomBorder[] = "BottomBorder";
+ static const char sLeftBorder[] = "LeftBorder";
+ static const char sRightBorder[] = "RightBorder";
+ static const char sDiagonalTLBR[] = "DiagonalTLBR";
+ static const char sDiagonalBLTR[] = "DiagonalBLTR";
sal_Int32 nPosition = *aIter & 0xffffff;
sal_Int32 nFlags = *aIter &~0xffffff;
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index d8962e2111ac..e0696f596bda 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -425,19 +425,18 @@ struct AnnotatingVisitor
OUString getOdfAlign( TextAlign eAlign )
{
- static OUString aStart("start");
- static OUString aEnd("end");
- // static OUString aJustify("justify");
- static OUString aCenter("center");
+ static const char aStart[] = "start";
+ static const char aEnd[] = "end";
+ static const char aCenter[] = "center";
switch(eAlign)
{
default:
case BEFORE:
- return aStart;
+ return OUString(aStart);
case CENTER:
- return aCenter;
+ return OUString(aCenter);
case AFTER:
- return aEnd;
+ return OUString(aEnd);
}
}
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 02b9fe69402e..02e3c626072b 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -2002,7 +2002,7 @@ void ODatabaseForm::reset_impl(bool _bAproveByListeners)
if ( xColProps.is() )
xPSI = xColProps->getPropertySetInfo( );
- static const OUString PROPERTY_CONTROLDEFAULT( "ControlDefault" );
+ static const char PROPERTY_CONTROLDEFAULT[] = "ControlDefault";
if ( xPSI.is() && xPSI->hasPropertyByName( PROPERTY_CONTROLDEFAULT ) )
{
Any aDefault = xColProps->getPropertyValue( PROPERTY_CONTROLDEFAULT );
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 6ed72744f167..70a9db9dd4c0 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -682,7 +682,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
Reference<XNumberFormats> xFormats = xSupplier->getNumberFormats();
OUString sFormatDescription;
LanguageType eFormatLanguage = LANGUAGE_DONTKNOW;
- static const OUString s_aLocaleProp ("Locale");
+ static const char s_aLocaleProp[] = "Locale";
Reference<com::sun::star::beans::XPropertySet> xFormat = xFormats->getByKey(nKey);
if (hasProperty(s_aLocaleProp, xFormat))
{
@@ -694,7 +694,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
eFormatLanguage = LanguageTag::convertToLanguageType( *pLocale, false);
}
}
- static const OUString s_aFormatStringProp ("FormatString");
+ static const char s_aFormatStringProp[] = "FormatString";
if (hasProperty(s_aFormatStringProp, xFormat))
xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
_rxOutStream->writeUTF(sFormatDescription);
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
index ef77bb3fdb2a..36838fdadb37 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx
@@ -240,8 +240,8 @@ void VistaFilePickerEventHandler::stopListening()
}
}
-static const OUString PROP_CONTROL_ID("control_id");
-static const OUString PROP_PICKER_LISTENER("picker_listener");
+static const char PROP_CONTROL_ID[] = "control_id";
+static const char PROP_PICKER_LISTENER[] = "picker_listener";
class AsyncPickerEvents : public RequestHandler
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 7a7d73fc3951..519c795fa3a7 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -481,7 +481,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
Reference< XDispatch > xMenuItemDispatch;
- static const OUString s_sDefault("_default");
+ static const char s_sDefault[] = "_default";
// query for dispatcher
std::vector< MenuItemHandler* >::iterator p;
for ( p = aNewPickVector.begin(); p != aNewPickVector.end(); ++p )
diff --git a/framework/source/fwi/jobs/jobconst.cxx b/framework/source/fwi/jobs/jobconst.cxx
index 082f099baa30..5afd5dd8e101 100644
--- a/framework/source/fwi/jobs/jobconst.cxx
+++ b/framework/source/fwi/jobs/jobconst.cxx
@@ -23,20 +23,17 @@ namespace framework{
const OUString JobConst::ANSWER_DEACTIVATE_JOB()
{
- static const OUString PROP("Deactivate");
- return PROP;
+ return OUString("Deactivate");
}
const OUString JobConst::ANSWER_SAVE_ARGUMENTS()
{
- static const OUString PROP("SaveArguments");
- return PROP;
+ return OUString("SaveArguments");
}
const OUString JobConst::ANSWER_SEND_DISPATCHRESULT()
{
- static const OUString PROP("SendDispatchResult");
- return PROP;
+ return OUString("SendDispatchResult");
}
} // namespace framework
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index c0a31e8fe178..3e85ed351e7c 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -450,7 +450,7 @@ bool isEnabled( const OUString& sAdminTime ,
we have to encode all '?' signs. Otherwhise e.g. "??-" will be translated
to "~" ...
*/
- static OUString PATTERN_ISO8601("\?\?\?\?-\?\?-\?\?*");
+ static const char PATTERN_ISO8601[] = "\?\?\?\?-\?\?-\?\?*";
WildCard aISOPattern(PATTERN_ISO8601);
bool bValidAdmin = aISOPattern.Matches(sAdminTime);
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index 16741aca86a3..0342061beaab 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -40,19 +40,19 @@
namespace framework{
/** address job configuration inside argument set provided on method execute(). */
-static const OUString PROP_JOBCONFIG("JobConfig");
+static const char PROP_JOBCONFIG[] = "JobConfig";
/** address job configuration property "Command". */
-static const OUString PROP_COMMAND("Command");
+static const char PROP_COMMAND[] = "Command";
/** address job configuration property "Arguments". */
-static const OUString PROP_ARGUMENTS("Arguments");
+static const char PROP_ARGUMENTS[] = "Arguments";
/** address job configuration property "DeactivateJobIfDone". */
-static const OUString PROP_DEACTIVATEJOBIFDONE("DeactivateJobIfDone");
+static const char PROP_DEACTIVATEJOBIFDONE[] = "DeactivateJobIfDone";
/** address job configuration property "CheckExitCode". */
-static const OUString PROP_CHECKEXITCODE("CheckExitCode");
+static const char PROP_CHECKEXITCODE[] = "CheckExitCode";
DEFINE_XSERVICEINFO_MULTISERVICE_2(ShellJob ,
::cppu::OWeakObject ,
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index f6526dd2f7a4..64eca8ea1f8a 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -737,8 +737,8 @@ bool queryOrcusTypeAndFilter(const uno::Sequence<beans::PropertyValue>&, OUStrin
void LoadEnv::impl_detectTypeAndFilter()
throw(LoadEnvException, css::uno::RuntimeException, beans::IllegalTypeException, std::exception)
{
- static OUString TYPEPROP_PREFERREDFILTER("PreferredFilter");
- static OUString FILTERPROP_FLAGS ("Flags");
+ static const char TYPEPROP_PREFERREDFILTER[] = "PreferredFilter";
+ static const char FILTERPROP_FLAGS [] = "Flags";
static sal_Int32 FILTERFLAG_TEMPLATEPATH = 16;
// SAFE ->
@@ -1673,7 +1673,7 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference< css::awt::X
void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::awt::XWindow >& xWindow)
{
- static OUString PACKAGE_SETUP_MODULES("/org.openoffice.Setup/Office/Factories");
+ static const char PACKAGE_SETUP_MODULES[] = "/org.openoffice.Setup/Office/Factories";
// no window -> action not possible
if (!xWindow.is())
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 100ab02b6edf..695db41d2097 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -51,8 +51,8 @@ extern int yydebug;
sal_Int32 lineNumber = 1;
-static OUString TMP("TMP");
-static OUString TEMP("TEMP");
+static const char TMP[] = "TMP";
+static const char TEMP[] = "TEMP";
static sal_Char tmpFilePattern[512];
bool isFileUrl(const OString& fileName)
@@ -123,9 +123,9 @@ OString makeTempName(const OString& prefix)
OUString uTmpPath;
OString tmpPath;
- if ( osl_getEnvironment(TMP.pData, &uTmpPath.pData) != osl_Process_E_None )
+ if ( osl_getEnvironment(OUString(TMP).pData, &uTmpPath.pData) != osl_Process_E_None )
{
- if ( osl_getEnvironment(TEMP.pData, &uTmpPath.pData) != osl_Process_E_None )
+ if ( osl_getEnvironment(OUString(TEMP).pData, &uTmpPath.pData) != osl_Process_E_None )
{
#if defined(SAL_W32)
tmpPath = OString("c:\\temp");
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 4731c71527ac..f3b8991f5107 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1084,8 +1084,8 @@ inline OUString getDirFromFile(const OUString& usFilePath)
void createJavaInfoFromPath(vector<rtl::Reference<VendorBase> >& vecInfos)
{
// Get Java from PATH environment variable
- static OUString sCurDir(".");
- static OUString sParentDir("..");
+ static const char sCurDir[] = ".";
+ static const char sParentDir[] = "..";
char *szPath= getenv("PATH");
if(szPath)
{
diff --git a/linguistic/source/dicimp.cxx b/linguistic/source/dicimp.cxx
index dac3046ec8b1..6cd87c239993 100644
--- a/linguistic/source/dicimp.cxx
+++ b/linguistic/source/dicimp.cxx
@@ -1108,7 +1108,7 @@ void DicEntry::splitDicFileWord(const OUString &rDicFileWord,
{
MutexGuard aGuard( GetLinguMutex() );
- static const OUString aDelim( "==" );
+ static const char aDelim[] = "==";
sal_Int32 nDelimPos = rDicFileWord.indexOf( aDelim );
if (-1 != nDelimPos)
diff --git a/mysqlc/source/mysqlc_databasemetadata.cxx b/mysqlc/source/mysqlc_databasemetadata.cxx
index ffb5f641c5bf..4388b617ffc2 100644
--- a/mysqlc/source/mysqlc_databasemetadata.cxx
+++ b/mysqlc/source/mysqlc_databasemetadata.cxx
@@ -812,8 +812,7 @@ OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
throw(SQLException, RuntimeException, std::exception)
{
OSL_TRACE("ODatabaseMetaData::getDriverVersion");
- static const OUString sVersion( "0.9.2" );
- return sVersion;
+ return OUString( "0.9.2" );
}
OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion()
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx
index 5c75b3394cfe..b7a4faad8fed 100644
--- a/oox/source/core/relations.cxx
+++ b/oox/source/core/relations.cxx
@@ -40,14 +40,12 @@ OUString lclAppendFileName( const OUString& rPath, const OUString& rFileName )
OUString createOfficeDocRelationTypeTransitional(const OUString& rType)
{
- static const OUString aTransitionalBase("http://schemas.openxmlformats.org/officeDocument/2006/relationships/");
- return aTransitionalBase + rType;
+ return OUString("http://schemas.openxmlformats.org/officeDocument/2006/relationships/") + rType;
}
OUString createOfficeDocRelationTypeStrict(const OUString& rType)
{
- static const OUString aStrictBase("http://purl.oclc.org/ooxml/officeDocument/relationships/");
- return aStrictBase + rType;
+ return OUString("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rType;
}
}
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 8f1b99254917..18a443af0380 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -250,14 +250,12 @@ namespace {
OUString getTransitionalRelationshipOfficeDocType(const OUString& rPart)
{
- static const OUString aBase("http://schemas.openxmlformats.org/officeDocument/2006/relationships/");
- return aBase + rPart;
+ return OUString("http://schemas.openxmlformats.org/officeDocument/2006/relationships/") + rPart;
}
OUString getStrictRelationshipOfficeDocType(const OUString& rPart)
{
- static const OUString aBase("http://purl.oclc.org/ooxml/officeDocument/relationships/");
- return aBase + rPart;
+ return OUString("http://purl.oclc.org/ooxml/officeDocument/relationships/") + rPart;
}
}
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index cb9e7d25b859..76cc98927d87 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2520,8 +2520,8 @@ HtmlSelectModel::HtmlSelectModel()
bool
HtmlSelectModel::importBinaryModel( BinaryInputStream& rInStrm )
{
- static OUString sMultiple( "<SELECT MULTIPLE" );
- static OUString sSelected( "OPTION SELECTED" );
+ static const char sMultiple[] = "<SELECT MULTIPLE";
+ static const char sSelected[] = "OPTION SELECTED";
OUString sStringContents = rInStrm.readUnicodeArray( rInStrm.size() );
diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx
index b6794f319e39..86689ebe6332 100644
--- a/oox/source/ole/vbamodule.cxx
+++ b/oox/source/ole/vbamodule.cxx
@@ -144,7 +144,7 @@ void VbaModule::createEmptyModule( const Reference< container::XNameContainer >&
OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const
{
OUStringBuffer aSourceCode;
- const static OUString sUnmatchedRemovedTag( "Rem removed unmatched Sub/End: " );
+ static const char sUnmatchedRemovedTag[] = "Rem removed unmatched Sub/End: ";
if( !maStreamName.isEmpty() && (mnOffset != SAL_MAX_UINT32) )
{
BinaryXInputStream aInStrm( rVbaStrg.openInputStream( maStreamName ), true );
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 571095a3ac66..6deca0ae05f4 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -1455,7 +1455,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
uno::Reference< beans::XPropertySet> xProp(_xStorageToSaveTo,uno::UNO_QUERY);
if ( xProp.is() )
{
- static const OUString sPropName("MediaType");
+ static const char sPropName[] = "MediaType";
OUString sOldMediaType;
xProp->getPropertyValue(sPropName) >>= sOldMediaType;
if ( !xProp->getPropertyValue(sPropName).hasValue() || sOldMediaType.isEmpty() || MIMETYPE_OASIS_OPENDOCUMENT_REPORT != sOldMediaType )
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx
index 924f146ac95c..304dee782c75 100644
--- a/reportdesign/source/core/api/ReportEngineJFree.cxx
+++ b/reportdesign/source/core/api/ReportEngineJFree.cxx
@@ -163,7 +163,7 @@ OUString OReportEngineJFree::getNewOutputName()
if ( !m_xReport.is() || !m_xActiveConnection.is() )
throw lang::IllegalArgumentException();
- static const OUString s_sMediaType("MediaType");
+ static const char s_sMediaType[] = "MediaType";
try
{
MimeConfigurationHelper aConfighelper(m_xContext);
@@ -229,11 +229,11 @@ OUString OReportEngineJFree::getNewOutputName()
OUStringBuffer sAuthor(aUserOpts.GetFirstName());
sAuthor.appendAscii(" ");
sAuthor.append(aUserOpts.GetLastName());
- static const OUString s_sAuthor("Author");
+ static const char s_sAuthor[] = "Author";
aConvertedProperties[nPos].Name = s_sAuthor;
aConvertedProperties[nPos++].Value <<= sAuthor.makeStringAndClear();
- static const OUString s_sTitle("Title");
+ static const char s_sTitle[] = "Title";
aConvertedProperties[nPos].Name = s_sTitle;
aConvertedProperties[nPos++].Value <<= m_xReport->getCaption();
diff --git a/reportdesign/source/core/misc/reportformula.cxx b/reportdesign/source/core/misc/reportformula.cxx
index 0b53d279f1a1..77d24b853751 100644
--- a/reportdesign/source/core/misc/reportformula.cxx
+++ b/reportdesign/source/core/misc/reportformula.cxx
@@ -31,22 +31,8 @@ namespace rptui
namespace
{
- const OUString& lcl_getExpressionPrefix( sal_Int32* _pTakeLengthOrNull = NULL )
- {
- static OUString s_sPrefix( "rpt:" );
- if ( _pTakeLengthOrNull )
- *_pTakeLengthOrNull = s_sPrefix.getLength();
- return s_sPrefix;
- }
-
-
- const OUString& lcl_getFieldPrefix( sal_Int32* _pTakeLengthOrNull = NULL )
- {
- static OUString s_sPrefix( "field:" );
- if ( _pTakeLengthOrNull )
- *_pTakeLengthOrNull = s_sPrefix.getLength();
- return s_sPrefix;
- }
+ static const char sExpressionPrefix[] = "rpt:";
+ static const char sFieldPrefix[] = "field:";
}
@@ -67,17 +53,17 @@ namespace rptui
{
case Expression:
{
- if ( _rFieldOrExpression.startsWith( lcl_getExpressionPrefix() ) )
+ if ( _rFieldOrExpression.startsWith( sExpressionPrefix ) )
m_sCompleteFormula = _rFieldOrExpression;
else
- m_sCompleteFormula = lcl_getExpressionPrefix() + _rFieldOrExpression;
+ m_sCompleteFormula = sExpressionPrefix + _rFieldOrExpression;
}
break;
case Field:
{
OUStringBuffer aBuffer;
- aBuffer.append( lcl_getFieldPrefix() );
+ aBuffer.append( sFieldPrefix );
aBuffer.appendAscii( "[" );
aBuffer.append( _rFieldOrExpression );
aBuffer.appendAscii( "]" );
@@ -100,18 +86,19 @@ namespace rptui
{
m_sCompleteFormula = _rFormula;
- sal_Int32 nPrefixLen( -1 );
// is it an ordinary expression?
- if ( m_sCompleteFormula.startsWith( lcl_getExpressionPrefix( &nPrefixLen ) ) )
+ if ( m_sCompleteFormula.startsWith( sExpressionPrefix ) )
{
+ sal_Int32 nPrefixLen = strlen(sExpressionPrefix);
m_eType = Expression;
m_sUndecoratedContent = m_sCompleteFormula.copy( nPrefixLen );
return;
}
/// does it refer to a field?
- if ( m_sCompleteFormula.startsWith( lcl_getFieldPrefix( &nPrefixLen ) ) )
+ if ( m_sCompleteFormula.startsWith( sFieldPrefix ) )
{
+ sal_Int32 nPrefixLen = strlen(sFieldPrefix);
if ( ( m_sCompleteFormula.getLength() >= nPrefixLen + 2 )
&& ( m_sCompleteFormula[ nPrefixLen ] == '[' )
&& ( m_sCompleteFormula[ m_sCompleteFormula.getLength() - 1 ] == ']' )
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index d7e7c8df4d41..a5f4a436ce7c 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -105,7 +105,7 @@ SvXMLImportContext* OXMLCell::CreateChildContext(
ORptFilter& rImport = GetOwnImport();
const SvXMLTokenMap& rTokenMap = rImport.GetCellElemTokenMap();
Reference<XMultiServiceFactory> xFactor(rImport.GetModel(),uno::UNO_QUERY);
- static const OUString s_sStringConcat(" & ");
+ static const char s_sStringConcat[] = " & ";
const sal_uInt16 nToken = rTokenMap.Get( _nPrefix, _rLocalName );
switch( nToken )
@@ -117,10 +117,10 @@ SvXMLImportContext* OXMLCell::CreateChildContext(
}
break;
case XML_TOK_PAGE_NUMBER:
- m_sText += s_sStringConcat + " PageNumber()";
+ m_sText += OUString(s_sStringConcat) + " PageNumber()";
break;
case XML_TOK_PAGE_COUNT:
- m_sText += s_sStringConcat + " PageCount()";
+ m_sText += OUString(s_sStringConcat) + " PageCount()";
break;
case XML_TOK_FORMATTED_TEXT:
{
@@ -257,11 +257,10 @@ void OXMLCell::Characters( const OUString& rChars )
{
if ( !rChars.isEmpty() )
{
- static const OUString s_Quote("\"");
+ static const char s_Quote[] = "\"";
if ( !m_sText.isEmpty() )
{
- static const OUString s_sStringConcat(" & ");
- m_sText += s_sStringConcat;
+ m_sText += " & ";
}
m_sText += s_Quote + rChars + s_Quote;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index fd844617d6dc..b89d68715722 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -1010,8 +1010,8 @@ OUString ORptExport::convertFormula(const OUString& _sFormula)
bool ORptExport::exportFormula(enum ::xmloff::token::XMLTokenEnum eName,const OUString& _sFormula)
{
const OUString sFieldData = convertFormula(_sFormula);
- static const OUString s_sPageNumber("PageNumber()");
- static const OUString s_sPageCount("PageCount()");
+ static const char s_sPageNumber[] = "PageNumber()";
+ static const char s_sPageCount[] = "PageCount()";
sal_Int32 nPageNumberIndex = sFieldData.indexOf(s_sPageNumber);
sal_Int32 nPageCountIndex = sFieldData.indexOf(s_sPageCount);
bool bRet = nPageNumberIndex != -1 || nPageCountIndex != -1;
@@ -1069,7 +1069,7 @@ bool ORptExport::exportGroup(const Reference<XReportDefinition>& _xReportDefinit
OUString sExpression = sField;
if ( !sExpression.isEmpty() )
{
- static OUString s_sQuote("\"\"");
+ static const char s_sQuote[] = "\"\"";
sal_Int32 nIndex = sExpression.indexOf('"');
while ( nIndex > -1 )
{
@@ -1407,10 +1407,10 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor
if ( Reference<XFormattedField>(_xReportElement,uno::UNO_QUERY).is() )
{
OUString sFieldData = _xReportElement->getDataField();
- static const OUString s_sPageNumber("PageNumber()");
- static const OUString s_sPageCount("PageCount()");
- static const OUString s_sReportPrefix("rpt:");
- sFieldData = sFieldData.copy(s_sReportPrefix.getLength(),sFieldData.getLength() - s_sReportPrefix.getLength());
+ static const char s_sPageNumber[] = "PageNumber()";
+ static const char s_sPageCount[] = "PageCount()";
+ static const char s_sReportPrefix[] = "rpt:";
+ sFieldData = sFieldData.copy(strlen(s_sReportPrefix), sFieldData.getLength() - strlen(s_sReportPrefix));
sal_Int32 nPageNumberIndex = sFieldData.indexOf(s_sPageNumber);
if ( nPageNumberIndex != -1 )
{
@@ -1423,7 +1423,7 @@ void ORptExport::exportParagraph(const Reference< XReportControlModel >& _xRepor
{
if ( sToken == s_sPageNumber )
{
- static const OUString s_sCurrent("current");
+ static const char s_sCurrent[] = "current";
AddAttribute(XML_NAMESPACE_TEXT, XML_SELECT_PAGE, s_sCurrent );
SvXMLElementExport aPageNumber(*this,XML_NAMESPACE_TEXT, XML_PAGE_NUMBER, false, false);
Characters(OUString("1"));
diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index 7973b073286c..6742e34bf82d 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -43,7 +43,7 @@ void lcl_exportPrettyPrinting(const uno::Reference< xml::sax::XDocumentHandler >
SvtSaveOptions aSaveOpt;
if ( aSaveOpt.IsPrettyPrinting() )
{
- static const OUString s_sWhitespaces(" ");
+ static const char s_sWhitespaces[] = " ";
_xDelegatee->ignorableWhitespace(s_sWhitespaces);
}
}
@@ -279,7 +279,7 @@ void SAL_CALL ExportDocumentHandler::characters(const OUString & aChars) throw (
}
else if ( m_bExportChar )
{
- static const OUString s_sZero("0");
+ static const char s_sZero[] = "0";
m_xDelegatee->characters(s_sZero);
}
}
@@ -367,16 +367,16 @@ void ExportDocumentHandler::exportTableRows()
const OUString sValueType( lcl_createAttribute(XML_NP_OFFICE, XML_VALUE_TYPE) );
- const static OUString s_sFieldPrefix("field:[");
- const static OUString s_sFieldPostfix("]");
+ static const char s_sFieldPrefix[] = "field:[";
+ static const char s_sFieldPostfix[] = "]";
const OUString sCell( lcl_createAttribute(XML_NP_TABLE, XML_TABLE_CELL) );
const OUString sP( lcl_createAttribute(XML_NP_TEXT, XML_P) );
const OUString sFtext(lcl_createAttribute(XML_NP_RPT,XML_FORMATTED_TEXT) );
const OUString sRElement(lcl_createAttribute(XML_NP_RPT,XML_REPORT_ELEMENT) );
const OUString sRComponent( lcl_createAttribute(XML_NP_RPT,XML_REPORT_COMPONENT) ) ;
const OUString sFormulaAttrib( lcl_createAttribute(XML_NP_RPT,XML_FORMULA) );
- const static OUString s_sString("string");
- const static OUString s_sFloat("float");
+ static const char s_sString[] = "string";
+ static const char s_sFloat[] = "float";
SvXMLAttributeList* pCellAtt = new SvXMLAttributeList();
uno::Reference< xml::sax::XAttributeList > xCellAtt = pCellAtt;
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx
index 34bd41f2abec..5cc8fe1b0774 100644
--- a/reportdesign/source/filter/xml/xmlFixedContent.cxx
+++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx
@@ -135,7 +135,7 @@ SvXMLImportContext* OXMLFixedContent::_CreateChildContext(
if ( pContext )
return pContext;
- static const OUString s_sStringConcat(" & ");
+ static const char s_sStringConcat[] = " & ";
const SvXMLTokenMap& rTokenMap = m_rImport.GetCellElemTokenMap();
Reference<XComponentContext> xContext = m_rImport.GetComponentContext();
@@ -164,11 +164,11 @@ SvXMLImportContext* OXMLFixedContent::_CreateChildContext(
0x0020, true );
break;
case XML_TOK_PAGE_NUMBER:
- m_sPageText += s_sStringConcat + " PageNumber()";
+ m_sPageText += OUString(s_sStringConcat) + " PageNumber()";
m_bFormattedField = true;
break;
case XML_TOK_PAGE_COUNT:
- m_sPageText += s_sStringConcat + " PageCount()";
+ m_sPageText += OUString(s_sStringConcat) + " PageCount()";
m_bFormattedField = true;
break;
default:
@@ -212,11 +212,10 @@ void OXMLFixedContent::Characters( const OUString& rChars )
m_sLabel += rChars;
if ( !rChars.isEmpty() )
{
- static const OUString s_Quote("\"");
+ static const char s_Quote[] = "\"";
if ( !m_sPageText.isEmpty() )
{
- static const OUString s_sStringConcat(" & ");
- m_sPageText += s_sStringConcat;
+ m_sPageText += " & ";
}
m_sPageText += s_Quote + rChars + s_Quote;
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index cc0a95a1d00e..47053d3a8137 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -64,7 +64,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport,
break;
case XML_TOK_SELECT_PAGE:
{
- static const OUString s_sPageNumber("rpt:PageNumber()");
+ static const char s_sPageNumber[] = "rpt:PageNumber()";
_xComponent->setDataField(s_sPageNumber);
}
break;
@@ -74,7 +74,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport,
}
if ( _bPageCount )
{
- static const OUString s_sPageNumber("rpt:PageCount()");
+ static const char s_sPageNumber[] = "rpt:PageCount()";
_xComponent->setDataField(s_sPageNumber);
}
}
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index 3670a4ab9f2d..ec34bb5749b8 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -92,15 +92,15 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
if ( nLen )
{
- const static OUString s_sChanged("rpt:HASCHANGED(\"");
+ static const char s_sChanged[] = "rpt:HASCHANGED(\"";
sal_Int32 nPos = sValue.indexOf(s_sChanged);
if ( nPos == -1 )
nPos = 5;
else
{
- nPos = s_sChanged.getLength();
- static OUString s_sQuote("\"\"");
- static OUString s_sSingleQuote("\"");
+ nPos = strlen(s_sChanged);
+ static const char s_sQuote[] = "\"\"";
+ static const char s_sSingleQuote[] = "\"";
sal_Int32 nIndex = sValue.indexOf(s_sQuote,nPos);
while ( nIndex > -1 )
{
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 193279a31300..0dde198e802e 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -355,7 +355,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any >
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
{
- const static OUString s_sDatabaseDataProvider("com.sun.star.chart2.data.DatabaseDataProvider");
+ static const char s_sDatabaseDataProvider[] = "com.sun.star.chart2.data.DatabaseDataProvider";
m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
,m_xContext),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 316dd66f8c37..364c784e41f0 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -505,7 +505,7 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
aArgs[0] <<= beans::NamedValue(OUString("Storage"),uno::makeAny(xStorage));
xEmbeddedObjectResolver.set( xReportServiceFactory->createInstanceWithArguments(OUString("com.sun.star.document.ImportEmbeddedObjectResolver"),aArgs) , uno::UNO_QUERY);
- static const OUString s_sOld("OldFormat");
+ static const char s_sOld[] = "OldFormat";
static comphelper::PropertyMapEntry const pMap[] =
{
{ OUString("OldFormat") , 1, cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::BOUND, 0 },
@@ -523,9 +523,9 @@ bool ORptFilter::implImport( const Sequence< PropertyValue >& rDescriptor )
xProp->setPropertyValue("StreamRelPath", uno::makeAny(sHierarchicalDocumentName));
uno::Reference<XComponent> xModel(GetModel(),UNO_QUERY);
- static const OUString s_sMeta("meta.xml");
- static const OUString s_sStreamName("StreamName");
- xProp->setPropertyValue(s_sStreamName, uno::makeAny(s_sMeta));
+ static const char s_sMeta[] = "meta.xml";
+ static const char s_sStreamName[] = "StreamName";
+ xProp->setPropertyValue(s_sStreamName, uno::makeAny(OUString(s_sMeta)));
sal_Int32 nRet = ReadThroughComponent( xStorage
,xModel
,"meta.xml"
@@ -1047,7 +1047,7 @@ bool ORptFilter::isOldFormat() const
uno::Reference<beans::XPropertySet> xProp = getImportInfo();
if ( xProp.is() )
{
- const static OUString s_sOld("OldFormat");
+ static const char s_sOld[] = "OldFormat";
if ( xProp->getPropertySetInfo()->hasPropertyByName(s_sOld))
{
xProp->getPropertyValue(s_sOld) >>= bOldFormat;
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 24f7f2677861..063fea17735e 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -416,16 +416,14 @@ void Converter::convertMeasure( OUStringBuffer& rBuffer,
rBuffer.appendAscii( psUnit );
}
-static const OUString& getTrueString()
+static OUString getTrueString()
{
- static const OUString sTrue( "true" );
- return sTrue;
+ return OUString( "true" );
}
-static const OUString& getFalseString()
+static OUString getFalseString()
{
- static const OUString sFalse( "false" );
- return sFalse;
+ return OUString( "false" );
}
/** convert string to boolean */
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f76b17a8632b..cfe4d18e9ae6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -697,7 +697,7 @@ struct Convention_A1 : public ScCompiler::Convention
KParseTokens::ASC_UNDERSCORE | KParseTokens::ASC_DOLLAR;
static const sal_Int32 nContFlags = nStartFlags | KParseTokens::ASC_DOT;
// '?' allowed in range names because of Xcl :-/
- static const OUString aAddAllowed("?#");
+ static const char aAddAllowed[] = "?#";
return pCharClass->parseAnyToken( rFormula,
nSrcPos, nStartFlags, aAddAllowed, nContFlags, aAddAllowed );
}
diff --git a/sc/source/filter/excel/xltoolbar.cxx b/sc/source/filter/excel/xltoolbar.cxx
index 6d307f41706f..0276a0de6591 100644
--- a/sc/source/filter/excel/xltoolbar.cxx
+++ b/sc/source/filter/excel/xltoolbar.cxx
@@ -145,7 +145,7 @@ bool ScCTB::ImportMenuTB( ScCTBWrapper& rWrapper, const css::uno::Reference< css
bool ScCTB::ImportCustomToolBar( ScCTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
{
- static OUString sToolbarPrefix( "private:resource/toolbar/custom_" );
+ static const char sToolbarPrefix[] = "private:resource/toolbar/custom_";
bool bRes = false;
try
{
@@ -160,7 +160,7 @@ bool ScCTB::ImportCustomToolBar( ScCTBWrapper& rWrapper, CustomToolBarImportHelp
// set UI name for toolbar
xProps->setPropertyValue("UIName", uno::makeAny( name.getString() ) );
- OUString sToolBarName = sToolbarPrefix.concat( name.getString() );
+ OUString sToolBarName = sToolbarPrefix + name.getString();
for ( std::vector< ScTBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it )
{
if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, helper, IsMenuToolbar() ) )
diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
index efb130e1a97b..03a71ad43dd2 100644
--- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx
@@ -57,8 +57,8 @@ static sal_Int16 lclAnovaLabels[] =
0
};
-static const OUString strWildcardRange("%RANGE%");
-static const OUString strWildcardNumber("%NUMBER%");
+static const char strWildcardRange[] = "%RANGE%";
+static const char strWildcardNumber[] = "%NUMBER%";
OUString lclCreateMultiParameterFormula(
ScRangeList& aRangeList, const OUString& aFormulaTemplate,
diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
index 3184b2281e0c..e82c580c300e 100644
--- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx
@@ -15,10 +15,7 @@
#include "CorrelationDialog.hxx"
-namespace
-{
- static const OUString strCorrelationTemplate("=CORREL(%VAR1%; %VAR2%)");
-}
+static const char strCorrelationTemplate[] = "=CORREL(%VAR1%; %VAR2%)";
ScCorrelationDialog::ScCorrelationDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
@@ -40,7 +37,7 @@ const OUString ScCorrelationDialog::getLabel()
const OUString ScCorrelationDialog::getTemplate()
{
- return strCorrelationTemplate;
+ return OUString(strCorrelationTemplate);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
index e26c650f5566..6dea71fc1fdd 100644
--- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx
@@ -15,10 +15,7 @@
#include "CovarianceDialog.hxx"
-namespace
-{
- static const OUString strCovarianceTemplate("=COVAR(%VAR1%; %VAR2%)");
-}
+static const char strCovarianceTemplate[] = "=COVAR(%VAR1%; %VAR2%)";
ScCovarianceDialog::ScCovarianceDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
@@ -45,7 +42,7 @@ const OUString ScCovarianceDialog::getLabel()
const OUString ScCovarianceDialog::getTemplate()
{
- return strCovarianceTemplate;
+ return OUString(strCovarianceTemplate);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
index 157e974fadae..485c04398589 100644
--- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx
@@ -54,8 +54,8 @@ static const StatisticCalculation lclCalcDefinitions[] =
{ 0, NULL }
};
-static const OUString strWildcardRange("%RANGE%");
-static const OUString strWildcardNumber("%NUMBER%");
+static const char strWildcardRange[] = "%RANGE%";
+static const char strWildcardNumber[] = "%NUMBER%";
}
diff --git a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
index 2b3eb52944be..1fa3a6eed40f 100644
--- a/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/FTestDialog.cxx
@@ -28,13 +28,8 @@
#include "FTestDialog.hxx"
-namespace
-{
-
-static const OUString strWildcardVariable1Range("%VAR1_RANGE%");
-static const OUString strWildcardVariable2Range("%VAR2_RANGE%");
-
-}
+static const char strWildcardVariable1Range[] = "%VAR1_RANGE%";
+static const char strWildcardVariable2Range[] = "%VAR2_RANGE%";
ScFTestDialog::ScFTestDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
index 684b40f9a2b1..b8f7e1a005d2 100644
--- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx
@@ -28,13 +28,8 @@
#include "TTestDialog.hxx"
-namespace
-{
-
-static const OUString strWildcardVariable1Range("%VAR1_RANGE%");
-static const OUString strWildcardVariable2Range("%VAR2_RANGE%");
-
-}
+static const char strWildcardVariable1Range[] = "%VAR1_RANGE%";
+static const char strWildcardVariable2Range[] = "%VAR2_RANGE%";
ScTTestDialog::ScTTestDialog(
SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow,
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 0395d403f688..f136d1a3147b 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -1065,8 +1065,8 @@ static bool lcl_PutString(
sal_Int16 nMonth = (sal_Int16) aMStr.toInt32();
if (!nMonth)
{
- static const OUString aSeptCorrect( "SEPT" );
- static const OUString aSepShortened( "SEP" );
+ static const char aSeptCorrect[] = "SEPT";
+ static const char aSepShortened[] = "SEP";
uno::Sequence< i18n::CalendarItem2 > xMonths;
sal_Int32 i, nMonthCount;
// first test all month names from local international
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index 3cc6dd764da6..3e2aa7e0f30a 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -698,8 +698,7 @@ ScVbaApplication::setCursor( sal_Int32 _cursor ) throw (uno::RuntimeException, s
OUString SAL_CALL
ScVbaApplication::getName() throw (uno::RuntimeException, std::exception)
{
- static OUString appName("Microsoft Excel" );
- return appName;
+ return OUString("Microsoft Excel" );
}
// #TODO #FIXME get/setDisplayAlerts are just stub impl
diff --git a/sc/source/ui/vba/vbaborders.cxx b/sc/source/ui/vba/vbaborders.cxx
index 8d76d3915b55..1bd506dabdd0 100644
--- a/sc/source/ui/vba/vbaborders.cxx
+++ b/sc/source/ui/vba/vbaborders.cxx
@@ -41,7 +41,7 @@ typedef InheritedHelperInterfaceImpl1<excel::XBorder > ScVbaBorder_Base;
// borders, the enumeration will match the order in this list
static const sal_Int16 supportedIndexTable[] = { XlBordersIndex::xlEdgeLeft, XlBordersIndex::xlEdgeTop, XlBordersIndex::xlEdgeBottom, XlBordersIndex::xlEdgeRight, XlBordersIndex::xlDiagonalDown, XlBordersIndex::xlDiagonalUp, XlBordersIndex::xlInsideVertical, XlBordersIndex::xlInsideHorizontal };
-const static OUString sTableBorder("TableBorder");
+static const char sTableBorder[] = "TableBorder";
// Equiv widths in in 1/100 mm
const static sal_Int32 OOLineThin = 35;
diff --git a/sc/source/ui/vba/vbaformatconditions.cxx b/sc/source/ui/vba/vbaformatconditions.cxx
index 78df56657493..b8b74e070abe 100644
--- a/sc/source/ui/vba/vbaformatconditions.cxx
+++ b/sc/source/ui/vba/vbaformatconditions.cxx
@@ -32,11 +32,11 @@ using namespace ::com::sun::star;
typedef std::vector< beans::PropertyValue > VecPropValues;
-static OUString OPERATOR("Operator");
-static OUString FORMULA1("Formula1");
-static OUString FORMULA2("Formula2");
-static OUString STYLENAME("StyleName");
-static OUString sStyleNamePrefix("Excel_CondFormat");
+static const char OPERATOR[] = "Operator";
+static const char FORMULA1[] = "Formula1";
+static const char FORMULA2[] = "Formula2";
+static const char STYLENAME[] = "StyleName";
+static const char sStyleNamePrefix[] = "Excel_CondFormat";
void SAL_CALL
ScVbaFormatConditions::Delete( ) throw (script::BasicErrorException, uno::RuntimeException, std::exception)
diff --git a/sc/source/ui/vba/vbainterior.cxx b/sc/source/ui/vba/vbainterior.cxx
index d75d3fce5945..fa839cc57890 100644
--- a/sc/source/ui/vba/vbainterior.cxx
+++ b/sc/source/ui/vba/vbainterior.cxx
@@ -47,9 +47,9 @@ typedef std::pair< sal_Int32, sal_Int32 > PatternPair;
using namespace ::com::sun::star;
using namespace ::ooo::vba;
using namespace ::ooo::vba::excel::XlPattern;
-static const OUString BACKCOLOR( "CellBackColor" );
-static const OUString PATTERN( "Pattern" );
-static const OUString PATTERNCOLOR( "PatternColor" );
+static const char BACKCOLOR[] = "CellBackColor";
+static const char PATTERN[] = "Pattern";
+static const char PATTERNCOLOR[] = "PatternColor";
static PatternMap lcl_getPatternMap()
{
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index ebfad21db197..a06ca8e24423 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -689,19 +689,19 @@ public:
}
};
-const static OUString ISVISIBLE( "IsVisible");
-const static OUString POSITION( "Position");
-const static OUString EQUALS( "=" );
-const static OUString NOTEQUALS( "<>" );
-const static OUString GREATERTHAN( ">" );
-const static OUString GREATERTHANEQUALS( ">=" );
-const static OUString LESSTHAN( "<" );
-const static OUString LESSTHANEQUALS( "<=" );
-const static OUString CONTS_HEADER( "ContainsHeader" );
-const static OUString INSERTPAGEBREAKS( "InsertPageBreaks" );
-const static OUString STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY( "The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again" );
-const static OUString STR_ERRORMESSAGE_NOCELLSWEREFOUND( "No cells were found" );
-const static OUString CELLSTYLE( "CellStyle" );
+static const char ISVISIBLE[] = "IsVisible";
+static const char POSITION[] = "Position";
+static const char EQUALS[] = "=";
+static const char NOTEQUALS[] = "<>";
+static const char GREATERTHAN[] = ">";
+static const char GREATERTHANEQUALS[] = ">=";
+static const char LESSTHAN[] = "<";
+static const char LESSTHANEQUALS[] = "<=";
+static const char CONTS_HEADER[] = "ContainsHeader";
+static const char INSERTPAGEBREAKS[] = "InsertPageBreaks";
+static const char STR_ERRORMESSAGE_APPLIESTOSINGLERANGEONLY[] = "The command you chose cannot be performed with multiple selections.\nSelect a single range and click the command again";
+static const char STR_ERRORMESSAGE_NOCELLSWEREFOUND[] = "No cells were found";
+static const char CELLSTYLE[] = "CellStyle";
class CellValueSetter : public ValueSetter
{
@@ -980,7 +980,7 @@ public:
};
-const static OUString sNA("#N/A");
+static const char sNA[] = "#N/A";
class Dim1ArrayValueSetter : public ArrayVisitor
{
@@ -998,7 +998,7 @@ public:
if ( y < nColCount )
mCellValueSetter.processValue( aMatrix[ y ], xCell );
else
- mCellValueSetter.processValue( uno::makeAny( sNA ), xCell );
+ mCellValueSetter.processValue( uno::makeAny( OUString(sNA) ), xCell );
}
};
@@ -1021,7 +1021,7 @@ public:
if ( x < nRowCount && y < nColCount )
mCellValueSetter.processValue( aMatrix[ x ][ y ], xCell );
else
- mCellValueSetter.processValue( uno::makeAny( sNA ), xCell );
+ mCellValueSetter.processValue( uno::makeAny( OUString(sNA) ), xCell );
}
};
@@ -3725,8 +3725,7 @@ ScVbaRange::createEnumeration() throw (uno::RuntimeException, std::exception)
OUString SAL_CALL
ScVbaRange::getDefaultMethodName( ) throw (uno::RuntimeException, std::exception)
{
- const static OUString sName( "Item" );
- return sName;
+ return OUString( "Item" );
}
// returns calc internal col. width ( in points )
@@ -4210,7 +4209,7 @@ ScVbaRange::ApplicationRange( const uno::Reference< uno::XComponentContext >& xC
Cell1 >>= sRangeName;
if ( Cell1.hasValue() && !Cell2.hasValue() && !sRangeName.isEmpty() )
{
- const static OUString sNamedRanges( "NamedRanges");
+ static const char sNamedRanges[] = "NamedRanges";
uno::Reference< beans::XPropertySet > xPropSet( getCurrentExcelDoc(xContext), uno::UNO_QUERY_THROW );
uno::Reference< container::XNameAccess > xNamed( xPropSet->getPropertyValue( sNamedRanges ), uno::UNO_QUERY_THROW );
@@ -4302,12 +4301,12 @@ static void lcl_setTableFieldsFromCriteria( OUString& sCriteria1, uno::Reference
bool bIsNumeric = false;
if ( sCriteria1.startsWith( EQUALS ) )
{
- if ( sCriteria1.getLength() == EQUALS.getLength() )
+ if ( sCriteria1.getLength() == (sal_Int32)strlen(EQUALS) )
rFilterField.Operator = sheet::FilterOperator2::EMPTY;
else
{
rFilterField.Operator = sheet::FilterOperator2::EQUAL;
- sCriteria1 = sCriteria1.copy( EQUALS.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(EQUALS) );
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
@@ -4317,12 +4316,12 @@ static void lcl_setTableFieldsFromCriteria( OUString& sCriteria1, uno::Reference
}
else if ( sCriteria1.startsWith( NOTEQUALS ) )
{
- if ( sCriteria1.getLength() == NOTEQUALS.getLength() )
+ if ( sCriteria1.getLength() == (sal_Int32)strlen(NOTEQUALS) )
rFilterField.Operator = sheet::FilterOperator2::NOT_EMPTY;
else
{
rFilterField.Operator = sheet::FilterOperator2::NOT_EQUAL;
- sCriteria1 = sCriteria1.copy( NOTEQUALS.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(NOTEQUALS) );
sCriteria1 = VBAToRegexp( sCriteria1 );
// UseRegularExpressions
if ( xDescProps.is() )
@@ -4334,12 +4333,12 @@ static void lcl_setTableFieldsFromCriteria( OUString& sCriteria1, uno::Reference
bIsNumeric = true;
if ( sCriteria1.startsWith( GREATERTHANEQUALS ) )
{
- sCriteria1 = sCriteria1.copy( GREATERTHANEQUALS.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(GREATERTHANEQUALS) );
rFilterField.Operator = sheet::FilterOperator2::GREATER_EQUAL;
}
else
{
- sCriteria1 = sCriteria1.copy( GREATERTHAN.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(GREATERTHAN) );
rFilterField.Operator = sheet::FilterOperator2::GREATER;
}
@@ -4349,12 +4348,12 @@ static void lcl_setTableFieldsFromCriteria( OUString& sCriteria1, uno::Reference
bIsNumeric = true;
if ( sCriteria1.startsWith( LESSTHANEQUALS ) )
{
- sCriteria1 = sCriteria1.copy( LESSTHANEQUALS.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(LESSTHANEQUALS) );
rFilterField.Operator = sheet::FilterOperator2::LESS_EQUAL;
}
else
{
- sCriteria1 = sCriteria1.copy( LESSTHAN.getLength() );
+ sCriteria1 = sCriteria1.copy( strlen(LESSTHAN) );
rFilterField.Operator = sheet::FilterOperator2::LESS;
}
@@ -5605,7 +5604,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException, std::exception)
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
- static OUString FunctionName( "IsError" );
+ static const char FunctionName[] = "IsError";
uno::Sequence< uno::Any > Params(1);
uno::Reference< excel::XRange > aRange( this );
Params[0] = uno::makeAny( aRange );
diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx
index 173a0c6652f9..09181f83db5b 100644
--- a/sc/source/ui/vba/vbastyle.cxx
+++ b/sc/source/ui/vba/vbastyle.cxx
@@ -23,7 +23,7 @@
using namespace ::ooo::vba;
using namespace ::com::sun::star;
-static OUString DISPLAYNAME("DisplayName");
+static const char DISPLAYNAME[] = "DisplayName";
uno::Reference< container::XNameAccess >
ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException )
diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx
index d6090a877a1e..85729b5612d5 100644
--- a/sc/source/ui/vba/vbawindow.cxx
+++ b/sc/source/ui/vba/vbawindow.cxx
@@ -301,11 +301,11 @@ ScVbaWindow::ScrollWorkbookTabs( const uno::Any& /*Sheets*/, const uno::Any& /*P
uno::Any SAL_CALL
ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception)
{
- static OUString sCrud(" - OpenOffice.org Calc" );
- static sal_Int32 nCrudLen = sCrud.getLength();
+ static const char sCrud[] = " - OpenOffice.org Calc";
+ static const sal_Int32 nCrudLen = strlen(sCrud);
OUString sTitle;
- getFrameProps()->getPropertyValue( OUString( SC_UNONAME_TITLE ) ) >>= sTitle;
+ getFrameProps()->getPropertyValue( SC_UNONAME_TITLE ) >>= sTitle;
sal_Int32 nCrudIndex = sTitle.indexOf( sCrud );
// adjust title ( by removing crud )
// sCrud string present
@@ -326,7 +326,7 @@ ScVbaWindow::getCaption() throw (uno::RuntimeException, std::exception)
if ( !sTitle.equals( sName ) )
{
- static OUString sDot(".");
+ static const char sDot[] = ".";
// starts with title
if ( sName.startsWith( sTitle ) )
// extention starts immediately after
diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx
index 98a3f74cdd32..fc36732a557b 100644
--- a/sc/source/ui/vba/vbaworkbooks.cxx
+++ b/sc/source/ui/vba/vbaworkbooks.cxx
@@ -235,7 +235,7 @@ ScVbaWorkbooks::Open( const OUString& rFileName, const uno::Any& /*UpdateLinks*/
sProps.realloc( 3 );
sProps[ nIndex ].Name = "FilterOptions";
sal_Int16 delims[] = { 0 /*default not used*/, 9/*tab*/, 44/*comma*/, 32/*space*/, 59/*semicolon*/ };
- static OUString sRestOfFormat(",34,0,1" );
+ static const char sRestOfFormat[] = ",34,0,1";
OUString sFormat;
sal_Int16 nFormat = 0; // default indicator
diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx
index ccf2d02c5667..49b8c7f6d5ee 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -110,7 +110,7 @@ static void getNewSpreadsheetName (OUString &aNewName, const OUString& aOldName,
{
if (!xSpreadDoc.is())
throw lang::IllegalArgumentException( "getNewSpreadsheetName() xSpreadDoc is null", uno::Reference< uno::XInterface >(), 1 );
- static OUString aUnderScore( "_" );
+ static const char aUnderScore[] = "_";
int currentNum =2;
aNewName = aOldName + aUnderScore + OUString::number(currentNum) ;
SCTAB nTab = 0;
diff --git a/scaddins/source/analysis/analysis.cxx b/scaddins/source/analysis/analysis.cxx
index d1751f4fac40..63a532a1f56f 100644
--- a/scaddins/source/analysis/analysis.cxx
+++ b/scaddins/source/analysis/analysis.cxx
@@ -347,7 +347,7 @@ OUString SAL_CALL AnalysisAddIn::getArgumentDescription( const OUString& aName,
return aRet;
}
-static const OUString pDefCatName("Add-In");
+static const char pDefCatName[] = "Add-In";
OUString SAL_CALL AnalysisAddIn::getProgrammaticCategoryName( const OUString& aName ) throw( uno::RuntimeException, std::exception )
{
diff --git a/scripting/source/dlgprov/dlgevtatt.cxx b/scripting/source/dlgprov/dlgevtatt.cxx
index cc7bd099874e..30ac109cf683 100644
--- a/scripting/source/dlgprov/dlgevtatt.cxx
+++ b/scripting/source/dlgprov/dlgevtatt.cxx
@@ -546,9 +546,9 @@ namespace dlgprov
void DialogUnoScriptListenerImpl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
{
- static OUString sUnoURLScheme("vnd.sun.star.UNO:");
+ static const char sUnoURLScheme[] = "vnd.sun.star.UNO:";
- OUString aMethodName = aScriptEvent.ScriptCode.copy( sUnoURLScheme.getLength() );
+ OUString aMethodName = aScriptEvent.ScriptCode.copy( strlen(sUnoURLScheme) );
const Any* pArguments = aScriptEvent.Arguments.getConstArray();
Any aEventObject = pArguments[0];
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index cc821c675e47..38294297cc75 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -88,7 +88,7 @@ namespace dlgprov
{
-static OUString aResourceResolverPropName("ResourceResolver");
+static const char aResourceResolverPropName[] = "ResourceResolver";
Reference< resource::XStringResourceManager > lcl_getStringResourceManager(const Reference< XComponentContext >& i_xContext,const OUString& i_sURL)
{
@@ -166,37 +166,18 @@ static OUString aResourceResolverPropName("ResourceResolver");
static OUString getImplementationName_DialogProviderImpl()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.scripting.DialogProvider" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.scripting.DialogProvider" );
}
static Sequence< OUString > getSupportedServiceNames_DialogProviderImpl()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(3);
- aNames[0] = "com.sun.star.awt.DialogProvider";
- aNames[1] = "com.sun.star.awt.DialogProvider2";
- aNames[2] = "com.sun.star.awt.ContainerWindowProvider";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(3);
+ aNames[0] = "com.sun.star.awt.DialogProvider";
+ aNames[1] = "com.sun.star.awt.DialogProvider2";
+ aNames[2] = "com.sun.star.awt.ContainerWindowProvider";
+ return aNames;
}
@@ -645,8 +626,8 @@ static OUString aResourceResolverPropName("ResourceResolver");
// XDialogProvider
- static OUString aDecorationPropName("Decoration");
- static OUString aTitlePropName("Title");
+ static const char aDecorationPropName[] = "Decoration";
+ static const char aTitlePropName[] = "Title";
Reference < XControl > DialogProviderImpl::createDialogImpl(
const OUString& URL, const Reference< XInterface >& xHandler,
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index 0e3bfce52416..cde4e730a24d 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -798,7 +798,7 @@ Sequence< OUString > StringResourcePersistenceImpl::getSupportedServiceNames( )
// XInitialization base functionality for derived classes
-static OUString aNameBaseDefaultStr("strings");
+static const char aNameBaseDefaultStr[] = "strings";
void StringResourcePersistenceImpl::implInitializeCommonParameters
( const Sequence< Any >& aArguments )
@@ -1809,7 +1809,7 @@ OUString implGetNameScemeForLocaleItem( const LocaleItem* pLocaleItem )
* also appends Variant, which can't be blindly changed as it would
* violate the naming scheme in use. */
- static OUString aUnder("_");
+ static const char aUnder[] = "_";
OSL_ENSURE( pLocaleItem,
"StringResourcePersistenceImpl::implGetNameScemeForLocaleItem(): pLocaleItem == NULL" );
@@ -2183,8 +2183,8 @@ void implWriteStringWithEncoding( const OUString& aStr,
bool StringResourcePersistenceImpl::implWritePropertiesFile( LocaleItem* pLocaleItem,
const Reference< io::XOutputStream >& xOutputStream, const OUString& aComment )
{
- static OUString aAssignmentStr("=");
- static OUString aLineFeedStr("\n");
+ static const char aAssignmentStr[] = "=";
+ static const char aLineFeedStr[] = "\n";
if( !xOutputStream.is() || pLocaleItem == NULL )
return false;
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index c5fe35169a6f..d0b97dbf0330 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -95,8 +95,8 @@ using namespace ::com::sun::star::uno;
using namespace ::ooo::vba;
// Some constants
-const static OUString DELIM("::");
-const static sal_Int32 DELIMLEN = DELIM.getLength();
+static const char DELIM[] = "::";
+static const sal_Int32 DELIMLEN = strlen(DELIM);
bool isKeyEventOk( awt::KeyEvent& evt, const Sequence< Any >& params )
{
@@ -1058,17 +1058,7 @@ namespace evtlstner
{
OUString SAL_CALL getImplementationName()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "ooo.vba.EventListener" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "ooo.vba.EventListener" );
}
uno::Reference< XInterface > SAL_CALL create(
@@ -1087,17 +1077,7 @@ namespace ooevtdescgen
{
OUString SAL_CALL getImplementationName()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "ooo.vba.VBAToOOEventDesc" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "ooo.vba.VBAToOOEventDesc" );
}
uno::Reference< XInterface > SAL_CALL create(
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index dc0a6fcf7dd0..939751a533b1 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -3575,9 +3575,9 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
{
try
{
- static const OUString sModel( "Model" );
- static const OUString sWidth( "Width" );
- static const OUString sHeight( "Height" );
+ static const char sModel[] = "Model";
+ static const char sWidth[] = "Width";
+ static const char sHeight[] = "Height";
uno::Reference< table::XTable > xTable;
if ( mXPropSet->getPropertyValue( sModel ) >>= xTable )
@@ -3717,10 +3717,10 @@ void PPTWriter::ImplCreateTable( uno::Reference< drawing::XShape >& rXShape, Esc
}
}
- static const OUString sTopBorder( "TopBorder" );
- static const OUString sBottomBorder( "BottomBorder" );
- static const OUString sLeftBorder( "LeftBorder" );
- static const OUString sRightBorder( "RightBorder" );
+ static const char sTopBorder[] = "TopBorder";
+ static const char sBottomBorder[] = "BottomBorder";
+ static const char sLeftBorder[] = "LeftBorder";
+ static const char sRightBorder[] = "RightBorder";
// creating horz lines
for( sal_Int32 nLine = 0; nLine < ( xRows->getCount() + 1 ); nLine++ )
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 26d4697752cf..cc3a5450e0e3 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -413,8 +413,7 @@ OUString SAL_CALL
// ...and add additional names.
aServiceNames.realloc (nCount + 1);
- static const OUString sAdditionalServiceName ("com.sun.star.drawing.AccessibleDrawDocumentView");
- aServiceNames[nCount] = sAdditionalServiceName;
+ aServiceNames[nCount] = "com.sun.star.drawing.AccessibleDrawDocumentView";
return aServiceNames;
}
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 235ddb884e3b..4f7b7577e952 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -48,15 +48,13 @@ using namespace ::com::sun::star::uno;
namespace {
-static const OUString& GetPathToImpressConfigurationRoot (void)
+static OUString GetPathToImpressConfigurationRoot()
{
- static const OUString sPathToImpressConfigurationRoot ("/org.openoffice.Office.Impress/");
- return sPathToImpressConfigurationRoot;
+ return OUString("/org.openoffice.Office.Impress/");
}
-static const OUString& GetPathToSetNode (void)
+static OUString GetPathToSetNode()
{
- static const OUString sPathToSetNode("MultiPaneGUI/ToolPanel/RecentlyUsedMasterPages");
- return sPathToSetNode;
+ return OUString("MultiPaneGUI/ToolPanel/RecentlyUsedMasterPages");
}
} // end of anonymous namespace
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
index 0de992a6b0a4..5bab786f43fd 100644
--- a/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsCacheCompactor.cxx
@@ -81,11 +81,11 @@ namespace sd { namespace slidesorter { namespace cache {
BitmapCache& rCache,
sal_Int32 nMaximalCacheSize)
{
- static const OUString sNone ("None");
- static const OUString sCompress ("Compress");
- static const OUString sErase ("Erase");
- static const OUString sResolution ("ResolutionReduction");
- static const OUString sPNGCompression ("PNGCompression");
+ static const char sNone[] = "None";
+ static const char sCompress[] = "Compress";
+ static const char sErase[] = "Erase";
+ static const char sResolution[] = "ResolutionReduction";
+ static const char sPNGCompression[] = "PNGCompression";
::boost::shared_ptr<BitmapCompressor> pCompressor;
OUString sCompressionPolicy(sPNGCompression);
diff --git a/sd/source/ui/slidesorter/controller/SlsListener.cxx b/sd/source/ui/slidesorter/controller/SlsListener.cxx
index 58e890340bae..bdb30bd56c14 100644
--- a/sd/source/ui/slidesorter/controller/SlsListener.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsListener.cxx
@@ -454,8 +454,8 @@ void SAL_CALL Listener::propertyChange (
{
ThrowIfDisposed();
- static const OUString sCurrentPagePropertyName ("CurrentPage");
- static const OUString sEditModePropertyName ("IsMasterPageMode");
+ static const char sCurrentPagePropertyName[] = "CurrentPage";
+ static const char sEditModePropertyName[] = "IsMasterPageMode";
if (rEvent.PropertyName.equals(sCurrentPagePropertyName))
{
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index 620e7a276368..7f23711a450c 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -211,7 +211,7 @@ OUString SAL_CALL DrawController::getImplementationName( ) throw(RuntimeExcepti
return OUString("DrawController") ;
}
-static OUString ssServiceName( "com.sun.star.drawing.DrawingDocumentDrawView");
+static const char ssServiceName[] = "com.sun.star.drawing.DrawingDocumentDrawView";
sal_Bool SAL_CALL DrawController::supportsService (const OUString& rsServiceName)
throw(RuntimeException, std::exception)
diff --git a/sdext/source/minimizer/configurationaccess.cxx b/sdext/source/minimizer/configurationaccess.cxx
index 9dce6f12fbbe..d95bc522219f 100644
--- a/sdext/source/minimizer/configurationaccess.cxx
+++ b/sdext/source/minimizer/configurationaccess.cxx
@@ -33,10 +33,9 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::container;
-static const OUString& GetPathToConfigurationRoot (void)
+static OUString GetPathToConfigurationRoot()
{
- static const OUString sPathToConfigurationRoot ("org.openoffice.Office.PresentationMinimizer");
- return sPathToConfigurationRoot;
+ return OUString("org.openoffice.Office.PresentationMinimizer");
}
void OptimizerSettings::LoadSettingsFromConfiguration( const Reference< XNameAccess >& rSettings )
diff --git a/sdext/source/pdfimport/sax/saxattrlist.cxx b/sdext/source/pdfimport/sax/saxattrlist.cxx
index f42a70369c05..2ec4da5ff431 100644
--- a/sdext/source/pdfimport/sax/saxattrlist.cxx
+++ b/sdext/source/pdfimport/sax/saxattrlist.cxx
@@ -48,10 +48,9 @@ SaxAttrList::~SaxAttrList()
}
namespace {
- static const OUString& getCDATAString()
+ static OUString getCDATAString()
{
- static OUString aStr( "CDATA" );
- return aStr;
+ return OUString( "CDATA" );
}
}
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index 0462c286bc71..79d64fdf1bbf 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -681,10 +681,10 @@ uno::Sequence<beans::PropertyValue> Parser::readImageImpl()
static const OString aPbmMarker( "PBM" );
static const OString aPpmMarker( "PPM" );
static const OString aPngMarker( "PNG" );
- static const OUString aJpegFile( "DUMMY.JPEG" );
- static const OUString aPbmFile( "DUMMY.PBM" );
- static const OUString aPpmFile( "DUMMY.PPM" );
- static const OUString aPngFile( "DUMMY.PNG" );
+ static const char aJpegFile[] = "DUMMY.JPEG";
+ static const char aPbmFile[] = "DUMMY.PBM";
+ static const char aPpmFile[] = "DUMMY.PPM";
+ static const char aPngFile[] = "DUMMY.PNG";
OString aToken = readNextToken();
const sal_Int32 nImageSize( readInt32() );
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 2fa68ad8cd9a..a2d5d487fd96 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -143,9 +143,8 @@ Sequence< OUString > SAL_CALL SfxTerminateListener_Impl::getSupportedServiceName
// The desktop must know, which listener will terminate the SfxApplication in real !
// It must call this special listener as last one ... otherwise we shutdown the SfxApplication BEFORE other listener
// can react ...
- static const OUString SERVICENAME("com.sun.star.frame.TerminateListener");
Sequence< OUString > lNames(1);
- lNames[0] = SERVICENAME;
+ lNames[0] = "com.sun.star.frame.TerminateListener";
return lNames;
}
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e2477009b557..29a47a0609d0 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -906,10 +906,9 @@ namespace
return _pFallback;
}
- const OUString& lcl_getBasicIDEServiceName()
+ static OUString lcl_getBasicIDEServiceName()
{
- static const OUString s_sBasicName( "com.sun.star.script.BasicIDE" );
- return s_sBasicName;
+ return OUString( "com.sun.star.script.BasicIDE");
}
SfxViewFrame* lcl_getBasicIDEViewFrame( SfxObjectShell* i_pBasicIDE )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index c95842da425b..18da893e5823 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -132,9 +132,9 @@ namespace
const OUString* GetLastFilterConfigId( FileDialogHelper::Context _eContext )
{
- static const OUString aSD_EXPORT_IDENTIFIER( "SdExportLastFilter" );
- static const OUString aSI_EXPORT_IDENTIFIER( "SiExportLastFilter" );
- static const OUString aSW_EXPORT_IDENTIFIER( "SwExportLastFilter" );
+ static const OUString aSD_EXPORT_IDENTIFIER("SdExportLastFilter");
+ static const OUString aSI_EXPORT_IDENTIFIER("SiExportLastFilter");
+ static const OUString aSW_EXPORT_IDENTIFIER("SwExportLastFilter");
const OUString* pRet = NULL;
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index b9af92d7c0f3..634d323f5e79 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -152,8 +152,8 @@ namespace sfx2
void lcl_ReadFilterClass( const OConfigurationNode& _rClassesNode, const OUString& _rLogicalClassName,
FilterClass& /* [out] */ _rClass )
{
- static const OUString sDisplaNameNodeName( "DisplayName" );
- static const OUString sSubFiltersNodeName( "Filters" );
+ static const char sDisplaNameNodeName[] = "DisplayName";
+ static const char sSubFiltersNodeName[] = "Filters";
// the description node for the current class
OConfigurationNode aClassDesc = _rClassesNode.openNode( _rLogicalClassName );
@@ -403,11 +403,9 @@ namespace sfx2
static const sal_Unicode s_cWildcardSeparator( ';' );
-
- const OUString& getSeparatorString()
+ static OUString getSeparatorString()
{
- static OUString s_sSeparatorString( &s_cWildcardSeparator, 1 );
- return s_sSeparatorString;
+ return OUString(";");
}
@@ -1177,9 +1175,9 @@ namespace sfx2
const OUString& _rExtension,
bool _bForOpen, FileDialogHelper_Impl& _rFileDlgImpl )
{
- static OUString sAllFilter( "(*.*)" );
- static OUString sOpenBracket( " (" );
- static OUString sCloseBracket( ")" );
+ static const char sAllFilter[] = "(*.*)";
+ static const char sOpenBracket[] = " (";
+ static const char sCloseBracket[] = ")";
OUString sRet = _rDisplayText;
if ( sRet.indexOf( sAllFilter ) == -1 )
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index fc3d48bdf7f4..55dd58283252 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -188,15 +188,15 @@ void SfxObjectFactory::SetModule_Impl( SfxModule *pMod )
void SfxObjectFactory::SetSystemTemplate( const OUString& rServiceName, const OUString& rTemplateName )
{
static const int nMaxPathSize = 16000;
- static OUString SERVICE_FILTER_FACTORY("com.sun.star.document.FilterFactory");
- static OUString SERVICE_TYPE_DECTECTION("com.sun.star.document.TypeDetection");
+ static const char SERVICE_FILTER_FACTORY[] = "com.sun.star.document.FilterFactory";
+ static const char SERVICE_TYPE_DECTECTION[] = "com.sun.star.document.TypeDetection";
- static OUString CONF_ROOT("/org.openoffice.Setup");
- static OUString CONF_PATH = "Office/Factories/" + rServiceName;
- static OUString PROP_DEF_TEMPL_CHANGED("ooSetupFactorySystemDefaultTemplateChanged");
- static OUString PROP_ACTUAL_FILTER("ooSetupFactoryActualFilter");
+ static const char CONF_ROOT[] = "/org.openoffice.Setup";
+ OUString CONF_PATH = "Office/Factories/" + rServiceName;
+ static const char PROP_DEF_TEMPL_CHANGED[] = "ooSetupFactorySystemDefaultTemplateChanged";
+ static const char PROP_ACTUAL_FILTER[] = "ooSetupFactoryActualFilter";
- static OUString DEF_TPL_STR("/soffice.");
+ static const char DEF_TPL_STR[] = "/soffice.";
OUString sURL;
OUString sPath;
diff --git a/svgio/inc/svgio/svgreader/svgtoken.hxx b/svgio/inc/svgio/svgreader/svgtoken.hxx
index 8d6084776488..e755449ea0e0 100644
--- a/svgio/inc/svgio/svgreader/svgtoken.hxx
+++ b/svgio/inc/svgio/svgreader/svgtoken.hxx
@@ -186,8 +186,8 @@ namespace svgio
SVGToken StrToSVGToken(const OUString& rStr, bool bCaseIndependent);
- const OUString& getStrTitle();
- const OUString& getStrDesc();
+ const OUString getStrTitle();
+ const OUString getStrDesc();
} // end of namespace svgreader
} // end of namespace svgio
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index 9d90bbcb6a46..989847433104 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -23,145 +23,145 @@ namespace svgio
{
namespace svgreader
{
- static OUString aSVGStrWidth("width");
- static OUString aSVGStrHeight("height");
- static OUString aSVGStrViewBox("viewBox");
- static OUString aSVGStrTransform("transform");
- static OUString aSVGStrStyle("style");
- static OUString aSVGStrDisplay("display"); // #i121656#
- static OUString aSVGStrD("d");
- static OUString aSVGStrX("x");
- static OUString aSVGStrY("y");
- static OUString aSVGStrXmlns("xmlns");
- static OUString aSVGStrVersion("version");
- static OUString aSVGStrId("id");
- static OUString aSVGStrRx("rx");
- static OUString aSVGStrRy("ry");
- static OUString aSVGStrPoints("points");
- static OUString aSVGStrDx("dx");
- static OUString aSVGStrDy("dy");
- static OUString aSVGStrRotate("rotate");
- static OUString aSVGStrTextLength("textLength");
- static OUString aSVGStrLengthAdjust("lengthAdjust");
- static OUString aSVGStrFont("font");
- static OUString aSVGStrFontFamily("font-family");
- static OUString aSVGStrFontSize("font-size");
- static OUString aSVGStrFontSizeAdjust("font-size-adjust");
- static OUString aSVGStrFontStretch("font-stretch");
- static OUString aSVGStrFontStyle("font-style");
- static OUString aSVGStrFontVariant("font-variant");
- static OUString aSVGStrFontWeight("font-weight");
- static OUString aSVGStrDirection("direction");
- static OUString aSVGStrLetterSpacing("letter-spacing");
- static OUString aSVGStrTextDecoration("text-decoration");
- static OUString aSVGStrUnicodeBidi("unicode-bidi");
- static OUString aSVGStrWordSpacing("word-spacing");
- static OUString aSVGStrTspan("tspan");
- static OUString aSVGStrTref("tref");
- static OUString aSVGStrTextPath("textPath");
- static OUString aSVGStrStartOffset("startOffset");
- static OUString aSVGStrMethod("method");
- static OUString aSVGStrSpacing("spacing");
- static OUString aSVGStrTextAlign("text-align");
- static OUString aSVGStrPathLength("pathLength");
- static OUString aSVGStrType("type");
- static OUString aSVGStrClass("class");
- static OUString aSVGStrTextAnchor("text-anchor");
- static OUString aSVGStrXmlSpace("xml:space");
- static OUString aSVGStrColor("color");
- static OUString aSVGStrClipPathNode("clipPath");
- static OUString aSVGStrClipPathProperty("clip-path");
- static OUString aSVGStrMask("mask");
- static OUString aSVGStrClipPathUnits("clipPathUnits");
- static OUString aSVGStrMaskUnits("maskUnits");
- static OUString aSVGStrMaskContentUnits("maskContentUnits");
- static OUString aSVGStrClipRule("clip-rule");
- static OUString aSVGStrMarker("marker");
- static OUString aSVGStrMarkerStart("marker-start");
- static OUString aSVGStrMarkerMid("marker-mid");
- static OUString aSVGStrMarkerEnd("marker-end");
- static OUString aSVGStrRefX("refX");
- static OUString aSVGStrRefY("refY");
- static OUString aSVGStrMarkerUnits("markerUnits");
- static OUString aSVGStrMarkerWidth("markerWidth");
- static OUString aSVGStrMarkerHeight("markerHeight");
- static OUString aSVGStrOrient("orient");
- static OUString aSVGStrPattern("pattern");
- static OUString aSVGStrPatternUnits("patternUnits");
- static OUString aSVGStrPatternContentUnits("patternContentUnits");
- static OUString aSVGStrPatternTransform("patternTransform");
- static OUString aSVGStrOpacity("opacity");
- static OUString aSVGStrVisibility("visibility");
- static OUString aSVGStrTitle("title");
- static OUString aSVGStrDesc("desc");
+ static const char aSVGStrWidth[] = "width";
+ static const char aSVGStrHeight[] = "height";
+ static const char aSVGStrViewBox[] = "viewBox";
+ static const char aSVGStrTransform[] = "transform";
+ static const char aSVGStrStyle[] = "style";
+ static const char aSVGStrDisplay[] = "display"; // #i121656#
+ static const char aSVGStrD[] = "d";
+ static const char aSVGStrX[] = "x";
+ static const char aSVGStrY[] = "y";
+ static const char aSVGStrXmlns[] = "xmlns";
+ static const char aSVGStrVersion[] = "version";
+ static const char aSVGStrId[] = "id";
+ static const char aSVGStrRx[] = "rx";
+ static const char aSVGStrRy[] = "ry";
+ static const char aSVGStrPoints[] = "points";
+ static const char aSVGStrDx[] = "dx";
+ static const char aSVGStrDy[] = "dy";
+ static const char aSVGStrRotate[] = "rotate";
+ static const char aSVGStrTextLength[] = "textLength";
+ static const char aSVGStrLengthAdjust[] = "lengthAdjust";
+ static const char aSVGStrFont[] = "font";
+ static const char aSVGStrFontFamily[] = "font-family";
+ static const char aSVGStrFontSize[] = "font-size";
+ static const char aSVGStrFontSizeAdjust[] = "font-size-adjust";
+ static const char aSVGStrFontStretch[] = "font-stretch";
+ static const char aSVGStrFontStyle[] = "font-style";
+ static const char aSVGStrFontVariant[] = "font-variant";
+ static const char aSVGStrFontWeight[] = "font-weight";
+ static const char aSVGStrDirection[] = "direction";
+ static const char aSVGStrLetterSpacing[] = "letter-spacing";
+ static const char aSVGStrTextDecoration[] = "text-decoration";
+ static const char aSVGStrUnicodeBidi[] = "unicode-bidi";
+ static const char aSVGStrWordSpacing[] = "word-spacing";
+ static const char aSVGStrTspan[] = "tspan";
+ static const char aSVGStrTref[] = "tref";
+ static const char aSVGStrTextPath[] = "textPath";
+ static const char aSVGStrStartOffset[] = "startOffset";
+ static const char aSVGStrMethod[] = "method";
+ static const char aSVGStrSpacing[] = "spacing";
+ static const char aSVGStrTextAlign[] = "text-align";
+ static const char aSVGStrPathLength[] = "pathLength";
+ static const char aSVGStrType[] = "type";
+ static const char aSVGStrClass[] = "class";
+ static const char aSVGStrTextAnchor[] = "text-anchor";
+ static const char aSVGStrXmlSpace[] = "xml:space";
+ static const char aSVGStrColor[] = "color";
+ static const char aSVGStrClipPathNode[] = "clipPath";
+ static const char aSVGStrClipPathProperty[] = "clip-path";
+ static const char aSVGStrMask[] = "mask";
+ static const char aSVGStrClipPathUnits[] = "clipPathUnits";
+ static const char aSVGStrMaskUnits[] = "maskUnits";
+ static const char aSVGStrMaskContentUnits[] = "maskContentUnits";
+ static const char aSVGStrClipRule[] = "clip-rule";
+ static const char aSVGStrMarker[] = "marker";
+ static const char aSVGStrMarkerStart[] = "marker-start";
+ static const char aSVGStrMarkerMid[] = "marker-mid";
+ static const char aSVGStrMarkerEnd[] = "marker-end";
+ static const char aSVGStrRefX[] = "refX";
+ static const char aSVGStrRefY[] = "refY";
+ static const char aSVGStrMarkerUnits[] = "markerUnits";
+ static const char aSVGStrMarkerWidth[] = "markerWidth";
+ static const char aSVGStrMarkerHeight[] = "markerHeight";
+ static const char aSVGStrOrient[] = "orient";
+ static const char aSVGStrPattern[] = "pattern";
+ static const char aSVGStrPatternUnits[] = "patternUnits";
+ static const char aSVGStrPatternContentUnits[] = "patternContentUnits";
+ static const char aSVGStrPatternTransform[] = "patternTransform";
+ static const char aSVGStrOpacity[] = "opacity";
+ static const char aSVGStrVisibility[] = "visibility";
+ static const char aSVGStrTitle[] = "title";
+ static const char aSVGStrDesc[] = "desc";
- static OUString aSVGStrPreserveAspectRatio("preserveAspectRatio");
- static OUString aSVGStrDefer("defer");
- static OUString aSVGStrNone("none");
- static OUString aSVGStrXMinYMin("xMinYMin");
- static OUString aSVGStrXMidYMin("xMidYMin");
- static OUString aSVGStrXMaxYMin("xMaxYMin");
- static OUString aSVGStrXMinYMid("xMinYMid");
- static OUString aSVGStrXMidYMid("xMidYMid");
- static OUString aSVGStrXMaxYMid("xMaxYMid");
- static OUString aSVGStrXMinYMax("xMinYMax");
- static OUString aSVGStrXMidYMax("xMidYMax");
- static OUString aSVGStrXMaxYMax("xMaxYMax");
- static OUString aSVGStrMeet("meet");
- static OUString aSVGStrSlice("slice");
+ static const char aSVGStrPreserveAspectRatio[] = "preserveAspectRatio";
+ static const char aSVGStrDefer[] = "defer";
+ static const char aSVGStrNone[] = "none";
+ static const char aSVGStrXMinYMin[] = "xMinYMin";
+ static const char aSVGStrXMidYMin[] = "xMidYMin";
+ static const char aSVGStrXMaxYMin[] = "xMaxYMin";
+ static const char aSVGStrXMinYMid[] = "xMinYMid";
+ static const char aSVGStrXMidYMid[] = "xMidYMid";
+ static const char aSVGStrXMaxYMid[] = "xMaxYMid";
+ static const char aSVGStrXMinYMax[] = "xMinYMax";
+ static const char aSVGStrXMidYMax[] = "xMidYMax";
+ static const char aSVGStrXMaxYMax[] = "xMaxYMax";
+ static const char aSVGStrMeet[] = "meet";
+ static const char aSVGStrSlice[] = "slice";
- static OUString aSVGStrDefs("defs");
- static OUString aSVGStrG("g");
- static OUString aSVGStrSvg("svg");
- static OUString aSVGStrSymbol("symbol");
- static OUString aSVGStrUse("use");
+ static const char aSVGStrDefs[] = "defs";
+ static const char aSVGStrG[] = "g";
+ static const char aSVGStrSvg[] = "svg";
+ static const char aSVGStrSymbol[] = "symbol";
+ static const char aSVGStrUse[] = "use";
- static OUString aSVGStrCircle("circle");
- static OUString aSVGStrEllipse("ellipse");
- static OUString aSVGStrLine("line");
- static OUString aSVGStrPath("path");
- static OUString aSVGStrPolygon("polygon");
- static OUString aSVGStrPolyline("polyline");
- static OUString aSVGStrRect("rect");
- static OUString aSVGStrImage("image");
+ static const char aSVGStrCircle[] = "circle";
+ static const char aSVGStrEllipse[] = "ellipse";
+ static const char aSVGStrLine[] = "line";
+ static const char aSVGStrPath[] = "path";
+ static const char aSVGStrPolygon[] = "polygon";
+ static const char aSVGStrPolyline[] = "polyline";
+ static const char aSVGStrRect[] = "rect";
+ static const char aSVGStrImage[] = "image";
- static OUString aSVGStrLinearGradient("linearGradient");
- static OUString aSVGStrRadialGradient("radialGradient");
- static OUString aSVGStrStop("stop");
- static OUString aSVGStrOffset("offset");
- static OUString aSVGStrX1("x1");
- static OUString aSVGStrY1("y1");
- static OUString aSVGStrX2("x2");
- static OUString aSVGStrY2("y2");
- static OUString aSVGStrCx("cx");
- static OUString aSVGStrCy("cy");
- static OUString aSVGStrFx("fx");
- static OUString aSVGStrFy("fy");
- static OUString aSVGStrR("r");
- static OUString aSVGStrGradientUnits("gradientUnits");
- static OUString aSVGStrGradientTransform("gradientTransform");
- static OUString aSVGStrSpreadMethod("spreadMethod");
- static OUString aSVGStrXlinkHref("xlink:href");
- static OUString aSVGStrStopColor("stop-color");
- static OUString aSVGStrStopOpacity("stop-opacity");
+ static const char aSVGStrLinearGradient[] = "linearGradient";
+ static const char aSVGStrRadialGradient[] = "radialGradient";
+ static const char aSVGStrStop[] = "stop";
+ static const char aSVGStrOffset[] = "offset";
+ static const char aSVGStrX1[] = "x1";
+ static const char aSVGStrY1[] = "y1";
+ static const char aSVGStrX2[] = "x2";
+ static const char aSVGStrY2[] = "y2";
+ static const char aSVGStrCx[] = "cx";
+ static const char aSVGStrCy[] = "cy";
+ static const char aSVGStrFx[] = "fx";
+ static const char aSVGStrFy[] = "fy";
+ static const char aSVGStrR[] = "r";
+ static const char aSVGStrGradientUnits[] = "gradientUnits";
+ static const char aSVGStrGradientTransform[] = "gradientTransform";
+ static const char aSVGStrSpreadMethod[] = "spreadMethod";
+ static const char aSVGStrXlinkHref[] = "xlink:href";
+ static const char aSVGStrStopColor[] = "stop-color";
+ static const char aSVGStrStopOpacity[] = "stop-opacity";
- static OUString aSVGStrFill("fill");
- static OUString aSVGStrFillOpacity("fill-opacity");
- static OUString aSVGStrFillRule("fill-rule");
+ static const char aSVGStrFill[] = "fill";
+ static const char aSVGStrFillOpacity[] = "fill-opacity";
+ static const char aSVGStrFillRule[] = "fill-rule";
- static OUString aSVGStrStroke("stroke");
- static OUString aSVGStrStrokeDasharray("stroke-dasharray");
- static OUString aSVGStrStrokeDashoffset("stroke-dashoffset");
- static OUString aSVGStrStrokeLinecap("stroke-linecap");
- static OUString aSVGStrStrokeLinejoin("stroke-linejoin");
- static OUString aSVGStrStrokeMiterlimit("stroke-miterlimit");
- static OUString aSVGStrStrokeOpacity("stroke-opacity");
- static OUString aSVGStrStrokeWidth("stroke-width");
+ static const char aSVGStrStroke[] = "stroke";
+ static const char aSVGStrStrokeDasharray[] = "stroke-dasharray";
+ static const char aSVGStrStrokeDashoffset[] = "stroke-dashoffset";
+ static const char aSVGStrStrokeLinecap[] = "stroke-linecap";
+ static const char aSVGStrStrokeLinejoin[] = "stroke-linejoin";
+ static const char aSVGStrStrokeMiterlimit[] = "stroke-miterlimit";
+ static const char aSVGStrStrokeOpacity[] = "stroke-opacity";
+ static const char aSVGStrStrokeWidth[] = "stroke-width";
- static OUString aSVGStrText("text");
- static OUString aSVGStrBaselineShift("baseline-shift");
+ static const char aSVGStrText[] = "text";
+ static const char aSVGStrBaselineShift[] = "baseline-shift";
- static OUString aSVGStrFlowRoot("flowRoot");
+ static const char aSVGStrFlowRoot[] = "flowRoot";
SVGToken StrToSVGToken(const OUString& rStr, bool bCaseIndependent)
{
@@ -350,14 +350,14 @@ namespace svgio
}
}
- const OUString& getStrTitle()
+ const OUString getStrTitle()
{
- return aSVGStrTitle;
+ return OUString(aSVGStrTitle);
}
- const OUString& getStrDesc()
+ const OUString getStrDesc()
{
- return aSVGStrDesc;
+ return OUString(aSVGStrDesc);
}
} // end of namespace svgreader
} // end of namespace svgio
diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx
index a4d594a3d437..b856cb65b36e 100644
--- a/svgio/source/svgreader/svgtools.cxx
+++ b/svgio/source/svgreader/svgtools.cxx
@@ -565,8 +565,8 @@ namespace svgio
if(nPos < nLen)
{
const sal_Unicode aChar(rCandidate[nPos]);
- static OUString aStrGrad("grad");
- static OUString aStrRad("rad");
+ static const char aStrGrad[] = "grad";
+ static const char aStrRad[] = "rad";
switch(aChar)
{
@@ -576,7 +576,7 @@ namespace svgio
if(rCandidate.matchIgnoreAsciiCase(aStrGrad, nPos))
{
// angle in grad
- nPos += aStrGrad.getLength();
+ nPos += strlen(aStrGrad);
aType = grad;
}
break;
@@ -587,7 +587,7 @@ namespace svgio
if(rCandidate.matchIgnoreAsciiCase(aStrRad, nPos))
{
// angle in radians
- nPos += aStrRad.getLength();
+ nPos += strlen(aStrRad);
aType = rad;
}
break;
@@ -860,12 +860,12 @@ namespace svgio
}
else
{
- static OUString aStrRgb("rgb");
+ static const char aStrRgb[] = "rgb";
if(rCandidate.matchIgnoreAsciiCase(aStrRgb, 0))
{
// rgb definition
- sal_Int32 nPos(aStrRgb.getLength());
+ sal_Int32 nPos(strlen(aStrRgb));
skip_char(rCandidate, ' ', '(', nPos, nLen);
double fR(0.0);
@@ -986,12 +986,12 @@ namespace svgio
{
const sal_Unicode aChar(rCandidate[nPos]);
const sal_Int32 nInitPos(nPos);
- static OUString aStrMatrix("matrix");
- static OUString aStrTranslate("translate");
- static OUString aStrScale("scale");
- static OUString aStrRotate("rotate");
- static OUString aStrSkewX("skewX");
- static OUString aStrSkewY("skewY");
+ static const char aStrMatrix[] = "matrix";
+ static const char aStrTranslate[] = "translate";
+ static const char aStrScale[] = "scale";
+ static const char aStrRotate[] = "rotate";
+ static const char aStrSkewX[] = "skewX";
+ static const char aStrSkewY[] = "skewY";
switch(aChar)
{
@@ -1000,7 +1000,7 @@ namespace svgio
if(rCandidate.match(aStrMatrix, nPos))
{
// matrix element
- nPos += aStrMatrix.getLength();
+ nPos += strlen(aStrMatrix);
skip_char(rCandidate, ' ', '(', nPos, nLen);
SvgNumber aVal;
basegfx::B2DHomMatrix aNew;
@@ -1054,7 +1054,7 @@ namespace svgio
if(rCandidate.match(aStrTranslate, nPos))
{
// translate element
- nPos += aStrTranslate.getLength();
+ nPos += strlen(aStrTranslate);
skip_char(rCandidate, ' ', '(', nPos, nLen);
SvgNumber aTransX;
@@ -1078,7 +1078,7 @@ namespace svgio
if(rCandidate.match(aStrScale, nPos))
{
// scale element
- nPos += aStrScale.getLength();
+ nPos += strlen(aStrScale);
skip_char(rCandidate, ' ', '(', nPos, nLen);
SvgNumber aScaleX;
@@ -1098,7 +1098,7 @@ namespace svgio
else if(rCandidate.match(aStrSkewX, nPos))
{
// skewx element
- nPos += aStrSkewX.getLength();
+ nPos += strlen(aStrSkewX);
skip_char(rCandidate, ' ', '(', nPos, nLen);
double fSkewX(0.0);
@@ -1113,7 +1113,7 @@ namespace svgio
else if(rCandidate.match(aStrSkewY, nPos))
{
// skewy element
- nPos += aStrSkewY.getLength();
+ nPos += strlen(aStrSkewY);
skip_char(rCandidate, ' ', '(', nPos, nLen);
double fSkewY(0.0);
@@ -1132,7 +1132,7 @@ namespace svgio
if(rCandidate.match(aStrRotate, nPos))
{
// rotate element
- nPos += aStrRotate.getLength();
+ nPos += strlen(aStrRotate);
skip_char(rCandidate, ' ', '(', nPos, nLen);
double fAngle(0.0);
@@ -1187,12 +1187,12 @@ namespace svgio
bool readLocalUrl(const OUString& rCandidate, OUString& rURL)
{
- static OUString aStrUrl("url");
+ static const char aStrUrl[] = "url";
if(rCandidate.startsWith(aStrUrl))
{
const sal_Int32 nLen(rCandidate.getLength());
- sal_Int32 nPos(aStrUrl.getLength());
+ sal_Int32 nPos(strlen(aStrUrl));
skip_char(rCandidate, '(', '#', nPos, nLen);
OUStringBuffer aTokenValue;
@@ -1424,12 +1424,12 @@ namespace svgio
}
else
{
- static OUString aStrData("data:");
+ static const char aStrData[] = "data:";
if(rCandidate.match(aStrData, 0))
{
// embedded data
- sal_Int32 nPos(aStrData.getLength());
+ sal_Int32 nPos(strlen(aStrData));
sal_Int32 nLen(rCandidate.getLength());
OUStringBuffer aBuffer;
@@ -1441,18 +1441,18 @@ namespace svgio
if(!rMimeType.isEmpty() && nPos < nLen)
{
- static OUString aStrImage("image");
+ static const char aStrImage[] = "image";
if(rMimeType.match(aStrImage, 0))
{
// image data
OUString aData(rCandidate.copy(nPos));
- static OUString aStrBase64("base64");
+ static const char aStrBase64[] = "base64";
if(aData.match(aStrBase64, 0))
{
// base64 encoded
- nPos = aStrBase64.getLength();
+ nPos = strlen(aStrBase64);
nLen = aData.getLength();
skip_char(aData, ' ', ',', nPos, nLen);
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx
index 988469889668..29ece61e2777 100644
--- a/svgio/source/svguno/xsvgparser.cxx
+++ b/svgio/source/svguno/xsvgparser.cxx
@@ -70,10 +70,9 @@ namespace svgio
{
uno::Sequence< OUString > XSvgParser_getSupportedServiceNames()
{
- static OUString aServiceName("com.sun.star.graphic.SvgTools" );
- static uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
-
- return( aServiceNames );
+ OUString aServiceName("com.sun.star.graphic.SvgTools" );
+ uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
+ return aServiceNames;
}
OUString XSvgParser_getImplementationName()
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 873047b1dc00..cd8bc6f84e1e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -617,8 +617,8 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
{
// #102136# The correct English form of month September abbreviated is
// SEPT, but almost every data contains SEP instead.
- static const OUString aSeptCorrect("SEPT");
- static const OUString aSepShortened("SEP");
+ static const char aSeptCorrect[] = "SEPT";
+ static const char aSepShortened[] = "SEP";
short res = 0; // no month found
@@ -670,7 +670,7 @@ short ImpSvNumberInputScan::GetMonth( const OUString& rString, sal_Int32& nPos )
else if ( i == 8 && pUpperAbbrevMonthText[i] == aSeptCorrect &&
StringContainsWord( aSepShortened, rString, nPos ) )
{ // #102136# SEPT/SEP
- nPos = nPos + aSepShortened.getLength();
+ nPos = nPos + strlen(aSepShortened);
res = sal::static_int_cast< short >(-(i+1)); // negative
break; // for
}
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index b83c74a51496..05c34a311f83 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -1254,7 +1254,7 @@ GraphicObject GraphicObject::CreateGraphicObjectFromURL( const OUString &rURL )
void
GraphicObject::InspectForGraphicObjectImageURL( const Reference< XInterface >& xIf, std::vector< OUString >& rvEmbedImgUrls )
{
- static OUString sImageURL( "ImageURL" );
+ static const char sImageURL[] = "ImageURL";
Reference< XPropertySet > xProps( xIf, UNO_QUERY );
if ( xProps.is() )
{
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 06042560a02f..a6cb01783966 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -57,28 +57,24 @@ using namespace ::com::sun::star::container;
namespace
{
- const OUString& lcl_getNamePropertyName( )
+ static OUString lcl_getNamePropertyName( )
{
- static OUString s_sNamePropertyName( "Name" );
- return s_sNamePropertyName;
+ return OUString( "Name" );
}
- const OUString& lcl_getDescPropertyName( )
+ static OUString lcl_getDescPropertyName( )
{
- static OUString s_sDescPropertyDesc( "HelpText" );
- return s_sDescPropertyDesc;
+ return OUString( "HelpText" );
}
- const OUString& lcl_getLabelPropertyName( )
+ static OUString lcl_getLabelPropertyName( )
{
- static OUString s_sLabelPropertyLabel( "Label" );
- return s_sLabelPropertyLabel;
+ return OUString( "Label" );
}
- const OUString& lcl_getLabelControlPropertyName( )
+ static OUString lcl_getLabelControlPropertyName( )
{
- static OUString s_sLabelControlPropertyLabel("LabelControl");
- return s_sLabelControlPropertyLabel;
+ return OUString("LabelControl");
}
// return the property which should be used as AccessibleName
- const OUString& lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI )
+ const OUString lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI )
{
if ( _rxPSI.is() && _rxPSI->hasPropertyByName( lcl_getLabelPropertyName() ) )
return lcl_getLabelPropertyName();
diff --git a/svx/source/accessibility/AccessibleGraphicShape.cxx b/svx/source/accessibility/AccessibleGraphicShape.cxx
index 49f65837068b..30b463815003 100644
--- a/svx/source/accessibility/AccessibleGraphicShape.cxx
+++ b/svx/source/accessibility/AccessibleGraphicShape.cxx
@@ -123,8 +123,7 @@ OUString SAL_CALL
// ...and add additional names.
aServiceNames.realloc (nCount + 1);
- static const OUString sAdditionalServiceName ("com.sun.star.drawing.AccessibleGraphicShape");
- aServiceNames[nCount] = sAdditionalServiceName;
+ aServiceNames[nCount] = "com.sun.star.drawing.AccessibleGraphicShape";
return aServiceNames;
}
diff --git a/svx/source/accessibility/AccessibleOLEShape.cxx b/svx/source/accessibility/AccessibleOLEShape.cxx
index 050746f4c611..dc57aec9cc17 100644
--- a/svx/source/accessibility/AccessibleOLEShape.cxx
+++ b/svx/source/accessibility/AccessibleOLEShape.cxx
@@ -132,8 +132,7 @@ OUString SAL_CALL
// ...and add additional names.
aServiceNames.realloc (nCount + 1);
- static const OUString sAdditionalServiceName ("com.sun.star.drawing.AccessibleOLEShape");
- aServiceNames[nCount] = sAdditionalServiceName;
+ aServiceNames[nCount] = "com.sun.star.drawing.AccessibleOLEShape";
return aServiceNames;
}
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index a3d18ea32ce2..01cfa5538ba1 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -563,8 +563,8 @@ awt::Rectangle SAL_CALL AccessibleShape::getBounds (void)
if ( mxShape.is() )
{
- static const OUString sBoundRectName ("BoundRect");
- static const OUString sAnchorPositionName ("AnchorPosition");
+ static const char sBoundRectName[] = "BoundRect";
+ static const char sAnchorPositionName[] = "AnchorPosition";
// Get the shape's bounding box in internal coordinates (in 100th of
// mm). Use the property BoundRect. Only if that is not supported ask
@@ -986,8 +986,7 @@ uno::Sequence<OUString> SAL_CALL
// ...and add additional names.
aServiceNames.realloc (nCount + 1);
- static const OUString sAdditionalServiceName ("com.sun.star.drawing.AccessibleShape");
- aServiceNames[nCount] = sAdditionalServiceName;
+ aServiceNames[nCount] = "com.sun.star.drawing.AccessibleShape";
return aServiceNames;
}
@@ -1060,7 +1059,7 @@ void SAL_CALL
AccessibleShape::notifyEvent (const document::EventObject& rEventObject)
throw (uno::RuntimeException, std::exception)
{
- static const OUString sShapeModified ("ShapeModified");
+ static const char sShapeModified[] = "ShapeModified";
// First check if the event is for us.
uno::Reference<drawing::XShape> xShape (
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx
index 6ce00e7f88a9..12e4054e900c 100644
--- a/svx/source/accessibility/ChildrenManagerImpl.cxx
+++ b/svx/source/accessibility/ChildrenManagerImpl.cxx
@@ -691,8 +691,8 @@ void SAL_CALL
const document::EventObject& rEventObject)
throw (uno::RuntimeException, std::exception)
{
- static const OUString sShapeInserted ("ShapeInserted");
- static const OUString sShapeRemoved ("ShapeRemoved");
+ static const char sShapeInserted[] = "ShapeInserted";
+ static const char sShapeRemoved[] = "ShapeRemoved";
if (rEventObject.EventName == sShapeInserted)
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index c49be04290ee..f7e6e56a3a8d 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1660,7 +1660,7 @@ void FmGridControl::InitColumnByField(
}
// the control type is determined by the ColumnServiceName
- static OUString s_sPropColumnServiceName( "ColumnServiceName" );
+ static const char s_sPropColumnServiceName[] = "ColumnServiceName";
if ( !::comphelper::hasProperty( s_sPropColumnServiceName, _rxColumnModel ) )
return;
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index 7a42951c65f4..483c12cf85e6 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -128,7 +128,7 @@ void FmFormObj::impl_checkRefDevice_nothrow( bool _force )
Reference< XPropertySet > xModelProps( GetUnoControlModel(), UNO_QUERY_THROW );
Reference< XPropertySetInfo > xPropertyInfo( xModelProps->getPropertySetInfo(), UNO_SET_THROW );
- static const OUString sRefDevicePropName( "ReferenceDevice" );
+ static const char sRefDevicePropName[] = "ReferenceDevice";
if ( xPropertyInfo->hasPropertyByName( sRefDevicePropName ) )
{
VCLXDevice* pUnoRefDevice = new VCLXDevice;
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index a36cb1e3526a..e69d9974a3fb 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -727,8 +727,8 @@ namespace svxform
void SAL_CALL FormScriptListener::firing( const ScriptEvent& _rEvent ) throw (RuntimeException, std::exception)
{
::osl::ClearableMutexGuard aGuard( m_aMutex );
- static const OUString vbaInterOp("VBAInterop");
- if ( _rEvent.ScriptType.equals(vbaInterOp) )
+ static const char vbaInterOp[] = "VBAInterop";
+ if ( _rEvent.ScriptType == vbaInterOp )
return; // not handled here
if ( impl_isDisposed_nothrow() )
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index eeaa5330c8de..4c641587962f 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -678,7 +678,7 @@ void SAL_CALL FmXUndoEnvironment::propertyChange(const PropertyChangeEvent& evt)
// TODO: we should cache all those things, else this might be too expensive.
// However, this requires we're notified of changes in the value binding
- static const OUString s_sExternalData( "ExternalData" );
+ static const char s_sExternalData[] = "ExternalData";
if ( xBindingPropsPSI.is() && xBindingPropsPSI->hasPropertyByName( s_sExternalData ) )
{
bool bExternalData = true;
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index 91330e11ea81..b464f06a745b 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -3633,7 +3633,7 @@ namespace
{
try
{
- static OUString s_sFormsCheckRequiredFields( "FormsCheckRequiredFields" );
+ static const char s_sFormsCheckRequiredFields[] = "FormsCheckRequiredFields";
// first, check whether the form has a property telling us the answer
// this allows people to use the XPropertyContainer interface of a form to control
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index c1a1ef9fd11f..5992a0658ed8 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -291,10 +291,10 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& rbDirIsReadO
if( xContentAccess.is() )
{
- static const OUString s_sTitle("Title");
- static const OUString s_sIsReadOnly("IsReadOnly");
- static const OUString s_sSDG_EXT("sdg");
- static const OUString s_sSDV_EXT("sdv");
+ static const char s_sTitle[] = "Title";
+ static const char s_sIsReadOnly[] = "IsReadOnly";
+ static const char s_sSDG_EXT[] = "sdg";
+ static const char s_sSDV_EXT[] = "sdv";
while( xResultSet->next() )
{
diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index 096da89be126..1bc65c29f519 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -1307,8 +1307,7 @@ namespace sdr { namespace contact {
try
{
Reference< XPropertySet > xModelProperties( pUnoObject->GetUnoControlModel(), UNO_QUERY_THROW );
- static const OUString s_sPrintablePropertyName( "Printable" );
- OSL_VERIFY( xModelProperties->getPropertyValue( s_sPrintablePropertyName ) >>= bIsPrintable );
+ OSL_VERIFY( xModelProperties->getPropertyValue( "Printable" ) >>= bIsPrintable );
}
catch( const Exception& )
{
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 1814c0061392..d7efb5de2998 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -3202,29 +3202,29 @@ sdr::contact::ViewContact* SdrObjCustomShape::CreateObjectSpecificViewContact()
bool SdrObjCustomShape::doConstructOrthogonal(const OUString& rName)
{
bool bRetval(false);
- static OUString Imps_sNameASOrtho_quadrat( "quadrat" );
- static OUString Imps_sNameASOrtho_round_quadrat( "round-quadrat" );
- static OUString Imps_sNameASOrtho_circle( "circle" );
- static OUString Imps_sNameASOrtho_circle_pie( "circle-pie" );
- static OUString Imps_sNameASOrtho_ring( "ring" );
+ static const char Imps_sNameASOrtho_quadrat[] = "quadrat";
+ static const char Imps_sNameASOrtho_round_quadrat[] = "round-quadrat";
+ static const char Imps_sNameASOrtho_circle[] = "circle";
+ static const char Imps_sNameASOrtho_circle_pie[] = "circle-pie";
+ static const char Imps_sNameASOrtho_ring[] = "ring";
- if(Imps_sNameASOrtho_quadrat.equalsIgnoreAsciiCase(rName))
+ if(rName.equalsIgnoreAsciiCase(Imps_sNameASOrtho_quadrat))
{
bRetval = true;
}
- else if(Imps_sNameASOrtho_round_quadrat.equalsIgnoreAsciiCase(rName))
+ else if(rName.equalsIgnoreAsciiCase(Imps_sNameASOrtho_round_quadrat))
{
bRetval = true;
}
- else if(Imps_sNameASOrtho_circle.equalsIgnoreAsciiCase(rName))
+ else if(rName.equalsIgnoreAsciiCase(Imps_sNameASOrtho_circle))
{
bRetval = true;
}
- else if(Imps_sNameASOrtho_circle_pie.equalsIgnoreAsciiCase(rName))
+ else if(rName.equalsIgnoreAsciiCase(Imps_sNameASOrtho_circle_pie))
{
bRetval = true;
}
- else if(Imps_sNameASOrtho_ring.equalsIgnoreAsciiCase(rName))
+ else if(rName.equalsIgnoreAsciiCase(Imps_sNameASOrtho_ring))
{
bRetval = true;
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index e26129f58db9..3595305051de 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -433,7 +433,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::deactivatedUI()
com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager(getLayoutManager());
if ( xLayoutManager.is() )
{
- const static OUString aMenuBarURL( "private:resource/menubar/menubar" );
+ static const char aMenuBarURL[] = "private:resource/menubar/menubar";
if ( !xLayoutManager->isElementVisible( aMenuBarURL ) )
xLayoutManager->createElement( aMenuBarURL );
}
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 60b25c76cd55..e04614eb363e 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -521,8 +521,7 @@ Sequence<OUString> SAL_CALL AccessibleCell::getSupportedServiceNames(void) throw
// ...and add additional names.
aServiceNames.realloc (nCount + 1);
- static const OUString sAdditionalServiceName ("com.sun.star.drawing.AccessibleCell");
- aServiceNames[nCount] = sAdditionalServiceName;
+ aServiceNames[nCount] = "com.sun.star.drawing.AccessibleCell";
return aServiceNames;
}
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index ca940763b05c..d26311e4b595 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -114,13 +114,13 @@ void getLightingDirectionDefaults( const Direction3D **pLighting1Defaults, const
static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj )
{
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sProjectionMode( "ProjectionMode" );
- static const OUString sRotateAngle( "RotateAngle" );
- static const OUString sViewPoint( "ViewPoint" );
- static const OUString sOrigin( "Origin" );
- static const OUString sSkew( "Skew" );
- static const OUString sDepth( "Depth" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sProjectionMode[] = "ProjectionMode";
+ static const char sRotateAngle[] = "RotateAngle";
+ static const char sViewPoint[] = "ViewPoint";
+ static const char sOrigin[] = "Origin";
+ static const char sSkew[] = "Skew";
+ static const char sDepth[] = "Depth";
sal_uInt16 nSID = rReq.GetSlot();
switch( nSID )
@@ -297,7 +297,7 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
break;
case SID_EXTRUSION_3D_COLOR:
{
- static const OUString sExtrusionColor( "Color" );
+ static const char sExtrusionColor[] = "Color";
if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_3D_COLOR ) == SfxItemState::SET)
{
@@ -324,10 +324,10 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
break;
case SID_EXTRUSION_SURFACE:
{
- static const OUString sShadeMode( "ShadeMode" );
- static const OUString sSpecularity( "Specularity" );
- static const OUString sDiffusion( "Diffusion" );
- static const OUString sMetal( "Metal" );
+ static const char sShadeMode[] = "ShadeMode";
+ static const char sSpecularity[] = "Specularity";
+ static const char sDiffusion[] = "Diffusion";
+ static const char sMetal[] = "Metal";
if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_SURFACE ) == SfxItemState::SET)
{
@@ -376,12 +376,12 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
break;
case SID_EXTRUSION_LIGHTING_INTENSITY:
{
- static const OUString sBrightness( "Brightness" );
- static const OUString sLightFace( "LightFace" );
- static const OUString sFirstLightHarsh( "FirstLightHarsh" );
- static const OUString sSecondLightHarsh( "SecondLightHarsh" );
- static const OUString sFirstLightLevel( "FirstLightLevel" );
- static const OUString sSecondLightLevel( "SecondLightLevel" );
+ static const char sBrightness[] = "Brightness";
+ static const char sLightFace[] = "LightFace";
+ static const char sFirstLightHarsh[] = "FirstLightHarsh";
+ static const char sSecondLightHarsh[] = "SecondLightHarsh";
+ static const char sFirstLightLevel[] = "FirstLightLevel";
+ static const char sSecondLightLevel[] = "SecondLightLevel";
if( rReq.GetArgs() && rReq.GetArgs()->GetItemState( SID_EXTRUSION_LIGHTING_INTENSITY ) == SfxItemState::SET)
{
@@ -626,11 +626,11 @@ void getExtrusionDirectionState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sViewPoint( "ViewPoint" );
- static const OUString sOrigin( "Origin" );
- static const OUString sSkew( "Skew" );
- static const OUString sProjectionMode( "ProjectionMode" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sViewPoint[] = "ViewPoint";
+ static const char sOrigin[] = "Origin";
+ static const char sSkew[] = "Skew";
+ static const char sProjectionMode[] = "ProjectionMode";
const com::sun::star::uno::Any* pAny;
@@ -777,8 +777,8 @@ void getExtrusionProjectionState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sProjectionMode( "ProjectionMode" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sProjectionMode[] = "ProjectionMode";
const com::sun::star::uno::Any* pAny;
@@ -833,10 +833,10 @@ void getExtrusionSurfaceState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sShadeMode( "ShadeMode" );
- static const OUString sSpecularity( "Specularity" );
- static const OUString sMetal( "Metal" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sShadeMode[] = "ShadeMode";
+ static const char sSpecularity[] = "Specularity";
+ static const char sMetal[] = "Metal";
const com::sun::star::uno::Any* pAny;
@@ -921,8 +921,8 @@ void getExtrusionDepthState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sDepth( "Depth" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sDepth[] = "Depth";
const com::sun::star::uno::Any* pAny;
@@ -1001,9 +1001,9 @@ void getExtrusionLightingDirectionState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sFirstLightDirection( "FirstLightDirection" );
- static const OUString sSecondLightDirection( "SecondLightDirection" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sFirstLightDirection[] = "FirstLightDirection";
+ static const char sSecondLightDirection[] = "SecondLightDirection";
const Direction3D * pLighting1Defaults;
const Direction3D * pLighting2Defaults;
@@ -1082,8 +1082,8 @@ void getExtrusionLightingIntensityState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sBrightness( "Brightness" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sBrightness[] = "Brightness";
const com::sun::star::uno::Any* pAny;
@@ -1150,8 +1150,8 @@ void getExtrusionColorState( SdrView* pSdrView, SfxItemSet& rSet )
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
- static const OUString sExtrusion( "Extrusion" );
- static const OUString sExtrusionColor( "Color" );
+ static const char sExtrusion[] = "Extrusion";
+ static const char sExtrusionColor[] = "Color";
const com::sun::star::uno::Any* pAny;
@@ -1220,7 +1220,7 @@ void getExtrusionColorState( SdrView* pSdrView, SfxItemSet& rSet )
namespace svx {
bool checkForSelectedCustomShapes( SdrView* pSdrView, bool bOnlyExtruded )
{
- static const OUString sExtrusion( "Extrusion" );
+ static const char sExtrusion[] = "Extrusion";
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index e4646f6db9f5..63e0cf3558ba 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -222,7 +222,7 @@ bool checkForSelectedFontWork( SdrView* pSdrView, sal_uInt32& nCheckStatus )
if ( nCheckStatus & 2 )
return ( nCheckStatus & 1 ) != 0;
- static const OUString sTextPath( "TextPath" );
+ static const char sTextPath[] = "TextPath";
const SdrMarkList& rMarkList = pSdrView->GetMarkedObjectList();
const size_t nCount = rMarkList.GetMarkCount();
@@ -247,8 +247,8 @@ bool checkForSelectedFontWork( SdrView* pSdrView, sal_uInt32& nCheckStatus )
static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem& rGeometryItem, SdrObject* pObj )
{
- static const OUString sTextPath( "TextPath" );
- static const OUString sSameLetterHeights( "SameLetterHeights" );
+ static const char sTextPath[] = "TextPath";
+ static const char sSameLetterHeights[] = "SameLetterHeights";
sal_uInt16 nSID = rReq.GetSlot();
switch( nSID )
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index f6fab38d5ef2..9c6df3a99b0b 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -3146,8 +3146,7 @@ uno::Sequence<uno::Any> SvxShape::getPropertyDefaults(
OUString SAL_CALL SvxShape::getImplementationName()
throw(uno::RuntimeException, std::exception)
{
- static OUString aServiceName("SvxShape");
- return aServiceName;
+ return OUString("SvxShape");
}
#define STAR_NAMESPACE "com.sun.star."
@@ -4007,8 +4006,7 @@ void SAL_CALL SvxShapeText::release() throw()
OUString SAL_CALL SvxShapeText::getImplementationName() throw( uno::RuntimeException, std::exception )
{
- static OUString aServiceName("SvxShapeText");
- return aServiceName;
+ return OUString("SvxShapeText");
}
diff --git a/sw/qa/tiledrendering/tiledrendering.cxx b/sw/qa/tiledrendering/tiledrendering.cxx
index 1f7ae93aea8b..afe8f3dd4080 100644
--- a/sw/qa/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/tiledrendering/tiledrendering.cxx
@@ -148,7 +148,7 @@ IMPL_LINK ( TiledRenderingDialog, ChooseDocumentHdl, Button *, EMPTYARG )
void TiledRenderingApp::Open(OUString & aFileUrl)
{
- static const OUString TARGET("_default");
+ static const char TARGET[] = "_default";
static const Sequence<beans::PropertyValue> PROPS (0);
if(xComponent.get())
{
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 7e0068837560..4f85ab31bab7 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1916,7 +1916,7 @@ uno::Sequence< PropertyValue > SwAccessibleParagraph::getDefaultAttributes(
_getDefaultAttributesImpl( aRequestedAttributes, aDefAttrSeq );
// #i92233#
- static OUString sMMToPixelRatio("MMToPixelRatio");
+ static const char sMMToPixelRatio[] = "MMToPixelRatio";
bool bProvideMMToPixelRatio( false );
{
if ( aRequestedAttributes.getLength() == 0 )
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx
index a9d22f1e99a7..fce4fffb3a08 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2573,17 +2573,17 @@ throw (uno::RuntimeException, std::exception)
static OUString OldNameToNewName_Impl( const OUString &rOld )
{
- static OUString aOldNamePart1(".TextField.DocInfo.");
- static OUString aOldNamePart2(".TextField.");
- static OUString aNewNamePart1(".textfield.docinfo.");
- static OUString aNewNamePart2(".textfield.");
+ static const char aOldNamePart1[] = ".TextField.DocInfo.";
+ static const char aOldNamePart2[] = ".TextField.";
+ static const char aNewNamePart1[] = ".textfield.docinfo.";
+ static const char aNewNamePart2[] = ".textfield.";
OUString sServiceNameCC( rOld );
sal_Int32 nIdx = sServiceNameCC.indexOf( aOldNamePart1 );
if (nIdx >= 0)
- sServiceNameCC = sServiceNameCC.replaceAt( nIdx, aOldNamePart1.getLength(), aNewNamePart1 );
+ sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart1), aNewNamePart1 );
nIdx = sServiceNameCC.indexOf( aOldNamePart2 );
if (nIdx >= 0)
- sServiceNameCC = sServiceNameCC.replaceAt( nIdx, aOldNamePart2.getLength(), aNewNamePart2 );
+ sServiceNameCC = sServiceNameCC.replaceAt( nIdx, strlen(aOldNamePart2), aNewNamePart2 );
return sServiceNameCC;
}
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 606178f44aca..240168e719a6 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -527,20 +527,20 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
aFFData.setResult(nTemp);
OUString aStr;
- static OUString sName("Name");
+ static const char sName[] = "Name";
if (xPropSetInfo->hasPropertyByName(sName))
{
xPropSet->getPropertyValue(sName) >>= aStr;
aFFData.setName(aStr);
}
- static OUString sHelpText("HelpText");
+ static const char sHelpText[] = "HelpText";
if (xPropSetInfo->hasPropertyByName(sHelpText))
{
xPropSet->getPropertyValue(sHelpText) >>= aStr;
aFFData.setHelp(aStr);
}
- static OUString sHelpF1Text("HelpF1Text");
+ static const char sHelpF1Text[] = "HelpF1Text";
if (xPropSetInfo->hasPropertyByName(sHelpF1Text))
{
xPropSet->getPropertyValue(sHelpF1Text) >>= aStr;
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx
index e3a06f40890b..636ff94799b9 100644
--- a/sw/source/ui/vba/vbaapplication.cxx
+++ b/sw/source/ui/vba/vbaapplication.cxx
@@ -59,8 +59,7 @@ SfxObjectShell* SwVbaApplication::GetDocShell( const uno::Reference< frame::XMod
OUString SAL_CALL
SwVbaApplication::getName() throw (uno::RuntimeException, std::exception)
{
- static OUString appName("Microsoft Word" );
- return appName;
+ return OUString("Microsoft Word" );
}
uno::Reference< word::XDocument > SAL_CALL
diff --git a/sw/source/ui/vba/vbafont.cxx b/sw/source/ui/vba/vbafont.cxx
index d75b5226c4f8..3abfbbe6687d 100644
--- a/sw/source/ui/vba/vbafont.cxx
+++ b/sw/source/ui/vba/vbafont.cxx
@@ -76,8 +76,7 @@ private:
public:
static OUString propName()
{
- static OUString sPropName("CharUnderline");
- return sPropName;
+ return OUString("CharUnderline");
}
static UnderLineMapper& instance()
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 2f0726e72158..eadba3526384 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -193,17 +193,15 @@ static void lcl_throwElementExistException( )
}
-static const OUString& getTabIndexPropertyName( )
+static OUString getTabIndexPropertyName( )
{
- static const OUString s_sTabIndexProperty( "TabIndex" );
- return s_sTabIndexProperty;
+ return OUString( "TabIndex" );
}
-static const OUString& getStepPropertyName( )
+static OUString getStepPropertyName( )
{
- static const OUString s_sStepProperty( "Step" );
- return s_sStepProperty;
+ return OUString( "Step" );
}
diff --git a/toolkit/source/controls/stdtabcontroller.cxx b/toolkit/source/controls/stdtabcontroller.cxx
index b6e28539e77f..145539eb94ad 100644
--- a/toolkit/source/controls/stdtabcontroller.cxx
+++ b/toolkit/source/controls/stdtabcontroller.cxx
@@ -111,7 +111,7 @@ bool StdTabController::ImplCreateComponentSequence(
if ( pTabs )
{
// opt: Constant String for TabStop name
- static const OUString aTabStopName( "Tabstop" );
+ static const char aTabStopName[] = "Tabstop";
Reference< XPropertySet > xPSet( xCtrl->getModel(), UNO_QUERY );
Reference< XPropertySetInfo > xInfo = xPSet->getPropertySetInfo();
diff --git a/toolkit/source/controls/tabpagemodel.cxx b/toolkit/source/controls/tabpagemodel.cxx
index 5a0c4f822498..f6735bfa1bfa 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -151,7 +151,7 @@ void SAL_CALL UnoControlTabPageModel::initialize (const Sequence<Any>& rArgument
Reference<XPropertySet> xDialogProp(xDialogModel,UNO_QUERY);
if ( xDialogProp.is() )
{
- static const OUString s_sResourceResolver("ResourceResolver");
+ static const char s_sResourceResolver[] = "ResourceResolver";
Reference<XPropertySet> xThis(*this,UNO_QUERY);
xThis->setPropertyValue(s_sResourceResolver,xDialogProp->getPropertyValue(s_sResourceResolver));
xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_TITLE),xDialogProp->getPropertyValue(GetPropertyName(BASEPROPERTY_TITLE)));
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx
index 63b65b034729..ee1468ff22ac 100644
--- a/toolkit/source/controls/tree/treedatamodel.cxx
+++ b/toolkit/source/controls/tree/treedatamodel.cxx
@@ -248,9 +248,7 @@ void SAL_CALL MutableTreeDataModel::removeEventListener( const Reference< XEvent
OUString SAL_CALL MutableTreeDataModel::getImplementationName( ) throw (RuntimeException, std::exception)
{
- ::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
- static const OUString aImplName( "toolkit.MutableTreeDataModel" );
- return aImplName;
+ return OUString( "toolkit.MutableTreeDataModel" );
}
sal_Bool SAL_CALL MutableTreeDataModel::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception)
@@ -528,9 +526,7 @@ OUString SAL_CALL MutableTreeNode::getCollapsedGraphicURL( ) throw (RuntimeExce
OUString SAL_CALL MutableTreeNode::getImplementationName( ) throw (RuntimeException, std::exception)
{
- ::osl::Guard< ::osl::Mutex > aGuard( maMutex );
- static const OUString aImplName( "toolkit.MutableTreeNode" );
- return aImplName;
+ return OUString( "toolkit.MutableTreeNode" );
}
sal_Bool SAL_CALL MutableTreeNode::supportsService( const OUString& ServiceName ) throw (RuntimeException, std::exception)
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index b9da3f67b227..dfb0ae41d039 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -63,7 +63,7 @@ namespace toolkitform
*/
sal_Int16 classifyFormControl( const Reference< XPropertySet >& _rxModel )
{
- static const OUString FM_PROP_CLASSID("ClassId");
+ static const char FM_PROP_CLASSID[] = "ClassId";
sal_Int16 nControlType = FormComponentType::CONTROL;
Reference< XPropertySetInfo > xPSI;
@@ -243,7 +243,7 @@ namespace toolkitform
*/
void getStringItemVector( const Reference< XPropertySet >& _rxModel, ::std::vector< OUString >& _rVector )
{
- static const OUString FM_PROP_STRINGITEMLIST("StringItemList");
+ static const char FM_PROP_STRINGITEMLIST[] = "StringItemList";
Sequence< OUString > aListEntries;
OSL_VERIFY( _rxModel->getPropertyValue( FM_PROP_STRINGITEMLIST ) >>= aListEntries );
::std::copy( aListEntries.getConstArray(), aListEntries.getConstArray() + aListEntries.getLength(),
@@ -282,12 +282,12 @@ namespace toolkitform
// Name, Description, Text
- OSL_VERIFY( xModelProps->getPropertyValue( OUString(FM_PROP_NAME) ) >>= Descriptor->Name );
- static const OUString FM_PROP_HELPTEXT("HelpText");
+ OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_NAME ) >>= Descriptor->Name );
+ static const char FM_PROP_HELPTEXT[] = "HelpText";
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_HELPTEXT ) >>= Descriptor->Description );
Any aText;
- static const OUString FM_PROP_TEXT("Text");
- static const OUString FM_PROP_LABEL("Label");
+ static const char FM_PROP_TEXT[] = "Text";
+ static const char FM_PROP_LABEL[] = "Label";
if ( xPSI->hasPropertyByName( FM_PROP_TEXT ) )
aText = xModelProps->getPropertyValue( FM_PROP_TEXT );
else if ( xPSI->hasPropertyByName( FM_PROP_LABEL ) )
@@ -297,14 +297,14 @@ namespace toolkitform
// readonly
- static const OUString FM_PROP_READONLY("ReadOnly");
+ static const char FM_PROP_READONLY[] = "ReadOnly";
if ( xPSI->hasPropertyByName( FM_PROP_READONLY ) )
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_READONLY ) >>= Descriptor->ReadOnly );
// border
{
- static const OUString FM_PROP_BORDER("Border");
+ static const char FM_PROP_BORDER[] = "Border";
if ( xPSI->hasPropertyByName( FM_PROP_BORDER ) )
{
sal_Int16 nBorderType = 0;
@@ -325,7 +325,7 @@ namespace toolkitform
// background color
- static const OUString FM_PROP_BACKGROUNDCOLOR("BackgroundColor");
+ static const char FM_PROP_BACKGROUNDCOLOR[] = "BackgroundColor";
if ( xPSI->hasPropertyByName( FM_PROP_BACKGROUNDCOLOR ) )
{
sal_Int32 nBackColor = COL_TRANSPARENT;
@@ -336,7 +336,7 @@ namespace toolkitform
// text color
- static const OUString FM_PROP_TEXTCOLOR("TextColor");
+ static const char FM_PROP_TEXTCOLOR[] = "TextColor";
if ( xPSI->hasPropertyByName( FM_PROP_TEXTCOLOR ) )
{
sal_Int32 nTextColor = COL_TRANSPARENT;
@@ -351,7 +351,7 @@ namespace toolkitform
// multi line and word break
// The MultiLine property of the control is mapped to both the "MULTILINE" and
// "WORDBREAK" style flags
- static const OUString FM_PROP_MULTILINE("MultiLine");
+ static const char FM_PROP_MULTILINE[] = "MultiLine";
if ( xPSI->hasPropertyByName( FM_PROP_MULTILINE ) )
{
bool bMultiLine = false;
@@ -361,7 +361,7 @@ namespace toolkitform
}
// horizontal alignment
- static const OUString FM_PROP_ALIGN("Align");
+ static const char FM_PROP_ALIGN[] = "Align";
if ( xPSI->hasPropertyByName( FM_PROP_ALIGN ) )
{
sal_Int16 nAlign = awt::TextAlign::LEFT;
@@ -397,7 +397,7 @@ namespace toolkitform
}
// font
- static const OUString FM_PROP_FONT("FontDescriptor");
+ static const char FM_PROP_FONT[] = "FontDescriptor";
if ( xPSI->hasPropertyByName( FM_PROP_FONT ) )
{
FontDescriptor aUNOFont;
@@ -435,12 +435,12 @@ namespace toolkitform
}
// file select
- static const OUString FM_SUN_COMPONENT_FILECONTROL("com.sun.star.form.component.FileControl");
+ static const char FM_SUN_COMPONENT_FILECONTROL[] = "com.sun.star.form.component.FileControl";
if ( xSI->supportsService( FM_SUN_COMPONENT_FILECONTROL ) )
pEditWidget->FileSelect = true;
// maximum text length
- static const OUString FM_PROP_MAXTEXTLEN("MaxTextLen");
+ static const char FM_PROP_MAXTEXTLEN[] = "MaxTextLen";
if ( xPSI->hasPropertyByName( FM_PROP_MAXTEXTLEN ) )
{
sal_Int16 nMaxTextLength = 0;
@@ -459,7 +459,7 @@ namespace toolkitform
::vcl::PDFWriter::PushButtonWidget* pButtonWidget = static_cast< ::vcl::PDFWriter::PushButtonWidget* >( Descriptor.get() );
FormButtonType eButtonType = FormButtonType_PUSH;
OSL_VERIFY( xModelProps->getPropertyValue("ButtonType") >>= eButtonType );
- static const OUString FM_PROP_TARGET_URL("TargetURL");
+ static const char FM_PROP_TARGET_URL[] = "TargetURL";
if ( eButtonType == FormButtonType_SUBMIT )
{
// if a button is a submit button, then it uses the URL at its parent form
@@ -518,7 +518,7 @@ namespace toolkitform
// check boxes
- static const OUString FM_PROP_STATE("State");
+ static const char FM_PROP_STATE[] = "State";
if ( Descriptor->getType() == ::vcl::PDFWriter::CheckBox )
{
::vcl::PDFWriter::CheckBoxWidget* pCheckBoxWidget = static_cast< ::vcl::PDFWriter::CheckBoxWidget* >( Descriptor.get() );
@@ -538,7 +538,7 @@ namespace toolkitform
pRadioWidget->RadioGroup = determineRadioGroupId( xModelProps );
try
{
- static const OUString FM_PROP_REFVALUE("RefValue");
+ static const char FM_PROP_REFVALUE[] = "RefValue";
xModelProps->getPropertyValue( FM_PROP_REFVALUE ) >>= pRadioWidget->OnValue;
}
catch(...)
@@ -554,7 +554,7 @@ namespace toolkitform
::vcl::PDFWriter::ListBoxWidget* pListWidget = static_cast< ::vcl::PDFWriter::ListBoxWidget* >( Descriptor.get() );
// drop down
- static const OUString FM_PROP_DROPDOWN("Dropdown");
+ static const char FM_PROP_DROPDOWN[] = "Dropdown";
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_DROPDOWN ) >>= pListWidget->DropDown );
// multi selection
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index 2e0c081ece5d..5f52f32e28ac 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -38,10 +38,10 @@ using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
-#define ROOTNODE_EVENTS OUString("Office.Events/ApplicationEvents")
-#define PATHDELIMITER OUString("/")
-#define SETNODE_BINDINGS OUString("Bindings")
-#define PROPERTYNAME_BINDINGURL OUString("BindingURL")
+static const char ROOTNODE_EVENTS[] = "Office.Events/ApplicationEvents";
+#define PATHDELIMITER "/"
+#define SETNODE_BINDINGS "Bindings"
+#define PROPERTYNAME_BINDINGURL "BindingURL"
const char* pEventAsciiNames[] =
{
@@ -169,8 +169,8 @@ void GlobalEventConfig_Impl::Commit()
ClearNodeSet( SETNODE_BINDINGS );
Sequence< beans::PropertyValue > seqValues( 1 );
OUString sNode;
- static const OUString sPrefix(SETNODE_BINDINGS + PATHDELIMITER + "BindingType['");
- static const OUString sPostfix("']" + PATHDELIMITER + PROPERTYNAME_BINDINGURL);
+ static const char sPrefix[] = SETNODE_BINDINGS PATHDELIMITER "BindingType['";
+ static const char sPostfix[] = "']" PATHDELIMITER PROPERTYNAME_BINDINGURL;
//step through the list of events
for(int i=0;it!=it_end;++it,++i)
{
diff --git a/unotools/source/misc/mediadescriptor.cxx b/unotools/source/misc/mediadescriptor.cxx
index de5a1f502c32..850db5b4bb5c 100644
--- a/unotools/source/misc/mediadescriptor.cxx
+++ b/unotools/source/misc/mediadescriptor.cxx
@@ -325,8 +325,8 @@ MediaDescriptor::MediaDescriptor(const css::uno::Sequence< css::beans::PropertyV
bool MediaDescriptor::isStreamReadOnly() const
{
- static OUString CONTENTSCHEME_FILE( "file" );
- static OUString CONTENTPROP_ISREADONLY( "IsReadOnly" );
+ static const char CONTENTSCHEME_FILE[] = "file";
+ static const char CONTENTPROP_ISREADONLY[] = "IsReadOnly";
static bool READONLY_FALLBACK = false;
bool bReadOnly = READONLY_FALLBACK;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 2ce52b71856a..1bec82992295 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -1503,11 +1503,11 @@ void SAL_CALL librdf_Repository::setStatementRDFa(
throw (uno::RuntimeException, lang::IllegalArgumentException,
rdf::RepositoryException, std::exception)
{
- static const OUString s_cell("com.sun.star.table.Cell");
- static const OUString s_cellprops("com.sun.star.text.CellProperties"); // for writer
- static const OUString s_paragraph("com.sun.star.text.Paragraph");
- static const OUString s_bookmark("com.sun.star.text.Bookmark");
- static const OUString s_meta("com.sun.star.text.InContentMetadata");
+ static const char s_cell[] = "com.sun.star.table.Cell";
+ static const char s_cellprops[] = "com.sun.star.text.CellProperties"; // for writer
+ static const char s_paragraph[] = "com.sun.star.text.Paragraph";
+ static const char s_bookmark[] = "com.sun.star.text.Bookmark";
+ static const char s_meta[] = "com.sun.star.text.InContentMetadata";
if (!i_xSubject.is()) {
throw lang::IllegalArgumentException(
diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
index f162e5cbd088..db96c7274ade 100644
--- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
+++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx
@@ -215,8 +215,8 @@ OUString VbaCommandBarHelper::findToolbarByName( const css::uno::Reference< css:
}
// the customize toolbars creating during importing, should found there.
- static OUString sToolbarPrefix( "private:resource/toolbar/custom_" );
- sResourceUrl = sToolbarPrefix.concat( sName );
+ static const char sToolbarPrefix[] = "private:resource/toolbar/custom_";
+ sResourceUrl = sToolbarPrefix + sName;
if( hasToolbar( sResourceUrl, sName ) )
return sResourceUrl;
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 118cbf87470c..c1cc81c5bcce 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -258,7 +258,7 @@ getThisWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw
uno::Reference< frame::XModel >
getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static const OUString sThisExcelDoc( "ThisExcelDoc" );
+ static const char sThisExcelDoc[] = "ThisExcelDoc";
uno::Reference< frame::XModel > xModel;
try
{
@@ -274,7 +274,7 @@ getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) t
uno::Reference< frame::XModel >
getCurrentWordDoc( const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException)
{
- static const OUString sThisWordDoc( "ThisWordDoc" );
+ static const char sThisWordDoc[] = "ThisWordDoc";
uno::Reference< frame::XModel > xModel;
try
{
diff --git a/vcl/source/components/fontident.cxx b/vcl/source/components/fontident.cxx
index dce92d30bf3b..e5880d3bcd88 100644
--- a/vcl/source/components/fontident.cxx
+++ b/vcl/source/components/fontident.cxx
@@ -153,8 +153,8 @@ Any SAL_CALL FontIdentificator::getMaterial() throw(RuntimeException, std::excep
Sequence< OUString > FontIdentificator_getSupportedServiceNames()
{
- static OUString aServiceName( "com.sun.star.awt.FontIdentificator" );
- static Sequence< OUString > aServiceNames( &aServiceName, 1 );
+ OUString aServiceName( "com.sun.star.awt.FontIdentificator" );
+ Sequence< OUString > aServiceNames( &aServiceName, 1 );
return aServiceNames;
}
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index 416cc6b8945a..56a8d74eb58c 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -1161,8 +1161,8 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
a korean bitmap font that is not suitable here. Use the font replacement table,
that automatically leads to the desired "HG Mincho Light J". Same story for
MS Gothic, there are thai and korean "Gothic" fonts, so we even prefer Andale */
- static OUString aMS_Mincho( "msmincho" );
- static OUString aMS_Gothic( "msgothic" );
+ static const char aMS_Mincho[] = "msmincho";
+ static const char aMS_Gothic[] = "msgothic";
if ((aSearchName != aMS_Mincho) && (aSearchName != aMS_Gothic))
// TODO: add heuristic to only throw out the fake ms* fonts
#endif
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 1f9cec0aa1c7..4eeafb1aeff7 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -788,7 +788,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno
if( sExtension.getLength() >= 3 ) // 3 = typical/minimum extension length
{
- static const OUString aStarDot( "*." );
+ static const char aStarDot[] = "*.";
OUString aNewFilter;
OUString aOldFilter = getCurrentFilter();
@@ -1805,7 +1805,7 @@ GtkFileFilter* SalGtkFilePicker::implAddFilter( const OUString& rFilter, const O
OString aFilterName = OUStringToOString( aShrunkName, RTL_TEXTENCODING_UTF8 );
gtk_file_filter_set_name( filter, aFilterName.getStr() );
- static const OUString aStarDot( "*." );
+ static const char aStarDot[] = "*.";
OUString aTokens;
bool bAllGlob = rType.equalsAscii( "*.*" ) || rType.equalsAscii( "*" );
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 1491440a3f3a..1c7b19d00db6 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2637,12 +2637,12 @@ void DomainMapper::lcl_startParagraphGroup()
if (!(m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH) == m_pImpl->GetTopContext()))
m_pImpl->PushProperties(CONTEXT_PARAGRAPH);
- static OUString sDefault("Standard");
+ static const char sDefault[] = "Standard";
if (m_pImpl->GetTopContext())
{
if (!m_pImpl->IsInShape())
{
- m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, uno::makeAny( sDefault ) );
+ m_pImpl->GetTopContext()->Insert( PROP_PARA_STYLE_NAME, uno::makeAny( OUString(sDefault) ) );
m_pImpl->SetCurrentParaStyleId(sDefault);
}
if (m_pImpl->isBreakDeferred(PAGE_BREAK))
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 645d52c3e2a0..c8bf973492ef 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1304,7 +1304,7 @@ void DomainMapper_Impl::appendTextContent(
void DomainMapper_Impl::appendOLE( const OUString& rStreamName, OLEHandlerPtr pOLEHandler )
{
- static const OUString sEmbeddedService("com.sun.star.text.TextEmbeddedObject");
+ static const char sEmbeddedService[] = "com.sun.star.text.TextEmbeddedObject";
try
{
uno::Reference< text::XTextContent > xOLE( m_xTextFactory->createInstance(sEmbeddedService), uno::UNO_QUERY_THROW );
@@ -1375,7 +1375,7 @@ void DomainMapper_Impl::appendStarMath( const Value& val )
val.getAny() >>= formula;
if( formula.is() )
{
- static const OUString sEmbeddedService("com.sun.star.text.TextEmbeddedObject");
+ static const char sEmbeddedService[] = "com.sun.star.text.TextEmbeddedObject";
try
{
uno::Reference< text::XTextContent > xStarMath( m_xTextFactory->createInstance(sEmbeddedService), uno::UNO_QUERY_THROW );
@@ -1426,7 +1426,7 @@ uno::Reference< beans::XPropertySet > DomainMapper_Impl::appendTextSectionAfter(
xCursor->gotoEnd( true );
//the paragraph after this new section is already inserted
xCursor->goLeft(1, true);
- static const OUString sSectionService("com.sun.star.text.TextSection");
+ static const char sSectionService[] = "com.sun.star.text.TextSection";
uno::Reference< text::XTextContent > xSection( m_xTextFactory->createInstance(sSectionService), uno::UNO_QUERY_THROW );
xSection->attach( uno::Reference< text::XTextRange >( xCursor, uno::UNO_QUERY_THROW) );
xRet = uno::Reference< beans::XPropertySet > (xSection, uno::UNO_QUERY );
@@ -4364,7 +4364,7 @@ void DomainMapper_Impl::AddBookmark( const OUString& rBookmarkName, const OUStri
{
if( aBookmarkIter != m_aBookmarkMap.end() )
{
- static const OUString sBookmarkService("com.sun.star.text.Bookmark");
+ static const char sBookmarkService[] = "com.sun.star.text.Bookmark";
if (m_xTextFactory.is())
{
uno::Reference< text::XTextContent > xBookmark( m_xTextFactory->createInstance( sBookmarkService ), uno::UNO_QUERY_THROW );
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx b/writerfilter/source/dmapper/FormControlHelper.cxx
index 54c6b4abfd6f..1e2d4912f901 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -89,7 +89,7 @@ uno::Reference<form::XForm> FormControlHelper::FormControlHelper_Impl::getForm()
if (xFormsSupplier.is())
{
uno::Reference<container::XNameContainer> xFormsNamedContainer(xFormsSupplier->getForms());
- static OUString sDOCXForm("DOCX-Standard");
+ static const char sDOCXForm[] = "DOCX-Standard";
OUString sFormName(sDOCXForm);
sal_uInt16 nUnique = 0;
@@ -270,7 +270,7 @@ bool FormControlHelper::insertControl(uno::Reference<text::XTextRange> const& xT
if (! xFormComps.is())
return false;
- static OUString sControl("Control");
+ static const char sControl[] = "Control";
sal_Int32 nControl = 0;
bool bDone = false;
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index addb2b2bdd8c..55857b949e19 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -185,7 +185,7 @@ void OLEHandler::lcl_sprm(Sprm & rSprm)
void OLEHandler::saveInteropProperties(uno::Reference<text::XTextDocument> const& xTextDocument, const OUString& sObjectName, const OUString& sOldObjectName)
{
- static const OUString sEmbeddingsPropName = "EmbeddedObjects";
+ static const char sEmbeddingsPropName[] = "EmbeddedObjects";
// get interop grab bag from document
uno::Reference< beans::XPropertySet > xDocProps( xTextDocument, uno::UNO_QUERY );
@@ -293,9 +293,9 @@ OUString OLEHandler::copyOLEOStream(
saveInteropProperties( xTextDocument, aURL );
- static const OUString sProtocol("vnd.sun.star.EmbeddedObject:");
+ static const char sProtocol[] = "vnd.sun.star.EmbeddedObject:";
OUString aPersistName( xEmbeddedResolver->resolveEmbeddedObjectURL( aURL ) );
- sRet = aPersistName.copy( sProtocol.getLength() );
+ sRet = aPersistName.copy( strlen(sProtocol) );
}
uno::Reference< lang::XComponent > xComp( xEmbeddedResolver, uno::UNO_QUERY_THROW );
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index e8af6d09189f..b5e309a0fb4f 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -527,8 +527,8 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
if (mxRelationshipAccess.is())
{
- static const OUString sCustomType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml");
- static const OUString sCustomTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/customXml");
+ static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
+ static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/customXml";
OUString sTarget("Target");
bool bFound = false;
sal_Int32 counter = 0;
@@ -579,14 +579,14 @@ void OOXMLDocumentImpl::resolveCustomXmlStream(Stream & rStream)
void OOXMLDocumentImpl::resolveGlossaryStream(Stream & /*rStream*/)
{
- static OUString sSettingsType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
- static OUString sStylesType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
- static OUString sFonttableType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
- static OUString sWebSettings("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
- static OUString sSettingsTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/settings");
- static OUString sStylesTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/styles");
- static OUString sFonttableTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/fontTable");
- static OUString sWebSettingsStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/webSettings");
+ static const char sSettingsType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";
+ static const char sStylesType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
+ static const char sFonttableType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
+ static const char sWebSettings[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";
+ static const char sSettingsTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/settings";
+ static const char sStylesTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/styles";
+ static const char sFonttableTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/fontTable";
+ static const char sWebSettingsStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/webSettings";
OOXMLStream::Pointer_t pStream;
try
@@ -782,8 +782,8 @@ void OOXMLDocumentImpl::resolveActiveXStream(Stream & rStream)
mxRelationshipAccess.set((dynamic_cast<OOXMLStreamImpl&>(*mpStream.get())).accessDocumentStream(), uno::UNO_QUERY_THROW);
if (mxRelationshipAccess.is())
{
- static const OUString sCustomType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/control");
- static const OUString sCustomTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/control");
+ static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control";
+ static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/control";
OUString sTarget("Target");
bool bFound = false;
sal_Int32 counter = 0;
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index a22a52f71560..6ba07a07941a 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -89,10 +89,10 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
const OUString & rId,
OUString & rDocumentTarget)
{
- static OUString sId("Id");
- static OUString sTarget("Target");
- static OUString sTargetMode("TargetMode");
- static OUString sExternal("External");
+ static const char sId[] = "Id";
+ static const char sTarget[] = "Target";
+ static const char sTargetMode[] = "TargetMode";
+ static const char sExternal[] = "External";
if (maIdCache.empty())
{
// Cache is empty? Then let's build it!
@@ -132,49 +132,49 @@ bool OOXMLStreamImpl::lcl_getTarget(uno::Reference<embed::XRelationshipAccess>
// add mspath to represent the 'source' of this stream
uno::Reference< com::sun::star::uri::XUriReference > xBase = xFac->parse( OUString( "file:///" ) + msPath );
- static OUString sType("Type");
- static OUString sDocumentType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
- static OUString sStylesType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
- static OUString sNumberingType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering");
- static OUString sFonttableType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
- static OUString sFootnotesType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes");
- static OUString sEndnotesType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes");
- static OUString sCommentsType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments");
- static OUString sThemeType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme");
- static OUString sCustomType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml");
- static OUString sCustomPropsType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps");
- static OUString sActiveXType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/control");
- static OUString sActiveXBinType("http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary");
- static OUString sGlossaryType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument");
- static OUString sWebSettings("http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
- static OUString sSettingsType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
- static OUString sChartType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart");
- static OUString sEmbeddingsType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/package");
- static OUString sFooterType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer");
- static OUString sHeaderType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/header");
- static OUString sOleObjectType("http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject");
- static OUString sSignatureType("http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin");
+ static const char sType[] = "Type";
+ static const char sDocumentType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument";
+ static const char sStylesType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles";
+ static const char sNumberingType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering";
+ static const char sFonttableType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable";
+ static const char sFootnotesType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes";
+ static const char sEndnotesType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes";
+ static const char sCommentsType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";
+ static const char sThemeType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";
+ static const char sCustomType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";
+ static const char sCustomPropsType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";
+ static const char sActiveXType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/control";
+ static const char sActiveXBinType[] = "http://schemas.microsoft.com/office/2006/relationships/activeXControlBinary";
+ static const char sGlossaryType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";
+ static const char sWebSettings[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";
+ static const char sSettingsType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";
+ static const char sChartType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";
+ static const char sEmbeddingsType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";
+ static const char sFooterType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";
+ static const char sHeaderType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";
+ static const char sOleObjectType[] = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";
+ static const char sSignatureType[] = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
// OOXML strict
- static OUString sDocumentTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument");
- static OUString sStylesTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/styles");
- static OUString sNumberingTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/numbering");
- static OUString sFonttableTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/fontTable");
- static OUString sFootnotesTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/footnotes");
- static OUString sEndnotesTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/endnotes");
- static OUString sCommentsTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/comments");
- static OUString sThemeTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/theme");
- static OUString sCustomTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/customXml");
- static OUString sCustomPropsTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/customXmlProps");
- static OUString sActiveXTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/control");
- static OUString sGlossaryTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/glossaryDocument");
- static OUString sWebSettingsStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/webSettings");
- static OUString sSettingsTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/settings");
- static OUString sChartTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/chart");
- static OUString sEmbeddingsTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/package");
- static OUString sFootersTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/footer");
- static OUString sHeaderTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/header");
- static OUString sOleObjectTypeStrict("http://purl.oclc.org/ooxml/officeDocument/relationships/oleObject");
- static OUString sVBAProjectType("http://schemas.microsoft.com/office/2006/relationships/vbaProject");
+ static const char sDocumentTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument";
+ static const char sStylesTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/styles";
+ static const char sNumberingTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/numbering";
+ static const char sFonttableTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/fontTable";
+ static const char sFootnotesTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/footnotes";
+ static const char sEndnotesTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/endnotes";
+ static const char sCommentsTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/comments";
+ static const char sThemeTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/theme";
+ static const char sCustomTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/customXml";
+ static const char sCustomPropsTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/customXmlProps";
+ static const char sActiveXTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/control";
+ static const char sGlossaryTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/glossaryDocument";
+ static const char sWebSettingsStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/webSettings";
+ static const char sSettingsTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/settings";
+ static const char sChartTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/chart";
+ static const char sEmbeddingsTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/package";
+ static const char sFootersTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/footer";
+ static const char sHeaderTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/header";
+ static const char sOleObjectTypeStrict[] = "http://purl.oclc.org/ooxml/officeDocument/relationships/oleObject";
+ static const char sVBAProjectType[] = "http://schemas.microsoft.com/office/2006/relationships/vbaProject";
OUString sStreamType;
OUString sStreamTypeStrict;
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 23c1d1b23a6d..930bbbeb4a6c 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -871,7 +871,7 @@ void TVChildTarget::subst( OUString& instpath ) const
// class ExtensionIteratorBase
-static OUString aHelpMediaType("application/vnd.sun.star.help");
+static const char aHelpMediaType[] = "application/vnd.sun.star.help";
ExtensionIteratorBase::ExtensionIteratorBase( const OUString& aLanguage )
: m_eState( USER_EXTENSIONS )
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 0be658c134e8..7488da10cd20 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -155,7 +155,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp, sal_uInt16 nPrfx, cons
, meDirection(ED_none), mnStartScale(100), meSpeed(AnimationSpeed_MEDIUM)
, mnVerb(0), mbPlayFull(false)
{
- static const OUString sXMLClickName( "click" );
+ static const char sXMLClickName[] = "click";
if( nPrfx == XML_NAMESPACE_PRESENTATION && IsXMLToken( rLocalName, XML_EVENT_LISTENER ) )
{
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 54cf3e45c505..0040d5ddbf19 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -450,10 +450,10 @@ namespace xmloff
{
// no optimization here. If this method gets called, the XML stream did not contain a name for the
// element, which is a heavy error. So in this case we don't care for performance
- static const OUString sUnnamedName("unnamed");
+ static const char sUnnamedName[] = "unnamed";
OSL_ENSURE(m_xParentContainer.is(), "OElementImport::implGetDefaultName: no parent container!");
if (!m_xParentContainer.is())
- return sUnnamedName;
+ return OUString(sUnnamedName);
Sequence< OUString > aNames = m_xParentContainer->getElementNames();
OUString sReturn;
@@ -478,7 +478,7 @@ namespace xmloff
return sReturn;
}
OSL_FAIL("OElementImport::implGetDefaultName: did not find a free name!");
- return sUnnamedName;
+ return OUString(sUnnamedName);
}
PropertyGroups::const_iterator OElementImport::impl_matchPropertyGroup( const PropertyGroups& i_propertyGroups ) const
@@ -1546,12 +1546,12 @@ namespace xmloff
const Reference< XAttributeList >& _rxAttrList)
{
// is it the "option" sub tag of a listbox ?
- static const OUString s_sOptionElementName("option");
+ static const char s_sOptionElementName[] = "option";
if (s_sOptionElementName == _rLocalName)
return new OListOptionImport(GetImport(), _nPrefix, _rLocalName, this);
// is it the "item" sub tag of a combobox ?
- static const OUString s_sItemElementName("item");
+ static const char s_sItemElementName[] = "item";
if (s_sItemElementName == _rLocalName)
return new OComboItemImport(GetImport(), _nPrefix, _rLocalName, this);
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index 55e58a3bd524..125abd40a852 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -517,7 +517,7 @@ void OFormLayerXMLImport_Impl::documentDone( )
&& FormCellBindingHelper::isCellBindingAllowed( rImport.GetModel() )
)
{
- static OUString s_sIndex( ":index" );
+ static const char s_sIndex[] = ":index";
::std::vector< ModelStringPair >::const_iterator aEnd = m_aCellValueBindings.end();
for ( ::std::vector< ModelStringPair >::const_iterator aCellBindings = m_aCellValueBindings.begin();
aCellBindings != aEnd;
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 86d6297d8418..9b514a0b5a4c 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -171,10 +171,9 @@ XMLTextImportHelper::MakeBackpatcherImpl()
return ::boost::shared_ptr<BackpatcherImpl>(new BackpatcherImpl);
}
-static OUString const& GetSequenceNumber()
+static OUString GetSequenceNumber()
{
- static OUString s_SequenceNumber("SequenceNumber");
- return s_SequenceNumber;
+ return OUString("SequenceNumber");
}
@@ -213,7 +212,7 @@ XMLPropertyBackpatcher<sal_Int16>& XMLTextImportHelper::GetSequenceIdBP()
XMLPropertyBackpatcher<OUString>& XMLTextImportHelper::GetSequenceNameBP()
{
- static OUString s_SourceName("SourceName");
+ static const char s_SourceName[] = "SourceName";
if (!m_pBackpatcherImpl->m_pSequenceNameBackpatcher.get())
{
m_pBackpatcherImpl->m_pSequenceNameBackpatcher.reset(
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index f7ccbea71178..9231870a3f93 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1264,10 +1264,10 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
const OUString& rTargetFrameName,
bool bMap )
{
- static OUString s_HyperLinkURL("HyperLinkURL");
- static OUString s_HyperLinkName("HyperLinkName");
- static OUString s_HyperLinkTarget("HyperLinkTarget");
- static OUString s_ServerMap("ServerMap");
+ static const char s_HyperLinkURL[] = "HyperLinkURL";
+ static const char s_HyperLinkName[] = "HyperLinkName";
+ static const char s_HyperLinkTarget[] = "HyperLinkTarget";
+ static const char s_ServerMap[] = "ServerMap";
if( !xPropSet.is() )
return;
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 25bab0ec5b9f..f396ede30b13 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -60,7 +60,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
, msListId()
, msContinueListId()
{
- static OUString s_PropNameDefaultListId("DefaultListId");
+ static const char s_PropNameDefaultListId[] = "DefaultListId";
{
// get the parent list block context (if any); this is a bit ugly...
XMLTextListBlockContext * pLB(0);
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
index 26886337f318..71dea66d6991 100644
--- a/xmloff/source/text/XMLTextListItemContext.cxx
+++ b/xmloff/source/text/XMLTextListItemContext.cxx
@@ -50,7 +50,7 @@ XMLTextListItemContext::XMLTextListItemContext(
mnSubListCount( 0 ),
mxNumRulesOverride()
{
- static OUString s_NumberingRules("NumberingRules");
+ static const char s_NumberingRules[] = "NumberingRules";
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
{
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 8aaa952bbba9..f8f47206ecb5 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -183,10 +183,10 @@ void XMLTextMarkImportContext::EndElement()
{
SvXMLImportContext::EndElement();
- static const OUString sAPI_reference_mark( "com.sun.star.text.ReferenceMark");
- static const OUString sAPI_bookmark( "com.sun.star.text.Bookmark");
- static const OUString sAPI_fieldmark( "com.sun.star.text.Fieldmark");
- static const OUString sAPI_formfieldmark( "com.sun.star.text.FormFieldmark");
+ static const char sAPI_reference_mark[] = "com.sun.star.text.ReferenceMark";
+ static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark";
+ static const char sAPI_fieldmark[] = "com.sun.star.text.Fieldmark";
+ static const char sAPI_formfieldmark[] = "com.sun.star.text.FormFieldmark";
if (!m_sBookmarkName.isEmpty())
{
@@ -213,7 +213,7 @@ void XMLTextMarkImportContext::EndElement()
// export point bookmark
const Reference<XInterface> xContent(
CreateAndInsertMark(GetImport(),
- (bImportAsField?sAPI_formfieldmark:sAPI_bookmark),
+ (bImportAsField ? OUString(sAPI_formfieldmark) : OUString(sAPI_bookmark)),
m_sBookmarkName,
m_rHelper.GetCursorAsRange()->getStart(),
m_sXmlId) );
@@ -291,7 +291,7 @@ void XMLTextMarkImportContext::EndElement()
// insert reference
const Reference<XInterface> xContent(
CreateAndInsertMark(GetImport(),
- (bImportAsField?sAPI_fieldmark:sAPI_bookmark),
+ (bImportAsField ? OUString(sAPI_fieldmark) : OUString(sAPI_bookmark)),
m_sBookmarkName,
xInsertionCursor,
m_sXmlId) );
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 8c954064e399..8954cb2db9eb 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -895,7 +895,7 @@ XMLTextImportHelper::XMLTextImportHelper(
bProgress, bBlockMode, bOrganizerMode) )
, m_pBackpatcherImpl( MakeBackpatcherImpl() )
{
- static OUString s_PropNameDefaultListId( "DefaultListId");
+ static const char s_PropNameDefaultListId[] = "DefaultListId";
Reference< XChapterNumberingSupplier > xCNSupplier( rModel, UNO_QUERY );
@@ -1410,19 +1410,19 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
// Numberings/Bullets in table not visible after save/reload (#i80724#)
bool bSetListAttrs )
{
- static OUString s_ParaStyleName( "ParaStyleName");
- static OUString s_CharStyleName( "CharStyleName");
- static OUString s_NumberingRules( "NumberingRules");
- static OUString s_NumberingIsNumber( "NumberingIsNumber");
- static OUString s_NumberingLevel( "NumberingLevel");
- static OUString s_ParaIsNumberingRestart( "ParaIsNumberingRestart");
- static OUString s_NumberingStartValue( "NumberingStartValue");
- static OUString s_PropNameListId( "ListId");
- static OUString s_PageDescName( "PageDescName");
- static OUString s_ServiceCombinedCharacters( "com.sun.star.text.TextField.CombinedCharacters");
- static OUString s_Content("Content");
- static OUString s_OutlineLevel( "OutlineLevel");
- static OUString s_NumberingStyleName( "NumberingStyleName");
+ static const char s_ParaStyleName[] = "ParaStyleName";
+ static const char s_CharStyleName[] = "CharStyleName";
+ static const char s_NumberingRules[] = "NumberingRules";
+ static const char s_NumberingIsNumber[] = "NumberingIsNumber";
+ static const char s_NumberingLevel[] = "NumberingLevel";
+ static const char s_ParaIsNumberingRestart[] = "ParaIsNumberingRestart";
+ static const char s_NumberingStartValue[] = "NumberingStartValue";
+ static const char s_PropNameListId[] = "ListId";
+ static const char s_PageDescName[] = "PageDescName";
+ static const char s_ServiceCombinedCharacters[] = "com.sun.star.text.TextField.CombinedCharacters";
+ static const char s_Content[] = "Content";
+ static const char s_OutlineLevel[] = "OutlineLevel";
+ static const char s_NumberingStyleName[] = "NumberingStyleName";
const sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
: XML_STYLE_FAMILY_TEXT_TEXT;
@@ -1446,7 +1446,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
if( !sStyleName.isEmpty() )
{
sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName );
- const OUString& rPropName = (bPara) ? s_ParaStyleName : s_CharStyleName;
+ const OUString rPropName = bPara ? s_ParaStyleName : s_CharStyleName;
const Reference < XNameContainer > & rStyles = (bPara)
? m_pImpl->m_xParaStyles
: m_pImpl->m_xTextStyles;
@@ -1851,7 +1851,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
void XMLTextImportHelper::FindOutlineStyleName( OUString& rStyleName,
sal_Int8 nOutlineLevel )
{
- static OUString s_HeadingStyleName( "HeadingStyleName");
+ static const char s_HeadingStyleName[] = "HeadingStyleName";
// style name empty?
if( rStyleName.isEmpty() )
@@ -1915,8 +1915,8 @@ void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel
void XMLTextImportHelper::SetOutlineStyles( bool bSetEmptyLevels )
{
- static OUString s_NumberingStyleName( "NumberingStyleName");
- static OUString s_HeadingStyleName( "HeadingStyleName");
+ static const char s_NumberingStyleName[] = "NumberingStyleName";
+ static const char s_HeadingStyleName [] = "HeadingStyleName";
if ((m_pImpl->m_pOutlineStylesCandidates != 0 || bSetEmptyLevels) &&
m_pImpl->m_xChapterNumbering.is() &&
@@ -2022,12 +2022,12 @@ void XMLTextImportHelper::SetHyperlink(
const OUString& rVisitedStyleName,
XMLEventsImportContext* pEvents)
{
- static OUString s_HyperLinkURL( "HyperLinkURL");
- static OUString s_HyperLinkName( "HyperLinkName");
- static OUString s_HyperLinkTarget( "HyperLinkTarget");
- static OUString s_UnvisitedCharStyleName( "UnvisitedCharStyleName");
- static OUString s_VisitedCharStyleName( "VisitedCharStyleName");
- static OUString s_HyperLinkEvents( "HyperLinkEvents");
+ static const char s_HyperLinkURL[] = "HyperLinkURL";
+ static const char s_HyperLinkName[] = "HyperLinkName";
+ static const char s_HyperLinkTarget[] = "HyperLinkTarget";
+ static const char s_UnvisitedCharStyleName[] = "UnvisitedCharStyleName";
+ static const char s_VisitedCharStyleName[] = "VisitedCharStyleName";
+ static const char s_HyperLinkEvents[] = "HyperLinkEvents";
Reference < XPropertySet > xPropSet( rCursor, UNO_QUERY );
Reference < XPropertySetInfo > xPropSetInfo(
@@ -2608,8 +2608,8 @@ void XMLTextImportHelper::ConnectFrameChains(
const OUString& rNextFrmName,
const Reference < XPropertySet >& rFrmPropSet )
{
- static OUString s_ChainNextName( "ChainNextName");
- static OUString s_ChainPrevName( "ChainPrevName");
+ static const char s_ChainNextName[] = "ChainNextName";
+ static const char s_ChainPrevName[] = "ChainPrevName";
if( rFrmName.isEmpty() )
return;
@@ -2657,7 +2657,7 @@ void XMLTextImportHelper::ConnectFrameChains(
bool XMLTextImportHelper::IsInFrame() const
{
- static OUString s_TextFrame( "TextFrame");
+ static const char s_TextFrame[] = "TextFrame";
bool bIsInFrame = false;
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index 52265c81df39..ccfc6853a5c6 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -442,7 +442,7 @@ XMLTextListsHelper::MakeNumRule(
bool* o_pRestartNumbering,
bool* io_pSetDefaults)
{
- static OUString s_NumberingRules( "NumberingRules");
+ static const char s_NumberingRules[] = "NumberingRules";
uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule);
if ( !i_StyleName.isEmpty() && i_StyleName != i_ParentStyleName )
{
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 5b932114dd23..c13e687a0b48 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -2169,10 +2169,10 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
bool bAutoStyles, bool bIsProgress,
bool bPrvChrIsSpc )
{
- static const OUString sMeta("InContentMetadata");
- static const OUString sFieldMarkName("__FieldMark_");
- static OUString sAnnotation("Annotation");
- static OUString sAnnotationEnd("AnnotationEnd");
+ static const char sMeta[] = "InContentMetadata";
+ static const char sFieldMarkName[] = "__FieldMark_";
+ static const char sAnnotation[] = "Annotation";
+ static const char sAnnotationEnd[] = "AnnotationEnd";
bool bPrevCharIsSpace = bPrvChrIsSpc;
@@ -3717,7 +3717,7 @@ void XMLTextParagraphExport::exportMeta(
const Reference<XPropertySet> & i_xPortion,
bool i_bAutoStyles, bool i_isProgress)
{
- static OUString sMeta("InContentMetadata");
+ static const char sMeta[] = "InContentMetadata";
bool doExport(!i_bAutoStyles); // do not export element if autostyles
// check version >= 1.2
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
index f2b0ca28cf0d..dd77b3333c6b 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_export.cxx
@@ -42,64 +42,26 @@ namespace xmlscript
OUString getImplementationName_XMLBasicExporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicExporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLBasicExporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicExporter";
+ return aNames;
}
OUString getImplementationName_XMLOasisBasicExporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicExporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLOasisBasicExporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicExporter";
+ return aNames;
}
// XMLBasicExporterBase
diff --git a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
index 74263054c7a1..5359bde79941 100644
--- a/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
+++ b/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx
@@ -500,64 +500,26 @@ void BasicImport::setDocumentLocator( const Reference< xml::sax::XLocator >& /*x
OUString getImplementationName_XMLBasicImporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLBasicImporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLBasicImporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLBasicImporter";
+ return aNames;
}
OUString getImplementationName_XMLOasisBasicImporter()
{
- static OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static OUString aImplName( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return OUString( "com.sun.star.comp.xmlscript.XMLOasisBasicImporter" );
}
Sequence< OUString > getSupportedServiceNames_XMLOasisBasicImporter()
{
- static Sequence< OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< OUString > aNames(1);
- aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter";
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< OUString > aNames(1);
+ aNames.getArray()[0] = "com.sun.star.document.XMLOasisBasicImporter";
+ return aNames;
}
// XMLBasicImporterBase