[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 2 commits - sc/source
sc/source/ui/dialogs/searchresults.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b51c840735029e8c61af4035f8db1d41ee8650ce Author: Matúš Kukan matus.ku...@collabora.com Date: Sat Dec 7 17:55:52 2013 +0100 SearchResults dialog: Use also AlignToCursor when setting cursor. Change-Id: I4c802b5164bc0f0dc11da80c2225f9fc274e227c (cherry picked from commit d45bc3429c859392aa9fd7932908e50b0716a39c) diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index f5cc439..3b27a2a 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -69,6 +69,7 @@ IMPL_LINK_NOARG( SearchResults, ListSelectHdl ) ScTabViewShell* pScViewShell = ScTabViewShell::GetActiveViewShell(); pScViewShell-SetTabNo(aAddress.Tab()); pScViewShell-SetCursor(aAddress.Col(), aAddress.Row()); +pScViewShell-AlignToCursor(aAddress.Col(), aAddress.Row(), SC_FOLLOW_JUMP); return 0; } commit 1a8afa24ffc1ba1e606617f263e1f8833ad4d0a9 Author: Matúš Kukan matus.ku...@collabora.com Date: Mon Dec 9 08:52:59 2013 +0100 fdo#72413: Fix O(n^2) in inserting SearchResults' items. Thanks to moggi, who pointed to this, should be documented somewhere. Change-Id: I96ba2cca930e4b784a825987ea19e4fc9aacb6d6 (cherry picked from commit dc22a2aa1b2858394ad70806f34d1327936af7a0) diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index fa89eb7..f5cc439 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -41,6 +41,7 @@ SearchResults::~SearchResults() void SearchResults::Show(const ScRangeList rMatchedRanges) { mpList-Clear(); +mpList-SetUpdateMode(false); for (size_t i = 0, n = rMatchedRanges.size(); i n; ++i) { ScCellIterator aIter(mpDoc, *rMatchedRanges[i]); @@ -53,6 +54,7 @@ void SearchResults::Show(const ScRangeList rMatchedRanges) mpList-InsertEntry(sAddress.replace('.', '\t') + \t + mpDoc-GetString(aAddress)); } } +mpList-SetUpdateMode(true); ModelessDialog::Show(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 2 commits - sc/source
sc/source/filter/excel/excform.cxx | 49 +--- sc/source/filter/excel/impop.cxx| 41 +++--- sc/source/filter/excel/namebuff.cxx | 39 sc/source/filter/inc/excform.hxx|2 - sc/source/filter/inc/namebuff.hxx | 12 ++-- 5 files changed, 51 insertions(+), 92 deletions(-) New commits: commit c0b0d3abf4919b9375fb8d73dfc7340b40c193b0 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Wed Dec 4 21:59:30 2013 -0500 Update the comment use the column position of the last formula record. Change-Id: I877ec2153754328781e5d87b8eca47998b70fa22 (cherry picked from commit 5a295eb97b9461e603c723308135c1477846e839) diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index b60e62a..913d1ba 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -869,11 +869,9 @@ void ImportExcel::Shrfmla( void ) OSL_ENSURE( pErgebnis, +ImportExcel::Shrfmla(): ScTokenArray is NULL! ); -// The range in this record can be erroneous especially the row range. -// Use the row from the last FORMULA record as the start row. The end row -// will be adjusted by the formula cells that follow. -SCCOL nCol1 = nFirstCol; -SCCOL nCol2 = nLastCol; +// The shared range in this record is erroneous more than half the time. +// Don't ever rely on it. +SCCOL nCol1 = mpLastFormula-mnCol; SCROW nRow1 = mpLastFormula-mnRow; ScAddress aPos(nCol1, nRow1, GetCurrScTab()); commit 2723a03db34e9cb5a510715df442349b71491b88 Author: Kohei Yoshida kohei.yosh...@collabora.com Date: Wed Dec 4 21:52:09 2013 -0500 Never attempt to create formula groups based on Excel's shared formula ranges. Because they are wrong more than half the time. Change-Id: I24e49c53520442be698e43976d28d0f8477648e6 (cherry picked from commit c6ccab60fa881ad80e64168ced4c5f74349512b0) diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index 2b7175b..0273ddd 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -125,40 +125,18 @@ void ImportExcel::Formula( if (pFormConv-ReadSharedFormulaPosition(maStrm, nSharedCol, nSharedRow)) { ScAddress aRefPos(aScPos.Col(), nSharedRow, GetCurrScTab()); -ScFormulaCellGroupRef xGroup = pFormConv-GetSharedFormula(aRefPos); -if (xGroup) +const ScTokenArray* pSharedCode = pFormConv-GetSharedFormula(aRefPos); +if (pSharedCode) { -// Make sure the this one follows immediately below another shared formula cell. -LastFormula* pLast = GetLastFormula(aScPos.Col()); -if (pLast pLast-mpCell pLast-mnRow == (aScPos.Row()-1)) -{ -ScFormulaCell* pCell = new ScFormulaCell(pD, aScPos, xGroup); - -if (!xGroup-mpTopCell nSharedRow == aScPos.Row()) -// This formula group object is a duplicate of the -// original one due to Excel's multi-column shared -// range, and doesn't have the top cell assigned yet. -// Assign the current cell as its top cell. -xGroup-mpTopCell = pCell; - -if (xGroup-mpTopCell) -{ -rDoc.getDoc().EnsureTable(aScPos.Tab()); -rDoc.setFormulaCell(aScPos, pCell); -xGroup-mnLength = aScPos.Row() - xGroup-mpTopCell-aPos.Row() + 1; -pCell-SetNeedNumberFormat(false); -if (!rtl::math::isNan(fCurVal)) -pCell-SetResultDouble(fCurVal); - -GetXFRangeBuffer().SetXF(aScPos, nXF); -SetLastFormula(aScPos.Col(), aScPos.Row(), fCurVal, nXF, pCell); -} -else -{ -// No idea what's going on here... -delete pCell; -} -} +ScFormulaCell* pCell = new ScFormulaCell(pD, aScPos, *pSharedCode); +rDoc.getDoc().EnsureTable(aScPos.Tab()); +rDoc.setFormulaCell(aScPos, pCell); +pCell-SetNeedNumberFormat(false); +if (!rtl::math::isNan(fCurVal)) +pCell-SetResultDouble(fCurVal); + +GetXFRangeBuffer().SetXF(aScPos, nXF); +SetLastFormula(aScPos.Col(), aScPos.Row(), fCurVal, nXF, pCell); } else { @@ -1736,10 +1714,9 @@ bool ExcelToSc::ReadSharedFormulaPosition( XclImpStream rStrm, SCCOL rCol, SCR return true; } -ScFormulaCellGroupRef ExcelToSc::GetSharedFormula( const ScAddress rRefPos )
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 2 commits - sc/source
sc/source/core/data/table2.cxx |2 +- sc/source/ui/view/output.cxx |5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) New commits: commit b86eb5b3c776573713ae07a274a77e528fc33e22 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Mon Dec 2 08:06:44 2013 +0100 don't use fixed size icon sets, fdo#62652 actually we should switch to svg as soon as it becomes possible Change-Id: Ifbbe5befab94441f04fadb90b779e0bc8c15eda4 diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 089d4d8..71d469e 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -890,11 +890,12 @@ BitmapEx getIcon( ScIconSetType eType, sal_Int32 nIndex ) void drawIconSets( const ScIconSetInfo* pOldIconSetInfo, OutputDevice* pDev, const Rectangle rRect ) { -long nSize = 16; +//long nSize = 16; ScIconSetType eType = pOldIconSetInfo-eIconSetType; sal_Int32 nIndex = pOldIconSetInfo-nIconIndex; BitmapEx rIcon = getIcon( eType, nIndex ); -pDev-DrawBitmapEx( Point( rRect.Left() +2, rRect.Top() + 2 ), Size( nSize, nSize ), rIcon ); +long aOrigSize = std::maxlong(0,std::min(rRect.GetSize().getWidth() - 4, rRect.GetSize().getHeight() -4)); +pDev-DrawBitmapEx( Point( rRect.Left() +2, rRect.Top() + 2 ), Size(aOrigSize, aOrigSize), rIcon ); } void drawCells(const Color* pColor, const SvxBrushItem* pBackground, const Color* pOldColor, const SvxBrushItem* pOldBackground, commit bc31db3f3315e7b80118f2070270769dd226de78 Author: Markus Mohrhard markus.mohrh...@googlemail.com Date: Mon Dec 2 06:05:19 2013 +0100 we want to delete anytime that attribs are overwritten, fdo#72149 Change-Id: I1ed50e6daf5b363c46e31d1a0efacf7728621b1a diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index d7fca4f..30771ab 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -662,7 +662,7 @@ void ScTable::CopyFromClip( for ( SCCOL i = nCol1; i = nCol2; i++) aCol[i].CopyFromClip(rCxt, nRow1, nRow2, nDy, pTable-aCol[i - nDx]); // notes are handles at column level -if (rCxt.getInsertFlag() == IDF_ATTRIB) +if (rCxt.getInsertFlag() IDF_ATTRIB) { // make sure that there are no old references to the cond formats sal_uInt16 nWhichArray[2]; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 2 commits - sc/source
sc/source/core/opencl/opencl_device.cxx | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) New commits: commit 09a071f44767392aaf4f22f2e9da773a79618987 Author: Michael Meeks michael.me...@collabora.com Date: Fri Nov 29 02:04:15 2013 + GPU Calc: reflect the true cost of InterpretTail more accurately. Change-Id: I7004150569e5329f19d2f08adbd70477bd6252ff diff --git a/sc/source/core/opencl/opencl_device.cxx b/sc/source/core/opencl/opencl_device.cxx index 452848f..a91883f 100644 --- a/sc/source/core/opencl/opencl_device.cxx +++ b/sc/source/core/opencl/opencl_device.cxx @@ -376,9 +376,17 @@ ds_status evaluateScoreForDevice(ds_device* device, void* evalData) testData-output[j] = fAverage + (fMin * fSoP); } +// InterpretTail - the S/W fallback is nothing like as efficient +// as any good openCL implementation: no SIMD, tons of branching +// in the inner loops etc. Generously characterise it as only 10x +// slower than the above. +float fInterpretTailFactor = 10.0; + device-score = (void*)new LibreOfficeDeviceScore; ((LibreOfficeDeviceScore*)device-score)-fTime = timerCurrent(kernelTime); ((LibreOfficeDeviceScore*)device-score)-bNoCLErrors = true; + +((LibreOfficeDeviceScore*)device-score)-fTime *= fInterpretTailFactor; } return DS_SUCCESS; } commit 9482e151fd5620175dd373ef6b2ec7e7c5986b9e Author: Michael Meeks michael.me...@collabora.com Date: Fri Nov 29 02:09:36 2013 + GPU Calc - disable printf console debugging. Change-Id: I2c9d1a82ec0159fae80a8e146d1218aa98895f65 diff --git a/sc/source/core/opencl/opencl_device.cxx b/sc/source/core/opencl/opencl_device.cxx index 371cdbf..452848f 100644 --- a/sc/source/core/opencl/opencl_device.cxx +++ b/sc/source/core/opencl/opencl_device.cxx @@ -29,8 +29,8 @@ #define OUTPUTSIZE 15360 #define STRINGIFY(...) #__VA_ARGS__\n -#define LOG_PRINTF(x) (std::cout x std::endl) -//#define LOG_PRINTF(x) +//#define LOG_PRINTF(x) (std::cout x std::endl) +#define LOG_PRINTF(x) #define DS_CHECK_STATUS(status, name) \ if (CL_SUCCESS != status) \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits