[Libreoffice-commits] core.git: Branch 'private/kohei/xlsx-import-speedup' - 38 commits - configure.ac dbaccess/source desktop/Library_libreoffice.mk desktop/source download.lst external/firebird external/libatomic_ops formula/source i18npool/inc i18npool/source include/formula include/vcl RepositoryExternal.mk sal/rtl sc/inc sc/source sd/source smoketest/Executable_libtest.mk smoketest/libtest.cxx starmath/source svl/source sw/qa sw/source toolkit/source ucbhelper/source ucb/source ucb/workben unotools/source vcl/aqua vcl/qa vcl/source vcl/unx writerfilter/source xmlhelp/source xmloff/source xmlsecurity/source
Kohei Yoshida
kohei.yoshida at collabora.com
Thu Nov 7 20:46:48 CET 2013
Rebased ref, commits from common ancestor:
commit c03a10145d3c5687dfc4673a802f2530666cee32
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 14:46:53 2013 -0500
Mutex access to the global theIndexTable.
Change-Id: I31e2cf3a479e385aa0fca4678a3a2c7fa6cc4b5f
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 2117041..accc557 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -71,9 +71,16 @@ using namespace ::std;
* (old currency) is recognized as a date (#53155#). */
#define UNKNOWN_SUBSTITUTE LANGUAGE_ENGLISH_US
-static bool bIndexTableInitialized = false;
-static sal_uInt32 theIndexTable[NF_INDEX_TABLE_ENTRIES];
+struct IndexTable
+{
+ bool mbInitialized;
+ sal_uInt32 maData[NF_INDEX_TABLE_ENTRIES];
+ osl::Mutex maMtx;
+
+ IndexTable() : mbInitialized(false) {}
+};
+static IndexTable theIndexTable;
// ====================================================================
@@ -2001,11 +2008,13 @@ sal_uInt32 SvNumberFormatter::GetFormatSpecialInfo( const OUString& rFormatStrin
inline sal_uInt32 SetIndexTable( NfIndexTableOffset nTabOff, sal_uInt32 nIndOff )
{
- if ( !bIndexTableInitialized )
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+
+ if (!theIndexTable.mbInitialized)
{
- DBG_ASSERT( theIndexTable[nTabOff] == NUMBERFORMAT_ENTRY_NOT_FOUND,
+ DBG_ASSERT(theIndexTable.maData[nTabOff] == NUMBERFORMAT_ENTRY_NOT_FOUND,
"SetIndexTable: theIndexTable[nTabOff] already occupied" );
- theIndexTable[nTabOff] = nIndOff;
+ theIndexTable.maData[nTabOff] = nIndOff;
}
return nIndOff;
}
@@ -2196,13 +2205,17 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
{
using namespace ::com::sun::star;
- if ( !bIndexTableInitialized )
{
- for ( sal_uInt16 j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+ if (!theIndexTable.mbInitialized)
{
- theIndexTable[j] = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ for ( sal_uInt16 j=0; j<NF_INDEX_TABLE_ENTRIES; j++ )
+ {
+ theIndexTable.maData[j] = NUMBERFORMAT_ENTRY_NOT_FOUND;
+ }
}
}
+
bool bOldConvertMode = pFormatScanner->GetConvertMode();
if (bOldConvertMode)
{
@@ -2631,8 +2644,10 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
CLOffset + SetIndexTable( NF_DATE_WW, nNewExtended++ ),
SV_NUMBERFORMATTER_VERSION_NF_DATE_WW );
-
- bIndexTableInitialized = true;
+ {
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+ theIndexTable.mbInitialized = true;
+ }
SAL_WARN_IF( nNewExtended > ZF_STANDARD_NEWEXTENDEDMAX, "svl.numbers",
"ImpGenerateFormats: overflow of nNewExtended standard formats" );
@@ -3092,17 +3107,24 @@ sal_uInt32 SvNumberFormatter::GetFormatForLanguageIfBuiltIn( sal_uInt32 nFormat,
sal_uInt32 SvNumberFormatter::GetFormatIndex( NfIndexTableOffset nTabOff,
LanguageType eLnge )
{
- if ( nTabOff >= NF_INDEX_TABLE_ENTRIES ||
- theIndexTable[nTabOff] == NUMBERFORMAT_ENTRY_NOT_FOUND )
- {
+ if (nTabOff >= NF_INDEX_TABLE_ENTRIES)
return NUMBERFORMAT_ENTRY_NOT_FOUND;
- }
- if ( eLnge == LANGUAGE_DONTKNOW )
- {
+
+ if (eLnge == LANGUAGE_DONTKNOW)
eLnge = IniLnge;
+
+ {
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+ if (theIndexTable.maData[nTabOff] == NUMBERFORMAT_ENTRY_NOT_FOUND)
+ return NUMBERFORMAT_ENTRY_NOT_FOUND;
}
+
sal_uInt32 nCLOffset = ImpGenerateCL(eLnge); // create new standard formats if necessary
- return nCLOffset + theIndexTable[nTabOff];
+
+ {
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+ return nCLOffset + theIndexTable.maData[nTabOff];
+ }
}
@@ -3113,11 +3135,13 @@ NfIndexTableOffset SvNumberFormatter::GetIndexTableOffset( sal_uInt32 nFormat )
{
return NF_INDEX_TABLE_ENTRIES; // not a built-in format
}
- for ( sal_uInt16 j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
+
{
- if ( theIndexTable[j] == nOffset )
+ osl::MutexGuard aGuard(&theIndexTable.maMtx);
+ for ( sal_uInt16 j = 0; j < NF_INDEX_TABLE_ENTRIES; j++ )
{
- return (NfIndexTableOffset) j;
+ if (theIndexTable.maData[j] == nOffset)
+ return (NfIndexTableOffset) j;
}
}
return NF_INDEX_TABLE_ENTRIES; // bad luck
commit 56ec0344adabb1875e76fe2dbacba6036b5ae4fa
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 14:16:48 2013 -0500
Thread-safe way to check for presence of references in formula tokens.
Change-Id: I995668d1e183dc0dae4f354889bc13053e858723
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 8f0cfa8..ae1655e 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -130,6 +130,22 @@ bool FormulaToken::IsExternalRef() const
return bRet;
}
+bool FormulaToken::IsRef() const
+{
+ switch (eType)
+ {
+ case svSingleRef:
+ case svDoubleRef:
+ case svExternalSingleRef:
+ case svExternalDoubleRef:
+ return true;
+ default:
+ ;
+ }
+
+ return false;
+}
+
bool FormulaToken::operator==( const FormulaToken& rToken ) const
{
// don't compare reference count!
@@ -538,6 +554,17 @@ FormulaToken* FormulaTokenArray::PeekPrevNoSpaces()
return NULL;
}
+bool FormulaTokenArray::HasReferences() const
+{
+ for (sal_uInt16 i = 0; i < nLen; ++i)
+ {
+ if (pCode[i]->IsRef())
+ return true;
+ }
+
+ return false;
+}
+
bool FormulaTokenArray::HasExternalRef() const
{
for ( sal_uInt16 j=0; j < nLen; j++ )
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index f5b49cc..6c29de9 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -106,7 +106,10 @@ public:
inline void Delete() { delete this; }
inline StackVar GetType() const { return eType; }
bool IsFunction() const; // pure functions, no operators
- bool IsExternalRef() const;
+
+ bool IsExternalRef() const;
+ bool IsRef() const;
+
sal_uInt8 GetParamCount() const;
inline void IncRef() const
diff --git a/include/formula/tokenarray.hxx b/include/formula/tokenarray.hxx
index 120a3bb..b632233 100644
--- a/include/formula/tokenarray.hxx
+++ b/include/formula/tokenarray.hxx
@@ -116,6 +116,8 @@ public:
FormulaToken* LastRPN() { nIndex = nRPN; return PrevRPN(); }
FormulaToken* PrevRPN();
+ bool HasReferences() const;
+
bool HasExternalRef() const;
bool HasOpCode( OpCode ) const;
bool HasOpCodeRPN( OpCode ) const;
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index 6096ecf..c1e2865 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -518,8 +518,7 @@ sal_uInt16 ScRangeData::GetErrCode() const
bool ScRangeData::HasReferences() const
{
- pCode->Reset();
- return pCode->GetNextReference() != NULL;
+ return pCode->HasReferences();
}
sal_uInt32 ScRangeData::GetUnoType() const
commit fc04b55f7f96a4f70f31c145dafd44c1d9276a41
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 13:35:24 2013 -0500
Guard CharacterClassificationImpl with mutex.
They are accessed from multiple threads frequently.
Change-Id: I3f9720ede076109efe0b7eaa4a05dd50f2e38102
diff --git a/i18npool/inc/characterclassificationImpl.hxx b/i18npool/inc/characterclassificationImpl.hxx
index e220968..24221d1 100644
--- a/i18npool/inc/characterclassificationImpl.hxx
+++ b/i18npool/inc/characterclassificationImpl.hxx
@@ -26,6 +26,8 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
+#include "osl/mutex.hxx"
+
namespace com { namespace sun { namespace star { namespace i18n {
class CharacterClassificationImpl : public cppu::WeakImplHelper2
@@ -93,17 +95,19 @@ private:
aLocale.Variant == rLocale.Variant;
};
};
- std::vector<lookupTableItem*> lookupTable;
- lookupTableItem *cachedItem;
-
- com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
- com::sun::star::uno::Reference < XCharacterClassification > xUCI;
com::sun::star::uno::Reference < XCharacterClassification > SAL_CALL
getLocaleSpecificCharacterClassification(const com::sun::star::lang::Locale& rLocale) throw(com::sun::star::uno::RuntimeException);
sal_Bool SAL_CALL
createLocaleSpecificCharacterClassification(const OUString& serviceName, const com::sun::star::lang::Locale& rLocale);
+private:
+ std::vector<lookupTableItem*> lookupTable;
+ lookupTableItem *cachedItem;
+
+ com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
+ com::sun::star::uno::Reference < XCharacterClassification > xUCI;
+ osl::Mutex maMtx;
};
} } } }
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index e7fe8e6..bd3c164 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -47,6 +47,7 @@ OUString SAL_CALL
CharacterClassificationImpl::toUpper( const OUString& Text, sal_Int32 nPos,
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->toUpper(Text, nPos, nCount, rLocale);
}
@@ -54,6 +55,7 @@ OUString SAL_CALL
CharacterClassificationImpl::toLower( const OUString& Text, sal_Int32 nPos,
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->toLower(Text, nPos, nCount, rLocale);
}
@@ -61,6 +63,7 @@ OUString SAL_CALL
CharacterClassificationImpl::toTitle( const OUString& Text, sal_Int32 nPos,
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->toTitle(Text, nPos, nCount, rLocale);
}
@@ -68,6 +71,7 @@ sal_Int16 SAL_CALL
CharacterClassificationImpl::getType( const OUString& Text, sal_Int32 nPos )
throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
if (xUCI.is())
return xUCI->getType(Text, nPos);
throw RuntimeException();
@@ -77,6 +81,7 @@ sal_Int16 SAL_CALL
CharacterClassificationImpl::getCharacterDirection( const OUString& Text, sal_Int32 nPos )
throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
if (xUCI.is())
return xUCI->getCharacterDirection(Text, nPos);
throw RuntimeException();
@@ -86,6 +91,7 @@ sal_Int16 SAL_CALL
CharacterClassificationImpl::getScript( const OUString& Text, sal_Int32 nPos )
throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
if (xUCI.is())
return xUCI->getScript(Text, nPos);
throw RuntimeException();
@@ -95,6 +101,7 @@ sal_Int32 SAL_CALL
CharacterClassificationImpl::getCharacterType( const OUString& Text, sal_Int32 nPos,
const Locale& rLocale ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->getCharacterType(Text, nPos, rLocale);
}
@@ -102,6 +109,7 @@ sal_Int32 SAL_CALL
CharacterClassificationImpl::getStringType( const OUString& Text, sal_Int32 nPos,
sal_Int32 nCount, const Locale& rLocale ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->getStringType(Text, nPos, nCount, rLocale);
}
@@ -111,6 +119,7 @@ ParseResult SAL_CALL CharacterClassificationImpl::parseAnyToken(
sal_Int32 contCharTokenType, const OUString& userDefinedCharactersCont )
throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->parseAnyToken(Text, nPos, rLocale,
startCharTokenType,userDefinedCharactersStart,
contCharTokenType, userDefinedCharactersCont);
@@ -123,6 +132,7 @@ ParseResult SAL_CALL CharacterClassificationImpl::parsePredefinedToken(
const OUString& userDefinedCharactersStart, sal_Int32 contCharTokenType,
const OUString& userDefinedCharactersCont ) throw(RuntimeException)
{
+ osl::MutexGuard aGuard(&maMtx);
return getLocaleSpecificCharacterClassification(rLocale)->parsePredefinedToken(
nTokenType, Text, nPos, rLocale, startCharTokenType, userDefinedCharactersStart,
contCharTokenType, userDefinedCharactersCont);
commit 090ddeca656df724ce911c7efadfb1a69c6efaeb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 13:21:13 2013 -0500
Make this thread safe too.
Change-Id: Ic8508f693f8a6e9bae513d6b5b6eaaaae618194b
diff --git a/sc/inc/mtvelements.hxx b/sc/inc/mtvelements.hxx
index a1532d4..e5efbf1 100644
--- a/sc/inc/mtvelements.hxx
+++ b/sc/inc/mtvelements.hxx
@@ -17,6 +17,7 @@
#include "editeng/editobj.hxx"
#include "calcmacros.hxx"
#include "postit.hxx"
+#include "osl/mutex.hxx"
#if DEBUG_COLUMN_STORAGE
#ifdef NDEBUG
@@ -138,6 +139,7 @@ class ColumnBlockPositionSet
ScDocument& mrDoc;
TablesType maTables;
+ osl::Mutex maMtxTables;
public:
ColumnBlockPositionSet(ScDocument& rDoc);
diff --git a/sc/source/core/data/mtvelements.cxx b/sc/source/core/data/mtvelements.cxx
index 222aabd..5a94606 100644
--- a/sc/source/core/data/mtvelements.cxx
+++ b/sc/source/core/data/mtvelements.cxx
@@ -30,6 +30,8 @@ ColumnBlockPositionSet::ColumnBlockPositionSet(ScDocument& rDoc) : mrDoc(rDoc) {
ColumnBlockPosition* ColumnBlockPositionSet::getBlockPosition(SCTAB nTab, SCCOL nCol)
{
+ osl::MutexGuard aGuard(&maMtxTables);
+
TablesType::iterator itTab = maTables.find(nTab);
if (itTab == maTables.end())
{
commit 7cf9ea71ad1364d00eaca95b309cc6c0f35cf6cb
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 13:14:57 2013 -0500
Guard access to external ref manager instance.
Change-Id: Ie3208844b523463954c482d080f02d726ae749f9
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 09f1466..08ba3a2 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -39,6 +39,7 @@
#include "calcmacros.hxx"
#include <tools/fract.hxx>
#include <tools/gen.hxx>
+#include "osl/mutex.hxx"
#include <memory>
#include <map>
@@ -298,7 +299,9 @@ private:
::std::auto_ptr<ScDocProtection> pDocProtection;
::std::auto_ptr<ScClipParam> mpClipParam;
- ::std::auto_ptr<ScExternalRefManager> pExternalRefMgr;
+ boost::scoped_ptr<ScExternalRefManager> mpExternalRefMgr;
+ mutable osl::Mutex maMtxExternalRefMgr;
+
::std::auto_ptr<ScMacroManager> mpMacroMgr;
@@ -661,7 +664,7 @@ public:
const OUString& aFileName,
const OUString& aTabName );
- bool HasExternalRefManager() const { return pExternalRefMgr.get(); }
+ SC_DLLPUBLIC bool HasExternalRefManager() const;
SC_DLLPUBLIC ScExternalRefManager* GetExternalRefManager() const;
bool IsInExternalReferenceMarking() const;
void MarkUsedExternalReferences();
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 23a4bcf..846b5c8 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -150,7 +150,7 @@ ScDocument::ScDocument( ScDocumentMode eMode, SfxObjectShell* pDocShell ) :
pCacheFieldEditEngine( NULL ),
pDocProtection( NULL ),
mpClipParam( NULL),
- pExternalRefMgr( NULL ),
+ mpExternalRefMgr( NULL ),
mpMacroMgr( NULL ),
pViewOptions( NULL ),
pDocOptions( NULL ),
@@ -384,7 +384,7 @@ ScDocument::~ScDocument()
mxFormulaParserPool.reset();
// Destroy the external ref mgr instance here because it has a timer
// which needs to be stopped before the app closes.
- pExternalRefMgr.reset();
+ mpExternalRefMgr.reset();
ScAddInAsync::RemoveDocument( this );
ScAddInListener::RemoveDocument( this );
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 73f8d71..67fda15 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -582,30 +582,41 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const OUString& aDocTab,
return true;
}
+bool ScDocument::HasExternalRefManager() const
+{
+ osl::MutexGuard aGuard(&maMtxExternalRefMgr);
+ return mpExternalRefMgr.get();
+}
+
ScExternalRefManager* ScDocument::GetExternalRefManager() const
{
+ osl::MutexGuard aGuard(&maMtxExternalRefMgr);
+
ScDocument* pThis = const_cast<ScDocument*>(this);
- if (!pExternalRefMgr.get())
- pThis->pExternalRefMgr.reset( new ScExternalRefManager( pThis));
+ if (!mpExternalRefMgr.get())
+ pThis->mpExternalRefMgr.reset( new ScExternalRefManager( pThis));
- return pExternalRefMgr.get();
+ return mpExternalRefMgr.get();
}
bool ScDocument::IsInExternalReferenceMarking() const
{
- return pExternalRefMgr.get() && pExternalRefMgr->isInReferenceMarking();
+ osl::MutexGuard aGuard(&maMtxExternalRefMgr);
+ return mpExternalRefMgr.get() && mpExternalRefMgr->isInReferenceMarking();
}
void ScDocument::MarkUsedExternalReferences()
{
- if (!pExternalRefMgr.get())
+ osl::MutexGuard aGuard(&maMtxExternalRefMgr);
+
+ if (!mpExternalRefMgr.get())
return;
- if (!pExternalRefMgr->hasExternalData())
+ if (!mpExternalRefMgr->hasExternalData())
return;
// Charts.
- pExternalRefMgr->markUsedByLinkListeners();
+ mpExternalRefMgr->markUsedByLinkListeners();
// Formula cells.
- pExternalRefMgr->markUsedExternalRefCells();
+ mpExternalRefMgr->markUsedExternalRefCells();
/* NOTE: Conditional formats and validation objects are marked when
* collecting them during export. */
commit d716d59c3fe829d5241ce30f012428ee78577af7
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Thu Nov 7 13:01:40 2013 -0500
Move the API guard out of the worker threads onto the manager thread.
Just set this once before spawning multiple worker threads.
Change-Id: I9cb60721f633f939d4a95f1d80e2ed8e4542a8fa
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index c3e1d24..f58e9f7 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -107,7 +107,6 @@ void applyCellFormulas(
ScDocumentImport& rDoc, SvNumberFormatter& rFormatter,
const std::vector<FormulaBuffer::TokenAddressItem>& rCells )
{
- ScExternalRefManager::ApiGuard aExtRefGuard(&rDoc.getDoc());
std::vector<FormulaBuffer::TokenAddressItem>::const_iterator it = rCells.begin(), itEnd = rCells.end();
for (; it != itEnd; ++it)
{
@@ -225,8 +224,11 @@ void FormulaBuffer::FinalizeThread::execute()
{
ScDocumentImport& rDoc = mrParent.getDocImport();
rDoc.getDoc().SetAutoNameCache(new ScAutoNameCache(&rDoc.getDoc()));
+ ScExternalRefManager::ApiGuard aExtRefGuard(&rDoc.getDoc());
+
SCTAB nTabCount = rDoc.getDoc().GetTableCount();
+ // Fetch all the formulas to process first.
std::vector<SheetItem> aSheetItems;
aSheetItems.reserve(nTabCount);
for (SCTAB nTab = 0; nTab < nTabCount; ++nTab)
@@ -238,6 +240,10 @@ void FormulaBuffer::FinalizeThread::execute()
std::vector<SheetItem>::iterator it = aSheetItems.begin(), itEnd = aSheetItems.end();
+ // TODO: Right now we are spawning multiple threads all at once and block
+ // on them all at once. Any more clever thread management would require
+ // use of condition variables which our own osl thread framework seems to
+ // lack.
while (it != itEnd)
{
for (size_t i = 0; i < mnThreadCount; ++i)
commit 07e3af405a8f16a9495de2d0642c67e660bbf8f0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 7 13:49:45 2013 +0000
bump jpeg from 8c to 8d
Change-Id: I9f739ff803ef777931139bedb835a5fda46cb377
diff --git a/download.lst b/download.lst
index 7a56e0d..554358d 100644
--- a/download.lst
+++ b/download.lst
@@ -67,7 +67,7 @@ export JFREEREPORT_LIBREPOSITORY_TARBALL := 8ce2fcd72becf06c41f7201d15373ed9-lib
export JFREEREPORT_LIBSERIALIZER_TARBALL := f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
export JFREEREPORT_LIBXML_TARBALL := ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
export JFREEREPORT_SAC_TARBALL := 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
-export JPEG_TARBALL := a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz
+export JPEG_TARBALL := 52654eb3b2e60c35731ea8fc87f1bd29-jpegsrc.v8d.tar.gz
export LANGUAGETOOL_TARBALL := b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2
export LCMS2_TARBALL := 861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz
export LIBEXTTEXTCAT_TARBALL := ae330b9493bd4503ac390106ff6060d7-libexttextcat-3.4.3.tar.bz2
commit 00ab87f80f6f720b34f166be2069e82147c844a9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 7 14:19:26 2013 +0100
DOCX export: handle semiHidden para style
Change-Id: Icde4d5af2398a241c628f16225f1d427a2f27cfc
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 15bcff1..4ca41e4 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3593,7 +3593,7 @@ oox::drawingml::DrawingML& DocxAttributeOutput::GetDrawingML()
void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
- bool bQFormat = false, bUnhideWhenUsed = false, bLocked = false, bDefault = false, bCustomStyle = false;
+ bool bQFormat = false, bUnhideWhenUsed = false, bSemiHidden = false, bLocked = false, bDefault = false, bCustomStyle = false;
OUString aLink, aRsid, aUiPriority;
FastAttributeList* pStyleAttributeList = m_pSerializer->createAttrList();
if (eType == STYLE_TYPE_PARA)
@@ -3615,6 +3615,8 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
aRsid = rGrabBag[i].Value.get<OUString>();
else if (rGrabBag[i].Name == "unhideWhenUsed")
bUnhideWhenUsed = true;
+ else if (rGrabBag[i].Name == "semiHidden")
+ bSemiHidden = true;
else if (rGrabBag[i].Name == "locked")
bLocked = true;
else if (rGrabBag[i].Name == "default")
@@ -3653,6 +3655,8 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
FSEND);
if (bQFormat)
m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
+ if (bSemiHidden)
+ m_pSerializer->singleElementNS(XML_w, XML_semiHidden, FSEND);
if (bUnhideWhenUsed)
m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
if (!aLink.isEmpty())
commit b4577903f572ebb21641b4444c630c76ef5accf4
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 7 13:16:30 2013 +0100
DOCX import: handle NS_ooxml::LN_CT_Style_autoRedefine
Change-Id: I8c2c0ca8d060e2c460d0f36aed3050ed335fb3a3
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 432aae1..f96095d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1310,6 +1310,7 @@ DECLARE_OOXML_TEST(testStyleInheritance, "style-inheritance.docx")
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:locked", 1);
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading11']", "customStyle", "1");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading11']/w:autoRedefine", 1);
}
DECLARE_OOXML_TEST(testCalendar1, "calendar1.docx")
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index fcb04fb..b34273a 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -64,6 +64,7 @@ StyleSheetEntry::StyleSheetEntry() :
,sBaseStyleIdentifier()
,sNextStyleIdentifier()
,pProperties(new StyleSheetPropertyMap)
+ ,bAutoRedefine(false)
{
}
@@ -586,12 +587,14 @@ void StyleSheetTable::lcl_sprm(Sprm & rSprm)
m_pImpl->m_pCurrentEntry->sNextStyleIdentifier = sStringValue;
break;
case NS_ooxml::LN_CT_Style_aliases:
- case NS_ooxml::LN_CT_Style_autoRedefine:
case NS_ooxml::LN_CT_Style_hidden:
case NS_ooxml::LN_CT_Style_personal:
case NS_ooxml::LN_CT_Style_personalCompose:
case NS_ooxml::LN_CT_Style_personalReply:
break;
+ case NS_ooxml::LN_CT_Style_autoRedefine:
+ m_pImpl->m_pCurrentEntry->bAutoRedefine = nIntValue;
+ break;
case NS_ooxml::LN_CT_Style_tcPr:
{
writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
@@ -1198,11 +1201,14 @@ void StyleSheetTable::ApplyStyleSheets( FontTablePtr rFontTable )
}
beans::PropertyValues aGrabBag = pEntry->GetInteropGrabBagSeq();
+ uno::Reference<beans::XPropertySet> xPropertySet(xStyle, uno::UNO_QUERY);
if (aGrabBag.hasElements())
{
- uno::Reference<beans::XPropertySet> xPropertySet(xStyle, uno::UNO_QUERY);
xPropertySet->setPropertyValue("StyleInteropGrabBag", uno::makeAny(aGrabBag));
}
+
+ if (pEntry->bAutoRedefine)
+ xPropertySet->setPropertyValue("IsAutoUpdate", uno::makeAny(sal_True));
}
else if(pEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.hxx b/writerfilter/source/dmapper/StyleSheetTable.hxx
index 25c3065..d74eadf 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.hxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.hxx
@@ -67,6 +67,7 @@ public:
OUString sConvertedStyleName;
std::vector<beans::PropertyValue> aLatentStyles; ///< Attributes of latentStyles
std::vector<beans::PropertyValue> aLsdExceptions; ///< List of lsdException attribute lists
+ bool bAutoRedefine; ///< Writer calls this auto-update.
void AppendInteropGrabBag(beans::PropertyValue aValue);
beans::PropertyValue GetInteropGrabBag(); ///< Used for table styles, has a name.
commit 14641f650e548ad3341809a22deb46f5ec93fa24
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 7 12:00:58 2013 +0100
DOCX filter: roundtrip paragraph customStyle
Change-Id: I7fec154ff3b39845e91301b4fb607381e80e13f7
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 0714c16..432aae1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1308,6 +1308,8 @@ DECLARE_OOXML_TEST(testStyleInheritance, "style-inheritance.docx")
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:link", "val", "Heading1Char");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:locked", 1);
+
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading11']", "customStyle", "1");
}
DECLARE_OOXML_TEST(testCalendar1, "calendar1.docx")
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8721dbf..15bcff1 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3593,7 +3593,7 @@ oox::drawingml::DrawingML& DocxAttributeOutput::GetDrawingML()
void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
- bool bQFormat = false, bUnhideWhenUsed = false, bLocked = false, bDefault = false;
+ bool bQFormat = false, bUnhideWhenUsed = false, bLocked = false, bDefault = false, bCustomStyle = false;
OUString aLink, aRsid, aUiPriority;
FastAttributeList* pStyleAttributeList = m_pSerializer->createAttrList();
if (eType == STYLE_TYPE_PARA)
@@ -3619,6 +3619,8 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
bLocked = true;
else if (rGrabBag[i].Name == "default")
bDefault = rGrabBag[i].Value.get<sal_Bool>();
+ else if (rGrabBag[i].Name == "customStyle")
+ bCustomStyle = rGrabBag[i].Value.get<sal_Bool>();
else
SAL_WARN("sw.ww8", "Unhandled style property: " << rGrabBag[i].Name);
}
@@ -3635,6 +3637,8 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
pStyleAttributeList->add(FSNS( XML_w, XML_styleId ), m_rExport.pStyles->GetStyleId(nId).getStr());
if (bDefault)
pStyleAttributeList->add(FSNS(XML_w, XML_default), "1");
+ if (bCustomStyle)
+ pStyleAttributeList->add(FSNS(XML_w, XML_customStyle), "1");
XFastAttributeListRef xStyleAttributeList(pStyleAttributeList);
m_pSerializer->startElementNS( XML_w, XML_style, xStyleAttributeList);
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index bf035d6..fcb04fb 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -493,13 +493,12 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
}
break;
case NS_ooxml::LN_CT_Style_customStyle:
- if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE || m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_PARA)
{
- TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
aValue.Name = "customStyle";
aValue.Value = uno::makeAny(sal_Bool(nIntValue != 0));
- pTableEntry->AppendInteropGrabBag(aValue);
+ m_pImpl->m_pCurrentEntry->AppendInteropGrabBag(aValue);
}
break;
case NS_ooxml::LN_CT_Style_styleId:
commit c367a7e3cab3753eba3e0647cc4f013d882c521f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 7 11:52:39 2013 +0100
DOCX filter: roundtrip paragraph style default
Change-Id: I93495b4a2f85fe9729f8e1c810532717783756e4
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 974be7e..0714c16 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -1304,6 +1304,7 @@ DECLARE_OOXML_TEST(testStyleInheritance, "style-inheritance.docx")
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='ListParagraph']/w:uiPriority", "val", "34");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:qFormat", 1);
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']/w:rsid", "val", "00780346");
+ assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Normal']", "default", "1");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:link", "val", "Heading1Char");
assertXPath(pXmlStyles, "/w:styles/w:style[@w:styleId='Heading1']/w:locked", 1);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index d51fb00..8721dbf 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3593,22 +3593,9 @@ oox::drawingml::DrawingML& DocxAttributeOutput::GetDrawingML()
void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
- const char* pType = 0;
- switch (eType)
- {
- case STYLE_TYPE_PARA: pType = "paragraph"; break;
- case STYLE_TYPE_CHAR: pType = "character"; break;
- case STYLE_TYPE_LIST: pType = "numbering"; break;
- }
- m_pSerializer->startElementNS( XML_w, XML_style,
- FSNS( XML_w, XML_type ), pType,
- FSNS( XML_w, XML_styleId ), m_rExport.pStyles->GetStyleId(nId).getStr(),
- FSEND );
-
- m_pSerializer->singleElementNS( XML_w, XML_name,
- FSNS( XML_w, XML_val ), OUStringToOString( OUString( rName ), RTL_TEXTENCODING_UTF8 ).getStr(),
- FSEND );
-
+ bool bQFormat = false, bUnhideWhenUsed = false, bLocked = false, bDefault = false;
+ OUString aLink, aRsid, aUiPriority;
+ FastAttributeList* pStyleAttributeList = m_pSerializer->createAttrList();
if (eType == STYLE_TYPE_PARA)
{
const SwFmt* pFmt = m_rExport.pStyles->GetSwFmt(nId);
@@ -3616,8 +3603,6 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
pFmt->GetGrabBagItem(aAny);
const uno::Sequence<beans::PropertyValue>& rGrabBag = aAny.get< uno::Sequence<beans::PropertyValue> >();
- bool bQFormat = false, bUnhideWhenUsed = false, bLocked = false;
- OUString aLink, aRsid, aUiPriority;
for (sal_Int32 i = 0; i < rGrabBag.getLength(); ++i)
{
if (rGrabBag[i].Name == "uiPriority")
@@ -3632,29 +3617,50 @@ void DocxAttributeOutput::StartStyle( const OUString& rName, StyleType eType,
bUnhideWhenUsed = true;
else if (rGrabBag[i].Name == "locked")
bLocked = true;
+ else if (rGrabBag[i].Name == "default")
+ bDefault = rGrabBag[i].Value.get<sal_Bool>();
else
SAL_WARN("sw.ww8", "Unhandled style property: " << rGrabBag[i].Name);
}
+ }
- if (!aUiPriority.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
- FSNS(XML_w, XML_val), OUStringToOString(aUiPriority, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
- if (bQFormat)
- m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
- if (bUnhideWhenUsed)
- m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
- if (!aLink.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_link,
- FSNS(XML_w, XML_val), OUStringToOString(aLink, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
- if (bLocked)
- m_pSerializer->singleElementNS(XML_w, XML_locked, FSEND);
- if (!aRsid.isEmpty())
- m_pSerializer->singleElementNS(XML_w, XML_rsid,
- FSNS(XML_w, XML_val), OUStringToOString(aRsid, RTL_TEXTENCODING_UTF8).getStr(),
- FSEND);
+ const char* pType = 0;
+ switch (eType)
+ {
+ case STYLE_TYPE_PARA: pType = "paragraph"; break;
+ case STYLE_TYPE_CHAR: pType = "character"; break;
+ case STYLE_TYPE_LIST: pType = "numbering"; break;
}
+ pStyleAttributeList->add(FSNS( XML_w, XML_type ), pType);
+ pStyleAttributeList->add(FSNS( XML_w, XML_styleId ), m_rExport.pStyles->GetStyleId(nId).getStr());
+ if (bDefault)
+ pStyleAttributeList->add(FSNS(XML_w, XML_default), "1");
+ XFastAttributeListRef xStyleAttributeList(pStyleAttributeList);
+ m_pSerializer->startElementNS( XML_w, XML_style, xStyleAttributeList);
+
+ m_pSerializer->singleElementNS( XML_w, XML_name,
+ FSNS( XML_w, XML_val ), OUStringToOString( OUString( rName ), RTL_TEXTENCODING_UTF8 ).getStr(),
+ FSEND );
+
+ // Output properties from grab-bag.
+ if (!aUiPriority.isEmpty())
+ m_pSerializer->singleElementNS(XML_w, XML_uiPriority,
+ FSNS(XML_w, XML_val), OUStringToOString(aUiPriority, RTL_TEXTENCODING_UTF8).getStr(),
+ FSEND);
+ if (bQFormat)
+ m_pSerializer->singleElementNS(XML_w, XML_qFormat, FSEND);
+ if (bUnhideWhenUsed)
+ m_pSerializer->singleElementNS(XML_w, XML_unhideWhenUsed, FSEND);
+ if (!aLink.isEmpty())
+ m_pSerializer->singleElementNS(XML_w, XML_link,
+ FSNS(XML_w, XML_val), OUStringToOString(aLink, RTL_TEXTENCODING_UTF8).getStr(),
+ FSEND);
+ if (bLocked)
+ m_pSerializer->singleElementNS(XML_w, XML_locked, FSEND);
+ if (!aRsid.isEmpty())
+ m_pSerializer->singleElementNS(XML_w, XML_rsid,
+ FSNS(XML_w, XML_val), OUStringToOString(aRsid, RTL_TEXTENCODING_UTF8).getStr(),
+ FSEND);
if ( nBase != 0x0FFF && eType != STYLE_TYPE_LIST)
{
diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 1092bac..bf035d6 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -484,13 +484,12 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
break;
case NS_ooxml::LN_CT_Style_default:
m_pImpl->m_pCurrentEntry->bIsDefaultStyle = (nIntValue != 0);
- if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE)
+ if(m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_TABLE || m_pImpl->m_pCurrentEntry->nStyleTypeCode == STYLE_TYPE_PARA)
{
- TableStyleSheetEntry* pTableEntry = static_cast<TableStyleSheetEntry *>(m_pImpl->m_pCurrentEntry.get());
beans::PropertyValue aValue;
aValue.Name = "default";
- aValue.Value = uno::makeAny(sal_Bool(pTableEntry->bIsDefaultStyle));
- pTableEntry->AppendInteropGrabBag(aValue);
+ aValue.Value = uno::makeAny(sal_Bool(m_pImpl->m_pCurrentEntry->bIsDefaultStyle));
+ m_pImpl->m_pCurrentEntry->AppendInteropGrabBag(aValue);
}
break;
case NS_ooxml::LN_CT_Style_customStyle:
commit 0cd6fc9cfbe485c19ea80124a8c87e4d8e14f813
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Nov 7 12:08:01 2013 +0000
make the error not a secret
Change-Id: I4ee261bd1dc2c63f0b54e19a2684c8bf1c221680
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 43b186f..465b266 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -183,11 +183,11 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
rAcceptor->initialize( aSeq );
rMap.insert(AcceptorMap::value_type(aAcceptString, rAcceptor));
}
- catch (const com::sun::star::uno::Exception&)
+ catch (const com::sun::star::uno::Exception& e)
{
// no error handling needed...
// acceptor just won't come up
- SAL_WARN( "desktop.app", "Acceptor could not be created.");
+ SAL_WARN( "desktop.app", "Acceptor could not be created: " << e.Message);
}
}
else
commit 5d7bf132bda6e870e5333675c1897960d2c0134c
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 31 15:43:06 2013 +0200
remove unnecessary use of OUString constructor in TOOLKIT module
Change-Id: I0cc8c507ede20d5db1942b75e0c4b660dcd66c97
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index 341d829..e1be4c1 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -103,7 +103,7 @@ sal_Bool VCLXAccessibleComponent::supportsService( const OUString& rServiceName
uno::Sequence< OUString > VCLXAccessibleComponent::getSupportedServiceNames() throw (uno::RuntimeException)
{
uno::Sequence< OUString > aNames(1);
- aNames[0] = OUString("com.sun.star.awt.AccessibleWindow");
+ aNames[0] = "com.sun.star.awt.AccessibleWindow";
return aNames;
}
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 12022d1..9476b37 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -43,7 +43,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
if ( pWindow->GetType() != WINDOW_WORKWINDOW )
{
com::sun::star::uno::Exception aException;
- aException.Message = OUString("not a work window");
+ aException.Message = "not a work window";
throw aException;
}
@@ -73,7 +73,7 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
if( bThrow )
{
com::sun::star::uno::Exception aException;
- aException.Message = OUString("incorrect window handle type");
+ aException.Message = "incorrect window handle type";
throw aException;
}
// create system parent data
diff --git a/toolkit/source/controls/roadmapentry.cxx b/toolkit/source/controls/roadmapentry.cxx
index 4bf6a48..e636552 100644
--- a/toolkit/source/controls/roadmapentry.cxx
+++ b/toolkit/source/controls/roadmapentry.cxx
@@ -93,7 +93,7 @@ sal_Bool SAL_CALL ORoadmapEntry::supportsService( const OUString& ServiceName )
{
::com::sun::star::uno::Sequence< OUString > aRet(1);
OUString* pArray = aRet.getArray();
- pArray[0] = OUString("com.sun.star.awt.RoadmapItem");
+ pArray[0] = "com.sun.star.awt.RoadmapItem";
return aRet;
}
//--------------------------------------------------------------------------
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index 3830c242..f597c64 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -1090,7 +1090,7 @@ void UnoControl::createPeer( const Reference< XToolkit >& rxToolkit, const Refer
if ( !mxModel.is() )
{
RuntimeException aException;
- aException.Message = OUString("createPeer: no model!");
+ aException.Message = "createPeer: no model!";
aException.Context = (XAggregation*)(::cppu::OWeakAggObject*)this;
throw( aException );
}
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index e2503cf..3a4c59a 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -107,7 +107,7 @@ ImageHelper::getGraphicFromURL_nothrow( const OUString& _rURL )
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
uno::Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(xContext) );
uno::Sequence< beans::PropertyValue > aMediaProperties(1);
- aMediaProperties[0].Name = OUString( "URL" );
+ aMediaProperties[0].Name = "URL";
aMediaProperties[0].Value <<= _rURL;
xGraphic = xProvider->queryGraphic( aMediaProperties );
}
@@ -221,7 +221,7 @@ OUString UnoEditControl::GetComponentServiceName()
uno::Any aVal = ImplGetPropertyValue( GetPropertyName( BASEPROPERTY_MULTILINE ) );
sal_Bool b = sal_Bool();
if ( ( aVal >>= b ) && b )
- sName= OUString("MultiLineEdit");
+ sName = "MultiLineEdit";
return sName;
}
@@ -711,11 +711,11 @@ OUString UnoButtonControl::GetComponentServiceName()
// Use PushButtonType later when available...
switch ( n )
{
- case 1 /*PushButtonType::OK*/: aName= OUString("okbutton");
+ case 1 /*PushButtonType::OK*/: aName = "okbutton";
break;
- case 2 /*PushButtonType::CANCEL*/: aName= OUString("cancelbutton");
+ case 2 /*PushButtonType::CANCEL*/: aName = "cancelbutton";
break;
- case 3 /*PushButtonType::HELP*/: aName= OUString("helpbutton");
+ case 3 /*PushButtonType::HELP*/: aName = "helpbutton";
break;
default:
{
commit 24857c46daf06553e8618de46a0f3ece27c32675
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 31 15:40:40 2013 +0200
remove unnecessary use of OUString constructor in UCB module
Change-Id: Ic75e5aad03d66590e78275304c766c1c00179387
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 3d0e7d7..69555ab 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -883,8 +883,7 @@ bool UniversalContentBroker::getContentProviderData(
uno::Sequence< uno::Any > aArguments( 1 );
beans::PropertyValue aProperty;
- aProperty.Name
- = OUString( "nodepath" );
+ aProperty.Name = "nodepath";
aProperty.Value <<= aFullPath.makeStringAndClear();
aArguments[ 0 ] <<= aProperty;
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index d969330..75f03f7 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -484,8 +484,7 @@ bool setTitle(
try
{
uno::Sequence< beans::PropertyValue > aPropValues( 1 );
- aPropValues[ 0 ].Name
- = OUString( "Title" );
+ aPropValues[ 0 ].Name = "Title";
aPropValues[ 0 ].Handle = -1;
aPropValues[ 0 ].Value = uno::makeAny( rNewTitle );
@@ -560,10 +559,8 @@ uno::Reference< ucb::XContent > createNew(
}
uno::Sequence< beans::Property > aPropsToObtain( 1 );
- aPropsToObtain[ 0 ].Name
- = OUString("CreatableContentsInfo");
- aPropsToObtain[ 0 ].Handle
- = -1;
+ aPropsToObtain[ 0 ].Name = "CreatableContentsInfo";
+ aPropsToObtain[ 0 ].Handle = -1;
ucb::Command aGetPropsCommand(
OUString("getPropertyValues"),
@@ -879,8 +876,7 @@ void transferProperties(
// Title needed, but not set yet?
if ( !bHasTitle && !rContext.aArg.NewTitle.isEmpty() )
{
- aPropValues[ nWritePos ].Name
- = OUString("Title");
+ aPropValues[ nWritePos ].Name = "Title";
aPropValues[ nWritePos ].Handle = -1;
aPropValues[ nWritePos ].Value <<= rContext.aArg.NewTitle;
@@ -891,8 +887,7 @@ void transferProperties(
if ( !bHasTargetURL && ( rContext.aArg.Operation
== ucb::TransferCommandOperation_LINK ) )
{
- aPropValues[ nWritePos ].Name
- = OUString("TargetURL");
+ aPropValues[ nWritePos ].Name = "TargetURL";
aPropValues[ nWritePos ].Handle = -1;
aPropValues[ nWritePos ].Value <<= rContext.aArg.SourceURL;
@@ -1006,11 +1001,11 @@ uno::Reference< sdbc::XResultSet > getResultSet(
uno::Sequence< beans::Property > aProps( 3 );
- aProps[ 0 ].Name = OUString("IsFolder");
+ aProps[ 0 ].Name = "IsFolder";
aProps[ 0 ].Handle = -1; /* unknown */
- aProps[ 1 ].Name = OUString("IsDocument");
+ aProps[ 1 ].Name = "IsDocument";
aProps[ 1 ].Handle = -1; /* unknown */
- aProps[ 2 ].Name = OUString("TargetURL");
+ aProps[ 2 ].Name = "TargetURL";
aProps[ 2 ].Handle = -1; /* unknown */
ucb::OpenCommandArgument2 aArg;
@@ -1057,7 +1052,7 @@ void handleNameClashRename(
// Obtain old title.
uno::Sequence< beans::Property > aProps( 1 );
- aProps[ 0 ].Name = OUString("Title");
+ aProps[ 0 ].Name = "Title";
aProps[ 0 ].Handle = -1;
ucb::Command aGetPropsCommand(
@@ -1958,13 +1953,13 @@ void UniversalContentBroker::globalTransfer(
uno::Sequence< beans::Property > aProps( 4 );
- aProps[ 0 ].Name = OUString("IsFolder");
+ aProps[ 0 ].Name = "IsFolder";
aProps[ 0 ].Handle = -1; /* unknown */
- aProps[ 1 ].Name = OUString("IsDocument");
+ aProps[ 1 ].Name = "IsDocument";
aProps[ 1 ].Handle = -1; /* unknown */
- aProps[ 2 ].Name = OUString("TargetURL");
+ aProps[ 2 ].Name = "TargetURL";
aProps[ 2 ].Handle = -1; /* unknown */
- aProps[ 3 ].Name = OUString("BaseURI");
+ aProps[ 3 ].Name = "BaseURI";
aProps[ 3 ].Handle = -1; /* unknown */
ucb::Command aGetPropsCommand(
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index accf348..cb07ef2 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1484,7 +1484,7 @@ void SortedResultSet::CheckProperties( sal_IntPtr nOldCount, sal_Bool bWasFinal
sal_Bool bIsFinal = sal_False;
PropertyChangeEvent aEvt;
- aEvt.PropertyName = OUString("RowCount");
+ aEvt.PropertyName = "RowCount";
aEvt.Further = sal_False;
aEvt.PropertyHandle = -1;
aEvt.OldValue <<= nOldCount;
@@ -1492,7 +1492,7 @@ void SortedResultSet::CheckProperties( sal_IntPtr nOldCount, sal_Bool bWasFinal
PropertyChanged( aEvt );
- OUString aName = OUString("IsRowCountFinal");
+ OUString aName = "IsRowCountFinal";
Any aRet = getPropertyValue( aName );
if ( (aRet >>= bIsFinal) && bIsFinal != bWasFinal )
{
@@ -1998,12 +1998,12 @@ void SimpleList::Replace( void* pData, sal_uInt32 nPos )
SRSPropertySetInfo::SRSPropertySetInfo()
{
- maProps[0].Name = OUString("RowCount");
+ maProps[0].Name = "RowCount";
maProps[0].Handle = -1;
maProps[0].Type = ::getCppuType( (const OUString*) NULL );
maProps[0].Attributes = -1;
- maProps[1].Name = OUString("IsRowCountFinal");
+ maProps[1].Name = "IsRowCountFinal";
maProps[1].Handle = -1;
maProps[1].Type = ::getBooleanCppuType();
maProps[1].Attributes = -1;
diff --git a/ucb/source/ucp/cmis/cmis_datasupplier.cxx b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
index f128c94..4899a71 100644
--- a/ucb/source/ucp/cmis/cmis_datasupplier.cxx
+++ b/ucb/source/ucp/cmis/cmis_datasupplier.cxx
@@ -134,7 +134,7 @@ namespace cmis
xContent, uno::UNO_QUERY_THROW );
sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() );
ucb::Command aCmd;
- aCmd.Name = OUString("getPropertyValues");
+ aCmd.Name = "getPropertyValues";
aCmd.Handle = -1;
aCmd.Argument <<= getResultSet()->getProperties();
uno::Any aResult( xCmdProc->execute(
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index e179bfd..0578243 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -278,7 +278,7 @@ BaseContent::getSupportedServiceNames()
throw( RuntimeException )
{
Sequence< OUString > ret( 1 );
- ret[0] = OUString("com.sun.star.ucb.FileContent");
+ ret[0] = "com.sun.star.ucb.FileContent";
return ret;
}
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index e830a5e..5ff18a2 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -85,13 +85,13 @@ namespace {
switch (aStatus.getFileType())
{
case osl::FileStatus::Directory:
- aResourceType = OUString( "folder");
+ aResourceType = "folder";
bResourceType = true;
break;
case osl::FileStatus::Volume:
{
- aResourceType = OUString( "volume");
+ aResourceType = "volume";
bResourceType = true;
osl::VolumeInfo aVolumeInfo(
osl_VolumeInfo_Mask_Attributes );
@@ -555,7 +555,7 @@ namespace fileaccess {
excep.Name = getTitle(aUncPath);
excep.Classification = InteractionClassification_ERROR;
excep.Context = xComProc;
- excep.Message = OUString( "file exists and overwrite forbidden");
+ excep.Message = "file exists and overwrite forbidden";
aAny <<= excep;
cancelCommandExecution( aAny,xEnv );
}
@@ -564,7 +564,7 @@ namespace fileaccess {
InteractiveAugmentedIOException excep;
excep.Code = IOErrorCode_INVALID_CHARACTER;
PropertyValue prop;
- prop.Name = OUString("ResourceName");
+ prop.Name = "ResourceName";
prop.Handle = -1;
OUString m_aClashingName(
rtl::Uri::decode(
@@ -577,7 +577,7 @@ namespace fileaccess {
excep.Arguments = seq;
excep.Classification = InteractionClassification_ERROR;
excep.Context = xComProc;
- excep.Message = OUString( "the name contained invalid characters");
+ excep.Message = "the name contained invalid characters";
if(isHandled)
throw excep;
else {
@@ -598,7 +598,7 @@ namespace fileaccess {
excep.Name = getTitle(aUncPath);
excep.Classification = InteractionClassification_ERROR;
excep.Context = xComProc;
- excep.Message = OUString( "folder exists and overwrite forbidden");
+ excep.Message = "folder exists and overwrite forbidden";
if(isHandled)
throw excep;
else {
@@ -756,18 +756,18 @@ namespace fileaccess {
errorCode == TASKHANDLING_TRANSFER_BY_MOVE_SOURCESTAT )
{
ioErrorCode = IOErrorCode_NOT_EXISTING;
- aMsg = OUString( "source file/folder does not exist");
+ aMsg = "source file/folder does not exist";
break;
}
else
{
ioErrorCode = IOErrorCode_GENERAL;
- aMsg = OUString( "a general error during transfer command");
+ aMsg = "a general error during transfer command";
break;
}
default:
ioErrorCode = IOErrorCode_GENERAL;
- aMsg = OUString( "a general error during transfer command");
+ aMsg = "a general error during transfer command";
break;
}
cancelCommandExecution(
@@ -831,7 +831,7 @@ namespace fileaccess {
break;
case FileBase::E_NOENT: // No such file or directory
ioErrorCode = IOErrorCode_NOT_EXISTING;
- aMsg = OUString( "file/folder does not exist");
+ aMsg = "file/folder does not exist";
break;
case FileBase::E_ROFS: // Read-only file system<p>
ioErrorCode = IOErrorCode_NOT_EXISTING;
@@ -854,7 +854,7 @@ namespace fileaccess {
excep.Name = getTitle(aUncPath);
excep.Classification = InteractionClassification_ERROR;
excep.Context = xComProc;
- excep.Message = OUString( "name clash during copy or move");
+ excep.Message = "name clash during copy or move";
aAny <<= excep;
cancelCommandExecution(aAny,xEnv);
@@ -865,7 +865,7 @@ namespace fileaccess {
UnsupportedNameClashException excep;
excep.NameClash = minorCode;
excep.Context = xComProc;
- excep.Message = OUString( "name clash value not supported during copy or move");
+ excep.Message = "name clash value not supported during copy or move";
aAny <<= excep;
cancelCommandExecution(aAny,xEnv);
diff --git a/ucb/source/ucp/file/filinsreq.cxx b/ucb/source/ucp/file/filinsreq.cxx
index c9629d4..49a7dac 100644
--- a/ucb/source/ucp/file/filinsreq.cxx
+++ b/ucb/source/ucp/file/filinsreq.cxx
@@ -186,7 +186,7 @@ XInteractionRequestImpl::getRequest()
excep.Name = m_aClashingName;
excep.Classification = InteractionClassification_ERROR;
excep.Context = m_xOrigin;
- excep.Message = OUString( "folder exists and overwritte forbidden");
+ excep.Message = "folder exists and overwritte forbidden";
aAny <<= excep;
}
else if(m_nErrorCode == TASKHANDLING_INVALID_NAME_MKDIR)
@@ -194,7 +194,7 @@ XInteractionRequestImpl::getRequest()
InteractiveAugmentedIOException excep;
excep.Code = IOErrorCode_INVALID_CHARACTER;
PropertyValue prop;
- prop.Name = OUString("ResourceName");
+ prop.Name = "ResourceName";
prop.Handle = -1;
prop.Value <<= m_aClashingName;
Sequence<Any> seq(1);
@@ -202,7 +202,7 @@ XInteractionRequestImpl::getRequest()
excep.Arguments = seq;
excep.Classification = InteractionClassification_ERROR;
excep.Context = m_xOrigin;
- excep.Message = OUString( "the name contained invalid characters");
+ excep.Message = "the name contained invalid characters";
aAny <<= excep;
}
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 457f4ca..8c6618f 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -226,7 +226,7 @@ void XResultSet_impl::rowCountChanged()
aOldValue = aNewValue-1;
}
beans::PropertyChangeEvent aEv;
- aEv.PropertyName = OUString("RowCount");
+ aEv.PropertyName = "RowCount";
aEv.Further = false;
aEv.PropertyHandle = -1;
aEv.OldValue <<= aOldValue;
@@ -251,7 +251,7 @@ void XResultSet_impl::isFinalChanged()
m_bRowCountFinal = true;
}
beans::PropertyChangeEvent aEv;
- aEv.PropertyName = OUString("IsRowCountFinal");
+ aEv.PropertyName = "IsRowCountFinal";
aEv.Further = false;
aEv.PropertyHandle = -1;
sal_Bool fval = false;
@@ -788,12 +788,12 @@ XResultSet_impl::getPropertySetInfo()
{
uno::Sequence< beans::Property > seq(2);
- seq[0].Name = OUString("RowCount");
+ seq[0].Name = "RowCount";
seq[0].Handle = -1;
seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) );
seq[0].Attributes = beans::PropertyAttribute::READONLY;
- seq[0].Name = OUString("IsRowCountFinal");
+ seq[0].Name = "IsRowCountFinal";
seq[0].Handle = -1;
seq[0].Type = getCppuType( static_cast< sal_Bool* >(0) );
seq[0].Attributes = beans::PropertyAttribute::READONLY;
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index 3d30f78..1948f29 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -353,39 +353,39 @@ shell::shell( const uno::Reference< uno::XComponentContext >& rxContext,
| beans::PropertyAttribute::READONLY ) );
// Commands
- m_sCommandInfo[0].Name = OUString("getCommandInfo");
+ m_sCommandInfo[0].Name = "getCommandInfo";
m_sCommandInfo[0].Handle = -1;
m_sCommandInfo[0].ArgType = getCppuVoidType();
- m_sCommandInfo[1].Name = OUString("getPropertySetInfo");
+ m_sCommandInfo[1].Name = "getPropertySetInfo";
m_sCommandInfo[1].Handle = -1;
m_sCommandInfo[1].ArgType = getCppuVoidType();
- m_sCommandInfo[2].Name = OUString("getPropertyValues");
+ m_sCommandInfo[2].Name = "getPropertyValues";
m_sCommandInfo[2].Handle = -1;
m_sCommandInfo[2].ArgType = getCppuType( static_cast< uno::Sequence< beans::Property >* >( 0 ) );
- m_sCommandInfo[3].Name = OUString("setPropertyValues");
+ m_sCommandInfo[3].Name = "setPropertyValues";
m_sCommandInfo[3].Handle = -1;
m_sCommandInfo[3].ArgType = getCppuType( static_cast< uno::Sequence< beans::PropertyValue >* >( 0 ) );
- m_sCommandInfo[4].Name = OUString("open");
+ m_sCommandInfo[4].Name = "open";
m_sCommandInfo[4].Handle = -1;
m_sCommandInfo[4].ArgType = getCppuType( static_cast< OpenCommandArgument* >( 0 ) );
- m_sCommandInfo[5].Name = OUString("transfer");
+ m_sCommandInfo[5].Name = "transfer";
m_sCommandInfo[5].Handle = -1;
m_sCommandInfo[5].ArgType = getCppuType( static_cast< TransferInfo* >( 0 ) );
- m_sCommandInfo[6].Name = OUString("delete");
+ m_sCommandInfo[6].Name = "delete";
m_sCommandInfo[6].Handle = -1;
m_sCommandInfo[6].ArgType = getCppuType( static_cast< sal_Bool* >( 0 ) );
- m_sCommandInfo[7].Name = OUString("insert");
+ m_sCommandInfo[7].Name = "insert";
m_sCommandInfo[7].Handle = -1;
m_sCommandInfo[7].ArgType = getCppuType( static_cast< InsertCommandArgument* > ( 0 ) );
- m_sCommandInfo[7].Name = OUString("createNewContent");
+ m_sCommandInfo[7].Name = "createNewContent";
m_sCommandInfo[7].Handle = -1;
m_sCommandInfo[7].ArgType = getCppuType( static_cast< ucb::ContentInfo * > ( 0 ) );
@@ -1952,11 +1952,11 @@ void SAL_CALL shell::insertDefaultProperties( const OUString& aUnqPath )
/******************************************************************************/
-sal_Bool SAL_CALL shell::getUnqFromUrl( const OUString& Url,OUString& Unq )
+sal_Bool SAL_CALL shell::getUnqFromUrl( const OUString& Url, OUString& Unq )
{
if ( Url == "file:///" || Url == "file://localhost/" || Url == "file://127.0.0.1/" )
{
- Unq = OUString("file:///");
+ Unq = "file:///";
return false;
}
@@ -3037,14 +3037,14 @@ uno::Sequence< ucb::ContentInfo > shell::queryCreatableContentsInfo()
/*******************************************************************************/
/* */
-/* some misceancellous static functions */
+/* some miscellaneous static functions */
/* */
/*******************************************************************************/
void SAL_CALL
shell::getScheme( OUString& Scheme )
{
- Scheme = OUString("file");
+ Scheme = "file";
}
OUString SAL_CALL
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index eedc779..e98e0f8 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -361,7 +361,7 @@ Any SAL_CALL FTPContent::execute(
{
Sequence<Any> seq(1);
PropertyValue value;
- value.Name = OUString("Uri");
+ value.Name = "Uri";
value.Handle = -1;
value.Value <<= m_aFTPURL.ident(false,false);
value.State = PropertyState_DIRECT_VALUE;
@@ -396,7 +396,7 @@ Any SAL_CALL FTPContent::execute(
{
Sequence<Any> seq(1);
PropertyValue value;
- value.Name = OUString("Uri");
+ value.Name = "Uri";
value.Handle = -1;
value.Value <<= m_aFTPURL.ident(false,false);
value.State = PropertyState_DIRECT_VALUE;
@@ -514,7 +514,7 @@ Any SAL_CALL FTPContent::execute(
if(n) {
Sequence<Any> seq(1);
PropertyValue value;
- value.Name = OUString("Uri");
+ value.Name = "Uri";
value.Handle = -1;
value.Value <<= m_aFTPURL.ident(false,false);
value.State = PropertyState_DIRECT_VALUE;
@@ -733,7 +733,7 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand,
if(m_bInserted && !m_bTitleSet) {
MissingPropertiesException excep;
excep.Properties.realloc(1);
- excep.Properties[0] = OUString("Title");
+ excep.Properties[0] = "Title";
Any aAny; aAny <<= excep;
ucbhelper::cancelCommandExecution(aAny,Env);
}
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index f220f09..8ace75c 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -502,12 +502,12 @@ ResultSetBase::getPropertySetInfo()
throw( uno::RuntimeException)
{
uno::Sequence< beans::Property > seq(2);
- seq[0].Name = OUString("RowCount");
+ seq[0].Name = "RowCount";
seq[0].Handle = -1;
seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) );
seq[0].Attributes = beans::PropertyAttribute::READONLY;
- seq[1].Name = OUString("IsRowCountFinal");
+ seq[1].Name = "IsRowCountFinal";
seq[1].Handle = -1;
seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) );
seq[1].Attributes = beans::PropertyAttribute::READONLY;
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 60b6dcae..b71db5ae 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -576,7 +576,7 @@ OUString FTPURL::net_title() const
aNetTitle = decodePathSegment(m_aPathSegmentVec.back());
else
// must be root
- aNetTitle = OUString("/");
+ aNetTitle = "/";
try_more = false;
}
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index f2ae841..347ec40 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -706,7 +706,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
g_warning ("Set new name to '%s'", newName);
#endif
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
if (oldName)
aEvent.OldValue = uno::makeAny(OUString(oldName, strlen(oldName), RTL_TEXTENCODING_UTF8));
aEvent.NewValue = uno::makeAny(aNewTitle);
@@ -1340,7 +1340,7 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException )
{
uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = OUString("com.sun.star.ucb.GIOContent");
+ aSNS.getArray()[ 0 ] = "com.sun.star.ucb.GIOContent";
return aSNS;
}
diff --git a/ucb/source/ucp/gio/gio_datasupplier.cxx b/ucb/source/ucp/gio/gio_datasupplier.cxx
index bc4fb04..9deda7f 100644
--- a/ucb/source/ucp/gio/gio_datasupplier.cxx
+++ b/ucb/source/ucp/gio/gio_datasupplier.cxx
@@ -235,7 +235,7 @@ uno::Reference< sdbc::XRow > DataSupplier::queryPropertyValues( sal_uInt32 nInde
xContent, uno::UNO_QUERY_THROW );
sal_Int32 nCmdId( xCmdProc->createCommandIdentifier() );
ucb::Command aCmd;
- aCmd.Name = OUString("getPropertyValues");
+ aCmd.Name = "getPropertyValues";
aCmd.Handle = -1;
aCmd.Argument <<= getResultSet()->getProperties();
uno::Any aResult( xCmdProc->execute(
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index ef97acc..a2e5573 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -245,7 +245,7 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException )
{
uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ] = OUString( "com.sun.star.ucb.GnomeVFSContent" );
+ aSNS.getArray()[ 0 ] = "com.sun.star.ucb.GnomeVFSContent";
return aSNS;
}
@@ -538,7 +538,7 @@ OUString Content::getParentURL()
nPos1 = aURL.lastIndexOf( '/', nPos1 );
if ( nPos1 != -1 )
- aParentURL = OUString( aURL.copy( 0, nPos + 1 ) );
+ aParentURL = aURL.copy( 0, nPos + 1 );
#if OSL_DEBUG_LEVEL > 1
g_warning ("getParentURL '%s' -> '%s'",
@@ -805,7 +805,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
g_warning ("Set new name to '%s'", newName);
#endif
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( GnomeToOUString( newInfo.name ) );
aEvent.NewValue = uno::makeAny( aNewTitle );
aChanges.getArray()[ nChanged ] = aEvent;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index b0fa90f..4c1bd9f 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -300,11 +300,11 @@ HierarchyContent::getSupportedServiceNames()
uno::Sequence< OUString > aSNS( 1 );
if ( m_eKind == LINK )
- aSNS.getArray()[ 0 ] = OUString( HIERARCHY_LINK_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = HIERARCHY_LINK_CONTENT_SERVICE_NAME;
else if ( m_eKind == FOLDER )
- aSNS.getArray()[ 0 ] = OUString( HIERARCHY_FOLDER_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = HIERARCHY_FOLDER_CONTENT_SERVICE_NAME;
else
- aSNS.getArray()[ 0 ] = OUString( HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = HIERARCHY_ROOT_FOLDER_CONTENT_SERVICE_NAME;
return aSNS;
}
@@ -1325,7 +1325,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
m_aProps.setTitle( aOldTitle );
m_aProps.setName ( aOldName );
- aOldTitle = aOldName = OUString();
+ aOldTitle = aOldName = "";
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
@@ -1336,7 +1336,7 @@ uno::Sequence< uno::Any > HierarchyContent::setPropertyValues(
if ( !aOldTitle.isEmpty() )
{
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( aOldTitle );
aEvent.NewValue = uno::makeAny( m_aProps.getTitle() );
@@ -1401,7 +1401,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
if ( m_aProps.getTitle().isEmpty() )
{
uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = OUString("Title");
+ aProps[ 0 ] = "Title";
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),
@@ -1807,7 +1807,7 @@ void HierarchyContent::transfer(
ucb::TransferInfo aInfo;
aInfo.MoveData = sal_False;
- aInfo.NewTitle = OUString();
+ aInfo.NewTitle = "";
aInfo.SourceURL = aChildId;
aInfo.NameClash = rInfo.NameClash;
@@ -1866,10 +1866,8 @@ HierarchyContentProperties::getCreatableContentsInfo() const
uno::Sequence< ucb::ContentInfo > aSeq( 2 );
// Folder.
- aSeq.getArray()[ 0 ].Type
- = OUString( HIERARCHY_FOLDER_CONTENT_TYPE );
- aSeq.getArray()[ 0 ].Attributes
- = ucb::ContentInfoAttribute::KIND_FOLDER;
+ aSeq.getArray()[ 0 ].Type = HIERARCHY_FOLDER_CONTENT_TYPE;
+ aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER;
uno::Sequence< beans::Property > aFolderProps( 1 );
aFolderProps.getArray()[ 0 ] = beans::Property(
@@ -1880,10 +1878,8 @@ HierarchyContentProperties::getCreatableContentsInfo() const
aSeq.getArray()[ 0 ].Properties = aFolderProps;
// Link.
- aSeq.getArray()[ 1 ].Type
- = OUString( HIERARCHY_LINK_CONTENT_TYPE );
- aSeq.getArray()[ 1 ].Attributes
- = ucb::ContentInfoAttribute::KIND_LINK;
+ aSeq.getArray()[ 1 ].Type = HIERARCHY_LINK_CONTENT_TYPE;
+ aSeq.getArray()[ 1 ].Attributes = ucb::ContentInfoAttribute::KIND_LINK;
uno::Sequence< beans::Property > aLinkProps( 2 );
aLinkProps.getArray()[ 0 ] = beans::Property(
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index 5f50aac..9eb1f88 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -50,13 +50,13 @@ void HierarchyUri::init() const
if ( !m_aUri.isEmpty() && m_aPath.isEmpty() )
{
// Note: Maybe it's a re-init, setUri only resets m_aPath!
- m_aService = m_aParentUri = m_aName = OUString();
+ m_aService = m_aParentUri = m_aName = "";
// URI must match at least: <sheme>:
if ( ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 ) )
{
// error, but remember that we did a init().
- m_aPath = OUString("/");
+ m_aPath = "/";
return;
}
@@ -76,7 +76,7 @@ void HierarchyUri::init() const
{
// root folder URI without path and service specifier.
m_aUri += "//" DEFAULT_DATA_SOURCE_SERVICE "/";
- m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE );
+ m_aService = DEFAULT_DATA_SOURCE_SERVICE ;
nPos = m_aUri.getLength() - 1;
}
@@ -86,7 +86,7 @@ void HierarchyUri::init() const
{
// root folder URI without service specifier.
m_aUri += "/" DEFAULT_DATA_SOURCE_SERVICE "/";
- m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE );
+ m_aService = DEFAULT_DATA_SOURCE_SERVICE;
nPos = m_aUri.getLength() - 1;
}
@@ -99,7 +99,7 @@ void HierarchyUri::init() const
HIERARCHY_URL_SCHEME_LENGTH + 2,
0,
OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" ) );
- m_aService = OUString( DEFAULT_DATA_SOURCE_SERVICE );
+ m_aService = DEFAULT_DATA_SOURCE_SERVICE;
nPos
= HIERARCHY_URL_SCHEME_LENGTH + 3 + m_aService.getLength();
@@ -116,7 +116,7 @@ void HierarchyUri::init() const
if ( nStart == m_aUri.getLength() )
{
// error, but remember that we did a init().
- m_aPath = OUString("/");
+ m_aPath = "/";
return;
}
@@ -126,7 +126,7 @@ void HierarchyUri::init() const
nStart ) != -1 )
{
// error, but remember that we did a init().
- m_aPath = OUString("/");
+ m_aPath = "/";
return;
}
@@ -136,7 +136,7 @@ void HierarchyUri::init() const
if ( nEnd == nStart )
{
// error, but remember that we did a init().
- m_aPath = OUString("/");
+ m_aPath = "/";
return;
}
@@ -180,7 +180,7 @@ void HierarchyUri::init() const
else
{
// error, but remember that we did a init().
- m_aPath = OUString("/");
+ m_aPath = "/";
}
}
}
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index b8eb22e..34c5af5 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -417,9 +417,9 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
{
uno::Sequence< OUString > aSNS( 1 );
if ( isFolder() )
- aSNS.getArray()[ 0 ] = OUString( PACKAGE_FOLDER_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = PACKAGE_FOLDER_CONTENT_SERVICE_NAME;
else
- aSNS.getArray()[ 0 ] = OUString( PACKAGE_STREAM_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = PACKAGE_STREAM_CONTENT_SERVICE_NAME;
return aSNS;
}
@@ -1390,7 +1390,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
// Do not set new title!
- aNewTitle = OUString();
+ aNewTitle = "";
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
@@ -1401,7 +1401,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( !aNewTitle.isEmpty() )
{
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( m_aProps.aTitle );
aEvent.NewValue = uno::makeAny( aNewTitle );
@@ -2041,7 +2041,7 @@ void Content::transfer(
ucb::TransferInfo aInfo;
aInfo.MoveData = sal_False;
- aInfo.NewTitle = OUString();
+ aInfo.NewTitle = "";
aInfo.SourceURL = aChildId;
aInfo.NameClash = rInfo.NameClash;
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 54543c3..6a2acc7 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -314,13 +314,13 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
uno::Sequence< OUString > aSNS( 1 );
if ( m_aProps.getType() == STREAM )
- aSNS.getArray()[ 0 ] = OUString( TDOC_STREAM_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = TDOC_STREAM_CONTENT_SERVICE_NAME;
else if ( m_aProps.getType() == FOLDER )
- aSNS.getArray()[ 0 ] = OUString( TDOC_FOLDER_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = TDOC_FOLDER_CONTENT_SERVICE_NAME;
else if ( m_aProps.getType() == DOCUMENT )
- aSNS.getArray()[ 0 ] = OUString( TDOC_DOCUMENT_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = TDOC_DOCUMENT_CONTENT_SERVICE_NAME;
else
- aSNS.getArray()[ 0 ] = OUString( TDOC_ROOT_CONTENT_SERVICE_NAME );
+ aSNS.getArray()[ 0 ] = TDOC_ROOT_CONTENT_SERVICE_NAME;
return aSNS;
}
@@ -1350,7 +1350,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
// Roll-back.
m_aProps.setTitle( aOldTitle );
- aOldTitle = OUString();
+ aOldTitle = "";
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
@@ -1361,7 +1361,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( !aOldTitle.isEmpty() )
{
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( aOldTitle );
aEvent.NewValue = uno::makeAny( m_aProps.getTitle() );
@@ -2953,10 +2953,8 @@ ContentProperties::getCreatableContentsInfo() const
uno::Sequence< ucb::ContentInfo > aSeq( 1 );
// Folder.
- aSeq.getArray()[ 0 ].Type
- = OUString( TDOC_FOLDER_CONTENT_TYPE );
- aSeq.getArray()[ 0 ].Attributes
- = ucb::ContentInfoAttribute::KIND_FOLDER;
+ aSeq.getArray()[ 0 ].Type = TDOC_FOLDER_CONTENT_TYPE;
+ aSeq.getArray()[ 0 ].Attributes = ucb::ContentInfoAttribute::KIND_FOLDER;
aSeq.getArray()[ 0 ].Properties = aProps;
return aSeq;
@@ -2967,15 +2965,13 @@ ContentProperties::getCreatableContentsInfo() const
uno::Sequence< ucb::ContentInfo > aSeq( 2 );
// Folder.
- aSeq.getArray()[ 0 ].Type
- = OUString( TDOC_FOLDER_CONTENT_TYPE );
+ aSeq.getArray()[ 0 ].Type = TDOC_FOLDER_CONTENT_TYPE;
aSeq.getArray()[ 0 ].Attributes
= ucb::ContentInfoAttribute::KIND_FOLDER;
aSeq.getArray()[ 0 ].Properties = aProps;
// Stream.
- aSeq.getArray()[ 1 ].Type
- = OUString( TDOC_STREAM_CONTENT_TYPE );
+ aSeq.getArray()[ 1 ].Type = TDOC_STREAM_CONTENT_TYPE;
aSeq.getArray()[ 1 ].Attributes
= ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM
| ucb::ContentInfoAttribute::KIND_DOCUMENT;
diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx
index 24110bf..f868a60 100644
--- a/ucb/source/ucp/tdoc/tdoc_uri.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx
@@ -114,7 +114,7 @@ void Uri::init() const
if ( nSlash != - 1 )
m_aInternalPath = m_aPath.copy( nSlash );
else
- m_aInternalPath = OUString("/");
+ m_aInternalPath = "/";
}
m_eState = VALID;
diff --git a/ucb/source/ucp/webdav-neon/DAVProperties.cxx b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
index 7abdb6f..313462e 100644
--- a/ucb/source/ucp/webdav-neon/DAVProperties.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVProperties.cxx
@@ -130,7 +130,7 @@ void DAVProperties::createUCBPropName( const char * nspace,
DAVProperties::GETETAG.matchIgnoreAsciiCase( aName, 4 ) ||
DAVProperties::GETLASTMODIFIED.matchIgnoreAsciiCase( aName, 4 ) ||
DAVProperties::SOURCE.matchIgnoreAsciiCase( aName, 4 ) )
- aNameSpace = OUString( "DAV:" );
+ aNameSpace = "DAV:";
}
// Note: Concatenating strings BEFORE comparing against known namespaces
@@ -156,11 +156,7 @@ void DAVProperties::createUCBPropName( const char * nspace,
else
{
// Create property name that encodes, namespace and name ( XML ).
- rFullName = OUString("<prop:");
- rFullName += aName;
- rFullName += OUString( " xmlns:prop=\"" );
- rFullName += aNameSpace;
- rFullName += OUString( "\">" );
+ rFullName = "<prop:" + aName + " xmlns:prop=\"" + aNameSpace + "\">";
}
}
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index f117a9b..bff41ad 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -345,8 +345,7 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames()
throw( uno::RuntimeException )
{
uno::Sequence< OUString > aSNS( 1 );
- aSNS.getArray()[ 0 ]
- = OUString( WEBDAV_CONTENT_SERVICE_NAME );
+ aSNS[ 0 ] = WEBDAV_CONTENT_SERVICE_NAME;
return aSNS;
}
@@ -1030,8 +1029,7 @@ Content::queryCreatableContentsInfo()
uno::Sequence< ucb::ContentInfo > aSeq( 2 );
// document.
- aSeq.getArray()[ 0 ].Type
- = OUString( WEBDAV_CONTENT_TYPE );
+ aSeq.getArray()[ 0 ].Type = WEBDAV_CONTENT_TYPE;
aSeq.getArray()[ 0 ].Attributes
= ucb::ContentInfoAttribute::INSERT_WITH_INPUTSTREAM
| ucb::ContentInfoAttribute::KIND_DOCUMENT;
@@ -1045,8 +1043,7 @@ Content::queryCreatableContentsInfo()
aSeq.getArray()[ 0 ].Properties = aDocProps;
// folder.
- aSeq.getArray()[ 1 ].Type
- = OUString( WEBDAV_COLLECTION_TYPE );
+ aSeq.getArray()[ 1 ].Type = WEBDAV_COLLECTION_TYPE;
aSeq.getArray()[ 1 ].Attributes
= ucb::ContentInfoAttribute::KIND_FOLDER;
@@ -1890,7 +1887,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
else
{
// Do not set new title!
- aNewTitle = OUString();
+ aNewTitle = "";
// Set error .
aRet[ nTitlePos ] <<= uno::Exception(
@@ -1901,7 +1898,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
catch ( DAVException const & e )
{
// Do not set new title!
- aNewTitle = OUString();
+ aNewTitle = "";
// Set error .
aRet[ nTitlePos ] <<= MapDAVException( e, sal_True );
@@ -1912,7 +1909,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- aEvent.PropertyName = OUString("Title");
+ aEvent.PropertyName = "Title";
aEvent.OldValue = uno::makeAny( aOldTitle );
aEvent.NewValue = uno::makeAny( aNewTitle );
@@ -2289,7 +2286,7 @@ void Content::insert(
OSL_FAIL( "Content::insert - Title missing!" );
uno::Sequence< OUString > aProps( 1 );
- aProps[ 0 ] = OUString("Title");
+ aProps[ 0 ] = "Title";
ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingPropertiesException(
OUString(),
@@ -2595,7 +2592,7 @@ void Content::transfer(
if ( aTitle == "/" )
{
// kso: ???
- aTitle = OUString();
+ aTitle = "";
}
targetURI.AppendPath( aTitle );
@@ -2943,7 +2940,7 @@ sal_Bool Content::isFolder(
}
uno::Sequence< beans::Property > aProperties( 1 );
- aProperties[ 0 ].Name = OUString("IsFolder");
+ aProperties[ 0 ].Name = "IsFolder";
aProperties[ 0 ].Handle = -1;
uno::Reference< sdbc::XRow > xRow( getPropertyValues( aProperties, xEnv ) );
if ( xRow.is() )
@@ -3210,10 +3207,10 @@ Content::ResourceType Content::getResourceType(
std::vector< DAVResource > resources;
std::vector< OUString > aPropNames;
uno::Sequence< beans::Property > aProperties( 5 );
- aProperties[ 0 ].Name = OUString("IsFolder");
- aProperties[ 1 ].Name = OUString("IsDocument");
- aProperties[ 2 ].Name = OUString("IsReadOnly");
- aProperties[ 3 ].Name = OUString("MediaType");
+ aProperties[ 0 ].Name = "IsFolder";
+ aProperties[ 1 ].Name = "IsDocument";
+ aProperties[ 2 ].Name = "IsReadOnly";
+ aProperties[ 3 ].Name = "MediaType";
aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK;
ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames );
diff --git a/ucb/workben/ucb/ucbdemo.cxx b/ucb/workben/ucb/ucbdemo.cxx
index 6c2392b..bb0631e 100644
--- a/ucb/workben/ucb/ucbdemo.cxx
+++ b/ucb/workben/ucb/ucbdemo.cxx
@@ -907,18 +907,15 @@ void UcbContent::open( const OUString & rName, const OUString& rInput,
return;
}
aArgument.Properties.realloc(5);
- aArgument.Properties[0].Name = OUString("Title");
+ aArgument.Properties[0].Name = "Title";
aArgument.Properties[0].Handle = -1;
- aArgument.Properties[1].Name
- = OUString("DateCreated");
+ aArgument.Properties[1].Name = "DateCreated";
aArgument.Properties[1].Handle = -1;
- aArgument.Properties[2].Name = OUString("Size");
+ aArgument.Properties[2].Name = "Size";
aArgument.Properties[2].Handle = -1;
- aArgument.Properties[3].Name
- = OUString("IsFolder");
+ aArgument.Properties[3].Name = "IsFolder";
aArgument.Properties[3].Handle = -1;
- aArgument.Properties[4].Name
- = OUString("IsDocument");
+ aArgument.Properties[4].Name = "IsDocument";
aArgument.Properties[4].Handle = -1;
aArg <<= aArgument;
}
@@ -931,19 +928,19 @@ void UcbContent::open( const OUString & rName, const OUString& rInput,
// Property values which shall be in the result set...
uno::Sequence< beans::Property > aProps( 5 );
beans::Property* pProps = aProps.getArray();
- pProps[ 0 ].Name = OUString("Title");
+ pProps[ 0 ].Name = "Title";
pProps[ 0 ].Handle = -1; // Important!
/**/ pProps[ 0 ].Type = getCppuType(static_cast< OUString * >(0));
// HACK for sorting...
- pProps[ 1 ].Name = OUString("DateCreated");
+ pProps[ 1 ].Name = "DateCreated";
pProps[ 1 ].Handle = -1; // Important!
- pProps[ 2 ].Name = OUString("Size");
+ pProps[ 2 ].Name = "Size";
pProps[ 2 ].Handle = -1; // Important!
- pProps[ 3 ].Name = OUString("IsFolder");
+ pProps[ 3 ].Name = "IsFolder";
pProps[ 3 ].Handle = -1; // Important!
/**/ pProps[ 3 ].Type = getCppuType(static_cast< sal_Bool * >(0));
// HACK for sorting...
- pProps[ 4 ].Name = OUString("IsDocument");
+ pProps[ 4 ].Name = "IsDocument";
pProps[ 4 ].Handle = -1; // Important!
aOpenArg.Properties = aProps;
@@ -2204,7 +2201,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox )
uno::Any aArgument;
if (nItemId == MYWIN_ITEMID_OFFLINE)
{
- aName = OUString("goOffline");
+ aName = "goOffline";
uno::Sequence<
uno::Reference< ucb::XContentIdentifier > >
@@ -2215,7 +2212,7 @@ IMPL_LINK( MyWin, ToolBarHandler, ToolBox*, pToolBox )
aArgument <<= aIdentifiers;
}
else
- aName = OUString("goOnline");
+ aName = "goOnline";
UcbCommandProcessor(m_aUCB, xProcessor, m_pOutEdit).
executeCommand(aName, aArgument);
@@ -2268,7 +2265,7 @@ void MyApp::Main()
{
aConfigurationKey1
= aParam.Copy(RTL_CONSTASCII_LENGTH("-key="));
- aConfigurationKey2 = OUString();
+ aConfigurationKey2 = "";
}
else
{
commit f6ad2b7a52266e7a4d039f9ba557476e6881fa5f
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 31 14:40:44 2013 +0200
remove unnecessary use of OUString constructor in UCBHELPER module
Change-Id: I3e3cfc69c14a300f330264ae40c135e8135adb97
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index e36207b..91cea87 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -393,7 +393,7 @@ Reference< XCommandInfo > Content::getCommands()
throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
- aCommand.Name = OUString("getCommandInfo");
+ aCommand.Name = "getCommandInfo";
aCommand.Handle = -1; // n/a
aCommand.Argument = Any();
@@ -409,7 +409,7 @@ Reference< XPropertySetInfo > Content::getProperties()
throw( CommandAbortedException, RuntimeException, Exception )
{
Command aCommand;
- aCommand.Name = OUString("getPropertySetInfo");
+ aCommand.Name = "getPropertySetInfo";
aCommand.Handle = -1; // n/a
aCommand.Argument = Any();
@@ -489,7 +489,7 @@ Reference< XRow > Content::getPropertyValuesInterface(
}
Command aCommand;
- aCommand.Name = OUString("getPropertyValues");
+ aCommand.Name = "getPropertyValues";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aProps;
@@ -537,7 +537,7 @@ Sequence< Any > Content::setPropertyValues(
}
Command aCommand;
- aCommand.Name = OUString("setPropertyValues");
+ aCommand.Name = "setPropertyValues";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aProps;
@@ -587,7 +587,7 @@ Any Content::createCursorAny( const Sequence< OUString >& rPropertyNames,
aArg.Properties = aProps;
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -706,7 +706,7 @@ Reference< XInputStream > Content::openStream()
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -731,7 +731,7 @@ Reference< XInputStream > Content::openStreamNoLock()
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -756,7 +756,7 @@ Reference< XStream > Content::openWriteableStream()
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -781,7 +781,7 @@ Reference< XStream > Content::openWriteableStreamNoLock()
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -804,7 +804,7 @@ sal_Bool Content::openStream( const Reference< XActiveDataSink >& rSink )
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -827,7 +827,7 @@ sal_Bool Content::openStream( const Reference< XOutputStream >& rStream )
aArg.Properties = Sequence< Property >( 0 ); // unused
Command aCommand;
- aCommand.Name = OUString("open");
+ aCommand.Name = "open";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -846,7 +846,7 @@ void Content::writeStream( const Reference< XInputStream >& rStream,
aArg.ReplaceExisting = bReplaceExisting;
Command aCommand;
- aCommand.Name = OUString("insert");
+ aCommand.Name = "insert";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aArg;
@@ -908,7 +908,7 @@ sal_Bool Content::insertNewContent( const OUString& rContentType,
aInfo.Attributes = 0;
Command aCommand;
- aCommand.Name = OUString("createNewContent");
+ aCommand.Name = "createNewContent";
aCommand.Handle = -1; // n/a
aCommand.Argument <<= aInfo;
@@ -990,7 +990,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent,
case InsertOperation_CHECKIN:
eTransOp = TransferCommandOperation_COPY;
- sCommand = OUString( "checkin" );
+ sCommand = "checkin";
bCheckIn = true;
break;
@@ -1180,7 +1180,7 @@ void Content_Impl::disposing( const EventObject& Source )
xContent = m_xContent;
- m_aURL = OUString();
+ m_aURL = "";
m_xCommandProcessor = 0;
m_xContent = 0;
}
@@ -1301,7 +1301,7 @@ void Content_Impl::inserted()
{
// URL might have changed during 'insert' => recalculate in next getURL()
osl::MutexGuard aGuard( m_aMutex );
- m_aURL = OUString();
+ m_aURL = "";
}
//=========================================================================
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index 114c12a..55a8e7b 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -711,7 +711,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
if ( nColonPos == -1 )
{
// No port given, server pattern equals current token
- aPort = OUString("*");
+ aPort = "*";
if ( aToken.indexOf( '*' ) == -1 )
{
// pattern describes exactly one server
commit 5fca9e5bfce57875e5d93245d6d1219d0a0e86c1
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 31 14:38:55 2013 +0200
remove unnecessary use of OUString constructor in UNOTOOLS module
Change-Id: Iad166e6b9ce0877200bd58c388b3914b15167196
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index ed18ff1..f0e6966 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -116,7 +116,7 @@ GlobalEventConfig_Impl::GlobalEventConfig_Impl()
// Enable notification mechanism of our baseclass.
// We need it to get information about changes outside these class on our used configuration keys! */
Sequence< OUString > aNotifySeq( 1 );
- aNotifySeq[0] = OUString( "Events" );
+ aNotifySeq[0] = "Events";
EnableNotification( aNotifySeq, sal_True );
}
@@ -256,9 +256,9 @@ Any SAL_CALL GlobalEventConfig_Impl::getByName( const OUString& aName ) throw (c
{
Any aRet;
Sequence< beans::PropertyValue > props(2);
- props[0].Name = OUString("EventType");
+ props[0].Name = "EventType";
props[0].Value <<= OUString("Script");
- props[1].Name = OUString("Script");
+ props[1].Name = "Script";
EventBindingHash::const_iterator it = m_eventBindingHash.find( aName );
if( it != m_eventBindingHash.end() )
{
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 8f1e767..0f0344a 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -1100,7 +1100,7 @@ uno::Reference< util::XChangesBatch > SvtLinguConfig::GetMainUpdateAccess() cons
// get configuration update access
beans::PropertyValue aValue;
- aValue.Name = OUString("nodepath");
+ aValue.Name = "nodepath";
aValue.Value = uno::makeAny(OUString("org.openoffice.Office.Linguistic"));
uno::Sequence< uno::Any > aProps(1);
aProps[0] <<= aValue;
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 09a230e..c9fcf63 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -120,20 +120,20 @@ const ::com::sun::star::lang::Locale& LocaleDataWrapper::getMyLocale() const
void LocaleDataWrapper::invalidateData()
{
- aCurrSymbol = OUString();
- aCurrBankSymbol = OUString();
+ aCurrSymbol = "";
+ aCurrBankSymbol = "";
nDateFormat = nLongDateFormat = nDateFormatInvalid;
nCurrPositiveFormat = nCurrNegativeFormat = nCurrDigits = nCurrFormatInvalid;
if ( bLocaleDataItemValid )
{
for (sal_Int32 j=0; j<LocaleItem::COUNT; ++j)
- aLocaleItem[j] = OUString();
+ aLocaleItem[j] = "";
bLocaleDataItemValid = sal_False;
}
if ( bReservedWordValid )
{
for ( sal_Int16 j=0; j<reservedWords::COUNT; ++j )
- aReservedWord[j] = OUString();
+ aReservedWord[j] = "";
bReservedWordValid = sal_False;
}
xDefaultCalendar.reset();
@@ -595,7 +595,7 @@ void LocaleDataWrapper::getCurrSymbolsImpl()
{
if (areChecksEnabled())
outputCheckMessage(OUString("LocaleDataWrapper::getCurrSymbolsImpl: no currency at all, using ShellsAndPebbles"));
- aCurrSymbol = OUString("ShellsAndPebbles");
+ aCurrSymbol = "ShellsAndPebbles";
aCurrBankSymbol = aCurrSymbol;
nCurrPositiveFormat = nCurrNegativeFormat = nCurrFormatDefault;
nCurrDigits = 2;
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list