[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/tool/compiler.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 657ecf4879b44703cfa007146c39e6ec8c94fad5 Author: Eike Rathke er...@redhat.com Date: Mon Jan 21 17:56:25 2013 +0100 resolved fdo#59583 prevent inappropriate column/row label detection If followed by '(' (with or without space inbetween) an identifier can not be a column/row label. Prevent arbitrary content detection in case a macro function of the same name is meant (fdo#59583) or if it wouldn't resolve to a known function name at all, that earlier resulted in #REF! instead of #NAME? in the case of unknown function but label found. (cherry picked from commit aa2b8bde171bf9562536dc14b2cf81d81e31b438) Change-Id: I28d2e2492bddc02c07e139edbc69595a4f3f4a63 Reviewed-on: https://gerrit.libreoffice.org/1797 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index 062c494..f128e00 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -3693,7 +3693,9 @@ bool ScCompiler::NextNewToken( bool bInArray ) return true; if (IsDBRange( aUpper )) return true; -if (IsColRowName( aUpper )) +// If followed by '(' (with or without space inbetween) it can not be a +// column/row label. Prevent arbitrary content detection. +if (!bMayBeFuncName IsColRowName( aUpper )) return true; if (bMayBeFuncName IsMacro( aUpper )) return true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/dbgui/tpsort.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit c3f7589fb540072f3a2434f6de99fe2472dad3b1 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Jan 18 10:17:57 2013 +0100 reset one of the sort containers before refilling, fdo#57465 Change-Id: I758af67efec980a56ec83d8e5e6f5f60a0523ac5 Reviewed-on: https://gerrit.libreoffice.org/1753 Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com Tested-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 38724dd..9a2145d 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -341,6 +341,8 @@ void ScTabPageSortFields::FillFieldLists( sal_uInt16 nStartField ) SCROW nFirstSortRow = aSortData.nRow1; SCTAB nTab= pViewData-GetTabNo(); sal_uInt16 i = 1; +nFieldArr.clear(); +nFieldArr.push_back(0); if ( bSortByRows ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit f0b733be07a8ea79b65489e0a46b86736436185c Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Dec 26 04:09:31 2012 +0100 one more improvement around cond format rendering, fdo#57896 Change-Id: I5eb267ec2d1666edd53f5b9d58fd2a0cec044aa1 Reviewed-on: https://gerrit.libreoffice.org/1684 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 0ab670b..1a056ea 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1520,7 +1520,10 @@ bool lcl_CutRange( ScRange rRange, const ScRange rOther ) void ScConditionalFormat::DoRepaint( const ScRange* pModified ) { if(pModified) -pDoc-RepaintRange(*pModified); +{ +if(maRanges.Intersects(*pModified)) +pDoc-RepaintRange(*pModified); +} else { // all conditional format cells ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/docshell/dbdocfun.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1975fe4be8347d244643a0fbab20357485d41522 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Jan 10 23:48:17 2013 -0500 fdo#59084: Sync dimension members after reloading the group data. Else the syncing would end up syncing to the older version of the group data before the reload, which (as you can see in the bug report) may lead to a crash. Change-Id: Ibd674a97a59205e5e28efd007f8857731e8df4d3 Reviewed-on: https://gerrit.libreoffice.org/1635 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com Reviewed-on: https://gerrit.libreoffice.org/1651 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index e424763..5216c68 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1330,6 +1330,8 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( pDestObj ) { pDestObj-ReloadGroupTableData(); +if (!pDestObj-SyncAllDimensionMembers()) +return false; pDestObj-InvalidateData(); // before getting the new output area // make sure the table has a name (not set by dialog) @@ -1472,8 +1474,6 @@ sal_uLong ScDBDocFunc::RefreshPivotTables(ScDPObject* pDPObj, bool bApi) for (; it != itEnd; ++it) { ScDPObject* pObj = *it; -if (!pObj-SyncAllDimensionMembers()) -continue; // This action is intentionally not undoable since it modifies cache. DataPilotUpdate(pObj, pObj, false, bApi); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/docshell/dbdocfun.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 0490372a127b03dde0397009758289e94862a662 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Jan 11 12:51:13 2013 -0500 Let's not return here to prevent memory leak. There are several heap objects that are deleted at the end of the method. Returning prematurely would leak those objects. Change-Id: If70cb3c9c02e47229d10b30f1542f7b25534d593 Reviewed-on: https://gerrit.libreoffice.org/1654 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 5216c68..9fea320 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -1330,8 +1330,7 @@ bool ScDBDocFunc::DataPilotUpdate( ScDPObject* pOldObj, const ScDPObject* pNewOb if ( pDestObj ) { pDestObj-ReloadGroupTableData(); -if (!pDestObj-SyncAllDimensionMembers()) -return false; +pDestObj-SyncAllDimensionMembers(); pDestObj-InvalidateData(); // before getting the new output area // make sure the table has a name (not set by dialog) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/docshell/docfunc.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5fe2b0eee8058a64745a7a51fdd2ac5e102300ee Author: Julien Nabet serval2...@yahoo.fr Date: Tue Jan 1 16:23:16 2013 +0100 fdo#47466 FORMATTING: Autoformat empty rows causes app to crash Thank you John LeMoyne Castle for your support http://nabble.documentfoundation.org/Wrong-indentation-which-leads-to-segfault-in-sc-source-ui-docshell-docfunc-cxx-td4026726.html However, the weird thing is I reproduced the crash with master sources but didn't with 4.0 branch nor with 3.5.4.2 Debian packages Change-Id: Ia5366f479a1066106551b77b5a6315fb78e1bf7d diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index c3cb2ca..2ed13d6 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -3734,10 +3734,12 @@ bool ScDocFunc::AutoFormat( const ScRange rRange, const ScMarkData* pTabMark, ScMarkData::iterator itr = aMark.begin(), itrEnd = aMark.end(); for (; itr != itrEnd *itr nTabCount; ++itr) +{ SetWidthOrHeight( sal_True, 1,nCols, *itr, SC_SIZE_VISOPT, STD_EXTRA_WIDTH, false, sal_True); SetWidthOrHeight( false,1,nRows, *itr, SC_SIZE_VISOPT, 0, false, false); rDocShell.PostPaint( 0,0,*itr, MAXCOL,MAXROW,*itr, PAINT_GRID | PAINT_LEFT | PAINT_TOP ); +} } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/workbookhelper.cxx | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) New commits: commit 28549ae77dee063da50a56eb3cdf9114365a6afd Author: Noel Power noel.po...@suse.com Date: Tue Dec 18 14:33:20 2012 + finalize pivot *before* scenario sheet to ensure table numbers are correct Change-Id: I15cf378b51b1ecfbd05c7013e5a5b69fb87fdafb Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index dce942c..c10a159 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -591,11 +591,6 @@ void WorkbookGlobals::finalize() // #i79826# enable updating automatic row height after loading the document aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); -// Insert all pivot tables. Must be done after loading all sheets and -// formulas, because data pilots expect existing source data on -// creation. -getPivotTables().finalizeImport(); - // #i76026# enable Undo after loading the document aPropSet.setProperty( PROP_IsUndoEnabled, true ); // disable editing read-only documents (e.g. from read-only files) @@ -664,6 +659,12 @@ void WorkbookHelper::finalizeWorkbookImport() // need to import formulas before scenarios mrBookGlob.getFormulaBuffer().finalizeImport(); + +// Insert all pivot tables. Must be done after loading all sheets and +// formulas, because data pilots expect existing source data on +// creation. +getPivotTables().finalizeImport(); + /* Insert scenarios after all sheet processing is done, because new hidden sheets are created for scenarios which would confuse code that relies on certain sheet indexes. Must be done after pivot tables too. */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source vcl/aqua
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |2 + sc/source/ui/Accessibility/AccessibleTableBase.cxx | 20 +++--- vcl/aqua/source/a11y/aqua11ywrapper.mm | 37 +-- 3 files changed, 44 insertions(+), 15 deletions(-) New commits: commit 1211bf4682b7e8454d86d5a812df421abf68f662 Author: Michael Meeks michael.me...@suse.com Date: Tue Dec 18 13:29:03 2012 + fdo#56937 - mac a11y hang related to traversing vast, broken hierarchies. Change-Id: Iff0537a69b2c6ae929da6a05f26c0d55415d6d8a Signed-off-by: Tor Lillqvist t...@iki.fi diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 0408458..cf29eae 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -55,6 +55,8 @@ using namespace ::com::sun::star::accessibility; //= internal +// FIXME: really unclear why we have an ScAccessibleTableBase with +// only this single sub-class ScAccessibleSpreadsheet::ScAccessibleSpreadsheet( ScAccessibleDocument* pAccDoc, ScTabViewShell* pViewShell, diff --git a/sc/source/ui/Accessibility/AccessibleTableBase.cxx b/sc/source/ui/Accessibility/AccessibleTableBase.cxx index c1408db..8220339 100644 --- a/sc/source/ui/Accessibility/AccessibleTableBase.cxx +++ b/sc/source/ui/Accessibility/AccessibleTableBase.cxx @@ -272,7 +272,7 @@ sal_Bool SAL_CALL ScAccessibleTableBase::isAccessibleSelected( sal_Int32 /* nRow return false; } -//= XAccessibleExtendedTable +// = XAccessibleExtendedTable sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleIndex( sal_Int32 nRow, sal_Int32 nColumn ) throw (uno::RuntimeException, lang::IndexOutOfBoundsException) @@ -315,7 +315,7 @@ sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleColumn( sal_Int32 nChildI return nChildIndex % static_castsal_Int32(maRange.aEnd.Col() - maRange.aStart.Col() + 1); } -//= XAccessibleContext == +// = XAccessibleContext == sal_Int32 SAL_CALL ScAccessibleTableBase::getAccessibleChildCount(void) @@ -323,9 +323,16 @@ sal_Int32 SAL_CALL { SolarMutexGuard aGuard; IsObjectValid(); -return static_castsal_Int32(maRange.aEnd.Row() - maRange.aStart.Row() + 1) * -(maRange.aEnd.Col() - maRange.aStart.Col() + 1); -// return 1; + +// FIXME: representing rows columns this way is a plain and simple madness. +// this needs a radical re-think. +sal_Int64 nMax = ((sal_Int64)(maRange.aEnd.Row() - maRange.aStart.Row() + 1) * + (sal_Int64)(maRange.aEnd.Col() - maRange.aStart.Col() + 1)); +if (nMax SAL_MAX_INT32) +nMax = SAL_MAX_INT32; +if (nMax 0) +return 0; +return static_castsal_Int32(nMax); } uno::Reference XAccessible SAL_CALL @@ -339,6 +346,9 @@ uno::Reference XAccessible SAL_CALL if (nIndex = getAccessibleChildCount() || nIndex 0) throw lang::IndexOutOfBoundsException(); +// FIXME: representing rows columns this way is a plain and simple madness. +// this needs a radical re-think. + sal_Int32 nRow(0); sal_Int32 nColumn(0); sal_Int32 nTemp(maRange.aEnd.Col() - maRange.aStart.Col() + 1); diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index 1be3e4a..a48aa5a 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -986,21 +986,38 @@ Reference XAccessibleContext hitTestRunner ( com::sun::star::awt::Point poin Reference XAccessibleComponent rxAccessibleComponent ( rxAccessibleContext, UNO_QUERY ); if ( rxAccessibleComponent.is() ) { com::sun::star::awt::Point location = rxAccessibleComponent - getLocationOnScreen(); -com::sun::star::awt::Point hitPoint ( point.X - location.X , point.Y - location.Y); +com::sun::star::awt::Point hitPoint ( point.X - location.X , point.Y - location.Y); Reference XAccessible rxAccessible = rxAccessibleComponent - getAccessibleAtPoint ( hitPoint ); if ( rxAccessible.is() rxAccessible - getAccessibleContext().is() rxAccessible - getAccessibleContext() - getAccessibleChildCount() == 0 ) { hitChild = rxAccessible - getAccessibleContext(); } -} -if ( !hitChild.is() rxAccessibleContext - getAccessibleChildCount() 0 ) { // special treatment for e.g. comboboxes -for ( int i = 0; i rxAccessibleContext - getAccessibleChildCount(); i++ ) { -Reference XAccessible rxAccessibleChild = rxAccessibleContext -
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 664baba931bafd4e36fb822291b1d42c4554b88b Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Dec 5 02:25:33 2012 +0100 adapt cond format range when copying sheets, fdo#56742 Change-Id: I9b28ac161f326ebeeaf0fa22e0a96915187d7c94 (cherry picked from commit 1c60abfdb617039cedc53982c7c8eca640e28cac) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index d0c40e9..0ab670b 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1547,7 +1547,11 @@ void ScConditionalFormat::CompileXML() void ScConditionalFormat::UpdateReference( UpdateRefMode eUpdateRefMode, const ScRange rRange, SCsCOL nDx, SCsROW nDy, SCsTAB nDz ) { -maRanges.UpdateReference( eUpdateRefMode, pDoc, rRange, nDx, nDy, nDz ); +if( eUpdateRefMode == URM_COPY nDz != 0 ) +maRanges.UpdateReference( URM_MOVE, pDoc, rRange, nDx, nDy, nDz ); +else +maRanges.UpdateReference( eUpdateRefMode, pDoc, rRange, nDx, nDy, nDz ); + for(CondFormatContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) itr-UpdateReference(eUpdateRefMode, rRange, nDx, nDy, nDz); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/workbookhelper.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit f81cae7a1e9d85ad3e17ced53bac40bfd1690a16 Author: Noel Power noel.po...@suse.com Date: Thu Dec 13 16:52:50 2012 + fix sometimes data corruption with xlsx import ( with scenario sheets ) formula import is buffered 'till the end of import. The processing of the formula data need to happen before the scenario import happens. This is necessary because sheet numbers stored in the formula addresses can become invalid as scenario import insertes new hidden sheets upsetting the previous table order Change-Id: I9357f028f31bec1b1504ca991f5534f80d79c9bc Reviewed-on: https://gerrit.libreoffice.org/1338 Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com Tested-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 071b9a6..dce942c 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -591,11 +591,6 @@ void WorkbookGlobals::finalize() // #i79826# enable updating automatic row height after loading the document aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); -getFormulaBuffer().finalizeImport(); - -// hack, setting it true the second time will delete the cache -aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); - // Insert all pivot tables. Must be done after loading all sheets and // formulas, because data pilots expect existing source data on // creation. @@ -667,6 +662,8 @@ void WorkbookHelper::finalizeWorkbookImport() mrBookGlob.getWorkbookSettings().finalizeImport(); mrBookGlob.getViewSettings().finalizeImport(); +// need to import formulas before scenarios +mrBookGlob.getFormulaBuffer().finalizeImport(); /* Insert scenarios after all sheet processing is done, because new hidden sheets are created for scenarios which would confuse code that relies on certain sheet indexes. Must be done after pivot tables too. */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/dpcache.cxx |5 + sc/source/core/data/dpshttab.cxx |8 2 files changed, 13 insertions(+) New commits: commit 82b03180e66559c53911c404af455ca0d3505948 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Dec 14 22:34:38 2012 -0500 Do extra check on source range to make sure no funny things happen. Like a crash in the pivot layout dialog... :-/ Change-Id: I9a330ee3f39ebacb7299d24868bb13ee2a9c3ec5 Reviewed-on: https://gerrit.libreoffice.org/1345 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 6113282..7fdf098 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -382,6 +382,11 @@ bool ScDPCache::InitFromDoc(ScDocument* pDoc, const ScRange rRange) SCROW nStartRow = rRange.aStart.Row(); // start of data SCROW nEndRow = rRange.aEnd.Row(); + +// Sanity check +if (!ValidRow(nStartRow) || !ValidRow(nEndRow) || nEndRow-nStartRow = 0) +return false; + sal_uInt16 nStartCol = rRange.aStart.Col(); sal_uInt16 nEndCol = rRange.aEnd.Col(); sal_uInt16 nDocTab = rRange.aStart.Tab(); diff --git a/sc/source/core/data/dpshttab.cxx b/sc/source/core/data/dpshttab.cxx index 8ee3d4e..d2d8faf 100644 --- a/sc/source/core/data/dpshttab.cxx +++ b/sc/source/core/data/dpshttab.cxx @@ -335,6 +335,14 @@ sal_uLong ScSheetSourceDesc::CheckSourceRange() const if (!mpDoc) return STR_ERR_DATAPILOTSOURCE; +// Make sure the range is valid and sane. +const ScRange rSrcRange = GetSourceRange(); +if (!rSrcRange.IsValid()) +return STR_ERR_DATAPILOTSOURCE; + +if (rSrcRange.aStart.Col() rSrcRange.aEnd.Col() || rSrcRange.aStart.Row() rSrcRange.aEnd.Row()) +return STR_ERR_DATAPILOTSOURCE; + return 0; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit a7ad12f2832c519fcef243c591fcccdc170874c0 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sat Nov 17 18:46:14 2012 +0100 fdo#56584: delete also note caption. Change-Id: I1d792082e79d6bb68004a84c172cc3bb5c194826 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index bc97e9c..cb9ae98 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -566,7 +566,7 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal } if (nDelFlag IDF_NOTE) -maNotes.erase( nCol1, nRow1, nCol2, nRow2, true ); +maNotes.erase( nCol1, nRow1, nCol2, nRow2 ); if (IsStreamValid()) // TODO: In the future we may want to check if the table has been ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column3.cxx | 67 1 file changed, 35 insertions(+), 32 deletions(-) New commits: commit a6e622029b8f1c450b9d535e94212bf0acf3 Author: Eike Rathke er...@redhat.com Date: Wed Nov 14 21:48:33 2012 +0100 resolved fdo#56278 broadcast deletion to dependent formula cells Consolidated changes for fdo#56278 fdo#54074 fdo#53364 fdo#55059 (and earlier i#99844 and i#101869). The replacement cell for the broadcaster to inform listeners, if any, is transferred the broadcaster and owns it, the remembered formula cell never does. When broadcasting the change use the replacement cell instead of the remembered formula cell. Don't fiddle around with ReleaseBroadcaster() at the remembered cell, we don't delete twice and now also don't leak. (cherry picked from commit 8165bfa2afbe828caf37df57b83cb31bef2559cb) Change-Id: Ia11b6d3d751c784af64aaed05f8508887f869a80 Reviewed-on: https://gerrit.libreoffice.org/1069 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 475299d..a31 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -399,11 +399,13 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe // try to create a replacement note cell, if note or broadcaster exists ScNoteCell* pNoteCell = NULL; SvtBroadcaster* pBC = pOldCell-GetBroadcaster(); -bool bKeepBC = pBC pBC-HasListeners(); -// #i99844# do not release broadcaster from old cell, it still has to notify deleted content -if (bKeepBC) +if (pBC pBC-HasListeners()) { pNoteCell = new ScNoteCell( pBC ); +// NOTE: the broadcaster here is transferred and released +// only if it has listeners! If it does not, it will simply +// be deleted when the cell is deleted and no replacement +// cell is created. pOldCell-ReleaseBroadcaster(); } @@ -427,15 +429,10 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe else { aHint.GetAddress().SetRow( nOldRow ); -if(bKeepBC) -aHint.SetCell( pNoteCell ); -else -aHint.SetCell( pOldCell ); +aHint.SetCell( pNoteCell ? pNoteCell : pOldCell ); pDocument-Broadcast( aHint ); if (pNoteCell != pOldCell) { -// #i99844# after broadcasting, old cell has to forget the broadcaster (owned by pNoteCell) -pOldCell-ReleaseBroadcaster(); pOldCell-Delete(); } } @@ -456,7 +453,9 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe if (nFirst = nEndIndex) aRemovedSegments.insert_back(nFirst, nEndIndex + 1, true); -{ +// Remove segments from the column array, containing pDummyCell and formula +// cell pointers to be deleted. +{ // own scope for variables RemovedSegments_t::const_iterator aIt(aRemovedSegments.begin()); RemovedSegments_t::const_iterator aEnd(aRemovedSegments.end()); // The indexes in aRemovedSegments denote cell positions in the @@ -499,29 +498,33 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe } // *** delete all formula cells *** - -// first, all cells stop listening, may save unneeded recalcualtions -for ( FormulaCellVector::iterator aIt = aDelCells.begin(), aEnd = aDelCells.end(); aIt != aEnd; ++aIt ) -(*aIt)-EndListeningTo( pDocument ); - -// #i101869# if the note cell with the broadcaster was deleted in EndListening, -// forget the pointer to the broadcaster -for ( FormulaCellVector::iterator aIt = aDelCells.begin(), aEnd = aDelCells.end(); aIt != aEnd; ++aIt ) -{ -SCSIZE nIndex; -if ( !Search( (*aIt)-aPos.Row(), nIndex ) ) -(*aIt)-ReleaseBroadcaster(); -} - -// broadcast SC_HINT_DYING for all cells and delete them -for ( FormulaCellVector::iterator aIt = aDelCells.begin(), aEnd = aDelCells.end(); aIt != aEnd; ++aIt ) +if (!aDelCells.empty()) { -aHint.SetAddress( (*aIt)-aPos ); -aHint.SetCell( *aIt ); -pDocument-Broadcast( aHint ); -// #i99844# after broadcasting, old cell has to forget the broadcaster (owned by replacement note cell) -(*aIt)-ReleaseBroadcaster(); -(*aIt)-Delete(); +// First, all cells
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/app/scmod.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 6ec91aa4414bceeef506479aba6418564d4a1ba5 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Nov 13 14:14:30 2012 -0500 fdo#56776: Change in formula options should cause repaint. Else Calc would fail to update the column headers due to A1 to R1C1 change (and vise versa). Change-Id: I2c403212f5bc539aea92370e60da96f480549d6d Reviewed-on: https://gerrit.libreoffice.org/1049 Reviewed-by: Noel Power noel.po...@suse.com Tested-by: Noel Power noel.po...@suse.com diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 2635cb8..46e9140 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -1076,6 +1076,11 @@ void ScModule::ModifyOptions( const SfxItemSet rOptSet ) if (rOptSet.HasItem(SID_SCFORMULAOPTIONS, pItem)) { const ScFormulaOptions rOpt = ((const ScTpFormulaItem*)pItem)-GetFormulaOptions(); + +if (!pFormulaCfg || (*pFormulaCfg != rOpt)) +// Formula options have changed. Repaint the column headers. +bRepaint = true; + SetFormulaOptions( rOpt ); if ( pDocSh ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/worksheethelper.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 08ca08d2f46c6119550024ce02bc42c271a3644b Author: Noel Power noel.po...@suse.com Date: Fri Nov 9 16:58:00 2012 + fix for fdo#55875 numbers as text converted strangely old code used to use XCell-setString, new code uses rDoc.SetString which by default tries to detect number formats. The ScColumn::SetString that eventually gets called seems to do lots of additional checks ( and apparently even if an ScSetStringParam instance with mbDetectNumberFormat ( false ) was passed it seems that it will still try to detect decimal number formats. With that in mind I restore and un-unoified version of what XCell-setString used do Change-Id: Ifaef74c78b198f492a390a3d5dc1721622a01ea4 Reviewed-on: https://gerrit.libreoffice.org/1020 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 96c84f9..771f32f 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -1564,7 +1564,14 @@ void WorksheetHelper::putString( const CellAddress rAddress, const OUString rT { ScAddress aAddress; ScUnoConversion::FillScAddress( aAddress, rAddress ); -getScDocument().SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), rText ); +ScBaseCell* pNewCell = NULL; +ScDocument rDoc = getScDocument(); +if ( !rText.isEmpty() ) +pNewCell = ScBaseCell::CreateTextCell( rText, rDoc ); +if ( pNewCell ) +rDoc.PutCell( aAddress, pNewCell ); +else +rDoc.SetString( aAddress.Col(), aAddress.Row(), aAddress.Tab(), rText ); } void WorksheetHelper::putRichString( const CellAddress rAddress, const RichString rString, const Font* pFirstPortionFont ) const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/dpcache.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit c23a44e1de0faad6328ed0ece7247da3ae24b6cd Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Nov 8 16:09:11 2012 -0500 fdo#54898: Test equality by order index (integer) which is more stable. At the point where std::unique is called, we can use order indices to determine whether the two items are equal. This should be more stable than using CaseInsEqual() to assess equality. Change-Id: I88310fc7beede19fb1c629b9b7e3cb9a069b2b23 Reviewed-on: https://gerrit.libreoffice.org/1013 Reviewed-by: Tor Lillqvist t...@iki.fi Tested-by: Tor Lillqvist t...@iki.fi diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index 44af011..6113282 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -279,11 +279,11 @@ struct LessByDataIndex : std::binary_functionBucket, Bucket, bool } }; -struct EqualByValue : std::binary_functionBucket, Bucket, bool +struct EqualByOrderIndex : std::binary_functionBucket, Bucket, bool { bool operator() (const Bucket left, const Bucket right) const { -return left.maValue.IsCaseInsEqual(right.maValue); +return left.mnOrderIndex == right.mnOrderIndex; } }; @@ -359,7 +359,7 @@ void processBuckets(std::vectorBucket aBuckets, ScDPCache::Field rField) // Unique by value. std::vectorBucket::iterator itUniqueEnd = -std::unique(aBuckets.begin(), aBuckets.end(), EqualByValue()); +std::unique(aBuckets.begin(), aBuckets.end(), EqualByOrderIndex()); // Copy the unique values into items. std::vectorBucket::iterator itBeg = aBuckets.begin(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/cctrl/checklistmenu.cxx | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) New commits: commit 9d90fc7593445d0cd2333a827840e1c993e7a9b5 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Nov 2 14:51:35 2012 -0400 Minor enhancements on the autofilter popup window. 1) Launch pop-up right-aligned in case the cell is wider than the popup. Launching it always left-aligned will look weird especially when the column is very wide. 2) Allow type-ahead search when launching the autofilter via keyboard. This is achieved by making two small changes to the popup; first, the focus is set on the check list box upon launching, and second, the type-ahead search is enabled on the check list box control. Change-Id: I8a33a52afc6005b4a7428d5f7046eff986da80d2 Reviewed-on: https://gerrit.libreoffice.org/997 Reviewed-by: Radek DoulÃk r...@novell.com Tested-by: Radek DoulÃk r...@novell.com diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index ca85f70..f3b07b2 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -915,6 +915,9 @@ ScCheckListMenuWindow::ScCheckListMenuWindow(Window* pParent, ScDocument* pDoc) maTabStopCtrls.push_back(maBtnUnselectSingle); maTabStopCtrls.push_back(maBtnOk); maTabStopCtrls.push_back(maBtnCancel); + +// Enable type-ahead search in the check list box. +maChecks.SetStyle(maChecks.GetStyle() | WB_QUICK_SEARCH); } ScCheckListMenuWindow::~ScCheckListMenuWindow() @@ -1355,7 +1358,18 @@ void ScCheckListMenuWindow::launch(const Rectangle rRect) // We need to have at least one member selected. maBtnOk.Enable(maChecks.GetCheckedEntryCount() != 0); -StartPopupMode(rRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); +Rectangle aRect(rRect); +if (maWndSize.Width() aRect.GetWidth()) +{ +// Target rectangle (i.e. cell width) is wider than the window. +// Simulate right-aligned launch by modifying the target rectangle +// size. +long nDiff = aRect.GetWidth() - maWndSize.Width(); +aRect.Left() += nDiff; +} + +StartPopupMode(aRect, (FLOATWIN_POPUPMODE_DOWN | FLOATWIN_POPUPMODE_GRABFOCUS)); +cycleFocus(); // Set initial focus to the check list box. } void ScCheckListMenuWindow::close(bool bOK) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table2.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit df2736e3e8b6a49aeac26e8f86f943923ed45053 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Nov 4 19:04:13 2012 +0100 only delete cond formats if the correct attributes are passed, fdo#56316 Change-Id: If9859b5021c532daacccfaf386e0489c134e4afb Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index e8df882..bc97e9c 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -561,7 +561,8 @@ void ScTable::DeleteArea(SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, sal ApplyPatternArea( nCol1, nRow1, nCol2, nRow2, aPattern ); } -mpCondFormatList-DeleteArea( nCol1, nRow1, nCol2, nRow2 ); +if( nDelFlag IDF_ATTRIB ) +mpCondFormatList-DeleteArea( nCol1, nRow1, nCol2, nRow2 ); } if (nDelFlag IDF_NOTE) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 60a3410614dfb1cb9b60e77898bb1f130bd2c742 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Nov 4 19:21:42 2012 +0100 fix copy paste error, fdo#55673 Change-Id: I1e31fe05e00ed7e298642da9c0e35ae834dfa74f Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index ea6657a..994a199 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -772,7 +772,7 @@ static bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String rStr, SCROW nRow = aRange-aEnd.Row(); SCCOL nCol = aRange-aEnd.Col(); SCCOL nColStart = aRange-aStart.Col(); -SCROW nRowStart = aRange-aEnd.Row(); +SCROW nRowStart = aRange-aStart.Row(); SCTAB nTab = aRange-aStart.Tab(); // temporary fix to workaorund slow duplicate entry ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xestyle.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 0678304aa69bc5f7bbbd0b6a79e12e875a6b0788 Author: Noel Power noel.po...@suse.com Date: Fri Sep 28 16:59:02 2012 +0100 fix xlsx export missing alignment attributes with cellstyle fdo#55417 Change-Id: I510d0f399c58b5a9b192f3566e093c636cae2c0a Reviewed-on: https://gerrit.libreoffice.org/959 Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com Tested-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 13b7d40..626baa5 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2025,7 +2025,6 @@ void XclExpXF::Init( const SfxItemSet rItemSet, sal_Int16 nScript, GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : nForceScNumFmt; mnXclNumFmt = GetNumFmtBuffer().Insert( mnScNumFmt ); mbFmtUsed = ScfTools::CheckItem( rItemSet, ATTR_VALUE_FORMAT, IsStyleXF() ); - // alignment mbAlignUsed = maAlignment.FillFromItemSet( rItemSet, bForceLineBreak, GetBiff(), IsStyleXF() ); @@ -2112,10 +2111,12 @@ void XclExpXF::SaveXml( XclExpXmlStream rStrm ) sax_fastparser::FSHelperPtr rStyleSheet = rStrm.GetCurrentStream(); sal_Int32 nXfId = 0; +const XclExpXF* pStyleXF = NULL; if( IsCellXF() ) { sal_uInt16 nXFIndex = rStrm.GetRoot().GetXFBuffer().GetXFIndex( mnParentXFId ); nXfId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFIndex ); +pStyleXF = rStrm.GetRoot().GetXFBuffer().GetXFById( mnParentXFId ); } rStyleSheet-startElement( XML_xf, @@ -2135,8 +2136,13 @@ void XclExpXF::SaveXml( XclExpXmlStream rStrm ) FSEND ); if( mbAlignUsed ) maAlignment.SaveXml( rStrm ); +else if ( pStyleXF ) +pStyleXF-GetAlignmentData().SaveXml( rStrm ); if( mbProtUsed ) maProtection.SaveXml( rStrm ); +else if ( pStyleXF ) +pStyleXF-GetProtectionData().SaveXml( rStrm ); + // OOXTODO: XML_extLst rStyleSheet-endElement( XML_xf ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xestyle.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 3225eff997c0703a7b8e784a19770c8eca7263a7 Author: Noel Power noel.po...@suse.com Date: Fri Sep 28 19:02:44 2012 +0100 halt corrupted styles with multi-saved xlsx document fdo#55418 Change-Id: I2d53c88ab121edeec2bf53f7fd177a0edcc05a25 Reviewed-on: https://gerrit.libreoffice.org/958 Reviewed-by: Kohei Yoshida kohei.yosh...@gmail.com Tested-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 626baa5..3373d7d 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -2235,7 +2235,10 @@ void XclExpStyle::SaveXml( XclExpXmlStream rStrm ) } else sName = XclXmlUtils::ToOString( maName ); -sal_Int32 nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( maXFId.mnXFId ); +// get the index in sortedlist associated with the mnXId +sal_Int32 nXFId = rStrm.GetRoot().GetXFBuffer().GetXFIndex( maXFId.mnXFId ); +// get the style index associated with index into sortedlist +nXFId = rStrm.GetRoot().GetXFBuffer().GetXmlStyleIndex( nXFId ); rStrm.GetCurrentStream()-singleElement( XML_cellStyle, XML_name, sName.getStr(), XML_xfId, OString::valueOf( nXFId ).getStr(), ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/tool/editutil.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 2db9377f8505ca293054f8d5a8cc278159f117cb Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Mon Nov 5 19:58:02 2012 -0500 fdo#53531: Time field can be represented with an extended time field type. And Calc's header footer currently don't distinguish between time and extended time. Time fields in the header / footer are always dynamic and never static. Change-Id: If628d179968c270a63d38cdc3bf6018c01241ac1 Reviewed-on: https://gerrit.libreoffice.org/992 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx index dad6a7a..618333c 100644 --- a/sc/source/core/tool/editutil.cxx +++ b/sc/source/core/tool/editutil.cxx @@ -667,7 +667,9 @@ String ScHeaderEditEngine::CalcFieldValue( const SvxFieldItem rField, case text::textfield::Type::PAGES: aRet = lcl_GetNumStr( aData.nTotalPages,aData.eNumType ); break; +case text::textfield::Type::EXTENDED_TIME: case text::textfield::Type::TIME: +// For now, time field in the header / footer is always dynamic. aRet = ScGlobal::pLocaleData-getTime(aData.aTime); break; case text::textfield::Type::DOCINFO_TITLE: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4499ed3b610ee9c7762ed5b9c082a37e48d98c8e Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Nov 1 20:36:25 2012 -0400 Remove the correct range, or else maItems would end up with invalid pointer. nStopPos is non-inclusive, and STL's erase() method also expects a non-inclusive end position (like any other STL methods do). It's wrong to -1 here which would end up not erasing the last element containing a pointer to the deleted cell instance. Change-Id: Ic09ab4a6bb03d0f56bb854a91bf93a99be867116 diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx index eebb17a..79bf31f 100644 --- a/sc/source/core/data/column.cxx +++ b/sc/source/core/data/column.cxx @@ -1555,7 +1555,7 @@ void ScColumn::MoveTo(SCROW nStartRow, SCROW nEndRow, ScColumn rCol) rAddress.SetRow( maItems[i].nRow ); pDocument-AreaBroadcast( aHint ); } -maItems.erase(maItems.begin() + nStartPos, maItems.begin() + nStopPos - 1); +maItems.erase(maItems.begin() + nStartPos, maItems.begin() + nStopPos); } pNoteCell-Delete(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/dpcachetable.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit be49b70ece78665335cd24d69bee2b93d00997a0 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Oct 30 20:50:31 2012 -0400 fdo#56325: Don't forget to build_tree() in fillTable(). Else you'll get the wrong answer in isRowActive(), which always search flag via tree. Change-Id: I3fa92d06f7ba3040eca061d5424afefe362703de Signed-off-by: David Tardon dtar...@redhat.com diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx index 14f4e8e..1518955 100644 --- a/sc/source/core/data/dpcachetable.cxx +++ b/sc/source/core/data/dpcachetable.cxx @@ -143,6 +143,7 @@ void ScDPCacheTable::fillTable( maShowByFilter.clear(); maShowByPage.clear(); +maShowByPage.build_tree(); // Process the non-empty data rows. for (SCROW nRow = 0; nRow nDataSize; ++nRow) @@ -211,15 +212,18 @@ void ScDPCacheTable::fillTable() { SCROW nRowCount = getRowSize(); SCCOL nColCount = getColSize(); - if (nRowCount = 0 || nColCount = 0) +if (nRowCount = 0 || nColCount = 0) return; - maShowByFilter.clear(); - maShowByPage.clear(); - maShowByFilter.insert_front(0, nRowCount, true); +maShowByPage.clear(); +maShowByPage.build_tree(); - // Initialize field entries container. - maFieldEntries.clear(); +maShowByFilter.clear(); +maShowByFilter.insert_front(0, nRowCount, true); +maShowByFilter.build_tree(); + +// Initialize field entries container. +maFieldEntries.clear(); maFieldEntries.reserve(nColCount); // Data rows ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source vcl/source vcl/unx
sc/source/ui/inc/tabview.hxx |2 - sc/source/ui/view/tabview.cxx| 27 +-- sc/source/ui/view/tabview4.cxx | 36 +-- vcl/source/control/scrbar.cxx| 12 +- vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |5 ++-- 5 files changed, 27 insertions(+), 55 deletions(-) New commits: commit b1f308d96609bf6a6bd6b563dcbec246a6910b0f Author: Jan Holesovsky ke...@suse.cz Date: Fri Oct 19 01:21:22 2012 +0200 fdo#44657 Remove hack that simulates a mirrored horizontal scrollbar. We are able to paint mirrored scrolbars with the 'gen' plugin, so just fix the rendering of the scroolbar with the Gtk+ plugin. Change-Id: I5dbd13420c6290e165ed2f5827769979298abf37 (cherry picked from commit bfa21ce5fa08f2c634ccb6162914be55aef9f3c2) Signed-off-by: Lior Kaplan kaplanl...@gmail.com diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx index 8879b07..e090e72 100644 --- a/sc/source/ui/inc/tabview.hxx +++ b/sc/source/ui/inc/tabview.hxx @@ -195,7 +195,7 @@ private: voidUpdateVarZoom(); static void SetScrollBar( ScrollBar rScroll, long nRangeMax, long nVisible, long nPos, bool bLayoutRTL ); -static long GetScrollBarPos( ScrollBar rScroll, bool bLayoutRTL ); +static long GetScrollBarPos( ScrollBar rScroll ); voidGetPageMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, SCsCOL rPageX, SCsROW rPageY); voidGetAreaMoveEndPosition(SCsCOL nMovX, SCsROW nMovY, ScFollowMode eMode, diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx index 0a3ab28..0231f81 100644 --- a/sc/source/ui/view/tabview.cxx +++ b/sc/source/ui/view/tabview.cxx @@ -342,6 +342,8 @@ void ScTabView::InitScrollBar( ScrollBar rScrollBar, long nMaxVal ) rScrollBar.SetScrollHdl( LINK(this, ScTabView, ScrollHdl) ); rScrollBar.SetEndScrollHdl( LINK(this, ScTabView, EndScrollHdl) ); + +rScrollBar.EnableRTL( aViewData.GetDocument()-IsLayoutRTL( aViewData.GetTabNo() ) ); } // Scroll-Timer @@ -1095,15 +1097,14 @@ IMPL_LINK( ScTabView, EndScrollHdl, ScrollBar*, pScroll ) if ( pScroll == aHScrollLeft || pScroll == aHScrollRight ) { -bool bMirror = aViewData.GetDocument()-IsLayoutRTL( aViewData.GetTabNo() ) != Application::GetSettings().GetLayoutRTL(); ScHSplitPos eWhich = (pScroll == aHScrollLeft) ? SC_SPLIT_LEFT : SC_SPLIT_RIGHT; -long nDelta = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin - aViewData.GetPosX(eWhich); +long nDelta = GetScrollBarPos( *pScroll ) + nScrollMin - aViewData.GetPosX(eWhich); if (nDelta) ScrollX( nDelta, eWhich ); } else// VScroll... { ScVSplitPos eWhich = (pScroll == aVScrollTop) ? SC_SPLIT_TOP : SC_SPLIT_BOTTOM; -long nDelta = GetScrollBarPos( *pScroll, false ) + nScrollMin - aViewData.GetPosY(eWhich); +long nDelta = GetScrollBarPos( *pScroll ) + nScrollMin - aViewData.GetPosY(eWhich); if (nDelta) ScrollY( nDelta, eWhich ); } } @@ -1126,7 +1127,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) SC_SPLIT_TOP : SC_SPLIT_BOTTOM ); bool bLayoutRTL = aViewData.GetDocument()-IsLayoutRTL( aViewData.GetTabNo() ); -bool bMirror = bHoriz (bLayoutRTL != Application::GetSettings().GetLayoutRTL()); ScrollType eType = pScroll-GetType(); if ( eType == SCROLL_DRAG ) @@ -1164,7 +1164,7 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) nScrollMin = aViewData.GetFixPosX(); if ( aViewData.GetVSplitMode()==SC_SPLIT_FIX pScroll == aVScrollBottom ) nScrollMin = aViewData.GetFixPosY(); -long nScrollPos = GetScrollBarPos( *pScroll, bMirror ) + nScrollMin; +long nScrollPos = GetScrollBarPos( *pScroll ) + nScrollMin; String aHelpStr; Rectangle aRect; @@ -1199,21 +1199,6 @@ IMPL_LINK( ScTabView, ScrollHdl, ScrollBar*, pScroll ) if ( bOnlineScroll || eType != SCROLL_DRAG ) { -if ( bMirror ) -{ -// change scroll type so visible/previous cells calculation below remains the same -switch ( eType ) -{ -case SCROLL_LINEUP: eType = SCROLL_LINEDOWN;break; -case SCROLL_LINEDOWN: eType = SCROLL_LINEUP; break; -case SCROLL_PAGEUP: eType = SCROLL_PAGEDOWN;break; -case SCROLL_PAGEDOWN: eType = SCROLL_PAGEUP; break; -default: -{ -// added to avoid warnings -} -} -} long nDelta = pScroll-GetDelta();
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column3.cxx |4 1 file changed, 4 insertions(+) New commits: commit 637096b75f2989640967e72aee41e48b07a5a602 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Oct 17 12:28:27 2012 +0200 ignore broadcaster cells to fill autofilter dialog, fdo#55712 Change-Id: Iacd3f8cfc26bb147eaf3b6957338be212b448226 (cherry picked from commit 622f7751b78fd8584e34f5fa96a04ed6e8bb98f5) Signed-off-by: David Tardon dtar...@redhat.com diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 48d77dc..475299d 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1501,6 +1501,10 @@ void ScColumn::GetFilterEntries(SCROW nStartRow, SCROW nEndRow, std::vectorScTy } break; +// skip broadcaster cells +case CELLTYPE_NOTE: +continue; + default: ; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column2.cxx | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) New commits: commit 23e6bac62ef6482c287bb0f55c662ac2047ebb33 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Oct 17 13:10:09 2012 +0200 only use non blank cells in the visible data methods, fdo#54552 Change-Id: I2a0914fbaff3e3f707a9c06f693079aed2b89ba4 (cherry picked from commit 40377a6e26aa61a1c0788cad1c97a10911d38da8) Signed-off-by: David Tardon dtar...@redhat.com diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx index c28249a..03f7b54 100644 --- a/sc/source/core/data/column2.cxx +++ b/sc/source/core/data/column2.cxx @@ -1131,7 +1131,8 @@ bool ScColumn::IsEmptyVisData() const SCSIZE i; for (i=0; imaItems.size() !bVisData; i++) { -bVisData = true; +if(!maItems[i].pCell-IsBlank()) +bVisData = true; } return !bVisData; } @@ -1165,8 +1166,11 @@ SCROW ScColumn::GetLastVisDataPos() const for (i=maItems.size(); i0 !bFound; ) { --i; -bFound = true; -nRet = maItems[i].nRow; +if(!maItems[i].pCell-IsBlank()) +{ +bFound = true; +nRet = maItems[i].nRow; +} } } return nRet; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/app/scmod.cxx |3 +++ sc/source/ui/optdlg/tpusrlst.cxx |2 ++ 2 files changed, 5 insertions(+) New commits: commit 07cc274256ebff259e228e7285bc27e6ddc94fdc Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Oct 17 15:45:18 2012 +0200 write the custom sort list info into the item set, fdo#53870 Change-Id: I9c7f62b47f83b7798a8efdbf3896503918929f03 (cherry picked from commit 4302eb0a6c4e28ab675de9d59e73cac345ba30c7) Signed-off-by: David Tardon dtar...@redhat.com diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx index 845e551..2635cb8 100644 --- a/sc/source/ui/app/scmod.cxx +++ b/sc/source/ui/app/scmod.cxx @@ -2051,7 +2051,10 @@ SfxItemSet* ScModule::CreateItemSet( sal_uInt16 nId ) // TP_USERLISTS if ( pUL ) +{ aULItem.SetUserList( *pUL ); +pRet-Put(aULItem); +} // TP_COMPATIBILITY pRet-Put( SfxUInt16Item( SID_SC_OPT_KEY_BINDING_COMPAT, diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 3eee008..ba6fc9a 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -96,6 +96,7 @@ ScTpUserLists::ScTpUserLists( Window* pParent, { SetExchangeSupport(); Init(); +Reset(rCoreAttrs); FreeResource(); } @@ -153,6 +154,7 @@ void ScTpUserLists::Init() aFtCopyFrom.Disable(); aEdCopyFrom.Disable(); } + } // --- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/dbgui/tpsort.cxx | 12 sc/source/ui/inc/tpsort.hxx |8 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 1bc15304a3fb44399ebd3861f6ee5fc12197a969 Author: Noel Power noel.po...@suse.com Date: Wed Oct 17 11:01:15 2012 +0200 exchange sort settings between the two tab pages, fdo#53482 Change-Id: I540481585bec2479db541025755c2a5a670da9ed diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 303d6c6..7ebbb47 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -275,9 +275,11 @@ sal_Bool ScTabPageSortFields::FillItemSet( SfxItemSet rArgSet ) // --- -// for data exchange without dialogue detour: (still TODO!) -void ScTabPageSortFields::ActivatePage() +// for data exchange without dialogue detour: +void ScTabPageSortFields::ActivatePage( const SfxItemSet rSet ) { +// Refresh local copy with shared data +aSortData = static_castconst ScSortItem(rSet.Get( SCITEM_SORTDATA )).GetSortData(); if ( pDlg ) { if ( bHasHeader != pDlg-GetHeaders() @@ -744,9 +746,11 @@ sal_Bool ScTabPageSortOptions::FillItemSet( SfxItemSet rArgSet ) // --- -// for data exchange without dialogue detour: (still TODO!) -void ScTabPageSortOptions::ActivatePage() +// for data exchange without dialogue detour: +void ScTabPageSortOptions::ActivatePage( const SfxItemSet rSet ) { +// Refresh local copy with shared data +aSortData = static_castconst ScSortItem(rSet.Get( SCITEM_SORTDATA )).GetSortData(); if ( pDlg ) { if ( aBtnHeader.IsChecked() != pDlg-GetHeaders() ) diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index 14fce4e..7167e2e 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -69,11 +69,9 @@ public: virtual voidReset ( const SfxItemSet rArgSet ); protected: -// for data exchange (TODO: should be changed!) -// virtual voidActivatePage( const SfxItemSet rSet ); +virtual voidActivatePage( const SfxItemSet rSet ); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; -virtual voidActivatePage(); virtual int DeactivatePage ( SfxItemSet* pSet = 0); private: @@ -132,11 +130,9 @@ public: virtual voidReset ( const SfxItemSet rArgSet ); protected: -// for data exchange (TODO: should be changed!) -// virtual voidActivatePage( const SfxItemSet rSet ); +virtual voidActivatePage( const SfxItemSet rSet ); using SfxTabPage::ActivatePage; using SfxTabPage::DeactivatePage; -virtual voidActivatePage(); virtual int DeactivatePage ( SfxItemSet* pSet = 0); private: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table2.cxx | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) New commits: commit 04ba130525bf339f774fd17423f8656e6755ed11 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Oct 12 16:46:55 2012 +0200 don't insert notes from deleted cells, fdo#55885 Change-Id: I036f0531dc2290c5eb480258bc70ec13b810e6bc Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 4230cbd..cd193c1 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -267,8 +267,13 @@ void ScTable::DeleteRow( SCCOL nStartCol, SCCOL nEndCol, SCROW nStartRow, SCSIZE if (nRow = nStartRow) { -aNotes.insert(nCol, nRow - nSize, pPostIt); -maNotes.ReleaseNote(nCol, nRow); +if(nRow - nStartRow static_castSCROW(nSize)) +{ +aNotes.insert(nCol, nRow - nSize, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} +else +maNotes.erase(nCol, nRow); } } @@ -486,8 +491,13 @@ void ScTable::DeleteCol( SCCOL nStartCol, SCROW nStartRow, SCROW nEndRow, SCSIZE if (nCol = nStartCol) { -aNotes.insert(nCol - nSize, nRow, pPostIt); -maNotes.ReleaseNote(nCol, nRow); +if(nCol - nStartCol static_castSCCOL(nSize)) +{ +aNotes.insert(nCol - nSize, nRow, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} +else +maNotes.erase(nCol, nRow); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/dpcache.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 14a24950c56d85e275ea2b2fd13e5cefc25d6635 Author: Michael Meeks michael.me...@suse.com Date: Tue Sep 18 10:17:48 2012 +0100 WaE: calm android tinderboxen Change-Id: Iaeb809770acec4b3c38e42038fe2820b2da2051d (cherry picked from commit 0edc04d2d659456f5c22406a79901d54c530a979) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index c754fba..44af011 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -756,11 +756,11 @@ void ScDPCache::PostInit() maEmptyRows.build_tree(); typedef mdds::flat_segment_treeSCROW, bool::const_reverse_iterator itr_type; -itr_type it = maEmptyRows.rbegin(), itEnd = maEmptyRows.rend(); -OSL_ENSURE(it != itEnd, corrupt flat_segment_tree instance!); +itr_type it = maEmptyRows.rbegin(); +OSL_ENSURE(it != maEmptyRows.rend(), corrupt flat_segment_tree instance!); mnDataSize = maFields[0].maData.size(); ++it; // Skip the first position. -OSL_ENSURE(it != itEnd, buggy version of flat_segment_tree is used.); +OSL_ENSURE(it != maEmptyRows.rend(), buggy version of flat_segment_tree is used.); if (it-second) { SCROW nLastNonEmpty = it-first - 1; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xiescher.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ea50fe437b4f61e6c97d81721441da2b7d1e2f66 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Oct 12 15:25:20 2012 -0400 Check for null object. The OLE name may not always be set. Change-Id: Ib3e55af8870b41a5b76179d2215fc5125ceda5af (cherry picked from commit fb1d9cc99e026ba9cf15ab49b2251cecfbbf6d10) Signed-off-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 900d2e6..8940167 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -3210,7 +3210,7 @@ String XclImpObjectManager::GetOleNameOverride( SCTAB nTab, sal_uInt16 nObjId ) rtl::OUString sOleName; String sCodeName = GetExtDocOptions().GetCodeName( nTab ); -if ( mxOleCtrlNameOverride-hasByName( sCodeName ) ) +if (mxOleCtrlNameOverride.is() mxOleCtrlNameOverride-hasByName(sCodeName)) { Reference XIndexContainer xIdToOleName; mxOleCtrlNameOverride-getByName( sCodeName ) = xIdToOleName; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/addressconverter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0eee6469304ba15f42bcafb6707cc98bcbff9112 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Oct 11 14:32:49 2012 +0200 kill this hard coded sheet limit for xlsx import, rhbz#864858 Change-Id: I8fe6523afb11e5b24b8c83784e1198e8c694922a (cherry picked from commit 458d68fffa883bc706638299e5a5b2d1399beb0d) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/filter/oox/addressconverter.cxx b/sc/source/filter/oox/addressconverter.cxx index 52e74eb..1da3966 100644 --- a/sc/source/filter/oox/addressconverter.cxx +++ b/sc/source/filter/oox/addressconverter.cxx @@ -57,7 +57,7 @@ using ::rtl::OUStringToOString; namespace { //! TODO: this limit may change, is there a way to obtain it via API? -const sal_Int16 API_MAXTAB = 255; +const sal_Int16 API_MAXTAB = MAXTAB; const sal_Int32 OOX_MAXCOL = static_cast sal_Int32 ( (1 14) - 1 ); const sal_Int32 OOX_MAXROW = static_cast sal_Int32 ( (1 20) - 1 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/tool/dbdata.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 170521349f3d5e3b6cc16890d66d77121bfd0312 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Oct 11 09:16:55 2012 +0200 only access first element if vector is not empty, fdo#55734 Change-Id: I60db486195e7216968dc8c7c7c0c79fb7e8c1b88 diff --git a/sc/source/core/tool/dbdata.cxx b/sc/source/core/tool/dbdata.cxx index bb5475c..a6e6364 100644 --- a/sc/source/core/tool/dbdata.cxx +++ b/sc/source/core/tool/dbdata.cxx @@ -455,7 +455,9 @@ bool ScDBData::HasQueryParam() const bool ScDBData::HasSortParam() const { -return mpSortParam mpSortParam-maKeyState[0].bDoSort; +return mpSortParam +!mpSortParam-maKeyState.empty() +mpSortParam-maKeyState[0].bDoSort; } bool ScDBData::HasSubTotalParam() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table3.cxx |4 1 file changed, 4 insertions(+) New commits: commit cd9d51a36cc3106d4124855874af657615a93061 Author: Noel Power noel.po...@suse.com Date: Wed Oct 10 16:49:35 2012 +0100 fix for fdo#53814 Revert there should be no need any more for this check This reverts commit bea018a7040c36e91487b27c7b59c6c8a970bf5f. Change-Id: Id554a8f05b82f146a505ac0a39afe14a3161291c Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 15087c5..7be749e 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -386,10 +386,14 @@ short ScTable::CompareCell( sal_uInt16 nSort, if (pCell1) { eType1 = pCell1-GetCellType(); +if (eType1 == CELLTYPE_NOTE) +pCell1 = NULL; } if (pCell2) { eType2 = pCell2-GetCellType(); +if (eType2 == CELLTYPE_NOTE) +pCell2 = NULL; } if (pCell1) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlstyli.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit d126dcfe359782a6229156f7cbdb20e642b63a5e Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Oct 9 08:46:31 2012 +0200 don't insert the same pointer twice into a ptr_set, fdo#55710 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 167755f..59d1fe4 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -462,11 +462,11 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequencetable::CellRangeAddres aMarkData.MarkFromRangeList(rRange, true); pDoc-ApplySelectionPattern( aPattern , aMarkData); -break; +return; } } -if(mpCondFormat) +if(mpCondFormat mbDeleteCondFormat) { mbDeleteCondFormat = false; sal_uLong nIndex = pDoc-AddCondFormat(mpCondFormat, nTab ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xetable.cxx |5 +++-- sc/source/filter/inc/xetable.hxx |1 + sc/source/filter/oox/unitconverter.cxx |5 ++--- 3 files changed, 6 insertions(+), 5 deletions(-) New commits: commit a00d5c5321959c316f6103e18dddef1ad5f02376 Author: Noel Power noel.po...@suse.com Date: Thu Oct 4 15:45:36 2012 +0100 xlsx fix import/export of column widths fdo#55623 column widths were never imported or exported correctly in xlsx. Change-Id: I92d469ce52495fe77281cb22341e9c5127e6b506 (cherry picked from commit 8e753f8446554822d97969b0c18eba6cb9d79e26) Signed-off-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 793155a..7da79aa 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -1483,6 +1483,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot rRoot, XclExpRecord( EXC_ID_COLINFO, 12 ), XclExpRoot( rRoot ), mnWidth( 0 ), +mnScWidth( 0 ), mnFlags( 0 ), mnFirstXclCol( static_cast sal_uInt16 ( nScCol ) ), mnLastXclCol( static_cast sal_uInt16 ( nScCol ) ) @@ -1497,7 +1498,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot rRoot, // column width sal_uInt16 nScWidth = rDoc.GetColWidth( nScCol, nScTab ); mnWidth = XclTools::GetXclColumnWidth( nScWidth, GetCharWidth() ); - +mnScWidth = sc::TwipsToHMM( nScWidth ); // column flags ::set_flag( mnFlags, EXC_COLINFO_HIDDEN, rDoc.ColHidden(nScCol, nScTab) ); @@ -1563,7 +1564,7 @@ void XclExpColinfo::SaveXml( XclExpXmlStream rStrm ) // OOXTODO: XML_outlineLevel, // OOXTODO: XML_phonetic, XML_style, lcl_GetStyleId( rStrm, maXFId.mnXFIndex ).getStr(), -XML_width, OString::valueOf( (double) (mnWidth / 255.0) ).getStr(), +XML_width, OString::valueOf( (double) (mnScWidth / (double)sc::TwipsToHMM( GetCharWidth() )) ).getStr(), FSEND ); } diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx index 291c37f..d9ce5ea 100644 --- a/sc/source/filter/inc/xetable.hxx +++ b/sc/source/filter/inc/xetable.hxx @@ -783,6 +783,7 @@ private: private: XclExpXFId maXFId; /// The XF identifier for column default format. sal_uInt16 mnWidth;/// Excel width of the column. +sal_uInt16 mnScWidth; /// Calc width of the column. sal_uInt16 mnFlags;/// Additional column flags. sal_uInt16 mnFirstXclCol; /// Index to first column. sal_uInt16 mnLastXclCol; /// Index to last column. diff --git a/sc/source/filter/oox/unitconverter.cxx b/sc/source/filter/oox/unitconverter.cxx index e2feb87..2d0431b 100644 --- a/sc/source/filter/oox/unitconverter.cxx +++ b/sc/source/filter/oox/unitconverter.cxx @@ -149,18 +149,17 @@ void UnitConverter::finalizeImport() { // XDevice expects pixels in font descriptor, but font contains twips FontDescriptor aDesc = pDefFont-getFontDescriptor(); -aDesc.Height = static_cast sal_Int16 ( scaleValue( aDesc.Height, UNIT_TWIP, UNIT_REFDEVX ) + 0.5 ); Reference XFont xFont = xDevice-getFont( aDesc ); if( xFont.is() ) { // get maximum width of all digits sal_Int32 nDigitWidth = 0; for( sal_Unicode cChar = '0'; cChar = '9'; ++cChar ) -nDigitWidth = ::std::max( nDigitWidth, scaleToMm100( xFont-getCharWidth( cChar ), UNIT_REFDEVX ) ); +nDigitWidth = ::std::max( nDigitWidth, scaleToMm100( xFont-getCharWidth( cChar ), UNIT_TWIP ) ); if( nDigitWidth 0 ) maCoeffs[ UNIT_DIGIT ] = nDigitWidth; // get width of space character -sal_Int32 nSpaceWidth = scaleToMm100( xFont-getCharWidth( ' ' ), UNIT_REFDEVX ); +sal_Int32 nSpaceWidth = scaleToMm100( xFont-getCharWidth( ' ' ), UNIT_TWIP ); if( nSpaceWidth 0 ) maCoeffs[ UNIT_SPACE ] = nSpaceWidth; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/tool/rangelst.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit 66d0a488979facf43b3e236fe4ac025776b1582b Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Oct 4 20:46:54 2012 +0200 workaround broken uno implementatiion with ScRangeList Change-Id: Ied665e59ada98c25651be562c4a2fe54ffd1ec6a Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 19321b5..e99e47f 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -438,6 +438,9 @@ bool ScRangeList::UpdateReference( } } +if(maRanges.empty()) +return true; + vectorScRange*::iterator itr = maRanges.begin(), itrEnd = maRanges.end(); for (; itr != itrEnd; ++itr) { @@ -460,6 +463,16 @@ bool ScRangeList::UpdateReference( pR-aEnd.Set( theCol2, theRow2, theTab2 ); } } + +if(eUpdateRefMode == URM_INSDEL) +{ +if(nDx 0 || nDy 0) +{ +size_t n = maRanges.size(); +Join(*maRanges[n-1], true); +} +} + return bChanged; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xetable.cxx |7 +++ sc/source/filter/inc/xetable.hxx |2 +- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 07a4f761ddead5e1f2af96ab5793fcc94d1abcaa Author: Noel Power noel.po...@suse.com Date: Thu Oct 4 17:02:18 2012 +0100 really export default row heights for xlsx fdo#55621 Change-Id: Icdf581cd7ae245f2749fecf00957bc9524f717d8 (cherry picked from commit 5a651522acb42fcffa6defc212cb8d0e9b9b7d3f) Signed-off-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index e3967f2..793155a 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -2434,6 +2434,13 @@ void XclExpCellTable::Save( XclExpStream rStrm ) void XclExpCellTable::SaveXml( XclExpXmlStream rStrm ) { +// DEFAULT row height +XclExpDefaultRowData rDefData = mxDefrowheight-GetDefaultData(); +sax_fastparser::FSHelperPtr rWorksheet = rStrm.GetCurrentStream(); +rWorksheet-startElement( XML_sheetFormatPr, +XML_defaultRowHeight, OString::valueOf( (double) rDefData.mnHeight / 20.0 ).getStr(), FSEND ); +rWorksheet-endElement( XML_sheetFormatPr ); + maColInfoBfr.SaveXml( rStrm ); maRowBfr.SaveXml( rStrm ); } diff --git a/sc/source/filter/inc/xetable.hxx b/sc/source/filter/inc/xetable.hxx index 33b7b2c..291c37f 100644 --- a/sc/source/filter/inc/xetable.hxx +++ b/sc/source/filter/inc/xetable.hxx @@ -851,7 +851,7 @@ public: /** Sets the passed default data as current record contents. */ voidSetDefaultData( const XclExpDefaultRowData rDefData ); - +XclExpDefaultRowData GetDefaultData() { return maDefData; } private: /** Writes the contents of the record. */ virtual voidWriteBody( XclExpStream rStrm ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/defnamesbuffer.cxx |4 1 file changed, 4 insertions(+) New commits: commit 115add85ea9e16623a3580e3343499d0ff444a45 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Sep 28 21:01:14 2012 +0200 vba procedures and macro names will result in crash, fdo#55174 Change-Id: I23073ecc56482670d185b39452a7d8b9d6eb38c8 Signed-off-by: Noel Power noel.po...@suse.com diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx index 2cf0c00..8cdbcc4 100644 --- a/sc/source/filter/oox/defnamesbuffer.cxx +++ b/sc/source/filter/oox/defnamesbuffer.cxx @@ -426,6 +426,10 @@ DefinedName::getTokens() void DefinedName::convertFormula() { +// macro function or vba procedure +if(!mpScRangeData) +return; + // convert and set formula of the defined name if ( getFilterType() == FILTER_OOXML ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/extlstcontext.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 6232eeaa90643f2e067145296f8e97fb16f7ecf5 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Sep 28 01:21:41 2012 +0200 ooxml spec allow ext ref to non existent entry, fdo#54558 Change-Id: I717917d04a93975472d60248eb61066cd04d1bbe Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 740a841..d5cc534 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -170,7 +170,13 @@ ContextHandlerRef ExtGlobalContext::onCreateContext( sal_Int32 nElement, const A if(nElement == XLS_EXT_TOKEN( cfRule )) { rtl::OUString aId = rAttribs.getString( XML_id, rtl::OUString() ); -void* pInfo = getExtLst().find( aId )-second; + +// an ext entrie does not need to have an existing corresponding entry +ExtLst::const_iterator aExt = getExtLst().find( aId ); +if(aExt == getExtLst().end()) +return NULL; + +void* pInfo = aExt-second; if (!pInfo) { return NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/formulabuffer.cxx | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) New commits: commit 1ba25c3ada91963f095c976764d68db039be0fd8 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Sep 28 01:22:44 2012 +0200 fix vell value import from ooxml with array formulas, fdo#54558 Change-Id: I3a7e30940c543a178bba3008db2c6056b4d3 Signed-off-by: Noel Power noel.po...@suse.com diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx index a82e195..f2b89a8 100644 --- a/sc/source/filter/oox/formulabuffer.cxx +++ b/sc/source/filter/oox/formulabuffer.cxx @@ -112,23 +112,23 @@ void FormulaBuffer::finalizeImport() applyCellFormulas( cellIt-second ); } +ArrayFormulaDataMap::iterator itArray = cellArrayFormulas.find( nTab ); +if ( itArray != cellArrayFormulas.end() ) +{ +applyArrayFormulas( itArray-second ); +} + FormulaValueMap::iterator itValues = cellFormulaValues.find( nTab ); if ( itValues != cellFormulaValues.end() ) { std::vector ValueAddressPair rVector = itValues-second; applyCellFormulaValues( rVector ); } - -ArrayFormulaDataMap::iterator itArray = cellArrayFormulas.find( nTab ); - -if ( itArray != cellArrayFormulas.end() ) -{ -applyArrayFormulas( itArray-second ); -} } rDoc.SetAutoNameCache( NULL ); xFormulaBar-setPosition( 1.0 ); } + void FormulaBuffer::applyCellFormula( ScDocument rDoc, const ApiTokenSequence rTokens, const ::com::sun::star::table::CellAddress rAddress ) { ScTokenArray aTokenArray; @@ -158,7 +158,8 @@ void FormulaBuffer::applyCellFormulaValues( const std::vector ValueAddressPair ScAddress aCellPos; ScUnoConversion::FillScAddress( aCellPos, it-first ); ScBaseCell* pBaseCell = rDoc.GetCell( aCellPos ); -if ( pBaseCell-GetCellType() == CELLTYPE_FORMULA ) +SAL_WARN_IF( !pBaseCell, sc, why is the formula not imported? bug?); +if ( pBaseCell pBaseCell-GetCellType() == CELLTYPE_FORMULA ) { ScFormulaCell* pCell = static_cast ScFormulaCell* ( pBaseCell ); pCell-SetHybridDouble( it-second ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlstyli.cxx | 11 +-- sc/source/filter/xml/xmlstyli.hxx |1 + 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 2ec30db5f8a9b629b3a099ed8e4d3598567feceb Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Sep 28 20:14:17 2012 +0200 fetime of mpCondFormat is more complex, fdo#55379 Change-Id: I2b34f9fefdfdfa245ab73f8691090cbde8bcd34e Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 7388d86..167755f 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -392,12 +392,15 @@ XMLTableStyleContext::XMLTableStyleContext( ScXMLImport rImport, nNumberFormat(-1), nLastSheet(-1), bParentSet(false), -mpCondFormat(NULL) +mpCondFormat(NULL), +mbDeleteCondFormat(true) { } XMLTableStyleContext::~XMLTableStyleContext() { +if(mbDeleteCondFormat) +delete mpCondFormat; } SvXMLImportContext *XMLTableStyleContext::CreateChildContext( @@ -444,11 +447,6 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequencetable::CellRangeAddres { if(itr-EqualEntries(*mpCondFormat)) { -// we don't need the new cond format entry now -// the found one is the same and we just need to add the range to it -delete mpCondFormat; -mpCondFormat = NULL; - ScRangeList rRangeList = itr-GetRangeList(); sal_uInt32 nCondId = itr-GetKey(); size_t n = rRange.size(); @@ -470,6 +468,7 @@ void XMLTableStyleContext::ApplyCondFormat( uno::Sequencetable::CellRangeAddres if(mpCondFormat) { +mbDeleteCondFormat = false; sal_uLong nIndex = pDoc-AddCondFormat(mpCondFormat, nTab ); mpCondFormat-SetKey(nIndex); mpCondFormat-AddRange(rRange); diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index d674fe3..2498b3c 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -101,6 +101,7 @@ class XMLTableStyleContext : public XMLPropStyleContext SCTAB nLastSheet; boolbParentSet; ScConditionalFormat*mpCondFormat; +boolmbDeleteCondFormat; const ScXMLImport GetScImport() const { return (const ScXMLImport)GetImport(); } ScXMLImport GetScImport() { return (ScXMLImport)GetImport(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xicontent.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 4a3cd86f894334dcef9ab2edb59d167a77fbdf85 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sat Sep 22 01:34:38 2012 +0200 set conditional format range for xls import, fdo#54555 Change-Id: I43d1834d28534fc0ec8cb406e1be7e9f48074da2 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index a6bb268..72bb839 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -635,6 +635,7 @@ void XclImpCondFormat::ReadCF( XclImpStream rStrm ) { sal_uLong nKey = 0; mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) ); +mxScCondFmt-AddRange(maRanges); } ScCondFormatEntry* pEntry = new ScCondFormatEntry( eMode, xTokArr1.get(), pTokArr2.get(), GetDocPtr(), rPos, aStyleName ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/inc/lotattr.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit acc7209c97469c6e4c7633f2a206f345139818e2 Author: Stephan Bergmann sberg...@redhat.com Date: Mon Sep 10 10:08:30 2012 +0200 -Werror,-Wmismatched-tags Change-Id: I69219a86b6530a7bac5f1726e980655bf5f0 (cherry picked from commit d3bc83f04314108cda530fb6663107a45a4a1cfc) diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index 844da07..cc8971a 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -42,7 +42,7 @@ class ScPatternAttr; class SvxColorItem; class Color; class LotAttrTable; -class LOTUS_ROOT; +struct LOTUS_ROOT; namespace editeng { class SvxBorderLine; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/extlstcontext.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 973574cbd4d9ec39efff3961b8121e27890a56da Author: Michael Stahl mst...@redhat.com Date: Thu Jul 12 23:45:35 2012 +0200 ExtGlobalContext::onCreateContext: warning C4702: unreachable code Change-Id: Iccbf66d8838fcfa2f2c620dd768aba75f9e071f4 (cherry picked from commit d0e4215b653b0fab6718b06a5dc0e566170f538d) Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx index 6435128..740a841 100644 --- a/sc/source/filter/oox/extlstcontext.cxx +++ b/sc/source/filter/oox/extlstcontext.cxx @@ -180,8 +180,6 @@ ContextHandlerRef ExtGlobalContext::onCreateContext( sal_Int32 nElement, const A else return this; } - -return 0; } void ExtGlobalContext::onStartElement( const AttributeList rAttribs ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx |3 --- 1 file changed, 3 deletions(-) New commits: commit b8309c0881a9fa78b30458368515e40f2b751ce5 Author: Stephan Bergmann sberg...@redhat.com Date: Thu Sep 6 11:49:28 2012 +0200 warning C4702: unreachable code Change-Id: Ie9544ef452d7b9852bd2c31af1cb42035e5c827b (cherry picked from commit 5fc1d590e7e57b15eab64770880a52e44c5cca71) diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 7a345ed..feb3f76 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -66,7 +66,6 @@ bool ScFormatEntry::operator==( const ScFormatEntry r ) const { case condformat::CONDITION: return static_castconst ScCondFormatEntry(*this) == static_castconst ScCondFormatEntry(r); -break; default: // TODO: implement also this case // actually return false for these cases is not that bad @@ -74,8 +73,6 @@ bool ScFormatEntry::operator==( const ScFormatEntry r ) const // to think about the range return false; } - -return true; } bool lcl_HasRelRef( ScDocument* pDoc, ScTokenArray* pFormula, sal_uInt16 nRecursion = 0 ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column3.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 44946ef77dd14d139fc799a25c4e2b26c772ce9f Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Wed Sep 19 18:24:59 2012 +0200 use correct cell for broadcasting, fdo#55059 Change-Id: I353df8e9d3ccabee32b82d04cdae402e3a83ed23 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 6495ca6..48d77dc 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -427,7 +427,10 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe else { aHint.GetAddress().SetRow( nOldRow ); -aHint.SetCell( pOldCell ); +if(bKeepBC) +aHint.SetCell( pNoteCell ); +else +aHint.SetCell( pOldCell ); pDocument-Broadcast( aHint ); if (pNoteCell != pOldCell) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/cell.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit db2a4f4032db854a2a028d4ed136cfd4c63ae082 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Sep 18 09:00:29 2012 +0200 broadcaster cells are empty, fdo#54553 Change-Id: Ie7c251b7eaee248c97f4f931175bc26539acb22a Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 2a3d807..b6f40ca 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -267,6 +267,9 @@ void ScBaseCell::Delete() bool ScBaseCell::IsBlank() const { +if(eCellType == CELLTYPE_NOTE) +return true; + return false; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) New commits: commit e12546da1a88ecef130a3a6842820bc7ebb2a851 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Sep 18 14:44:21 2012 +0200 shrink to used area for duplicate codn format, fdo#54349 Change-Id: Ie0cce19c3ea2132d94a227cd051090573054b369 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index aad6019..7a345ed 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -774,8 +774,21 @@ static bool lcl_IsDuplicate( ScDocument *pDoc, double nArg, const String rStr, const ScRange *aRange = rRanges[i]; SCROW nRow = aRange-aEnd.Row(); SCCOL nCol = aRange-aEnd.Col(); -for( SCROW r = aRange-aStart.Row(); r = nRow; r++ ) -for( SCCOL c = aRange-aStart.Col(); c = nCol; c++ ) +SCCOL nColStart = aRange-aStart.Col(); +SCROW nRowStart = aRange-aEnd.Row(); +SCTAB nTab = aRange-aStart.Tab(); + +// temporary fix to workaorund slow duplicate entry +// conditions, prevent to use a whole row +if(nRow == MAXROW) +{ +bool bShrunk = false; +pDoc-ShrinkToUsedDataArea(bShrunk, nTab, nColStart, nRowStart, +nCol, nRow, false); +} + +for( SCROW r = nRowStart; r = nRow; r++ ) +for( SCCOL c = nColStart; c = nCol; c++ ) { double nVal = 0.0; ScBaseCell *pCell = NULL; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/fillinfo.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit e80b2d5d6caf50f9c7f48e1b532e7d6fddeb4e45 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Sep 18 19:31:28 2012 +0200 rows with cond formats don't have empty background, fdo#54661, fdo#52535 Change-Id: Iecab7e80c533caa4e36b6d2534d8446c0329fecd Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx index 4b29883..fbc2d64 100644 --- a/sc/source/core/data/fillinfo.cxx +++ b/sc/source/core/data/fillinfo.cxx @@ -495,6 +495,8 @@ void ScDocument::FillInfo( ScTableInfo rTabInfo, SCCOL nX1, SCROW nY1, SCCOL nX RowInfo* pThisRowInfo = pRowInfo[nArrY]; if (pBackground != pDefBackground) // Spalten-HG == Standard ? pThisRowInfo-bEmptyBack = false; +if (pCondForm) +pThisRowInfo-bEmptyBack = false; if (bAutoFilter) pThisRowInfo-bAutoFilter = true; if (bPushButton) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlstyli.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9b4d2473a11db4d1dee0fa445346907d7e942801 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Sep 14 18:51:53 2012 +0200 don't add old cond formats if new ones are already loaded, fdo#54749 Change-Id: Ib0cbe1a3347e7231e7908b9bd8135e984e6ef644 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 93e95fe..7388d86 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -424,7 +424,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext( void XMLTableStyleContext::ApplyCondFormat( uno::Sequencetable::CellRangeAddress xCellRanges ) { -if(!mpCondFormat) +if(!mpCondFormat || GetScImport().HasNewCondFormatData()) return; ScRangeList rRange; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlimprt.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 89e34ef5e4ff5efc202656bd9a2122745fdc6530 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Tue Aug 14 16:46:44 2012 -0400 Calculate positions of cell-anchored objects upon ods import (fdo#54695) Since we no longer re-calc row heights on ods import, we need to do this manually, in order to position cell-anchored objects correctly. Previously we were getting this for free since the row height recalc code path did it as part of it. Change-Id: I8ab5dd1fe7cd8a45b7968e101c893b442d7ce132 Signed-off-by: Noel Power noel.po...@suse.com diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index ed8509f..204a3fa 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -3104,8 +3104,11 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE SCTAB nTabCount = pDoc-GetTableCount(); for (SCTAB nTab=0; nTabnTabCount; ++nTab) +{ +pDoc-SetDrawPageSize(nTab); if (!pSheetData-IsSheetBlocked( nTab )) pDoc-SetStreamValid( nTab, true ); +} } aTables.FixupOLEs(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/inc/lotattr.hxx|7 +-- sc/source/filter/lotus/lotattr.cxx | 12 +--- sc/source/filter/lotus/lotimpop.cxx |2 +- 3 files changed, 15 insertions(+), 6 deletions(-) New commits: commit 8a861b99ee0b53d03b6f93a3bd6d256a27172ace Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Sep 9 17:20:27 2012 +0200 don't use unitialized global variable, fdo#53713 Change-Id: I9e5150fb4c5681abe9c786f4c2d80f5a10e8a66b (cherry picked from commit 2ac26e6b5248f2f3fde8dc4341b01ef15b6c3a29) Signed-off-by: David Tardon dtar...@redhat.com diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index e3acb2c..844da07 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -42,6 +42,7 @@ class ScPatternAttr; class SvxColorItem; class Color; class LotAttrTable; +class LOTUS_ROOT; namespace editeng { class SvxBorderLine; } @@ -68,7 +69,7 @@ class LotAttrCache { public: -LotAttrCache (); +LotAttrCache(LOTUS_ROOT* pLotRoot); ~LotAttrCache(); @@ -112,13 +113,14 @@ private: SvxColorItem* pWhite; Color* pColTab; boost::ptr_vectorENTRY aEntries; + +LOTUS_ROOT* mpLotusRoot; }; class LotAttrCol { public: - void SetAttr (const SCROW nRow, const ScPatternAttr); void Apply (const SCCOL nCol, const SCTAB nTab ); @@ -138,6 +140,7 @@ private: class LotAttrTable { public: +LotAttrTable(LOTUS_ROOT* pLotRoot); void SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3 ); diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index 7f5f3ab..5606b10 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -58,9 +58,10 @@ LotAttrCache::ENTRY::~ENTRY () delete pPattAttr; } -LotAttrCache::LotAttrCache () +LotAttrCache::LotAttrCache (LOTUS_ROOT* pLotRoot): +mpLotusRoot(pLotRoot) { -pDocPool = pLotusRoot-pDoc-GetPool(); +pDocPool = mpLotusRoot-pDoc-GetPool(); pColTab = new Color [ 8 ]; pColTab[ 0 ] = Color( COL_WHITE ); @@ -115,7 +116,7 @@ const ScPatternAttr LotAttrCache::GetPattAttr( const LotAttrWK3 rAttr ) pAkt-nHash0 = nRefHash; -pLotusRoot-pFontBuff-Fill( rAttr.nFont, rItemSet ); +mpLotusRoot-pFontBuff-Fill( rAttr.nFont, rItemSet ); sal_uInt8 nLine = rAttr.nLineStyle; if( nLine ) @@ -245,6 +246,11 @@ void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum ) } } +LotAttrTable::LotAttrTable(LOTUS_ROOT* pLotRoot): +aAttrCache(pLotRoot) +{ +} + void LotAttrTable::SetAttr( const SCCOL nColFirst, const SCCOL nColLast, const SCROW nRow, const LotAttrWK3 rAttr ) { diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 4eda7c5..a35892d 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -56,7 +56,7 @@ LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, CharSet eQ ) eActType( Lotus_X), pRngNmBffWK3( new RangeNameBufferWK3), pFontBuff( new LotusFontBuffer), -pAttrTable( new LotAttrTable) +pAttrTable( new LotAttrTable(this)) { } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlstyli.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 803aac5aafe5597b8a39cf85062a22716e29bb33 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Sep 6 15:48:01 2012 +0200 assign correct value (cherry picked from commit 160a88e18d868433813f3f09b340dcaf68f276b2) Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 4c99b6d..93e95fe 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -413,7 +413,7 @@ SvXMLImportContext *XMLTableStyleContext::CreateChildContext( if(!mpCondFormat) mpCondFormat = new ScConditionalFormat( 0, GetScImport().GetDocument() ); ScXMLMapContext* pMapContext = new ScXMLMapContext(GetImport(), nPrefix, rLocalName, xAttrList); -pContext = pContext; +pContext = pMapContext; mpCondFormat-AddEntry(pMapContext-CreateConditionEntry()); } if (!pContext) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table2.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 4bcd9947774c05df6031e3b2228939150aa8c78b Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Aug 31 04:29:49 2012 +0200 handle missing cond format entries more gracefully, related fdo#52340 Change-Id: Id1cf7d99a13c04541e87ad00c5418dd4f766d268 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 9dd2afb..21d9307 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -667,6 +667,12 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO if (aOldIdToNewId.find(nId) == aOldIdToNewId.end()) { ScConditionalFormat* pFormat = pOldCondFormatList-GetFormat(nId); +if(!pFormat) +{ +// may happen in some strange circumstances where cell storage and +// cond format storage are not in sync +continue; +} ScConditionalFormat* pNewFormat = pFormat-Clone(pDocument); pNewFormat-SetKey(0); //not in list = create entries in both maps and new format ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xipivot.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 98ec92335d18bb361a63cea3e1e71a87ed2b Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Aug 31 12:46:54 2012 -0400 fdo#54303: Prevent crash on load. Another simple null pointer check, to save the day. This unfortunately prevents the properties of the skipped field from being loaded properly, but it's still better than a immediate crash. Change-Id: I49398d80eb3bf0834b7e9830ac8be3ac776cb354 Signed-off-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index 2d30efb..8f9596a 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -1091,7 +1091,11 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData rSaveData ) con if( !pCacheField || !pCacheField-IsSupportedField() ) return 0; -ScDPSaveDimension rSaveDim = *rSaveData.GetNewDimensionByName( rFieldName ); +ScDPSaveDimension* pTest = rSaveData.GetNewDimensionByName(rFieldName); +if (!pTest) +return NULL; + +ScDPSaveDimension rSaveDim = *pTest; // orientation rSaveDim.SetOrientation( static_cast sal_uInt16 ( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/XMLExportDataPilot.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 6781ee7039adc7248d887589b1369dda4dc45791 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Aug 31 13:17:51 2012 -0400 Don't export the internal field name suffix '*' to ods. These '*' suffix is used internally to make duplicate field names unique. However, we were exporting the raw names (names with the '*'s) by mistake when saving to ods. We need to stop this ASAP before someone gets hurt. Change-Id: Iaff7a6343cf202f5fb9855fb7dfe59b872920e4f (cherry picked from commit fe0ef1b2f13d1c2cc8e4f777911c158390183053) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 5b5622c..fe3dfcb 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -48,6 +48,7 @@ #include dpsdbtab.hxx #include dpdimsave.hxx #include dpgroup.hxx +#include dputil.hxx #include rangeutl.hxx #include queryentry.hxx #include com/sun/star/sheet/DataImportMode.hpp @@ -610,8 +611,9 @@ void ScXMLExportDataPilot::WriteGroupDimAttributes(const ScDPSaveGroupDimension* { if (pGroupDim) { +OUString aSrcFieldName = ScDPUtil::getSourceDimensionName(pGroupDim-GetSourceDimName()); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_IS_GROUP_FIELD, XML_TRUE); -rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, pGroupDim-GetSourceDimName()); +rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcFieldName); if (pGroupDim-GetDatePart()) { WriteDatePart(pGroupDim-GetDatePart()); @@ -684,7 +686,8 @@ void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const void ScXMLExportDataPilot::WriteDimension(ScDPSaveDimension* pDim, const ScDPDimensionSaveData* pDimData) { -rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, rtl::OUString(pDim-GetName())); +OUString aSrcDimName = ScDPUtil::getSourceDimensionName(pDim-GetName()); +rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_SOURCE_FIELD_NAME, aSrcDimName); if (rExport.getDefaultVersion() SvtSaveOptions::ODFVER_012) { // Export display names only for ODF 1.2 extended or later. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/condformatbuffer.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 132ffae17678df9c10d31dd3ae7540254a58dbf0 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Aug 30 02:05:20 2012 +0200 also handle the cond format code for xlsb the new way, fdo#53424 Change-Id: I8d54e5fee29952635c3d4c2d5a12203668e2ff28 diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx index b110df2..8315793 100644 --- a/sc/source/filter/oox/condformatbuffer.cxx +++ b/sc/source/filter/oox/condformatbuffer.cxx @@ -877,6 +877,7 @@ void CondFormat::importCondFormatting( SequenceInputStream rStrm ) rStrm.skip( 8 ); rStrm aRanges; getAddressConverter().convertToCellRangeList( maModel.maRanges, aRanges, getSheetIndex(), true ); +mpFormat = new ScConditionalFormat(0, getScDocument()); } void CondFormat::importCfRule( SequenceInputStream rStrm ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column3.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit cedaa445535e9337294a46cb75c4850294e4f715 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Aug 28 18:47:37 2012 +0200 prevent double delete of broadcaster, fdo#54074, fdo#53364 Change-Id: I7d94525daaeb7c8268fb10594c8a21ebcd52311c Signed-off-by: Noel Power noel.po...@suse.com diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index aab315c..6495ca6 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -401,8 +401,11 @@ void ScColumn::DeleteRange( SCSIZE nStartIndex, SCSIZE nEndIndex, sal_uInt16 nDe SvtBroadcaster* pBC = pOldCell-GetBroadcaster(); bool bKeepBC = pBC pBC-HasListeners(); // #i99844# do not release broadcaster from old cell, it still has to notify deleted content -if ( bKeepBC) -pNoteCell = new ScNoteCell( pBC ); +if (bKeepBC) +{ +pNoteCell = new ScNoteCell( pBC ); +pOldCell-ReleaseBroadcaster(); +} // remove cell entry in cell item list SCROW nOldRow = maItems[nIdx].nRow; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlimprt.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 390a18bfdccfa9b2334ff0e76800358177f1c661 Author: Noel Power noel.po...@suse.com Date: Fri Aug 24 10:31:45 2012 +0100 fix for fdo#49255 This patch disables row height calculations ( and uses the hard heights read from the xml instead ) The bug here partially exisits because the height calculation doesn't work correctly because the factor from ScDocShell::GetOutputFactor() has not been calculated yet ( and has a default value of 1 ) This number is used in setting up the correct nPPTX and because it isn't setup correctly the height calculated for the text is incorrect. We use EnableAdjustHeight to inhibit auto height calculations that result from various changes ( like style changes etc. ) from the start of the load and re-enabled it at the end. Change-Id: Ib6715c39b7cb5793458f15b1f0b3c9ecd16412f9 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index bf7c18b..d0234b2 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2811,6 +2811,7 @@ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::R uno::Referencedocument::XActionLockable xActionLockable(xDoc, uno::UNO_QUERY); if (xActionLockable.is()) xActionLockable-addActionLock(); +pDoc-EnableAdjustHeight(false); } // XServiceInfo @@ -3105,7 +3106,6 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE pDoc-SetStreamValid( nTab, true ); } -aTables.UpdateRowHeights(); aTables.FixupOLEs(); } if (GetModel().is()) @@ -3120,6 +3120,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE { ScModelObj::getImplementation(GetModel())-AfterXMLLoading(true); } +pDoc-EnableAdjustHeight( true ); } // XEventListener ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/tool/address.cxx | 95 +++- 1 file changed, 65 insertions(+), 30 deletions(-) New commits: commit 2a6ada4a4dab3edb0896ac5665623c0d4727baf7 Author: Eike Rathke er...@redhat.com Date: Tue Aug 28 00:04:20 2012 +0200 resolved fdo#51926 handle .xlsm link to external sheet with space In MOOXML '[1]Sheet 4'!$A$1 represents a reference to an external document's cache index with a sheet name containing blank, and not [1]'Sheet 4'!$A$1 Change-Id: I5caf9e1d9a80154116dc7a72b33d34229092839c diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx index 30558bd..8af1314 100644 --- a/sc/source/core/tool/address.cxx +++ b/sc/source/core/tool/address.cxx @@ -326,6 +326,57 @@ lcl_XL_ParseSheetRef( const sal_Unicode* start, } +/** Tries to obtain the external document index and replace by actual document +name. + +@param ppErrRet + Contains the default pointer the caller would return if this method + returns FALSE, may be replaced by NULL for type or data errors. + +@returns FALSE only if the input name is numeric and not within the index +sequence, or the link type cannot be determined or data mismatch. Returns +TRUE in all other cases, also when there is no index sequence or the input +name is not numeric. + */ +bool lcl_XL_getExternalDoc( const sal_Unicode** ppErrRet, String rExternDocName, +const uno::Sequence const sheet::ExternalLinkInfo * pExternalLinks) +{ +// 1-based, sequence starts with an empty element. +if (pExternalLinks pExternalLinks-getLength() 1) +{ +// A numeric document name is an index into the sequence. +if (CharClass::isAsciiNumeric( rExternDocName)) +{ +sal_Int32 i = rExternDocName.ToInt32(); +if (i = 0 || i = pExternalLinks-getLength()) +return false; // with default *ppErrRet +const sheet::ExternalLinkInfo rInfo = (*pExternalLinks)[i]; +switch (rInfo.Type) +{ +case sheet::ExternalLinkType::DOCUMENT : +{ +rtl::OUString aStr; +if (!(rInfo.Data = aStr)) +{ +OSL_TRACE( ScRange::Parse_XL_Header: Data type mismatch for ExternalLinkInfo %d, i); +*ppErrRet = NULL; +return false; +} +rExternDocName = aStr; +} +break; +default: +OSL_TRACE( ScRange::Parse_XL_Header: unhandled ExternalLinkType %d for index %d, +rInfo.Type, i); +*ppErrRet = NULL; +return false; +} +} +} +return true; +} + + const sal_Unicode* ScRange::Parse_XL_Header( const sal_Unicode* p, const ScDocument* pDoc, @@ -368,36 +419,10 @@ const sal_Unicode* ScRange::Parse_XL_Header( } ++p; -// 1-based, sequence starts with an empty element. -if (pExternalLinks pExternalLinks-getLength() 1) -{ -// A numeric document name is an index into the sequence. -if (CharClass::isAsciiNumeric( rExternDocName)) -{ -sal_Int32 i = rExternDocName.ToInt32(); -if (i = 0 || i = pExternalLinks-getLength()) -return start; -const sheet::ExternalLinkInfo rInfo = (*pExternalLinks)[i]; -switch (rInfo.Type) -{ -case sheet::ExternalLinkType::DOCUMENT : -{ -rtl::OUString aStr; -if (!(rInfo.Data = aStr)) -{ -OSL_TRACE( ScRange::Parse_XL_Header: Data type mismatch for ExternalLinkInfo %d, i); -return NULL; -} -rExternDocName = aStr; -} -break; -default: -OSL_TRACE( ScRange::Parse_XL_Header: unhandled ExternalLinkType %d for index %d, -rInfo.Type, i); -return NULL; -} -} -} +const sal_Unicode* pErrRet = start; +if (!lcl_XL_getExternalDoc( pErrRet, rExternDocName, pExternalLinks)) +return pErrRet; + rExternDocName = ScGlobal::GetAbsDocName(rExternDocName, pDoc-GetDocumentShell()); } else if (*p == '\'') @@ -407,6 +432,8 @@ const sal_Unicode* ScRange::Parse_XL_Header( // 'E:\[EXTDATA12B.XLSB]Sheet1:Sheet3'!$A$11 // But, 'Sheet1'!B3 would also be a valid! // Excel does not allow [ and ]
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9f14fa5f5f6c6edd596a0bfaa9a24facb5c6d83f Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Aug 28 02:59:39 2012 +0200 don't crash for invalid repaint ranges in cond formats, fdo#53839 Change-Id: I83cbb2574849c69fba3ca315d7507358654ff2b9 diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index 97ffd61..a5e637c 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1126,7 +1126,7 @@ void ScConditionEntry::SourceChanged( const ScAddress rChanged ) ScRange aPaint( nCol1,nRow1,nTab1, nCol2,nRow2,nTab2 ); // kein Paint, wenn es nur die Zelle selber ist -if ( aPaint.aStart != rChanged || aPaint.aEnd != rChanged ) +if ( aPaint.IsValid() (aPaint.aStart != rChanged || aPaint.aEnd != rChanged )) DataChanged( aPaint ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/view/cliputil.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7da3738ab903a180b5038ee92ad40869fdbff950 Author: Noel Power noel.po...@suse.com Date: Mon Aug 27 18:02:18 2012 +0100 fdo#46250: Allow paste paste special for unmatching dest (single) range. Change-Id: I420c044c9bcc49e479956f9118fb173a0350fda2 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index 74ac721..723bb89 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -114,7 +114,7 @@ bool ScClipUtil::CheckDestRanges( SCCOL nCols = aTest.aEnd.Col() - aTest.aStart.Col() + 1; SCROW nRowTest = (nRows / nSrcRows) * nSrcRows; SCCOL nColTest = (nCols / nSrcCols) * nSrcCols; -if (nRows != nRowTest || nCols != nColTest) +if ( rDest.size() 1 ( nRows != nRowTest || nCols != nColTest ) ) { // Destination range is not a multiple of the source range. Bail out. return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/optdlg/tpdefaults.cxx | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) New commits: commit 530a899b1399f0aa192cc8eebaed36ca6613b3eb Author: Jean-Baptiste FAURE jbf.fa...@orange.fr Date: Tue Aug 21 22:15:32 2012 +0200 The label size is computed from the length of the string it contains Change-Id: I586a31a5d563ea8a11282836ca1d54b0c8be1bf4 Signed-off-by: Arnaud Versini arnaud.vers...@gmail.com Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx index b67e87b..c0db2c1 100644 --- a/sc/source/ui/optdlg/tpdefaults.cxx +++ b/sc/source/ui/optdlg/tpdefaults.cxx @@ -48,16 +48,23 @@ ScTpDefaultsOptions::ScTpDefaultsOptions(Window *pParent, const SfxItemSet rCor { FreeResource(); -long nTxtW = aFtNSheets.GetCtrlTextWidth( aFtNSheets.GetText() ); -long nCtrlW = aFtNSheets.GetSizePixel().Width(); -if ( nTxtW = nCtrlW ) +// the following computation must be modified accordingly if a third line is added to this dialog +long nTxtW1 = aFtNSheets.GetCtrlTextWidth( aFtNSheets.GetText() ); +long nCtrlW1 = aFtNSheets.GetSizePixel().Width(); +long nTxtW2 = aFtSheetPrefix.GetCtrlTextWidth(aFtSheetPrefix.GetText() ); +long nCtrlW2 = aFtSheetPrefix.GetSizePixel().Width(); +if ( nTxtW1 = nCtrlW1 || nTxtW2 = nCtrlW2) { +long nTxtW = std::max(nTxtW1,nTxtW2); Size aNewSize = aFtNSheets.GetSizePixel(); -aNewSize.Width() += ( nTxtW - nCtrlW ); +aNewSize.Width() = nTxtW; aFtNSheets.SetSizePixel( aNewSize ); +aFtSheetPrefix.SetSizePixel( aNewSize ); Point aNewPoint = aEdNSheets.GetPosPixel(); -aNewPoint.X() += ( nTxtW - nCtrlW ); +aNewPoint.X() += (nTxtW - nCtrlW1); aEdNSheets.SetPosPixel( aNewPoint ); +aNewPoint.Y() = aEdSheetPrefix.GetPosPixel().Y(); +aEdSheetPrefix.SetPosPixel( aNewPoint ); } aEdNSheets.SetModifyHdl( LINK(this, ScTpDefaultsOptions, NumModifiedHdl) ); aEdSheetPrefix.SetModifyHdl( LINK(this, ScTpDefaultsOptions, PrefixModifiedHdl) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table3.cxx | 49 + 1 file changed, 30 insertions(+), 19 deletions(-) New commits: commit 2c1d36c575399fcd8743cfe3b96e107e821cbe65 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Aug 26 14:04:37 2012 +0200 when swaping cols or rows insert notes at the right place, fdo#53979 Change-Id: I1228b3a064623e810265b47776e33f81f4bf0e51 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index ea49b05..15087c5 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -563,7 +563,9 @@ void ScTable::QuickSort( ScSortInfoArray* pArray, SCsCOLROW nLo, SCsCOLROW nHi ) void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) { -for (SCROW nRow = aSortParam.nRow1; nRow = aSortParam.nRow2; nRow++) +SCROW nRowStart = aSortParam.nRow1; +SCROW nRowEnd = aSortParam.nRow2; +for (SCROW nRow = nRowStart; nRow = nRowEnd; nRow++) { aCol[nCol1].SwapCell(nRow, aCol[nCol2]); if (aSortParam.bIncludePattern) @@ -589,16 +591,19 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) ScPostIt* pPostIt = itr-second; ++itr; -if (nCol == nCol1) +if(nRow = nRowStart nRow = nRowEnd) { -aNoteMap.insert(nCol, nRow, pPostIt); -maNotes.ReleaseNote(nCol2, nRow); -} -else if (nCol == nCol2) -{ -aNoteMap.insert(nCol, nRow, pPostIt); -maNotes.ReleaseNote(nCol1, nRow); +if (nCol == nCol1) +{ +aNoteMap.insert(nCol2, nRow, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} +else if (nCol == nCol2) +{ +aNoteMap.insert(nCol1, nRow, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} } } @@ -609,6 +614,7 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) SCCOL nCol = itr-first.first; SCROW nRow = itr-first.second; ScPostIt* pPostIt = itr-second; +++itr; maNotes.insert(nCol, nRow, pPostIt); aNoteMap.ReleaseNote(nCol, nRow); @@ -617,7 +623,9 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) void ScTable::SwapRow(SCROW nRow1, SCROW nRow2) { -for (SCCOL nCol = aSortParam.nCol1; nCol = aSortParam.nCol2; nCol++) +SCCOL nColStart = aSortParam.nCol1; +SCCOL nColEnd = aSortParam.nCol2; +for (SCCOL nCol = nColStart; nCol = nColEnd; nCol++) { aCol[nCol].SwapRow(nRow1, nRow2); if (aSortParam.bIncludePattern) @@ -655,16 +663,18 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2) ScPostIt* pPostIt = itr-second; ++itr; -if (nRow == nRow1) +if( nCol = nColStart nCol = nColEnd ) { -aNoteMap.insert(nCol, nRow, pPostIt); -maNotes.ReleaseNote(nCol, nRow2); -} -else if (nRow == nRow2) -{ -aNoteMap.insert(nCol, nRow, pPostIt); -maNotes.ReleaseNote(nCol, nRow1); - +if (nRow == nRow1) +{ +aNoteMap.insert(nCol, nRow2, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} +else if (nRow == nRow2) +{ +aNoteMap.insert(nCol, nRow1, pPostIt); +maNotes.ReleaseNote(nCol, nRow); +} } } @@ -675,6 +685,7 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2) SCCOL nCol = itr-first.first; SCROW nRow = itr-first.second; ScPostIt* pPostIt = itr-second; +++itr; maNotes.insert(nCol, nRow, pPostIt); aNoteMap.ReleaseNote(nCol, nRow); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlimprt.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit e093e553185ed8beff83ef784f0ed5de95c2bc8f Author: Noel Power noel.po...@suse.com Date: Fri Aug 24 11:10:33 2012 +0100 Revert fix for fdo#49255 This reverts commit 9efd8deb867c89baf0f5df410b87e8310fff524b. diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index d0234b2..bf7c18b 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -2811,7 +2811,6 @@ throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::R uno::Referencedocument::XActionLockable xActionLockable(xDoc, uno::UNO_QUERY); if (xActionLockable.is()) xActionLockable-addActionLock(); -pDoc-EnableAdjustHeight(false); } // XServiceInfo @@ -3106,6 +3105,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE pDoc-SetStreamValid( nTab, true ); } +aTables.UpdateRowHeights(); aTables.FixupOLEs(); } if (GetModel().is()) @@ -3120,7 +3120,6 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE { ScModelObj::getImplementation(GetModel())-AfterXMLLoading(true); } -pDoc-EnableAdjustHeight( true ); } // XEventListener ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/dpcache.cxx|4 ++-- sc/source/core/data/dpitemdata.cxx |5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 0ee1609ddc04f01e7398fab08d74529c301600e6 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Wed Aug 22 23:33:14 2012 -0400 fdo#53929: Pivot table uses case insensitive string comparison. Change-Id: I65fa22ceeba37a15b70fe41b1dee26f1dde7d759 Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx index a11db55..f1e4531 100644 --- a/sc/source/core/data/dpcache.cxx +++ b/sc/source/core/data/dpcache.cxx @@ -282,7 +282,7 @@ struct EqualByValue : std::binary_functionBucket, Bucket, bool { bool operator() (const Bucket left, const Bucket right) const { -return left.maValue == right.maValue; +return left.maValue.IsCaseInsEqual(right.maValue); } }; @@ -338,7 +338,7 @@ void processBuckets(std::vectorBucket aBuckets, ScDPCache::Field rField) it-mnOrderIndex = nCurIndex; for (++it; it != itEnd; ++it) { -if (aPrev != it-maValue) +if (!aPrev.IsCaseInsEqual(it-maValue)) ++nCurIndex; it-mnOrderIndex = nCurIndex; diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx index 1641572..bb22894 100644 --- a/sc/source/core/data/dpitemdata.cxx +++ b/sc/source/core/data/dpitemdata.cxx @@ -210,8 +210,9 @@ bool ScDPItemData::IsCaseInsEqual(const ScDPItemData r) const ; } -if (mbStringInterned r.mbStringInterned) -return mpString == r.mpString; +if (mbStringInterned r.mbStringInterned mpString == r.mpString) +// Fast equality check for interned strings. +return true; return ScGlobal::GetpTransliteration()-isEqual(GetString(), r.GetString()); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/app/inputhdl.cxx | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) New commits: commit 2d7d1e59b908ee095e21a55101b380d2dc23008e Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Fri Aug 17 15:44:39 2012 -0400 fdo#48868: Allow Ctrl-TAB and Ctrl-Shift-TAB to cycle through candidates. This applies to two scenarios: 1) cycling through cell values, and 2) cycling through cell functions in a formula tip window. Both were broken and this commit fixes both. Change-Id: I7826efbada827b8ec3edc5f34a1876c84e5e6236 Reviewed-on: https://gerrit.libreoffice.org/441 Reviewed-by: Norbert Thiebaud nthieb...@gmail.com Tested-by: Norbert Thiebaud nthieb...@gmail.com diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index ea0d830..727799a 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -129,6 +129,7 @@ ScTypedCaseStrSet::const_iterator findText( size_t nPos = std::distance(rDataSet.begin(), itPos); size_t nRPos = rDataSet.size() - 1 - nPos; std::advance(it, nRPos); +++it; } for (; it != itEnd; ++it) @@ -150,7 +151,10 @@ ScTypedCaseStrSet::const_iterator findText( { ScTypedCaseStrSet::const_iterator it = rDataSet.begin(), itEnd = rDataSet.end(); if (itPos != rDataSet.end()) +{ it = itPos; +++it; +} for (; it != itEnd; ++it) { @@ -1223,9 +1227,12 @@ void ScInputHandler::NextFormulaEntry( bool bBack ) if ( pActiveView pFormulaData ) { rtl::OUString aNew; -miAutoPosFormula = findText(*pFormulaData, miAutoPosFormula, aAutoSearch, aNew, bBack); -if (miAutoPosFormula != pFormulaData-end()) -ShowTip( aNew );// als QuickHelp anzeigen +ScTypedCaseStrSet::const_iterator itNew = findText(*pFormulaData, miAutoPosFormula, aAutoSearch, aNew, bBack); +if (itNew != pFormulaData-end()) +{ +miAutoPosFormula = itNew; +ShowTip(aNew); // Display a quick help. +} } // bei Tab wird vorher immer HideCursor gerufen @@ -1633,9 +1640,13 @@ void ScInputHandler::NextAutoEntry( bool bBack ) if ( aSel.nEndPos == nParLen aText.getLength() == aAutoSearch.getLength() + nSelLen ) { rtl::OUString aNew; -miAutoPosColumn = findText(*pColumnData, miAutoPosColumn, aAutoSearch, aNew, bBack); -if (miAutoPosColumn != pColumnData-end()) +ScTypedCaseStrSet::const_iterator itNew = +findText(*pColumnData, miAutoPosColumn, aAutoSearch, aNew, bBack); + +if (itNew != pColumnData-end()) { +// match found! +miAutoPosColumn = itNew; bInOwnChange = true;// disable ModifyHdl (reset below) lcl_RemoveLineEnd( aNew ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/docshell/impex.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 0e176a7411beced06ce27c5f059aa97e7de4212d Author: Eike Rathke er...@redhat.com Date: Mon Aug 20 14:38:27 2012 +0200 resolved fdo#53325 CSV space delimiter and quoted field CSV import didn't recognize end of field if a field was quoted and the delimiter was space. Change-Id: I46de608d545011437fe8a298854c134d6cf54b6b Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index ab2fc5e..2957661 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -596,7 +596,10 @@ static QuoteType lcl_isFieldEndQuote( const sal_Unicode* p, const sal_Unicode* p // Due to broken CSV generators that don't double embedded quotes check if // a field separator immediately or with trailing spaces follows the quote, // only then end the field, or at end of string. -while (p[1] == ' ') +const sal_Unicode cBlank = ' '; +if (p[1] == cBlank ScGlobal::UnicodeStrChr( pSeps, cBlank)) +return FIELDEND_QUOTE; +while (p[1] == cBlank) ++p; if (!p[1] || ScGlobal::UnicodeStrChr( pSeps, p[1])) return FIELDEND_QUOTE; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlfilti.cxx |2 -- sc/source/filter/xml/xmlfilti.hxx |1 - 2 files changed, 3 deletions(-) New commits: commit f1c26949e29278a3eae0c167f172a0fd4895fd2f Author: Noel Power noel.po...@suse.com Date: Thu Aug 16 17:43:40 2012 +0100 fix for fdo#48200.diff import regrex state for filter Change-Id: If05b53602a8d8ea260093b3f6a9c0fca45cb74b9 Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx index 65c9420..faee78f 100644 --- a/sc/source/filter/xml/xmlfilti.cxx +++ b/sc/source/filter/xml/xmlfilti.cxx @@ -61,7 +61,6 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport rImport, pDatabaseRangeContext(pTempDatabaseRangeContext), bSkipDuplicates(false), bCopyOutputData(false), -bUseRegularExpressions(false), bConditionSourceRange(false) { ScDocument* pDoc(GetScImport().GetDocument()); @@ -152,7 +151,6 @@ SvXMLImportContext *ScXMLFilterContext::CreateChildContext( sal_uInt16 nPrefix, void ScXMLFilterContext::EndElement() { -mrQueryParam.bRegExp = bUseRegularExpressions; mrQueryParam.bInplace = !bCopyOutputData; mrQueryParam.bDuplicate = !bSkipDuplicates; diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index 8a9715d..052829e 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -62,7 +62,6 @@ class ScXMLFilterContext : public SvXMLImportContext sal_Int16 nUserListIndex; boolbSkipDuplicates; boolbCopyOutputData; -boolbUseRegularExpressions; boolbEnabledUserList; boolbConditionSourceRange; std::vectorConnStackItem maConnStack; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/XMLTableShapeImportHelper.cxx | 37 + 1 file changed, 37 insertions(+) New commits: commit 0484239b2704235fef611820af6780364120fbe4 Author: Noel Power noel.po...@suse.com Date: Wed Aug 15 13:03:04 2012 +0100 fix for fdo#53229, import group shapes position and size correctly a) need to properly calculate the topleftmost position for the combined shapes in the group. b) when you have groups within groups then the offsets need to be applied to the topmost parent. Change-Id: Ie1967f3625030fcd0201f2ab43a0740153cd4bd7 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index 1b58d21..638d29f 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -76,6 +76,17 @@ void XMLTableShapeImportHelper::SetLayer(uno::Referencedrawing::XShape rShape } } +// Attempt to find the topmost parent of the group, this is the one we apply +// offsets to +uno::Reference drawing::XShape lcl_getTopLevelParent( const uno::Reference drawing::XShape rShape ) +{ +uno::Reference container::XChild xChild( rShape, uno::UNO_QUERY ); +uno::Reference drawing::XShape xParent( xChild-getParent(), uno::UNO_QUERY ); +if ( xParent.is() ) +return lcl_getTopLevelParent( xParent ); +return rShape; +} + void XMLTableShapeImportHelper::finishShape( uno::Reference drawing::XShape rShape, const uno::Reference xml::sax::XAttributeList xAttrList, @@ -192,6 +203,32 @@ void XMLTableShapeImportHelper::finishShape( } else //this are grouped shapes which should also get the layerid { +uno::Reference drawing::XShapes xGroup( rShape, uno::UNO_QUERY ); +// ignore the group ( within group ) object it it exists +if ( !bOnTable !xGroup.is() ) +{ +// For cell anchored grouped shape we need to set the start +// position from the most top and left positioned shape(s) within +// the group +Point aStartPoint( rShape-getPosition().X,rShape-getPosition().Y ); +awt::Size aSize(rShape-getSize() ); +uno::Reference drawing::XShape xChild( rShapes, uno::UNO_QUERY ); +if (SvxShape* pGroupShapeImp = SvxShape::getImplementation( lcl_getTopLevelParent( xChild ) )) +{ +if (SdrObject *pSdrObj = pGroupShapeImp-GetSdrObject()) +{ +if ( ScDrawObjData* pAnchor = ScDrawLayer::GetObjData( pSdrObj ) ) +{ +if ( pAnchor-maStartOffset.getX() == 0 pAnchor-maStartOffset.getY() == 0 ) +pAnchor-maStartOffset = aStartPoint; + if ( aStartPoint.getX() pAnchor-maStartOffset.getX() ) + pAnchor-maStartOffset.setX( aStartPoint.getX() ); + if ( aStartPoint.getY() pAnchor-maStartOffset.getY() ) + pAnchor-maStartOffset.setY( aStartPoint.getY() ); +} +} +} +} sal_Int16 nAttrCount(xAttrList.is() ? xAttrList-getLength() : 0); sal_Int16 nLayerID(-1); for( sal_Int16 i=0; i nAttrCount; ++i ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xestyle.cxx | 48 - sc/source/filter/inc/xestyle.hxx | 13 -- 2 files changed, 48 insertions(+), 13 deletions(-) New commits: commit ad9f60fc4ccc17b99bd104e4dc1a64bbd7b73132 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Aug 14 22:13:50 2012 +0200 correctly export background colors of cond formats to xlsx Change-Id: I6d4b596ba3d611c8b795d48ca59378c4f4136611 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 0a5de22..13b7d40 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -1885,6 +1885,33 @@ void XclExpCellArea::SaveXml( XclExpXmlStream rStrm ) const rStyleSheet-endElement( XML_fill ); } + +bool XclExpColor::FillFromItemSet( const SfxItemSet rItemSet ) +{ +if( !ScfTools::CheckItem( rItemSet, ATTR_BACKGROUND, true ) ) +return false; + +const SvxBrushItem rBrushItem = GETITEM( rItemSet, SvxBrushItem, ATTR_BACKGROUND ); +maColor = rBrushItem.GetColor(); + +return true; +} + +void XclExpColor::SaveXml( XclExpXmlStream rStrm ) const +{ +sax_fastparser::FSHelperPtr rStyleSheet = rStrm.GetCurrentStream(); +rStyleSheet-startElement( XML_fill, +FSEND ); +rStyleSheet-startElement( XML_patternFill, +FSEND ); +rStyleSheet-singleElement( XML_bgColor, +XML_rgb, XclXmlUtils::ToOString(maColor).getStr(), +FSEND ); + +rStyleSheet-endElement( XML_patternFill ); +rStyleSheet-endElement( XML_fill ); +} + // XclExpXFId::XclExpXFId() : @@ -2902,11 +2929,11 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot rRoot ) pCellProt = NULL; } -XclExpCellArea* pCellArea = new XclExpCellArea; -if(!pCellArea-FillFromItemSet( rSet, GetPalette(), GetBiff() )) +XclExpColor* pColor = new XclExpColor(); +if(!pColor-FillFromItemSet( rSet )) { -delete pCellArea; -pCellArea = NULL; +delete pColor; +pColor = NULL; } XclExpFont* pFont = NULL; @@ -2927,7 +2954,7 @@ XclExpDxfs::XclExpDxfs( const XclExpRoot rRoot ) ++nNumFmtIndex; } -maDxf.push_back(new XclExpDxf( rRoot, pAlign, pBorder, pFont, pNumFormat, pCellProt, pCellArea )); +maDxf.push_back(new XclExpDxf( rRoot, pAlign, pBorder, pFont, pNumFormat, pCellProt, pColor )); ++nIndex; } @@ -2966,16 +2993,15 @@ void XclExpDxfs::SaveXml( XclExpXmlStream rStrm ) // XclExpDxf::XclExpDxf( const XclExpRoot rRoot, XclExpCellAlign* pAlign, XclExpCellBorder* pBorder, -XclExpFont* pFont, XclExpNumFmt* pNumberFmt, XclExpCellProt* pProt, XclExpCellArea* pCellArea) +XclExpFont* pFont, XclExpNumFmt* pNumberFmt, XclExpCellProt* pProt, XclExpColor* pColor) : XclExpRoot( rRoot ), mpAlign(pAlign), mpBorder(pBorder), mpFont(pFont), mpNumberFmt(pNumberFmt), mpProt(pProt), -mpCellArea(pCellArea) +mpColor(pColor) { - } XclExpDxf::~XclExpDxf() @@ -2985,7 +3011,7 @@ XclExpDxf::~XclExpDxf() delete mpFont; delete mpNumberFmt; delete mpProt; -delete mpCellArea; +delete mpColor; } void XclExpDxf::SaveXml( XclExpXmlStream rStrm ) @@ -3003,8 +3029,8 @@ void XclExpDxf::SaveXml( XclExpXmlStream rStrm ) mpNumberFmt-SaveXml(rStrm); if (mpProt) mpProt-SaveXml(rStrm); -if (mpCellArea) -mpCellArea-SaveXml(rStrm); +if (mpColor) +mpColor-SaveXml(rStrm); rStyleSheet-endElement( XML_dxf ); } diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index ba7dc67..a255b98 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -427,6 +427,15 @@ struct XclExpCellArea : public XclCellArea voidSaveXml( XclExpXmlStream rStrm ) const; }; +struct XclExpColor +{ +Color maColor; + +bool FillFromItemSet( const SfxItemSet rItemSet ); + +void SaveXml( XclExpXmlStream rStrm ) const; +}; + // /** A combination of unique XF identifier with real Excel XF index. */ @@ -733,7 +742,7 @@ class XclExpDxf : public XclExpRecordBase, protected XclExpRoot { public: XclExpDxf( const XclExpRoot rRoot, XclExpCellAlign* pAlign, XclExpCellBorder* pBorder,
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/oox/workbookhelper.cxx | 12 1 file changed, 8 insertions(+), 4 deletions(-) New commits: commit 0eeab7204ac244bebb0f8c4d8a8891037423534a Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Mon Aug 13 17:08:57 2012 -0400 fdo#53456: initialize pivot tables *after* the formula cells. Or else all the formula cells within pivot table's source ranges would be treated as if they are empty. (cherry picked from commit ae296a60781a2b5d5b7523cbda3444e3dd21506f) Signed-off-by: Eike Rathke er...@redhat.com Conflicts: sc/source/filter/oox/workbookhelper.cxx Change-Id: Ib04f4902863b091c483711eeaf31a282f6feaf67 diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index e8df821..071b9a6 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -590,9 +590,17 @@ void WorkbookGlobals::finalize() aPropSet.setProperty( PROP_IsExecuteLinkEnabled, true ); // #i79826# enable updating automatic row height after loading the document aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); + getFormulaBuffer().finalizeImport(); + // hack, setting it true the second time will delete the cache aPropSet.setProperty( PROP_IsAdjustHeightEnabled, true ); + +// Insert all pivot tables. Must be done after loading all sheets and +// formulas, because data pilots expect existing source data on +// creation. +getPivotTables().finalizeImport(); + // #i76026# enable Undo after loading the document aPropSet.setProperty( PROP_IsUndoEnabled, true ); // disable editing read-only documents (e.g. from read-only files) @@ -659,10 +667,6 @@ void WorkbookHelper::finalizeWorkbookImport() mrBookGlob.getWorkbookSettings().finalizeImport(); mrBookGlob.getViewSettings().finalizeImport(); -/* Insert all pivot tables. Must be done after loading all sheets, because -data pilots expect existing source data on creation. */ -mrBookGlob.getPivotTables().finalizeImport(); - /* Insert scenarios after all sheet processing is done, because new hidden sheets are created for scenarios which would confuse code that relies on certain sheet indexes. Must be done after pivot tables too. */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/src/condformatdlg.src | 56 ++--- 1 file changed, 28 insertions(+), 28 deletions(-) New commits: commit cc304dc643813184fb1eb4b0975749deb51779d6 Author: Jean-Baptiste FAURE jbf.fa...@orange.fr Date: Tue Jul 31 10:03:16 2012 +0200 vertically align and enlarge fields in cond.formatting dialog add more room in several fields: usefull for FR translation reorder the code by levels/lines in the dialog Change-Id: I2c4cbaf926ade87b35a5900ab5461477e0157822 Signed-off-by: Petr Mladek pmla...@suse.cz diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src index 174da1f..12d4ef9 100644 --- a/sc/source/ui/src/condformatdlg.src +++ b/sc/source/ui/src/condformatdlg.src @@ -95,7 +95,7 @@ Control RID_COND_ENTRY ListBox LB_TYPE { Pos = MAP_APPFONT( 5, 15 ); -Size = MAP_APPFONT( 60, 40 ); +Size = MAP_APPFONT( 80, 40 ); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = @@ -107,7 +107,7 @@ Control RID_COND_ENTRY }; ListBox LB_CELLIS_TYPE { -Pos = MAP_APPFONT( 70, 15 ); +Pos = MAP_APPFONT( 90, 15 ); Size = MAP_APPFONT( 80, 40 ); Border = TRUE; DropDown = TRUE; @@ -125,52 +125,52 @@ Control RID_COND_ENTRY not duplicate; }; }; -FixedText FT_STYLE -{ -Pos = MAP_APPFONT( 10, 32 ); -Size = MAP_APPFONT( 35, 14 ); -Text [ en-US ] = Apply Style; -}; Edit ED_VAL1 { -Pos = MAP_APPFONT( 155, 15 ); +Pos = MAP_APPFONT( 175, 15 ); Size = MAP_APPFONT( 50, 12 ); Border = TRUE; }; Edit ED_VAL2 { -Pos = MAP_APPFONT( 210, 15 ); +Pos = MAP_APPFONT( 230, 15 ); Size = MAP_APPFONT( 50, 12 ); Border = TRUE; }; -ListBox LB_STYLE +ListBox LB_COLOR_FORMAT { -Pos = MAP_APPFONT( 50, 32 ); -Size = MAP_APPFONT( 50, 80 ); +Pos = MAP_APPFONT( 100, 15 ); +Size = MAP_APPFONT( 100, 60); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = { -New Style...; +Color Scale (2 Entries); +Color Scale (3 Entries); +Data Bar; }; }; -ListBox LB_COLOR_FORMAT +FixedText FT_STYLE { -Pos = MAP_APPFONT( 70, 15 ); -Size = MAP_APPFONT( 80, 60); +Pos = MAP_APPFONT( 5, 32 ); +Size = MAP_APPFONT( 50, 14 ); +Text [ en-US ] = Apply Style; +}; +ListBox LB_STYLE +{ +Pos = MAP_APPFONT( 90, 32 ); +Size = MAP_APPFONT( 80, 80 ); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = { -Color Scale (2 Entries); -Color Scale (3 Entries); -Data Bar; +New Style...; }; }; ListBox LB_TYPE_COL_SCALE { Pos = MAP_APPFONT( 5, 32 ); -Size = MAP_APPFONT( 60, 60 ); +Size = MAP_APPFONT( 80, 60 ); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = @@ -183,17 +183,17 @@ Control RID_COND_ENTRY Formula; }; }; -Edit ED_COL_SCALE +Window WD_PREVIEW { -Pos = MAP_APPFONT( 5, 48 ); -Size = MAP_APPFONT( 60, 12 ); +Pos = MAP_APPFONT( 175, 32 ); +Size = MAP_APPFONT( 105, 14 ); +Text [ en-US ] = Example; Border = TRUE; }; -Window WD_PREVIEW +Edit ED_COL_SCALE { -Pos = MAP_APPFONT( 150, 32 ); -Size = MAP_APPFONT( 60, 14 ); -Text [ en-US ] = Example; +Pos = MAP_APPFONT( 5, 48 ); +Size = MAP_APPFONT( 60, 12 ); Border = TRUE; }; ListBox LB_COL ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/conditio.cxx | 13 + sc/source/core/tool/rangelst.cxx | 31 +++ 2 files changed, 44 insertions(+) New commits: commit 73a465ed443e820974600ee291e21ed6413ecb9d Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Tue Jul 24 08:54:58 2012 +0200 delete conditional format entries that are removed, fdo#52351 Change-Id: I9ab70d2b7a557ae5f717898edfb6c363343462f6 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com Signed-off-by: Stephan Bergmann sberg...@redhat.com diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx index a5ed065..97ffd61 100644 --- a/sc/source/core/data/conditio.cxx +++ b/sc/source/core/data/conditio.cxx @@ -1650,6 +1650,19 @@ void ScConditionalFormatList::UpdateReference( UpdateRefMode eUpdateRefMode, { for( iterator itr = begin(); itr != end(); ++itr) itr-UpdateReference( eUpdateRefMode, rRange, nDx, nDy, nDz ); + +if( eUpdateRefMode == URM_INSDEL ) +{ +// need to check which must be deleted +iterator itr = begin(); +while(itr != end()) +{ +if(itr-GetRange().empty()) +maConditionalFormats.erase(itr++); +else +++itr; +} +} } void ScConditionalFormatList::RenameCellStyle( const String rOld, const String rNew ) diff --git a/sc/source/core/tool/rangelst.cxx b/sc/source/core/tool/rangelst.cxx index 16f9eca..88f9727 100644 --- a/sc/source/core/tool/rangelst.cxx +++ b/sc/source/core/tool/rangelst.cxx @@ -150,6 +150,29 @@ private: bool mbFirst; }; +class FindDeletedRange : public ::std::unary_functionconst ScRange*, bool +{ +public: +FindDeletedRange( SCsCOL nDx, SCsROW nDy): mnDx(nDx), mnDy(nDy) {} +FindDeletedRange( const FindDeletedRange r) : mnDx(r.mnDx), mnDy(r.mnDy) {} +bool operator() (const ScRange* p) +{ +ScAddress rStart = p-aStart; +ScAddress rEnd = p-aEnd; + +if( rEnd.Col() +mnDx rStart.Col() ) +return true; +if( rEnd.Row() + mnDy rStart.Row() ) +return true; + +return false; +} + +private: +SCsCOL mnDx; +SCsROW mnDy; +}; + } // === ScRangeList @@ -384,6 +407,14 @@ bool ScRangeList::UpdateReference( SCTAB nTab2; rWhere.GetVars( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 ); +// delete all entries that are fully deleted +if( eUpdateRefMode == URM_INSDEL (nDx 0 || nDy 0) ) +{ +vectorScRange*::iterator itr = std::remove_if(maRanges.begin(), maRanges.end(), FindDeletedRange(nDx, nDy)); +for_each(itr, maRanges.end(), ScDeleteObjectByPtrScRange()); +maRanges.erase(itr, maRanges.end()); +} + vectorScRange*::iterator itr = maRanges.begin(), itrEnd = maRanges.end(); for (; itr != itrEnd; ++itr) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlcondformat.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 38d7b11915c9c4e5fcebcb7eb3ae1b2846b26267 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Aug 5 11:47:19 2012 +0200 use correct string length for between, fdo#53010 Change-Id: I282c6a4436984d268b107ffef01022831c05a0fa Signed-off-by: LuboÅ¡ LuÅák l.lu...@suse.cz diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index ed9bc49..a8a47f1 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -313,7 +313,7 @@ void GetConditionData(const rtl::OUString rValue, ScConditionMode eMode, rtl:: else if(rValue.indexOf(between) == 0) { const sal_Unicode* pStr = rValue.getStr(); -const sal_Unicode* pStart = pStr + 7; +const sal_Unicode* pStart = pStr + 8; const sal_Unicode* pEnd = pStr + rValue.getLength(); rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ','); rExpr2 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/excdoc.cxx |8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) New commits: commit a59370800d91d7fd150a914341d5ad1ede6e072d Author: Noel Power noel.po...@novell.com Date: Thu Aug 2 19:24:00 2012 +0100 new fix for fdo#52998 Change-Id: Icc5e90ac40056430bfbe36d8da1aaad8716cfee9 (cherry picked from commit 00f1a3ed8ec17b8274a7bf3ee8f5d394a8a16bab) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index 9b11a18..964d6b1 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -514,7 +514,7 @@ void ExcTable::FillAsTable( SCTAB nCodeNameIdx ) } // list of NOTE records, generated by the cell table -aRecList.AppendRecord( mxCellTable-CreateRecord( EXC_ID_NOTE ) ); +aRecList.AppendRecord( mxNoteList ); // sheet view settings: WINDOW2, SCL, PANE, SELECTION aRecList.AppendNewRecord( new XclExpTabViewSettings( GetRoot(), mnScTab ) ); @@ -593,10 +593,8 @@ void ExcTable::FillAsXmlTable( SCTAB nCodeNameIdx ) aRecList.AppendRecord( GetPivotTableManager().CreatePivotTablesRecord( mnScTab ) ); // list of NOTE records, generated by the cell table -XclExpRecordRef xNotes = mxCellTable-CreateRecord( EXC_ID_NOTE ); -XclExpRecordList XclExpNote * xNoteList = dynamic_cast XclExpRecordList XclExpNote * ( xNotes.get() ); -if( xNoteList != NULL !xNoteList-IsEmpty() ) -aRecList.AppendNewRecord( new XclExpComments( mnScTab, *xNoteList ) ); +if( mxNoteList != NULL !mxNoteList-IsEmpty() ) +aRecList.AppendNewRecord( new XclExpComments( mnScTab, *mxNoteList ) ); // web queries Add( new XclExpWebQueryBuffer( GetRoot() ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/dbgui/csvgrid.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 9229d932de3bd406c58246293f7a12a88e19861c Author: Eike Rathke er...@redhat.com Date: Wed Aug 1 13:46:25 2012 +0200 resolved fdo#53012 crash in CSV fixed width import 8cd05e9cf1152b21528c6f1a5bda3d949dc49791 changed from using String to OUString. ScCsvGrid::ImplSetTextLineFix() attempted to copy excess characters (always CSV_MAXSTRLEN if greater than field width) where String::Copy() silently ignored the excess length but OUString::copy() may result in invalid memory accesses and asserts in dbgutil build. Change-Id: Ic9f7f38d6f2bbd770d6356e1304de8e39c09e30b Signed-off-by: Michael Meeks michael.me...@suse.com diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 68c6fd9..280d77e 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -809,7 +809,8 @@ void ScCsvGrid::ImplSetTextLineFix( sal_Int32 nLine, const rtl::OUString rTextL for( sal_uInt32 nColIx = 0; (nColIx nColCount) (nStrIx nStrLen); ++nColIx ) { sal_Int32 nColWidth = GetColumnWidth( nColIx ); -rStrVec.push_back( rTextLine.copy( nStrIx, Max( nColWidth, static_castsal_Int32(CSV_MAXSTRLEN) ) ) ); +sal_Int32 nLen = std::min( std::min( nColWidth, static_castsal_Int32(CSV_MAXSTRLEN) ), nStrLen - nStrIx); +rStrVec.push_back( rTextLine.copy( nStrIx, nLen ) ); nStrIx = nStrIx + nColWidth; } InvalidateGfx(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8ac1d7cc1d825e53d42aac699b077ffddb9c8769 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Jul 22 21:15:37 2012 +0200 use correct source table for cond format paste, fdo#52340 Change-Id: I7c4cb1a5f31ba9e37a280af2243a13c57914cb2f (cherry picked from commit 669784c6653732fd2ad43024332957d5df5652bb) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index 18dfda4..9dd2afb 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -658,7 +658,7 @@ void ScTable::CopyConditionalFormat( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCRO ScConditionalFormatList* pOldCondFormatList = pTable-mpCondFormatList.get(); for(SCCOL i = nCol1; i = nCol2; ++i) { -ScAttrIterator* pIter = aCol[i-nDx].CreateAttrIterator( nRow1-nDy, nRow2-nDy ); +ScAttrIterator* pIter = pTable-aCol[i-nDx].CreateAttrIterator( nRow1-nDy, nRow2-nDy ); SCROW nStartRow = 0, nEndRow = 0; const ScPatternAttr* pPattern = pIter-Next( nStartRow, nEndRow ); sal_uInt32 nId = ((SfxUInt32Item)pPattern-GetItem(ATTR_CONDITIONAL)).GetValue(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/docshell/impex.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6945d1eb7666f90b6b356f97d368c87664c77d88 Author: Eike Rathke er...@redhat.com Date: Thu Jul 19 18:10:49 2012 +0200 resolved fdo#52205 do not force all text cells in CSV import Do not set ScSetStringParam::mbSetTextCellFormat=true for SetString() that slightly changed behavior, the nColFormat==SC_COL_TEXT case is handled separately anyway. Change-Id: I0a0f9472801dcb02af77d6eaf90170309a41e9a8 Signed-off-by: Kohei Yoshida kohei.yosh...@gmail.com diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index e98c67b..50333f8 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -1227,7 +1227,7 @@ static bool lcl_PutString( ScSetStringParam aParam; aParam.mpNumFormatter = pFormatter; aParam.mbDetectNumberFormat = bDetectNumFormat; -aParam.mbSetTextCellFormat = true; +aParam.mbSetTextCellFormat = false; aParam.mbHandleApostrophe = false; pDoc-SetString( nCol, nRow, nTab, rStr, aParam ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/table3.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 92dd63864142ad4d124d43accc111489fe6cda12 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Mon Jul 16 08:43:24 2012 +0200 correct but ugly fix for i#118877 This fix is better than the AOO patch and does not require direct ref count manipulation but still feels dirty. Change-Id: I1f37bc4c72f668fec229b874cfa1ea5e9ab9153e (cherry picked from commit ab9b5639b23ab5db93357bd076b65adea1b6e8b6) Signed-off-by: Eike Rathke er...@redhat.com diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 85354f3..ea49b05 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -60,6 +60,7 @@ #include queryentry.hxx #include segmenttree.hxx #include subtotalparam.hxx +#include docpool.hxx #include vector #include boost/unordered_set.hpp @@ -571,8 +572,10 @@ void ScTable::SwapCol(SCCOL nCol1, SCCOL nCol2) const ScPatternAttr* pPat2 = GetPattern(nCol2, nRow); if (pPat1 != pPat2) { +pDocument-GetPool()-Put(*pPat1); SetPattern(nCol1, nRow, *pPat2, true); SetPattern(nCol2, nRow, *pPat1, true); +pDocument-GetPool()-Remove(*pPat1); } } } @@ -623,8 +626,10 @@ void ScTable::SwapRow(SCROW nRow1, SCROW nRow2) const ScPatternAttr* pPat2 = GetPattern(nCol, nRow2); if (pPat1 != pPat2) { +pDocument-GetPool()-Put(*pPat1); SetPattern(nCol, nRow1, *pPat2, true); SetPattern(nCol, nRow2, *pPat1, true); +pDocument-GetPool()-Remove(*pPat1); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/navipi/content.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 409ac385ad29bec0167c3b6f6119b24d4f5409bf Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Jul 12 09:03:37 2012 +0200 show comments in the navigator, fdo#51859 Change-Id: I967ce4765fdb85263eea4cea5a8728470b32ad82 Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 0e4d4ac..4f3adde 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -879,7 +879,7 @@ void ScContentTree::GetNoteStrings() ScNotes::iterator itrEnd = pDoc-GetNotes(nTab)-end(); for (; itr != itrEnd; ++itr) { -//TODO: moggi +InsertContent(SC_CONTENT_NOTE, lcl_NoteString(*itr-second)); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/html/htmlpars.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 02e0c1b0e8e0b798694445bfa84383dd8d44216a Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sun Jul 15 03:42:27 2012 +0200 prevent double delete in calc's html parser, fdo#52107 Change-Id: I0a203a39697d3b12304e4b9dc99714cd7b2a008c (cherry picked from commit 0d21d9ddbe0561f45419ae4fc376c312565b413b) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index 6395fb6..0566f66 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -554,6 +554,7 @@ void ScHTMLLayoutParser::Adjust() nCurRow = pS-nCurRow; } delete pS; +pS = NULL; nTab = pE-nTab; if (pTables) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/inc/datafdlg.hxx | 13 +++-- sc/source/ui/miscdlgs/datafdlg.cxx | 17 +++-- sc/source/ui/src/datafdlg.src | 36 +--- 3 files changed, 35 insertions(+), 31 deletions(-) New commits: commit e535c1f6d4d14c27b8d963758184b2fd025d10a9 Author: Andras Timar ati...@suse.com Date: Sun Jul 15 21:18:42 2012 +0200 fdo#47947 Data Form dialog layout fix Change-Id: Ifa1689ff9be7afa14f5694825c506f7c8c3eff43 (cherry picked from commit c61e3c941d46fe1ae6066f31e01786100e39da56) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index bfa3769..6f41ddb 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -43,12 +43,13 @@ #define MAX_DATAFORM_COLS 256 #define MAX_DATAFORM_ROWS 32000 -#define CTRL_HEIGHT 22 -#define FIXED_WIDTH 60 -#define EDIT_WIDTH 140 -#define FIXED_LEFT 12 -#define EDIT_LEFT 78 -#define LINE_HEIGHT 30 +#define FIXED_WIDTH 54 +#define EDIT_WIDTH 86 +#define FIXED_HEIGHT10 +#define EDIT_HEIGHT 12 +#define FIXED_LEFT 6 +#define EDIT_LEFT 62 +#define LINE_HEIGHT 16 //zhangyun class ScDataFormDlg : public ModalDialog diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 9f0f318..d87d552 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -163,10 +163,15 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri String aFieldName; -int nTop = 12; +//align with LAB_DATAFORM_RECORDNO +int nTop = LogicToPixel( Size(1,6), MapMode(MAP_APPFONT) ).getHeight(); +const int nOne = LogicToPixel( Size(1,1), MapMode(MAP_APPFONT) ).getHeight(); +const int nLineHeight = LogicToPixel( Size(1, LINE_HEIGHT), MapMode(MAP_APPFONT) ).getHeight(); +const int nFixedLeft = LogicToPixel( Size(FIXED_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth(); +const int nEditLeft = LogicToPixel( Size(EDIT_LEFT, 1), MapMode(MAP_APPFONT) ).getWidth(); -SizenFixedSize(FIXED_WIDTH, CTRL_HEIGHT ); -SizenEditSize(EDIT_WIDTH, CTRL_HEIGHT ); +SizenFixedSize(LogicToPixel( Size(FIXED_WIDTH, FIXED_HEIGHT), MapMode(MAP_APPFONT) )); +SizenEditSize(LogicToPixel( Size(EDIT_WIDTH, EDIT_HEIGHT), MapMode(MAP_APPFONT) )); aColLength = nEndCol - nStartCol + 1; @@ -185,13 +190,13 @@ ScDataFormDlg::ScDataFormDlg( Window* pParent, ScTabViewShell* pTabViewShellOri maFixedTexts[nIndex].SetSizePixel(nFixedSize); maEdits[nIndex].SetSizePixel(nEditSize); -maFixedTexts[nIndex].SetPosPixel(Point(FIXED_LEFT, nTop)); -maEdits[nIndex].SetPosPixel(Point(EDIT_LEFT, nTop)); +maFixedTexts[nIndex].SetPosPixel(Point(nFixedLeft, nTop + nOne)); +maEdits[nIndex].SetPosPixel(Point(nEditLeft, nTop)); maFixedTexts[nIndex].SetText(aFieldName); maFixedTexts[nIndex].Show(); maEdits[nIndex].Show(); -nTop += LINE_HEIGHT; +nTop += nLineHeight; } else { diff --git a/sc/source/ui/src/datafdlg.src b/sc/source/ui/src/datafdlg.src index 5c0ee6d..0b6d01f 100644 --- a/sc/source/ui/src/datafdlg.src +++ b/sc/source/ui/src/datafdlg.src @@ -26,67 +26,66 @@ */ #include datafdlg.hrc -//zhangyun, dataform ModalDialog RID_SCDLG_DATAFORM { OutputSize = TRUE ; SVLook = TRUE ; -Size = MAP_APPFONT ( 191 , 180 ) ; +Size = MAP_APPFONT ( 257 , 180 ) ; Text [ en-US ] = Data Form ; Moveable = TRUE ; Closeable = TRUE ; FixedText LAB_DATAFORM_RECORDNO { -Pos = MAP_APPFONT ( 136 , 6 ) ; -Size = MAP_APPFONT ( 50 , 12 ) ; -Text [ en-US ] = / ; +Pos = MAP_APPFONT ( 162 , 6 ) ; +Size = MAP_APPFONT ( 60 , 12 ) ; +Text = / ; //placeholder only }; PushButton BTN_DATAFORM_NEW { -Pos = MAP_APPFONT ( 135 , 23 ) ; -Size = MAP_APPFONT ( 50 , 14 ) ; +Pos = MAP_APPFONT ( 161 , 23 ) ; +Size = MAP_APPFONT ( 90 , 14 ) ; TabStop = TRUE ; DefButton = TRUE ; Text [ en-US ] = New ; }; PushButton BTN_DATAFORM_DELETE { -Pos = MAP_APPFONT ( 135 , 40 ) ; -Size = MAP_APPFONT ( 50 , 14 ) ; +Pos = MAP_APPFONT ( 161 , 40 ) ; +Size = MAP_APPFONT ( 90 , 14 ) ; TabStop = TRUE ; Text [ en-US ] = Delete ; }; PushButton BTN_DATAFORM_RESTORE { -Pos = MAP_APPFONT ( 135 , 57 ) ; -Size = MAP_APPFONT ( 50 , 14 ) ; +Pos = MAP_APPFONT ( 161 , 57 ) ; +Size = MAP_APPFONT ( 90 , 14 ) ; TabStop
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/src/optsolver.src | 84 - 1 file changed, 42 insertions(+), 42 deletions(-) New commits: commit 7502b75aa9c6410753c92464693be1bccb3ab0f1 Author: Andras Timar ati...@suse.com Date: Thu Jul 12 15:01:26 2012 +0200 fdo#35953 resize controls on Solver dialog of Calc Change-Id: Ia1130d241f6c01079449e670e26054bbc1a798ea (cherry picked from commit 7444b258df32638876257bab588f8d3513602781) Signed-off-by: Caolán McNamara caol...@redhat.com diff --git a/sc/source/ui/src/optsolver.src b/sc/source/ui/src/optsolver.src index e5954f5..1b8e600 100644 --- a/sc/source/ui/src/optsolver.src +++ b/sc/source/ui/src/optsolver.src @@ -33,7 +33,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER HelpId = CMD_SID_OPENDLG_OPTSOLVER ; Hide = TRUE ; SVLook = TRUE ; -Size = MAP_APPFONT ( 230 , 210 ) ; +Size = MAP_APPFONT ( 250 , 210 ) ; Text [ en-US ] = Solver ; Moveable = TRUE ; Closeable = FALSE ; @@ -48,14 +48,14 @@ ModelessDialog RID_SCDLG_OPTSOLVER { HelpID = sc:Edit:RID_SCDLG_OPTSOLVER:ED_OBJECTIVECELL; Border = TRUE ; -Pos = MAP_APPFONT ( 67 , 6 ) ; +Pos = MAP_APPFONT ( 87 , 6 ) ; Size = MAP_APPFONT ( 130 , 12 ) ; TabStop = TRUE ; }; ImageButton IB_OBJECTIVECELL { HelpID = sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_OBJECTIVECELL; -Pos = MAP_APPFONT ( 199 , 5 ) ; +Pos = MAP_APPFONT ( 219 , 5 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = FALSE ; QuickHelpText [ en-US ] = Shrink ; @@ -64,13 +64,13 @@ ModelessDialog RID_SCDLG_OPTSOLVER FixedText FT_DIRECTION { Pos = MAP_APPFONT ( 6 , 24 ) ; -Size = MAP_APPFONT ( 59 , 8 ) ; +Size = MAP_APPFONT ( 79 , 8 ) ; Text [ en-US ] = Optimize result to ; }; RadioButton RB_MAX { HelpID = sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MAX; -Pos = MAP_APPFONT ( 67 , 24 ) ; +Pos = MAP_APPFONT ( 87 , 24 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = Maximum ; TabStop = TRUE ; @@ -78,7 +78,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER RadioButton RB_MIN { HelpID = sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_MIN; -Pos = MAP_APPFONT ( 67 , 38 ) ; +Pos = MAP_APPFONT ( 87 , 38 ) ; Size = MAP_APPFONT ( 50 , 10 ) ; Text [ en-US ] = Minimum ; TabStop = TRUE ; @@ -86,7 +86,7 @@ ModelessDialog RID_SCDLG_OPTSOLVER RadioButton RB_VALUE { HelpID = sc:RadioButton:RID_SCDLG_OPTSOLVER:RB_VALUE; -Pos = MAP_APPFONT ( 67 , 52 ) ; +Pos = MAP_APPFONT ( 87 , 52 ) ; Size = MAP_APPFONT ( 59 , 10 ) ; Text [ en-US ] = Value of ; TabStop = TRUE ; @@ -95,14 +95,14 @@ ModelessDialog RID_SCDLG_OPTSOLVER { HelpID = sc:Edit:RID_SCDLG_OPTSOLVER:ED_TARGET; Border = TRUE ; -Pos = MAP_APPFONT ( 128 , 50 ) ; +Pos = MAP_APPFONT ( 148 , 50 ) ; Size = MAP_APPFONT ( 69 , 12 ) ; TabStop = TRUE ; }; ImageButton IB_TARGET { HelpID = sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_TARGET; -Pos = MAP_APPFONT ( 199 , 49 ) ; +Pos = MAP_APPFONT ( 219 , 49 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = FALSE ; QuickHelpText [ en-US ] = Shrink ; @@ -111,21 +111,21 @@ ModelessDialog RID_SCDLG_OPTSOLVER FixedText FT_VARIABLECELLS { Pos = MAP_APPFONT ( 6 , 68 ) ; -Size = MAP_APPFONT ( 59 , 8 ) ; +Size = MAP_APPFONT ( 79 , 8 ) ; Text [ en-US ] = By changing cells ; }; Edit ED_VARIABLECELLS { HelpID = sc:Edit:RID_SCDLG_OPTSOLVER:ED_VARIABLECELLS; Border = TRUE ; -Pos = MAP_APPFONT ( 67 , 66 ) ; +Pos = MAP_APPFONT ( 87 , 66 ) ; Size = MAP_APPFONT ( 130 , 12 ) ; TabStop = TRUE ; }; ImageButton IB_VARIABLECELLS { HelpID = sc:ImageButton:RID_SCDLG_OPTSOLVER:IB_VARIABLECELLS; -Pos = MAP_APPFONT ( 199 , 65 ) ; +Pos = MAP_APPFONT ( 219 , 65 ) ; Size = MAP_APPFONT ( 13 , 15 ) ; TabStop = FALSE ; QuickHelpText [ en-US ] = Shrink ; @@ -146,13 +146,13 @@ ModelessDialog RID_SCDLG_OPTSOLVER }; FixedText FT_OPERATOR { -Pos = MAP_APPFONT ( 84 , 102 ) ; +Pos = MAP_APPFONT ( 104 , 102 ) ; Size = MAP_APPFONT ( 38 , 8 ) ; Text [ en-US ] = Operator ; }; FixedText FT_CONSTRAINT { -Pos = MAP_APPFONT ( 128 , 102 ) ; +Pos = MAP_APPFONT ( 148 , 102 ) ; Size = MAP_APPFONT ( 70 , 8 ) ; Text [ en-US ] = Value ; }; @@ -162,13 +162,13 @@ ModelessDialog RID_SCDLG_OPTSOLVER HelpID = sc:Edit:RID_SCDLG_OPTSOLVER:ED_LEFT1; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 114 ) ; -Size = MAP_APPFONT ( 53 , 12 ) ; +Size =
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/unoobj/docuno.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 34314ec5eaf7d7ac42f902b91e334fae22300c8b Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Thu Jul 12 00:09:03 2012 -0400 fdo#51852: Temporary, band-aid fix. Eventually, once we re-work ODS's style import to get it to populate ScDocument directly, we don't need this IsImportingXML() ugly-hack. Until then, we'll need this. Change-Id: Ic2abf7c375d6c49a286544551e45734bef2dc03a diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 2220e2d..41f10ea 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -3222,8 +3222,16 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( { sal_Int32 nNewHeight = 0; if ( aValue = nNewHeight ) -rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, -(sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True ); +{ +if (pDoc-IsImportingXML()) +// TODO: This is a band-aid fix. Eventually we need to +// re-work ods' style import to get it to set styles to +// ScDocument directly. +pDoc-SetRowHeightOnly( nStartRow, nEndRow, nTab, (sal_uInt16)HMMToTwips(nNewHeight) ); +else +rFunc.SetWidthOrHeight( false, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, +(sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True ); +} } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/dbgui/filtdlg.cxx | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) New commits: commit eba3ef8ca5699346572479749c5e4ff5bdd12cae Author: Eike Rathke er...@redhat.com Date: Mon Jul 9 18:31:30 2012 +0200 resolved rhbz#838248 init filter criteria string In ScFilterDlg::Init() the string displayed as criteria was empty if query is ByValue or ByDate. From earlier times the dialog assumed that the query string was always set corresponding to the value, but internal handling was changed. Change-Id: I4f10654f4015b38f7ddba9d6727e06806f1d6b77 diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 4ee8bf6..bca0660 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -317,7 +317,31 @@ void ScFilterDlg::Init( const SfxItemSet rArgSet ) maCondLbArr[i]-Disable(); } else -aValStr = rItem.maString; +{ +if (rItem.maString.isEmpty()) +{ +if (rItem.meType == ScQueryEntry::ByValue) +pDoc-GetFormatTable()-GetInputLineString( rItem.mfVal, 0, aValStr); +else if (rItem.meType == ScQueryEntry::ByDate) +{ +SvNumberFormatter* pFormatter = pDoc-GetFormatTable(); +pFormatter-GetInputLineString( rItem.mfVal, +pFormatter-GetStandardFormat( NUMBERFORMAT_DATE), aValStr); +} +else +{ +SAL_WARN( sc, ScFilterDlg::Init: empty query string, really?); +aValStr = rItem.maString; +} +} +else +{ +// XXX NOTE: if not ByString we just assume this has been +// set to a proper string corresponding to the numeric +// value earlier! +aValStr = rItem.maString; +} +} } else if ( i == 0 ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/condformat/condformatdlg.cxx | 19 +++ sc/source/ui/src/condformatdlg.src| 10 +- 2 files changed, 16 insertions(+), 13 deletions(-) New commits: commit 1259cee4111a6b8f66d8583166c2ff9f3fc4d80d Author: Andras Timar ati...@suse.com Date: Sun Jul 8 20:26:38 2012 +0200 fix a few layout problems in Conditional Formatting dialog Absolute pixel coordinates should not be used, because we work with font size dependent relative coordinates all over the place. Layout on Linux was OK, but controls were positioned partially outside the visible area on Windows. Change-Id: Iee417f57135ada7ea9cb73726c56f96b3154e0b8 diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 79a111d..9ba146d 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -320,12 +320,12 @@ void ScCondFrmtEntry::Init() Point aPointCol = maLbColMiddle.GetPosPixel(); Point aPointEdDataBar = maEdDataBarMin.GetPosPixel(); Point aPointLbDataBar = maLbDataBarMaxType.GetPosPixel(); -const long nMovePos = 250; +const long nMovePos = maLbEntryTypeMiddle.GetSizePixel().Width() * 1.2; aPointLb.X() += nMovePos; aPointEd.X() += nMovePos; aPointCol.X() += nMovePos; -aPointEdDataBar.X() += 1.5*nMovePos; -aPointLbDataBar.X() += 1.5*nMovePos; +aPointEdDataBar.X() += 2*nMovePos; +aPointLbDataBar.X() += 2*nMovePos; maLbEntryTypeMiddle.SetPosPixel(aPointLb); maEdMiddle.SetPosPixel(aPointEd); maLbColMiddle.SetPosPixel(aPointCol); @@ -444,6 +444,10 @@ void ScCondFrmtEntry::HideCondElements() void ScCondFrmtEntry::SetCondType() { +maEdVal1.SetSizePixel(maEdVal2.GetSizePixel()); +Point aPoint(maLbCondType.GetPosPixel().X() + maLbCondType.GetSizePixel().Width() + LogicToPixel(Size(5,1), MapMode(MAP_APPFONT)).getWidth(), +maEdVal1.GetPosPixel().Y()); +maEdVal1.SetPosPixel(aPoint); maEdVal1.Show(); maEdVal2.Show(); maLbStyle.Show(); @@ -562,6 +566,10 @@ void ScCondFrmtEntry::SetFormulaType() SwitchToType(FORMULA); HideColorScaleElements(); HideDataBarElements(); +maEdVal1.SetPosPixel(maLbCondType.GetPosPixel()); +Size aSize(maEdVal2.GetPosPixel().X() + maEdVal2.GetSizePixel().Width() - maLbCondType.GetPosPixel().X(), maEdVal1.GetSizePixel().Height()); +maEdVal1.SetPosPixel(maLbCondType.GetPosPixel()); +maEdVal1.SetSizePixel(aSize); maEdVal1.Show(); maEdVal2.Hide(); maLbCondType.Hide(); @@ -569,8 +577,6 @@ void ScCondFrmtEntry::SetFormulaType() maFtCondition.Show(); maWdPreview.Show(); maFtStyle.Show(); -Size aSize(440, 30); -maEdVal1.SetSizePixel(aSize); } void ScCondFrmtEntry::Select() @@ -894,14 +900,11 @@ IMPL_LINK_NOARG( ScCondFrmtEntry, ConditionTypeSelectHdl ) { if(maLbCondType.GetSelectEntryPos() == 6 || maLbCondType.GetSelectEntryPos() == 7) { -maEdVal1.SetSizePixel(maEdVal2.GetSizePixel()); maEdVal2.Show(); } else { maEdVal2.Hide(); -Size aSize(440, 30); -maEdVal1.SetSizePixel(aSize); } return 0; } diff --git a/sc/source/ui/src/condformatdlg.src b/sc/source/ui/src/condformatdlg.src index ebf84f3..174da1f 100644 --- a/sc/source/ui/src/condformatdlg.src +++ b/sc/source/ui/src/condformatdlg.src @@ -108,7 +108,7 @@ Control RID_COND_ENTRY ListBox LB_CELLIS_TYPE { Pos = MAP_APPFONT( 70, 15 ); -Size = MAP_APPFONT( 50, 40 ); +Size = MAP_APPFONT( 80, 40 ); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = @@ -133,14 +133,14 @@ Control RID_COND_ENTRY }; Edit ED_VAL1 { -Pos = MAP_APPFONT( 125, 15 ); -Size = MAP_APPFONT( 160, 12 ); +Pos = MAP_APPFONT( 155, 15 ); +Size = MAP_APPFONT( 50, 12 ); Border = TRUE; }; Edit ED_VAL2 { Pos = MAP_APPFONT( 210, 15 ); -Size = MAP_APPFONT( 75, 12 ); +Size = MAP_APPFONT( 50, 12 ); Border = TRUE; }; ListBox LB_STYLE @@ -157,7 +157,7 @@ Control RID_COND_ENTRY ListBox LB_COLOR_FORMAT { Pos = MAP_APPFONT( 70, 15 ); -Size = MAP_APPFONT( 60, 60); +Size = MAP_APPFONT( 80, 60); Border = TRUE; DropDown = TRUE; StringList [ en-US ] = ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/condformat/colorformat.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 25bd4f0566e634037ce8d4fb94abe8b351625249 Author: Andras Timar ati...@suse.com Date: Sun Jul 8 21:42:06 2012 +0200 fix layout issue on Data Bar dialog Change-Id: I6bdc5bbbf5e48b5b62562c46afe7f76f3b21a60e diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index 71b88c9..867f29f 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -222,8 +222,7 @@ void ScDataBarSettingsDlg::Init() } maBtnOk.SetClickHdl( LINK( this, ScDataBarSettingsDlg, OkBtnHdl ) ); -Point aPoint = maLbTypeMax.GetPosPixel(); -aPoint.Y() += 50; +Point aPoint(maLbTypeMax.GetPosPixel().X(), maFtMax.GetPosPixel().Y()); maLbTypeMax.SetPosPixel(aPoint); maLbTypeMin.SetSelectHdl( LINK( this, ScDataBarSettingsDlg, TypeSelectHdl ) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xetable.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c3b6e14db7a8134a49da7bdb12d351cddcc866d5 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Mon Jul 9 01:47:21 2012 +0200 performance problem with this commit Change-Id: I59bca684afcc1c51ecff3c6444ad1fd4b2b520e8 diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 150c730..69db2be 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -2208,7 +2208,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot rRoot ) : // find used area (non-empty cells) SCCOL nLastUsedScCol; SCROW nLastUsedScRow; -rDoc.GetFormattedAndUsedArea( nScTab, nLastUsedScCol, nLastUsedScRow ); +rDoc.GetTableArea( nScTab, nLastUsedScCol, nLastUsedScRow ); if(nLastUsedScCol nMaxScCol) nLastUsedScCol = nMaxScCol; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/column3.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ccd4a408683062185802f7635836a49cdb692cf9 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Sat Jul 7 08:02:55 2012 -0400 fdo#43109: Don't check for simple number when text format is requested. Change-Id: If8ec135f53ffb4a3f33c15c6f2a23a9d94a66d82 diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 8020521..7e35fe6 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -1341,7 +1341,7 @@ bool ScColumn::SetString( SCROW nRow, SCTAB nTabP, const String rString, } } } -else +else if (!aParam.mbSetTextCellFormat) { // Only check if the string is a regular number. const LocaleDataWrapper* pLocale = aParam.mpNumFormatter-GetLocaleData(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/src/colorformat.src |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit a411058ad8c4106c26b41ab9defed356bf62b04b Author: Andras Timar ati...@suse.com Date: Sat Jul 7 19:49:57 2012 +0200 fdo#51830 order of OK and Cancel buttons Change-Id: Ia1df8361be359c2453a237de88e3dcc4daa76113 diff --git a/sc/source/ui/src/colorformat.src b/sc/source/ui/src/colorformat.src index 66ae20e..58867c6 100644 --- a/sc/source/ui/src/colorformat.src +++ b/sc/source/ui/src/colorformat.src @@ -38,13 +38,13 @@ ModalDialog RID_SCDLG_DATABAR Closeable = TRUE; OkButton BTN_OK { -Pos = MAP_APPFONT ( 160, 180 ); +Pos = MAP_APPFONT ( 120, 180 ); Size = MAP_APPFONT ( 30, 14 ); TabStop = TRUE; }; CancelButton BTN_CANCEL { -Pos = MAP_APPFONT ( 120, 180 ); +Pos = MAP_APPFONT ( 160, 180 ); Size = MAP_APPFONT ( 30, 14 ); TabStop = TRUE; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/excel/xistream.cxx |4 +++- sc/source/filter/xcl97/XclImpChangeTrack.cxx | 13 - 2 files changed, 15 insertions(+), 2 deletions(-) New commits: commit b45e528cb70d1f908b8ff6ec156ac1a816287075 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Thu Jul 5 21:59:55 2012 +0200 prevent invalid memory when loading change tracking from xls, fdo#45209 when loading broken xls files with change tracking we may crash because of invalid memory access that results from loading to few bytes and then using the originally created array the patch changes it to check for the right amount of loaded bytes and otherwise skips this change tracking record Change-Id: I0795104284479368e26b8411336cee690abffd06 diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx index 753839c..8cd9980 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -822,7 +822,9 @@ sal_Size XclImpStream::CopyToStream( SvStream rOutStrm, sal_Size nBytes ) { sal_Size nReadSize = ::std::min( nBytesLeft, nMaxBuffer ); nRet += Read( pnBuffer, nReadSize ); -rOutStrm.Write( pnBuffer, nReadSize ); +// writing more bytes than read results in invalid memory access +SAL_WARN_IF(nRet != nReadSize, sc, read less bytes than requested); +rOutStrm.Write( pnBuffer, nRet ); nBytesLeft -= nReadSize; } diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index 926c537..ecb8b6e 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -197,7 +197,18 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray* rpTokenArray, const ScAddres // converter in each formula) SvMemoryStream aMemStrm; aMemStrm (sal_uInt16) 0x0001 nFmlSize; -pStrm-CopyToStream( aMemStrm, nFmlSize ); +size_t nRead = pStrm-CopyToStream( aMemStrm, nFmlSize ); + +// survive reading invalid streams! +// if we can't read as many bytes as required just don't use them and +// assume that this part is broken +if(nRead != nFmlSize) +{ +rpTokenArray = NULL; +pStrm-Ignore(1); +return; +} + XclImpStream aFmlaStrm( aMemStrm, GetRoot() ); aFmlaStrm.StartNextRecord(); XclImpChTrFmlConverter aFmlConv( GetRoot(), *this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/view/gridwin.cxx |9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) New commits: commit f99a10d45331c8f007fd521880e7a61546c02fb8 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Fri Jul 6 02:04:44 2012 +0200 adjust the calculation of the cursor pos if ALT is used, fdo#48869 Change-Id: I6316717c860d999270aa7f0fb50af5f6dfc7efd7 diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 40e8f38..64555e6 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4114,6 +4114,9 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos String aUndo = ScGlobal::GetRscString( bIsMove ? STR_UNDO_MOVE : STR_UNDO_COPY ); pDocSh-GetUndoManager()-EnterListAction( aUndo, aUndo ); +SCsCOL nCorrectCursorPosCol = 0; +SCsROW nCorrectCursorPosRow = 0; + bDone = sal_True; if ( meDragInsertMode != INS_NONE ) { @@ -4127,11 +4130,13 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos nDestPosX == aSource.aStart.Col() nDestPosY aSource.aStart.Row() ) { bDone = aSource.Move( 0, nSizeY, 0, pSourceDoc ); +nCorrectCursorPosRow = nSizeY; } else if ( meDragInsertMode == INS_CELLSRIGHT nDestPosY == aSource.aStart.Row() nDestPosX aSource.aStart.Col() ) { bDone = aSource.Move( nSizeX, 0, 0, pSourceDoc ); +nCorrectCursorPosCol = nSizeX; } } pDocSh-UpdateOle( pViewData ); @@ -4190,8 +4195,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos { pView-MarkRange( aDest, false, false ); -SCCOL nDCol = pViewData-GetCurX() - aSource.aStart.Col(); -SCROW nDRow = pViewData-GetCurY() - aSource.aStart.Row(); +SCCOL nDCol = pViewData-GetCurX() - aSource.aStart.Col() + nCorrectCursorPosCol; +SCROW nDRow = pViewData-GetCurY() - aSource.aStart.Row() + nCorrectCursorPosRow; pView-SetCursor( aDest.aStart.Col() + nDCol, aDest.aStart.Row() + nDRow ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/cell2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit dc8e971ec1f3156b5051ea227f9a4195e2d73970 Author: Eike Rathke er...@redhat.com Date: Wed Jul 4 21:27:41 2012 +0200 fixed wrong string copy logic in ScFormulaCell::CompileDBFormula() Change-Id: Ib87cff1ddff02de073b1c09703e1b550b7a3a740 (cherry picked from commit 8f99bd9a6ec60e2b10e29d745d590a9128d53dbc) diff --git a/sc/source/core/data/cell2.cxx b/sc/source/core/data/cell2.cxx index e9713d0..5c4986e 100644 --- a/sc/source/core/data/cell2.cxx +++ b/sc/source/core/data/cell2.cxx @@ -1625,7 +1625,7 @@ void ScFormulaCell::CompileDBFormula( bool bCreateFormulaString ) if ( GetMatrixFlag() != MM_NONE !aFormula.isEmpty() ) { if ( aFormula[ aFormula.getLength()-1 ] == '}' ) -aFormula = aFormula.copy( aFormula.getLength()-1 , 1 ); +aFormula = aFormula.copy( 0, aFormula.getLength()-1 ); if ( aFormula[0] == '{' ) aFormula = aFormula.copy( 1 ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/core/data/cell.cxx | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) New commits: commit b6dcf00472b8f9573ff23ae8cadadeaad58ea4bb Author: Eike Rathke er...@redhat.com Date: Tue Jul 3 21:28:46 2012 +0200 do not attempt to compile running formula cell (fdo#51601 related) 2fb377c19f8ae38e7ec649af1343bbd64b70a16b introduced compilation of a formula cell while it is interpreted, ignoring the comment just above why that does NOT work ... This removes the portion that was responsible for the crash. Though import changed and 3-6 did not crash on opening the testcase documents anymore, the questionable code is still wrong and therefor removed. diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 5fbcbb9..2a3d807 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -1444,7 +1444,9 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) // #i11719# no UPN and no error and no token code but result string present // = interpretation of this cell during name-compilation and unknown names // = can't exchange underlying code array in CompileTokenArray() / -// Compile() because interpreter's token iterator would crash. +// Compile() because interpreter's token iterator would crash or pCode +// would be deleted twice if this cell was interpreted during +// compilation. // This should only be a temporary condition and, since we set an // error, if ran into it again we'd bump into the dirty-clearing // condition further down. @@ -1453,12 +1455,7 @@ void ScFormulaCell::InterpretTail( ScInterpretTailParameter eTailParam ) pCode-SetCodeError( errNoCode ); // This is worth an assertion; if encountered in daily work // documents we might need another solution. Or just confirm correctness. -OSL_FAIL( ScFormulaCell::Interpret: no UPN, no error, no token, but string - Try compiling it. ); -// Force Compilation -rtl::OUString aFormula = aResult.GetHybridFormula(); -aResult.SetHybridFormula( rtl::OUString() ); -Compile( aFormula ); -InterpretTail( eTailParam ); +OSL_FAIL( ScFormulaCell::Interpret: no UPN, no error, no token, but hybrid formula string ); return; } CompileTokenArray(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/unoobj/fielduno.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f1658c64e0e088d6fddd4fc3416a80e0a952f516 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Mon Jul 2 11:36:41 2012 -0400 fdo#50587: Remove totally mis-placed 'static' keyword. How in the world did that end up there!? Change-Id: If276afcea2b0c2d0fe2a59ac966f245608d0e64d diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 99d5ddd..31ee02b 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -1316,7 +1316,7 @@ uno::Referencebeans::XPropertySetInfo SAL_CALL ScEditFieldObj::getPropertySetI throw(uno::RuntimeException) { SolarMutexGuard aGuard; -static uno::Referencebeans::XPropertySetInfo aRef = pPropSet-getPropertySetInfo(); +uno::Referencebeans::XPropertySetInfo aRef = pPropSet-getPropertySetInfo(); return aRef; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/ui/dbgui/pvfundlg.cxx |5 +++-- sc/source/ui/dbgui/pvfundlg.src |5 +++-- sc/source/ui/inc/pvfundlg.hxx |2 +- 3 files changed, 7 insertions(+), 5 deletions(-) New commits: commit 053832f8dc453b408d33028e58b7357b29041ae3 Author: Kohei Yoshida kohei.yosh...@gmail.com Date: Mon Jul 2 16:42:29 2012 -0400 fdo#51222: Use multi-list box for subtotal dialog. Change-Id: I22cb3b66d0c4a93cbcba05bb5990080e5ee57a2e diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 51b8c8b..6d23793 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -166,7 +166,7 @@ static const ScDPListBoxWrapper::MapEntryType spShowFromMap[] = // ScDPFunctionListBox::ScDPFunctionListBox( Window* pParent, const ResId rResId ) : -ListBox( pParent, rResId ) +MultiListBox( pParent, rResId ) { FillFunctionNames(); } @@ -190,7 +190,7 @@ sal_uInt16 ScDPFunctionListBox::GetSelection() const void ScDPFunctionListBox::FillFunctionNames() { -OSL_ENSURE( !GetEntryCount(), ScDPFunctionListBox::FillFunctionNames - do not add texts to resource ); +OSL_ENSURE( !GetEntryCount(), ScDPMultiFuncListBox::FillFunctionNames - do not add texts to resource ); Clear(); ResStringArray aArr( ScResId( SCSTR_DPFUNCLISTBOX ) ); for( sal_uInt16 nIndex = 0, nCount = sal::static_int_castsal_uInt16(aArr.Count()); nIndex nCount; ++nIndex ) @@ -224,6 +224,7 @@ ScDPFunctionDlg::ScDPFunctionDlg( { FreeResource(); Init( rLabelData, rFuncData ); +maLbFunc.EnableMultiSelection(false); } sal_uInt16 ScDPFunctionDlg::GetFuncMask() const diff --git a/sc/source/ui/dbgui/pvfundlg.src b/sc/source/ui/dbgui/pvfundlg.src index a5982ae..d5203f2 100644 --- a/sc/source/ui/dbgui/pvfundlg.src +++ b/sc/source/ui/dbgui/pvfundlg.src @@ -62,14 +62,15 @@ ModalDialog RID_SCDLG_DPDATAFIELD Size = MAP_APPFONT ( 152 , 8 ) ; Text [ en-US ] = ~Function ; }; -ListBox LB_FUNC +MultiListBox LB_FUNC { -HelpID = sc:ListBox:RID_SCDLG_DPDATAFIELD:LB_FUNC; +HelpID = sc:MultiListBox:RID_SCDLG_DPDATAFIELD:LB_FUNC; Border = TRUE ; Pos = MAP_APPFONT ( 12 , 14 ) ; Size = MAP_APPFONT ( 140 , 65 ) ; TabStop = TRUE ; AutoHScroll = TRUE ; +SimpleMode = TRUE ; }; FixedText FT_NAMELABEL { diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index 76c6049..00189ab 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -53,7 +53,7 @@ class ScDPObject; // -class ScDPFunctionListBox : public ListBox +class ScDPFunctionListBox : public MultiListBox { public: explicitScDPFunctionListBox( Window* pParent, const ResId rResId ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sc/source
sc/source/filter/xml/xmlcondformat.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 66018b9685dd7337daae9bb62ffeb43cd4161caf Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Sat Jun 30 03:01:22 2012 +0200 the end of the formula is the closing bracket, fdo#51507 Change-Id: I2cc6505571ff62d3c161317b61033be0d7ec diff --git a/sc/source/filter/xml/xmlcondformat.cxx b/sc/source/filter/xml/xmlcondformat.cxx index a8fc8bb..ed9bc49 100644 --- a/sc/source/filter/xml/xmlcondformat.cxx +++ b/sc/source/filter/xml/xmlcondformat.cxx @@ -363,7 +363,7 @@ void GetConditionData(const rtl::OUString rValue, ScConditionMode eMode, rtl:: const sal_Unicode* pStr = rValue.getStr(); const sal_Unicode* pStart = pStr + 11; const sal_Unicode* pEnd = pStr + rValue.getLength(); -rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ','); +rExpr1 = ScXMLConditionHelper::getExpression( pStart, pEnd, ')'); eMode = SC_COND_DIRECT; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits