[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - dbaccess/source python/makefile.mk python/python-solver-before-std.patch sc/source
Oliver-Rainer Wittmann
orw at apache.org
Tue Jul 2 03:07:41 PDT 2013
dbaccess/source/ui/inc/QueryTableView.hxx | 1
dbaccess/source/ui/querydesign/QueryTableView.cxx | 71 +++++++++++------
python/makefile.mk | 1
python/python-solver-before-std.patch | 90 ++++++++++++++++++++++
sc/source/filter/html/htmlpars.cxx | 67 ++++++----------
5 files changed, 166 insertions(+), 64 deletions(-)
New commits:
commit a934522d93ba1131052308b4f0b225adb9855c5b
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Tue Jul 2 09:00:25 2013 +0000
122591: correct the iteration on an HTML table
Patch by: Ariel <arielch>
Review by: Herbert <hdu>
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 79b5079..1a28d46 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1897,40 +1897,6 @@ ScHTMLTable* ScHTMLTableMap::CreateTable( const ImportInfo& rInfo, bool bPreForm
return pTable;
}
-// ----------------------------------------------------------------------------
-
-/** Simplified forward iterator for convenience.
-
- Before the iterator can be dereferenced, it must be tested with the is()
- method. The iterator may be invalid directly after construction (e.g. empty
- container).
- */
-class ScHTMLTableIterator
-{
-public:
- /** Constructs the iterator for the passed table map.
- @param pTableMap Pointer to the table map (is allowed to be NULL). */
- explicit ScHTMLTableIterator( const ScHTMLTableMap* pTableMap );
-
- inline bool is() const { return maIter != maEnd; }
- inline ScHTMLTable* operator->() { return maIter->second.get(); }
- inline ScHTMLTable& operator*() { return *maIter->second; }
- inline ScHTMLTableIterator& operator++() { ++maIter; return *this; }
-
-private:
- ScHTMLTableMap::const_iterator maIter;
- ScHTMLTableMap::const_iterator maEnd;
-};
-
-ScHTMLTableIterator::ScHTMLTableIterator( const ScHTMLTableMap* pTableMap )
-{
- if( pTableMap )
- {
- maIter = pTableMap->begin();
- maEnd = pTableMap->end();
- }
-}
-
// ============================================================================
ScHTMLTableAutoId::ScHTMLTableAutoId( ScHTMLTableId& rnUnusedId ) :
@@ -2299,8 +2265,15 @@ void ScHTMLTable::ApplyCellBorders( ScDocument* pDoc, const ScAddress& rFirstPos
}
}
- for( ScHTMLTableIterator aIter( mxNestedTables.get() ); aIter.is(); ++aIter )
- aIter->ApplyCellBorders( pDoc, rFirstPos );
+ if ( mxNestedTables.get() )
+ {
+ for ( ScHTMLTableMap::const_iterator aIter( mxNestedTables->begin() );
+ aIter != mxNestedTables->end(); ++aIter )
+ {
+ if ( aIter->second.get() )
+ aIter->second->ApplyCellBorders( pDoc, rFirstPos );
+ }
+ }
}
// ----------------------------------------------------------------------------
@@ -2593,8 +2566,15 @@ void ScHTMLTable::CalcNeededDocSize(
void ScHTMLTable::FillEmptyCells()
{
- for( ScHTMLTableIterator aIter( mxNestedTables.get() ); aIter.is(); ++aIter )
- aIter->FillEmptyCells();
+ if ( mxNestedTables.get() )
+ {
+ for ( ScHTMLTableMap::const_iterator aIter( mxNestedTables->begin() );
+ aIter != mxNestedTables->end(); ++aIter )
+ {
+ if ( aIter->second.get() )
+ aIter->second->FillEmptyCells();
+ }
+ }
// insert the final vertically merged ranges into maUsedCells
for( const ScRange* pRange = maVMergedCells.First(); pRange; pRange = maVMergedCells.Next() )
@@ -2627,8 +2607,15 @@ void ScHTMLTable::FillEmptyCells()
void ScHTMLTable::RecalcDocSize()
{
// recalc table sizes recursively from inner to outer
- for( ScHTMLTableIterator aIter( mxNestedTables.get() ); aIter.is(); ++aIter )
- aIter->RecalcDocSize();
+ if ( mxNestedTables.get() )
+ {
+ for ( ScHTMLTableMap::const_iterator aIter( mxNestedTables->begin() );
+ aIter != mxNestedTables->end(); ++aIter )
+ {
+ if ( aIter->second.get() )
+ aIter->second->RecalcDocSize();
+ }
+ }
/* Two passes: first calculates the sizes of single columns/rows, then
the sizes of spanned columns/rows. This allows to fill nested tables
commit 48558dc3e09ec442bc4caf867df4b97354b4d334
Author: Armin Le Grand <alg at apache.org>
Date: Tue Jul 2 08:50:18 2013 +0000
i122589 check if element is added before removing and deleting it (well, put it in undo)
diff --git a/dbaccess/source/ui/inc/QueryTableView.hxx b/dbaccess/source/ui/inc/QueryTableView.hxx
index 7e6979e..d6bce5d 100644
--- a/dbaccess/source/ui/inc/QueryTableView.hxx
+++ b/dbaccess/source/ui/inc/QueryTableView.hxx
@@ -73,6 +73,7 @@ namespace dbaui
// Basisklasse ueberschrieben : Fenster kreieren und loeschen
// (eigentlich nicht wirklich LOESCHEN, es geht in die Verantwortung einer UNDO-Action ueber)
+ bool ContainsTabWin(const OTableWindow& rTabWin); // #122589# Allow to check if OTableWindow is registered
virtual void AddTabWin( const ::rtl::OUString& _rTableName, const ::rtl::OUString& _rAliasName, sal_Bool bNewTable = sal_False );
virtual void RemoveTabWin(OTableWindow* pTabWin);
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index bf5f76a..0984fa3 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -835,42 +835,65 @@ sal_Bool OQueryTableView::FindTableFromField(const String& rFieldName, OTableFie
}
//------------------------------------------------------------------------------
+bool OQueryTableView::ContainsTabWin(const OTableWindow& rTabWin)
+{
+ OTableWindowMap* pTabWins = GetTabWinMap();
+ DBG_ASSERT(pTabWins != NULL, "OQueryTableView::HideTabWin : habe keine TabWins !");
+
+ OTableWindowMap::iterator aIter = pTabWins->begin();
+ OTableWindowMap::iterator aEnd = pTabWins->end();
+
+ for ( ;aIter != aEnd ; ++aIter )
+ {
+ if ( aIter->second == &rTabWin )
+ {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+//------------------------------------------------------------------------------
void OQueryTableView::RemoveTabWin(OTableWindow* pTabWin)
{
DBG_CHKTHIS(OQueryTableView,NULL);
DBG_ASSERT(pTabWin != NULL, "OQueryTableView::RemoveTabWin : Fenster sollte ungleich NULL sein !");
- // mein Parent brauche ich, da es vom Loeschen erfahren soll
- OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView());
+ if(pTabWin && ContainsTabWin(*pTabWin)) // #122589# check if registered before deleting
+ {
+ // mein Parent brauche ich, da es vom Loeschen erfahren soll
+ OQueryDesignView* pParent = static_cast<OQueryDesignView*>(getDesignView());
- SfxUndoManager& rUndoMgr = m_pView->getController().GetUndoManager();
- rUndoMgr.EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
+ SfxUndoManager& rUndoMgr = m_pView->getController().GetUndoManager();
+ rUndoMgr.EnterListAction( String( ModuleRes(STR_QUERY_UNDO_TABWINDELETE) ), String() );
- // Undo-Action anlegen
- OQueryTabWinDelUndoAct* pUndoAction = new OQueryTabWinDelUndoAct(this);
- pUndoAction->SetTabWin(static_cast< OQueryTableWindow*>(pTabWin));
+ // Undo-Action anlegen
+ OQueryTabWinDelUndoAct* pUndoAction = new OQueryTabWinDelUndoAct(this);
+ pUndoAction->SetTabWin(static_cast< OQueryTableWindow*>(pTabWin));
- // und Fenster verstecken
- HideTabWin(static_cast< OQueryTableWindow*>(pTabWin), pUndoAction);
+ // und Fenster verstecken
+ HideTabWin(static_cast< OQueryTableWindow*>(pTabWin), pUndoAction);
- // Undo Actions und Loeschen der Felder in SelectionBrowseBox
- pParent->TableDeleted( static_cast< OQueryTableWindowData*>(pTabWin->GetData().get())->GetAliasName() );
+ // Undo Actions und Loeschen der Felder in SelectionBrowseBox
+ pParent->TableDeleted( static_cast< OQueryTableWindowData*>(pTabWin->GetData().get())->GetAliasName() );
- m_pView->getController().addUndoActionAndInvalidate( pUndoAction );
- rUndoMgr.LeaveListAction();
+ m_pView->getController().addUndoActionAndInvalidate( pUndoAction );
+ rUndoMgr.LeaveListAction();
- if (m_lnkTabWinsChangeHandler.IsSet())
- {
- TabWinsChangeNotification aHint(TabWinsChangeNotification::AT_REMOVED_WIN, static_cast< OQueryTableWindow*>(pTabWin)->GetAliasName());
- m_lnkTabWinsChangeHandler.Call(&aHint);
- }
+ if (m_lnkTabWinsChangeHandler.IsSet())
+ {
+ TabWinsChangeNotification aHint(TabWinsChangeNotification::AT_REMOVED_WIN, static_cast< OQueryTableWindow*>(pTabWin)->GetAliasName());
+ m_lnkTabWinsChangeHandler.Call(&aHint);
+ }
- modified();
- if ( m_pAccessible )
- m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
- makeAny(pTabWin->GetAccessible()),
- Any()
- );
+ modified();
+ if ( m_pAccessible )
+ m_pAccessible->notifyAccessibleEvent( AccessibleEventId::CHILD,
+ makeAny(pTabWin->GetAccessible()),
+ Any()
+ );
+ }
}
//------------------------------------------------------------------------
commit b7d947c22a7078733a3ed502b71257dd61f6faed
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Jul 2 08:35:57 2013 +0000
#i122647# link python against own libraries
The python module prefered system headers and libraries over the ones
requested by AOO's configure scripts. This impacted the build for packages
intended for redistribution, especially for the OpenSSL provided libs.
Found by: Ariel Constenla-Haile <arielch at apache.org>
Fixed by: Herbert Durr <hdu at apache.org>
diff --git a/python/makefile.mk b/python/makefile.mk
index 3bf7e1a..f9b0051 100644
--- a/python/makefile.mk
+++ b/python/makefile.mk
@@ -48,6 +48,7 @@ PATCH_FILES=\
python-freebsd.patch \
python-md5.patch \
python-ssl.patch \
+ python-solver-before-std.patch \
python-$(PYVERSION)-sysbase.patch \
python-$(PYVERSION)-nohardlink.patch \
python-$(PYVERSION)-pcbuild.patch
diff --git a/python/python-solver-before-std.patch b/python/python-solver-before-std.patch
new file mode 100644
index 0000000..d180843
--- /dev/null
+++ b/python/python-solver-before-std.patch
@@ -0,0 +1,90 @@
+--- misc/Python-2.7.5/setup.py 2013-07-01 17:51:46.237674580 +0200
++++ misc/build/Python-2.7.5/setup.py 2013-07-01 17:51:24.230453108 +0200
+@@ -80,61 +80,62 @@
+ # system, but with only header files and libraries.
+ sysroot = macosx_sdk_root()
+
+- # Check the standard locations
+- for dir in std_dirs:
++ # Check the additional directories
++ for dir in paths:
+ f = os.path.join(dir, filename)
+
+ if host_platform == 'darwin' and is_macosx_sdk_path(dir):
+ f = os.path.join(sysroot, dir[1:], filename)
+
+- if os.path.exists(f): return []
++ if os.path.exists(f):
++ return [dir]
+
+- # Check the additional directories
+- for dir in paths:
++ # Check the standard locations
++ for dir in std_dirs:
+ f = os.path.join(dir, filename)
+
+ if host_platform == 'darwin' and is_macosx_sdk_path(dir):
+ f = os.path.join(sysroot, dir[1:], filename)
+
+ if os.path.exists(f):
+- return [dir]
++ return []
+
+ # Not found anywhere
+ return None
+
+ def find_library_file(compiler, libname, std_dirs, paths):
+- result = compiler.find_library_file(std_dirs + paths, libname)
++ result = compiler.find_library_file(paths+std_dirs, libname)
+ if result is None:
+ return None
+
+ if host_platform == 'darwin':
+ sysroot = macosx_sdk_root()
+
+- # Check whether the found file is in one of the standard directories
+ dirname = os.path.dirname(result)
+- for p in std_dirs:
++ # Otherwise, it must have been in one of the additional directories,
++ # so we have to figure out which one.
++ for p in paths:
+ # Ensure path doesn't end with path separator
+ p = p.rstrip(os.sep)
+
+ if host_platform == 'darwin' and is_macosx_sdk_path(p):
+ if os.path.join(sysroot, p[1:]) == dirname:
+- return [ ]
++ return [ p ]
+
+ if p == dirname:
+- return [ ]
++ return [p]
+
+- # Otherwise, it must have been in one of the additional directories,
+- # so we have to figure out which one.
+- for p in paths:
++ # Check whether the found file is in one of the standard directories
++ for p in std_dirs:
+ # Ensure path doesn't end with path separator
+ p = p.rstrip(os.sep)
+
+ if host_platform == 'darwin' and is_macosx_sdk_path(p):
+ if os.path.join(sysroot, p[1:]) == dirname:
+- return [ p ]
++ return [ ]
+
+ if p == dirname:
+- return [p]
++ return [ ]
+ else:
+ assert False, "Internal error: Path not found in std_dirs or paths"
+
+@@ -851,6 +852,8 @@
+ have_usable_openssl = (have_any_openssl and
+ openssl_ver >= min_openssl_ver)
+
++ print( "ssl_incs="+str(ssl_incs))
++ print( "ssl_libs="+str(ssl_libs))
+ if have_any_openssl:
+ if have_usable_openssl:
+ # The _hashlib module wraps optimized implementations
More information about the Libreoffice-commits
mailing list