[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - bridges/source sc/inc sc/source writerfilter/source
Steve Yin
steve_y at apache.org
Fri Feb 14 13:07:46 CET 2014
bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx | 17 ++++
sc/inc/document.hxx | 1
sc/source/core/data/documen3.cxx | 3
sc/source/ui/unoobj/nameuno.cxx | 67 +++++++++++++-----
writerfilter/source/dmapper/DomainMapper.cxx | 4 -
5 files changed, 74 insertions(+), 18 deletions(-)
New commits:
commit d89ee4f6306ce8f290e01c80edbcc28a5cd8dcc3
Author: Steve Yin <steve_y at apache.org>
Date: Fri Feb 14 08:44:17 2014 +0000
Bug 124065 - [Performance] Low performance opening attached .ods
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3338e25..d49f648 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -503,6 +503,7 @@ public:
ScFieldEditEngine* CreateFieldEditEngine();
void DisposeFieldEditEngine(ScFieldEditEngine*& rpEditEngine);
+ // Note: the returned ScRangeName is volatile, and it can be changed at any time.
SC_DLLPUBLIC ScRangeName* GetRangeName();
void SetRangeName( ScRangeName* pNewRangeName );
SCTAB GetMaxTableNumber() { return nMaxTableNumber; }
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index 739028c..7be975f 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -95,6 +95,9 @@ ScRangeName* ScDocument::GetRangeName()
void ScDocument::SetRangeName( ScRangeName* pNewRangeName )
{
+ if (pRangeName == pNewRangeName)
+ return;
+
if (pRangeName)
delete pRangeName;
pRangeName = pNewRangeName;
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index d4fc7ca..203603d 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -160,7 +160,6 @@ void ScNamedRangeObj::Modify_Impl( const String* pNewRangeName, const ScTokenArr
newNameScope = nameScope;
//end of add
- ScRangeName* pNewRanges = new ScRangeName( *pNames );
ScRangeData* pOld = (*pNames)[nPos];
String aInsName(pOld->GetName());
@@ -185,18 +184,38 @@ void ScNamedRangeObj::Modify_Impl( const String* pNewRangeName, const ScTokenArr
pNew->SetIndex( pOld->GetIndex() );
pNew->SetRangeScope(newNameScope);
- pNewRanges->AtFree( nPos );
- if ( pNewRanges->Insert(pNew) )
+ const bool bSupportUndo(!pDoc->IsImportingXML());
+ if ( bSupportUndo )
{
- ScDocFunc aFunc(*pDocShell);
- aFunc.SetNewRangeNames( pNewRanges, sal_True );
- aName = aInsName; //! broadcast?
- aScopeName = pNewScopeName ? *pNewScopeName : aScopeName;
+ ScRangeName* pNewRanges = new ScRangeName( *pNames );
+ pNewRanges->AtFree( nPos );
+ if ( pNewRanges->Insert(pNew) )
+ {
+ ScDocFunc aFunc(*pDocShell);
+ aFunc.SetNewRangeNames( pNewRanges, sal_True );
+ aName = aInsName; //! broadcast?
+ aScopeName = pNewScopeName ? *pNewScopeName : aScopeName;
+ }
+ else
+ {
+ delete pNew; //! uno::Exception/Fehler oder so
+ delete pNewRanges;
+ }
}
else
{
- delete pNew; //! uno::Exception/Fehler oder so
- delete pNewRanges;
+ pNames->AtFree( nPos );
+ if ( pNames->Insert(pNew) )
+ {
+ ScDocFunc aFunc(*pDocShell);
+ aFunc.SetNewRangeNames( pNames, sal_True );
+ aName = aInsName; //! broadcast?
+ aScopeName = pNewScopeName ? *pNewScopeName : aScopeName;
+ }
+ else
+ {
+ delete pNew; //! uno::Exception/Fehler oder so
+ }
}
}
}
@@ -596,23 +615,41 @@ void ScNamedRangesObj::ImplAddNewByScopeAndName(SCTAB aScope, const ::rtl::OUStr
String aContStr(aContent);
if (pNames && !pNames->SearchName(aNameStr, nIndex,aScope))
{
- ScRangeName* pNewRanges = new ScRangeName( *pNames );
+
// GRAM_PODF_A1 for API compatibility.
ScRangeData* pNew = new ScRangeData( pDoc, aNameStr, aContStr,
aPos, nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );//GRAM_ODFF,//
pNew->SetRangeScope(aScope);
- if ( pNewRanges->Insert(pNew) )
+ const bool bSupportUndo(!pDoc->IsImportingXML());
+ if ( bSupportUndo )
{
- ScDocFunc aFunc(*pDocShell);
+ ScRangeName* pNewRanges = new ScRangeName( *pNames );
+ if ( pNewRanges->Insert(pNew) )
+ {
+ ScDocFunc aFunc(*pDocShell);
aFunc.SetNewRangeNames( pNewRanges, sal_True );
- bDone = true;
+ bDone = true;
+ }
+ else
+ {
+ delete pNew;
+ delete pNewRanges;
+ }
}
else
{
- delete pNew;
- delete pNewRanges;
+ if ( pNames->Insert(pNew) )
+ {
+ ScDocFunc aFunc(*pDocShell);
+ aFunc.SetNewRangeNames( pNames, sal_True );
+ bDone = true;
+ }
+ else
+ {
+ delete pNew;
+ }
}
}
}
commit 95eeed58af27c63977a43c4d688b1467ef3cf047
Author: Herbert Dürr <hdu at apache.org>
Date: Thu Feb 13 13:21:50 2014 +0000
#i124086# preserve 16byte stack alignment in gcc3-solaris-intel's uno2cpp bridge
Patch-by: Apostolos Syropoulos <asyropoulos123 at hotmail.com>
Review-by: Herbert Dürr <hdu at apache.org>
diff --git a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
index 118ce49..9c79959 100644
--- a/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx
@@ -45,7 +45,15 @@ namespace
{
//==================================================================================================
-static void callVirtualMethod(
+void callVirtualMethod(
+ void * pAdjustedThisPtr,
+ sal_Int32 nVtableIndex,
+ void * pRegisterReturn,
+ typelib_TypeClass eReturnType,
+ sal_Int32 * pStackLongs,
+ sal_Int32 nStackLongs ) __attribute__((noinline));
+
+void callVirtualMethod(
void * pAdjustedThisPtr,
sal_Int32 nVtableIndex,
void * pRegisterReturn,
@@ -67,6 +75,13 @@ static void callVirtualMethod(
void * stackptr;
asm volatile (
"mov %%esp, %6\n\t"
+ // preserve potential 128bit stack alignment
+ "and $0xfffffff0, %%esp\n\t"
+ "mov %0, %%eax\n\t"
+ "lea -4(,%%eax,4), %%eax\n\t"
+ "and $0xf, %%eax\n\t"
+ "sub $0xc, %%eax\n\t"
+ "add %%eax, %%esp\n\t"
// copy values
"mov %0, %%eax\n\t"
"mov %%eax, %%edx\n\t"
commit 24db7825cea42ea0afed692bb3fe66793b7481f8
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Thu Feb 13 09:27:28 2014 +0000
124058: correction the formerly provided fix
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index c5acdd8..6f590f7 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2271,7 +2271,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
if ( m_pImpl->IsStyleSheetImport() )
{
- StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
+ pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
}
if ( pStyleSheetPropertyMap != NULL )
@@ -2293,7 +2293,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
StyleSheetPropertyMap* pStyleSheetPropertyMap = NULL;
if ( m_pImpl->IsStyleSheetImport() )
{
- StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
+ pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() );
}
ListsManager::Pointer pListTable = m_pImpl->GetListTable();
More information about the Libreoffice-commits
mailing list