[Libreoffice-commits] .: 17 commits - accessibility/source basic/source chart2/source comphelper/source connectivity/source cppcanvas/source desktop/source filter/inc filter/source framework/source Makefile.top moz/extractfiles.mk moz/zipped oox/source sax/source sc/inc scp2/InstallModule_ooo.mk scp2/source sc/source sd/inc sd/source sfx2/source slideshow/source stoc/source svl/inc svtools/source svx/source sw/inc sw/source tools/source unotools/inc unotools/source unusedcode.easy unusedcode.README vcl/inc vcl/source xmlhelp/source
Caolán McNamara
caolan at kemper.freedesktop.org
Mon Jun 25 06:19:29 PDT 2012
Makefile.top | 1
accessibility/source/standard/vclxaccessiblelist.cxx | 2
basic/source/uno/scriptcont.cxx | 11
chart2/source/controller/dialogs/tp_AxisPositions.cxx | 2
comphelper/source/streaming/memorystream.cxx | 3
connectivity/source/commontools/DriversConfig.cxx | 18 -
cppcanvas/source/mtfrenderer/emfplus.cxx | 22 -
desktop/source/deployment/misc/dp_misc.cxx | 43 ---
filter/inc/filter/msfilter/util.hxx | 11
filter/source/msfilter/util.cxx | 39 ++
framework/source/accelerators/acceleratorconfiguration.cxx | 18 -
framework/source/accelerators/presethandler.cxx | 18 -
framework/source/classes/taskcreator.cxx | 10
framework/source/services/taskcreatorsrv.cxx | 20 -
moz/extractfiles.mk | 171 -------------
moz/zipped/makefile.mk | 84 +-----
oox/source/export/drawingml.cxx | 57 ----
sax/source/expatwrap/sax_expat.cxx | 12
sc/inc/dbdata.hxx | 1
sc/inc/simplerangelist.hxx | 3
sc/source/core/tool/dbdata.cxx | 5
sc/source/core/tool/simplerangelist.cxx | 34 --
sc/source/filter/inc/formulabuffer.hxx | 1
sc/source/filter/inc/sheetdatabuffer.hxx | 7
sc/source/filter/inc/worksheethelper.hxx | 3
sc/source/filter/oox/formulabuffer.cxx | 13
sc/source/filter/oox/sheetdatabuffer.cxx | 11
sc/source/filter/oox/worksheethelper.cxx | 15 -
sc/source/filter/xml/XMLStylesImportHelper.cxx | 41 ---
sc/source/filter/xml/XMLStylesImportHelper.hxx | 2
sc/source/filter/xml/xmlcelli.cxx | 2
sc/source/ui/app/uiitems.cxx | 54 ----
sc/source/ui/inc/uiitems.hxx | 25 -
sc/source/ui/vba/vbaformat.hxx | 1
scp2/InstallModule_ooo.mk | 1
scp2/source/ooo/file_library_ooo.scp | 31 ++
scp2/source/ooo/module_hidden_ooo.scp | 12
sd/inc/strmname.h | 11
sd/source/filter/eppt/pptx-text.cxx | 48 ---
sd/source/ui/app/sdmod2.cxx | 27 --
sd/source/ui/framework/factories/BasicToolBarFactory.cxx | 2
sd/source/ui/framework/factories/TaskPanelFactory.cxx | 2
sd/source/ui/toolpanel/controls/DocumentHelper.cxx | 5
sfx2/source/appl/appbaslib.cxx | 24 -
sfx2/source/appl/appinit.cxx | 10
sfx2/source/doc/docfac.cxx | 7
sfx2/source/doc/docmacromode.cxx | 4
sfx2/source/doc/sfxbasemodel.cxx | 13
slideshow/source/engine/shapes/drawshapesubsetting.cxx | 10
slideshow/source/engine/shapes/drawshapesubsetting.hxx | 19 -
stoc/source/security/file_policy.cxx | 3
svl/inc/svl/svarray.hxx | 39 --
svtools/source/edit/svmedit.cxx | 8
svtools/source/filter/FilterConfigCache.cxx | 25 -
svx/source/unodraw/recoveryui.cxx | 3
svx/source/unodraw/unoshtxt.cxx | 4
sw/inc/docary.hxx | 1
sw/source/core/doc/docnew.cxx | 6
sw/source/filter/ww8/writerhelper.cxx | 3
sw/source/filter/ww8/writerwordglue.cxx | 7
sw/source/filter/ww8/wrtw8num.cxx | 46 ---
tools/source/inet/inetmime.cxx | 13
unotools/inc/unotools/fontdefs.hxx | 11
unotools/source/config/bootstrap.cxx | 33 --
unotools/source/config/configitem.cxx | 3
unotools/source/config/confignode.cxx | 11
unotools/source/config/syslocaleoptions.cxx | 4
unotools/source/misc/fontdefs.cxx | 11
unusedcode.README | 1
unusedcode.easy | 14 -
vcl/inc/vcl/syschild.hxx | 1
vcl/inc/vcl/toolbox.hxx | 3
vcl/source/control/fixed.cxx | 4
vcl/source/window/syschild.cxx | 14 -
vcl/source/window/toolbox.cxx | 95 -------
xmlhelp/source/cxxhelp/provider/urlparameter.cxx | 6
76 files changed, 246 insertions(+), 1109 deletions(-)
New commits:
commit 2c757293b819118780eef3a30bb4434528d38673
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 12:50:46 2012 +0100
reduce static_initialization_and_destruction chain
Change-Id: I0c1b2f2d908c31d1510662880c13504d81445a6a
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 45311f5..32b3619 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -1171,16 +1171,7 @@ Sequence< OUString > SfxScriptLibraryContainer::getSupportedServiceNames_static(
OUString SfxScriptLibraryContainer::getImplementationName_static()
{
- static OUString aImplName;
- static sal_Bool bNeedsInit = sal_True;
-
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if( bNeedsInit )
- {
- aImplName = OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" );
- bNeedsInit = sal_False;
- }
- return aImplName;
+ return OUString("com.sun.star.comp.sfx2.ScriptLibraryContainer" );
}
Reference< XInterface > SAL_CALL SfxScriptLibraryContainer::Create
diff --git a/comphelper/source/streaming/memorystream.cxx b/comphelper/source/streaming/memorystream.cxx
index 74879e4..ac6148a 100644
--- a/comphelper/source/streaming/memorystream.cxx
+++ b/comphelper/source/streaming/memorystream.cxx
@@ -221,8 +221,7 @@ void SAL_CALL UNOMemoryStream::truncate() throw (IOException, RuntimeException)
::rtl::OUString SAL_CALL UNOMemoryStream::getImplementationName_static()
{
- static const OUString sImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.MemoryStream" ) );
- return sImplName;
+ return ::rtl::OUString("com.sun.star.comp.MemoryStream");
}
Sequence< ::rtl::OUString > SAL_CALL UNOMemoryStream::getSupportedServiceNames_static()
diff --git a/connectivity/source/commontools/DriversConfig.cxx b/connectivity/source/commontools/DriversConfig.cxx
index 7e480c7..6a204bf 100644
--- a/connectivity/source/commontools/DriversConfig.cxx
+++ b/connectivity/source/commontools/DriversConfig.cxx
@@ -63,31 +63,25 @@ namespace
const ::utl::OConfigurationNode aURLPatternNode = _aInstalled.openNode(_sEntry);
if ( aURLPatternNode.isValid() )
{
- static const ::rtl::OUString s_sParentURLPattern(RTL_CONSTASCII_USTRINGPARAM("ParentURLPattern"));
- static const ::rtl::OUString s_sDriver(RTL_CONSTASCII_USTRINGPARAM("Driver"));
- static const ::rtl::OUString s_sDriverTypeDisplayName(RTL_CONSTASCII_USTRINGPARAM("DriverTypeDisplayName"));
- static const ::rtl::OUString s_sProperties(RTL_CONSTASCII_USTRINGPARAM("Properties"));
- static const ::rtl::OUString s_sFeatures(RTL_CONSTASCII_USTRINGPARAM("Features"));
- static const ::rtl::OUString s_sMetaData(RTL_CONSTASCII_USTRINGPARAM("MetaData"));
::rtl::OUString sParentURLPattern;
- aURLPatternNode.getNodeValue(s_sParentURLPattern) >>= sParentURLPattern;
+ aURLPatternNode.getNodeValue("ParentURLPattern") >>= sParentURLPattern;
if ( !sParentURLPattern.isEmpty() )
lcl_readURLPatternNode(_aInstalled,sParentURLPattern,_rInstalledDriver);
::rtl::OUString sDriverFactory;
- aURLPatternNode.getNodeValue(s_sDriver) >>= sDriverFactory;
+ aURLPatternNode.getNodeValue("Driver") >>= sDriverFactory;
if ( !sDriverFactory.isEmpty() )
_rInstalledDriver.sDriverFactory = sDriverFactory;
::rtl::OUString sDriverTypeDisplayName;
- aURLPatternNode.getNodeValue(s_sDriverTypeDisplayName) >>= sDriverTypeDisplayName;
+ aURLPatternNode.getNodeValue("DriverTypeDisplayName") >>= sDriverTypeDisplayName;
OSL_ENSURE(!sDriverTypeDisplayName.isEmpty(),"No valid DriverTypeDisplayName property!");
if ( !sDriverTypeDisplayName.isEmpty() )
_rInstalledDriver.sDriverTypeDisplayName = sDriverTypeDisplayName;
- lcl_fillValues(aURLPatternNode,s_sProperties,_rInstalledDriver.aProperties);
- lcl_fillValues(aURLPatternNode,s_sFeatures,_rInstalledDriver.aFeatures);
- lcl_fillValues(aURLPatternNode,s_sMetaData,_rInstalledDriver.aMetaData);
+ lcl_fillValues(aURLPatternNode,"Properties",_rInstalledDriver.aProperties);
+ lcl_fillValues(aURLPatternNode,"Features",_rInstalledDriver.aFeatures);
+ lcl_fillValues(aURLPatternNode,"MetaData",_rInstalledDriver.aMetaData);
}
}
}
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 19a7a0e..96c8e30 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -624,20 +624,17 @@ AcceleratorCache& XMLBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bWriteA
//-----------------------------------------------
::comphelper::Locale XMLBasedAcceleratorConfiguration::impl_ts_getLocale() const
{
- static ::rtl::OUString LOCALE_PACKAGE("/org.openoffice.Setup");
- static ::rtl::OUString LOCALE_PATH("L10N");
- static ::rtl::OUString LOCALE_KEY("ooLocale");
-
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig(xSMGR, LOCALE_PACKAGE, LOCALE_PATH, fpc::ConfigurationHelper::E_READONLY);
+ css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig(xSMGR,
+ "/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY);
css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW);
::rtl::OUString sISOLocale;
- xProp->getPropertyValue(LOCALE_KEY) >>= sISOLocale;
+ xProp->getPropertyValue("ooLocale") >>= sISOLocale;
if (sISOLocale.isEmpty())
return ::comphelper::Locale::EN_US();
@@ -1666,20 +1663,17 @@ AcceleratorCache& XCUBasedAcceleratorConfiguration::impl_getCFG(sal_Bool bPrefer
//-----------------------------------------------
::comphelper::Locale XCUBasedAcceleratorConfiguration::impl_ts_getLocale() const
{
- static ::rtl::OUString LOCALE_PACKAGE("/org.openoffice.Setup");
- static ::rtl::OUString LOCALE_PATH("L10N");
- static ::rtl::OUString LOCALE_KEY("ooLocale");
-
// SAFE -> ----------------------------------
ReadGuard aReadLock(m_aLock);
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
aReadLock.unlock();
// <- SAFE ----------------------------------
- css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig(xSMGR, LOCALE_PACKAGE, LOCALE_PATH, fpc::ConfigurationHelper::E_READONLY);
+ css::uno::Reference< css::uno::XInterface > xCFG = fpc::ConfigurationHelper::openConfig(xSMGR,
+ "/org.openoffice.Setup", "L10N", fpc::ConfigurationHelper::E_READONLY);
css::uno::Reference< css::beans::XPropertySet > xProp (xCFG, css::uno::UNO_QUERY_THROW);
::rtl::OUString sISOLocale;
- xProp->getPropertyValue(LOCALE_KEY) >>= sISOLocale;
+ xProp->getPropertyValue("ooLocale") >>= sISOLocale;
if (sISOLocale.isEmpty())
return ::comphelper::Locale::EN_US();
diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx
index ee88be3..a72d8f2 100644
--- a/framework/source/accelerators/presethandler.cxx
+++ b/framework/source/accelerators/presethandler.cxx
@@ -83,43 +83,37 @@ namespace framework
//-----------------------------------------------
::rtl::OUString PresetHandler::PRESET_DEFAULT()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("default");
- return RSTYPE;
+ return ::rtl::OUString("default");
}
//-----------------------------------------------
::rtl::OUString PresetHandler::TARGET_CURRENT()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("current");
- return RSTYPE;
+ return ::rtl::OUString("current");
}
//-----------------------------------------------
::rtl::OUString PresetHandler::RESOURCETYPE_MENUBAR()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("menubar");
- return RSTYPE;
+ return ::rtl::OUString("menubar");
}
//-----------------------------------------------
::rtl::OUString PresetHandler::RESOURCETYPE_TOOLBAR()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("toolbar");
- return RSTYPE;
+ return ::rtl::OUString("toolbar");
}
//-----------------------------------------------
::rtl::OUString PresetHandler::RESOURCETYPE_ACCELERATOR()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("accelerator");
- return RSTYPE;
+ return ::rtl::OUString("accelerator");
}
//-----------------------------------------------
::rtl::OUString PresetHandler::RESOURCETYPE_STATUSBAR()
{
- static ::rtl::OUString RSTYPE = DECLARE_ASCII("statusbar");
- return RSTYPE;
+ return ::rtl::OUString("statusbar");
}
//-----------------------------------------------
diff --git a/framework/source/classes/taskcreator.cxx b/framework/source/classes/taskcreator.cxx
index 52bc730..644ab54 100644
--- a/framework/source/classes/taskcreator.cxx
+++ b/framework/source/classes/taskcreator.cxx
@@ -103,10 +103,6 @@ TaskCreator::~TaskCreator()
css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const ::rtl::OUString& sName ,
sal_Bool bVisible )
{
- static ::rtl::OUString PACKAGE("org.openoffice.Office.TabBrowse");
- static ::rtl::OUString RELPATH("TaskCreatorService");
- static ::rtl::OUString KEY("ImplementationName");
-
/* SAFE { */
ReadGuard aReadLock( m_aLock );
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
@@ -123,7 +119,11 @@ css::uno::Reference< css::frame::XFrame > TaskCreator::createTask( const ::rtl::
( TargetHelper::matchSpecialTarget(sName, TargetHelper::E_DEFAULT) )
)
{
- ::comphelper::ConfigurationHelper::readDirectKey(xSMGR, PACKAGE, RELPATH, KEY, ::comphelper::ConfigurationHelper::E_READONLY) >>= sCreator;
+ ::comphelper::ConfigurationHelper::readDirectKey(xSMGR,
+ "org.openoffice.Office.TabBrowse",
+ "TaskCreatorService",
+ "ImplementationName",
+ ::comphelper::ConfigurationHelper::E_READONLY) >>= sCreator;
}
xCreator = css::uno::Reference< css::lang::XSingleServiceFactory >(
diff --git a/framework/source/services/taskcreatorsrv.cxx b/framework/source/services/taskcreatorsrv.cxx
index 2f5d4fe..fc1ee34 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -119,23 +119,17 @@ css::uno::Reference< css::uno::XInterface > SAL_CALL TaskCreatorService::createI
throw(css::uno::Exception ,
css::uno::RuntimeException)
{
- static ::rtl::OUString DEFAULTVAL_FRAMENAME = ::rtl::OUString();
- static sal_Bool DEFAULTVAL_MAKEVISIBLE = sal_False;
- static sal_Bool DEFAULTVAL_CREATETOPWINDOW = sal_True;
- static css::awt::Rectangle DEFAULTVAL_POSSIZE = css::awt::Rectangle(0, 0, 0, 0); // only possize=[0,0,0,0] triggers default handling of vcl !
- static sal_Bool DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE = sal_False;
- static sal_Bool DEFAULTVAL_ENABLE_TITLEBARUPDATE = sal_True;
-
::comphelper::SequenceAsHashMap lArgs(lArguments);
css::uno::Reference< css::frame::XFrame > xParentFrame = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_PARENTFRAME) , css::uno::Reference< css::frame::XFrame >());
- ::rtl::OUString sFrameName = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_FRAMENAME) , DEFAULTVAL_FRAMENAME );
- sal_Bool bVisible = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_MAKEVISIBLE) , DEFAULTVAL_MAKEVISIBLE );
- sal_Bool bCreateTopWindow = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_CREATETOPWINDOW) , DEFAULTVAL_CREATETOPWINDOW );
- css::awt::Rectangle aPosSize = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_POSSIZE) , DEFAULTVAL_POSSIZE );
+ ::rtl::OUString sFrameName = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_FRAMENAME) , ::rtl::OUString() );
+ sal_Bool bVisible = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_MAKEVISIBLE) , sal_False );
+ sal_Bool bCreateTopWindow = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_CREATETOPWINDOW) , sal_True );
+ // only possize=[0,0,0,0] triggers default handling of vcl !
+ css::awt::Rectangle aPosSize = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_POSSIZE) , css::awt::Rectangle(0, 0, 0, 0) );
css::uno::Reference< css::awt::XWindow > xContainerWindow = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_CONTAINERWINDOW) , css::uno::Reference< css::awt::XWindow >() );
- sal_Bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE) , DEFAULTVAL_SUPPORTPERSSISTENTWINDOWSTATE );
- sal_Bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_ENABLE_TITLEBARUPDATE) , DEFAULTVAL_ENABLE_TITLEBARUPDATE );
+ sal_Bool bSupportPersistentWindowState = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_SUPPORTPERSISTENTWINDOWSTATE) , sal_False );
+ sal_Bool bEnableTitleBarUpdate = lArgs.getUnpackedValueOrDefault(rtl::OUString(ARGUMENT_ENABLE_TITLEBARUPDATE) , sal_True );
/* SAFE { */
ReadGuard aReadLock( m_aLock );
diff --git a/sax/source/expatwrap/sax_expat.cxx b/sax/source/expatwrap/sax_expat.cxx
index 42e4371..3bb910e 100644
--- a/sax/source/expatwrap/sax_expat.cxx
+++ b/sax/source/expatwrap/sax_expat.cxx
@@ -230,6 +230,7 @@ class SaxExpatParser_Impl
{
public: // module scope
Mutex aMutex;
+ OUString sCDATA;
Reference< XDocumentHandler > rDocumentHandler;
Reference< XExtendedDocumentHandler > rExtendedDocumentHandler;
@@ -263,6 +264,11 @@ public: // module scope
Locale locale;
public:
+ SaxExpatParser_Impl()
+ : sCDATA("CDATA")
+ {
+ }
+
// the C-Callbacks for the expat parser
void static callbackStartElement(void *userData, const XML_Char *name , const XML_Char **atts);
void static callbackEndElement(void *userData, const XML_Char *name);
@@ -789,10 +795,6 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis ,
const XML_Char *pwName ,
const XML_Char **awAttributes )
{
- // in case of two concurrent threads, there is only the danger of an leak,
- // which is neglectable for one string
- static OUString g_CDATA( "CDATA" );
-
SaxExpatParser_Impl *pImpl = ((SaxExpatParser_Impl*)pvThis);
if( pImpl->rDocumentHandler.is() ) {
@@ -804,7 +806,7 @@ void SaxExpatParser_Impl::callbackStartElement( void *pvThis ,
OSL_ASSERT( awAttributes[i+1] );
pImpl->pAttrList->addAttribute(
XML_CHAR_TO_OUSTRING( awAttributes[i] ) ,
- g_CDATA , // expat doesn't know types
+ pImpl->sCDATA, // expat doesn't know types
XML_CHAR_TO_OUSTRING( awAttributes[i+1] ) );
i +=2;
}
diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx
index 92979de..c0b2139 100644
--- a/sd/source/ui/app/sdmod2.cxx
+++ b/sd/source/ui/app/sdmod2.cxx
@@ -258,10 +258,7 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
aRepresentation = pDoc->CreatePageNumValue((sal_uInt16)nPgNum);
}
else
- {
- static String aNumberText( SdResId( STR_FIELD_PLACEHOLDER_NUMBER ) );
- aRepresentation = aNumberText;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_NUMBER).toString();
pInfo->SetRepresentation( aRepresentation );
}
@@ -298,14 +295,9 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
}
if( nPageCount > 0 )
- {
aRepresentation = pDoc->CreatePageNumValue(nPageCount);
- }
else
- {
- static String aNumberText( SdResId( STR_FIELD_PLACEHOLDER_COUNT ) );
- aRepresentation = aNumberText;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_COUNT).toString();
pInfo->SetRepresentation( aRepresentation );
}
@@ -351,20 +343,11 @@ IMPL_LINK(SdModule, CalcFieldValueHdl, EditFieldInfo*, pInfo)
if( (pPage == NULL) || bMasterView )
{
if( bHeaderField )
- {
- static String aHeaderStr( SdResId( STR_FIELD_PLACEHOLDER_HEADER ) );
- aRepresentation = aHeaderStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_HEADER).toString();
else if (bFooterField )
- {
- static String aFooterStr( SdResId( STR_FIELD_PLACEHOLDER_FOOTER ) );
- aRepresentation = aFooterStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_FOOTER).toString();
else if (bDateTimeField )
- {
- static String aDateTimeStr( SdResId( STR_FIELD_PLACEHOLDER_DATETIME ) );
- aRepresentation = aDateTimeStr;
- }
+ aRepresentation = SdResId(STR_FIELD_PLACEHOLDER_DATETIME).toString();
}
else
{
diff --git a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
index 0b05ca4..048fb49 100644
--- a/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicToolBarFactory.cxx
@@ -64,7 +64,7 @@ Reference<XInterface> SAL_CALL BasicToolBarFactory_createInstance (
Sequence<rtl::OUString> SAL_CALL BasicToolBarFactory_getSupportedServiceNames (void)
throw (RuntimeException)
{
- static const ::rtl::OUString sServiceName("com.sun.star.drawing.framework.BasicToolBarFactory");
+ const ::rtl::OUString sServiceName("com.sun.star.drawing.framework.BasicToolBarFactory");
return Sequence<rtl::OUString>(&sServiceName, 1);
}
diff --git a/sd/source/ui/framework/factories/TaskPanelFactory.cxx b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
index fe5cd6c..eda39de 100644
--- a/sd/source/ui/framework/factories/TaskPanelFactory.cxx
+++ b/sd/source/ui/framework/factories/TaskPanelFactory.cxx
@@ -63,7 +63,7 @@ Reference<XInterface> SAL_CALL TaskPanelFactory_createInstance (
Sequence<rtl::OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
throw (RuntimeException)
{
- static const OUString sServiceName("com.sun.star.drawing.framework.TaskPanelFactory");
+ const OUString sServiceName("com.sun.star.drawing.framework.TaskPanelFactory");
return Sequence<rtl::OUString>(&sServiceName, 1);
}
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index fc82306..2d467c5 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -202,31 +202,15 @@ SFX_IMPL_ONEINSTANCEFACTORY( SfxApplicationScriptLibraryContainer )
Sequence< OUString > SfxApplicationScriptLibraryContainer::impl_getStaticSupportedServiceNames()
{
- static Sequence< OUString > seqServiceNames( 1 );
- static sal_Bool bNeedsInit = sal_True;
-
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if( bNeedsInit )
- {
- OUString* pSeq = seqServiceNames.getArray();
- pSeq[0] = OUString("com.sun.star.script.ApplicationScriptLibraryContainer");
- bNeedsInit = sal_False;
- }
+ Sequence< OUString > seqServiceNames( 1 );
+ OUString* pSeq = seqServiceNames.getArray();
+ pSeq[0] = OUString("com.sun.star.script.ApplicationScriptLibraryContainer");
return seqServiceNames;
}
OUString SfxApplicationScriptLibraryContainer::impl_getStaticImplementationName()
{
- static OUString aImplName;
- static sal_Bool bNeedsInit = sal_True;
-
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if( bNeedsInit )
- {
- aImplName = OUString("com.sun.star.comp.sfx2.ApplicationScriptLibraryContainer");
- bNeedsInit = sal_False;
- }
- return aImplName;
+ return OUString("com.sun.star.comp.sfx2.ApplicationScriptLibraryContainer");
}
Reference< XInterface > SAL_CALL SfxApplicationScriptLibraryContainer::impl_createInstance
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 472a6e7..f4e9fcb 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -109,9 +109,6 @@ void SAL_CALL SfxTerminateListener_Impl::queryTermination( const EventObject& )
void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& aEvent ) throw(RuntimeException )
{
- static ::rtl::OUString SERVICE_GLOBALEVENTBROADCASTER("com.sun.star.frame.GlobalEventBroadcaster");
- static ::rtl::OUString EVENT_QUIT_APP ("OnCloseApp");
-
Reference< XDesktop > xDesktop( aEvent.Source, UNO_QUERY );
if( xDesktop.is() == sal_True )
xDesktop->removeTerminateListener( this );
@@ -125,11 +122,11 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
pApp->Get_Impl()->pAppDispatch->release();
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
- css::uno::Reference< css::document::XEventListener > xGlobalBroadcaster(xSMGR->createInstance(SERVICE_GLOBALEVENTBROADCASTER), css::uno::UNO_QUERY);
+ css::uno::Reference< css::document::XEventListener > xGlobalBroadcaster(xSMGR->createInstance("com.sun.star.frame.GlobalEventBroadcaster"), css::uno::UNO_QUERY);
if (xGlobalBroadcaster.is())
{
css::document::EventObject aEvent2;
- aEvent2.EventName = EVENT_QUIT_APP;
+ aEvent2.EventName = "OnCloseApp";
xGlobalBroadcaster->notifyEvent(aEvent2);
}
@@ -139,8 +136,7 @@ void SAL_CALL SfxTerminateListener_Impl::notifyTermination( const EventObject& a
::rtl::OUString SAL_CALL SfxTerminateListener_Impl::getImplementationName() throw (RuntimeException)
{
- static const ::rtl::OUString IMPLNAME("com.sun.star.comp.sfx2.SfxTerminateListener");
- return IMPLNAME;
+ return ::rtl::OUString("com.sun.star.comp.sfx2.SfxTerminateListener");
}
::sal_Bool SAL_CALL SfxTerminateListener_Impl::supportsService( const ::rtl::OUString& sServiceName ) throw (RuntimeException)
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 3d04c97..996278f 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -390,20 +390,17 @@ String SfxObjectFactory::GetFactoryURL() const
String SfxObjectFactory::GetModuleName() const
{
- static ::rtl::OUString SERVICENAME_MODULEMANAGER("com.sun.star.frame.ModuleManager");
- static ::rtl::OUString PROP_MODULEUINAME ("ooSetupFactoryUIName");
-
try
{
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
css::uno::Reference< css::container::XNameAccess > xModuleManager(
- xSMGR->createInstance(SERVICENAME_MODULEMANAGER),
+ xSMGR->createInstance("com.sun.star.frame.ModuleManager"),
css::uno::UNO_QUERY_THROW);
::rtl::OUString sDocService(GetDocumentServiceName());
::comphelper::SequenceAsHashMap aPropSet( xModuleManager->getByName(sDocService) );
- ::rtl::OUString sModuleName = aPropSet.getUnpackedValueOrDefault(PROP_MODULEUINAME, ::rtl::OUString());
+ ::rtl::OUString sModuleName = aPropSet.getUnpackedValueOrDefault("ooSetupFactoryUIName", ::rtl::OUString());
return String(sModuleName);
}
catch(const css::uno::RuntimeException&)
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 3bcbf2d..371264f 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -421,8 +421,8 @@ namespace sfx2
{
try
{
- static const ::rtl::OUString s_sBasicStorageName( ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ) );
- static const ::rtl::OUString s_sScriptsStorageName( ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Scripts" ) ) );
+ const ::rtl::OUString s_sBasicStorageName( ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Basic" ) ) );
+ const ::rtl::OUString s_sScriptsStorageName( ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( "Scripts" ) ) );
bHasMacros =( ( rxStorage->hasByName( s_sBasicStorageName )
&& rxStorage->isStorageElement( s_sBasicStorageName )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 5bddcfe..be44438 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -481,12 +481,9 @@ SfxSaveGuard::SfxSaveGuard(const uno::Reference< frame::XModel >& xM
, m_pData (pData )
, m_pFramesLock(0 )
{
- static ::rtl::OUString MSG_1("Object already disposed.");
- static ::rtl::OUString MSG_2("Concurrent save requests on the same document are not possible.");
-
if ( m_pData->m_bClosed )
throw ::com::sun::star::lang::DisposedException(
- MSG_1,
+ ::rtl::OUString("Object already disposed."),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >());
if (
@@ -494,7 +491,7 @@ SfxSaveGuard::SfxSaveGuard(const uno::Reference< frame::XModel >& xM
m_pData->m_bSaving
)
throw ::com::sun::star::io::IOException(
- MSG_2,
+ ::rtl::OUString("Concurrent save requests on the same document are not possible."),
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >());
m_pData->m_bSaving = sal_True;
@@ -1473,8 +1470,6 @@ void SAL_CALL SfxBaseModel::removeModifyListener(const uno::Reference< XMODIFYLI
void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::CloseVetoException, uno::RuntimeException)
{
- static ::rtl::OUString MSG_1("Cant close while saving.");
-
SolarMutexGuard aGuard;
if ( impl_isDisposed() || m_pData->m_bClosed || m_pData->m_bClosing )
return;
@@ -1503,7 +1498,7 @@ void SAL_CALL SfxBaseModel::close( sal_Bool bDeliverOwnership ) throw (util::Clo
if (bDeliverOwnership)
m_pData->m_bSuicide = sal_True;
throw util::CloseVetoException(
- MSG_1,
+ ::rtl::OUString("Cant close while saving."),
static_cast< ::com::sun::star::util::XCloseable* >(this));
}
@@ -3739,7 +3734,7 @@ css::uno::Reference< css::frame::XTitle > SfxBaseModel::impl_getTitleHelper ()
if ( ! m_pData->m_xTitleHelper.is ())
{
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory ();
- static const ::rtl::OUString SERVICENAME_DESKTOP("com.sun.star.frame.Desktop");
+ const ::rtl::OUString SERVICENAME_DESKTOP("com.sun.star.frame.Desktop");
css::uno::Reference< css::frame::XUntitledNumbers > xDesktop(xSMGR->createInstance(SERVICENAME_DESKTOP), css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::frame::XModel > xThis (static_cast< css::frame::XModel* >(this), css::uno::UNO_QUERY_THROW);
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index ce4e3ac..ac0764f 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -594,8 +594,7 @@ Sequence< OUString > filepolicy_getSupportedServiceNames() SAL_THROW(())
//--------------------------------------------------------------------------------------------------
OUString filepolicy_getImplementationName() SAL_THROW(())
{
- static OUString s_implName = OUSTR(IMPL_NAME);
- return s_implName;
+ return OUSTR(IMPL_NAME);
}
}
diff --git a/svtools/source/filter/FilterConfigCache.cxx b/svtools/source/filter/FilterConfigCache.cxx
index 79743cf..f0b6a5f 100644
--- a/svtools/source/filter/FilterConfigCache.cxx
+++ b/svtools/source/filter/FilterConfigCache.cxx
@@ -117,7 +117,7 @@ String FilterConfigCache::FilterConfigCacheEntry::GetShortName()
@param sPackage
specify, which config package should be opened.
- Must be one of the defined static values TYPEPKG or FILTERPKG.
+ Must be one of "types" or "filters"
@return A valid object if open was successfull. The access on opened
data will be readonly. It returns NULL in case open failed.
@@ -127,9 +127,6 @@ String FilterConfigCache::FilterConfigCacheEntry::GetShortName()
Reference< XInterface > openConfig(const char* sPackage)
throw(RuntimeException)
{
- static OUString TYPEPKG( "types" );
- static OUString FILTERPKG( "filters" );
-
Reference< XMultiServiceFactory > xSMGR(
comphelper::getProcessServiceFactory() );
Reference< XInterface > xCfg;
@@ -146,9 +143,9 @@ Reference< XInterface > openConfig(const char* sPackage)
// define cfg path for open
aParam.Name = OUString( "nodepath" );
- if (TYPEPKG.equalsIgnoreAsciiCaseAscii(sPackage))
+ if (rtl_str_compareIgnoreAsciiCase(sPackage, "types") == 0)
aParam.Value <<= OUString( "/org.openoffice.TypeDetection.Types/Types" );
- if (FILTERPKG.equalsIgnoreAsciiCaseAscii(sPackage))
+ if (rtl_str_compareIgnoreAsciiCase(sPackage, "filters") == 0)
aParam.Value <<= OUString( "/org.openoffice.TypeDetection.GraphicFilter/Filters" );
lParams[0] = makeAny(aParam);
@@ -167,14 +164,14 @@ Reference< XInterface > openConfig(const char* sPackage)
void FilterConfigCache::ImplInit()
{
- static OUString STYPE ( "Type" );
- static OUString SUINAME ( "UIName" );
- static OUString SUICOMPONENT ( "UIComponent" );
- static OUString SFLAGS ( "Flags" );
- static OUString SMEDIATYPE ( "MediaType" );
- static OUString SEXTENSIONS ( "Extensions" );
- static OUString SFORMATNAME ( "FormatName" );
- static OUString SREALFILTERNAME ( "RealFilterName" );
+ OUString STYPE ( "Type" );
+ OUString SUINAME ( "UIName" );
+ OUString SUICOMPONENT ( "UIComponent" );
+ OUString SFLAGS ( "Flags" );
+ OUString SMEDIATYPE ( "MediaType" );
+ OUString SEXTENSIONS ( "Extensions" );
+ OUString SFORMATNAME ( "FormatName" );
+ OUString SREALFILTERNAME ( "RealFilterName" );
// get access to config
Reference< XNameAccess > xTypeAccess ( openConfig("types" ), UNO_QUERY );
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index 27dfa6e..a792011 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -167,8 +167,7 @@ void SAL_CALL RecoveryUI::removeStatusListener(const css::uno::Reference< css::f
//===============================================
::rtl::OUString RecoveryUI::st_getImplementationName()
{
- static ::rtl::OUString IMPLEMENTATIONNAME = IMPLEMENTATIONNAME_RECOVERYUI;
- return IMPLEMENTATIONNAME;
+ return ::rtl::OUString(IMPLEMENTATIONNAME_RECOVERYUI);
}
//===============================================
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 07ae774..0130017 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -163,15 +163,6 @@ typedef Bootstrap::PathStatus PathStatus;
sal_Unicode const cURLSeparator = '/';
// ---------------------------------------------------------------------------------------
-static
-inline
-OUString getURLSeparator()
-{
- static OUString theSep(&cURLSeparator,1);
- return theSep;
-}
-
-// ---------------------------------------------------------------------------------------
// path status utility function
static
PathStatus implCheckStatusOfURL(OUString const& _sURL, osl::DirectoryItem& aDirItem)
@@ -263,28 +254,7 @@ bool implEnsureAbsolute(OUString & _rsURL) // also strips embedded dots !!
return false;
}
}
-/* old code to strip embedded dots
- static OUString const sDots(RTL_CONSTASCII_USTRINGPARAM("/.."));
-
- sal_Int32 nDotsIndex = _rsURL.indexOf(sDots);
- while (nDotsIndex >= 0)
- {
- OSL_ASSERT(_rsURL.indexOf(sDots) == nDotsIndex);
-
- sal_Int32 nStripIndex = _rsURL.lastIndexOf(cURLSeparator,nDotsIndex);
- if (nStripIndex < 0 || nStripIndex+1 == nDotsIndex)
- {
- OSL_TRACE("Invalid use of dots in bootstrap URL");
- return false;
- }
- _rsURL = _rsURL.copy(0,nStripIndex) + _rsURL.copy(nDotsIndex + sDots.getLength());
-
- nDotsIndex = _rsURL.indexOf(sDots,nStripIndex);
- }
- return true;
-}
-*/
// ---------------------------------------------------------------------------------------
static
@@ -365,7 +335,6 @@ PathStatus getDerivedPath(
)
{
OUString sDerivedURL;
-
OSL_PRECOND(!_rData.getFrom(_sBootstrapParameter,sDerivedURL),"Setting for derived path is already defined");
OSL_PRECOND(!_sRelativeURL.isEmpty() && _sRelativeURL[0] != cURLSeparator,"Invalid Relative URL");
@@ -376,7 +345,7 @@ PathStatus getDerivedPath(
{
OSL_PRECOND(_aBaseURL[_aBaseURL.getLength()-1] != cURLSeparator,"Unexpected: base URL ends in slash");
- sDerivedURL = _aBaseURL + getURLSeparator() + _sRelativeURL;
+ sDerivedURL = rtl::OUStringBuffer(_aBaseURL).append(cURLSeparator).append(_sRelativeURL).makeStringAndClear();
// a derived (nested) URL can only exist or have a lesser status, if the parent exists
if (aStatus == Bootstrap::PATH_EXISTS)
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index 9c6f01e..168191e 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -697,9 +697,8 @@ void lcl_normalizeLocalNames(Sequence< OUString >& _rNames, ConfigNameFormat _eF
}
else
{
- static const OUString sSetService(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.SetAccess"));
Reference<XServiceInfo> xSVI(_xParentNode, UNO_QUERY);
- if (xSVI.is() && xSVI->supportsService(sSetService))
+ if (xSVI.is() && xSVI->supportsService("com.sun.star.configuration.SetAccess"))
{
OUString * pNames = _rNames.getArray();
for(int i = 0; i<_rNames.getLength(); ++i)
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 3c290d7..5f933e8 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -488,19 +488,14 @@ namespace utl
//========================================================================
namespace
{
- //--------------------------------------------------------------------
- static const ::rtl::OUString& lcl_getProviderServiceName( )
- {
- static ::rtl::OUString s_sProviderServiceName( "com.sun.star.configuration.ConfigurationProvider" );
- return s_sProviderServiceName;
- }
+ static const char s_sProviderServiceName[] = "com.sun.star.configuration.ConfigurationProvider";
//--------------------------------------------------------------------
Reference< XMultiServiceFactory > lcl_getConfigProvider( const ::comphelper::ComponentContext& i_rContext )
{
try
{
- Reference< XMultiServiceFactory > xProvider( i_rContext.createComponent( lcl_getProviderServiceName() ), UNO_QUERY_THROW );
+ Reference< XMultiServiceFactory > xProvider( i_rContext.createComponent(s_sProviderServiceName), UNO_QUERY_THROW );
return xProvider;
}
catch ( const Exception& )
@@ -614,7 +609,7 @@ namespace utl
{
try
{
- Reference< XMultiServiceFactory > xConfigFactory( _rxORB->createInstance( lcl_getProviderServiceName( ) ), UNO_QUERY );
+ Reference< XMultiServiceFactory > xConfigFactory( _rxORB->createInstance(s_sProviderServiceName), UNO_QUERY );
if ( xConfigFactory.is() )
return createWithProvider( xConfigFactory, _rPath, _nDepth, _eMode, _bLazyWrite );
}
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index e4f483d..fddd2ac 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -282,8 +282,6 @@ rtl::OUString URLParameter::get_the_jar()
void URLParameter::readBerkeley()
{
- static rtl::OUString aQuestionMark("?");
-
if( get_id().compareToAscii("") == 0 )
return;
@@ -344,9 +342,9 @@ void URLParameter::readBerkeley()
if( !aExtensionPath.isEmpty() )
{
rtl::OUStringBuffer aExtendedJarStrBuf;
- aExtendedJarStrBuf.append( aQuestionMark );
+ aExtendedJarStrBuf.append( '?' );
aExtendedJarStrBuf.append( aExtensionPath );
- aExtendedJarStrBuf.append( aQuestionMark );
+ aExtendedJarStrBuf.append( '?' );
aExtendedJarStrBuf.append( m_aJar );
m_aJar = aExtendedJarStrBuf.makeStringAndClear();
m_aExtensionRegistryPath = aExtensionRegistryPath;
commit 2ce31e56efaf1e429ecc13fd80b6767cb9ea585b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 11:55:50 2012 +0100
unused static rtl::OUStrings
Change-Id: I27e42935c91a3dffc9a8d772c9d5c4bd0984126f
diff --git a/sd/inc/strmname.h b/sd/inc/strmname.h
index ca8aae4..bf2fabd 100644
--- a/sd/inc/strmname.h
+++ b/sd/inc/strmname.h
@@ -29,17 +29,6 @@
#ifndef _SD_STRMNAME_H
#define _SD_STRMNAME_H
-// Alter Name des Dokument-Streams
-static const rtl::OUString pStarDrawDoc("StarDrawDocument");
-
-// Name des Dokument-Streams
-static const rtl::OUString pStarDrawDoc3( "StarDrawDocument3" );
-
-// Sonstige
-static const rtl::OUString pSfxStyleSheets( "SfxStyleSheets" );
-static const rtl::OUString pVCItemPoolName( "VCPool" );
-static const rtl::OUString pPreviewName( "StarDrawTemplatePreview" );
-
// PowerPoint-Filter
static const rtl::OUString pFilterPowerPoint97( "MS PowerPoint 97" );
static const rtl::OUString pFilterPowerPoint97Template( "MS PowerPoint 97 Vorlage" );
commit fcda0878e99d5792e150705f63f3ba25b5d8d14c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 10:54:22 2012 +0100
merge 3 copy and paste efforts back together as bestFitOpenSymbolToMSFont
Change-Id: Ia830af58a1e2b80e85b2748b4acceb0bfc340afc
diff --git a/filter/inc/filter/msfilter/util.hxx b/filter/inc/filter/msfilter/util.hxx
index ff52209..d772a24 100644
--- a/filter/inc/filter/msfilter/util.hxx
+++ b/filter/inc/filter/msfilter/util.hxx
@@ -59,6 +59,17 @@ to find it, unfortunately :-(
*/
MSFILTER_DLLPUBLIC rtl::OString DateTimeToOString( const DateTime& rDateTime );
+/// Given a cBullet in encoding r_ioChrSet and fontname r_ioFontName return a
+/// suitable new Bullet and change r_ioChrSet and r_ioFontName to form the
+/// best-fit replacement in terms of default available MSOffice symbol
+/// fonts.
+///
+/// Set bDisableUnicodeSupport when exporting to 8bit encodings
+///
+/// Used to map from [Open|Star]Symbol to some Windows font or other.
+MSFILTER_DLLPUBLIC sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cBullet,
+ rtl_TextEncoding& r_ioChrSet, rtl::OUString& r_ioFontName, bool bDisableUnicodeSupport = false);
+
}
}
diff --git a/filter/source/msfilter/util.cxx b/filter/source/msfilter/util.cxx
index adfe492..ddb9f14 100644
--- a/filter/source/msfilter/util.cxx
+++ b/filter/source/msfilter/util.cxx
@@ -28,6 +28,8 @@
#include <rtl/ustring.hxx>
#include <rtl/strbuf.hxx>
+#include <unotools/fontcvt.hxx>
+#include <unotools/fontdefs.hxx>
#include <vcl/svapp.hxx>
#include <filter/msfilter/util.hxx>
@@ -140,6 +142,43 @@ rtl::OString DateTimeToOString( const DateTime& rDateTime )
return aBuffer.makeStringAndClear();
}
+sal_Unicode bestFitOpenSymbolToMSFont(sal_Unicode cChar,
+ rtl_TextEncoding& rChrSet, rtl::OUString& rFontName, bool bDisableUnicodeSupport)
+{
+ StarSymbolToMSMultiFont *pConvert = CreateStarSymbolToMSMultiFont();
+ rtl::OUString sFont = pConvert->ConvertChar(cChar);
+ delete pConvert;
+ if (!sFont.isEmpty())
+ {
+ cChar = static_cast< sal_Unicode >(cChar | 0xF000);
+ rFontName = sFont;
+ rChrSet = RTL_TEXTENCODING_SYMBOL;
+ }
+ else if (!bDisableUnicodeSupport && (cChar < 0xE000 || cChar > 0xF8FF))
+ {
+ /*
+ Ok we can't fit into a known windows unicode font, but
+ we are not in the private area, so we are a
+ standardized symbol, so turn off the symbol bit and
+ let words own font substitution kick in
+ */
+ rChrSet = RTL_TEXTENCODING_UNICODE;
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
+ }
+ else
+ {
+ /*
+ Well we don't have an available substition, and we're
+ in our private area, so give up and show a standard
+ bullet symbol
+ */
+ rFontName = "Wingdings";
+ cChar = static_cast< sal_Unicode >(0x6C);
+ }
+ return cChar;
+}
+
}
}
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index aae83ab..c4396fe 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -66,15 +66,15 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <tools/stream.hxx>
#include <tools/string.hxx>
-#include <vcl/cvtgrf.hxx>
-#include <unotools/fontcvt.hxx>
#include <unotools/fontdefs.hxx>
+#include <vcl/cvtgrf.hxx>
#include <vcl/graph.hxx>
#include <svtools/grfmgr.hxx>
#include <rtl/strbuf.hxx>
#include <sfx2/app.hxx>
#include <svl/languageoptions.hxx>
#include <filter/msfilter/escherex.hxx>
+#include <filter/msfilter/util.hxx>
#include <editeng/svxenum.hxx>
using namespace ::com::sun::star;
@@ -1427,59 +1427,17 @@ void DrawingML::WriteConnectorConnections( EscherConnectorListEntry& rConnectorE
FSEND );
}
-// from sw/source/filter/ww8/wrtw8num.cxx for default bullets to export to MS intact
-static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, String& rFontName)
-{
- sal_Unicode cChar = rNumStr.GetChar(0);
- StarSymbolToMSMultiFont *pConvert = CreateStarSymbolToMSMultiFont();
- String sFont = pConvert->ConvertChar(cChar);
- delete pConvert;
- if (sFont.Len())
- {
- rNumStr = static_cast< sal_Unicode >(cChar | 0xF000);
- rFontName = sFont;
- rChrSet = RTL_TEXTENCODING_SYMBOL;
- }
- else if ( (rNumStr.GetChar(0) < 0xE000 || rNumStr.GetChar(0) > 0xF8FF) )
- {
- /*
- Ok we can't fit into a known windows unicode font, but
- we are not in the private area, so we are a
- standardized symbol, so turn off the symbol bit and
- let words own font substitution kick in
- */
- rChrSet = RTL_TEXTENCODING_UNICODE;
- xub_StrLen nIndex = 0;
- rFontName = ::GetNextFontToken(rFontName, nIndex);
- }
- else
- {
- /*
- Well we don't have an available substition, and we're
- in our private area, so give up and show a standard
- bullet symbol
- */
- rFontName.AssignAscii(RTL_CONSTASCII_STRINGPARAM("Wingdings"));
- rNumStr = static_cast< sal_Unicode >(0x6C);
- }
-}
-
sal_Unicode DrawingML::SubstituteBullet( sal_Unicode cBulletId, ::com::sun::star::awt::FontDescriptor& rFontDesc )
{
- String sNumStr = cBulletId;
-
if ( rFontDesc.Name.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("starsymbol")) ||
- rFontDesc.Name.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("opensymbol")) ) {
- String sFontName = rFontDesc.Name;
- rtl_TextEncoding aCharSet = rFontDesc.CharSet;
-
- lcl_SubstituteBullet( sNumStr, aCharSet, sFontName );
-
- rFontDesc.Name = sFontName;
- rFontDesc.CharSet = aCharSet;
+ rFontDesc.Name.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("opensymbol")) )
+ {
+ rtl_TextEncoding eCharSet = rFontDesc.CharSet;
+ cBulletId = msfilter::util::bestFitOpenSymbolToMSFont(cBulletId, eCharSet, rFontDesc.Name);
+ rFontDesc.CharSet = eCharSet;
}
- return sNumStr.GetChar( 0 );
+ return cBulletId;
}
sax_fastparser::FSHelperPtr DrawingML::CreateOutputStream (
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index 5f9a08c..f264c7c 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -48,11 +48,11 @@
#include <comphelper/processfactory.hxx>
#include <editeng/svxenum.hxx>
#include <editeng/frmdir.hxx>
+#include <filter/msfilter/util.hxx>
#include <i18nutil/scripttypedetector.hxx>
#include <sfx2/app.hxx>
#include <svl/languageoptions.hxx>
#include <oox/export/drawingml.hxx> // for SubstituteBullet
-#include <unotools/fontcvt.hxx>
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
@@ -746,43 +746,6 @@ void ParagraphObj::CalculateGraphicBulletSize( sal_uInt16 nFontHeight )
}
}
-// from sw/source/filter/ww8/wrtw8num.cxx for default bullets to export to MS intact
-static void lcl_SubstituteBullet(rtl::OUString& rNumStr, rtl_TextEncoding& rChrSet, rtl::OUString& rFontName)
-{
- sal_Unicode cChar = rNumStr[0];
- StarSymbolToMSMultiFont *pConvert = CreateStarSymbolToMSMultiFont();
- rtl::OUString sFont = pConvert->ConvertChar(cChar);
- delete pConvert;
- if (!sFont.isEmpty())
- {
- rNumStr = rtl::OUString(static_cast< sal_Unicode >(cChar | 0xF000));
- rFontName = sFont;
- rChrSet = RTL_TEXTENCODING_SYMBOL;
- }
- else if ( (rNumStr[0] < 0xE000 || rNumStr[0] > 0xF8FF) )
- {
- /*
- Ok we can't fit into a known windows unicode font, but
- we are not in the private area, so we are a
- standardized symbol, so turn off the symbol bit and
- let words own font substitution kick in
- */
- rChrSet = RTL_TEXTENCODING_UNICODE;
- xub_StrLen nIndex = 0;
- rFontName = ::GetNextFontToken(rFontName, nIndex);
- }
- else
- {
- /*
- Well we don't have an available substition, and we're
- in our private area, so give up and show a standard
- bullet symbol
- */
- rFontName = "Wingdings";
- rNumStr = rtl::OUString(static_cast< sal_Unicode >(0x6C));
- }
-}
-
void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int16 nNumberingDepth, sal_Bool bIsBullet, sal_Bool bGetPropStateValue )
{
::com::sun::star::uno::Any aAny;
@@ -930,16 +893,12 @@ void ParagraphObj::ImplGetNumberingLevel( PPTExBulletProvider& rBuProv, sal_Int1
case SVX_NUM_CHAR_SPECIAL : // Bullet
{
- if ( aFontDesc.Name.equals("starsymbol") || aFontDesc.Name.equals("opensymbol") )
+ if ( aFontDesc.Name.equals("starsymbol") || aFontDesc.Name.equals("opensymbol") )
{
- rtl::OUString sFontName(aFontDesc.Name);
- rtl::OUString sNumStr(cBulletId);
rtl_TextEncoding eChrSet = aFontDesc.CharSet;
- lcl_SubstituteBullet(sNumStr,eChrSet,sFontName);
- aFontDesc.Name = sFontName;
- cBulletId = sNumStr[ 0 ];
+ cBulletId = msfilter::util::bestFitOpenSymbolToMSFont(cBulletId, eChrSet, aFontDesc.Name);
aFontDesc.CharSet = eChrSet;
- }
+ }
if ( !aFontDesc.Name.isEmpty() )
{
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 5e22ae0..2ac82b1 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -693,48 +693,12 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
void MSWordExportBase::SubstituteBullet( String& rNumStr,
rtl_TextEncoding& rChrSet, String& rFontName ) const
{
- StarSymbolToMSMultiFont *pConvert = 0;
-
if (!bSubstituteBullets)
return;
-
- if (!pConvert)
- {
- pConvert = CreateStarSymbolToMSMultiFont();
- }
- sal_Unicode cChar = rNumStr.GetChar(0);
- String sFont = pConvert->ConvertChar(cChar);
-
- if (sFont.Len())
- {
- rNumStr = static_cast< sal_Unicode >(cChar | 0xF000);
- rFontName = sFont;
- rChrSet = RTL_TEXTENCODING_SYMBOL;
- }
- else if ( SupportsUnicode() &&
- (rNumStr.GetChar(0) < 0xE000 || rNumStr.GetChar(0) > 0xF8FF) )
- {
- /*
- Ok we can't fit into a known windows unicode font, but
- we are not in the private area, so we are a
- standardized symbol, so turn off the symbol bit and
- let words own font substitution kick in
- */
- rChrSet = RTL_TEXTENCODING_UNICODE;
- xub_StrLen nIndex = 0;
- rFontName = ::GetNextFontToken(rFontName, nIndex);
- }
- else
- {
- /*
- Well we don't have an available substition, and we're
- in our private area, so give up and show a standard
- bullet symbol
- */
- rFontName.ASSIGN_CONST_ASC("Wingdings");
- rNumStr = static_cast< sal_Unicode >(0x6C);
- }
- delete pConvert;
+ rtl::OUString sFontName = rFontName;
+ rNumStr.SetChar(0, msfilter::util::bestFitOpenSymbolToMSFont(rNumStr.GetChar(0),
+ rChrSet, sFontName, !SupportsUnicode()));
+ rFontName = sFontName;
}
static void SwWw8_InsertAnlText( const String& rStr, sal_uInt8*& rpCh,
commit 4186f6aeff62f894f7e3bdfbee403cb6c99495b4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 10:12:41 2012 +0100
duplicate bSubstituteBullets conditional
Change-Id: I48b6922fc412479acc10a6eeccb926e5b89aa390
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 52a50cb..5e22ae0 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -698,9 +698,6 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
if (!bSubstituteBullets)
return;
- if (!bSubstituteBullets)
- return;
-
if (!pConvert)
{
pConvert = CreateStarSymbolToMSMultiFont();
commit 4ce70ccc2d62769b138144de7798bf839ddd00f2
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 10:07:55 2012 +0100
TODO: get rid of this in another incompatible build with SW project
Change-Id: Ic3fb0c8eb37317d55bcdc6abc7ff9843ba11fac6
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b6e67c8..aae83ab 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1449,7 +1449,8 @@ static void lcl_SubstituteBullet(String& rNumStr, rtl_TextEncoding& rChrSet, Str
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx
index a22081e..5f9a08c 100644
--- a/sd/source/filter/eppt/pptx-text.cxx
+++ b/sd/source/filter/eppt/pptx-text.cxx
@@ -768,7 +768,8 @@ static void lcl_SubstituteBullet(rtl::OUString& rNumStr, rtl_TextEncoding& rChrS
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 97038a7..69114a4 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -631,7 +631,8 @@ namespace sw
bool IsStarSymbol(const rtl::OUString &rFontName)
{
- rtl::OUString sFamilyNm(GetFontToken(rFontName, 0));
+ xub_StrLen nIndex = 0;
+ rtl::OUString sFamilyNm(GetNextFontToken(rFontName, nIndex));
return (sFamilyNm.equalsIgnoreAsciiCase("starsymbol") ||
sFamilyNm.equalsIgnoreAsciiCase("opensymbol"));
}
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index f731c5d..8816e7b 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -458,10 +458,11 @@ namespace sw
FontMapExport::FontMapExport(const String &rFamilyName)
{
- msPrimary = GetFontToken(rFamilyName, 0);
+ xub_StrLen nIndex = 0;
+ msPrimary = GetNextFontToken(rFamilyName, nIndex);
msSecondary = myImplHelpers::FindBestMSSubstituteFont(msPrimary);
- if (!msSecondary.Len())
- msSecondary = GetFontToken(rFamilyName, 1);
+ if (!msSecondary.Len() && nIndex != STRING_NOTFOUND)
+ msSecondary = GetNextFontToken(rFamilyName, nIndex);
}
bool ItemSort::operator()(sal_uInt16 nA, sal_uInt16 nB) const
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index bbcf244..52a50cb 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -724,7 +724,8 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
let words own font substitution kick in
*/
rChrSet = RTL_TEXTENCODING_UNICODE;
- rFontName = ::GetFontToken(rFontName, 0);
+ xub_StrLen nIndex = 0;
+ rFontName = ::GetNextFontToken(rFontName, nIndex);
}
else
{
diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx
index 84c3857..df79a0f 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -39,17 +39,6 @@ namespace utl {
UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, sal_uLong nFlags );
-// -----------------
-// - FontTokenName -
-// -----------------
-
-UNOTOOLS_DLLPUBLIC String GetFontToken( const String& rName, xub_StrLen nToken, xub_StrLen& rIndex );
-inline String GetFontToken( const String& rName, xub_StrLen nToken )
-{
- xub_StrLen nTempIndex = 0;
- return GetFontToken( rName, nToken, nTempIndex );
-}
-
UNOTOOLS_DLLPUBLIC void AddTokenFontName( String& rName, const String& rNewToken );
struct UNOTOOLS_DLLPUBLIC FontNameHash { int operator()(const String&) const; };
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index ed5aa94..445ea23 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -477,17 +477,6 @@ String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex )
return String( rTokenStr, nTokenStart, nTokenLen );
}
-// TODO: get rid of this in another incompatible build with SW project.
-// SW's WW8 and RTF filters still use this (from fontcvt.hxx)
-String GetFontToken( const String& rTokenStr, xub_StrLen nToken, xub_StrLen& rIndex )
-{
- // skip nToken Tokens
- for( xub_StrLen i = 0; (i < nToken) && (rIndex != STRING_NOTFOUND); ++i )
- GetNextFontToken( rTokenStr, rIndex );
-
- return GetNextFontToken( rTokenStr, rIndex );
-}
-
// =======================================================================
static bool ImplIsFontToken( const String& rName, const String& rToken )
commit 9928fd7fc600efa620ad7c3b78c0b0051a4fa930
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 10:07:22 2012 +0100
remove some annoying XubStrings
Change-Id: I8c34a344285b6929091788c6b7a5529b48943f94
diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx
index 6abb056..7508541 100644
--- a/accessibility/source/standard/vclxaccessiblelist.cxx
+++ b/accessibility/source/standard/vclxaccessiblelist.cxx
@@ -261,7 +261,7 @@ void VCLXAccessibleList::UpdateSelection (::rtl::OUString sTextOfSelectedItem)
if ( pBox != NULL )
{
// Find the index of the selected item inside the VCL control...
- sal_uInt16 nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem));
+ sal_uInt16 nIndex = pBox->GetEntryPos(sTextOfSelectedItem);
// ...and then find the associated accessibility object.
if ( nIndex == LISTBOX_ENTRY_NOTFOUND )
nIndex = 0;
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index d60b44c..41fb85f 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -327,7 +327,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs)
else
{
m_aED_CrossesAtCategory.SetNoSelection();
- m_aED_CrossesAt.SetTextValue(XubString());
+ m_aED_CrossesAt.SetTextValue(rtl::OUString());
}
}
else
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index 25c60eb..65ac625 100644
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -523,12 +523,11 @@ SdPage* DocumentHelper::ProvideMasterPage (
SdPage* pMasterPageInDocument = NULL;
// Search for a master page with the same name as the given one in
// the target document.
- const XubString sMasterPageLayoutName (pMasterPage->GetLayoutName());
+ const rtl::OUString sMasterPageLayoutName (pMasterPage->GetLayoutName());
for (sal_uInt16 nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex<nCount; ++nIndex)
{
SdPage* pCandidate = static_cast<SdPage*>(rTargetDocument.GetMasterPage(nIndex));
- if (pCandidate!=NULL
- && sMasterPageLayoutName==pCandidate->GetLayoutName())
+ if (pCandidate && sMasterPageLayoutName.equals(pCandidate->GetLayoutName()))
{
// The requested master page does already exist in the
// target document, return it.
diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx
index 8dd6502..beb2153 100644
--- a/svtools/source/edit/svmedit.cxx
+++ b/svtools/source/edit/svmedit.cxx
@@ -804,8 +804,8 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent )
{
// Damit die Selektion erhalten bleibt
mbActivePopup = sal_True;
- XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
- if ( aChars.Len() )
+ rtl::OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
+ if (!aChars.isEmpty())
{
mpExtTextView->InsertText( aChars );
mpExtTextView->GetTextEngine()->SetModified( sal_True );
@@ -905,8 +905,8 @@ void TextWindow::Command( const CommandEvent& rCEvt )
break;
case SV_MENU_EDIT_INSERTSYMBOL:
{
- XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
- if ( aChars.Len() )
+ rtl::OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() );
+ if (!aChars.isEmpty())
{
mpExtTextView->InsertText( aChars );
mpExtTextEngine->SetModified( sal_True );
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 6779a01..f12a763 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -657,9 +657,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
if (mpOutliner->GetParagraphCount()==1)
{
// if we only have one paragraph we check if it is empty
- XubString aStr( mpOutliner->GetText( mpOutliner->GetParagraph( 0 ) ) );
+ rtl::OUString aStr(mpOutliner->GetText(mpOutliner->GetParagraph(0)));
- if(!aStr.Len())
+ if (aStr.isEmpty())
{
// its empty, so we have to force the outliner to initialise itself
mpOutliner->SetText( String(), mpOutliner->GetParagraph( 0 ) );
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 0606073..62fae38 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -231,8 +231,8 @@ void FixedText::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
{
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
WinBits nWinStyle = GetStyle();
- XubString aText( GetText() );
- sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
+ rtl::OUString aText( GetText() );
+ sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle );
Point aPos = rPos;
if ( nWinStyle & WB_EXTRAOFFSET )
commit 022b62296c4166486d38f55acf522c62c82894eb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jun 25 10:01:26 2012 +0100
callcatcher: update list
Change-Id: Id31324a6bf36e937cc6396207913e4183253bf04
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index a023f04..a262816 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -494,20 +494,6 @@ void writeConsoleWithStream(::rtl::OUString const & sText, FILE * stream)
}
#endif
-#ifdef WNT
-void writeConsoleWithStream(::rtl::OString const & sText, HANDLE stream)
-{
- writeConsoleWithStream(OStringToOUString(
- sText, RTL_TEXTENCODING_UTF8), stream);
-}
-#else
-void writeConsoleWithStream(::rtl::OString const & sText, FILE * stream)
-{
- fprintf(stream, "%s", sText.getStr());
- fflush(stream);
-}
-#endif
-
void writeConsole(::rtl::OUString const & sText)
{
#ifdef WNT
@@ -517,15 +503,6 @@ void writeConsole(::rtl::OUString const & sText)
#endif
}
-void writeConsole(::rtl::OString const & sText)
-{
-#ifdef WNT
- writeConsoleWithStream(sText, GetStdHandle(STD_OUTPUT_HANDLE));
-#else
- writeConsoleWithStream(sText, stdout);
-#endif
-}
-
void writeConsoleError(::rtl::OUString const & sText)
{
#ifdef WNT
@@ -535,18 +512,6 @@ void writeConsoleError(::rtl::OUString const & sText)
#endif
}
-
-void writeConsoleError(::rtl::OString const & sText)
-{
-#ifdef WNT
- writeConsoleWithStream(sText, GetStdHandle(STD_ERROR_HANDLE));
-#else
- writeConsoleWithStream(sText, stderr);
-#endif
-}
-
-
-
OUString readConsole()
{
#ifdef WNT
@@ -580,14 +545,6 @@ void TRACE(::rtl::OUString const & sText)
#endif
}
-void TRACE(::rtl::OString const & sText)
-{
- (void) sText;
-#if OSL_DEBUG_LEVEL > 1
- writeConsole(sText);
-#endif
-}
-
void syncRepositories(
bool force, Reference<ucb::XCommandEnvironment> const & xCmdEnv)
{
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.cxx b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
index eea1202..42ce5c3 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.cxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.cxx
@@ -293,16 +293,6 @@ namespace slideshow
initCurrentSubsets();
}
- void DrawShapeSubsetting::reset( const DocTreeNode& rShapeSubset,
- const ::boost::shared_ptr< GDIMetaFile >& rMtf )
- {
- reset();
- mpMtf = rMtf;
- maSubset = rShapeSubset;
-
- initCurrentSubsets();
- }
-
void DrawShapeSubsetting::initCurrentSubsets()
{
// only add subset to vector, if it's not empty - that's
diff --git a/slideshow/source/engine/shapes/drawshapesubsetting.hxx b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
index dbf5ff2..0863204 100644
--- a/slideshow/source/engine/shapes/drawshapesubsetting.hxx
+++ b/slideshow/source/engine/shapes/drawshapesubsetting.hxx
@@ -86,25 +86,6 @@ namespace slideshow
*/
void reset( const ::boost::shared_ptr< GDIMetaFile >& rMtf );
- /** Reset metafile and subset.
-
- Use this method to completely reset the
- ShapeSubsetting, with a new metafile and subset
- range. Note that any information previously set will
- be lost, including added subset shapes!
-
- @param rShapeSubset
- The subset this object represents (can be empty, then
- denoting 'represents a whole shape')
-
- @param rMtf
- Metafile to retrieve subset info from (must have been
- generated with verbose text comments switched on).
- */
- void reset( const DocTreeNode& rShapeSubset,
- const ::boost::shared_ptr< GDIMetaFile >& rMtf );
-
-
// Shape subsetting methods
// ========================================================
diff --git a/unusedcode.easy b/unusedcode.easy
index cc97539..d45fada 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -615,8 +615,6 @@ dbtools::SQLExceptionInfo::SQLExceptionInfo(com::sun::star::sdb::SQLErrorEvent c
dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(com::sun::star::sdb::SQLContext const&)
dbtools::SQLExceptionIteratorHelper::SQLExceptionIteratorHelper(com::sun::star::sdbc::SQLWarning const&)
dbtools::getConnection(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
-dp_misc::TRACE(rtl::OString const&)
-dp_misc::writeConsoleError(rtl::OString const&)
drawinglayer::attribute::SdrFormTextAttribute::getFormTextShdwTransp() const
drawinglayer::attribute::SdrTextAttribute::isWrongSpell() const
formula::FormulaTokenIterator::First()
@@ -633,7 +631,6 @@ sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
sd::ToolPanelPaneShell::RegisterInterface(SfxModule*)
sd::ViewShellBase::RegisterFactory(unsigned short)
-slideshow::internal::DrawShapeSubsetting::reset(slideshow::internal::DocTreeNode const&, boost::shared_ptr<GDIMetaFile> const&)
std::__cxx1998::multimap<_xmlNode*, com::sun::star::uno::Reference<com::sun::star::xml::dom::events::XEventListener>, std::less<_xmlNode*>, std::allocator<std::pair<_xmlNode* const, com::sun::star::uno::Reference<com::sun::star::xml::dom::events::XEventListener> > > >::~multimap()
std::__cxx1998::vector<OrderedEntry*, std::allocator<OrderedEntry*> >::~vector()
std::__cxx1998::vector<ServiceInfo*, std::allocator<ServiceInfo*> >::~vector()
commit d5909e1452a87cb5434d144b01d368e52d64fd68
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 23:57:42 2012 +0100
replace custom readString with read_uInt16s_ToOUString
replace custom readString with more efficient and foolproof
read_uInt16s_ToOUString
Change-Id: Idf5f85adad008b4bd775badd83f55b152a6ddaaf
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index b99a53f..79a9f74 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1169,24 +1169,6 @@ namespace cppcanvas
}
}
- static XubString readString (SvMemoryStream& rMF, sal_uInt32 stringLength)
- {
- sal_uInt16 *chars = new sal_uInt16[stringLength];
-
- for( sal_uInt32 i=0; i<stringLength; i++) {
- rMF >> chars[i];
- EMFP_DEBUG (printf ("EMF+\tglyph[%u]: 0x%04x\n",
- (unsigned int)i, chars[i]));
- }
-
- // create and add the text action
- rtl::OUString text(chars, stringLength);
-
- delete[] chars;
-
- return text;
- }
-
double ImplRenderer::setFont (sal_uInt8 objectId, const ActionFactoryParameters& rParms, OutDevState& rState)
{
EMFPFont *font = (EMFPFont*) aObjects[ objectId ];
@@ -1503,7 +1485,7 @@ namespace cppcanvas
EMFP_DEBUG (printf ("EMF+ DrawString layoutRect: %f,%f - %fx%f\n", lx, ly, lw, lh));
- XubString text = readString ( rMF, stringLength );
+ rtl::OUString text = read_uInt16s_ToOUString(rMF, stringLength);
double cellSize = setFont (flags & 0xff, rFactoryParms, rState);
SET_TEXT_COLOR( brushId );
@@ -1659,7 +1641,7 @@ namespace cppcanvas
float *charsPosX = new float[glyphsCount];
float *charsPosY = new float[glyphsCount];
- XubString text = readString (rMF, glyphsCount);
+ rtl::OUString text = read_uInt16s_ToOUString(rMF, glyphsCount);
for( sal_uInt32 i=0; i<glyphsCount; i++) {
rMF >> charsPosX[i] >> charsPosY[i];
commit c7f4d44aacbb3c45050130304362ce3b1f604fdb
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 21:47:11 2012 +0100
drop a UniString
Change-Id: I01c402b885733ccc1a99d4f09c792f8a44b3a3b4
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index 7a45808..da976e8 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -2788,12 +2788,12 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
/* bool bStartEncodedWord = true; */
const sal_Char * pWSPBegin = pBegin;
- UniString sEncodedText;
bool bQuotedEncodedText = false;
sal_uInt32 nCommentLevel = 0;
for (const sal_Char * p = pBegin; p != pEnd;)
{
+ rtl::OUString sEncodedText;
if (p != pEnd && *p == '=' /* && bStartEncodedWord */)
{
const sal_Char * q = p + 1;
@@ -3058,9 +3058,7 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
static_cast< xub_StrLen >(nUnicodeSize));
else if (nCommentLevel == 0)
{
- sEncodedText.Append(
- pUnicodeBuffer,
- static_cast< xub_StrLen >(nUnicodeSize));
+ sEncodedText = rtl::OUString(pUnicodeBuffer, nUnicodeSize);
if (!bQuotedEncodedText)
{
const sal_Unicode * pTextPtr = pUnicodeBuffer;
@@ -3105,13 +3103,13 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
}
}
- if (sEncodedText.Len() != 0)
+ if (!sEncodedText.isEmpty())
{
if (bQuotedEncodedText)
{
sDecoded += '"';
- const sal_Unicode * pTextPtr = sEncodedText.GetBuffer();
- const sal_Unicode * pTextEnd = pTextPtr + sEncodedText.Len();
+ const sal_Unicode * pTextPtr = sEncodedText.getStr();
+ const sal_Unicode * pTextEnd = pTextPtr + sEncodedText.getLength();
for (;pTextPtr != pTextEnd; ++pTextPtr)
{
switch (*pTextPtr)
@@ -3128,7 +3126,6 @@ rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
}
else
sDecoded += sEncodedText;
- sEncodedText.Erase();
bQuotedEncodedText = false;
}
commit 8eabfaa990b9f978fe4c147545801d2b1a151c7c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 21:46:31 2012 +0100
unnecessary use of UniString::GetBuffer
Change-Id: If7d31a649a058a30196e1ed4be28b5c6c42640a0
diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx
index eced74b..314437f 100644
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -609,9 +609,9 @@ void SvtSysLocaleOptions::GetCurrencyAbbrevAndLanguage( String& rAbbrev,
if ( aIsoStr.Len() )
{
::rtl::OUStringBuffer aStr( rAbbrev.Len() + 1 + aIsoStr.Len() );
- aStr.append( rAbbrev.GetBuffer(), rAbbrev.Len() );
+ aStr.append( rAbbrev );
aStr.append( sal_Unicode('-') );
- aStr.append( aIsoStr.GetBuffer(), aIsoStr.Len() );
+ aStr.append( aIsoStr );
return aStr.makeStringAndClear();
}
else
commit 344baf17a11772ab265e159796b3d7c49a16c080
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 09:57:39 2012 +0100
ScCondFrmtItem appears to be a oxbox lake
Change-Id: I9c89d06ec8a96de04d68725c97b102edb77fec38
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index 1d7568d..a03fb39 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -45,7 +45,6 @@ TYPEINIT1(ScConsolidateItem, SfxPoolItem);
TYPEINIT1(ScPivotItem, SfxPoolItem);
TYPEINIT1(ScSolveItem, SfxPoolItem);
TYPEINIT1(ScTabOpItem, SfxPoolItem);
-TYPEINIT1(ScCondFrmtItem, SfxPoolItem);
TYPEINIT1(ScTablesHint, SfxHint);
TYPEINIT1(ScEditViewHint, SfxHint);
@@ -678,57 +677,4 @@ SfxPoolItem* ScTabOpItem::Clone( SfxItemPool * ) const
return new ScTabOpItem( *this );
}
-
-// -----------------------------------------------------------------------
-// ScCondFrmtItem - Daten fuer den Dialog bedingte Formatierung
-// -----------------------------------------------------------------------
-
-ScCondFrmtItem::ScCondFrmtItem( sal_uInt16 nWhichP,
-//! const ScConditionalFormat* pCondFrmt )
- const ScConditionalFormat& rCondFrmt )
- : SfxPoolItem ( nWhichP ),
- theCondFrmtData ( rCondFrmt ) //!
-{
-//! if ( pCondFrmt ) theCondFrmtData = *pCondFrmt;
-}
-
-//------------------------------------------------------------------------
-
-ScCondFrmtItem::ScCondFrmtItem( const ScCondFrmtItem& rItem )
- : SfxPoolItem ( rItem ),
- theCondFrmtData ( rItem.theCondFrmtData )
-{
-}
-
-//------------------------------------------------------------------------
-
-ScCondFrmtItem::~ScCondFrmtItem()
-{
-}
-
-//------------------------------------------------------------------------
-
-String ScCondFrmtItem::GetValueText() const
-{
- return String::CreateFromAscii(RTL_CONSTASCII_STRINGPARAM("ScCondFrmtItem"));
-}
-
-//------------------------------------------------------------------------
-
-int ScCondFrmtItem::operator==( const SfxPoolItem& rItem ) const
-{
- OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
-
- const ScCondFrmtItem& rPItem = (const ScCondFrmtItem&)rItem;
-
- return ( theCondFrmtData == rPItem.theCondFrmtData );
-}
-
-//------------------------------------------------------------------------
-
-SfxPoolItem* ScCondFrmtItem::Clone( SfxItemPool * ) const
-{
- return new ScCondFrmtItem( *this );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/uiitems.hxx b/sc/source/ui/inc/uiitems.hxx
index 2e8258a..6158a49 100644
--- a/sc/source/ui/inc/uiitems.hxx
+++ b/sc/source/ui/inc/uiitems.hxx
@@ -348,31 +348,6 @@ private:
ScTabOpParam theTabOpData;
};
-//----------------------------------------------------------------------------
-// Parameter-Item fuer den Dialog bedingte Formatierung
-
-class ScCondFrmtItem : public SfxPoolItem
-{
-public:
- TYPEINFO();
- ScCondFrmtItem( sal_uInt16 nWhich,
-//! const ScConditionalFormat* pCondFrmt );
- const ScConditionalFormat& rCondFrmt );
- ScCondFrmtItem( const ScCondFrmtItem& rItem );
- ~ScCondFrmtItem();
-
- virtual String GetValueText() const;
- virtual int operator==( const SfxPoolItem& ) const;
- virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
-
- const ScConditionalFormat& GetData() const { return theCondFrmtData; }
-
-private:
- ScConditionalFormat theCondFrmtData;
-};
-
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 810a01c5cf67f276f37ecda954363cf3c3b5385c
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 09:22:38 2012 +0100
callcatcher: remove some more unused code
Change-Id: Id60fe0dade7f47f8b2b65bf2cfa1d6ab28a94505
diff --git a/sc/inc/dbdata.hxx b/sc/inc/dbdata.hxx
index 6534ac6..d607b4e 100644
--- a/sc/inc/dbdata.hxx
+++ b/sc/inc/dbdata.hxx
@@ -214,7 +214,6 @@ public:
const ScDBData* findByRange(const ScRange& rRange) const;
ScDBData* getByRange(const ScRange& rRange);
void insert(ScDBData* p);
- void erase(iterator itr);
bool empty() const;
bool operator== (const AnonDBs& r) const;
};
diff --git a/sc/inc/simplerangelist.hxx b/sc/inc/simplerangelist.hxx
index 611bfae..2934513 100644
--- a/sc/inc/simplerangelist.hxx
+++ b/sc/inc/simplerangelist.hxx
@@ -55,8 +55,6 @@ public:
SCCOL mnCol2;
SCROW mnRow2;
explicit Range(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2);
-
- bool contains(const Range& r) const;
};
typedef ::boost::shared_ptr< ::std::list<Range> > RangeListRef;
typedef ::std::map<SCTAB, RangeListRef> TabType;
@@ -65,7 +63,6 @@ public:
void addRange(const ScRange& rRange);
void insertCol(SCCOL nCol, SCTAB nTab);
- void insertRow(SCROW nRow, SCTAB nTab);
void getRangeList(::std::list<ScRange>& rList) const;
void clear();
diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx
index bb5475c..3e6664d 100644
--- a/sc/source/core/tool/dbdata.cxx
+++ b/sc/source/core/tool/dbdata.cxx
@@ -816,11 +816,6 @@ void ScDBCollection::AnonDBs::insert(ScDBData* p)
maDBs.push_back(pNew);
}
-void ScDBCollection::AnonDBs::erase(iterator itr)
-{
- maDBs.erase(itr);
-}
-
bool ScDBCollection::AnonDBs::empty() const
{
return maDBs.empty();
diff --git a/sc/source/core/tool/simplerangelist.cxx b/sc/source/core/tool/simplerangelist.cxx
index 60c2ca8..d31fe9b 100644
--- a/sc/source/core/tool/simplerangelist.cxx
+++ b/sc/source/core/tool/simplerangelist.cxx
@@ -38,11 +38,6 @@ using ::std::max;
ScSimpleRangeList::Range::Range(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2) :
mnCol1(nCol1), mnRow1(nRow1), mnCol2(nCol2), mnRow2(nRow2) {}
-bool ScSimpleRangeList::Range::contains(const Range& r) const
-{
- return mnCol1 <= r.mnCol1 && mnRow1 <= r.mnRow1 && r.mnCol2 <= mnCol2 && r.mnRow2 <= mnRow2;
-}
-
// ----------------------------------------------------------------------------
ScSimpleRangeList::ScSimpleRangeList()
@@ -168,35 +163,6 @@ void ScSimpleRangeList::insertCol(SCCOL nCol, SCTAB nTab)
}
}
-void ScSimpleRangeList::insertRow(SCROW nRow, SCTAB nTab)
-{
- RangeListRef pRef = findTab(nTab);
- if (!pRef)
- // This should never happen!
- return;
-
- list<Range>::iterator itr = pRef->begin(), itrEnd = pRef->end();
- for (; itr != itrEnd; ++itr)
- {
- Range& r = *itr;
- if (r.mnRow2 < nRow)
- // insertion point is below the range.
- continue;
-
- if (nRow <= r.mnRow1)
- {
- // insertion point is above the range.
- ++r.mnRow1;
- ++r.mnRow2;
- }
- else if (nRow <= r.mnRow2)
- {
- // insertion point cuts through the range.
- ++r.mnRow2;
- }
- }
-}
-
void ScSimpleRangeList::getRangeList(list<ScRange>& rList) const
{
list<ScRange> aList;
diff --git a/unusedcode.easy b/unusedcode.easy
index be8bcde..cc97539 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -34,8 +34,6 @@ ScCompressedArray<int, unsigned short>::Remove(int, unsigned long)
ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const&, unsigned long)
ScCompressedArray<int, unsigned short>::ScCompressedArray(int, unsigned short const*, unsigned long)
ScCompressedArray<int, unsigned short>::SetValue(int, unsigned short const&)
-ScCondFrmtItem::ScCondFrmtItem(unsigned short, ScConditionalFormat const&)
-ScDBCollection::AnonDBs::erase(boost::void_ptr_iterator<__gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<void**, std::__cxx1998::vector<void*, std::allocator<void*> > >, std::__debug::vector<void*, std::allocator<void*> > >, ScDBData>)
ScHTMLColOffset::Insert(ScHTMLColOffset const*, unsigned short, unsigned short)
ScHTMLColOffset::Insert(unsigned long const&, unsigned short&)
ScHTMLColOffset::Insert(unsigned long const*, unsigned short)
@@ -50,7 +48,6 @@ ScRTFColTwips::Remove(unsigned long const&, unsigned short)
ScRTFColTwips_SAR::Replace(unsigned long const&, unsigned short)
ScRTFColTwips_SAR::Replace(unsigned long const*, unsigned short, unsigned short)
ScRTFColTwips_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(unsigned long const&, void*), void*)
-ScSimpleRangeList::Range::contains(ScSimpleRangeList::Range const&) const
ScValidationEntries_Impl::Insert(ScValidationData* const&, unsigned short&)
ScValidationEntries_Impl::Insert(ScValidationData* const*, unsigned short)
ScValidationEntries_Impl::Insert(ScValidationEntries_Impl const*, unsigned short, unsigned short)
commit 4e46ab162a1d6b757aec3629e193e2df65c38bb7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Jun 24 00:05:10 2012 +0100
remove unnecessary ForEach
Change-Id: I53bb48c27c3b42dd73f81ed46f3c29e409d8fb47
diff --git a/svl/inc/svl/svarray.hxx b/svl/inc/svl/svarray.hxx
index 2a2c6a8..47c3013 100644
--- a/svl/inc/svl/svarray.hxx
+++ b/svl/inc/svl/svarray.hxx
@@ -316,7 +316,6 @@ sal_uInt16 GetPos( const AERef aE ) const;\
_SV_DECL_PTRARR_DEF_GEN( nm, AE, IS, AE &, vis )
#define SV_DECL_PTRARR_GEN(nm, AE, IS, Base, AERef, VPRef, vis )\
-typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
@@ -344,15 +343,6 @@ public:\
const AE* GetData() const {\
return (const AE*)Base::GetData();\
}\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
- }\
- void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
- }\
AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
AE GetObject(sal_uInt16 nP) const { \
@@ -374,7 +364,6 @@ SV_DECL_PTRARR_GEN(nm, AE, IS, SvPtrarr, AE &, VoidPtr &, )
SV_DECL_PTRARR_GEN(nm, AE, IS, SvPtrarr, AE &, VoidPtr &, vis )
#define SV_DECL_PTRARR_DEL_GEN(nm, AE, IS, Base, AERef, VPRef, vis )\
-typedef sal_Bool (*FnForEach_##nm)( const AERef, void* );\
class vis nm: public Base \
{\
public:\
@@ -403,15 +392,6 @@ public:\
const AE* GetData() const {\
return (const AE*)Base::GetData();\
}\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, (FnForEach_##Base)fnForEach, pArgs );\
- }\
- void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, (FnForEach_##Base)fnForEach, pArgs );\
- }\
AE operator[]( sal_uInt16 nP )const { \
return (AE)Base::operator[](nP); }\
AE GetObject( sal_uInt16 nP )const { \
@@ -452,7 +432,6 @@ _SV_DECL_PTRARR_DEF( SvPtrarr, VoidPtr, 0, SVL_DLLPUBLIC )
// SORTARR - Begin
#define _SORT_CLASS_DEF(nm, AE, IS, vis)\
-typedef sal_Bool (*FnForEach_##nm)( const AE&, void* );\
class vis nm : private nm##_SAR \
{\
public:\
@@ -637,15 +616,6 @@ _SORT_CLASS_DEF(nm, AE, IS, vis)\
return nm##_SAR::GetObject( nP );\
}\
sal_Bool Seek_Entry( const AE aE, sal_uInt16* pP = 0 ) const;\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, (FnForEach_SvPtrarr)fnForEach, pArgs );\
- }\
- void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, (FnForEach_SvPtrarr)fnForEach, pArgs );\
- }\
void DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL=1 ); \
_SORTARR_BLC_CASTS(nm, AE )\
\
@@ -689,15 +659,6 @@ _SORT_CLASS_DEF(nm, AE, IS, vis) \
return nm##_SAR::GetObject( nP );\
}\
sal_Bool Seek_Entry( const AE & aE, sal_uInt16* pP = 0 ) const;\
- void ForEach( CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( 0, nA, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
- }\
- void ForEach( sal_uInt16 nS, sal_uInt16 nE, \
- CONCAT( FnForEach_, nm ) fnForEach, void* pArgs = 0 )\
- {\
- _ForEach( nS, nE, (FnForEach_##nm##_SAR)fnForEach, pArgs );\
- }\
private:\
nm( const nm& );\
nm& operator=( const nm& );\
diff --git a/unusedcode.README b/unusedcode.README
index 9159623..ee4f9b9 100644
--- a/unusedcode.README
+++ b/unusedcode.README
@@ -17,7 +17,6 @@ b) At the time of writing the majority of unused code now originates via
*::Insert
*::Remove
*::DeleteAndDestroy
- *::_ForEach
*::Replace
c) callcatcher ignores virtuals. But implementations of "pure virtuals"
are not actually virtual methods. If something is declared pure virtual
commit efa55cfd745843990503dea40995e78907611c6e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jun 23 22:40:33 2012 +0100
callcatcher: update unused code
Change-Id: I65c19a21ae9b6deb1601adf2f3fe8fe8faa7e9ed
diff --git a/Makefile.top b/Makefile.top
index 70cce8a..4e8c976 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -478,6 +478,7 @@ findunusedcode:
| grep -v ^lucene:: \
| grep -v ^Matrix3d:: \
| grep -v ^salhelper:: \
+ | grep -v ^VSDInternalStream:: \
| grep -v ^WP1 \
| grep -v ^WP3 \
| grep -v ^WP42 \
diff --git a/sc/source/filter/inc/formulabuffer.hxx b/sc/source/filter/inc/formulabuffer.hxx
index 0097dc7..a0b96ce 100644
--- a/sc/source/filter/inc/formulabuffer.hxx
+++ b/sc/source/filter/inc/formulabuffer.hxx
@@ -71,7 +71,6 @@ typedef ::std::map< sal_Int32, std::vector< ValueAddressPair > > FormulaValueMap
void createSharedFormula( const ::com::sun::star::table::CellAddress& rAddress, sal_Int32 nSharedId, const rtl::OUString& rTokens );
::com::sun::star::uno::Reference< com::sun::star::table::XCellRange > getRange( const ::com::sun::star::table::CellRangeAddress& rRange);
- ::com::sun::star::uno::Reference< com::sun::star::table::XCell > getCell( ::com::sun::star::table::CellAddress& rAddress );
com::sun::star::uno::Reference< com::sun::star::sheet::XSpreadsheet > mxCurrSheet;
FormulaDataMap cellFormulas;
ArrayFormulaDataMap cellArrayFormulas;
diff --git a/sc/source/filter/inc/sheetdatabuffer.hxx b/sc/source/filter/inc/sheetdatabuffer.hxx
index c840bc1..898d039 100644
--- a/sc/source/filter/inc/sheetdatabuffer.hxx
+++ b/sc/source/filter/inc/sheetdatabuffer.hxx
@@ -187,8 +187,6 @@ public:
void setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCode );
/** Inserts a formula cell into the sheet. */
void setFormulaCell( const CellModel& rModel, const ApiTokenSequence& rTokens );
- /** Inserts a shared formula cell into the sheet (OOXML only). */
- void setFormulaCell( const CellModel& rModel, sal_Int32 nSharedId );
/** Inserts the passed token array as array formula. */
void createArrayFormula(
@@ -198,11 +196,6 @@ public:
void createTableOperation(
const ::com::sun::star::table::CellRangeAddress& rRange,
const DataTableModel& rModel );
- /** Creates a named range with a special name for a shared formula with the
- specified identifier and formula definition (OOXML only). */
- void createSharedFormula(
- sal_Int32 nSharedId,
- const ApiTokenSequence& rTokens );
/** Creates a named range with a special name for a shared formula with the
specified base address and formula definition (BIFF only). */
diff --git a/sc/source/filter/inc/worksheethelper.hxx b/sc/source/filter/inc/worksheethelper.hxx
index 0242263..d1cbf09 100644
--- a/sc/source/filter/inc/worksheethelper.hxx
+++ b/sc/source/filter/inc/worksheethelper.hxx
@@ -293,9 +293,6 @@ public:
void putValue(
const ::com::sun::star::table::CellAddress& rAddress,
double fValue ) const;
- void putFormulaResult(
- const ::com::sun::star::table::CellAddress& rAddress,
- double fValue ) const;
/** Inserts a string cell directly into the Calc sheet. */
void putString(
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index a82e195..f2f1d69 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -48,19 +48,6 @@ Reference< XCellRange > FormulaBuffer::getRange( const CellRangeAddress& rRange)
return xRange;
}
-Reference< XCell > FormulaBuffer::getCell( CellAddress& rAddress )
-{
- Reference< XCell > xCell;
- try
- {
- xCell = mxCurrSheet->getCellByPosition( rAddress.Column, rAddress.Row );
- }
- catch( Exception& )
- {
- }
- return xCell;
-}
-
void FormulaBuffer::finalizeImport()
{
ISegmentProgressBarRef xFormulaBar = getProgressBar().createSegment( getProgressBar().getFreeLength() );
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 3f0aea4..0ce3594 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -329,12 +329,6 @@ void SheetDataBuffer::setFormulaCell( const CellModel& rModel, const ApiTokenSeq
setCellFormat( rModel );
}
-void SheetDataBuffer::setFormulaCell( const CellModel& rModel, sal_Int32 nSharedId )
-{
- setCellFormula( rModel.maCellAddr, resolveSharedFormula( BinAddress( nSharedId, 0 ) ) );
- setCellFormat( rModel );
-}
-
void SheetDataBuffer::createArrayFormula( const CellRangeAddress& rRange, const ApiTokenSequence& rTokens )
{
/* Array formulas will be inserted later in finalizeImport(). This is
@@ -351,11 +345,6 @@ void SheetDataBuffer::createTableOperation( const CellRangeAddress& rRange, cons
maTableOperations.push_back( TableOperation( rRange, rModel ) );
}
-void SheetDataBuffer::createSharedFormula( sal_Int32 nSharedId, const ApiTokenSequence& rTokens )
-{
- createSharedFormula( BinAddress( nSharedId, 0 ), rTokens );
-}
-
void SheetDataBuffer::createSharedFormula( const CellAddress& rCellAddr, const ApiTokenSequence& rTokens )
{
createSharedFormula( BinAddress( rCellAddr ), rTokens );
diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index 0bb8ba2..cc2eb63 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -1534,21 +1534,6 @@ void WorksheetHelper::putValue( const CellAddress& rAddress, double fValue ) con
getScDocument().SetValue( aAddress.Col(), aAddress.Row(), aAddress.Tab(), fValue );
}
-void WorksheetHelper::putFormulaResult( const CellAddress& rAddress, double fValue ) const
-{
- ScDocument& rDoc = getScDocument();
- ScAddress aCellPos;
- ScUnoConversion::FillScAddress( aCellPos, rAddress );
- ScBaseCell* pBaseCell = rDoc.GetCell( aCellPos );
- if ( pBaseCell->GetCellType() == CELLTYPE_FORMULA )
- {
- ScFormulaCell* pCell = static_cast< ScFormulaCell* >( pBaseCell );
- pCell->SetHybridDouble( fValue );
- pCell->ResetDirty();
- pCell->ResetChanged();
- }
-}
-
void WorksheetHelper::setCellFormulaValue( const ::com::sun::star::table::CellAddress& rAddress,
double fValue )
{
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx
index 1ae7ef0..56d30e2 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx
@@ -144,35 +144,6 @@ void ScMyStyleRanges::AddCurrencyRange(const ScRange& rRange,
aItr->mpRanges->addRange(rRange);
}
-void ScMyStyleRanges::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* /*pDoc*/)
-{
- if (mpTextList)
- mpTextList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpNumberList)
- mpNumberList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpTimeList)
- mpTimeList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpDateTimeList)
- mpDateTimeList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpPercentList)
- mpPercentList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpLogicalList)
- mpLogicalList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- if (mpUndefinedList)
- mpUndefinedList->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
-
- if (pCurrencyList)
- {
- ScMyCurrencyStylesSet::iterator aItr(pCurrencyList->begin());
- ScMyCurrencyStylesSet::iterator aEndItr(pCurrencyList->end());
- while (aItr != aEndItr)
- {
- aItr->mpRanges->insertRow(static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab));
- ++aItr;
- }
- }
-}
-
void ScMyStyleRanges::InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* /*pDoc*/)
{
if (mpTextList)
@@ -502,18 +473,6 @@ void ScMyStylesImportHelper::AddCell(const ScAddress& rAddress)
AddRange(aScRange);
}
-void ScMyStylesImportHelper::InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* pDoc)
-{
- ScXMLImport::MutexGuard aGuard(rImport);
- ScMyStylesSet::iterator aItr(aCellStyles.begin());
- ScMyStylesSet::iterator aEndItr(aCellStyles.end());
- while (aItr != aEndItr)
- {
- aItr->xRanges->InsertRow(nRow, nTab, pDoc);
- ++aItr;
- }
-}
-
void ScMyStylesImportHelper::InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* pDoc)
{
ScXMLImport::MutexGuard aGuard(rImport);
diff --git a/sc/source/filter/xml/XMLStylesImportHelper.hxx b/sc/source/filter/xml/XMLStylesImportHelper.hxx
index c5bf5d3..6a988d0 100644
--- a/sc/source/filter/xml/XMLStylesImportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesImportHelper.hxx
@@ -115,7 +115,6 @@ public:
void AddCurrencyRange(const ScRange& rRange,
const rtl::OUString* pStyleName, const rtl::OUString* pCurrency,
ScXMLImport& rImport, const sal_uInt32 nMaxRanges);
- void InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* pDoc);
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* pDoc);
void SetStylesToRanges(const rtl::OUString* pStyleName, ScXMLImport& rImport);
};
@@ -178,7 +177,6 @@ public:
rtl::OUString* pCurrency, const sal_Int16 nCellType);
void AddRange(const ScRange& rRange);
void AddCell(const ScAddress& rAddress);
- void InsertRow(const sal_Int32 nRow, const sal_Int32 nTab, ScDocument* pDoc); // a row is inserted before nRow
void InsertCol(const sal_Int32 nCol, const sal_Int32 nTab, ScDocument* pDoc); // a col is inserted before nCol
void EndTable();
void SetStylesToRanges();
diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx
index d2c0e09..f552011 100644
--- a/sc/source/ui/vba/vbaformat.hxx
+++ b/sc/source/ui/vba/vbaformat.hxx
@@ -70,7 +70,6 @@ public:
ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( css::script::BasicErrorException );
virtual ~ScVbaFormat() {}
virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list