[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-11-13 Thread Tor Lillqvist (via logerrit)
 sc/source/ui/view/viewfun5.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7dba640b5691c22d6529e53752255fddc2b461e6
Author: Tor Lillqvist 
AuthorDate: Wed Nov 13 13:30:43 2019 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Nov 13 14:17:42 2019 +0100

tdf#128466: Accept also JPEG

Change-Id: If8499cde875e03cb6c56259badd64ba6aee08a66
Reviewed-on: https://gerrit.libreoffice.org/82584
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index affdaa4a0076..ada2f6e4db1b 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -482,7 +482,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 }
 }
 }
-else if (nFormatId == SotClipboardFormatId::BITMAP || nFormatId == 
SotClipboardFormatId::PNG)
+else if (nFormatId == SotClipboardFormatId::BITMAP || nFormatId == 
SotClipboardFormatId::PNG || nFormatId == SotClipboardFormatId::JPEG)
 {
 BitmapEx aBmpEx;
 if( aDataHelper.GetBitmapEx( SotClipboardFormatId::BITMAP, aBmpEx ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-08-08 Thread Mike Kaganski (via logerrit)
 sc/source/filter/excel/xepivotxml.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit fd09ed3d7424a1cb579758769efe465d272ae77d
Author: Mike Kaganski 
AuthorDate: Wed Aug 7 16:03:34 2019 +0300
Commit: Mike Kaganski 
CommitDate: Thu Aug 8 10:59:38 2019 +0200

tdf#126748: temporary hack to avoid crash when several pivot tables ...

... reference a single cache, and have different sets of group fields.

The problem is getting group field names from the tables referencing
the cache; so when a table referencing not all group fields happens
to be first in the reference list, the returned name is empty.

The hack just stops writing group fields as soon as it finds an empty
name; this naturally leaves bad cache data behind, but at least doen't
crash. The retrieval of the names should be reimplemented using a
different source, to not depend on tables referencing the cache.

Regression after commit b082998401e37e6c7534906601bc481423a6ded0.

Change-Id: Ib2e92f8acf93a801861c6ba5c68fab3bebe3672c
Reviewed-on: https://gerrit.libreoffice.org/77110
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/77129
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/filter/excel/xepivotxml.cxx 
b/sc/source/filter/excel/xepivotxml.cxx
index 752d971cfd25..fe6281cb050f 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -535,6 +535,16 @@ void XclExpXmlPivotCaches::SavePivotCacheXml( 
XclExpXmlStream& rStrm, const Entr
 {
 bool bDummy = false;
 const OUString aName = pDPObject->GetDimName(i, bDummy);
+// tdf#126748: DPObject might not reference all group fields, when 
there are several
+// DPObjects referencing this cache. Trying to get a dimension data 
for a field not used
+// in a given DPObject will give nullptr, and dereferencing it then 
will crash. To avoid
+// the crash, until there's a correct method to find the names of 
group fields in cache,
+// just skip the fields, creating bad cache data, which is of course a 
temporary hack.
+// TODO: reimplement the whole block to get the names from another 
source, not from first
+// cache reference.
+if (aName.isEmpty())
+break;
+
 ScDPSaveData* pSaveData = pDPObject->GetSaveData();
 assert(pSaveData);
 const ScDPSaveGroupDimension* pDim = 
pSaveData->GetDimensionData()->GetNamedGroupDim(aName);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-07-30 Thread Aron Budea (via logerrit)
 sc/source/core/data/table2.cxx |2 +-
 sc/source/ui/unoobj/fmtuno.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dec9dec4d2a51612c301019f4becd41227b56df4
Author: Aron Budea 
AuthorDate: Sun Jul 28 05:51:40 2019 +0200
Commit: Aron Budea 
CommitDate: Wed Jul 31 04:26:29 2019 +0200

tdf#125800: accessing cond format props in UNO throws error

These conditions were always evaluated to true: OR should
become AND when negated.

Regression from 8c637b47d9de4b3a64c33a9c2ffe7ed220be2467

Change-Id: I87038319ed27eff2bed2412da49e01f73ec0a79c
Reviewed-on: https://gerrit.libreoffice.org/76493
Reviewed-by: Gülşah Köse 
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 
(cherry picked from commit 9ad8f83912e6cf14d7b3b3e1cb2a79d819247c82)
Reviewed-on: https://gerrit.libreoffice.org/76705
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 632f53d43d99..d5217874a7c3 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2160,7 +2160,7 @@ void ScTable::FindMaxRotCol( RowInfo* pRowInfo, SCSIZE 
nArrCount, SCCOL nX1, SCC
 for (size_t nEntry=0; nEntryGetEntry(nEntry);
-if(pEntry->GetType() != 
ScFormatEntry::Type::Condition ||
+if(pEntry->GetType() != 
ScFormatEntry::Type::Condition &&
pEntry->GetType() != 
ScFormatEntry::Type::ExtCondition)
 continue;
 
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 22dda7d06faf..84354f2b404f 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -159,7 +159,7 @@ ScTableConditionalFormat::ScTableConditionalFormat(
 {
 ScCondFormatEntryItem aItem;
 const ScFormatEntry* pFrmtEntry = pFormat->GetEntry(i);
-if(pFrmtEntry->GetType() != ScFormatEntry::Type::Condition 
||
+if(pFrmtEntry->GetType() != ScFormatEntry::Type::Condition 
&&
pFrmtEntry->GetType() != 
ScFormatEntry::Type::ExtCondition)
 continue;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-07-30 Thread Michael Meeks (via logerrit)
 sc/source/ui/unoobj/docuno.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit e8d908a1c892147b72c687cfecaadf60a93c71a8
Author: Michael Meeks 
AuthorDate: Sat Jul 27 21:33:05 2019 -0400
Commit: Miklos Vajna 
CommitDate: Tue Jul 30 08:57:49 2019 +0200

calc: simplify getDocumentSize calculation.

Change-Id: Iee2ebf2c6ed74651556647264f519caa9c59dad7
Reviewed-on: https://gerrit.libreoffice.org/76558
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 58c58b904aea..faba8a57b39e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -607,15 +607,7 @@ Size ScModelObj::getDocumentSize()
 };
 
 long nDocWidthPixel = 
pViewData->GetLOKWidthHelper().computePosition(nEndCol, GetColWidthPx);
-
-
-auto GetRowHeightPx = [pThisDoc, nTab](SCROW nRow) {
-const sal_uInt16 nSize = pThisDoc->GetRowHeight(nRow, nTab);
-return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL);
-};
-
-long nDocHeightPixel = 
pViewData->GetLOKHeightHelper().computePosition(nEndRow, GetRowHeightPx);
-
+long nDocHeightPixel = pThisDoc->GetScaledRowHeight( 0, nEndRow, nTab, 1.0 
/ TWIPS_PER_PIXEL );
 
 if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-07-24 Thread Jan Holesovsky (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   11 +++
 sc/source/ui/view/cellsh3.cxx |   16 ++--
 2 files changed, 21 insertions(+), 6 deletions(-)

New commits:
commit c7eca5ce90af6d7798dc36c7ca960ee348b782b7
Author: Jan Holesovsky 
AuthorDate: Tue Jul 16 11:58:11 2019 +0200
Commit: Jan Holesovsky 
CommitDate: Wed Jul 24 10:19:48 2019 +0200

LOK: Emit the doc. modified state even when changing the cell inline.

The "LOK: emit modified status on entering cell data" patch did this
only for the formula input line, and did not change the state when the
user just clicked on the cell and started modifying it; so this patch
extends it.

Also change the actual DocumentModified state of the document directly
instead of just sending a flag, so that the state in LOOLWSD and in the
core don't get out of sync.

Change-Id: Ie516ce5a74d94247d79cf993517d7f4a6657cc94
Reviewed-on: https://gerrit.libreoffice.org/75701
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 3c65a12295fc..7683a5d9fb1b 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -2492,6 +2492,9 @@ void ScInputHandler::InvalidateAttribs()
 rBindings.Invalidate( SID_SET_SUB_SCRIPT );
 rBindings.Invalidate( SID_ATTR_CHAR_STRIKEOUT );
 rBindings.Invalidate( SID_ATTR_CHAR_SHADOWED );
+
+rBindings.Invalidate( SID_SAVEDOC );
+rBindings.Invalidate( SID_DOC_MODIFIED );
 }
 }
 
@@ -3473,6 +3476,14 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, 
bool bStartEdit /* = false
 // #i114511# don't count cursor keys as modification
 bool bSetModified = !bCursorKey;
 DataChanged(false, bSetModified); // also calls UpdateParenthesis()
+
+// In the LOK case, we want to set the document modified state
+// right away at the start of the edit, so that the content is
+// saved even when the user leaves the document before hitting
+// Enter
+if (comphelper::LibreOfficeKit::isActive() && bSetModified && 
pActiveViewSh && !pActiveViewSh->GetViewData().GetDocShell()->IsModified())
+pActiveViewSh->GetViewData().GetDocShell()->SetModified();
+
 InvalidateAttribs();//! in DataChanged?
 }
 }
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 2fc6cc37a9f8..bdf1a3325d07 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -168,13 +168,17 @@ void ScCellShell::Execute( SfxRequest& rReq )
 {
 if ( pReqArgs )
 {
-if (comphelper::LibreOfficeKit::isActive())
+// In the LOK case, we want to set the document modified 
state
+// right away at the start of the edit, so that the 
content is
+// saved even when the user leaves the document before 
hitting
+// Enter
+// NOTE: This also means we want to set the modified state
+// regardless of the DontCommit parameter's value.
+if (comphelper::LibreOfficeKit::isActive() && 
!GetViewData()->GetDocShell()->IsModified())
 {
-// Let the client know about our entry, so if they save
-// (say because the user closes the document or 
window,)
-// this change gets persisted (assuming 
DontTerminateEdit
-// is set to false in the .uno:Save command).
-
SfxLokHelper::notifyAllViews(LOK_CALLBACK_STATE_CHANGED, 
".uno:ModifiedStatus=true");
+GetViewData()->GetDocShell()->SetModified();
+rBindings.Invalidate(SID_SAVEDOC);
+rBindings.Invalidate(SID_DOC_MODIFIED);
 }
 
 OUString aStr( static_cast(pReqArgs->
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-07-15 Thread Ashod Nakashian (via logerrit)
 sc/source/ui/view/cellsh3.cxx |   12 
 1 file changed, 12 insertions(+)

New commits:
commit 38b899312245758381fa72ad17c2d4c281edb1ba
Author: Ashod Nakashian 
AuthorDate: Fri Jul 12 11:58:11 2019 -0400
Commit: Jan Holesovsky 
CommitDate: Mon Jul 15 10:54:23 2019 +0200

LOK: emit modified status on entering cell data

Entering data into a cell without committing will
normally not set the modified flag. However clients
might want to know whether there is in-flight changes
when they need to save the document.

A possible scenario is that the user enters some
cell data and then closes the window. Both WSD and
the client app would here rely on the modified
notification to decide whether to save the document
or not.

We do not change the document modified state, since
that may be incorrect (in case the user actually
cancel the cell entry), so we preserve that so future
updates to the modified status would reflect the
correct state of the file. Instead, we emit a
client notification that the document has
been modified, to signal them that saving
is sensible.

Note that ideally we would undo this when the user
cancels the cell edit, but that would be complicated
due to multi-editor scenarios. For example, another
user might actually edit the document while we
cancel our cell edit, and in this case we should not
reset the modify flag. Since this is unreliable,
we leave the flag set, unless the Core emits
an update, which will surely be accurate.

Change-Id: Id26aa6f8ce2c0a08f8bee6812fcf99275dc24551
Reviewed-on: https://gerrit.libreoffice.org/75513
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 305bbd68f876..2fc6cc37a9f8 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -44,6 +44,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 
@@ -165,6 +168,15 @@ void ScCellShell::Execute( SfxRequest& rReq )
 {
 if ( pReqArgs )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Let the client know about our entry, so if they save
+// (say because the user closes the document or 
window,)
+// this change gets persisted (assuming 
DontTerminateEdit
+// is set to false in the .uno:Save command).
+
SfxLokHelper::notifyAllViews(LOK_CALLBACK_STATE_CHANGED, 
".uno:ModifiedStatus=true");
+}
+
 OUString aStr( static_cast(pReqArgs->
 Get( SID_ENTER_STRING )).GetValue() );
 const SfxPoolItem* pDontCommitItem;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-07-10 Thread Mike Kaganski (via logerrit)
 sc/source/ui/docshell/externalrefmgr.cxx |   23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit df0f41ab7f3750775a18a070155bd328352e0b84
Author: Mike Kaganski 
AuthorDate: Tue Jul 9 18:44:42 2019 +1000
Commit: Mike Kaganski 
CommitDate: Wed Jul 10 11:58:33 2019 +0200

Postpone filter detection until link update is allowed

Change-Id: I85b2185e550f2a133ceb485241ef513b40593e34
Reviewed-on: https://gerrit.libreoffice.org/75301
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 03c708bf085f91480c014d7fa31e7a317b2c7b8f)
Reviewed-on: https://gerrit.libreoffice.org/75333
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/docshell/externalrefmgr.cxx 
b/sc/source/ui/docshell/externalrefmgr.cxx
index d1b6e8994813..4243973a5b08 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -2158,6 +2158,15 @@ void insertRefCellByIterator(
 }
 }
 
+bool IsLinkUpdateAllowedInDoc(const ScDocument& rDoc)
+{
+SfxObjectShell* pDocShell = rDoc.GetDocumentShell();
+if (!pDocShell)
+return false;
+
+return pDocShell->GetEmbeddedObjectContainer().getUserAllowsLinkUpdate();
+}
+
 }
 
 void ScExternalRefManager::insertRefCell(sal_uInt16 nFileId, const ScAddress& 
rCell)
@@ -2369,13 +2378,8 @@ ScDocument* 
ScExternalRefManager::getInMemorySrcDocument(sal_uInt16 nFileId)
 return nullptr;
 
 // Do not load document until it was allowed
-SfxObjectShell* pDocShell = mpDoc->GetDocumentShell();
-if ( pDocShell )
-{
-const comphelper::EmbeddedObjectContainer& rContainer = 
pDocShell->GetEmbeddedObjectContainer();
-if ( !rContainer.getUserAllowsLinkUpdate() )
-return nullptr;
-}
+if (!IsLinkUpdateAllowedInDoc(*mpDoc))
+return nullptr;
 
 ScDocument* pSrcDoc = nullptr;
 ScDocShell* pShell = 
static_cast(SfxObjectShell::GetFirst(checkSfxObjectShell,
 false));
@@ -2620,6 +2624,11 @@ void ScExternalRefManager::maybeLinkExternalFile( 
sal_uInt16 nFileId, bool bDefe
 aFilter = pFileData->maFilterName;
 aOptions = pFileData->maFilterOptions;
 }
+
+// Filter detection may access external links; defer it until we are 
allowed
+if (!bDeferFilterDetection)
+bDeferFilterDetection = !IsLinkUpdateAllowedInDoc(*mpDoc);
+
 // If a filter was already set (for example, loading the cached table),
 // don't call GetFilterName which has to access the source file.
 // If filter detection is deferred, the next successful loadSrcDocument()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-06-29 Thread Muhammet Kara (via logerrit)
 sc/source/ui/drawfunc/drawsh.cxx |  116 +--
 1 file changed, 65 insertions(+), 51 deletions(-)

New commits:
commit 4302db58a09c730e25573d7a532207f876ba7d95
Author: Muhammet Kara 
AuthorDate: Thu Jun 27 02:27:53 2019 +0300
Commit: Muhammet Kara 
CommitDate: Sat Jun 29 16:16:07 2019 +0200

lokdialog: Convert the Format -> Position and Size... to async exec for sc

Change-Id: I715ed025d97de8eb69b6e9ba227b955b49add855
Reviewed-on: https://gerrit.libreoffice.org/74883
Reviewed-by: Muhammet Kara 
Tested-by: Muhammet Kara 

diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 07216e1747b4..dda6f9351a6d 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -99,6 +99,20 @@ static void lcl_setModified( const SfxObjectShell*  pShell )
 }
 }
 
+static void lcl_invalidateTransformAttr(const ScTabViewShell* pViewShell)
+{
+SfxBindings& rBindings=pViewShell->GetViewFrame()->GetBindings();
+rBindings.Invalidate(SID_ATTR_TRANSFORM_WIDTH);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_HEIGHT);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_X);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_POS_Y);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_ANGLE);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_X);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_ROT_Y);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOWIDTH);
+rBindings.Invalidate(SID_ATTR_TRANSFORM_AUTOHEIGHT);
+}
+
 void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 {
 sal_uInt16  nSlot   = rReq.GetSlot();
@@ -243,77 +257,77 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
 case SID_ATTR_TRANSFORM:
 {
+if ( pView->AreObjectsMarked() )
 {
-if ( pView->AreObjectsMarked() )
-{
-const SfxItemSet* pArgs = rReq.GetArgs();
+const SfxItemSet* pArgs = rReq.GetArgs();
 
-if( !pArgs )
+if( !pArgs )
+{
+if( rMarkList.GetMark(0) != nullptr )
 {
-if( rMarkList.GetMark(0) != nullptr )
+SdrObject* pObj = 
rMarkList.GetMark(0)->GetMarkedSdrObj();
+std::shared_ptr pRequest;
+pRequest.reset(new SfxRequest(rReq));
+
+if( pObj->GetObjIdentifier() == OBJ_CAPTION )
 {
-SdrObject* pObj = 
rMarkList.GetMark(0)->GetMarkedSdrObj();
-if( pObj->GetObjIdentifier() == OBJ_CAPTION )
+// Caption Itemset
+SfxItemSet aNewAttr(pDoc->GetItemPool());
+pView->GetAttributes(aNewAttr);
+// Size and Position Itemset
+SfxItemSet 
aNewGeoAttr(pView->GetGeoAttrFromMarked());
+
+SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
+if ( pFact )
 {
-// Caption Itemset
-SfxItemSet aNewAttr(pDoc->GetItemPool());
-pView->GetAttributes(aNewAttr);
-// Size and Position Itemset
-SfxItemSet 
aNewGeoAttr(pView->GetGeoAttrFromMarked());
-
-SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
-if ( pFact )
-{
-ScopedVclPtr 
pDlg(pFact->CreateCaptionDialog( pWin, pView ));
-
-const sal_uInt16* pRange = 
pDlg->GetInputRanges( *aNewAttr.GetPool() );
-SfxItemSet aCombSet( *aNewAttr.GetPool(), 
pRange );
-aCombSet.Put( aNewAttr );
-aCombSet.Put( aNewGeoAttr );
-pDlg->SetInputSet(  );
-
-if (pDlg->Execute() == RET_OK)
+VclPtr 
pDlg(pFact->CreateCaptionDialog( pWin, pView ));
+
+const sal_uInt16* pRange = 
pDlg->GetInputRanges( *aNewAttr.GetPool() );
+SfxItemSet aCombSet( *aNewAttr.GetPool(), 
pRange );
+aCombSet.Put( aNewAttr );
+aCombSet.Put( aNewGeoAttr );
+pDlg->SetInputSet(  );
+
+pDlg->StartExecuteAsync([=](sal_Int32 nResult){
+if (nResult == RET_OK)
 {
-

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-10 Thread Dennis Francis (via logerrit)
 sc/source/filter/oox/extlstcontext.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit e40b44573f8dd727142978462cb87dab1fa29665
Author: Dennis Francis 
AuthorDate: Thu May 9 18:50:22 2019 +0530
Commit: Andras Timar 
CommitDate: Fri May 10 13:49:56 2019 +0200

crashtesting: crash on importing tdf#123420-2.xlsx

since

commit c2f1c68ffb6dfa1ce7de09dcc428d6c53549e88d
Date:   Fri Apr 19 23:15:53 2019 +0530

tdf#122590: follow-up : import x14:cfRule priorities

Fix is to import the priorities for iconSet x14:cfRule too.

Thanks to Caolán McNamara for notifying me about the regression.

Change-Id: Ib5b703a6911ab6480d42ac1e004a144043d3ad24
Reviewed-on: https://gerrit.libreoffice.org/72035
Tested-by: Jenkins
Reviewed-by: Dennis Francis 
(cherry picked from commit ea5f1ec4eec4aa609000223aea1bc9ce202de2c5)
Reviewed-on: https://gerrit.libreoffice.org/72120
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/filter/oox/extlstcontext.cxx 
b/sc/source/filter/oox/extlstcontext.cxx
index 4e6557f8d36d..fd22190db89b 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -106,6 +106,7 @@ ContextHandlerRef 
ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
 OUString aType = rAttribs.getString(XML_type, OUString());
 OUString aId = rAttribs.getString(XML_id, OUString());
 nPriority = rAttribs.getInteger( XML_priority, -1 );
+maPriorities.push_back(nPriority);
 
 if (aType == "dataBar")
 {
@@ -181,7 +182,6 @@ void ExtConditionalFormattingContext::onEndElement()
 case XM_TOKEN(f):
 {
 rFormulas.push_back(aChars);
-maPriorities.push_back(nPriority);
 }
 break;
 case XLS14_TOKEN( cfRule ):
@@ -226,9 +226,7 @@ void ExtConditionalFormattingContext::onEndElement()
 std::vector< std::unique_ptr >& rExtFormats =  
getCondFormats().importExtCondFormat();
 rExtFormats.push_back(o3tl::make_unique(aRange, 
maEntries, ));
 
-if (isPreviousElementF)
-maPriorities.clear();
-
+maPriorities.clear();
 isPreviousElementF = false;
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-10 Thread Henry Castro (via logerrit)
 sc/source/ui/app/scmod.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c5457de07e9d6e6a202f577067cf2a0f904bfcd0
Author: Henry Castro 
AuthorDate: Thu May 9 23:28:23 2019 -0400
Commit: Jan Holesovsky 
CommitDate: Fri May 10 09:10:05 2019 +0200

lok: avoid locking table when ScSpecialFilterDlg is destroyed

ScSpecialFilterDlg by default does not lock the table, but in tiled
rendering case, switching sheets are locked when the dialog is closed

Thanks Michael Meeks for debugging

Change-Id: Ifa32fd63085f3e082b97ad0313dff7b826b95d2e
Reviewed-on: https://gerrit.libreoffice.org/72074
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 4b9e46b957ad..33612db77f9d 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -1615,7 +1615,7 @@ bool ScModule::IsTableLocked()
 bLocked = pRefDlg->IsTableLocked();
 }
 }
-else
+else if (!comphelper::LibreOfficeKit::isActive())
 bLocked = true; // for other views, see IsModalMode
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-10 Thread Markus Mohrhard (via logerrit)
 sc/source/filter/excel/xecontent.cxx |   27 ---
 1 file changed, 24 insertions(+), 3 deletions(-)

New commits:
commit 569c2229dd890aad07035d81b1ce3b1b3d7bc244
Author: Markus Mohrhard 
AuthorDate: Sun Jul 15 00:18:58 2018 +0200
Commit: Andras Timar 
CommitDate: Fri May 10 08:25:43 2019 +0200

related tdf#117816, only export cond format formula to xlsx when required

Change-Id: I7523d17e9945dfbdf0c346fff8eddd40593f946a
Reviewed-on: https://gerrit.libreoffice.org/57444
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 16048ebc230880148346f02403820b7646b2649c)
Reviewed-on: https://gerrit.libreoffice.org/72007
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index 9c90d2d1c1bb..557ef69f3d93 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -939,6 +939,27 @@ bool IsTextRule(ScConditionMode eMode)
 return false;
 }
 
+bool RequiresFormula(ScConditionMode eMode)
+{
+if (IsTopBottomRule(eMode))
+return false;
+else if (IsTextRule(eMode))
+return false;
+
+switch (eMode)
+{
+case ScConditionMode::NoError:
+case ScConditionMode::Error:
+case ScConditionMode::Duplicate:
+case ScConditionMode::NotDuplicate:
+return false;
+default:
+break;
+}
+
+return true;
+}
+
 bool RequiresFixedFormula(ScConditionMode eMode)
 {
 switch(eMode)
@@ -965,9 +986,9 @@ OString GetFixedFormula(ScConditionMode eMode, const 
ScAddress& rAddress, const
 switch (eMode)
 {
 case ScConditionMode::Error:
-return "";
+return OString("ISERROR(" + aPos + ")") ;
 case ScConditionMode::NoError:
-return "";
+return OString("NOT(ISERROR(" + aPos + "))") ;
 case ScConditionMode::BeginsWith:
 return OString("LEFT(" + aPos + ",LEN(\"" + rText + "\"))=\"" + 
rText + "\"");
 case ScConditionMode::EndsWith:
@@ -1036,7 +1057,7 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->writeEscaped(aFormula.getStr());
 rWorksheet->endElement( XML_formula );
 }
-else if(!IsTextRule(eOperation) && !IsTopBottomRule(eOperation))
+else if(RequiresFormula(eOperation))
 {
 rWorksheet->startElement( XML_formula, FSEND );
 std::unique_ptr 
pTokenArray(mrFormatEntry.CreateFlatCopiedTokenArray(0));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-10 Thread Markus Mohrhard (via logerrit)
 sc/source/filter/excel/xecontent.cxx |   64 ---
 1 file changed, 53 insertions(+), 11 deletions(-)

New commits:
commit 0420bf0da699493c91164cdd8b9f8fe488f0fb67
Author: Markus Mohrhard 
AuthorDate: Sat Jul 14 23:56:44 2018 +0200
Commit: Andras Timar 
CommitDate: Fri May 10 08:25:23 2019 +0200

related tdf#117816, add more work arounds for MS Excel bugs

Another set of cases where MS Excel needs the formula.

Change-Id: I58344a540ad69ff9b8c56aa817730079bd011acd
Reviewed-on: https://gerrit.libreoffice.org/57443
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 6df45ae3a85b21d984605a6656282e5feaf8dea9)
Reviewed-on: https://gerrit.libreoffice.org/72006
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index eda436ad1b84..9c90d2d1c1bb 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -939,6 +939,50 @@ bool IsTextRule(ScConditionMode eMode)
 return false;
 }
 
+bool RequiresFixedFormula(ScConditionMode eMode)
+{
+switch(eMode)
+{
+case ScConditionMode::NoError:
+case ScConditionMode::Error:
+case ScConditionMode::BeginsWith:
+case ScConditionMode::EndsWith:
+case ScConditionMode::ContainsText:
+case ScConditionMode::NotContainsText:
+return true;
+default:
+break;
+}
+
+return false;
+}
+
+OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, 
const OString& rText)
+{
+OStringBuffer aBuffer;
+OStringBuffer aPosBuffer = XclXmlUtils::ToOString(aBuffer, rAddress);
+OString aPos = aPosBuffer.makeStringAndClear();
+switch (eMode)
+{
+case ScConditionMode::Error:
+return "";
+case ScConditionMode::NoError:
+return "";
+case ScConditionMode::BeginsWith:
+return OString("LEFT(" + aPos + ",LEN(\"" + rText + "\"))=\"" + 
rText + "\"");
+case ScConditionMode::EndsWith:
+return OString("RIGHT(" + aPos +",LEN(\"" + rText + "\"))=\"" + 
rText + "\"");
+case ScConditionMode::ContainsText:
+return OString("NOT(ISERROR(SEARCH(\"" + rText + "\"," + aPos + 
")))");
+case ScConditionMode::NotContainsText:
+return OString("ISERROR(SEARCH(\"" +  rText + "\"," + aPos + "))");
+default:
+break;
+}
+
+return OString("");
+}
+
 }
 
 void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
@@ -984,7 +1028,15 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 XML_text, aText.getStr(),
 XML_dxfId, OString::number( GetDxfs().GetDxfId( 
mrFormatEntry.GetStyle() ) ).getStr(),
 FSEND );
-if(!IsTextRule(eOperation) && !IsTopBottomRule(eOperation))
+
+if (RequiresFixedFormula(eOperation))
+{
+rWorksheet->startElement( XML_formula, FSEND );
+OString aFormula = GetFixedFormula(eOperation, 
mrFormatEntry.GetValidSrcPos(), aText);
+rWorksheet->writeEscaped(aFormula.getStr());
+rWorksheet->endElement( XML_formula );
+}
+else if(!IsTextRule(eOperation) && !IsTopBottomRule(eOperation))
 {
 rWorksheet->startElement( XML_formula, FSEND );
 std::unique_ptr 
pTokenArray(mrFormatEntry.CreateFlatCopiedTokenArray(0));
@@ -1000,16 +1052,6 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->endElement( XML_formula );
 }
 }
-else if (IsTextRule(eOperation))
-{
-OStringBuffer aBufferOld;
-OStringBuffer aBuffer = XclXmlUtils::ToOString(aBufferOld, 
mrFormatEntry.GetValidSrcPos());
-OString aTextTopCell = aBuffer.makeStringAndClear();
-OString aFormula = "NOT(ISERROR(SEARCH(\"" + aText + "\"," + 
aTextTopCell + ")))";
-rWorksheet->startElement( XML_formula, FSEND );
-rWorksheet->writeEscaped(aFormula.getStr());
-rWorksheet->endElement( XML_formula );
-}
 // OOXTODO: XML_extLst
 rWorksheet->endElement( XML_cfRule );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-10 Thread Markus Mohrhard (via logerrit)
 sc/source/filter/excel/xecontent.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit 5328e04744bbf570e70b13917a2142c0aca159ae
Author: Markus Mohrhard 
AuthorDate: Sat Jul 14 15:16:46 2018 +0200
Commit: Andras Timar 
CommitDate: Fri May 10 08:24:39 2019 +0200

tdf#117816, work around MS Excel bug with containsText cond format

Excel seems to require the formula that is equal to the containsText
condition.

According to cfRule (18.3.1.10) "Only rules with a type attribute
 value of expression support formula syntax." which contradicts the
MS EXCEL behavior.

Change-Id: Ifa3f9fee58194f70a64b37c62922513435d43bb8
Reviewed-on: https://gerrit.libreoffice.org/57432
Tested-by: Jenkins
Reviewed-by: Markus Mohrhard 
(cherry picked from commit e77596be879c25f5766b73a2f67cf0ddf7775ccc)
Reviewed-on: https://gerrit.libreoffice.org/72004
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/filter/excel/xecontent.cxx 
b/sc/source/filter/excel/xecontent.cxx
index d99607a1e0c2..eda436ad1b84 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1000,6 +1000,16 @@ void XclExpCFImpl::SaveXml( XclExpXmlStream& rStrm )
 rWorksheet->endElement( XML_formula );
 }
 }
+else if (IsTextRule(eOperation))
+{
+OStringBuffer aBufferOld;
+OStringBuffer aBuffer = XclXmlUtils::ToOString(aBufferOld, 
mrFormatEntry.GetValidSrcPos());
+OString aTextTopCell = aBuffer.makeStringAndClear();
+OString aFormula = "NOT(ISERROR(SEARCH(\"" + aText + "\"," + 
aTextTopCell + ")))";
+rWorksheet->startElement( XML_formula, FSEND );
+rWorksheet->writeEscaped(aFormula.getStr());
+rWorksheet->endElement( XML_formula );
+}
 // OOXTODO: XML_extLst
 rWorksheet->endElement( XML_cfRule );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-05-06 Thread Jan Holesovsky (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 4a226f94f506dc87fcb34486b6a00cfa2f4f0e35
Author: Jan Holesovsky 
AuthorDate: Thu Nov 15 11:51:42 2018 +0100
Commit: Aron Budea 
CommitDate: Mon May 6 15:36:36 2019 +0200

lok sc: Fix the formula input bar and address bar notifications.

Apparently we did not have the pInputWin living in the background; but
now we have.  There is no reason to treat it in an 'else' branch, these
checks should be separate either way.

Change-Id: Ibb8d92fb1e2803942460d2063847917d082fcb2e
Reviewed-on: https://gerrit.libreoffice.org/71863
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 2077b42d2433..3c65a12295fc 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3692,11 +3692,9 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
 
 if ( pInputWin )
 pInputWin->SetTextString(aString);
-else if (comphelper::LibreOfficeKit::isActive())
-{
-if (pActiveViewSh)
-
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aString.toUtf8().getStr());
-}
+
+if (comphelper::LibreOfficeKit::isActive() && 
pActiveViewSh)
+
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_FORMULA, 
aString.toUtf8().getStr());
 }
 
 if ( pInputWin || comphelper::LibreOfficeKit::isActive())  
  // Named range input
@@ -3734,10 +3732,9 @@ void ScInputHandler::NotifyChange( const 
ScInputHdlState* pState,
 
pInputWin->SetAccessibilityEventsSuppressed(bIsSuppressed);
 pInputWin->SetSumAssignMode();
 }
-else if (pActiveViewSh)
-{
+
+if (comphelper::LibreOfficeKit::isActive() && 
pActiveViewSh)
 
pActiveViewSh->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_ADDRESS, 
aPosStr.toUtf8().getStr());
-}
 }
 
 if (bStopEditing)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source sfx2/source

2019-05-02 Thread Ashod Nakashian (via logerrit)
 sc/source/ui/app/inputwin.cxx|7 ++-
 sfx2/source/control/dispatch.cxx |4 ++--
 2 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 88565c3662c6fde240c98a9b4f2ce6dfbcf4094e
Author: Ashod Nakashian 
AuthorDate: Thu Aug 9 23:14:34 2018 -0400
Commit: Jan Holesovsky 
CommitDate: Thu May 2 11:17:02 2019 +0200

sfx2: Re-enable the sidebars for LOK

This re-enables the sidebars for LOK, which were
disabled to avoid overheads.

Also, fixes a regression where editing stopped
when loading a new view because the sidebar window
creation killed the edit view.

Revert "Avoid various desktop GUI elements when used from LibreOfficeKit"
This reverts commit c0b70ec34d5e056bb92a66cbf83838923cb41fee.

Change-Id: I06b06a990f05c06b1889fa89b698dff6f494e09c
Reviewed-on: https://gerrit.libreoffice.org/71165
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d8cca415d466..33379e4dd571 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -75,6 +75,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define THESIZE 100 // Should be more than enough!
 #define TBX_WINDOW_HEIGHT   22 // in pixel - TODO: The same on all systems?
@@ -252,7 +253,11 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const 
SfxBindings* pBind ) :
 pInputHdl->SetMode( SC_INPUT_TABLE ); // Focus ends up at the 
bottom anyways
 }
 else if (pViewSh)
-pViewSh->UpdateInputHandler(true); // Absolutely necessary update
+{
+// Don't stop editing in LOK a remote user might be editing.
+const bool bStopEditing = !comphelper::LibreOfficeKit::isActive();
+pViewSh->UpdateInputHandler(true, bStopEditing); // Absolutely 
necessary update
+}
 
 SetAccessibleName(ScResId(STR_ACC_TOOLBAR_FORMULA));
 }
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 5ea2ca744ea9..04a6ca8d7ea8 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1192,7 +1192,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 return;
 
 SfxViewFrame* pTop = xImp->pFrame ? xImp->pFrame->GetTopViewFrame() : 
nullptr;
-bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this && 
!comphelper::LibreOfficeKit::isActive();
+bool bUIActive = pTop && pTop->GetBindings().GetDispatcher() == this;
 
 if ( !bUIActive && pTop && GetBindings() == >GetBindings() )
 // keep own tools internally for collecting
@@ -1255,7 +1255,7 @@ void SfxDispatcher::Update_Impl( bool bForce )
 }
 
 Update_Impl_( bUIActive, !bIsIPActive, bIsIPActive, pWorkWin );
-if ( (bUIActive || bIsActive) && !comphelper::LibreOfficeKit::isActive() )
+if (bUIActive || bIsActive)
 pWorkWin->UpdateObjectBars_Impl();
 
 if ( pBindings )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-04-25 Thread Henry Castro (via logerrit)
 sc/source/ui/inc/viewdata.hxx  |4 ++--
 sc/source/ui/view/viewdata.cxx |   23 ++-
 2 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 5e2270a1be33a3408b01729a75a09516fd4408b2
Author: Henry Castro 
AuthorDate: Fri Mar 29 09:01:05 2019 -0400
Commit: Jan Holesovsky 
CommitDate: Thu Apr 25 13:26:38 2019 +0200

sc lok: avoid save incorrect data, whether the pane has ...

horizontal / vertical splits

In the tiled rendering case the horizontal / vertical splits were
not implemented, so the leftmost visible column is 0.
So preserve horizontal / vertical splits when saving the document

Change-Id: I15b6f009910e51fdaf475de5aac1ebded16c1956
Reviewed-on: https://gerrit.libreoffice.org/69926
Tested-by: Jenkins
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/70079
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 7b58edc13736..b94c3343f70b 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -396,8 +396,8 @@ public:
 
 SCTAB   GetTabNo() const{ return nTabNo; }
 ScSplitPos  GetActivePart() const   { return 
pThisTab->eWhichActive; }
-SCCOL   GetPosX( ScHSplitPos eWhich ) const { return 
pThisTab->nPosX[eWhich]; }
-SCROW   GetPosY( ScVSplitPos eWhich ) const { return 
pThisTab->nPosY[eWhich]; }
+SCCOL   GetPosX( ScHSplitPos eWhich ) const;
+SCROW   GetPosY( ScVSplitPos eWhich ) const;
 SCCOL   GetCurX() const { return 
pThisTab->nCurX; }
 SCROW   GetCurY() const { return 
pThisTab->nCurY; }
 SCCOL   GetCurXForTab( SCTAB nTabIndex ) const;
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index c144256df7a7..ff46031d37ff 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -565,7 +565,6 @@ void ScViewDataTable::ReadUserDataSequence(const 
uno::Sequence >= nTemp32;
-nPosX[SC_SPLIT_LEFT] = bIsTiledRendering ? 0 :
-   SanitizeCol( static_cast(nTemp32));
+nPosX[SC_SPLIT_LEFT] = SanitizeCol( static_cast(nTemp32));
 }
 else if (sName == SC_POSITIONRIGHT)
 {
 aSettings[i].Value >>= nTemp32;
-nPosX[SC_SPLIT_RIGHT] = bIsTiledRendering ? 0 :
-SanitizeCol( static_cast(nTemp32));
+nPosX[SC_SPLIT_RIGHT] = SanitizeCol( static_cast(nTemp32));
 }
 else if (sName == SC_POSITIONTOP)
 {
 aSettings[i].Value >>= nTemp32;
-nPosY[SC_SPLIT_TOP] = bIsTiledRendering ? 0 :
-  SanitizeRow( static_cast(nTemp32));
+nPosY[SC_SPLIT_TOP] = SanitizeRow( static_cast(nTemp32));
 }
 else if (sName == SC_POSITIONBOTTOM)
 {
 aSettings[i].Value >>= nTemp32;
-nPosY[SC_SPLIT_BOTTOM] = bIsTiledRendering ? 0 :
- SanitizeRow( static_cast(nTemp32));
+nPosY[SC_SPLIT_BOTTOM] = SanitizeRow( static_cast(nTemp32));
 }
 else if (sName == SC_ZOOMTYPE)
 {
@@ -1364,6 +1359,16 @@ void ScViewData::ResetOldCursor()
 pThisTab->mbOldCursorValid = false;
 }
 
+SCCOL ScViewData::GetPosX( ScHSplitPos eWhich ) const
+{
+return comphelper::LibreOfficeKit::isActive() ? 0 : 
pThisTab->nPosX[eWhich];
+}
+
+SCROW ScViewData::GetPosY( ScVSplitPos eWhich ) const
+{
+return comphelper::LibreOfficeKit::isActive() ? 0 : 
pThisTab->nPosY[eWhich];
+}
+
 SCCOL ScViewData::GetCurXForTab( SCTAB nTabIndex ) const
 {
 if (!ValidTab(nTabIndex) || (nTabIndex >= 
static_cast(maTabData.size(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-04-18 Thread Jan Holesovsky (via logerrit)
 sc/source/ui/dbgui/sfiltdlg.cxx |   33 ++---
 sc/source/ui/inc/filtdlg.hxx|7 ++-
 2 files changed, 16 insertions(+), 24 deletions(-)

New commits:
commit 9bb32c6629b068c18d1f7df63a86d1cab66856eb
Author: Jan Holesovsky 
AuthorDate: Wed Apr 17 18:22:46 2019 +0200
Commit: Aron Budea 
CommitDate: Thu Apr 18 13:52:40 2019 +0200

sc: Get rid of the Idle hack in the Special Filter Dialog.

The problem is that with LOK, the creation of Idle here causes a
deadlock when the dialog is being opened and its first paint is
requested.

No real idea what change now causes the problem (this used to work), but
given that the use of the Idle is a hack in the first place, let's use
the GetFocus/LoseFocus handlers instead, and act accordingly only when
the focus of the interesting controls changes.

Change-Id: Ib6c0267a064cb31438544e47fe3e0869b575ef7c
Reviewed-on: https://gerrit.libreoffice.org/70917
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx
index fe441db8bd16..2366af951e5e 100644
--- a/sc/source/ui/dbgui/sfiltdlg.cxx
+++ b/sc/source/ui/dbgui/sfiltdlg.cxx
@@ -57,8 +57,7 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, 
SfxChildWindow* pCW, vc
 pViewData   ( nullptr ),
 pDoc( nullptr ),
 pRefInputEdit   ( nullptr ),
-bRefInputMode   ( false ),
-pIdle  ( nullptr )
+bRefInputMode   ( false )
 {
 get(pLbFilterArea,"lbfilterarea");
 get(pEdFilterArea,"edfilterarea");
@@ -83,14 +82,18 @@ ScSpecialFilterDlg::ScSpecialFilterDlg( SfxBindings* pB, 
SfxChildWindow* pCW, vc
 get(pExpander,"more");
 
 Init( rArgSet );
-pEdFilterArea->GrabFocus();
 
-// hack: control of RefInput
-pIdle = new Idle("Special Filter Dialog");
-// FIXME: this is an abomination
-pIdle->SetPriority( TaskPriority::LOWEST );
-pIdle->SetInvokeHandler( LINK( this, ScSpecialFilterDlg, TimeOutHdl ) );
-pIdle->Start();
+Link aLink = LINK(this, ScSpecialFilterDlg, 
RefInputControlHdl);
+pEdCopyArea->SetGetFocusHdl(aLink);
+pRbCopyArea->SetGetFocusHdl(aLink);
+pEdFilterArea->SetGetFocusHdl(aLink);
+pRbFilterArea->SetGetFocusHdl(aLink);
+pEdCopyArea->SetLoseFocusHdl(aLink);
+pRbCopyArea->SetLoseFocusHdl(aLink);
+pEdFilterArea->SetLoseFocusHdl(aLink);
+pRbFilterArea->SetLoseFocusHdl(aLink);
+
+pEdFilterArea->GrabFocus();
 }
 
 ScSpecialFilterDlg::~ScSpecialFilterDlg()
@@ -109,10 +112,6 @@ void ScSpecialFilterDlg::dispose()
 
 delete pOutItem;
 
-// hack: control of RefInput
-pIdle->Stop();
-delete pIdle;
-
 pLbFilterArea.clear();
 pEdFilterArea.clear();
 pRbFilterArea.clear();
@@ -389,11 +388,9 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn, 
void )
 }
 }
 
-IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pIdle, void )
+IMPL_LINK_NOARG(ScSpecialFilterDlg, RefInputControlHdl, Control&, void)
 {
-// every 50ms check whether RefInputMode is still true
-
-if( (_pIdle == pIdle) && IsActive() )
+if (IsActive())
 {
 if( pEdCopyArea->HasFocus() || pRbCopyArea->HasFocus() )
 {
@@ -411,8 +408,6 @@ IMPL_LINK( ScSpecialFilterDlg, TimeOutHdl, Timer*, _pIdle, 
void )
 bRefInputMode = false;
 }
 }
-
-pIdle->Start();
 }
 
 IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox&, rLb, void )
diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx
index 1505a0bec22f..829cb0b2c7fa 100644
--- a/sc/source/ui/inc/filtdlg.hxx
+++ b/sc/source/ui/inc/filtdlg.hxx
@@ -206,9 +206,6 @@ private:
 VclPtr   pRefInputEdit;
 boolbRefInputMode;
 
-// Hack: RefInput control
-Idle*  pIdle;
-
 private:
 voidInit( const SfxItemSet& rArgSet );
 ScQueryItem*GetOutputItem( const ScQueryParam& rParam,
@@ -219,8 +216,8 @@ private:
 DECL_LINK( FilterAreaModHdl, Edit&, void );
 DECL_LINK( EndDlgHdl,  Button*, void );
 
-// Hack: RefInput control
-DECL_LINK( TimeOutHdl, Timer*, void );
+// RefInput control
+DECL_LINK( RefInputControlHdl, Control&, void );
 };
 
 #endif // INCLUDED_SC_SOURCE_UI_INC_FILTDLG_HXX
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-04-01 Thread Tor Lillqvist (via logerrit)
 sc/source/ui/view/viewfun5.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit c502cfeb4ce3fe5f679666c825eb105ef249fe7d
Author: Tor Lillqvist 
AuthorDate: Mon Apr 1 15:50:53 2019 +0300
Commit: Tor Lillqvist 
CommitDate: Mon Apr 1 16:14:10 2019 +0300

Avoid "Text Import" dialog if invoking Paste() from OLE Automation

Change-Id: Ib12b628eee25273aa489dbbd86004167ca105c0b

diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 1590baee2f97..affdaa4a0076 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -334,9 +335,10 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId 
nFormatId,
 else if ((nFormatId == SotClipboardFormatId::STRING || nFormatId 
== SotClipboardFormatId::STRING_TSVC)
 && aDataHelper.GetString( nFormatId, *pStrBuffer ))
 {
-// Do CSV dialog if more than one line.
+// Do CSV dialog if more than one line. But not if invoked 
from Automation.
 sal_Int32 nDelim = pStrBuffer->indexOf('\n');
-if (nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
+if (!comphelper::Automation::AutomationInvokedZone::isActive()
+&& nDelim >= 0 && nDelim != pStrBuffer->getLength () - 1)
 {
 vcl::Window* pParent = 
comphelper::LibreOfficeKit::isActive() ? GetActiveWin() : nullptr;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-01-18 Thread Libreoffice Gerrit user
 sc/source/ui/view/cellsh1.cxx |   65 +-
 1 file changed, 33 insertions(+), 32 deletions(-)

New commits:
commit 171710c655061b3ac80b764cb234eec02224b639
Author: Noel Grandin 
AuthorDate: Thu Jan 10 14:42:36 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 18 14:24:57 2019 +0100

make Format->Conditional Formatting->Manage dialog async

Reviewed-on: https://gerrit.libreoffice.org/66097
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit f548dfa29239913fd71be67eadc2905010cabd95)

Change-Id: I13a40c13340ea34cbcbde11289d3420855a7264f
Reviewed-on: https://gerrit.libreoffice.org/66206
Reviewed-by: Mert Tümer 
Tested-by: Mert Tümer 
Reviewed-by: Noel Grandin 

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index abed90879ea8..e1af6030e534 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2651,44 +2651,45 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 if (!pList)
 pList = pDoc->GetCondFormList( aPos.Tab() );
 
-ScopedVclPtr 
pDlg(pFact->CreateScCondFormatMgrDlg(
+VclPtr 
pDlg(pFact->CreateScCondFormatMgrDlg(
 pTabViewShell->GetDialogParent(), pDoc, pList));
 
 if (pDlgItem)
 pDlg->SetModified();
 
-short nRet = pDlg->Execute();
-ScConditionalFormatList* pCondFormatList = 
pDlg->GetConditionalFormatList();
-if(nRet == RET_OK && pDlg->CondFormatsChanged())
-{
-
pData->GetDocShell()->GetDocFunc().SetConditionalFormatList(pCondFormatList, 
aPos.Tab());
-}
-else if(nRet == DLG_RET_ADD)
-{
-// Put the xml string parameter to initialize the
-// Conditional Format Dialog. ( add new )
-pTabViewShell->GetPool().Put(ScCondFormatDlgItem(
-
std::shared_ptr(pCondFormatList), -1, true));
-// Queue message to open Conditional Format Dialog
-GetViewData()->GetDispatcher().Execute( 
SID_OPENDLG_CONDFRMT, SfxCallMode::ASYNCHRON );
-}
-else if (nRet == DLG_RET_EDIT)
-{
-ScConditionalFormat* pFormat = 
pDlg->GetCondFormatSelected();
-sal_Int32 nIndex = pFormat ? pFormat->GetKey() : -1;
-// Put the xml string parameter to initialize the
-// Conditional Format Dialog. ( edit selected conditional 
format )
-pTabViewShell->GetPool().Put(ScCondFormatDlgItem(
-
std::shared_ptr(pCondFormatList), nIndex, true));
-
-// Queue message to open Conditional Format Dialog
-GetViewData()->GetDispatcher().Execute( 
SID_OPENDLG_CONDFRMT, SfxCallMode::ASYNCHRON );
-}
-else
-delete pCondFormatList;
+pDlg->StartExecuteAsync([this, pDlg, pData, pTabViewShell, 
pDlgItem, aPos](sal_Int32 nRet){
+std::unique_ptr 
pCondFormatList(pDlg->GetConditionalFormatList());
+if(nRet == RET_OK && pDlg->CondFormatsChanged())
+{
+
pData->GetDocShell()->GetDocFunc().SetConditionalFormatList(pCondFormatList.release(),
 aPos.Tab());
+}
+else if(nRet == DLG_RET_ADD)
+{
+// Put the xml string parameter to initialize the
+// Conditional Format Dialog. ( add new )
+pTabViewShell->GetPool().Put(ScCondFormatDlgItem(
+
std::shared_ptr(pCondFormatList.release()), -1, true));
+// Queue message to open Conditional Format Dialog
+GetViewData()->GetDispatcher().Execute( 
SID_OPENDLG_CONDFRMT, SfxCallMode::ASYNCHRON );
+}
+else if (nRet == DLG_RET_EDIT)
+{
+ScConditionalFormat* pFormat = 
pDlg->GetCondFormatSelected();
+sal_Int32 nIndex = pFormat ? pFormat->GetKey() : -1;
+// Put the xml string parameter to initialize the
+// Conditional Format Dialog. ( edit selected 
conditional format )
+pTabViewShell->GetPool().Put(ScCondFormatDlgItem(
+
std::shared_ptr(pCondFormatList.release()), nIndex, 
true));
+
+// Queue message to open Conditional Format Dialog
+GetViewData()->GetDispatcher().Execute( 
SID_OPENDLG_CONDFRMT, SfxCallMode::ASYNCHRON );
+}
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2019-01-17 Thread Libreoffice Gerrit user
 sc/source/ui/pagedlg/scuitphfedit.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 22f4ea728e58ff6c1ac5e0caf3c147770436215a
Author: Aron Budea 
AuthorDate: Thu Jan 17 19:15:12 2019 +0100
Commit: Aron Budea 
CommitDate: Thu Jan 17 19:15:12 2019 +0100

[cp] build fix

Change-Id: If61e862e08bce4405b6a94c868d94d7c6a6c844a

diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx 
b/sc/source/ui/pagedlg/scuitphfedit.cxx
index 877a0ed97b19..151ee8e1cc26 100644
--- a/sc/source/ui/pagedlg/scuitphfedit.cxx
+++ b/sc/source/ui/pagedlg/scuitphfedit.cxx
@@ -70,7 +70,7 @@ ScHFEditPage::ScHFEditPage( vcl::Window* pParent,
 // tdf#114695 override natural size with a small value
 // we expect this to get stretched to some larger but
 // limited size based on surrounding widgets
-m_pLbDefined->set_width_request(m_pLbDefined->approximate_digit_width() * 
20);
+m_pLbDefined->set_width_request(m_pLbDefined->approximate_char_width() * 
20);
 
 get(m_pBtnText,"buttonBTN_TEXT");
 get(m_pBtnTable,"buttonBTN_TABLE");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-12-29 Thread Libreoffice Gerrit user
 sc/source/ui/condformat/condformatdlg.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 9972e23fa2ac292310df86c5b7e7ec4d7d6acea6
Author: Mike Kaganski 
AuthorDate: Tue Dec 4 21:28:46 2018 +0300
Commit: Andras Timar 
CommitDate: Sat Dec 29 20:21:04 2018 +0100

tdf#117332: select replaced text to properly replace it next time

... othervise the next drag event will insert the new range immediately
after the just inserted, resulting in invalid reference.

Regression after commit 42aece949ec96c775b31216bddd723aa5321e966

  don't replace content of formula field when selecting range, tdf#58635

Change-Id: I7dfdc1ce041ebadf4406dbb605676d87cd489efa
Reviewed-on: https://gerrit.libreoffice.org/64574
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
(cherry picked from commit 6c5839d399c6277a7f2f0e214a20996761563525)
Reviewed-on: https://gerrit.libreoffice.org/65083
Tested-by: Aron Budea 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index 4f9f82568d1a..00adeac4e296 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -655,7 +655,13 @@ void ScCondFormatDlg::SetReference(const ScRange& rRef, 
ScDocument*)
 OUString aRefStr(rRef.Format(nFlags, mpViewData->GetDocument(),
 
ScAddress::Details(mpViewData->GetDocument()->GetAddressConvention(), 0, 0)));
 if (pEdit != mpEdRange)
+{
+Selection sel = pEdit->GetSelection();
+sel.Justify();// in case of RtL selection
+sel.Max() = sel.Min() + aRefStr.getLength();
 pEdit->ReplaceSelected(aRefStr);
+pEdit->SetSelection(sel); // to replace it again with next drag 
event
+}
 else
 pEdit->SetRefString( aRefStr );
 updateTitle();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-11-05 Thread Libreoffice Gerrit user
 sc/source/ui/attrdlg/scabstdlg.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit a24b393dd584fe1bb6a9524c91a043fccf99e694
Author: Tor Lillqvist 
AuthorDate: Mon Nov 5 13:09:46 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Nov 5 18:23:13 2018 +0100

Make ScAbstractDialogFactory::Create() do its job also on non-DESKTOP

Change-Id: Id97c9ead810f266239898cc559172b841bc6902f
(cherry picked from commit 729af05280a5b1755f78eee4669e36e287048253)
Reviewed-on: https://gerrit.libreoffice.org/62917
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx 
b/sc/source/ui/attrdlg/scabstdlg.cxx
index a75cbfb39de9..1cdc8b9bf42a 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-
 #include 
 
 #include 
@@ -39,7 +37,6 @@ extern "C" ScAbstractDialogFactory* ScCreateDialogFactory();
 ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
 {
 ScFuncPtrCreateDialogFactory fp = nullptr;
-#if HAVE_FEATURE_DESKTOP
 #ifndef DISABLE_DYNLOADING
 static ::osl::Module aDialogLibrary;
 
@@ -53,7 +50,6 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
 #else
 fp = ScCreateDialogFactory;
 #endif
-#endif
 if ( fp )
 return fp();
 return nullptr;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-11-05 Thread Libreoffice Gerrit user
 sc/source/ui/attrdlg/scabstdlg.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c35ed64c259085b8c13459eab91f89bccb1753a4
Author: Tor Lillqvist 
AuthorDate: Mon Nov 5 11:31:00 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Nov 5 18:20:28 2018 +0100

We want the function pointer here, but not call it yet

We will call it just a few lines later.

Change-Id: Id979fb7fdaebd05f2432d8917b921d1b1779d8a7
(cherry picked from commit e5ccf0c141c8d75323623803a3ef21c48c8cd423)
Reviewed-on: https://gerrit.libreoffice.org/62915
Reviewed-by: Tor Lillqvist 
Tested-by: Tor Lillqvist 

diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx 
b/sc/source/ui/attrdlg/scabstdlg.cxx
index f0582fa7d724..a75cbfb39de9 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -51,7 +51,7 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
 fp = reinterpret_cast(
 aDialogLibrary.getFunctionSymbol( "ScCreateDialogFactory" ));
 #else
-fp = ScCreateDialogFactory();
+fp = ScCreateDialogFactory;
 #endif
 #endif
 if ( fp )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-10-23 Thread Libreoffice Gerrit user
 sc/source/filter/excel/xeformula.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e840ab22b71898c07a4d44dbeae250f93b7b5983
Author: Eike Rathke 
AuthorDate: Mon Oct 22 22:07:54 2018 +0200
Commit: Andras Timar 
CommitDate: Tue Oct 23 19:22:37 2018 +0200

Resolves: tdf#120689 omit  for ocMacro in OOXML

Change-Id: I7578d568d2afe5d3a45b31a8a349cd370b03fc67
Reviewed-on: https://gerrit.libreoffice.org/62204
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 4df55ffee791b9fcb4b2f5e6c64ad15b34316faf)

diff --git a/sc/source/filter/excel/xeformula.cxx 
b/sc/source/filter/excel/xeformula.cxx
index dab92a0ba6a9..614794445b5c 100644
--- a/sc/source/filter/excel/xeformula.cxx
+++ b/sc/source/filter/excel/xeformula.cxx
@@ -1632,7 +1632,11 @@ void XclExpFmlaCompImpl::AppendDefaultParam( 
XclExpFuncData& rFuncData )
 AppendEuroToolCallToken( rFuncData.GetExtFuncData() );
 break;
 case ocMacro:
-AppendMacroCallToken( rFuncData.GetExtFuncData() );
+// Do not write the OOXML  element.
+if (GetOutput() == EXC_OUTPUT_XML_2007)
+AppendNameToken( 0 ); // dummy to keep parameter count 
valid
+else
+AppendMacroCallToken( rFuncData.GetExtFuncData() );
 break;
 default:
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-10-19 Thread Libreoffice Gerrit user
 sc/source/filter/oox/workbookhelper.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1121ee14d673955d7ebdaec296680ef7b4f062d3
Author: Aron Budea 
AuthorDate: Fri Oct 19 20:56:35 2018 +0200
Commit: Aron Budea 
CommitDate: Fri Oct 19 20:56:35 2018 +0200

[cp] Add another known good generator.

Change-Id: I05a9aff0d1bddf0efd2491f09fe0fbf7144e8b4d

diff --git a/sc/source/filter/oox/workbookhelper.cxx 
b/sc/source/filter/oox/workbookhelper.cxx
index b3480d51f6bf..2a24577627ac 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -542,7 +542,7 @@ void WorkbookGlobals::initialize()
 aCalcConfig.SetStringRefSyntax( formula::FormulaGrammar::CONV_XL_A1 ) ;
 mpDoc->SetCalcConfig(aCalcConfig);
 }
-else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice"))
+else if (aGenerator.startsWithIgnoreAsciiCase("LibreOffice") || 
aGenerator.startsWithIgnoreAsciiCase("Collabora"))
 {
 mbGeneratorKnownGood = true;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/core/data/document.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 145f9efd4d70b16771ba0a4ff2e16630b8f8af0b
Author: Stephan Bergmann 
AuthorDate: Wed Jun 27 09:20:38 2018 +0200
Commit: Andras Timar 
CommitDate: Mon Aug 27 22:08:12 2018 +0200

Null deref in ScDocument::IsClipboardSource

Appears to be a regression introduced with
b6b1ded0a0539e7be1b5338de378a3276a6ff445 "sc: replace ScCaptionPtr with
std::shared_ptr, tdf#117997, tdf#117228".  Reported e.g. as
 during
CppunitTest_sc_subsequent_export_test and CppunitTest_sc_ucalc:

> /sc/source/core/data/document.cxx:2574:28: runtime error: member call on 
null pointer of type 'ScDocShell'
> #0 0x2b9971542d76 in ScDocument::IsClipboardSource() const 
/sc/source/core/data/document.cxx:2574:28
> #1 0x2b99722b7762 in ScFormulaCell::ScFormulaCell(ScFormulaCell 
const&, ScDocument&, ScAddress const&, ScCloneFlags) 
/sc/source/core/data/formulacell.cxx:844:14
> #2 0x2b996fee35b0 in ScCellValue::assign(ScCellValue const&, 
ScDocument&, ScCloneFlags) /sc/source/core/data/cellvalue.cxx:395:29
> #3 0x2b997312db22 in ScChangeTrack::Clone(ScDocument*) const 
/sc/source/core/tool/chgtrack.cxx:4565:25
> #4 0x2b99cd1728be in XclExpChangeTrack::CreateTempChangeTrack() 
/sc/source/filter/xcl97/XclExpChangeTrack.cxx:1561:12
> #5 0x2b99cd169a74 in XclExpChangeTrack::XclExpChangeTrack(XclExpRoot 
const&) /sc/source/filter/xcl97/XclExpChangeTrack.cxx:1418:39
> #6 0x2b99cab087c0 in ExcDocument::ReadDoc() 
/sc/source/filter/excel/excdoc.cxx:788:41
> #7 0x2b99cadddc2e in ExportBiff5::Write() 
/sc/source/filter/excel/expop2.cxx:112:5
> #8 0x2b99cab8ee83 in lcl_ExportExcelBiff(SfxMedium&, ScDocument*, 
SvStream*, bool, unsigned short) /sc/source/filter/excel/excel.cxx:181:16
> #9 0x2b99cab8d342 in 
ScFormatFilterPluginImpl::ScExportExcel5(SfxMedium&, ScDocument*, 
ExportFormatExcel, unsigned short) /sc/source/filter/excel/excel.cxx:219:16
> #10 0x2b99768df9d2 in ScDocShell::ConvertTo(SfxMedium&) 
/sc/source/ui/docshell/docsh.cxx:2419:30
> #11 0x2b998a7e2550 in SfxObjectShell::SaveTo_Impl(SfxMedium&, 
SfxItemSet const*) /sfx2/source/doc/objstor.cxx:1513:19
> #12 0x2b998a7fe5e2 in SfxObjectShell::DoSaveAs(SfxMedium&) 
/sfx2/source/doc/objstor.cxx:1900:17
> #13 0x2b9985a31bb6 in ScBootstrapFixture::saveAndReload(ScDocShell*, 
rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, 
SfxFilterFlags) /sc/qa/unit/helper/qahelper.cxx:664:5
> #14 0x2b9985a34593 in ScBootstrapFixture::saveAndReload(ScDocShell*, 
int) /sc/qa/unit/helper/qahelper.cxx:686:28
> #15 0x2b9956fca835 in ScExportTest::testTrackChangesSimpleXLSX() 
/sc/qa/unit/subsequent_export-test.cxx:2618:29
> #16 0x2b9957203058 in void std::_Mem_fn_base::operator()<, void>(ScExportTest*) const 
/home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:600:11
> #17 0x2b9957202d63 in void std::_Bind (ScExportTest*)>::__call(std::tuple<>&&, 
std::_Index_tuple<0ul>) 
/home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1073:11
> #18 0x2b9957202771 in void std::_Bind (ScExportTest*)>::operator()<, void>() 
/home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1131:11
> #19 0x2b9957201149 in std::_Function_handler (ScExportTest*)> 
>::_M_invoke(std::_Any_data const&) 
/home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:1871:2
> #20 0x2b9957203ad0 in std::function::operator()() const 
/home/tdf/lode/opt_private/lib/gcc/x86_64-unknown-linux-gnu/5.2.0/../../../../include/c++/5.2.0/functional:2271:14
> #21 0x2b99571ff885 in CppUnit::TestCaller::runTest() 
/workdir/UnpackedTarball/cppunit/include/cppunit/TestCaller.h:175:7
> #22 0x2b990c338e7d in CppUnit::TestCaseMethodFunctor::operator()() 
const /workdir/UnpackedTarball/cppunit/src/cppunit/TestCase.cpp:32:5
> #23 0x2b99294cb4d6 in (anonymous 
namespace)::Protector::protect(CppUnit::Functor const&, 
CppUnit::ProtectorContext const&) /test/source/vclbootstrapprotector.cxx:48:14
> #24 0x2b990c2f7947 in 
CppUnit::ProtectorChain::ProtectFunctor::operator()() const 
/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12
> #25 0x2b991bcad7a6 in (anonymous 
namespace)::Prot::protect(CppUnit::Functor const&, CppUnit::ProtectorContext 
const&) 
/unotest/source/cpp/unobootstrapprotector/unobootstrapprotector.cxx:89:12
> #26 0x2b990c2f7947 in 
CppUnit::ProtectorChain::ProtectFunctor::operator()() const 
/workdir/UnpackedTarball/cppunit/src/cppunit/ProtectorChain.cpp:20:12
> #27 0x2b9917d39e13 in (anonymous 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/docshell/docsh.cxx  |  542 +++
 sc/source/ui/docshell/docsh2.cxx |   42 +--
 sc/source/ui/docshell/docsh3.cxx |  156 +--
 sc/source/ui/docshell/docsh4.cxx |  342 
 sc/source/ui/docshell/docsh5.cxx |  226 
 sc/source/ui/docshell/docsh6.cxx |   66 ++--
 sc/source/ui/docshell/docsh8.cxx |   40 +-
 sc/source/ui/inc/docsh.hxx   |   70 ++---
 8 files changed, 742 insertions(+), 742 deletions(-)

New commits:
commit 5ae953e0db0c3e1d52e658138e1ea7cf4c274235
Author: Henry Castro 
AuthorDate: Thu May 31 17:39:26 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 21:50:17 2018 +0200

sc: prefix members of ScDocShell

Change-Id: I7c2a4e5e850b26da515719f7df869f12c49b0ad3
Reviewed-on: https://gerrit.libreoffice.org/55148
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59627
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index a1bab9b3fb62..3940260f4e6d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -208,7 +208,7 @@ void ScDocShell::FillClass( SvGlobalName* pClassName,
 
 std::set ScDocShell::GetDocColors()
 {
-return aDocument.GetDocColors();
+return m_aDocument.GetDocColors();
 }
 
 void ScDocShell::DoEnterHandler()
@@ -238,16 +238,16 @@ HiddenInformation ScDocShell::GetHiddenInformationState( 
HiddenInformation nStat
 
 if ( nStates & HiddenInformation::RECORDEDCHANGES )
 {
-if ( aDocument.GetChangeTrack() && 
aDocument.GetChangeTrack()->GetFirst() )
+if ( m_aDocument.GetChangeTrack() && 
m_aDocument.GetChangeTrack()->GetFirst() )
   nState |= HiddenInformation::RECORDEDCHANGES;
 }
 if ( nStates & HiddenInformation::NOTES )
 {
-SCTAB nTableCount = aDocument.GetTableCount();
+SCTAB nTableCount = m_aDocument.GetTableCount();
 bool bFound = false;
 for (SCTAB nTab = 0; nTab < nTableCount && !bFound; ++nTab)
 {
-if (aDocument.HasTabNotes(nTab)) //TODO:
+if (m_aDocument.HasTabNotes(nTab)) //TODO:
 bFound = true;
 }
 
@@ -260,17 +260,17 @@ HiddenInformation ScDocShell::GetHiddenInformationState( 
HiddenInformation nStat
 
 void ScDocShell::BeforeXMLLoading()
 {
-aDocument.EnableIdle(false);
+m_aDocument.EnableIdle(false);
 
 // prevent unnecessary broadcasts and updates
-OSL_ENSURE(pModificator == nullptr, "The Modificator should not exist");
-pModificator = new ScDocShellModificator( *this );
+OSL_ENSURE(m_pModificator == nullptr, "The Modificator should not exist");
+m_pModificator = new ScDocShellModificator( *this );
 
-aDocument.SetImportingXML( true );
-aDocument.EnableExecuteLink( false );   // #i101304# to be safe, prevent 
nested loading from external references
-aDocument.EnableUndo( false );
+m_aDocument.SetImportingXML( true );
+m_aDocument.EnableExecuteLink( false );   // #i101304# to be safe, prevent 
nested loading from external references
+m_aDocument.EnableUndo( false );
 // prevent unnecessary broadcasts and "half way listeners"
-aDocument.SetInsertingFromOtherDoc( true );
+m_aDocument.SetInsertingFromOtherDoc( true );
 }
 
 void ScDocShell::AfterXMLLoading(bool bRet)
@@ -279,22 +279,22 @@ void ScDocShell::AfterXMLLoading(bool bRet)
 {
 UpdateLinks();
 // don't prevent establishing of listeners anymore
-aDocument.SetInsertingFromOtherDoc( false );
+m_aDocument.SetInsertingFromOtherDoc( false );
 if ( bRet )
 {
-ScChartListenerCollection* pChartListener = 
aDocument.GetChartListenerCollection();
+ScChartListenerCollection* pChartListener = 
m_aDocument.GetChartListenerCollection();
 if (pChartListener)
 pChartListener->UpdateDirtyCharts();
 
 // #95582#; set the table names of linked tables to the new path
-SCTAB nTabCount = aDocument.GetTableCount();
+SCTAB nTabCount = m_aDocument.GetTableCount();
 for (SCTAB i = 0; i < nTabCount; ++i)
 {
-if (aDocument.IsLinked( i ))
+if (m_aDocument.IsLinked( i ))
 {
 OUString aName;
-aDocument.GetName(i, aName);
-OUString aLinkTabName = aDocument.GetLinkTab(i);
+m_aDocument.GetName(i, aName);
+OUString aLinkTabName = m_aDocument.GetLinkTab(i);
 sal_Int32 nLinkTabNameLength = aLinkTabName.getLength();
 sal_Int32 nNameLength = aName.getLength();
 if (nLinkTabNameLength < nNameLength)
@@ -325,8 +325,8 @@ void ScDocShell::AfterXMLLoading(bool bRet)
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/app/scmod.cxx |   24 +---
 1 file changed, 9 insertions(+), 15 deletions(-)

New commits:
commit c005382ee9e7d8ab90bafe76e29c946dee0accf5
Author: Henry Castro 
AuthorDate: Mon May 28 10:20:53 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 21:29:00 2018 +0200

sc: simplify ScModule::GetClipDoc

Change-Id: I36a79a41b989d37efc35a9f9b4bebca9bdaf9ee9
Reviewed-on: https://gerrit.libreoffice.org/54935
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59625
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 627dba2ec79f..9a2f890b35ea 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -664,28 +664,22 @@ void ScModule::SetDragJump(
 ScDocument* ScModule::GetClipDoc()
 {
 // called from document
+SfxViewFrame* pViewFrame = nullptr;
 ScTabViewShell* pViewShell = nullptr;
-const ScTransferObj* pObj = nullptr;
+css::uno::Reference xTransferable;
 
 if ((pViewShell = dynamic_cast(SfxViewShell::Current(
-pObj = ScTransferObj::GetOwnClipboard(pViewShell->GetClipData());
+xTransferable.set(pViewShell->GetClipData());
 else if ((pViewShell = 
dynamic_cast(SfxViewShell::GetFirst(
-pObj = ScTransferObj::GetOwnClipboard(pViewShell->GetClipData());
-else
+xTransferable.set(pViewShell->GetClipData());
+else if ((pViewFrame = SfxViewFrame::GetFirst()))
 {
-css::uno::Reference 
xClipboard;
-
-if (SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst())
-xClipboard = pViewFrame->GetWindow().GetClipboard();
-
-if (xClipboard.is())
-{
-css::uno::Reference 
xTransferable(
-xClipboard->getContents(), css::uno::UNO_QUERY);
-pObj = ScTransferObj::GetOwnClipboard(xTransferable);
-}
+css::uno::Reference 
xClipboard =
+pViewFrame->GetWindow().GetClipboard();
+xTransferable.set(xClipboard.is() ? xClipboard->getContents() : 
nullptr, css::uno::UNO_QUERY);
 }
 
+const ScTransferObj* pObj = ScTransferObj::GetOwnClipboard(xTransferable);
 if (pObj)
 {
 ScDocument* pDoc = pObj->GetDocument();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/app/drwtrans.cxx |  152 +-
 sc/source/ui/inc/drwtrans.hxx |   32 
 2 files changed, 92 insertions(+), 92 deletions(-)

New commits:
commit beef3e6c9782c7ad38b59fa75d25531c0e9531a9
Author: Henry Castro 
AuthorDate: Tue May 8 14:05:01 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 20:31:46 2018 +0200

sc: prefix members of ScDrawTransferObj

Change-Id: I6a9ad039ec8b34470dd8c5e232b76fa8f686f219
Reviewed-on: https://gerrit.libreoffice.org/54002
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59621
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index d661d1711a0d..b2ac16670efc 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -74,21 +74,21 @@ constexpr sal_uInt32 SCDRAWTRANS_TYPE_DOCUMENT  = 3;
 
 ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* 
pContainerShell,
 const TransferableObjectDescriptor& 
rDesc ) :
-pModel( pClipModel ),
-aObjDesc( rDesc ),
-pBookmark( nullptr ),
-bGraphic( false ),
-bGrIsBit( false ),
-bOleObj( false ),
-pDragSourceView( nullptr ),
-nDragSourceFlags( ScDragSrc::Undefined ),
-bDragWasInternal( false ),
+m_pModel( pClipModel ),
+m_aObjDesc( rDesc ),
+m_pBookmark( nullptr ),
+m_bGraphic( false ),
+m_bGrIsBit( false ),
+m_bOleObj( false ),
+m_pDragSourceView( nullptr ),
+m_nDragSourceFlags( ScDragSrc::Undefined ),
+m_bDragWasInternal( false ),
 maShellID(SfxObjectShell::CreateShellID(pContainerShell))
 {
 
 //  check what kind of objects are contained
 
-SdrPage* pPage = pModel->GetPage(0);
+SdrPage* pPage = m_pModel->GetPage(0);
 if (pPage)
 {
 SdrObjListIter aIter( *pPage, SdrIterMode::Flat );
@@ -106,7 +106,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, 
ScDocShell* pContain
 {
 uno::Reference< embed::XEmbedPersist > xPersObj( 
static_cast(pObject)->GetObjRef(), uno::UNO_QUERY );
 if ( xPersObj.is() && xPersObj->hasEntry() )
-bOleObj = true;
+m_bOleObj = true;
 }
 catch( uno::Exception& )
 {}
@@ -117,9 +117,9 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, 
ScDocShell* pContain
 
 if (nSdrObjKind == OBJ_GRAF)
 {
-bGraphic = true;
+m_bGraphic = true;
 if ( static_cast(pObject)->GetGraphic().GetType() 
== GraphicType::Bitmap )
-bGrIsBit = true;
+m_bGrIsBit = true;
 }
 
 //  URL button
@@ -174,7 +174,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, 
ScDocShell* pContain
 aLabel = sTmp;
 }
 }
-pBookmark = new INetBookmark( aAbs, aLabel 
);
+m_pBookmark = new INetBookmark( aAbs, 
aLabel );
 }
 }
 }
@@ -188,20 +188,20 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* 
pClipModel, ScDocShell* pContain
 
 // #i71538# use complete SdrViews
 // SdrExchangeView aView(pModel);
-SdrView aView(pModel);
+SdrView aView(m_pModel);
 SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
 aView.MarkAllObj(pPv);
-aSrcSize = aView.GetAllMarkedRect().GetSize();
+m_aSrcSize = aView.GetAllMarkedRect().GetSize();
 
-if ( bOleObj )  // single OLE object
+if ( m_bOleObj )  // single OLE object
 {
 SdrOle2Obj* pObj = GetSingleObject();
 if ( pObj && pObj->GetObjRef().is() )
-SvEmbedTransferHelper::FillTransferableObjectDescriptor( aObjDesc, 
pObj->GetObjRef(), pObj->GetGraphic(), pObj->GetAspect() );
+SvEmbedTransferHelper::FillTransferableObjectDescriptor( 
m_aObjDesc, pObj->GetObjRef(), pObj->GetGraphic(), pObj->GetAspect() );
 }
 
-aObjDesc.maSize = aSrcSize;
-PrepareOLE( aObjDesc );
+m_aObjDesc.maSize = m_aSrcSize;
+PrepareOLE( m_aObjDesc );
 
 // remember a unique ID of the source document
 
@@ -226,14 +226,14 @@ ScDrawTransferObj::~ScDrawTransferObj()
 pScMod->ResetDragObject();
 }
 
-aOleData = TransferableDataHelper();// clear before releasing the 
mutex
-aDocShellRef.clear();
+m_aOleData = TransferableDataHelper();// clear before releasing 
the mutex
+m_aDocShellRef.clear();
 
-delete pModel;
-aDrawPersistRef.clear();// after the model
+delete 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/app/transobj.cxx |  190 +-
 sc/source/ui/inc/transobj.hxx |   56 ++--
 2 files changed, 123 insertions(+), 123 deletions(-)

New commits:
commit 2b99d712473b0dcc9d87a1eb3d7e70b0702c9664
Author: Henry Castro 
AuthorDate: Sun May 6 23:19:55 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 20:28:04 2018 +0200

sc: prefix members of ScTransferObj

Change-Id: I553c552a62b817642b4ce430610e4d9b690d3aae
Reviewed-on: https://gerrit.libreoffice.org/53923
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59620
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 333a255e19a5..d350ee6a5640 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -115,19 +115,19 @@ void ScTransferObj::PaintToDev( OutputDevice* pDev, 
ScDocument* pDoc, double nPr
 }
 
 ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDescriptor& rDesc ) :
-pDoc( pClipDoc ),
-nNonFiltered(0),
-aObjDesc( rDesc ),
-nDragHandleX( 0 ),
-nDragHandleY( 0 ),
-nSourceCursorX( MAXCOL + 1 ),
-nSourceCursorY( MAXROW + 1 ),
-nDragSourceFlags( ScDragSrc::Undefined ),
-bDragWasInternal( false ),
-bUsedForLink( false ),
-bUseInApi( false )
+m_pDoc( pClipDoc ),
+m_nNonFiltered(0),
+m_aObjDesc( rDesc ),
+m_nDragHandleX( 0 ),
+m_nDragHandleY( 0 ),
+m_nSourceCursorX( MAXCOL + 1 ),
+m_nSourceCursorY( MAXROW + 1 ),
+m_nDragSourceFlags( ScDragSrc::Undefined ),
+m_bDragWasInternal( false ),
+m_bUsedForLink( false ),
+m_bUseInApi( false )
 {
-OSL_ENSURE(pDoc->IsClipboard(), "wrong document");
+OSL_ENSURE(m_pDoc->IsClipboard(), "wrong document");
 
 // get aBlock from clipboard doc
 
@@ -135,21 +135,21 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 SCROW nRow1;
 SCCOL nCol2;
 SCROW nRow2;
-pDoc->GetClipStart( nCol1, nRow1 );
-pDoc->GetClipArea( nCol2, nRow2, true );// real source area - include 
filtered rows
+m_pDoc->GetClipStart( nCol1, nRow1 );
+m_pDoc->GetClipArea( nCol2, nRow2, true );// real source area - 
include filtered rows
 nCol2 = sal::static_int_cast( nCol2 + nCol1 );
 nRow2 = sal::static_int_cast( nRow2 + nRow1 );
 
 SCCOL nDummy;
-pDoc->GetClipArea( nDummy, nNonFiltered, false );
-bHasFiltered = (nNonFiltered < (nRow2 - nRow1));
-++nNonFiltered; // to get count instead of diff
+m_pDoc->GetClipArea( nDummy, m_nNonFiltered, false );
+m_bHasFiltered = (m_nNonFiltered < (nRow2 - nRow1));
+++m_nNonFiltered; // to get count instead of diff
 
 SCTAB nTab1=0;
 SCTAB nTab2=0;
 bool bFirst = true;
-for (SCTAB i=0; i< pDoc->GetTableCount(); i++)
-if (pDoc->HasTable(i))
+for (SCTAB i=0; i< m_pDoc->GetTableCount(); i++)
+if (m_pDoc->HasTable(i))
 {
 if (bFirst)
 nTab1 = i;
@@ -164,19 +164,19 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 {
 SCROW nMaxRow;
 SCCOL nMaxCol;
-GetAreaSize( pDoc, nTab1, nTab2, nMaxRow, nMaxCol );
+GetAreaSize( m_pDoc, nTab1, nTab2, nMaxRow, nMaxCol );
 if( nMaxRow < nRow2 )
 nRow2 = nMaxRow;
 if( nMaxCol < nCol2 )
 nCol2 = nMaxCol;
 }
 
-aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
-nVisibleTab = nTab1;// valid table as default
+m_aBlock = ScRange( nCol1, nRow1, nTab1, nCol2, nRow2, nTab2 );
+m_nVisibleTab = nTab1;// valid table as default
 
-tools::Rectangle aMMRect = pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, 
nTab1 );
-aObjDesc.maSize = aMMRect.GetSize();
-PrepareOLE( aObjDesc );
+tools::Rectangle aMMRect = m_pDoc->GetMMRect( nCol1,nRow1, nCol2,nRow2, 
nTab1 );
+m_aObjDesc.maSize = aMMRect.GetSize();
+PrepareOLE( m_aObjDesc );
 }
 
 ScTransferObj::~ScTransferObj()
@@ -190,11 +190,11 @@ ScTransferObj::~ScTransferObj()
 pScMod->ResetDragObject();
 }
 
-delete pDoc;// ScTransferObj is owner of clipboard document
+delete m_pDoc;// ScTransferObj is owner of clipboard document
 
-aDocShellRef.clear();   // before releasing the mutex
+m_aDocShellRef.clear();   // before releasing the mutex
 
-aDrawPersistRef.clear();// after the model
+m_aDrawPersistRef.clear();// after the model
 
 }
 
@@ -240,7 +240,7 @@ void ScTransferObj::AddSupportedFormats()
 
 AddFormat( SotClipboardFormatId::RTF );
 AddFormat( SotClipboardFormatId::RICHTEXT );
-if ( aBlock.aStart == aBlock.aEnd )
+if ( m_aBlock.aStart == m_aBlock.aEnd )
 {
 AddFormat( SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT );
 }
@@ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/inc/notemark.hxx  |   40 ++--
 sc/source/ui/view/notemark.cxx |  131 -
 2 files changed, 86 insertions(+), 85 deletions(-)

New commits:
commit b916d29c44df60e41f3b5a1ea6a5fe602050b942
Author: Henry Castro 
AuthorDate: Mon Apr 30 20:05:48 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 20:25:00 2018 +0200

sc: prefix members of ScNoteMarker

Change-Id: Ia4d7646d0534cfd74d5fd54700af80484443f106
Reviewed-on: https://gerrit.libreoffice.org/53681
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59619
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/inc/notemark.hxx b/sc/source/ui/inc/notemark.hxx
index 8b87809d0fd1..27a6d9da2a84 100644
--- a/sc/source/ui/inc/notemark.hxx
+++ b/sc/source/ui/inc/notemark.hxx
@@ -31,24 +31,24 @@ class SdrModel;
 class ScNoteMarker
 {
 private:
-VclPtr pWindow;
-VclPtr pRightWin;
-VclPtr pBottomWin;
-VclPtr pDiagWin;
-ScDocument* pDoc;
-ScAddress   aDocPos;
-OUStringaUserText;
-tools::Rectangle   aVisRect;
-Timer   aTimer;
-MapMode aMapMode;
-boolbLeft;
-boolbByKeyboard;
+VclPtr m_pWindow;
+VclPtr m_pRightWin;
+VclPtr m_pBottomWin;
+VclPtr m_pDiagWin;
+ScDocument* m_pDoc;
+ScAddress   m_aDocPos;
+OUStringm_aUserText;
+tools::Rectangle   m_aVisRect;
+Timer   m_aTimer;
+MapMode m_aMapMode;
+boolm_bLeft;
+boolm_bByKeyboard;
 
-tools::Rectangle   aRect;
-SdrModel*   pModel;
-ScCaptionPtrmxObject;
-boolbVisible;
-Point   aGridOff;
+tools::Rectangle   m_aRect;
+SdrModel*   m_pModel;
+ScCaptionPtrm_xObject;
+boolm_bVisible;
+Point   m_aGridOff;
 DECL_LINK( TimeHdl, Timer*, void );
 
 public:
@@ -60,9 +60,9 @@ public:
 voidDraw();
 voidInvalidateWin();
 
-const ScAddress& GetDocPos() const   { return aDocPos; }
-boolIsByKeyboard() const{ return bByKeyboard; }
-voidSetGridOff( const Point& rOff ) { aGridOff = rOff; }
+const ScAddress& GetDocPos() const   { return m_aDocPos; }
+boolIsByKeyboard() const{ return m_bByKeyboard; }
+voidSetGridOff( const Point& rOff ) { m_aGridOff = rOff; }
 };
 
 #endif
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index f486a70d0168..fe49c314ba23 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -37,77 +37,78 @@
 ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, 
vcl::Window* pBottom, vcl::Window* pDiagonal,
 ScDocument* pD, const ScAddress& aPos, const 
OUString& rUser,
 const MapMode& rMap, bool bLeftEdge, bool bForce, 
bool bKeyboard ) :
-pWindow( pWin ),
-pRightWin( pRight ),
-pBottomWin( pBottom ),
-pDiagWin( pDiagonal ),
-pDoc( pD ),
-aDocPos( aPos ),
-aUserText( rUser ),
-aMapMode( rMap ),
-bLeft( bLeftEdge ),
-bByKeyboard( bKeyboard ),
-pModel( nullptr ),
-bVisible( false )
+m_pWindow( pWin ),
+m_pRightWin( pRight ),
+m_pBottomWin( pBottom ),
+m_pDiagWin( pDiagonal ),
+m_pDoc( pD ),
+m_aDocPos( aPos ),
+m_aUserText( rUser ),
+m_aMapMode( rMap ),
+m_bLeft( bLeftEdge ),
+m_bByKeyboard( bKeyboard ),
+m_pModel( nullptr ),
+m_bVisible( false )
 {
-Size aSizePixel = pWindow->GetOutputSizePixel();
-if( pRightWin )
-aSizePixel.Width() += pRightWin->GetOutputSizePixel().Width();
-if( pBottomWin )
-aSizePixel.Height() += pBottomWin->GetOutputSizePixel().Height();
+Size aSizePixel = m_pWindow->GetOutputSizePixel();
+if( m_pRightWin )
+aSizePixel.AdjustWidth(m_pRightWin->GetOutputSizePixel().Width() );
+if( m_pBottomWin )
+aSizePixel.AdjustHeight(m_pBottomWin->GetOutputSizePixel().Height() );
 tools::Rectangle aVisPixel( Point( 0, 0 ), aSizePixel );
-aVisRect = pWindow->PixelToLogic( aVisPixel, aMapMode );
+m_aVisRect = m_pWindow->PixelToLogic( aVisPixel, m_aMapMode );
 
-aTimer.SetInvokeHandler( LINK( this, ScNoteMarker, TimeHdl ) );
-aTimer.SetTimeout( bForce ? SC_NOTEMARK_SHORT : SC_NOTEMARK_TIME );
-aTimer.Start();
+m_aTimer.SetInvokeHandler( LINK( this, ScNoteMarker, TimeHdl ) );
+m_aTimer.SetTimeout( bForce ? SC_NOTEMARK_SHORT : SC_NOTEMARK_TIME );
+m_aTimer.Start();
 }
 
 ScNoteMarker::~ScNoteMarker()
 {
-if (pModel)
-mxObject.release(); // deleting pModel also deletes the 
SdrCaptionObj
+if (m_pModel)
+m_xObject.release(); // deleting pModel also deletes the 
SdrCaptionObj
 
 InvalidateWin();
 
-delete pModel;
+delete m_pModel;
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/inc/anyrefdg.hxx  |8 
 sc/source/ui/miscdlgs/anyrefdg.cxx |   24 
 2 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit bc0b8d3af7cdf5db5cde6758402fd7c1fdcea36e
Author: Henry Castro 
AuthorDate: Fri Mar 16 22:13:34 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 20:13:41 2018 +0200

sc: prefix members of ScRefHandler

Change-Id: I7ba7f17256c244604549321fc4812ce845c28877
Reviewed-on: https://gerrit.libreoffice.org/51451
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59618
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 254c0539c9a6..556153c672e5 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -114,11 +114,11 @@ public:
 private:
 ScFormulaReferenceHelper
 m_aHelper;
-SfxBindings*pMyBindings;
+SfxBindings*m_pMyBindings;
 
-VclPtr pActiveWin;
-IdleaIdle;
-OUStringaDocName;   // document on which the 
dialog was opened
+VclPtr m_pActiveWin;
+Idlem_aIdle;
+OUStringm_aDocName;   // document on which the 
dialog was opened
 
 DECL_LINK( UpdateFocusHdl, Timer*, void );
 
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx 
b/sc/source/ui/miscdlgs/anyrefdg.cxx
index f9a7aff0f86a..9bf0818ac206 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -752,11 +752,11 @@ ScRefHandler::ScRefHandler( vcl::Window , 
SfxBindings* pB, bool bBindRef
 m_rWindow(  ),
 m_bInRefMode( false ),
 m_aHelper(this,pB),
-pMyBindings( pB ),
-pActiveWin(nullptr)
+m_pMyBindings( pB ),
+m_pActiveWin(nullptr)
 {
 m_aHelper.SetWindow(m_rWindow.get());
-aIdle.SetInvokeHandler(LINK( this, ScRefHandler, UpdateFocusHdl));
+m_aIdle.SetInvokeHandler(LINK( this, ScRefHandler, UpdateFocusHdl));
 
 if( bBindRef ) EnterRefMode();
 }
@@ -773,9 +773,9 @@ bool ScRefHandler::EnterRefMode()
 // even if it's not the current view
 
 SfxObjectShell* pParentDoc = nullptr;
-if ( pMyBindings )
+if ( m_pMyBindings )
 {
-SfxDispatcher* pMyDisp = pMyBindings->GetDispatcher();
+SfxDispatcher* pMyDisp = m_pMyBindings->GetDispatcher();
 if (pMyDisp)
 {
 SfxViewFrame* pMyViewFrm = pMyDisp->GetFrame();
@@ -791,7 +791,7 @@ bool ScRefHandler::EnterRefMode()
 if ( !pParentDoc && pScViewShell )  // use current only if 
above fails
 pParentDoc = pScViewShell->GetObjectShell();
 if ( pParentDoc )
-aDocName = pParentDoc->GetTitle();
+m_aDocName = pParentDoc->GetTitle();
 
 ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl(pScViewShell);
 
@@ -819,7 +819,7 @@ ScRefHandler::~ScRefHandler()
 void ScRefHandler::disposeRefHandler()
 {
 m_rWindow.clear();
-pActiveWin.clear();
+m_pActiveWin.clear();
 LeaveRefMode();
 m_aHelper.dispose();
 }
@@ -850,7 +850,7 @@ void ScRefHandler::SwitchToDocument()
 if (pCurrent)
 {
 SfxObjectShell* pObjSh = pCurrent->GetObjectShell();
-if ( pObjSh && pObjSh->GetTitle() == aDocName )
+if ( pObjSh && pObjSh->GetTitle() == m_aDocName )
 {
 //  right document already visible -> nothing to do
 return;
@@ -861,7 +861,7 @@ void ScRefHandler::SwitchToDocument()
 while ( pSh )
 {
 SfxObjectShell* pObjSh = pSh->GetObjectShell();
-if ( pObjSh && pObjSh->GetTitle() == aDocName )
+if ( pObjSh && pObjSh->GetTitle() == m_aDocName )
 {
 //  switch to first TabViewShell for document
 static_cast(pSh)->SetActive();
@@ -879,7 +879,7 @@ bool ScRefHandler::IsDocAllowed(SfxObjectShell* pDocSh) 
const   // pDocSh may be
 aCmpName = pDocSh->GetTitle();
 
 //  if aDocName isn't initialized, allow
-return ( aDocName.isEmpty() || aDocName == aCmpName );
+return ( m_aDocName.isEmpty() || m_aDocName == aCmpName );
 }
 
 bool ScRefHandler::IsRefInputMode() const
@@ -930,9 +930,9 @@ void ScRefHandler::ToggleCollapsed( formula::RefEdit* 
pEdit, formula::RefButton*
 
 IMPL_LINK_NOARG(ScRefHandler, UpdateFocusHdl, Timer *, void)
 {
-if (pActiveWin)
+if (m_pActiveWin)
 {
-pActiveWin->GrabFocus();
+m_pActiveWin->GrabFocus();
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-27 Thread Libreoffice Gerrit user
 sc/source/ui/inc/anyrefdg.hxx  |   40 +++---
 sc/source/ui/miscdlgs/anyrefdg.cxx |  218 ++---
 2 files changed, 129 insertions(+), 129 deletions(-)

New commits:
commit 522a22ac50174446905d57a47c312a603224cee5
Author: Henry Castro 
AuthorDate: Fri Mar 16 17:24:28 2018 -0400
Commit: Andras Timar 
CommitDate: Mon Aug 27 20:13:12 2018 +0200

sc: prefix members of ScFormulaReferenceHelper

Change-Id: I412c7336802032da93c3cc4df1d7f6d8baf36a7b
Reviewed-on: https://gerrit.libreoffice.org/51442
Tested-by: Jenkins 
Reviewed-by: Henry Castro 
Reviewed-on: https://gerrit.libreoffice.org/59617
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/ui/inc/anyrefdg.hxx b/sc/source/ui/inc/anyrefdg.hxx
index 1abdb8b1a2e3..254c0539c9a6 100644
--- a/sc/source/ui/inc/anyrefdg.hxx
+++ b/sc/source/ui/inc/anyrefdg.hxx
@@ -44,30 +44,30 @@ class ScRangeList;
 class ScFormulaReferenceHelper
 {
 IAnyRefDialog*  m_pDlg;
-::std::unique_ptr pRefComp;
-VclPtrpRefEdit;   // active input field
-VclPtr  pRefBtn;// associated button
+::std::unique_ptr m_pRefComp;
+VclPtrm_pRefEdit;   // active input field
+VclPtr  m_pRefBtn;// associated button
 VclPtr m_pWindow;
 SfxBindings*m_pBindings;
 ::std::unique_ptr
-pAccel; // for Enter/Escape
+m_pAccel; // for Enter/Escape
 ::std::vector > m_aHiddenWidgets;// vector of 
hidden Controls
 sal_Int32   m_nOldBorderWidth;  // border width for expanded 
dialog
-SCTAB   nRefTab;// used for ShowReference
-
-OUStringsOldDialogText; // Original title of the 
dialog window
-SizeaOldDialogSize; // Original size of the dialog 
window
-Point   aOldEditPos;// Original position of the 
input field
-SizeaOldEditSize;   // Original size of the input 
field
-longmnOldEditWidthReq;
-Point   aOldButtonPos;  // Original position of the 
button
-VclPtr mpOldEditParent;// Original parent of the edit 
field and the button
-boolmbOldDlgLayoutEnabled;  // Original layout state of 
parent dialog
-boolmbOldEditParentLayoutEnabled;  // Original layout 
state of edit widget parent
-
-boolbEnableColorRef;
-boolbHighlightRef;
-boolbAccInserted;
+SCTAB   m_nRefTab;// used for ShowReference
+
+OUStringm_sOldDialogText; // Original title of the 
dialog window
+Sizem_aOldDialogSize; // Original size of the 
dialog window
+Point   m_aOldEditPos;// Original position of the 
input field
+Sizem_aOldEditSize;   // Original size of the 
input field
+longm_nOldEditWidthReq;
+Point   m_aOldButtonPos;  // Original position of the 
button
+VclPtr m_pOldEditParent;// Original parent of the 
edit field and the button
+boolm_bOldDlgLayoutEnabled;  // Original layout state of 
parent dialog
+boolm_bOldEditParentLayoutEnabled;  // Original layout 
state of edit widget parent
+
+boolm_bEnableColorRef;
+boolm_bHighlightRef;
+boolm_bAccInserted;
 
 DECL_LINK( AccelSelectHdl, Accelerator&, void );
 
@@ -98,7 +98,7 @@ public:
 
 public:
 static bool CanInputStart( const formula::RefEdit *pEdit ){ return 
!!pEdit; }
-boolCanInputDone( bool bForced ){   return pRefEdit && 
(bForced || !pRefBtn);   }
+boolCanInputDone( bool bForced ){   return m_pRefEdit && 
(bForced || !m_pRefBtn);   }
 };
 
 class SC_DLLPUBLIC ScRefHandler :
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx 
b/sc/source/ui/miscdlgs/anyrefdg.cxx
index e05b64eff127..f9a7aff0f86a 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -46,21 +46,21 @@
 
 ScFormulaReferenceHelper::ScFormulaReferenceHelper(IAnyRefDialog* 
_pDlg,SfxBindings* _pBindings)
  : m_pDlg(_pDlg)
- , pRefEdit (nullptr)
- , pRefBtn (nullptr)
+ , m_pRefEdit (nullptr)
+ , m_pRefBtn (nullptr)
  , m_pWindow(nullptr)
  , m_pBindings(_pBindings)
  , m_nOldBorderWidth (0)
- , nRefTab(0)
- , mnOldEditWidthReq( -1 )
- , mpOldEditParent( nullptr )
- , mbOldDlgLayoutEnabled( false )
- , mbOldEditParentLayoutEnabled( false )
- , bHighlightRef( false )
- , bAccInserted( false )
+ , m_nRefTab(0)
+ , m_nOldEditWidthReq(-1)
+ , m_pOldEditParent(nullptr)
+ , m_bOldDlgLayoutEnabled(false)
+ , 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-08-23 Thread Libreoffice Gerrit user
 sc/source/core/data/conditio.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c02799e9a6c42fc8573293573f91db22c2c85969
Author: Eike Rathke 
AuthorDate: Wed Aug 22 20:00:16 2018 +0200
Commit: Andras Timar 
CommitDate: Thu Aug 23 09:00:16 2018 +0200

Resolves: tdf#119402 +- typo sign flip

Regression from

commit 667aa6ade94a4dee441868d21db037e42c871932
CommitDate: Wed Jul 19 20:13:58 2017 +0200

Avoid temporary Date and normalization

that introduced a sign flip
from+  5 - eDay
to  + (5 + eDay)
instead of  + (5 - eDay)

Change-Id: I28194296b20552135e6abd24eb9eefe8634ce7c0
Reviewed-on: https://gerrit.libreoffice.org/59461
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit cadd6c595b250b3ce0025a2a09c160eaae483d5a)

diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index 1b869827372c..0ff379f1f0ab 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1615,7 +1615,7 @@ bool ScCondDateFormatEntry::IsValid( const ScAddress& 
rPos ) const
 if( eDay != SUNDAY )
 {
 Date aBegin(rActDate - (1 + static_cast(eDay)));
-Date aEnd(rActDate + (5 + static_cast(eDay)));
+Date aEnd(rActDate + (5 - static_cast(eDay)));
 return aCellDate.IsBetween( aBegin, aEnd );
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-07-16 Thread Libreoffice Gerrit user
 sc/source/ui/view/tabvwsha.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 64804142904cbb2df38138b0c53b4a5790104814
Author: Caolán McNamara 
AuthorDate: Thu Jan 18 21:33:19 2018 +
Commit: Jan Holesovsky 
CommitDate: Mon Jul 16 16:02:59 2018 +0200

SfxReqest::Done takes a SfxItemSet& or a boolean, not a SfxItemSet*

regression from

commit c40dfabd56ade10fe35690dc9810955c2e99e2c0
Date:   Fri Jan 12 11:57:22 2018 +

Change-Id: Ia97ba286a2da0584a2e806ad7396a3633f9d913e
Reviewed-on: https://gerrit.libreoffice.org/48170
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index 2e79fb16513b..3d2e3e3e2324 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -560,7 +560,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, 
const OString 
 
 ApplyAttributes(pOutSet, pOldSet.get());
 
-pRequest->Done(pOutSet);
+pRequest->Done(*pOutSet);
 }
 });
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-07-09 Thread Marco Cecchetti
 sc/source/ui/inc/gridwin.hxx   |2 +-
 sc/source/ui/inc/tabview.hxx   |7 ++-
 sc/source/ui/view/gridwin.cxx  |   35 +--
 sc/source/ui/view/gridwin4.cxx |4 
 sc/source/ui/view/tabview.cxx  |   13 +
 sc/source/ui/view/tabview3.cxx |4 ++--
 6 files changed, 55 insertions(+), 10 deletions(-)

New commits:
commit a88741c2bfa9dc020f4e10bde1bf808a758b63d5
Author: Marco Cecchetti 
Date:   Mon May 7 12:49:22 2018 +0200

lok: sc: formulas were not updated correctly

this patch fixes several issues:

- any cell containing a formula above row 1024 causing a tile
invalidation whenever any cell content was changed, even if unrelated
to the formula;

- any formula below row 1024 wasn't updated even if it was inside the
visible area.

Change-Id: Ib92153d5755c4e231aa68dee807fe997f9e80a46
Reviewed-on: https://gerrit.libreoffice.org/53932
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index e8a564d0737b..4c3e81c807f8 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -351,7 +351,7 @@ public:
 voidScrollPixel( long nDifX, long nDifY );
 voidUpdateEditViewPos();
 
-voidUpdateFormulas();
+voidUpdateFormulas(SCCOL nX1 = -1, SCROW nY1 = -1, SCCOL nX2 = 
-1, SCROW nY2 = -1);
 
 voidLaunchDataSelectMenu( SCCOL nCol, SCROW nRow );
 voidDoScenarioMenu( const ScRange& rScenRange );
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index 0995d3e14279..bc9601d0de84 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -490,7 +490,7 @@ public:
 voidUpdateShrinkOverlay();
 voidUpdateAllOverlays();
 
-voidUpdateFormulas();
+voidUpdateFormulas( SCCOL nStartCol = -1, SCROW nStartRow = 
-1, SCCOL nEndCol = -1, SCROW nEndRow = -1 );
 voidInterpretVisible();
 voidCheckNeedsRepaint();
 boolNeedsRepaint();
@@ -605,6 +605,11 @@ public:
 /// @see ScModelObj::getRowColumnHeaders().
 OUString getRowColumnHeaders(const tools::Rectangle& rRectangle);
 static void OnLOKNoteStateChanged(const ScPostIt* pNote);
+
+SCROW GetLOKStartHeaderRow() { return mnLOKStartHeaderRow; }
+SCROW GetLOKEndHeaderRow() { return mnLOKEndHeaderRow; }
+SCCOL GetLOKStartHeaderCol() { return mnLOKStartHeaderCol; }
+SCCOL GetLOKEndHeaderCol() { return mnLOKEndHeaderCol; }
 };
 
 #endif
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 6040d41e9ba0..07b0f096ec8d 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4494,7 +4494,7 @@ void ScGridWindow::ScrollPixel( long nDifX, long nDifY )
 
 // Update Formulas --
 
-void ScGridWindow::UpdateFormulas()
+void ScGridWindow::UpdateFormulas(SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW nY2)
 {
 if (pViewData->GetView()->IsMinimized())
 return;
@@ -4509,10 +4509,30 @@ void ScGridWindow::UpdateFormulas()
 return;
 }
 
-SCCOL   nX1 = pViewData->GetPosX( eHWhich );
-SCROW   nY1 = pViewData->GetPosY( eVWhich );
-SCCOL   nX2 = nX1 + pViewData->VisibleCellsX( eHWhich );
-SCROW   nY2 = nY1 + pViewData->VisibleCellsY( eVWhich );
+if ( comphelper::LibreOfficeKit::isActive() )
+{
+ScTabViewShell* pViewShell = pViewData->GetViewShell();
+if (nX1 < 0)
+nX1 = pViewShell->GetLOKStartHeaderCol() + 1;
+if (nY1 < 0)
+nY1 = pViewShell->GetLOKStartHeaderRow() + 1;
+if (nX2 < 0)
+nX2 = pViewShell->GetLOKEndHeaderCol();
+if (nY2 < 0)
+nY2 = pViewShell->GetLOKEndHeaderRow();
+
+if (nX1 < 0 || nY1 < 0) return;
+}
+else
+{
+nX1 = pViewData->GetPosX( eHWhich );
+nY1 = pViewData->GetPosY( eVWhich );
+nX2 = nX1 + pViewData->VisibleCellsX( eHWhich );
+nY2 = nY1 + pViewData->VisibleCellsY( eVWhich );
+}
+
+if (nX2 < nX1) nX2 = nX1;
+if (nY2 < nY1) nY2 = nY1;
 
 if (nX2 > MAXCOL) nX2 = MAXCOL;
 if (nY2 > MAXROW) nY2 = MAXROW;
@@ -4526,7 +4546,10 @@ void ScGridWindow::UpdateFormulas()
 ScDocument& rDoc = *pViewData->GetDocument();
 SCTAB nTab = pViewData->GetTabNo();
 
-rDoc.ExtendHidden( nX1, nY1, nX2, nY2, nTab );
+if ( !comphelper::LibreOfficeKit::isActive() )
+{
+rDoc.ExtendHidden( nX1, nY1, nX2, nY2, nTab );
+}
 
 Point aScrPos = pViewData->GetScrPos( nX1, nY1, eWhich );
 long nMirrorWidth = GetSizePixel().Width();
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 87256ff16847..56f19eaf2895 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-07-09 Thread Marco Cecchetti
 sc/source/ui/view/viewfunc.cxx |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit bffd1f458ac665cf1acae9490c293ab93b25cad6
Author: Marco Cecchetti 
Date:   Mon Apr 16 17:57:21 2018 +0200

lok: sc: user input is lost when another user moves the related cell

- Start/open a spreadsheet with two users.
- Type a number in a cell, eg. 10 in F10.
- With user A, change that number, but don't finish editing, eg.
change F10 to 5.
- With user B, add rows or columns before F10. The cells will slide
right/down accordingly, including F10.
- With user A, finalize editing in its new place (still showing the
updated value (5)), eg. press Enter.

=> The value reverts back to its former entry (10).

Change-Id: I938763bf3b8bc5b4b78c7c753ecfad929ec80e79
Reviewed-on: https://gerrit.libreoffice.org/52997
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 6e04b4b9d2a3..c9281c60761f 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1491,8 +1491,13 @@ void ScViewFunc::OnLOKInsertDeleteColumn(SCCOL 
nStartCol, long nOffset)
 SCCOL nX = pTabViewShell->GetViewData().GetCurX();
 if (nX > nStartCol || (nX == nStartCol && nOffset > 0))
 {
+ScInputHandler* pInputHdl = 
pTabViewShell->GetInputHandler();
 SCROW nY = pTabViewShell->GetViewData().GetCurY();
 pTabViewShell->SetCursor(nX + nOffset, nY);
+if (pInputHdl && pInputHdl->IsInputMode())
+{
+pInputHdl->SetModified();
+}
 }
 
 ScMarkData aMultiMark( 
pTabViewShell->GetViewData().GetMarkData() );
@@ -1541,8 +1546,13 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, 
long nOffset)
 SCROW nY = pTabViewShell->GetViewData().GetCurY();
 if (nY > nStartRow || (nY == nStartRow && nOffset > 0))
 {
+ScInputHandler* pInputHdl = 
pTabViewShell->GetInputHandler();
 SCCOL nX = pTabViewShell->GetViewData().GetCurX();
 pTabViewShell->SetCursor(nX, nY + nOffset);
+if (pInputHdl && pInputHdl->IsInputMode())
+{
+pInputHdl->SetModified();
+}
 }
 
 ScMarkData aMultiMark( 
pTabViewShell->GetViewData().GetMarkData() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-07-09 Thread Mike Kaganski
 sc/source/ui/vba/vbaapplication.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 633a96c4c6136a1775f76c10bf689e8a665986bc
Author: Mike Kaganski 
Date:   Sat Jun 30 17:34:07 2018 +0200

Avoid assertion on user data

User can have unpaired ScreenUpdating in macros; so avoid calling
ScDocument::UnlockAdjustHeight, which asserts proper lock/unlock
order and number, when it is not locked.

Change-Id: I1c316ff4a5b993cbe08a9e95f5807153ed0953c8
Reviewed-on: https://gerrit.libreoffice.org/56763
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 01f712b6db1fab72abfe46ee6c3868f8b3cd035c)
Reviewed-on: https://gerrit.libreoffice.org/56806
Tested-by: Mike Kaganski 
Reviewed-by: Andras Timar 

diff --git a/sc/source/ui/vba/vbaapplication.cxx 
b/sc/source/ui/vba/vbaapplication.cxx
index 663a0c82f97f..52eafc594ff1 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -1400,7 +1400,10 @@ void SAL_CALL 
ScVbaApplication::setScreenUpdating(sal_Bool bUpdate)
 
 if( bUpdate )
 {
-rDoc.UnlockAdjustHeight();
+// Since setting ScreenUpdating from user code might be unpaired, 
avoid calling function,
+// that asserts correct lock/unlock order and number, when not locked.
+if(rDoc.IsAdjustHeightLocked())
+rDoc.UnlockAdjustHeight();
 if( !rDoc.IsAdjustHeightLocked() )
 pDocShell->UpdateAllRowHeights();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-06-30 Thread Mike Kaganski
 sc/source/filter/oox/formulabuffer.cxx |   22 +++---
 1 file changed, 19 insertions(+), 3 deletions(-)

New commits:
commit 96d3c7564d64429cf3ff1a117d2fda8958c7ede3
Author: Mike Kaganski 
Date:   Fri Jun 29 20:08:50 2018 +1000

tdf#118441: also keep string-formula results for shared formulas

... like it is done for normal cells.
So, the cells that have markup like



Test(B2:Z2)
0





0



now are handled (wrt restoring the stored result value) just like
cells with this markup without sharing have long been handled:



Test(B1:Z1)
0



Change-Id: Ifcf62cf6d073faff310aa8553c6f57f42ae588cc
Reviewed-on: https://gerrit.libreoffice.org/56675
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit e6c43ed9e6bb41b64bcc8105ad006c999deebcd7)
Reviewed-on: https://gerrit.libreoffice.org/56732
Reviewed-by: Andras Timar 
Tested-by: Andras Timar 

diff --git a/sc/source/filter/oox/formulabuffer.cxx 
b/sc/source/filter/oox/formulabuffer.cxx
index cfa917330096..48758f16e17b 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -109,7 +109,8 @@ void applySharedFormulas(
 ScDocumentImport& rDoc,
 SvNumberFormatter& rFormatter,
 std::vector& rSharedFormulas,
-std::vector& rCells )
+std::vector& rCells,
+bool bGeneratorKnownGood)
 {
 sc::SharedFormulaGroups aGroups;
 {
@@ -132,6 +133,7 @@ void applySharedFormulas(
 }
 
 {
+svl::SharedStringPool& rStrPool = rDoc.getDoc().GetSharedStringPool();
 // Process formulas that use shared formulas.
 for (const FormulaBuffer::SharedFormulaDesc& rDesc : rCells)
 {
@@ -149,7 +151,7 @@ void applySharedFormulas(
 continue;
 }
 
-// Set cached formula results. For now, we only use numeric
+// Set cached formula results. For now, we only use numeric and 
string-formula
 // results. Find out how to utilize cached results of other types.
 switch (rDesc.mnValueType)
 {
@@ -157,6 +159,19 @@ void applySharedFormulas(
 // numeric value.
 pCell->SetResultDouble(rDesc.maCellValue.toDouble());
 break;
+case XML_str:
+if (bGeneratorKnownGood)
+{
+// See applyCellFormulaValues
+svl::SharedString aSS = 
rStrPool.intern(rDesc.maCellValue);
+pCell->SetResultToken(new 
formula::FormulaStringToken(aSS));
+// If we don't reset dirty, then e.g. disabling macros 
makes all cells
+// that use macro functions to show #VALUE!
+pCell->ResetDirty();
+pCell->SetChanged(false);
+break;
+}
+SAL_FALLTHROUGH;
 default:
 // Mark it for re-calculation.
 pCell->SetDirty();
@@ -291,7 +306,8 @@ void processSheetFormulaCells(
 const Sequence& rExternalLinks, bool bGeneratorKnownGood 
)
 {
 if (rItem.mpSharedFormulaEntries && rItem.mpSharedFormulaIDs)
-applySharedFormulas(rDoc, rFormatter, *rItem.mpSharedFormulaEntries, 
*rItem.mpSharedFormulaIDs);
+applySharedFormulas(rDoc, rFormatter, *rItem.mpSharedFormulaEntries,
+*rItem.mpSharedFormulaIDs, bGeneratorKnownGood);
 
 if (rItem.mpCellFormulas)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-06-21 Thread Aron Budea
 sc/source/ui/view/output2.cxx |   14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

New commits:
commit ecd02b76fe2c134abf7fc32572436e1374d9c79b
Author: Aron Budea 
Date:   Wed Jun 20 17:52:13 2018 +0200

tdf#66089 tdf#105720: only rely on bPixelToLogic

Left-aligned currency symbols were put in preceding cells
sometimes, because fill width was calculated incorrectly.

Commit 37210da00a9190f7765fa9c1e4a08629d2f4c2c4 fixed the issue
for LOK, but the bug was still reproducible in Calc if setting
"Use printer metrics for text formatting" was enabled.

Change-Id: I6cf90493cbf98c5020acd5faf1d0f3cf2def5c25
Reviewed-on: https://gerrit.libreoffice.org/56172
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 
(cherry picked from commit 93e9a3e2b545c853f53ffe28d2795f55ad29f304)
Reviewed-on: https://gerrit.libreoffice.org/56213
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 5575a26bc70b..bb9dc4f97118 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -75,7 +75,6 @@
 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -567,19 +566,18 @@ void ScDrawStringsVars::RepeatToFill( long nColWidth )
 if ( nRepeatPos == -1 || nRepeatPos > aString.getLength() )
 return;
 
-const bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
-
 long nCharWidth = pOutput->pFmtDevice->GetTextWidth(OUString(nRepeatChar));
 
-if ( nCharWidth < 1 || (bIsTiledRendering && nCharWidth < 
TWIPS_PER_PIXEL)) return;
-
-if (bPixelToLogic)
-nColWidth = 
pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width();
+if ( nCharWidth < 1 || (bPixelToLogic && nCharWidth < 
pOutput->mpRefDevice->PixelToLogic(Size(1,0)).Width()) )
+return;
 
 // Are there restrictions on the cell type we should filter out here ?
 long nTextWidth = aTextSize.Width();
-if ( bIsTiledRendering )
+if ( bPixelToLogic )
+{
+nColWidth = 
pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width();
 nTextWidth = 
pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width();
+}
 
 long nSpaceToFill = ( nColWidth - nTextWidth );
 if ( nSpaceToFill <= nCharWidth )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-06-18 Thread Marco Cecchetti
 sc/source/ui/view/output2.cxx |   13 +++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 209fad544ada8cc038d13b0c6e226642e0a31c26
Author: Marco Cecchetti 
Date:   Thu Jun 14 12:32:48 2018 +0200

tdf#105720: lok: sc: currency symbol is displayed in the preceding cell

Now in online the currency symbol is placed exactly as in the desktop
case. Essentially there was a mapping issue.

Change-Id: I6175cfeab3d8bc3a757c8522aa9c7a7e49c4bf2b
Reviewed-on: https://gerrit.libreoffice.org/55800
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 20f8b606e517..5575a26bc70b 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -75,6 +75,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -566,13 +567,21 @@ void ScDrawStringsVars::RepeatToFill( long nColWidth )
 if ( nRepeatPos == -1 || nRepeatPos > aString.getLength() )
 return;
 
+const bool bIsTiledRendering = comphelper::LibreOfficeKit::isActive();
+
 long nCharWidth = pOutput->pFmtDevice->GetTextWidth(OUString(nRepeatChar));
-if ( nCharWidth < 1) return;
+
+if ( nCharWidth < 1 || (bIsTiledRendering && nCharWidth < 
TWIPS_PER_PIXEL)) return;
+
 if (bPixelToLogic)
 nColWidth = 
pOutput->mpRefDevice->PixelToLogic(Size(nColWidth,0)).Width();
+
 // Are there restrictions on the cell type we should filter out here ?
-long nSpaceToFill = ( nColWidth - aTextSize.Width() );
+long nTextWidth = aTextSize.Width();
+if ( bIsTiledRendering )
+nTextWidth = 
pOutput->mpRefDevice->PixelToLogic(Size(nTextWidth,0)).Width();
 
+long nSpaceToFill = ( nColWidth - nTextWidth );
 if ( nSpaceToFill <= nCharWidth )
 return;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source

2018-06-07 Thread Marco Cecchetti
 sc/source/ui/inc/viewdata.hxx  |4 +-
 sc/source/ui/unoobj/docuno.cxx |   25 +++---
 sc/source/ui/view/viewdata.cxx |   69 +++--
 3 files changed, 55 insertions(+), 43 deletions(-)

New commits:
commit f5a04c97478feea3b8269e997992989ebdb78cce
Author: Marco Cecchetti 
Date:   Tue May 8 18:36:00 2018 +0200

lok: sc: scroll issue

Problem:

users A and B open the same empty document, and the initial document
height is the same for both views, say 100 rows;
user A goes to row 1000 and enters some text
user B is not able to scroll below row 100

Change-Id: I68efe03473c6f82d68182a951034d2e95ffa7765
Reviewed-on: https://gerrit.libreoffice.org/53995
Reviewed-by: Jan Holesovsky 
Tested-by: Jan Holesovsky 

diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index e9f8767aea90..7b58edc13736 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -134,10 +134,11 @@ private:
 bool operator() (const value_type& rValue1, const value_type& rValue2) 
const;
 };
 
+const index_type MAX_INDEX;
 std::set mData;
 
 public:
-ScPositionHelper();
+ScPositionHelper(bool bColumn);
 
 void insert(index_type nIndex, long nPos);
 void removeByIndex(index_type nIndex);
@@ -146,6 +147,7 @@ public:
 const value_type& getNearestByIndex(index_type nIndex) const;
 const value_type& getNearestByPosition(long nPos) const;
 long getPosition(index_type nIndex) const;
+long computePosition(index_type nIndex, const std::function& getSizePx);
 };
 
 class ScBoundsProvider
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index e9382d8ab2ee..b42179663858 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -595,14 +595,29 @@ Size ScModelObj::getDocumentSize()
 
 rDoc.GetTiledRenderingArea(nTab, nEndCol, nEndRow);
 
-pViewData->SetMaxTiledCol(nEndCol);
-pViewData->SetMaxTiledRow(nEndRow);
+const ScDocument* pThisDoc = 
 
-if (pViewData->GetLOKDocWidthPixel() > 0 && 
pViewData->GetLOKDocHeightPixel() > 0)
+auto GetColWidthPx = [pThisDoc, nTab](SCCOL nCol) {
+const sal_uInt16 nSize = pThisDoc->GetColWidth(nCol, nTab);
+return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL);
+};
+
+long nDocWidthPixel = 
pViewData->GetLOKWidthHelper().computePosition(nEndCol, GetColWidthPx);
+
+
+auto GetRowHeightPx = [pThisDoc, nTab](SCROW nRow) {
+const sal_uInt16 nSize = pThisDoc->GetRowHeight(nRow, nTab);
+return ScViewData::ToPixel(nSize, 1.0 / TWIPS_PER_PIXEL);
+};
+
+long nDocHeightPixel = 
pViewData->GetLOKHeightHelper().computePosition(nEndRow, GetRowHeightPx);
+
+
+if (nDocWidthPixel > 0 && nDocHeightPixel > 0)
 {
 // convert to twips
-aSize.setWidth(pViewData->GetLOKDocWidthPixel() * TWIPS_PER_PIXEL);
-aSize.setHeight(pViewData->GetLOKDocHeightPixel() * TWIPS_PER_PIXEL);
+aSize.setWidth(nDocWidthPixel * TWIPS_PER_PIXEL);
+aSize.setHeight(nDocHeightPixel * TWIPS_PER_PIXEL);
 }
 else
 {
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 43cee43b34da..c144256df7a7 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -104,7 +104,8 @@ bool ScPositionHelper::Comp::operator() (const value_type& 
rValue1, const value_
 }
 }
 
-ScPositionHelper::ScPositionHelper()
+ScPositionHelper::ScPositionHelper(bool bColumn)
+: MAX_INDEX(bColumn ? MAXCOL : MAXTILEDROW)
 {
 mData.insert(std::make_pair(-1, 0));
 }
@@ -231,6 +232,32 @@ long ScPositionHelper::getPosition(index_type nIndex) const
 return it->second;
 }
 
+long ScPositionHelper::computePosition(index_type nIndex, const 
std::function& getSizePx)
+{
+if (nIndex < 0) nIndex = 0;
+if (nIndex > MAX_INDEX) nIndex = MAX_INDEX;
+
+const auto& rNearest = getNearestByIndex(nIndex);
+index_type nStartIndex = rNearest.first;
+long nTotalPixels = rNearest.second;
+
+if (nStartIndex < nIndex)
+{
+for (index_type nIdx = nStartIndex + 1; nIdx <= nIndex; ++nIdx)
+{
+nTotalPixels += getSizePx(nIdx);
+}
+}
+else
+{
+for (index_type nIdx = nStartIndex; nIdx > nIndex; --nIdx)
+{
+nTotalPixels -= getSizePx(nIdx);
+}
+}
+return nTotalPixels;
+}
+
 ScBoundsProvider::ScBoundsProvider(ScDocument* pD, SCTAB nT, bool bColHeader)
 : pDoc(pD)
 , nTab(nT)
@@ -448,6 +475,8 @@ ScViewDataTable::ScViewDataTable() :
 nOldCurY( 0 ),
 nLOKOldCurX( 0 ),
 nLOKOldCurY( 0 ),
+aWidthHelper(true),
+aHeightHelper(false),
 nMaxTiledCol( 20 ),
 nMaxTiledRow( 50 ),
 bShowGrid( true ),
@@ -1382,24 +1411,7 @@ void ScViewData::SetMaxTiledCol( 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - sc/source sw/qa

2018-04-27 Thread Marco Cecchetti
 sc/source/ui/view/tabview.cxx  |2 +-
 sw/qa/extras/tiledrendering/tiledrendering.cxx |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 581ed92d2f180f9303fede629a18627d1dcf57d7
Author: Marco Cecchetti 
Date:   Fri Apr 27 19:29:01 2018 +0200

fixing trivial clang errors

Change-Id: Ic6e3df495ca3717d17934d05797a003dd882c076
Reviewed-on: https://gerrit.libreoffice.org/53572
Reviewed-by: Marco Cecchetti 
Tested-by: Marco Cecchetti 

diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index e2200fcf5323..8edfc4ee2f8f 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -2437,7 +2437,7 @@ void lcl_createGroupsData(
 aGroupData += "\"index\": \"" + OUString::number(nIndex) + 
"\", ";
 aGroupData += "\"startPos\": \"" + 
OUString::number(rGroupStartPositions[nLevel]) + "\", ";
 aGroupData += "\"endPos\": \"" + OUString::number(nTotalTwips) 
+ "\", ";
-aGroupData += "\"hidden\": \"" + 
OUString::number(bGroupHidden) + "\" }";
+aGroupData += "\"hidden\": \"" + 
OUString::number(static_cast(bGroupHidden)) + "\" }";
 
 rGroupsBuffer += aGroupData;
 
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index b5c6a4b35161..5a653ba48b47 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -970,10 +970,10 @@ void SwTiledRenderingTest::testShapeViewCursors()
 Scheduler::ProcessEventsToIdle();
 // Make sure that aView1 gets a view-only cursor notification, while
 // aView2 gets a real cursor notification.
-CPPUNIT_ASSERT(aView1.m_aOwnCursor == aLastOwnCursor1);
+CPPUNIT_ASSERT_EQUAL(aView1.m_aOwnCursor, aLastOwnCursor1);
 CPPUNIT_ASSERT(aView1.m_bViewCursorInvalidated && aLastViewCursor1 != 
aView1.m_aViewCursor);
 CPPUNIT_ASSERT(aView2.m_bOwnCursorInvalidated && aLastOwnCursor2 != 
aView2.m_aOwnCursor);
-CPPUNIT_ASSERT(aLastViewCursor2 == aView2.m_aViewCursor);
+CPPUNIT_ASSERT_EQUAL(aLastViewCursor2, aView2.m_aViewCursor);
 mxComponent->dispose();
 mxComponent.clear();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits