[Libreoffice-commits] core.git: external/libxmlsec

2016-07-27 Thread Miklos Vajna
 external/libxmlsec/UnpackedTarball_xmlsec.mk|2 +
 external/libxmlsec/xmlsec1-vc.patch.1   |9 
 external/libxmlsec/xmlsec1-win32-fix-undeclared.patch.1 |   31 
 3 files changed, 33 insertions(+), 9 deletions(-)

New commits:
commit 3efe880c3bb4504b0ee7ff8f425d6a91e441aa4d
Author: Miklos Vajna 
Date:   Tue Jul 26 21:49:52 2016 +0200

libxmlsec: mark part of xmlsec1-vc.patch.1 as upstreamed

Change-Id: I4a8365c98eef87274ae1809047fd4ea582102f0b
Reviewed-on: https://gerrit.libreoffice.org/27556
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/external/libxmlsec/UnpackedTarball_xmlsec.mk 
b/external/libxmlsec/UnpackedTarball_xmlsec.mk
index 785ee34..9de7c2f 100644
--- a/external/libxmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/libxmlsec/UnpackedTarball_xmlsec.mk
@@ -13,6 +13,8 @@ xmlsec_patches += xmlsec1-nssdisablecallbacks.patch.1
 xmlsec_patches += xmlsec1-nssmangleciphers.patch.1
 xmlsec_patches += xmlsec1-noverify.patch.1
 xmlsec_patches += xmlsec1-mingw-keymgr-mscrypto.patch.1
+# Upstreamed as .
+xmlsec_patches += xmlsec1-win32-fix-undeclared.patch.1
 xmlsec_patches += xmlsec1-vc.patch.1
 xmlsec_patches += xmlsec1-1.2.14_fix_extern_c.patch.1
 xmlsec_patches += xmlsec1-customkeymanage.patch.1
diff --git a/external/libxmlsec/xmlsec1-vc.patch.1 
b/external/libxmlsec/xmlsec1-vc.patch.1
index 117a031..c4f9307 100644
--- a/external/libxmlsec/xmlsec1-vc.patch.1
+++ b/external/libxmlsec/xmlsec1-vc.patch.1
@@ -22,15 +22,6 @@ index 978336e..a474592 100644
  
  !if "$(UNICODE)" == "1"
  CFLAGS= $(CFLAGS) /D "UNICODE" /D "_UNICODE"
-@@ -334,7 +338,7 @@ CFLAGS = $(CFLAGS) 
/DXMLSEC_MSCRYPTO_NT4=1
- !else 
- !endif
- 
--APP_CFLAGS= /D 
"XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
-+CFLAGS= $(CFLAGS) /D 
"XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
- !if "$(WITH_DL)" == "1"
- CFLAGS= $(CFLAGS) /D "XMLSEC_DL_WIN32"
- APP_CFLAGS= $(APP_CFLAGS) /D "XMLSEC_CRYPTO_DYNAMIC_LOADING"
 @@ -365,7 +369,11 @@ LIBS  =
  !if "$(DEBUG)" == "1"
  LDFLAGS   = $(LDFLAGS) /DEBUG
diff --git a/external/libxmlsec/xmlsec1-win32-fix-undeclared.patch.1 
b/external/libxmlsec/xmlsec1-win32-fix-undeclared.patch.1
new file mode 100644
index 000..ed4b47e
--- /dev/null
+++ b/external/libxmlsec/xmlsec1-win32-fix-undeclared.patch.1
@@ -0,0 +1,31 @@
+From 9481001992e12300db1a264144569ee1a2c4e24e Mon Sep 17 00:00:00 2001
+From: Miklos Vajna 
+Date: Fri, 8 Jul 2016 09:56:59 +0200
+Subject: [PATCH] win32: fix undeclared XMLSEC_DEFAULT_CRYPTO
+
+The problem was that APP_CFLAGS is not used for src/xmlsec.c, but it now
+uses the identifier. This wasn't a problem on Linux, where commit
+29da6cbb8f161ad01ff69ee5f8f6ec5d9f3dfab5 (replace XMLSEC_CRYPTO define
+with xmlSecGetDefaultCrypto() function, 2016-02-06) updated
+src/Makefile.am to include XMLSEC_DEFAULT_CRYPTO in the generic
+AM_CFLAGS.
+---
+ win32/Makefile.msvc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc
+index e3d5262..8c887a1 100644
+--- a/win32/Makefile.msvc
 b/win32/Makefile.msvc
+@@ -334,7 +334,7 @@ CFLAGS = $(CFLAGS) 
/DXMLSEC_MSCRYPTO_NT4=1
+ !else 
+ !endif
+ 
+-APP_CFLAGS= /D 
"XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
++CFLAGS= $(CFLAGS) /D 
"XMLSEC_DEFAULT_CRYPTO=\"$(XMLSEC_DEFAULT_CRYPTO)\""
+ !if "$(WITH_DL)" == "1"
+ CFLAGS= $(CFLAGS) /D "XMLSEC_DL_WIN32"
+ APP_CFLAGS= $(APP_CFLAGS) /D "XMLSEC_CRYPTO_DYNAMIC_LOADING"
+-- 
+2.6.6
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/AdminModel.hpp loolwsd/Storage.cpp

2016-07-27 Thread Miklos Vajna
 loolwsd/AdminModel.hpp |4 ++--
 loolwsd/Storage.cpp|2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit c3e2a6cd40dd8a44e0360dc7de8d1d95e0740fa1
Author: Miklos Vajna 
Date:   Wed Jul 27 09:22:12 2016 +0200

AdminModel: use std::move()

Change-Id: Ib83b91bdbec2f71d96873a6146065707173349df

diff --git a/loolwsd/AdminModel.hpp b/loolwsd/AdminModel.hpp
index b011f66..3a192b6 100644
--- a/loolwsd/AdminModel.hpp
+++ b/loolwsd/AdminModel.hpp
@@ -42,9 +42,9 @@ class Document
 {
 public:
 Document(std::string docKey, Poco::Process::PID pid, std::string filename)
-: _docKey(docKey),
+: _docKey(std::move(docKey)),
   _pid(pid),
-  _filename(filename),
+  _filename(std::move(filename)),
   _start(std::time(nullptr))
 {
 Log::info("Document " + _docKey + " ctor.");
diff --git a/loolwsd/Storage.cpp b/loolwsd/Storage.cpp
index 0b8bfda..d93a743 100644
--- a/loolwsd/Storage.cpp
+++ b/loolwsd/Storage.cpp
@@ -386,7 +386,7 @@ StorageBase::FileInfo WebDAVStorage::getFileInfo(const 
Poco::URI& uri)
 {
 Log::debug("Getting info for webdav uri [" + uri.toString() + "].");
 (void)uri;
-assert(!"Not Implemented!");
+assert(false && "Not Implemented!");
 return FileInfo({"bazinga", Poco::Timestamp(), 0});
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2016-07-27 Thread Tor Lillqvist
 vcl/source/window/status.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 63db4d577ff17a5af06087bc3fd6e930a4951415
Author: Tor Lillqvist 
Date:   Wed Jul 27 10:59:53 2016 +0300

loplugin:defaultparams

Change-Id: Ib9a838b9d840baff62f1a0453eb370b6f665326d

diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index 4ab7121..0035714 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1352,7 +1352,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent )
 &&   IsReallyVisible()
 &&   (!mnPercent || (mnPercent != nNewPercent)) )
 {
-Invalidate(maPrgsFrameRect, InvalidateFlags::NONE);
+Invalidate(maPrgsFrameRect);
 Flush();
 }
 mnPercent = nNewPercent;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2016-07-27 Thread Caolán McNamara
 sw/source/ui/index/swuiidxmrk.cxx |   25 -
 1 file changed, 16 insertions(+), 9 deletions(-)

New commits:
commit c755336853f20c7b2dd14e9c56eeb441d831be2c
Author: Caolán McNamara 
Date:   Wed Jul 27 09:10:29 2016 +0100

Resolves: tdf#57978 don't show duplicate index keys in dropdown list

Change-Id: I25e25157063ea4424f770b397d879cb7bfd46bcb

diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index ac7e0c0..a6a180d 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -192,17 +192,24 @@ void SwIndexMarkPane::InitControls()
 m_pTypeDCB->InsertEntry( pSh->GetTOXType(TOX_USER, i)->GetTypeName() );
 
 // read keywords primary
-std::vector aArr;
-pSh->GetTOIKeys( TOI_PRIMARY, aArr );
-std::sort(aArr.begin(), aArr.end());
-for (std::vector::iterator it = aArr.begin(); it != aArr.end(); 
++it)
-m_pKey1DCB->InsertEntry( *it );
+{
+std::vector aArr;
+pSh->GetTOIKeys(TOI_PRIMARY, aArr);
+std::sort(aArr.begin(), aArr.end());
+auto last = std::unique(aArr.begin(), aArr.end());
+for (auto it = aArr.begin(); it != last; ++it)
+m_pKey1DCB->InsertEntry(*it);
+}
 
 // read keywords secondary
-pSh->GetTOIKeys( TOI_SECONDARY, aArr );
-std::sort(aArr.begin(), aArr.end());
-for (std::vector::iterator it = aArr.begin(); it != aArr.end(); 
++it)
-m_pKey2DCB->InsertEntry( *it );
+{
+std::vector aArr;
+pSh->GetTOIKeys( TOI_SECONDARY, aArr );
+std::sort(aArr.begin(), aArr.end());
+auto last = std::unique(aArr.begin(), aArr.end());
+for (auto it = aArr.begin(); it != last; ++it)
+m_pKey2DCB->InsertEntry(*it);
+}
 
 UpdateLanguageDependenciesForPhoneticReading();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - cui/source

2016-07-27 Thread Noel Grandin
 cui/source/inc/cuitabarea.hxx|2 +-
 cui/source/tabpages/tparea.cxx   |1 +
 cui/source/tabpages/tpbitmap.cxx |1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 187044b5e837c24223ca4625df48d0161a72945f
Author: Noel Grandin 
Date:   Wed Jul 27 09:49:20 2016 +0200

loplugin:vclwidgets

Change-Id: Ie16efa4a66cc3ea1991878f20442f0c0bac79d10

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index c9f5cae..67af95d 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -174,6 +174,7 @@ void SvxAreaTabPage::dispose()
 m_pLbBitmap.clear();
 m_pCtlBitmapPreview.clear();
 m_pCtlXRectPreview.clear();
+m_pBtnImport.clear();
 SvxTabPage::dispose();
 }
 
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 373da08..51668d12 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -95,6 +95,7 @@ void SvxBitmapTabPage::dispose()
 {
 m_pBitmapLB.clear();
 m_pCtlBitmapPreview.clear();
+m_pBtnImport.clear();
 SvxTabPage::dispose();
 }
 
commit 702e26d6568ff739ff3783564044ad8afa689b1f
Author: Noel Grandin 
Date:   Wed Jul 27 09:43:34 2016 +0200

loplugin:passstuffbyref

Change-Id: I37cc39974784e59aa793c2a2ca0dbc59d00e3cb4

diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 82676af..8eb92b9 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -576,7 +576,7 @@ public:
 virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
 virtual void PointChanged( vcl::Window* pWindow, RECT_POINT eRP ) override;
 
-voidSetBitmapList( XBitmapListRef pBmpLst) { m_pBitmapList = pBmpLst; }
+voidSetBitmapList( const XBitmapListRef& pBmpLst) { m_pBitmapList = 
pBmpLst; }
 
 voidSetPageType( sal_uInt16* pInType ) { m_nPageType = pInType; }
 voidSetDlgType( sal_uInt16 nInType ) { m_nDlgType = nInType; }
___
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-5.1' - svx/source sw/qa

2016-07-27 Thread Miklos Vajna
 svx/source/svdraw/svdedxv.cxx  |   26 ++
 svx/source/svdraw/svdpntv.cxx  |   21 +++
 sw/qa/extras/tiledrendering/tiledrendering.cxx |   35 +
 3 files changed, 82 insertions(+)

New commits:
commit 1a90cfa9cb478a4a4cca9b2fbee4ba5c20b35d52
Author: Miklos Vajna 
Date:   Tue Jul 26 11:02:38 2016 +0200

svx lok: draw text edits in all views

Use case: a document has a shape with text, and two views. If one view
starts to edit the shape text, the model text is hidden (via
TextHierarchyEditPrimitive2D), and the in-progress text was painted
directly only in the view that edits it.  The remaining views presented
the shape as if it had no text. This commit addresses the subset of this
use case when the views are already created and they already show the
same draw page.

Fix the problem by looking for other views showing the same draw page,
create a view of the text edit for them, and paint them in all views
after the own text edit is painted.

There is not much LOK-specific in this code, except that some extra code
would be needed to not paint the blinking cursor of the text edit in
other views, and then it could be enabled in the non-LOK case as well.

Change-Id: Ib3096a3369fa56663ee209794e102090d362de66
Reviewed-on: https://gerrit.libreoffice.org/27535
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 
(cherry picked from commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6)

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index ac38317..6467463 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -64,6 +64,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -814,6 +815,31 @@ bool SdrObjEditView::SdrBeginTextEdit(
 pTextEditOutliner->InsertView(pOutlView, 
(sal_uInt16)i);
 }
 }
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Register an outliner view for all other sdr views that
+// show the same page, so that when the text edit changes,
+// all interested windows get an invalidation.
+SdrViewIter aIter(pObj->GetPage());
+for (SdrView* pView = aIter.FirstView(); pView; pView = 
aIter.NextView())
+{
+if (pView == this)
+continue;
+
+for(sal_uInt32 nViewPaintWindow = 0; nViewPaintWindow 
< pView->PaintWindowCount(); ++nViewPaintWindow)
+{
+SdrPaintWindow* pPaintWindow = 
pView->GetPaintWindow(nViewPaintWindow);
+OutputDevice& rOutDev = 
pPaintWindow->GetOutputDevice();
+
+if(&rOutDev != pWin && OUTDEV_WINDOW == 
rOutDev.GetOutDevType())
+{
+OutlinerView* pOutlView = 
ImpMakeOutlinerView(static_cast(&rOutDev), !bEmpty, nullptr);
+pTextEditOutliner->InsertView(pOutlView);
+}
+}
+}
+}
 }
 
 pTextEditOutlinerView->ShowCursor();
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index acdd003..78fd41f 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -60,6 +60,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -749,6 +750,26 @@ void SdrPaintView::EndCompleteRedraw(SdrPaintWindow& 
rPaintWindow, bool bPaintFo
 static_cast< SdrView* >(this)->TextEditDrawing(rPaintWindow);
 }
 
+if (comphelper::LibreOfficeKit::isActive())
+{
+// Look for active text edits in other views showing the same page,
+// and show them as well.
+if (SdrPageView* pPageView = GetSdrPageView())
+{
+SdrViewIter aIter(pPageView->GetPage());
+for (SdrView* pView = aIter.FirstView(); pView; pView = 
aIter.NextView())
+{
+if (pView == this)
+continue;
+
+if (pView->IsTextEdit() && pView->GetSdrPageView())
+{
+
static_cast(pView)->TextEditDrawing(rPaintWindow);
+}
+}
+}
+}
+
 // draw Overlay, also to PreRender device if exists
 rPaintWindow.DrawOverlay(rPaintWindow.GetRedrawRegion());
 
diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index 9c7ae33..5a379bd3 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx

[Libreoffice-commits] core.git: cui/uiconfig

2016-07-27 Thread Rishabh Kumar
 cui/uiconfig/ui/patterntabpage.ui |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 706b76d1d561ee628cec1cc13a8b4fd52f91ae4d
Author: Rishabh Kumar 
Date:   Wed Jul 27 13:40:03 2016 +0530

Align pattern preview correctly

Change-Id: I7513934e3195297bc6b68ff7149e9fd78922dcdc
Reviewed-on: https://gerrit.libreoffice.org/27562
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/cui/uiconfig/ui/patterntabpage.ui 
b/cui/uiconfig/ui/patterntabpage.ui
index 430e54d..ffd943a 100644
--- a/cui/uiconfig/ui/patterntabpage.ui
+++ b/cui/uiconfig/ui/patterntabpage.ui
@@ -321,6 +321,7 @@
   
 False
 False
+end
 2
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/inc sc/source

2016-07-27 Thread Noel Grandin
 sc/inc/chgtrack.hxx  |2 
 sc/inc/dociter.hxx   |6 -
 sc/inc/docoptio.hxx  |2 
 sc/inc/tablink.hxx   |1 
 sc/source/core/data/dociter.cxx  |   25 ---
 sc/source/core/opencl/formulagroupcl.cxx |   97 +++
 sc/source/core/opencl/op_statistical.hxx |5 -
 sc/source/core/tool/chgtrack.cxx |4 -
 sc/source/ui/docshell/tablink.cxx|   15 +---
 9 files changed, 55 insertions(+), 102 deletions(-)

New commits:
commit 80ee8f832f8247f9189270121fc4b3fe64a9be71
Author: Noel Grandin 
Date:   Mon Jun 27 07:15:18 2016 +0200

loplugin:singlevalfields in sc(part4)

Change-Id: I77bcfc0103f638cd3eddb676ee88a4749bc74b1b
Reviewed-on: https://gerrit.libreoffice.org/26687
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index 7588034..e7f6e53 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -897,7 +897,6 @@ class ScChangeTrack : public utl::ConfigurationListener
 sal_uLong   nEndLastCut;
 sal_uLong   nLastMerge;
 ScChangeTrackMergeState eMergeState;
-bool bLoadSave:1;
 bool bInDelete:1;
 bool bInDeleteUndo:1;
 bool bInDeleteTop:1;
@@ -1012,7 +1011,6 @@ public:
 ScChangeAction* GetLastSaved() const;
 ScChangeActionContent** GetContentSlots() const { return ppContentSlots; }
 
-bool IsLoadSave() const { return bLoadSave; }
 const ScRange&  GetInDeleteRange() const
 { return aInDeleteRange; }
 bool IsInDelete() const { return bInDelete; }
diff --git a/sc/inc/dociter.hxx b/sc/inc/dociter.hxx
index 20775a5..16cdaf3 100644
--- a/sc/inc/dociter.hxx
+++ b/sc/inc/dociter.hxx
@@ -269,11 +269,9 @@ class ScQueryCellIterator   // walk through all 
non-empty cells in an ar
 std::unique_ptr mpParam;
 ScDocument* pDoc;
 const ScAttrArray*  pAttrArray;
-sal_uLong   nNumFormat;
 SCTAB   nTab;
 SCCOL   nCol;
 SCROW   nRow;
-SCROW   nAttrEndRow;
 sal_uInt8nStopOnMismatch;
 sal_uInt8nTestEqualCondition;
 boolbAdvanceQuery;
@@ -456,16 +454,13 @@ private:
 const ScAttrArray*pAttrArray;
 ScHorizontalCellIterator *pCellIter;
 sal_uLong nNumFormat; // for CalcAsShown
-sal_uLong nNumFmtIndex;
 SCTAB nEndTab;
 SCCOL nCurCol;
 SCROW nCurRow;
 SCTAB nCurTab;
 SCROW nAttrEndRow;
-short nNumFmtType;
 bool  bNumValid;
 bool  bCalcAsShown;
-bool  bTextAsZero;
 
 public:
 
@@ -495,7 +490,6 @@ private:
 SCCOL   nCol;
 SCROW   nRow;
 boolbRowEmpty;
-boolbRepeatedRow;
 SCROW   nMinNextEnd;
 
 void InitForNextRow(bool bInitialization);
diff --git a/sc/inc/docoptio.hxx b/sc/inc/docoptio.hxx
index ce2f384..5c0c28b 100644
--- a/sc/inc/docoptio.hxx
+++ b/sc/inc/docoptio.hxx
@@ -51,7 +51,7 @@ class SC_DLLPUBLIC ScDocOptions
 mutable bool bFormulaWildcardsEnabled;///< wildcards in formulas enabled, 
only when reading settings
 bool   bWriteCalcConfig;///< (subset of) Calc config will be 
written to user's profile
 
-const utl::SearchParam::SearchType eSearchTypeUnknown = 
static_cast(-1);
+static const utl::SearchParam::SearchType eSearchTypeUnknown = 
static_cast(-1);
 
 public:
 ScDocOptions();
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index 31f005b..ebf0018 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -40,7 +40,6 @@ private:
 bool bInCreate:1;
 bool bInEdit:1;
 bool bAddUndo:1;
-bool bDoPaint:1;
 
 public:
 ScTableLink( ScDocShell* pDocSh, const OUString& rFile,
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index db67375..22f8034 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1081,9 +1081,7 @@ ScQueryCellIterator::ScQueryCellIterator(ScDocument* 
pDocument, SCTAB nTable,
 rItem.meType = bNumber ? ScQueryEntry::ByValue : 
ScQueryEntry::ByString;
 }
 }
-nNumFormat = 0; // Initialized in GetNumberFormat
 pAttrArray = nullptr;
-nAttrEndRow = 0;
 }
 
 void ScQueryCellIterator::InitPos()
@@ -2171,12 +2169,9 @@ void ScHorizontalCellIterator::SkipInvalid()
 ScHorizontalValueIterator::ScHorizontalValueIterator( ScDocument* pDocument,
 const ScRange& rRange ) :
 pDoc( pDocument ),
-nNumFmtIndex(0),
 nEndTab( rRange.aEnd.Tab() ),
-nNumFmtType( css::util::NumberFormat::UNDEFINED ),
 bNumValid( false ),
- 

[Libreoffice-commits] core.git: 2 commits - comphelper/source sc/source sd/source sfx2/source starmath/source sw/source toolkit/source vcl/source

2016-07-27 Thread Caolán McNamara
 comphelper/source/misc/threadpool.cxx|4 ++--
 sc/source/ui/undo/undobase.cxx   |2 +-
 sd/source/ui/animations/CustomAnimationBox.cxx   |2 +-
 sd/source/ui/animations/SlideTransitionBox.cxx   |2 +-
 sd/source/ui/table/TableDesignBox.cxx|2 +-
 sd/source/ui/unoidl/unoobj.cxx   |2 +-
 sfx2/source/notebookbar/DropdownBox.cxx  |2 +-
 sfx2/source/notebookbar/DropdownBox.hxx  |2 +-
 sfx2/source/notebookbar/NotebookBarPopupMenu.hxx |2 +-
 sfx2/source/notebookbar/PriorityHBox.cxx |2 +-
 starmath/source/uiobject.hxx |2 +-
 sw/source/core/ole/ndole.cxx |4 ++--
 toolkit/source/awt/vclxtoolkit.cxx   |2 +-
 vcl/source/control/notebookbar.cxx   |2 +-
 vcl/source/uitest/uno/uiobject_uno.hxx   |2 +-
 15 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit 5733910b2b3ac82cb3cf7a1be6b3576c2e97145e
Author: Caolán McNamara 
Date:   Wed Jul 27 10:58:41 2016 +0100

change from a 2 min dbgutil failure to a 3 min

to try and align with the crashtesting timeout

Change-Id: Ife3a4a3d63bbb9d9d5b612675e3728900262bf6c

diff --git a/comphelper/source/misc/threadpool.cxx 
b/comphelper/source/misc/threadpool.cxx
index 6846f4b..45425fb 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -336,8 +336,8 @@ void ThreadTaskTag::waitUntilDone()
 #endif
 
 #ifdef DBG_UTIL
-// 2 minute timeout in debug mode so our tests fail sooner rather than 
later
-osl::Condition::Result rv = maTasksComplete.wait(TimeValue { 2*60, 0 });
+// 3 minute timeout in debug mode so our tests fail sooner rather than 
later
+osl::Condition::Result rv = maTasksComplete.wait(TimeValue { 3*60, 0 });
 assert(rv != osl::Condition::result_timeout);
 #else
 // 10 minute timeout in production so the app eventually throws some kind 
of error
commit 93f9a32cdf720ee76f56f987a1ded2fd89145659
Author: Caolán McNamara 
Date:   Mon Jul 25 10:27:49 2016 +0100

cppcheck: noExplicitConstructor

Change-Id: Id0a6cd461b2ba56e3b9b944514f3b0d0eb75cc44

diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 63e201d..eefce30 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -104,7 +104,7 @@ namespace
 ScDocument& m_rDoc;
 bool m_bUndoEnabled;
 public:
-DisableUndoGuard(ScDocShell *pDocShell)
+explicit DisableUndoGuard(ScDocShell *pDocShell)
 : m_rDoc(pDocShell->GetDocument())
 , m_bUndoEnabled(m_rDoc.IsUndoEnabled())
 {
diff --git a/sd/source/ui/animations/CustomAnimationBox.cxx 
b/sd/source/ui/animations/CustomAnimationBox.cxx
index d37de23..b0e07c0 100644
--- a/sd/source/ui/animations/CustomAnimationBox.cxx
+++ b/sd/source/ui/animations/CustomAnimationBox.cxx
@@ -32,7 +32,7 @@ class CustomAnimationBox : public VclVBox
 bool m_bIsInitialized;
 
 public:
-CustomAnimationBox(vcl::Window* pParent);
+explicit CustomAnimationBox(vcl::Window* pParent);
 ~CustomAnimationBox() override;
 
 virtual void dispose() override;
diff --git a/sd/source/ui/animations/SlideTransitionBox.cxx 
b/sd/source/ui/animations/SlideTransitionBox.cxx
index 7a70010..1cc992a 100644
--- a/sd/source/ui/animations/SlideTransitionBox.cxx
+++ b/sd/source/ui/animations/SlideTransitionBox.cxx
@@ -33,7 +33,7 @@ class SlideTransitionBox : public VclVBox
 bool m_bIsInitialized;
 
 public:
-SlideTransitionBox(vcl::Window* pParent);
+explicit SlideTransitionBox(vcl::Window* pParent);
 ~SlideTransitionBox() override;
 
 virtual void dispose() override;
diff --git a/sd/source/ui/table/TableDesignBox.cxx 
b/sd/source/ui/table/TableDesignBox.cxx
index 981a9dc..6fa1299 100644
--- a/sd/source/ui/table/TableDesignBox.cxx
+++ b/sd/source/ui/table/TableDesignBox.cxx
@@ -32,7 +32,7 @@ class TableDesignBox : public VclVBox
 bool m_bIsInitialized;
 
 public:
-TableDesignBox(vcl::Window* pParent);
+explicit TableDesignBox(vcl::Window* pParent);
 ~TableDesignBox() override;
 
 virtual void dispose() override;
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 4051fa4..4d49bb3 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -1113,7 +1113,7 @@ private:
 SdXShape*   mpShape;
 
 public:
-SdUnoEventsAccess( SdXShape* pShape ) throw();
+explicit SdUnoEventsAccess(SdXShape* pShape) throw();
 
 // XNameReplace
 virtual void SAL_CALL replaceByName( const OUString& aName, const 
css::uno::Any& aElement ) throw(css::lang::IllegalArgumentException, 
css::container::NoSuchElementException, css::lang::WrappedTargetException, 
css::uno::RuntimeException, std::exception) override;
diff --git a/sfx2/source/notebookbar/DropdownBox.cxx 
b/sfx2/source/notebookbar/Dropdown

[Libreoffice-commits] core.git: include/svx sd/source svx/source

2016-07-27 Thread Miklos Vajna
 include/svx/svdedxv.hxx   |4 
 sd/source/ui/inc/View.hxx |1 +
 sd/source/ui/view/sdview.cxx  |   10 ++
 svx/source/svdraw/svdedxv.cxx |   14 +-
 4 files changed, 28 insertions(+), 1 deletion(-)

New commits:
commit c0f1c0da77cf9f148b3f29aaf0965dfb43b8a32c
Author: Miklos Vajna 
Date:   Wed Jul 27 10:03:28 2016 +0200

svx lok: avoid SfxViewShell::Current() during constructing a new view shell

Currently when a text edit is started, then in the LOK case if there is
an other view that shows the same page, then both draw views will have
an outliner view showing the text edit. This means that in case a view
shell is created after starting the text edit, that won't have an
outliner view for the text edit.

Before fixing this, calls to SfxViewShell::Current() has to be avoided
when we're in the process of setting up a new LOK view. In case of
Impress, this is a double initialization, and by the time
SdrObjEditView::ImpMakeOutlinerView() is called, we're already in the
process of setting up the second SfxViewShell (as part of
SdXImpressDocument::initializeForTiledRendering()), but
SfxViewShell::Current() still points to the old view shell.  Which means
that the outliner view would refer to a view shell that's deleted soon,
and we crash as soon as it tries to invoke a LOK callback.

Fix this by adding a virtual member function to SdrObjEditView, and
override it in sd, so in case applications want to provide a more
precise way of giving the view shell owning a draw view, then they can.

Change-Id: Ie0005f73237d4ff9cf576bf16fa5b46280f13759
Reviewed-on: https://gerrit.libreoffice.org/27561
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 4aac4ff..70ffe3b 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -35,6 +35,7 @@ class ImpSdrEditPara;
 struct PasteOrDropInfos;
 class SdrUndoManager;
 class TextChainCursorManager;
+class SfxViewShell;
 
 namespace com { namespace sun { namespace star { namespace uno {
 class Any;
@@ -155,6 +156,9 @@ public:
 virtual void BckAction() override;
 virtual void TakeActionRect(Rectangle& rRect) const override;
 
+/// Get access to the view shell owning this draw view, if any.
+virtual SfxViewShell* GetSfxViewShell() const;
+
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
 virtual void ModelHasChanged() override;
 
diff --git a/sd/source/ui/inc/View.hxx b/sd/source/ui/inc/View.hxx
index c1b97b3..c1f52ac 100644
--- a/sd/source/ui/inc/View.hxx
+++ b/sd/source/ui/inc/View.hxx
@@ -122,6 +122,7 @@ public:
 inline DrawDocShell* GetDocSh() const { return mpDocSh; }
 inline SdDrawDocument& GetDoc() const;
 inline ViewShell* GetViewShell() const { return mpViewSh; }
+SfxViewShell* GetSfxViewShell() const override;
 
 virtual bool SdrBeginTextEdit(SdrObject* pObj, SdrPageView* pPV = nullptr, 
vcl::Window* pWin = nullptr, bool bIsNewObj = false,
 SdrOutliner* pGivenOutliner = nullptr, OutlinerView* 
pGivenOutlinerView = nullptr,
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx
index 5e097dd..ddaf809 100644
--- a/sd/source/ui/view/sdview.cxx
+++ b/sd/source/ui/view/sdview.cxx
@@ -651,6 +651,16 @@ void OutlinerMasterViewFilter::End()
 }
 }
 
+SfxViewShell* View::GetSfxViewShell() const
+{
+SfxViewShell* pRet = nullptr;
+
+if (mpViewSh)
+pRet = &mpViewSh->GetViewShellBase();
+
+return pRet;
+}
+
 bool View::SdrBeginTextEdit(
 SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
 bool bIsNewObj,
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 9a458806..cd6e083 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -142,6 +142,11 @@ void SdrObjEditView::TakeActionRect(Rectangle& rRect) const
 }
 }
 
+SfxViewShell* SdrObjEditView::GetSfxViewShell() const
+{
+return nullptr;
+}
+
 void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
 {
 SdrGlueEditView::Notify(rBC,rHint);
@@ -461,7 +466,14 @@ OutlinerView* 
SdrObjEditView::ImpMakeOutlinerView(vcl::Window* pWin, bool /*bNoP
 }
 pOutlView->SetControlWord(nStat);
 pOutlView->SetBackgroundColor( aBackground );
-pOutlView->registerLibreOfficeKitViewCallback(SfxViewShell::Current());
+
+// In case we're in the process of constructing a new view shell,
+// SfxViewShell::Current() may still point to the old one. So if possible,
+// depend on the application owning this draw view to provide the view
+// shell.
+SfxViewShell* pSfxViewShell = GetSfxViewShell();
+pOutlView->registerLibreOfficeKitViewCallback(pSfxViewShell ? 
pSfxViewShell : SfxViewShell::Current());
+
 if (pText!=nullptr)
 {
 
pOutlView->SetAnchorMode((EVAnchorMode)(pText->GetOutlinerViewAnch

[Libreoffice-commits] core.git: 3 commits - sc/source sc/uiconfig

2016-07-27 Thread Tor Lillqvist
 sc/source/ui/optdlg/calcoptionsdlg.cxx|  674 --
 sc/source/ui/optdlg/calcoptionsdlg.hxx|   20 
 sc/uiconfig/scalc/ui/formulacalculationoptions.ui |  299 -
 sc/uiconfig/scalc/ui/optformula.ui|2 
 4 files changed, 1 insertion(+), 994 deletions(-)

New commits:
commit 70258bb2d637319d8ff1d19bf304f813c5b2e948
Author: Tor Lillqvist 
Date:   Wed Jul 27 11:59:32 2016 +0300

Drop OpenCL details from the 'Detailed Calculation Settings' dialog

There is really no need for end-users to have access to these
settings. We don't want end-users to shoot themselves in the foot. If
power users really think they need to modify these settings, they can
poke the LibreOffice registry.

Change-Id: I567506f2d2adf3c3b1817ca82be808af4e9698f7

diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx 
b/sc/source/ui/optdlg/calcoptionsdlg.cxx
index a3aac8f..20a7788 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.cxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx
@@ -99,20 +99,6 @@ ScCalcOptionsDialog::ScCalcOptionsDialog(vcl::Window* 
pParent, const ScCalcConfi
 get(mpCurrentDocOnly,"current_doc");
 mpCurrentDocOnly->Check(!mbWriteConfig);
 mpCurrentDocOnly->SetClickHdl(LINK(this, ScCalcOptionsDialog, 
CurrentDocOnlyHdl));
-
-get(mpUseOpenCL,"CBUseOpenCL");
-mpUseOpenCL->Check(rConfig.mbOpenCLSubsetOnly);
-mpUseOpenCL->SetClickHdl(LINK(this, ScCalcOptionsDialog, CBUseOpenCLHdl));
-
-get(mpSpinButton,"spinOpenCLSize");
-mpSpinButton->SetValue(rConfig.mnOpenCLMinimumFormulaGroupSize);
-mpSpinButton->SetModifyHdl(LINK(this, ScCalcOptionsDialog, 
SpinOpenCLMinSizeHdl));
-
-get(mpEditField, "entry");
-
mpEditField->SetText(ScOpCodeSetToSymbolicString(maConfig.mpOpenCLSubsetOpCodes));
-mpEditField->set_height_request(4 * mpEditField->GetTextHeight());
-
-mpEditField->SetModifyHdl(LINK(this, ScCalcOptionsDialog, 
EditModifiedHdl));
 }
 
 ScCalcOptionsDialog::~ScCalcOptionsDialog()
@@ -126,9 +112,6 @@ void ScCalcOptionsDialog::dispose()
 mpConversion.clear();
 mpSyntax.clear();
 mpCurrentDocOnly.clear();
-mpUseOpenCL.clear();
-mpSpinButton.clear();
-mpEditField.clear();
 ModalDialog::dispose();
 }
 
@@ -177,19 +160,4 @@ IMPL_LINK_TYPED(ScCalcOptionsDialog, CurrentDocOnlyHdl, 
Button*, pCheckBox, void
 mbWriteConfig = !(static_cast(pCheckBox)->IsChecked());
 }
 
-IMPL_LINK_TYPED(ScCalcOptionsDialog, CBUseOpenCLHdl, Button*, pCheckBox, void)
-{
-maConfig.mbOpenCLSubsetOnly = 
static_cast(pCheckBox)->IsChecked();
-}
-
-IMPL_LINK_TYPED(ScCalcOptionsDialog, SpinOpenCLMinSizeHdl, Edit&, rEdit, void)
-{
-maConfig.mnOpenCLMinimumFormulaGroupSize = 
static_cast(rEdit).GetValue();
-}
-
-IMPL_LINK_TYPED(ScCalcOptionsDialog, EditModifiedHdl, Edit&, rCtrl, void)
-{
-maConfig.mpOpenCLSubsetOpCodes = ScStringToOpCodeSet(rCtrl.GetText());
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx 
b/sc/source/ui/optdlg/calcoptionsdlg.hxx
index 317f793..a2bf8c2 100644
--- a/sc/source/ui/optdlg/calcoptionsdlg.hxx
+++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx
@@ -39,13 +39,10 @@ public:
 virtual void dispose() override;
 
 DECL_LINK_TYPED( BtnAutomaticSelectHdl, RadioButton&, void );
-DECL_LINK_TYPED( EditModifiedHdl, Edit&, void );
 DECL_LINK_TYPED( AsZeroModifiedHdl, Button*, void);
 DECL_LINK_TYPED( ConversionModifiedHdl, ListBox&, void);
 DECL_LINK_TYPED( SyntaxModifiedHdl, ListBox&, void);
 DECL_LINK_TYPED( CurrentDocOnlyHdl, Button*, void);
-DECL_LINK_TYPED( CBUseOpenCLHdl, Button*, void);
-DECL_LINK_TYPED( SpinOpenCLMinSizeHdl, Edit&, void);
 
 const ScCalcConfig& GetConfig() const { return maConfig;}
 bool GetWriteCalcConfig() const { return mbWriteConfig;}
@@ -61,10 +58,6 @@ private:
 VclPtr mpSyntax;
 VclPtr mpCurrentDocOnly;
 
-VclPtr mpUseOpenCL;
-VclPtr mpSpinButton;
-VclPtr mpEditField;
-
 ScCalcConfig maConfig;
 
 bool mbSelectedEmptyStringAsZero;
diff --git a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui 
b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
index d748f7d..ffeda70 100644
--- a/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
+++ b/sc/uiconfig/scalc/ui/formulacalculationoptions.ui
@@ -203,121 +203,6 @@
 0
   
 
-
-  
-True
-False
-0
-none
-
-  
-True
-False
-6
-12
-
-  
-True
-False
-True
-True
-6
-12
-
-  
-Use Open_CL 
only for a subset of operations
-True
-True
-

[Libreoffice-commits] core.git: sfx2/uiconfig

2016-07-27 Thread Akshay Deep
 sfx2/uiconfig/ui/startcenter.ui |   59 +++-
 1 file changed, 35 insertions(+), 24 deletions(-)

New commits:
commit 4b598ccb3f25fc8bac23ed4434a11f6f6ff44bba
Author: Akshay Deep 
Date:   Wed Jul 27 15:08:26 2016 +0530

Start Center: Separate thumbnail view buttons in UI

Change-Id: If406b3d13ef3b39334079f9c41ef0c25dd2e21f9
Reviewed-on: https://gerrit.libreoffice.org/27571
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index 79b1484..5828c13 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -2,22 +2,12 @@
 
 
   
-  
+  
   
 True
 False
 res/ods_32_8.png
   
-  
-True
-False
-res/odb_32_8.png
-  
-  
-True
-False
-res/odg_32_8.png
-  
   
 True
 False
@@ -29,6 +19,16 @@
   
 
   
+  
+True
+False
+res/odb_32_8.png
+  
+  
+True
+False
+res/odg_32_8.png
+  
   
 True
 False
@@ -171,6 +171,17 @@
   
 
 
+  
+True
+False
+  
+  
+False
+True
+2
+  
+
+
   
 _Recent 
Files
 True
@@ -186,7 +197,7 @@
   
 False
 True
-2
+3
   
 
 
@@ -205,7 +216,7 @@
   
 False
 True
-3
+4
   
 
 
@@ -218,7 +229,7 @@
   
 False
 True
-4
+5
   
 
 
@@ -227,13 +238,13 @@
 False
 12
 6
-Create:
 0
+Create:
   
   
 False
 True
-5
+6
   
 
 
@@ -253,7 +264,7 @@
   
 False
 True
-6
+7
   
 
 
@@ -273,7 +284,7 @@
   
 False
 True
-7
+8
   
 
 
@@ -293,7 +304,7 @@
   
 False
 True
-8
+9
   
 
 
@@ -313,7 +324,7 @@
   
 False
 True
-9
+10
   
 
 
@@ -333,7 +344,7 @@
   
 False
 True
-10
+11
   
 
 
@@ -353,7 +364,7 @@
   
 False
 True
-11
+12
   
 
 
@@ -364,7 +375,7 @@
   
 False
 True
-12
+13
   
 
 
@@ -377,7 +388,7 @@
   
 False
 True
-13
+14
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svx/inc svx/source

2016-07-27 Thread Noel Grandin
 svx/inc/galbrws2.hxx  |4 ++--
 svx/inc/svdibrow.hxx  |2 +-
 svx/source/fmcomp/gridcell.cxx|2 +-
 svx/source/form/ParseContext.cxx  |6 +++---
 svx/source/form/filtnav.cxx   |2 +-
 svx/source/form/fmshell.cxx   |4 ++--
 svx/source/form/fmtextcontrolshell.cxx|2 +-
 svx/source/form/fmvwimp.cxx   |2 +-
 svx/source/form/navigatortree.cxx |4 ++--
 svx/source/form/navigatortreemodel.cxx|2 +-
 svx/source/gallery2/galbrws2.cxx  |2 +-
 svx/source/inc/filtnav.hxx|2 +-
 svx/source/inc/fmexpl.hxx |6 +++---
 svx/source/inc/fmshimp.hxx|4 ++--
 svx/source/inc/fmtextcontrolshell.hxx |2 +-
 svx/source/inc/fmvwimp.hxx|8 
 svx/source/inc/gridcell.hxx   |2 +-
 svx/source/svdraw/svdibrow.cxx|2 +-
 svx/source/table/tablelayouter.hxx|4 ++--
 svx/source/table/tablemodel.cxx   |2 +-
 svx/source/table/tablerow.hxx |2 +-
 svx/source/tbxctrls/extrusioncontrols.cxx |6 +++---
 svx/source/tbxctrls/extrusioncontrols.hxx |4 ++--
 svx/source/tbxctrls/tbunocontroller.cxx   |4 ++--
 24 files changed, 40 insertions(+), 40 deletions(-)

New commits:
commit cb4787c36a300d6783da28540da737dbad951070
Author: Noel Grandin 
Date:   Wed Jul 27 12:01:17 2016 +0200

loplugin:countusersofdefaultparams in svx

Change-Id: Ic46a0dcce477c8b27aa2d4771c48fd45ad73718c
Reviewed-on: https://gerrit.libreoffice.org/27574
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx
index dd3d0b0..d2dc8f0 100644
--- a/svx/inc/galbrws2.hxx
+++ b/svx/inc/galbrws2.hxx
@@ -169,8 +169,8 @@ public:
 
 void Execute( sal_uInt16 nId );
 void Dispatch( sal_uInt16 nId,
-   const css::uno::Reference< css::frame::XDispatch > 
&rxDispatch = css::uno::Reference< css::frame::XDispatch >(),
-   const css::util::URL &rURL = css::util::URL() );
+   const css::uno::Reference< css::frame::XDispatch > 
&rxDispatch,
+   const css::util::URL &rURL );
 
 DECL_STATIC_LINK_TYPED( GalleryBrowser2, AsyncDispatch_Impl, void*, void );
 };
diff --git a/svx/inc/svdibrow.hxx b/svx/inc/svdibrow.hxx
index c64a5e2..5e16c69 100644
--- a/svx/inc/svdibrow.hxx
+++ b/svx/inc/svdibrow.hxx
@@ -114,7 +114,7 @@ public:
 virtual void dispose() override;
 virtual void Resize() override;
 virtual void GetFocus() override;
-void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* 
p2ndSet=nullptr) { aBrowse->SetAttributes(pAttr,p2ndSet); }
+void SetAttributes(const SfxItemSet* pAttr, const SfxItemSet* p2ndSet) { 
aBrowse->SetAttributes(pAttr,p2ndSet); }
 SdrItemBrowserControl *GetBrowserControl() { return aBrowse.get(); }
 };
 
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 5381909..2b63e5a 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -604,7 +604,7 @@ void DbCellControl::implDoPropertyListening(const OUString& 
_rPropertyName, bool
 
 void DbCellControl::doPropertyListening(const OUString& _rPropertyName)
 {
-implDoPropertyListening( _rPropertyName );
+implDoPropertyListening( _rPropertyName, true );
 }
 
 static void 
lcl_clearBroadCaster(rtl::Reference<::comphelper::OPropertyChangeMultiplexer>& 
_pBroadcaster)
diff --git a/svx/source/form/ParseContext.cxx b/svx/source/form/ParseContext.cxx
index 590b374..758412c 100644
--- a/svx/source/form/ParseContext.cxx
+++ b/svx/source/form/ParseContext.cxx
@@ -159,7 +159,7 @@ namespace
 return s_nCounter;
 }
 
-OSystemParseContext* getSharedContext(OSystemParseContext* _pContext = 
nullptr,bool _bSet = false)
+OSystemParseContext* getSharedContext(OSystemParseContext* _pContext, bool 
_bSet)
 {
 static OSystemParseContext* s_pSharedContext = nullptr;
 if ( _pContext && !s_pSharedContext )
@@ -183,7 +183,7 @@ OParseContextClient::OParseContextClient()
 ::osl::MutexGuard aGuard( getSafteyMutex() );
 if ( 1 == osl_atomic_increment( &getCounter() ) )
 {   // first instance
-getSharedContext( new OSystemParseContext );
+getSharedContext( new OSystemParseContext, false );
 }
 }
 
@@ -199,7 +199,7 @@ OParseContextClient::~OParseContextClient()
 
 const OSystemParseContext* OParseContextClient::getParseContext() const
 {
-return getSharedContext();
+return getSharedContext(nullptr, false);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 2b9beba..eba73ac 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -1767,7 +1767,7 @@ void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt)
 
 if ( pTargetItem

[Libreoffice-commits] core.git: sc/inc sc/source

2016-07-27 Thread Caolán McNamara
 sc/inc/postit.hxx  |2 ++
 sc/source/core/data/postit.cxx |9 +
 sc/source/core/data/table6.cxx |   23 +++
 3 files changed, 30 insertions(+), 4 deletions(-)

New commits:
commit 7c84a219e3cc8d623826343f547ba8adacca6d56
Author: Caolán McNamara 
Date:   Wed Jul 27 11:32:49 2016 +0100

Resolves: tdf#65334 cannot search in cell notes

regression since...

commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094
Author: Markus Mohrhard 
Date:   Thu Feb 23 23:36:49 2012 +0100

remove mpNote from ScBaseCell

and requires restoring some code subsequently removed in

commit a1a1131c16227327d17bcf5ad2a5209ddc0f01a1
Date:   Sun Mar 4 15:27:27 2012 +0800

Remove unused code

Change-Id: If931c3162cacaeb126e730e3e79c1c47be4ce434

diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 8a7dec8..fb962442 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -118,6 +118,8 @@ public:
 
 /** Returns the caption text of this note. */
 OUString GetText() const;
+/** Returns true, if the caption text of this note contains line breaks. */
+boolHasMultiLineText() const;
 /** Changes the caption text of this note. All text formatting will be 
lost. */
 voidSetText( const ScAddress& rPos, const OUString& rText 
);
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 8eb8331..64f47a5 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -562,6 +562,15 @@ OUString ScPostIt::GetText() const
 return OUString();
 }
 
+bool ScPostIt::HasMultiLineText() const
+{
+if( const EditTextObject* pEditObj = GetEditTextObject() )
+return pEditObj->GetParagraphCount() > 1;
+if( maNoteData.mxInitData.get() )
+return maNoteData.mxInitData->maSimpleText.indexOf( '\n' ) >= 0;
+return false;
+}
+
 void ScPostIt::SetText( const ScAddress& rPos, const OUString& rText )
 {
 CreateCaptionFromInitData( rPos );
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 2c63ed4..b5a4499 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -73,6 +73,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 return false;
 
 bool bMultiLine = false;
+ScPostIt* pNote = nullptr;
 CellType eCellType = aCell.meType;
 switch (rSearchItem.GetCellType())
 {
@@ -89,8 +90,8 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 else
 aCol[nCol].GetString( nRow, aString );
 }
+break;
 }
-break;
 case SvxSearchCellType::VALUE:
 if ( eCellType == CELLTYPE_EDIT )
 bMultiLine = lcl_GetTextWithBreaks(*aCell.mpEditText, 
pDocument, aString);
@@ -103,7 +104,15 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 }
 break;
 case SvxSearchCellType::NOTE:
-break; // don't search this case here
+{
+pNote = aCol[nCol].GetCellNote(nRow);
+if (pNote)
+{
+aString = pNote->GetText();
+bMultiLine = pNote->HasMultiLineText();
+}
+break;
+}
 default:
 break;
 }
@@ -212,8 +221,14 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 }
 }
 while (bRepeat);
-
-if ( cMatrixFlag != MM_NONE )
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+{
+// NB: rich text format is lost.
+// This is also true of Cells.
+if (pNote)
+pNote->SetText( ScAddress( nCol, nRow, nTab ), aString );
+}
+else if ( cMatrixFlag != MM_NONE )
 {   // don't split Matrix
 if ( aString.getLength() > 2 )
 {   // remove {} here so that "{=" can be replaced by "{=..."
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - i18npool/inc i18npool/source svl/qa

2016-07-27 Thread Eike Rathke
 i18npool/inc/calendar_gregorian.hxx |3 
 i18npool/source/calendar/calendar_gregorian.cxx |  239 
 svl/qa/unit/svl.cxx |   39 +++
 3 files changed, 42 insertions(+), 239 deletions(-)

New commits:
commit 8ae23d952433fbc07cb13364619d316f15bbac92
Author: Eike Rathke 
Date:   Tue Jul 26 21:44:20 2016 +0200

Resolves: tdf#100046 the dreaded 1945-04-02 Double DST, also tdf#79663

This is a combination of 5 commits.

two more testDateInput() dates

Found in comments of i18npool/source/calendar/calendar_gregorian.cxx
Calendar_gregorian::setValue()

(cherry picked from commit 17fb4d43e86bd9622fb1b2c4378ab1e63a0025f0)

display data on test failure

(cherry picked from commit 4097b95d62db14f738f69e3bb4d1162739f3a06a)

add test data from tdf#79663, tdf#100046 related

... before changing anything.

(cherry picked from commit 22dceea0ca3cd68463e390395aa8de479b680240)

Resolves: tdf#100046 the dreaded 1945-04-02 Double DST, also tdf#79663

A coward not having changed this earlier, partially taken from a patch that 
was
submitted for tdf#79663 but broke API, thanks to Isamu Mogi again.

This removes all the clutter around timezone and DST correction that was
necessary for early ICU versions, which apparently gets things right now and
the clutter can still be confused by corner cases.

(cherry picked from commit 8e91b0177cbf6554acf7ccfbcc573f647e7fcf4d)

 Conflicts:
i18npool/inc/calendar_gregorian.hxx
i18npool/source/calendar/calendar_gregorian.cxx

activate the remaining 1945-04-02 test cases, tdf#100046

(cherry picked from commit 157b56a049a9a5f868d1f3b9856a631a40043a14)

432ba81929dd0badd48d2bd7b4344ceed4df2b43
edf89713de1eb02e501723f679bf059b5a43415e
9a90f933e8db8c6e0db145520ebf71cc27621abc
4d2f3d5602b162924c14348c0307a74ddeb93079

Change-Id: I4ab0aae15b7d97b22bc3a16d039542b5b49d3f14
Reviewed-on: https://gerrit.libreoffice.org/27559
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/i18npool/inc/calendar_gregorian.hxx 
b/i18npool/inc/calendar_gregorian.hxx
index 31883d6..4a2569f 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -115,9 +115,6 @@ private:
 
 /** Submit fieldSetValue array according to fieldSet. */
 void submitFields() throw(css::uno::RuntimeException);
-/** Submit fieldSetValue array according to fieldSet, plus YMDhms if >=0,
-plus zone and DST if != 0 */
-void submitValues( sal_Int32 nYear, sal_Int32 nMonth, sal_Int32 nDay, 
sal_Int32 nHour, sal_Int32 nMinute, sal_Int32 nSecond, sal_Int32 nMilliSecond, 
sal_Int32 nZone, sal_Int32 nDST) throw(css::uno::RuntimeException);
 /** Set fields internally. */
 void setValue() throw(css::uno::RuntimeException);
 /** Obtain combined field values for timezone offset (minutes+secondmillis)
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx 
b/i18npool/source/calendar/calendar_gregorian.cxx
index fc470e1..f3fa8ea 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -491,252 +491,21 @@ void Calendar_gregorian::submitFields() 
throw(css::uno::RuntimeException)
 body->set( fieldNameConverter( CalendarFieldIndex::DST_OFFSET), 
nDSTOffset);
 }
 
-void Calendar_gregorian::submitValues( sal_Int32 nYear,
-sal_Int32 nMonth, sal_Int32 nDay, sal_Int32 nHour, sal_Int32 nMinute,
-sal_Int32 nSecond, sal_Int32 nMilliSecond, sal_Int32 nZone, sal_Int32 
nDST )
-throw(css::uno::RuntimeException)
-{
-submitFields();
-if (nYear >= 0)
-body->set( UCAL_YEAR, nYear);
-if (nMonth >= 0)
-body->set( UCAL_MONTH, nMonth);
-if (nDay >= 0)
-body->set( UCAL_DATE, nDay);
-if (nHour >= 0)
-body->set( UCAL_HOUR_OF_DAY, nHour);
-if (nMinute >= 0)
-body->set( UCAL_MINUTE, nMinute);
-if (nSecond >= 0)
-body->set( UCAL_SECOND, nSecond);
-if (nMilliSecond >= 0)
-body->set( UCAL_MILLISECOND, nMilliSecond);
-if (nZone != 0)
-body->set( UCAL_ZONE_OFFSET, nZone);
-if (nDST != 0)
-body->set( UCAL_DST_OFFSET, nDST);
-}
-
-static void lcl_setCombinedOffsetFieldValues( sal_Int32 nValue,
-sal_Int16 rFieldSetValue[], sal_Int16 rFieldValue[],
-sal_Int16 nParentFieldIndex, sal_Int16 nChildFieldIndex )
-{
-sal_Int32 nTrunc = nValue / 6;
-rFieldSetValue[nParentFieldIndex] = rFieldValue[nParentFieldIndex] =
-static_cast( nTrunc);
-sal_uInt16 nMillis = static_cast( abs( nValue - nTrunc * 
6));
-rFieldSetValue[nChildFieldIndex] = rFieldValue[nChildFieldIndex] =
-static_cast( nMillis);
-}
-
 void Calendar_gregorian::setValue() throw(RuntimeException)
 {
-

[Libreoffice-commits] core.git: include/xmloff xmloff/source

2016-07-27 Thread Laurent Balland-Poirier
 include/xmloff/xmltoken.hxx  |2 +
 xmloff/source/core/xmltoken.cxx  |2 +
 xmloff/source/style/xmlnumfe.cxx |   18 +++-
 xmloff/source/style/xmlnumfi.cxx |   42 +++
 4 files changed, 59 insertions(+), 5 deletions(-)

New commits:
commit aab21302fa7ec76772456ad0cd8729a16e2a11e0
Author: Laurent Balland-Poirier 
Date:   Sun Jul 17 11:06:41 2016 +0200

tdf#100755 Extend ODF to allow 0 in fraction

As '0' is now allowed in numerator/denominator
this commit extend ODF to save/load this format

Change-Id: I3bc897dcce5393453acd7a434a21ae305feeb919
Reviewed-on: https://gerrit.libreoffice.org/27263
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 5b0902d..aa462c3 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3269,6 +3269,8 @@ namespace xmloff { namespace token {
 XML_MIN_DECIMAL_PLACES,
 XML_MAX_DENOMINATOR_VALUE,
 XML_MAX_NUMERATOR_DIGITS,
+XML_ZEROS_NUMERATOR_DIGITS,
+XML_ZEROS_DENOMINATOR_DIGITS,
 
 XML_TOKEN_END
 };
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index fe35e33..6f7caaa 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3265,6 +3265,8 @@ namespace xmloff { namespace token {
 TOKEN( "min-decimal-places",  XML_MIN_DECIMAL_PLACES ),
 TOKEN( "max-denominator-value",   XML_MAX_DENOMINATOR_VALUE ),
 TOKEN( "max-numerator-digits",XML_MAX_NUMERATOR_DIGITS ),
+TOKEN( "zeros-numerator-digits",  XML_ZEROS_NUMERATOR_DIGITS ),
+TOKEN( "zeros-denominator-digits",XML_ZEROS_DENOMINATOR_DIGITS 
),
 
 #if OSL_DEBUG_LEVEL > 0
 { 0, nullptr, nullptr,   XML_TOKEN_END }
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 70ac995..20b416c 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -731,18 +731,28 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
 {
 FinishTextElement_Impl();
 sal_Int32 nMaxNumeratorDigits = aNumeratorString.getLength();
-// As '0' cannot (yet) be saved in extended ODF, replace them by '?'
+// Count '0' as '?'
 sal_Int32 nMinNumeratorDigits = 
aNumeratorString.replaceAll("0","?").indexOf('?');
+sal_Int32 nZerosNumeratorDigits = aNumeratorString.indexOf('0');
 if ( nMinNumeratorDigits >= 0 )
 nMinNumeratorDigits = nMaxNumeratorDigits - nMinNumeratorDigits;
 else
 nMinNumeratorDigits = 0;
+if ( nZerosNumeratorDigits >= 0 )
+nZerosNumeratorDigits = nMaxNumeratorDigits - nZerosNumeratorDigits;
+else
+nZerosNumeratorDigits = 0;
 sal_Int32 nMaxDenominatorDigits = aDenominatorString.getLength();
 sal_Int32 nMinDenominatorDigits = 
aDenominatorString.replaceAll("0","?").indexOf('?');
+sal_Int32 nZerosDenominatorDigits = aDenominatorString.indexOf('0');
 if ( nMinDenominatorDigits >= 0 )
 nMinDenominatorDigits = nMaxDenominatorDigits - nMinDenominatorDigits;
 else
 nMinDenominatorDigits = 0;
+if ( nZerosDenominatorDigits >= 0 )
+nZerosDenominatorDigits = nMaxDenominatorDigits - 
nZerosDenominatorDigits;
+else
+nZerosDenominatorDigits = 0;
 sal_Int32 nDenominator = aDenominatorString.toInt32();
 
 //  integer digits
@@ -771,6 +781,9 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
 rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_MAX_NUMERATOR_DIGITS,
   OUString::number( nMaxNumeratorDigits ) );
 }
+if ( nZerosNumeratorDigits && ((eVersion & 
SvtSaveOptions::ODFSVER_EXTENDED) != 0) )
+rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_ZEROS_NUMERATOR_DIGITS,
+  OUString::number( nZerosNumeratorDigits ) );
 
 if ( nDenominator )
 {
@@ -793,6 +806,9 @@ void SvXMLNumFmtExport::WriteFractionElement_Impl(
  XML_MAX_DENOMINATOR_VALUE,
  OUString::number( pow ( 10.0, 
nMaxDenominatorDigits ) - 1 ) ); // 9, 99 or 999
 }
+if ( nZerosDenominatorDigits && ((eVersion & 
SvtSaveOptions::ODFSVER_EXTENDED) != 0) )
+rExport.AddAttribute( XML_NAMESPACE_LO_EXT, 
XML_ZEROS_DENOMINATOR_DIGITS,
+  OUString::number( nZerosDenominatorDigits ) 
);
 }
 
 SvXMLElementExport aElem( rExport, XML_NAMESPACE_NUMBER, XML_FRACTION,
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 7e9c501..c9da66a 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -101,6 +101,8 @@ struct SvXMLNumberInfo
 sal_Int32   nMaxDenomDigits;
 sal_Int32   nFracDenominator;
 sal_Int32   nMinDe

[Libreoffice-commits] core.git: sw/source

2016-07-27 Thread Caolán McNamara
 sw/source/core/layout/paintfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e63e60d6f00ee690fafb9f21f2cafb08a6ad92e
Author: Caolán McNamara 
Date:   Wed Jul 27 12:28:11 2016 +0100

Resolves: tdf#63662 'Manual Column Break' always visible...

even when non-printing chars is off.

I think this began as an intermediate step for both page and
column breaks to the header/footer overlay we now have for
page breaks. Leaving this just for column breaks. It may
have been set to always on with page-breaks in mind.

Change-Id: I1617683e2bb8c1f9229e9c2313e7817e184fa5ea

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index f36fd92..abff3a8 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3821,7 +3821,8 @@ void SwColumnFrame::PaintBreak( ) const
 //* Non-printing characters are shown, as this is more 
consistent
 //  with other formatting marks
 if ( !gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Header 
) &&
- !gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer 
) )
+ !gProp.pSGlobalShell->IsShowHeaderFooterSeparator( Footer 
) &&
+  gProp.pSGlobalShell->GetViewOptions()->IsLineBreak() )
 {
 SwRect aRect( pCnt->Prt() );
 aRect.Pos() += pCnt->Frame().Pos();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Zoner Draw import, Week 9 report

2016-07-27 Thread Alex P
I implemented parsing and output of arrows/markers in libzmf. It works fine
for some arrows, but for others it results in wrong arrow position in LO. I
tried some workarounds, but did not manage to fix that yet. Raw output
seems correct, so maybe it is a bug in LO. Also arrows with not closed
path, such as the one in the top right corner of the screenshot, become
closed.

http://i.imgur.com/kK4cZ0C.png

My mentor finished reverse engineering of BMI (Zoner bitmap) format and I
improved BMI parsing in libzmf, currently I am working on images with other
color depths (1, 4, 8 bit) and transparency.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/qa sw/source

2016-07-27 Thread Jakub Trzebiatowski
 sw/qa/extras/odfexport/data/table_styles_4.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx   |   13 +
 sw/qa/python/check_styles.py   |5 
 sw/source/core/doc/docnew.cxx  |2 
 sw/source/core/unocore/unostyle.cxx|  212 +++--
 5 files changed, 221 insertions(+), 11 deletions(-)

New commits:
commit b7138e03ebc8a33258c099c5cf6015970646a40e
Author: Jakub Trzebiatowski 
Date:   Tue Jul 26 14:29:40 2016 +0200

GSoC Writer Table Styles; Import bugfix

+ Binary autoformats are loaded into document on document creation
+ Imported table styles overwrite existing styles.

Change-Id: I88c08d1356e1c54a03624a051611357670f225ba
Reviewed-on: https://gerrit.libreoffice.org/27539
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/odfexport/data/table_styles_4.odt 
b/sw/qa/extras/odfexport/data/table_styles_4.odt
new file mode 100644
index 000..0d96127
Binary files /dev/null and b/sw/qa/extras/odfexport/data/table_styles_4.odt 
differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 56d2d2a..cca1ed0 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1126,6 +1126,19 @@ DECLARE_ODFEXPORT_TEST(testTableStyles3, 
"table_styles_3.odt")
 }
 }
 
+DECLARE_ODFIMPORT_TEST(testTableStyles4, "table_styles_4.odt")
+{
+// Test if loaded styles overwrite existing styles
+uno::Reference 
XFamiliesSupplier(mxComponent, uno::UNO_QUERY);
+uno::Reference 
xFamilies(XFamiliesSupplier->getStyleFamilies());
+uno::Reference 
xTableFamily(xFamilies->getByName("TableStyles"), uno::UNO_QUERY);
+uno::Reference 
xTableStyle(xTableFamily->getByName("Green"), uno::UNO_QUERY);
+uno::Reference xCell1Style;
+
+xTableStyle->getByName("first-row-start-column") >>= xCell1Style;
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0x00ff00), 
getProperty(xCell1Style, "BackColor"));
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index 372455e..8022acd 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -232,8 +232,9 @@ class CheckStyle(unittest.TestCase):
 xTableStyle2 = xDoc.createInstance("com.sun.star.style.TableStyle")
 with self.assertRaises(IllegalArgumentException):   #replace with 
other family style
 xTableStyle.replaceByName("first-row", xTableStyle2)
-with self.assertRaises(IllegalArgumentException):   #replace with 
already assigned cell style
-xTableStyle.replaceByName("first-row", 
xTableStyle2.getByName("first-row"))
+#replace with already assigned cell style
+xTableStyle.replaceByName("first-row", 
xTableStyle2.getByName("first-row"))
+self.assertEqual(xTableStyle.getByName("first-row"), 
xTableStyle2.getByName("first-row"))
 xDoc.StyleFamilies.getByName("CellStyles").insertByName("Test Cell 
Style", xCellStyle)
 xTableStyle.replaceByName("first-row", xCellStyle)
 self.assertEqual(xTableStyle.getByName("first-row"), xCellStyle)
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 0ada4b6..daa055b 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -374,6 +374,8 @@ SwDoc::SwDoc()
 }
 mnRsidRoot = mnRsid;
 
+mpTableStyles->Load();
+
 getIDocumentState().ResetModified();
 }
 
diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index 8d7e8a1..3d71381 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4646,12 +4646,11 @@ void SAL_CALL SwXTextTableStyle::replaceByName(const 
OUString& rName, const uno:
 throw lang::IllegalArgumentException();
 
 SwXTextCellStyle* pStyleToReplaceWith = 
dynamic_cast(xStyle.get());
-// replace only with physical ...
-if (pStyleToReplaceWith && !pStyleToReplaceWith->IsPhysical())
-throw lang::IllegalArgumentException();
+if (!pStyleToReplaceWith)
+ throw lang::IllegalArgumentException();
 
-// ... unassigned cell styles
-if 
(!m_pDocShell->GetDoc()->GetCellStyles().GetBoxFormat(xStyle->getName()))
+// replace only with physical ...
+if (!pStyleToReplaceWith->IsPhysical())
 throw lang::IllegalArgumentException();
 
 const auto& rTableTemplateMap = SwTableAutoFormat::GetTableTemplateMap();
@@ -4865,12 +4864,11 @@ OUString SAL_CALL SwXTextCellStyle::getParentStyle() 
throw (css::uno::RuntimeExc
 return m_sParentStyle;
 }
 
-void SAL_CALL SwXTextCellStyle::setParentStyle(const OUString& sParentStyle) 
throw (css::container::NoSuchElementException, css::uno::RuntimeException, 
std::exception)
+void SAL_CALL SwXTextCellStyle::setParentStyle(const OUString& 
/*sParentStyle*/) throw (css::container::NoSuchElementException, 
css::uno::RuntimeException, std::except

[Libreoffice-commits] core.git: include/editeng sc/source sd/source svx/source sw/inc sw/source

2016-07-27 Thread Caolán McNamara
 include/editeng/paragraphdata.hxx |2 +-
 sc/source/filter/excel/xiescher.cxx   |3 +--
 sd/source/ui/tools/PreviewRenderer.cxx|2 +-
 svx/source/svdraw/svdmrkv.cxx |6 +++---
 svx/source/unodraw/UnoGraphicExporter.cxx |2 +-
 svx/source/xoutdev/xtabdash.cxx   |2 +-
 sw/inc/swunohelper.hxx|2 +-
 sw/source/core/graphic/ndgrf.cxx  |2 +-
 8 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit 8bb1726007f641dff2aa17d2e79a089e09fd9770
Author: Caolán McNamara 
Date:   Wed Jul 27 12:48:32 2016 +0100

formally->formerly

Change-Id: I1d631f8dd09193c57b7b65e3202ed080ce15861b

diff --git a/include/editeng/paragraphdata.hxx 
b/include/editeng/paragraphdata.hxx
index d08bdaf..a804133 100644
--- a/include/editeng/paragraphdata.hxx
+++ b/include/editeng/paragraphdata.hxx
@@ -26,7 +26,7 @@
 // Only for internal use, oder some kind like hPara for the few
 // functions where you need it outside ( eg. moving paragraphs... )
 
-// Unfortunately NOT only local (formally in outliner.hxx), but also
+// Unfortunately NOT only local (formerly in outliner.hxx), but also
 // used in outlobj.hxx. Moved to own header
 
 class ParagraphData
diff --git a/sc/source/filter/excel/xiescher.cxx 
b/sc/source/filter/excel/xiescher.cxx
index 52a5ab5..30ccf35 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -3410,8 +3410,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const 
XclImpPictureObj& rPicOb
  Reference< XFormComponent >  xFComp;
  css::awt::Size aSz;  // not used in import
  ReadOCXCtlsStream( mxCtlsStrm, xFComp, 
rPicObj.GetCtlsStreamPos(),  rPicObj.GetCtlsStreamSize() );
- // recreate the method formally known as
- // ReadOCXExcelKludgeStream( )
+ // recreate the method formerly known as 
ReadOCXExcelKludgeStream()
  if ( xFComp.is() )
  {
  ScfPropertySet aPropSet( xFComp );
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx 
b/sd/source/ui/tools/PreviewRenderer.cxx
index bfa61b6..7cc72e0 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -255,7 +255,7 @@ bool PreviewRenderer::Initialize (
 return false;
 
 // #i121224# No need to set SetApplicationBackgroundColor (which is the 
color
-// of the area 'behind' the page (formally called 'Wiese') since the page 
previews
+// of the area 'behind' the page (formerly called 'Wiese') since the page 
previews
 // produced exactly cover the page's area, so it would never be visible. 
What
 // needs to be set is the ApplicationDocumentColor which is derived from
 // svtools::DOCCOLOR normally
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2e495ff..3819f47 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -690,12 +690,12 @@ void SdrMarkView::SetMarkHandles()
 // Using a strict return statement is okay here; no handles means *no* 
handles.
 if(mpMarkedObj)
 {
-// formally #i33755#: If TextEdit is active the EditEngine will 
directly paint
+// formerly #i33755#: If TextEdit is active the EditEngine will 
directly paint
 // to the window, so suppress Overlay and handles completely; a 
text frame for
 // the active text edit will be painted by the repaint mechanism in
 // SdrObjEditView::ImpPaintOutlinerView in this case. This needs 
to be reworked
 // in the future
-// Also formally #122142#: Pretty much the same for 
SdrCaptionObj's in calc.
+// Also formerly #122142#: Pretty much the same for 
SdrCaptionObj's in calc.
 if(static_cast(this)->IsTextEdit())
 {
 const SdrTextObj* pSdrTextObj = dynamic_cast< const 
SdrTextObj* >(mpMarkedObj);
@@ -715,7 +715,7 @@ void SdrMarkView::SetMarkHandles()
 }
 }
 
-// formally #i118524#: if inplace activated OLE is selected, 
suppress handles
+// formerly #i118524#: if inplace activated OLE is selected, 
suppress handles
 const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* 
>(mpMarkedObj);
 
 if(pSdrOle2Obj && (pSdrOle2Obj->isInplaceActive() || 
pSdrOle2Obj->isUiActive()))
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx 
b/svx/source/unodraw/UnoGraphicExporter.cxx
index 8dd270a..3d734ad 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -745,7 +745,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& 
rSettings, Graphic& aGraphic,
 pView->ShowSdrPage( pPage );
 
 // tdf#96922 completely deactivate EditView PageVisualization, 

[Libreoffice-commits] core.git: editeng/source include/editeng

2016-07-27 Thread Caolán McNamara
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |   11 ++-
 editeng/source/accessibility/accessibility.src  |5 -
 include/editeng/editrids.hrc|2 +-
 3 files changed, 3 insertions(+), 15 deletions(-)

New commits:
commit 0d174c974819d781804026f4c7e916a8092315c5
Author: Caolán McNamara 
Date:   Wed Jul 27 13:19:03 2016 +0100

Resolves: tdf#101003 don't give paras in editeng accessible names

change since...

commit c23ab5eaed57cc3fb5860e26c591c73c5b22687b
Author: Steve Yin 
Date:   Tue Nov 26 14:25:22 2013 +

Integrate branch of IAccessible2

keep the accessible description, but drop thea accessible name which
is reportedly an undesirable change.

Change-Id: I8f9c53ef967c4e566fde1829832aa035efce4f23

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index a719dbf..709a229 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -785,15 +785,8 @@ namespace accessibility
 
 OUString SAL_CALL AccessibleEditableTextPara::getAccessibleName() throw 
(uno::RuntimeException, std::exception)
 {
-SolarMutexGuard aGuard;
-
-// throws if defunc
-sal_Int32 nPara( GetParagraphIndex() );
-
-// Get the string from the resource for the specified id.
-OUString sStr(EditResId(RID_SVXSTR_A11Y_PARAGRAPH_NAME));
-OUString sParaIndex = OUString::number(nPara);
-return sStr.replaceFirst("$(ARG)", sParaIndex);
+//See tdf#101003 before implementing a body
+return OUString();
 }
 
 uno::Reference< XAccessibleRelationSet > SAL_CALL 
AccessibleEditableTextPara::getAccessibleRelationSet() throw 
(uno::RuntimeException, std::exception)
diff --git a/editeng/source/accessibility/accessibility.src 
b/editeng/source/accessibility/accessibility.src
index d668290..f1ff0da 100644
--- a/editeng/source/accessibility/accessibility.src
+++ b/editeng/source/accessibility/accessibility.src
@@ -34,9 +34,4 @@ String RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION
 Text [ en-US ] = "Paragraph: $(ARG) " ;
 };
 
-String RID_SVXSTR_A11Y_PARAGRAPH_NAME
-{
-Text [ en-US ] = "Paragraph $(ARG)" ;
-};
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/editeng/editrids.hrc b/include/editeng/editrids.hrc
index ab43df9..cff44d4 100644
--- a/include/editeng/editrids.hrc
+++ b/include/editeng/editrids.hrc
@@ -383,7 +383,7 @@
 #define RID_SVXITEMS_JUSTMETHOD_DISTRIBUTE  (RID_EDIT_START + 327)
 
 #define RID_SVXSTR_A11Y_PARAGRAPH_DESCRIPTION   (RID_EDIT_START + 328)
-#define RID_SVXSTR_A11Y_PARAGRAPH_NAME  (RID_EDIT_START + 329)
+// unused (RID_EDIT_START + 329)
 
 // Border lines (continued)
 #define RID_DASH_DOT(RID_EDIT_START + 330)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/cib_contract57' - vcl/source

2016-07-27 Thread Samuel Mehrbrodt
 vcl/source/window/accessibility.cxx |2 ++
 vcl/source/window/stacking.cxx  |2 +-
 vcl/source/window/window.cxx|2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e295459936a915d7003ace607727a6bcecc81755
Author: Samuel Mehrbrodt 
Date:   Wed Jul 27 11:00:55 2016 +0200

Fix some crashes

Change-Id: If647305bc886856991b21cce9499b76eaae2260c
Reviewed-on: https://gerrit.libreoffice.org/27573
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index 39befda..59091d4 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -152,6 +152,8 @@ namespace vcl {
 
 void Window::SetAccessible( ::com::sun::star::uno::Reference< 
::com::sun::star::accessibility::XAccessible > x )
 {
+if (mpWindowImpl == nullptr)
+return;
 mpWindowImpl->mxAccessible = x;
 }
 
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 52d9685..fb4760c 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -862,7 +862,7 @@ void Window::SetParent( vcl::Window* pNewParent )
 DBG_ASSERT( pNewParent, "Window::SetParent(): pParent == NULL" );
 DBG_ASSERT( pNewParent != this, "someone tried to reparent a window to 
itself" );
 
-if( pNewParent == this )
+if( pNewParent == this || pNewParent == nullptr)
 return;
 
 // check if the taskpanelist would change and move the window pointer 
accordingly
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index e8d2b96..6c2b1d6 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3292,6 +3292,8 @@ const OUString& Window::GetHelpText() const
 
 void Window::SetWindowPeer( Reference< css::awt::XWindowPeer > xPeer, 
VCLXWindow* pVCLXWindow  )
 {
+if (mpWindowImpl == nullptr)
+return;
 // be safe against re-entrance: first clear the old ref, then assign the 
new one
 mpWindowImpl->mxWindowPeer.clear();
 mpWindowImpl->mxWindowPeer = xPeer;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa writerfilter/source

2016-07-27 Thread Justin Luth
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx  |2 +-
 writerfilter/source/dmapper/DomainMapper.cxx  |5 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   11 +++
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |3 +++
 4 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 91ad1017b609be6fceccd392006dd9ab60724352
Author: Justin Luth 
Date:   Sat Jul 23 09:10:29 2016 +0300

tdf#75573 - docx don't remove frame anchor paragraph

frames anchor to the following paragraph.  Don't remove
an empty paragraph if it follows a frame or else the frame
will jump to the next page.

This gets a bit complicated because headers/footers contain
paragraphs that aren't really "following" the frame paragraph,
and so wouldn't be used as anchor paragraphs.
There may be similar sub-paragraphs for comments etc, but
exceptions for those can be added when proof documents are found.

Change-Id: I46988b40abe65e23a5c407dde38a951937978005
Reviewed-on: https://gerrit.libreoffice.org/27455
Tested-by: Jenkins 
Reviewed-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index b363c7a..b904bdf 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1739,7 +1739,7 @@ DECLARE_OOXMLIMPORT_TEST(testTdf75573, 
"tdf75573_page1frame.docx")
 lcl_countTextFrames( mxComponent, 1 );
 
 // the frame should be on page 1
-//CPPUNIT_ASSERT_EQUAL( OUString("lorem ipsum"), 
parseDump("/root/page[1]/body/section/txt/anchored/fly/txt[1]/text()") );
+CPPUNIT_ASSERT_EQUAL( OUString("lorem ipsum"), 
parseDump("/root/page[1]/body/section/txt/anchored/fly/txt[1]/text()") );
 
 // the "Proprietary" style should set the vertical and horizontal anchors 
to the page
 uno::Reference xPropertySet(getShape(1), 
uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 9a39149..ddaafd5 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3217,7 +3217,10 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 bool bSingleParagraph = m_pImpl->GetIsFirstParagraphInSection() && 
m_pImpl->GetIsLastParagraphInSection();
 // If the paragraph contains only the section properties and it has
 // no runs, we should not create a paragraph for it in Writer, 
unless that would remove the whole section.
-bool bRemove = !m_pImpl->GetParaChanged() && 
m_pImpl->GetParaSectpr() && !bSingleParagraph && 
!m_pImpl->GetIsDummyParaAddedForTableInSection();
+bool bRemove = !m_pImpl->GetParaChanged() && 
m_pImpl->GetParaSectpr()
+   && !bSingleParagraph
+   && !m_pImpl->GetIsDummyParaAddedForTableInSection()
+   && !m_pImpl->GetIsLastParagraphFramed();
 if (bRemove)
 {
 // tdf#97417 delete numbering of the paragraph
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b5dff72..5f6e05d 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -215,6 +215,7 @@ DomainMapper_Impl::DomainMapper_Impl(
 m_bIsFirstParaInSection( true ),
 m_bDummyParaAddedForTableInSection( false ),
 m_bTextFrameInserted(false),
+m_bIsLastParagraphFramed( false ),
 m_bIsLastParaInSection( false ),
 m_bIsLastSectionGroup( false ),
 m_bIsInComments( false ),
@@ -1187,6 +1188,16 @@ void DomainMapper_Impl::finishParagraph( const 
PropertyMapPtr& pPropertyMap )
 }
 }
 
+if((pParaContext && pParaContext->IsFrameMode())
+|| (IsInHeaderFooter() && GetIsLastParagraphFramed()) )
+{
+SetIsLastParagraphFramed(true);
+}
+else
+{
+SetIsLastParagraphFramed(false);
+}
+
 m_bParaChanged = false;
 if (!pParaContext || !pParaContext->IsFrameMode())
 { // If the paragraph is in a frame, it's not a paragraph of the section 
itself.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index ec66b20..5c34a23 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -435,6 +435,7 @@ private:
 boolm_bIsFirstParaInSection;
 boolm_bDummyParaAddedForTableInSection;
 boolm_bTextFrameInserted;
+boolm_bIsLastParagraphFramed;
 boolm_bIsLastParaInSection;
 boolm_bIsLastSectionGroup;
 bo

[Libreoffice-commits] core.git: sw/source

2016-07-27 Thread Jan Holesovsky
 sw/source/uibase/shells/basesh.cxx |   49 ++---
 sw/source/uibase/shells/drawsh.cxx |4 +--
 2 files changed, 26 insertions(+), 27 deletions(-)

New commits:
commit 5bd8b05f9b0adb93aec4d6ad7b67c7003092b873
Author: Jan Holesovsky 
Date:   Wed Jul 27 11:44:44 2016 +0200

Simplify dynamic_cast followed by a static_cast.

Change-Id: Ic95ca9b07e73a9f5b25834cd2d23c9180861b7c1

diff --git a/sw/source/uibase/shells/basesh.cxx 
b/sw/source/uibase/shells/basesh.cxx
index 7edbca9..041b8ea 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -1127,25 +1127,24 @@ void SwBaseShell::Execute(SfxRequest &rReq)
 break;
 
 case FN_XFORMS_DESIGN_MODE:
-if( pArgs != nullptr
-&& pArgs->GetItemState( nSlot, true, &pItem ) == 
SfxItemState::SET
-&& pItem != nullptr
-&& dynamic_cast< const SfxBoolItem *>( pItem ) !=  nullptr )
-{
-bool bDesignMode =
-static_cast( pItem )->GetValue();
-
-// set form design mode
-OSL_ENSURE( GetView().GetFormShell() != nullptr, "form shell?" 
);
-SfxRequest aReq( GetView().GetViewFrame(), SID_FM_DESIGN_MODE 
);
-aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, bDesignMode 
) );
-GetView().GetFormShell()->Execute( aReq );
-aReq.Done();
-
-// also set suitable view options
-SwViewOption aViewOption = *rSh.GetViewOptions();
-aViewOption.SetFormView( ! bDesignMode );
-rSh.ApplyViewOptions( aViewOption );
+if (pArgs && pArgs->GetItemState(nSlot, true, &pItem) == 
SfxItemState::SET)
+{
+if (const SfxBoolItem* pBoolItem = dynamic_cast(pItem))
+{
+bool bDesignMode = pBoolItem->GetValue();
+
+// set form design mode
+OSL_ENSURE( GetView().GetFormShell() != nullptr, "form 
shell?" );
+SfxRequest aReq( GetView().GetViewFrame(), 
SID_FM_DESIGN_MODE );
+aReq.AppendItem( SfxBoolItem( SID_FM_DESIGN_MODE, 
bDesignMode ) );
+GetView().GetFormShell()->Execute( aReq );
+aReq.Done();
+
+// also set suitable view options
+SwViewOption aViewOption = *rSh.GetViewOptions();
+aViewOption.SetFormView( ! bDesignMode );
+rSh.ApplyViewOptions( aViewOption );
+}
 }
 break;
 
@@ -2127,13 +2126,13 @@ void SwBaseShell::GetTextFontCtrlState( SfxItemSet& 
rSet )
 if(RES_CHRATR_FONT == nWhich)
 {
 vcl::Font aFont;
-if(pI && dynamic_cast< const SvxFontItem *>( pI ) !=  
nullptr)
+if (const SvxFontItem* pFontItem = dynamic_cast(pI))
 {
-aFont.SetFamilyName( static_cast(pI)->GetFamilyName());
-aFont.SetStyleName(static_cast(pI)->GetStyleName());
-aFont.SetFamily(static_cast(pI)->GetFamily());
-aFont.SetPitch(static_cast(pI)->GetPitch());
-aFont.SetCharSet(static_cast(pI)->GetCharSet());
+aFont.SetFamilyName(pFontItem->GetFamilyName());
+aFont.SetStyleName(pFontItem->GetStyleName());
+aFont.SetFamily(pFontItem->GetFamily());
+aFont.SetPitch(pFontItem->GetPitch());
+aFont.SetCharSet(pFontItem->GetCharSet());
 }
 
 bool bVertical = rSh.IsInVerticalText();
diff --git a/sw/source/uibase/shells/drawsh.cxx 
b/sw/source/uibase/shells/drawsh.cxx
index a1bb766..e5632b5 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -139,9 +139,9 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
 
 rSh.StartUndo(UNDO_PASTE_CLIPBOARD);
 
-if(dynamic_cast< SdrGrafObj* >(&rObject))
+if (SdrGrafObj* pSdrGrafObj = 
dynamic_cast(&rObject))
 {
-SdrGrafObj* pNewGrafObj = 
static_cast(rObject.Clone());
+SdrGrafObj* pNewGrafObj = pSdrGrafObj->Clone();
 
 pNewGrafObj->SetGraphic(aGraphic);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/inc sc/source

2016-07-27 Thread Caolán McNamara
 sc/inc/postit.hxx  |2 ++
 sc/source/core/data/postit.cxx |9 +
 sc/source/core/data/table6.cxx |   23 +++
 3 files changed, 30 insertions(+), 4 deletions(-)

New commits:
commit a2890a3fcdfcbf2447871ebc23db47864dd5b215
Author: Caolán McNamara 
Date:   Wed Jul 27 11:32:49 2016 +0100

Resolves: tdf#65334 cannot search in cell notes

regression since...

commit c06dbbe7594c2a0b5a5b19f8e183d9c421e6e094
Author: Markus Mohrhard 
Date:   Thu Feb 23 23:36:49 2012 +0100

remove mpNote from ScBaseCell

and requires restoring some code subsequently removed in

commit a1a1131c16227327d17bcf5ad2a5209ddc0f01a1
Date:   Sun Mar 4 15:27:27 2012 +0800

Remove unused code

Change-Id: If931c3162cacaeb126e730e3e79c1c47be4ce434
(cherry picked from commit 7c84a219e3cc8d623826343f547ba8adacca6d56)
Reviewed-on: https://gerrit.libreoffice.org/27577
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
Tested-by: Jenkins 

diff --git a/sc/inc/postit.hxx b/sc/inc/postit.hxx
index 8a7dec8..fb962442 100644
--- a/sc/inc/postit.hxx
+++ b/sc/inc/postit.hxx
@@ -118,6 +118,8 @@ public:
 
 /** Returns the caption text of this note. */
 OUString GetText() const;
+/** Returns true, if the caption text of this note contains line breaks. */
+boolHasMultiLineText() const;
 /** Changes the caption text of this note. All text formatting will be 
lost. */
 voidSetText( const ScAddress& rPos, const OUString& rText 
);
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index 8eb8331..64f47a5 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -562,6 +562,15 @@ OUString ScPostIt::GetText() const
 return OUString();
 }
 
+bool ScPostIt::HasMultiLineText() const
+{
+if( const EditTextObject* pEditObj = GetEditTextObject() )
+return pEditObj->GetParagraphCount() > 1;
+if( maNoteData.mxInitData.get() )
+return maNoteData.mxInitData->maSimpleText.indexOf( '\n' ) >= 0;
+return false;
+}
+
 void ScPostIt::SetText( const ScAddress& rPos, const OUString& rText )
 {
 CreateCaptionFromInitData( rPos );
diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 2c63ed4..b5a4499 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -73,6 +73,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 return false;
 
 bool bMultiLine = false;
+ScPostIt* pNote = nullptr;
 CellType eCellType = aCell.meType;
 switch (rSearchItem.GetCellType())
 {
@@ -89,8 +90,8 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 else
 aCol[nCol].GetString( nRow, aString );
 }
+break;
 }
-break;
 case SvxSearchCellType::VALUE:
 if ( eCellType == CELLTYPE_EDIT )
 bMultiLine = lcl_GetTextWithBreaks(*aCell.mpEditText, 
pDocument, aString);
@@ -103,7 +104,15 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 }
 break;
 case SvxSearchCellType::NOTE:
-break; // don't search this case here
+{
+pNote = aCol[nCol].GetCellNote(nRow);
+if (pNote)
+{
+aString = pNote->GetText();
+bMultiLine = pNote->HasMultiLineText();
+}
+break;
+}
 default:
 break;
 }
@@ -212,8 +221,14 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 }
 }
 while (bRepeat);
-
-if ( cMatrixFlag != MM_NONE )
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+{
+// NB: rich text format is lost.
+// This is also true of Cells.
+if (pNote)
+pNote->SetText( ScAddress( nCol, nRow, nTab ), aString );
+}
+else if ( cMatrixFlag != MM_NONE )
 {   // don't split Matrix
 if ( aString.getLength() > 2 )
 {   // remove {} here so that "{=" can be replaced by "{=..."
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svl include/xmloff svl/source xmloff/source

2016-07-27 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |1 +
 include/xmloff/xmlnumfe.hxx  |2 +-
 include/xmloff/xmltoken.hxx  |1 +
 svl/source/numbers/zformat.cxx   |   20 
 xmloff/source/core/xmltoken.cxx  |1 +
 xmloff/source/style/xmlnumfe.cxx |   17 ++---
 xmloff/source/style/xmlnumfi.cxx |   14 +-
 7 files changed, 51 insertions(+), 5 deletions(-)

New commits:
commit f06a3503b69819e1d018ee4f587655173dff503e
Author: Laurent Balland-Poirier 
Date:   Sat Jul 16 22:39:32 2016 +0200

tdf#100834 Extend ODF for integer/fraction delimiter

Any string can be used as delimiter between integer and fraction.
It is now saved/loaded to/from ODF, as it was from XLS.

Change-Id: Ie6364d1cdefc020ea615c18099118135c619f96b
Reviewed-on: https://gerrit.libreoffice.org/27262
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index ab82bcc..57245a9 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -251,6 +251,7 @@ public:
 
 OUString GetDenominatorString( sal_uInt16 nNumFor ) const;
 OUString GetNumeratorString( sal_uInt16 nNumFor ) const;
+OUString GetIntegerFractionDelimiterString( sal_uInt16 nNumFor ) const;
 /** If the count of string elements (substrings, ignoring [modifiers] and
 so on) in a subformat code nNumFor (0..3) is equal to the given number.
 Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index be72e4b..c04b8e4 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -70,7 +70,7 @@ private:
 SAL_DLLPRIVATE void WriteScientificElement_Impl( sal_Int32 nDecimals, 
sal_Int32 nMinDecimals, sal_Int32 nInteger,
 bool bGrouping, sal_Int32 nExp, 
sal_Int32 nExpInterval, bool bExpSign );
 SAL_DLLPRIVATE void WriteFractionElement_Impl( sal_Int32 nInteger, bool 
bGrouping,
-   const OUString& 
aNumeratorString, const OUString& aDenominatorString );
+   const SvNumberformat& 
rFormat, sal_uInt16 nPart );
 SAL_DLLPRIVATE void WriteCurrencyElement_Impl( const OUString& rString,
 const OUString& rExt );
 SAL_DLLPRIVATE void WriteBooleanElement_Impl();
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index aa462c3..0a56591 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3271,6 +3271,7 @@ namespace xmloff { namespace token {
 XML_MAX_NUMERATOR_DIGITS,
 XML_ZEROS_NUMERATOR_DIGITS,
 XML_ZEROS_DENOMINATOR_DIGITS,
+XML_INTEGER_FRACTION_DELIMITER,
 
 XML_TOKEN_END
 };
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 5e37a70..ce018a1 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2020,6 +2020,19 @@ OUString lcl_GetFractionIntegerString(const 
ImpSvNumberformatInfo &rInfo, sal_uI
 return aIntegerString.makeStringAndClear();
 }
 
+OUString lcl_GetIntegerFractionDelimiterString(const ImpSvNumberformatInfo 
&rInfo, sal_uInt16 nAnz)
+{
+sal_Int16 i;
+for( i = 0; i < nAnz; i++ )
+{
+if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRACBLANK )
+{
+return rInfo.sStrArray[i];
+}
+}
+return OUString();
+}
+
 }
 
 OUString SvNumberformat::GetDenominatorString( sal_uInt16 nNumFor ) const
@@ -2036,6 +2049,13 @@ OUString SvNumberformat::GetNumeratorString( sal_uInt16 
nNumFor ) const
 return lcl_GetNumeratorString( rInfo, nAnz );
 }
 
+OUString SvNumberformat::GetIntegerFractionDelimiterString( sal_uInt16 nNumFor 
) const
+{
+const ImpSvNumberformatInfo& rInfo = NumFor[nNumFor].Info();
+sal_uInt16 nAnz = NumFor[nNumFor].GetCount();
+return lcl_GetIntegerFractionDelimiterString( rInfo, nAnz );
+}
+
 bool SvNumberformat::GetOutputString(double fNumber, sal_uInt16 nCharCount, 
OUString& rOutString) const
 {
 using namespace std;
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 6f7caaa..f6924bb 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3267,6 +3267,7 @@ namespace xmloff { namespace token {
 TOKEN( "max-numerator-digits",XML_MAX_NUMERATOR_DIGITS ),
 TOKEN( "zeros-numerator-digits",  XML_ZEROS_NUMERATOR_DIGITS ),
 TOKEN( "zeros-denominator-digits",XML_ZEROS_DENOMINATOR_DIGITS 
),
+TOKEN( "integer-fraction-delimiter",  
XML_INTEGER_FRACTION_DELIMITER ),
 
 #if OSL_DEBUG_LEVEL > 0
 { 0, nullptr, nullptr,   XML_TOKEN_END }
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 20b416c..f449331 1006

[Libreoffice-commits] core.git: cui/source

2016-07-27 Thread Rishabh Kumar
 cui/source/tabpages/tpbitmap.cxx |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 5e0b0de0af07d3d8415370f1dea4dd61e811eed0
Author: Rishabh Kumar 
Date:   Wed Jul 27 16:53:30 2016 +0530

Bug fix: Fill bitmap item set only when bitmap tab is selected

Change-Id: I9bb7bdeecfcd51e8191f82c649585af8458f1001
Reviewed-on: https://gerrit.libreoffice.org/27578
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 51668d12..09012bb 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -137,20 +137,22 @@ bool SvxBitmapTabPage::FillItemSet( SfxItemSet* rAttrs )
 bool bModified = false;
 if( m_nDlgType == 0 && !*m_pbAreaTP )
 {
-rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
-size_t nPos = m_pBitmapLB->GetSelectItemPos();
-if(VALUESET_ITEM_NOTFOUND != nPos)
+if(PT_BITMAP == *m_nPageType)
 {
-const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( 
static_cast(nPos) );
-const OUString aString(m_pBitmapLB->GetItemText( 
m_pBitmapLB->GetSelectItemId() ));
-rAttrs->Put(XFillBitmapItem(aString, 
pXBitmapEntry->GetGraphicObject()));
-bModified = true;
-}
+rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
+size_t nPos = m_pBitmapLB->GetSelectItemPos();
+if(VALUESET_ITEM_NOTFOUND != nPos)
+{
+const XBitmapEntry* pXBitmapEntry = m_pBitmapList->GetBitmap( 
static_cast(nPos) );
+const OUString aString(m_pBitmapLB->GetItemText( 
m_pBitmapLB->GetSelectItemId() ));
+rAttrs->Put(XFillBitmapItem(aString, 
pXBitmapEntry->GetGraphicObject()));
+bModified = true;
+}
 
-rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
-rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+rAttrs->Put (SfxUInt16Item(SID_PAGE_TYPE,*m_nPageType));
+rAttrs->Put (SfxUInt16Item(SID_TABPAGE_POS,*m_nPos));
+}
 }
-
 return bModified;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/core/data/table6.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f027c77c520adbdf8cec59e0484fc87b33cf203b
Author: Eike Rathke 
Date:   Wed Jul 27 16:03:33 2016 +0200

include empty cells if notes are searched, tdf#65334 follow-up

Change-Id: Ib67b9745730b209df2b82dc7e46fc4774900

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index b5a4499..a41aa64 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -69,7 +69,7 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 return false;
 
 aCell = aCol[nCol].GetCellValue(nRow);
-if (aCell.isEmpty())
+if (aCell.isEmpty() && rSearchItem.GetCellType() != 
SvxSearchCellType::NOTE)
 return false;
 
 bool bMultiLine = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC : Week #9 : Import Cell Styles via Orcus

2016-07-27 Thread Jaskaran Singh
Hi,
This week the following work has been done :-

   1. Implemented odf strikeout interface.
   2. Fixed the bug that prevented underline to be set properly.
   3. Implemented odf alignment interface.

The following work has to be done this week :-

   1. Fix a small issue that i noticed in Orcus.
   2. Add automated tests for the interface.

Thanks for reading.

Regards,
Jaskaran
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/core/data/table6.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 09cc958dee93ad0ad2ab0d8cc9cc4c09e46c3653
Author: Eike Rathke 
Date:   Wed Jul 27 16:33:31 2016 +0200

use GetCellArea() when searching for notes, tdf#65334 follow-up

... so empty cells with notes are included as last "data" position if they 
are
below or right of the last "real" data, which GetLastDataPos() doesn't.

Change-Id: I9bb7464033736e7e7fa24e635ef1a3d39626002b

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index a41aa64..e5582b4 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -300,7 +300,10 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 {
 SCCOL nLastCol;
 SCROW nLastRow;
-GetLastDataPos(nLastCol, nLastRow);
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+GetCellArea( nLastCol, nLastRow);
+else
+GetLastDataPos(nLastCol, nLastRow);
 return Search(rSearchItem, rCol, rRow, nLastCol, nLastRow, rMark, 
rUndoStr, pUndoDoc);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp

2016-07-27 Thread Ashod Nakashian
 loolwsd/ChildSession.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 92d36a57913c45fe3b71fa4e6c4f8f4635269cf1
Author: Ashod Nakashian 
Date:   Sun Jul 24 22:50:26 2016 -0400

loolwsd: loKitDocument might be invalid

Check for valid loKitDocument instance when
using it in ChildSession dtor.

Change-Id: I1e883d0f1bbe530bf3055a2d0833be2d38ef253c
Reviewed-on: https://gerrit.libreoffice.org/27584
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 6b562dc..faf8c89 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -327,7 +327,7 @@ void ChildSession::disconnect()
 {
 std::unique_lock lock(Mutex);
 
-if (_multiView)
+if (_multiView && _loKitDocument)
 _loKitDocument->setView(_viewId);
 
 _onUnload(getId());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp loolwsd/LOKitHelper.hpp loolwsd/protocol.txt loolwsd/test

2016-07-27 Thread Ashod Nakashian
 loolwsd/ChildSession.cpp|2 +-
 loolwsd/LOKitHelper.hpp |3 ++-
 loolwsd/protocol.txt|2 +-
 loolwsd/test/TileCacheTests.cpp |5 +++--
 loolwsd/test/helpers.hpp|6 --
 loolwsd/test/httpwstest.cpp |   15 ---
 6 files changed, 19 insertions(+), 14 deletions(-)

New commits:
commit d56f9a0386eed52a9a09ea87a5d9a40db94285e3
Author: Ashod Nakashian 
Date:   Tue Jul 26 08:03:46 2016 -0400

loolwsd: status now includes the view-ID of the client

Change-Id: Iac1cd806ac24ff3956624513946921020d248664
Reviewed-on: https://gerrit.libreoffice.org/27585
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index faf8c89..3413948 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -981,7 +981,7 @@ bool ChildSession::mouseEvent(const char* /*buffer*/, int 
/*length*/, StringToke
 
 bool ChildSession::unoCommand(const char* /*buffer*/, int /*length*/, 
StringTokenizer& tokens)
 {
-if (tokens.count() == 1)
+if (tokens.count() <= 1)
 {
 sendTextFrame("error: cmd=uno kind=syntax");
 return false;
diff --git a/loolwsd/LOKitHelper.hpp b/loolwsd/LOKitHelper.hpp
index 00e13b9..f05bddd 100644
--- a/loolwsd/LOKitHelper.hpp
+++ b/loolwsd/LOKitHelper.hpp
@@ -120,7 +120,8 @@ namespace LOKitHelper
 long width, height;
 loKitDocument->pClass->getDocumentSize(loKitDocument, &width, &height);
 oss << " width=" << width
-<< " height=" << height;
+<< " height=" << height
+<< " viewid=" << loKitDocument->pClass->getView(loKitDocument);
 
 if (type == LOK_DOCTYPE_SPREADSHEET || type == 
LOK_DOCTYPE_PRESENTATION)
 {
diff --git a/loolwsd/protocol.txt b/loolwsd/protocol.txt
index e25dbf2..fc566eb 100644
--- a/loolwsd/protocol.txt
+++ b/loolwsd/protocol.txt
@@ -266,7 +266,7 @@ nextmessage: size=
 must be handled by clients that cannot (like those using Poco
 1.6.0, like the "loadtest" program in the loolwsd sources).
 
-status: type= parts= current= 
width= height= [partNames]
+status: type= parts= current= 
width= height= viewid= [partNames]
 
  is 'text, 'spreadsheet', 'presentation', 'drawing' or 'other. 
Others are numbers.
 if the document has multiple parts and those have names, part names follow 
separated by '\n'
diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index 0af1f9b..6c0ba64 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -348,6 +348,7 @@ void TileCacheTests::testLoad12ods()
 int docSheets = 0;
 int docHeight = 0;
 int docWidth = 0;
+int docViewId = -1;
 
 std::string response;
 
@@ -365,7 +366,7 @@ void TileCacheTests::testLoad12ods()
 sendTextFrame(socket, "status");
 getResponseMessage(socket, "status:", response, false);
 CPPUNIT_ASSERT_MESSAGE("did not receive a status: message as 
expected", !response.empty());
-getDocSize(response, "spreadsheet", docSheet, docSheets, docWidth, 
docHeight);
+getDocSize(response, "spreadsheet", docSheet, docSheets, docWidth, 
docHeight, docViewId);
 
 checkBlackTiles(socket, docSheet, docWidth, docWidth);
 }
@@ -723,7 +724,7 @@ void TileCacheTests::checkTiles(Poco::Net::WebSocket& 
socket, const std::string&
 
 std::cout << "status: " << response << std::endl;
 Poco::StringTokenizer tokens(line, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
-CPPUNIT_ASSERT_EQUAL(static_cast(5), tokens.count());
+CPPUNIT_ASSERT_EQUAL(static_cast(6), tokens.count());
 
 // Expected format is something like 'type= parts= current= width= 
height='.
 text = tokens[0].substr(type.size());
diff --git a/loolwsd/test/helpers.hpp b/loolwsd/test/helpers.hpp
index 53a868a..ce21613 100644
--- a/loolwsd/test/helpers.hpp
+++ b/loolwsd/test/helpers.hpp
@@ -417,10 +417,10 @@ void SocketProcessor(const std::string& name,
 
 inline
 void getDocSize(const std::string& message, const std::string& type,
-int& part, int& parts, int& width, int& height)
+int& part, int& parts, int& width, int& height, int& viewid)
 {
 Poco::StringTokenizer tokens(message, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
-CPPUNIT_ASSERT_EQUAL(static_cast(5), tokens.count());
+CPPUNIT_ASSERT_EQUAL(static_cast(6), tokens.count());
 
 // Expected format is something like 'type= parts= current= width= 
height='.
 const std::string text = tokens[0].substr(std::string("type=").size());
@@ -428,11 +428,13 @@ void getDocSize(const std::string& message, const 
std::string& type,
 part = std::stoi(tokens[2].substr(std::string("current=").size()));
 width = std::stoi(tokens[3].substr(std::string("width=").size()));
 height = s

[Libreoffice-commits] online.git: loolwsd/ChildSession.cpp

2016-07-27 Thread Ashod Nakashian
 loolwsd/ChildSession.cpp |   17 +
 1 file changed, 17 insertions(+)

New commits:
commit 7826d858321a19fdc730cdb409435ed4b3ed66f6
Author: Ashod Nakashian 
Date:   Wed Jul 27 08:15:53 2016 -0400

loolwsd: forward new notifications

Change-Id: I434545a5edb48f957d0e03c02040cc25644f67c4
Reviewed-on: https://gerrit.libreoffice.org/27586
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 3413948..682750c 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -237,6 +237,23 @@ public:
 case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
 _session.sendTextFrame("statusindicatorfinish:");
 break;
+case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
+_session.sendTextFrame("invalidateviewcursor: " + rPayload);
+break;
+case LOK_CALLBACK_TEXT_VIEW_SELECTION:
+_session.sendTextFrame("textviewselection: " + rPayload);
+break;
+case LOK_CALLBACK_CELL_VIEW_CURSOR:
+_session.sendTextFrame("cellviewcursor: " + rPayload);
+break;
+case LOK_CALLBACK_GRAPHIC_VIEW_SELECTION:
+_session.sendTextFrame("graphicviewselection: " + rPayload);
+break;
+case LOK_CALLBACK_VIEW_LOCK:
+_session.sendTextFrame("viewlock: " + rPayload);
+break;
+default:
+Log::error("Unknown callback event (" + std::to_string(nType) + 
"): " + rPayload);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/test

2016-07-27 Thread Ashod Nakashian
 loolwsd/test/httpwstest.cpp |   73 
 1 file changed, 48 insertions(+), 25 deletions(-)

New commits:
commit 219143cedaa79c8ce9ef49faa3af5af2ea5aad6a
Author: Ashod Nakashian 
Date:   Wed Jul 27 08:17:08 2016 -0400

loolwsd: unittest fixes for multiview

Three tests still fail and seem to be regressions
due to multiview. When WSD is not running with
multiview support, these tests pass.

Change-Id: Ice3224d92d10f761cb8827d35c9c0c5dd82ae308
Reviewed-on: https://gerrit.libreoffice.org/27587
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index c2c94bb..c25328f 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -63,7 +63,8 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
 CPPUNIT_TEST(testLoad);
 CPPUNIT_TEST(testBadLoad);
 CPPUNIT_TEST(testReload);
-CPPUNIT_TEST(testSaveOnDisconnect);
+CPPUNIT_TEST(testGetTextSelection);
+CPPUNIT_TEST(testSaveOnDisconnect); // Broken with multiview.
 CPPUNIT_TEST(testReloadWhileDisconnecting);
 CPPUNIT_TEST(testExcelLoad);
 CPPUNIT_TEST(testPaste);
@@ -80,9 +81,9 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
 CPPUNIT_TEST(testMaxColumn);
 CPPUNIT_TEST(testMaxRow);
 CPPUNIT_TEST(testInsertAnnotationWriter);
-CPPUNIT_TEST(testEditAnnotationWriter);
+CPPUNIT_TEST(testEditAnnotationWriter);  // Broken with multiview.
 CPPUNIT_TEST(testInsertAnnotationCalc);
-CPPUNIT_TEST(testCalcEditRendering);
+CPPUNIT_TEST(testCalcEditRendering);  // Broken with multiview.
 CPPUNIT_TEST(testFontList);
 CPPUNIT_TEST(testStateUnoCommand);
 
@@ -95,6 +96,7 @@ class HTTPWSTest : public CPPUNIT_NS::TestFixture
 void testLoad();
 void testBadLoad();
 void testReload();
+void testGetTextSelection();
 void testSaveOnDisconnect();
 void testReloadWhileDisconnecting();
 void testExcelLoad();
@@ -421,6 +423,35 @@ void HTTPWSTest::testReload()
 }
 }
 
+void HTTPWSTest::testGetTextSelection()
+{
+std::string documentPath, documentURL;
+getDocumentPathAndURL("hello.odt", documentPath, documentURL);
+
+try
+{
+// Load a document and get its status.
+Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, 
documentURL);
+Poco::Net::WebSocket socket = *connectLOKit(_uri, request, _response);
+
+sendTextFrame(socket, "load url=" + documentURL);
+CPPUNIT_ASSERT_MESSAGE("cannot load the document " + documentURL, 
isDocumentLoaded(socket));
+
+Poco::Net::WebSocket socket2 = *connectLOKit(_uri, request, _response);
+sendTextFrame(socket2, "load url=" + documentURL);
+CPPUNIT_ASSERT_MESSAGE("cannot load the document " + documentURL, 
isDocumentLoaded(socket2, "", true));
+
+sendTextFrame(socket, "uno .uno:SelectAll");
+sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
+const auto selection = assertResponseLine(socket, 
"textselectioncontent:");
+CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: Hello world"), 
selection);
+}
+catch (const Poco::Exception& exc)
+{
+CPPUNIT_FAIL(exc.displayText());
+}
+}
+
 void HTTPWSTest::testSaveOnDisconnect()
 {
 std::string documentPath, documentURL;
@@ -445,6 +476,12 @@ void HTTPWSTest::testSaveOnDisconnect()
 sendTextFrame(socket, "uno .uno:Delete");
 sendTextFrame(socket, "paste mimetype=text/plain;charset=utf-8\naaa 
bbb ccc");
 
+// Check if the document contains the pasted text.
+sendTextFrame(socket, "uno .uno:SelectAll");
+sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
+const auto selection = assertResponseLine(socket, 
"textselectioncontent:");
+CPPUNIT_ASSERT_EQUAL(std::string("textselectioncontent: aaa bbb ccc"), 
selection);
+
 // Closing connection too fast might not flush buffers.
 // Often nothing more than the SelectAll reaches the server before
 // the socket is closed, when the doc is not even modified yet.
@@ -481,28 +518,8 @@ void HTTPWSTest::testSaveOnDisconnect()
 // Check if the document contains the pasted text.
 sendTextFrame(socket, "uno .uno:SelectAll");
 sendTextFrame(socket, "gettextselection 
mimetype=text/plain;charset=utf-8");
-std::string selection;
-int flags;
-int n;
-do
-{
-char buffer[READ_BUFFER_SIZE];
-n = socket.receiveFrame(buffer, sizeof(buffer), flags);
-std::cout << "Got " << n << " bytes, flags: " << std::hex << flags 
<< std::dec << '\n';
-if (n > 0 && (flags & Poco::Net::WebSocket::FRAME_OP_BITMASK) != 
Poco::Net::WebSocket::FRAME_OP_CLOSE)
-{
-std::cout << "Received message: " << 
LOOLProtocol::getAbbre

[Libreoffice-commits] online.git: loolwsd/ClientSession.cpp loolwsd/LOOLSession.cpp loolwsd/LOOLSession.hpp loolwsd/PrisonerSession.cpp

2016-07-27 Thread Ashod Nakashian
 loolwsd/ClientSession.cpp   |   18 +-
 loolwsd/LOOLSession.cpp |9 -
 loolwsd/LOOLSession.hpp |   11 ---
 loolwsd/PrisonerSession.cpp |   14 ++
 4 files changed, 31 insertions(+), 21 deletions(-)

New commits:
commit ecd33e1b07793d83396f22fad38ef70cb33e4612
Author: Ashod Nakashian 
Date:   Wed Jul 27 10:56:28 2016 -0400

loolwsd: send json messages to the UI as text

Change-Id: Ie5712b4ebf4f01a6650f5f7c0df5197b5b9f9208
Reviewed-on: https://gerrit.libreoffice.org/27588
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ClientSession.cpp b/loolwsd/ClientSession.cpp
index fda1678..f3c2a00 100644
--- a/loolwsd/ClientSession.cpp
+++ b/loolwsd/ClientSession.cpp
@@ -147,7 +147,7 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
 {
 if (!_peer.expired())
 {
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 }
 else if (tokens[0] == "commandvalues")
@@ -190,11 +190,11 @@ bool ClientSession::_handleInput(const char *buffer, int 
length)
  tokens[0] != "userinactive" && tokens[0] != "useractive")
 {
 std::string dummyFrame = "dummymsg";
-return forwardToPeer(_peer, dummyFrame.c_str(), dummyFrame.size());
+return forwardToPeer(_peer, dummyFrame.c_str(), dummyFrame.size(), 
false);
 }
 else if (tokens[0] != "requestloksession")
 {
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 else
 {
@@ -236,7 +236,7 @@ bool ClientSession::loadDocument(const char* /*buffer*/, 
int /*length*/, StringT
 oss << " options=" << _docOptions;
 
 const auto loadRequest = oss.str();
-return forwardToPeer(_peer, loadRequest.c_str(), loadRequest.size());
+return forwardToPeer(_peer, loadRequest.c_str(), loadRequest.size(), 
false);
 }
 catch (const Poco::SyntaxException&)
 {
@@ -259,7 +259,7 @@ bool ClientSession::getStatus(const char *buffer, int 
length)
 return sendTextFrame(msg);
 }
 
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 
 bool ClientSession::setEditLock(const bool value)
@@ -269,7 +269,7 @@ bool ClientSession::setEditLock(const bool value)
 const auto msg = "editlock: " + std::to_string(isEditLocked());
 const auto mv = std::getenv("LOK_VIEW_CALLBACK") ? "1" : "0";
 Log::debug("Forwarding [" + msg + "] to set editlock to " + 
std::to_string(value) + ". MultiView: " + mv);
-return forwardToPeer(_peer, msg.data(), msg.size());
+return forwardToPeer(_peer, msg.data(), msg.size(), false);
 }
 
 bool ClientSession::getCommandValues(const char *buffer, int length, 
StringTokenizer& tokens)
@@ -286,7 +286,7 @@ bool ClientSession::getCommandValues(const char *buffer, 
int length, StringToken
 return sendTextFrame(cmdValues);
 }
 
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 
 bool ClientSession::getPartPageRectangles(const char *buffer, int length)
@@ -297,7 +297,7 @@ bool ClientSession::getPartPageRectangles(const char 
*buffer, int length)
 return sendTextFrame(partPageRectangles);
 }
 
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 
 bool ClientSession::sendFontRendering(const char *buffer, int length, 
StringTokenizer& tokens)
@@ -329,7 +329,7 @@ bool ClientSession::sendFontRendering(const char *buffer, 
int length, StringToke
 return sendBinaryFrame(output.data(), output.size());
 }
 
-return forwardToPeer(_peer, buffer, length);
+return forwardToPeer(_peer, buffer, length, false);
 }
 
 bool ClientSession::sendTile(const char * /*buffer*/, int /*length*/, 
StringTokenizer& tokens)
diff --git a/loolwsd/LOOLSession.cpp b/loolwsd/LOOLSession.cpp
index 22b4df7..d9fcfc1 100644
--- a/loolwsd/LOOLSession.cpp
+++ b/loolwsd/LOOLSession.cpp
@@ -75,27 +75,26 @@ LOOLSession::~LOOLSession()
 {
 }
 
-bool LOOLSession::sendTextFrame(const std::string& text)
+bool LOOLSession::sendTextFrame(const char* buffer, const int length)
 {
 if (!_ws || _ws->poll(Poco::Timespan(0), Socket::SelectMode::SELECT_ERROR))
 {
-Log::error(getName() + ": Bad socket while sending [" + 
getAbbreviatedMessage(text.c_str(), text.size()) + "].");
+Log::error(getName() + ": Bad socket while sending [" + 
getAbbreviatedMessage(buffer, length) + "].");
 return false;
 }
 
-Log::trace(getName() + " Send: " + getAbbreviatedMessage(text.c_str(), 
text.size()));
+Log::trace(getName() + " Send: " + getAbbreviatedMessage(buffer, length));
 try
 {
 std::unique_lock lock(_mutex);
 
-const

[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp loolwsd/LOOLWSD.cpp

2016-07-27 Thread Ashod Nakashian
 loolwsd/LOOLKit.cpp |1 +
 loolwsd/LOOLWSD.cpp |4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 1300b412fbeb00e465b689ee57a5a321cc7c4740
Author: Ashod Nakashian 
Date:   Wed Jul 27 10:57:08 2016 -0400

loolwsd: comments

Change-Id: I57ba646df6ceb24d4f101a5539c979e77130cfc9
Reviewed-on: https://gerrit.libreoffice.org/27589
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index bde9f50..e3b5ec1 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -743,6 +743,7 @@ private:
 return;
 }
 
+// Broadcast to all clients.
 for (auto& it: self->_connections)
 {
 if (it.second->isRunning())
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index f7b7bce..daa8946 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -683,13 +683,13 @@ private:
 
 // Wait until the client has connected with a prison socket.
 waitBridgeCompleted(session);
-// Now the bridge beetween the client and kit process is connected
-// Let messages flow
 
+// Now the bridge beetween the client and kit process is connected
 status = "statusindicator: ready";
 Log::trace("Sending to Client [" + status + "].");
 ws->sendFrame(status.data(), (int) status.size());
 
+// Let messages flow
 QueueHandler handler(queue, session, "wsd_queue_" + 
session->getId());
 Thread queueHandlerThread;
 queueHandlerThread.start(handler);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/protocol.txt

2016-07-27 Thread Ashod Nakashian
 loolwsd/protocol.txt |   23 ++-
 1 file changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 93d38f6e78d8d136d400114077867591d9fc3aee
Author: Ashod Nakashian 
Date:   Wed Jul 27 11:58:48 2016 -0400

loolwsd: document new per-view notifications

Change-Id: Idfafb981e6face61c65809b24c646ceac9507992
Reviewed-on: https://gerrit.libreoffice.org/27591
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/protocol.txt b/loolwsd/protocol.txt
index fc566eb..8f2412a 100644
--- a/loolwsd/protocol.txt
+++ b/loolwsd/protocol.txt
@@ -315,10 +315,31 @@ unocommandresult: 
 Callback that an UNO command has finished.
 See LOK_CALLBACK_UNO_COMMAND_RESULT for details.
 
-pong
+pong:
 
 See above.
 
+invalidateviewcursor:
+
+Per-view cursor position invalidation. JSON payload.
+
+textviewselection:
+
+Per-view text selection bounds. JSON payload.
+
+cellviewcursor:
+
+Per-view cell cursor position. JSON payload.
+
+graphicviewselection:
+
+Per-view graphic selection. JSON payload.
+
+viewlock:
+
+Per-view lock rectangle. JSON payload.
+
+
 child -> parent
 ===
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/core/data/table6.cxx |   19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

New commits:
commit a02f7aa735c52f5d20df0e2a94cc06879cb3dfac
Author: Eike Rathke 
Date:   Wed Jul 27 18:18:43 2016 +0200

do not search in empty string if there is no note, tdf#65334 follow-up

Change-Id: I6c347b5bccd4ffd6a43a80e9d73a0b5fcf82926b

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index e5582b4..121d1d2 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -68,12 +68,22 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 if (!bDoSearch)
 return false;
 
-aCell = aCol[nCol].GetCellValue(nRow);
-if (aCell.isEmpty() && rSearchItem.GetCellType() != 
SvxSearchCellType::NOTE)
-return false;
+ScPostIt* pNote;
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+{
+pNote = aCol[nCol].GetCellNote(nRow);
+if (!pNote)
+return false;
+}
+else
+{
+aCell = aCol[nCol].GetCellValue(nRow);
+if (aCell.isEmpty())
+return false;
+pNote = nullptr;
+}
 
 bool bMultiLine = false;
-ScPostIt* pNote = nullptr;
 CellType eCellType = aCell.meType;
 switch (rSearchItem.GetCellType())
 {
@@ -105,7 +115,6 @@ bool ScTable::SearchCell(const SvxSearchItem& rSearchItem, 
SCCOL nCol, SCROW nRo
 break;
 case SvxSearchCellType::NOTE:
 {
-pNote = aCol[nCol].GetCellNote(nRow);
 if (pNote)
 {
 aString = pNote->GetText();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx sd/qa svx/source

2016-07-27 Thread Miklos Vajna
 include/svx/svdedxv.hxx|4 -
 sd/qa/unit/tiledrendering/data/title-shape.odp |binary
 sd/qa/unit/tiledrendering/tiledrendering.cxx   |   36 +--
 svx/source/svdraw/svdedxv.cxx  |   76 -
 4 files changed, 107 insertions(+), 9 deletions(-)

New commits:
commit 5f65ca15a2297f298536d07cfa8564a1f7c67abb
Author: Miklos Vajna 
Date:   Wed Jul 27 17:07:47 2016 +0200

svx lok: fix handling of text edit drawing when view/page changes

This is a follow-up to commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6
(svx lok: draw text edits in all views, 2016-07-26). Two corner-cases
are now handled:

1) When the SfxViewShell is created after begin text edit and
2) When the other draw view is already created, but at the time begin
text edit happens, the other draw view shows a different page.

And the opposite of these: switching away from a page were we observe a
text edit done in an other view or destroying a view that observes a
text edit.

When the complete view goes away, then SdrObjEditView::HideSdrPage() is
not called, so also try to destroy the outliner view of the text edit
from SdrObjEditView::DeleteWindowFromPaintView(). The GetSfxViewShell()
call in SdrObjEditView::ShowSdrPage() is important, because we let the
other draw view create the outliner view, but the outliner view should
invoke our view shell, not the view shell of the other draw view.

Also improve the SdTiledRenderingTest::testCursorViews() testcase, so
that it asserts it managed to begin text edit and use a test document
that still has a single slide and shape, but the shape is not
auto-sized; otherwise invalidations happen even if outliner views are
not created in all draw views, so the test would pass even without the
fixes.

Change-Id: I2c3bb27826c6887115366db818599fc8adabc5a5
Reviewed-on: https://gerrit.libreoffice.org/27583
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins 

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 70ffe3b..4527086 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -110,7 +110,7 @@ protected:
 
 // Create a new OutlinerView at the heap and initialize all required 
parameters.
 // pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized
-OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, 
OutlinerView* pGivenView) const;
+OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, 
OutlinerView* pGivenView, SfxViewShell* pViewShell = 0) const;
 void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, 
OutputDevice& rTargetDevice) const;
 void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
 
@@ -156,6 +156,8 @@ public:
 virtual void BckAction() override;
 virtual void TakeActionRect(Rectangle& rRect) const override;
 
+SdrPageView* ShowSdrPage(SdrPage* pPage) override;
+void HideSdrPage() override;
 /// Get access to the view shell owning this draw view, if any.
 virtual SfxViewShell* GetSfxViewShell() const;
 
diff --git a/sd/qa/unit/tiledrendering/data/title-shape.odp 
b/sd/qa/unit/tiledrendering/data/title-shape.odp
new file mode 100644
index 000..15d39d6
Binary files /dev/null and b/sd/qa/unit/tiledrendering/data/title-shape.odp 
differ
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx 
b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 3822664..603efff 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -828,13 +828,15 @@ public:
 int m_nPart;
 bool m_bCursorVisibleChanged;
 bool m_bViewLock;
+bool m_bTilesInvalidated;
 
 ViewCallback()
 : m_bGraphicSelectionInvalidated(false),
   m_bGraphicViewSelectionInvalidated(false),
   m_nPart(0),
   m_bCursorVisibleChanged(false),
-  m_bViewLock(false)
+  m_bViewLock(false),
+  m_bTilesInvalidated(false)
 {
 }
 
@@ -847,6 +849,11 @@ public:
 {
 switch (nType)
 {
+case LOK_CALLBACK_INVALIDATE_TILES:
+{
+m_bTilesInvalidated = true;
+}
+break;
 case LOK_CALLBACK_GRAPHIC_SELECTION:
 {
 m_bGraphicSelectionInvalidated = true;
@@ -955,17 +962,20 @@ void SdTiledRenderingTest::testCursorViews()
 comphelper::LibreOfficeKit::setActive();
 
 // Create the first view.
-SdXImpressDocument* pXImpressDocument = createDoc("shape.odp");
+SdXImpressDocument* pXImpressDocument = createDoc("title-shape.odp");
 ViewCallback aView1;
+int nView1 = SfxLokHelper::getView();
 
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback,
 &aView1);
 
 // Begin text edit on the only object on the slide.
 sd::ViewShell* pViewShell = 
pXImpressDocument->GetD

[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/core/data/table6.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 156590e7c0bf3c81f50b3d9862961e50010ea08a
Author: Eike Rathke 
Date:   Wed Jul 27 19:00:11 2016 +0200

use GetCellArea() also in SearchAll() and ReplaceAll(), tdf#65334 follow-up

Change-Id: I50bfeee96e57010455bbb9e8be4312a39d392411

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 121d1d2..15135f9 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -473,7 +473,10 @@ bool ScTable::SearchAll(const SvxSearchItem& rSearchItem, 
const ScMarkData& rMar
 
 SCCOL nLastCol;
 SCROW nLastRow;
-GetLastDataPos(nLastCol, nLastRow);
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+GetCellArea( nLastCol, nLastRow);
+else
+GetLastDataPos(nLastCol, nLastRow);
 
 do
 {
@@ -532,7 +535,10 @@ bool ScTable::ReplaceAll(
 
 SCCOL nLastCol;
 SCROW nLastRow;
-GetLastDataPos(nLastCol, nLastRow);
+if (rSearchItem.GetCellType() == SvxSearchCellType::NOTE)
+GetCellArea( nLastCol, nLastRow);
+else
+GetLastDataPos(nLastCol, nLastRow);
 
 bool bEverFound = false;
 while (true)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2016-07-27 Thread Zdeněk Crhonek
 sc/qa/unit/data/functions/fods/workday.intl.fods | 2341 +++
 1 file changed, 2341 insertions(+)

New commits:
commit e8e5853b88d7873a23050f44c74a7e86b1bca3d0
Author: Zdeněk Crhonek 
Date:   Sun Jul 24 17:54:15 2016 +0200

add WORKDAY.INTL test case

Change-Id: Id7060c93a1aca8a986bdf75b4883b697147c0e81
Reviewed-on: https://gerrit.libreoffice.org/27485
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/sc/qa/unit/data/functions/fods/workday.intl.fods 
b/sc/qa/unit/data/functions/fods/workday.intl.fods
new file mode 100644
index 000..43059d7
--- /dev/null
+++ b/sc/qa/unit/data/functions/fods/workday.intl.fods
@@ -0,0 +1,2341 @@
+
+
+http://www.w3.org/1999/xlink"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:scr
 ipt="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:form
 x="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.spreadsheet">
+ 
2016-06-16T17:41:16.39900P0D1LibreOfficeDev/5.3.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/f9f090d0d0f2b454d6c1dd14fe735e7e83fda9da
+ 
+  
+   0
+   0
+   22009
+   4261
+   
+
+ view1
+ 
+  
+   1
+   8
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+  
+   12
+   26
+   0
+   0
+   0
+   0
+   2
+   0
+   0
+   0
+   0
+   0
+   100
+   60
+   true
+   false
+  
+ 
+ Sheet2
+ 1241
+ 0
+ 100
+ 60
+ false
+ true
+ true
+ true
+ 12632256
+ true
+ true
+ true
+ true
+ false
+ false
+ false
+ 1270
+ 1270
+ 1
+ 1
+ true
+ false
+
+   
+  
+  
+   7
+   false
+   false
+   true
+   true
+   false
+   false
+   false
+   1270
+   1270
+   true
+   true
+   true
+   true
+   true
+   false
+   12632256
+   false
+   Lexmark-E352dn
+   
+
+ cs
+ CZ
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+
+ nl
+ NL
+ 
+ 
+ 
+
+   
+   true
+   true
+   3
+   1
+   true
+   1
+   true
+   qQH+/0xleG1hcmstRTM1MmRuQ1VQUzpMZXhtYXJrLUUzNTJkbgAWAAMAzwAEAAhSAAAEdAAASm9iRGF0YSAxCnByaW50ZXI9TGV4bWFyay1FMzUyZG4Kb3JpZW50YXRpb249UG9ydHJhaXQKY29waWVzPTEKY29sbGF0ZT1mYWxzZQptYXJnaW5kYWp1c3RtZW50PTAsMCwwLDAKY29sb3JkZXB0aD0yNApwc2xldmVsPTAKcGRmZGV2aWNlPTEKY29sb3JkZXZpY2U9MApQUERDb250ZXhEYXRhCkR1cGxleDpOb25lAElucHV0U2xvdDpUcmF5MQBQYWdlU2l6ZTpBNAAAEgBDT01QQVRfRFVQTEVYX01PREUKAERVUExFWF9PRkY=
+   false
+   0
+  
+ 
+ 
+  
+   http://openoffice.org/2004/office"; 
xmlns:xlink="http://www.w3.org/1999/xlink";>
+
+   
+  
+ 
+ 
+  
+  
+  
+  
+  
+  
+  
+  
+ 
+ 
+  
+   
+   
+  
+  
+   
+  
+  
+   
+
+   Kč
+  
+  
+   
+   -
+   
+
+   Kč
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   £
+   
+  
+  
+   
+   -
+   £
+   
+   
+  
+  
+   
+
+  
+  
+   (
+   
+   )
+   
+  
+  
+   
+
+  
+  
+  

[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/core/data/table6.cxx |   47 ++---
 1 file changed, 39 insertions(+), 8 deletions(-)

New commits:
commit d93284f65cf14fdf5e2520b474eb7383ca1d99e4
Author: Eike Rathke 
Date:   Wed Jul 27 19:04:07 2016 +0200

use HasCellNotes() when looping and searching for notes, tdf#65334 follow-up

... so we actually find all if on empty cells.

Change-Id: Ie504ce7df2a17877eddf21cf309990a2a8b692ba

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index 15135f9..e7e7caf 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -327,6 +327,7 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 SCROW nRow = rRow;
 
 bool bSkipFiltered = !rSearchItem.IsSearchFiltered();
+bool bSearchNotes = (rSearchItem.GetCellType() == SvxSearchCellType::NOTE);
 if (!bAll && rSearchItem.GetBackward())
 {
 SCROW nLastNonFilteredRow = MAXROW + 1;
@@ -350,7 +351,12 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 {
 nCol--;
 if ((SCsCOL)nCol >= 0)
-bIsEmpty = aCol[nCol].IsEmptyData();
+{
+if (bSearchNotes)
+bIsEmpty = !aCol[nCol].HasCellNotes();
+else
+bIsEmpty = aCol[nCol].IsEmptyData();
+}
 else
 bIsEmpty = true;
 }
@@ -377,8 +383,16 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 bFound = SearchCell(rSearchItem, nCol, nRow, rMark, 
rUndoStr, pUndoDoc);
 if (!bFound)
 {
- if (!aCol[nCol].GetPrevDataPos(nRow))
-nRow = -1;
+if (bSearchNotes)
+{
+/* TODO: can we look for the previous cell note 
instead? */
+--nRow;
+}
+else
+{
+if (!aCol[nCol].GetPrevDataPos(nRow))
+nRow = -1;
+}
 }
 }
 if (!bFound)
@@ -391,7 +405,12 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 {
 nCol--;
 if ((SCsCOL)nCol >= 0)
-bIsEmpty = aCol[nCol].IsEmptyData();
+{
+if (bSearchNotes)
+bIsEmpty = !aCol[nCol].HasCellNotes();
+else
+bIsEmpty = aCol[nCol].IsEmptyData();
+}
 else
 bIsEmpty = true;
 }
@@ -417,7 +436,9 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 if (!bFound)
 {
 nCol++;
-while ((nCol <= nLastCol) && aCol[nCol].IsEmptyData()) 
nCol++;
+while ((nCol <= nLastCol) &&
+(bSearchNotes ? !aCol[nCol].HasCellNotes() : 
aCol[nCol].IsEmptyData()))
+nCol++;
 }
 }
 if (!bFound)
@@ -440,8 +461,16 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 bFound = SearchCell(rSearchItem, nCol, nRow, rMark, 
rUndoStr, pUndoDoc);
 if (!bFound)
 {
- if (!aCol[nCol].GetNextDataPos(nRow))
-nRow = MAXROW + 1;
+if (bSearchNotes)
+{
+/* TODO: can we look for the next cell note 
instead? */
+++nRow;
+}
+else
+{
+if (!aCol[nCol].GetNextDataPos(nRow))
+nRow = MAXROW + 1;
+}
 }
 }
 if (!bFound)
@@ -450,7 +479,9 @@ bool ScTable::Search(const SvxSearchItem& rSearchItem, 
SCCOL& rCol, SCROW& rRow,
 nRow = 0;
 nLastNonFilteredRow = -1;
 nCol++;
-while ((nCol <= nLastCol) && aCol[nCol].IsEmptyData()) 
nCol++;
+while ((nCol <= nLastCol) &&
+(bSearchNo

[Libreoffice-commits] online.git: loolwsd/IoUtil.cpp loolwsd/IoUtil.hpp loolwsd/protocol.txt

2016-07-27 Thread Artyom Sovetnikov
 loolwsd/IoUtil.cpp   |   10 +-
 loolwsd/IoUtil.hpp   |3 +--
 loolwsd/protocol.txt |   11 ---
 3 files changed, 2 insertions(+), 22 deletions(-)

New commits:
commit 85d275ab1afb05ed937c55cb9ed9c2462a4a7f89
Author: Artyom Sovetnikov 
Date:   Mon Jul 25 23:55:55 2016 +0530

loolwsd: Remove pong frame hack

https://github.com/LibreOffice/online/pull/1

diff --git a/loolwsd/IoUtil.cpp b/loolwsd/IoUtil.cpp
index 350f3d1..7b8adfc 100644
--- a/loolwsd/IoUtil.cpp
+++ b/loolwsd/IoUtil.cpp
@@ -45,20 +45,12 @@ int receiveFrame(WebSocket& socket, void* buffer, int 
length, int& flags)
 int n = socket.receiveFrame(buffer, length, flags);
 if ((flags & WebSocket::FRAME_OP_BITMASK) == WebSocket::FRAME_OP_PING)
 {
-// Technically, we should send back a PONG control frame. However 
Firefox (probably) or
-// Node.js (possibly) doesn't like that and closes the socket when 
we do.
-socket.sendFrame("pong", strlen("pong"));
+socket.sendFrame(buffer, n, WebSocket::FRAME_FLAG_FIN | 
WebSocket::FRAME_OP_PONG);
 }
 else if ((flags & WebSocket::FRAME_OP_BITMASK) == 
WebSocket::FRAME_OP_PONG)
 {
 // In case we do send pongs in the future.
 }
-else if (((flags & WebSocket::FRAME_OP_BITMASK) == 
WebSocket::FRAME_OP_TEXT ||
-  (flags & WebSocket::FRAME_OP_BITMASK) == 
WebSocket::FRAME_OP_BINARY) &&
- n == 4 && memcmp((char*)buffer, "pong", 4) == 0)
-{
-// Ignore what we send above. Be lenient, also ignore binary 
"pong" frames.
-}
 else
 {
 return n;
diff --git a/loolwsd/IoUtil.hpp b/loolwsd/IoUtil.hpp
index 2584374..3c6eeb9 100644
--- a/loolwsd/IoUtil.hpp
+++ b/loolwsd/IoUtil.hpp
@@ -22,8 +22,7 @@
 namespace IoUtil
 {
 // Wrapper for WebSocket::receiveFrame() that handles PING frames (by 
replying with a
-// "pseudo-PONG" frame, see protocol.txt) and PONG frames. Also our 
"pseudo-PONG" frames are
-// ignored.
+// PONG frame) and PONG frames. PONG frames are ignored.
 // Should we also factor out the handling of non-final and continuation 
frames into this?
 int receiveFrame(Poco::Net::WebSocket& socket, void* buffer, int length, 
int& flags);
 
diff --git a/loolwsd/protocol.txt b/loolwsd/protocol.txt
index 8f2412a..2db04d4 100644
--- a/loolwsd/protocol.txt
+++ b/loolwsd/protocol.txt
@@ -165,13 +165,6 @@ userinactive
 
 See 'useractive'.
 
-pong
-
-Sent instead of a PONG frame as reply to a PING frame. A comment
-in our code says "Technically, we should send back a PONG control
-frame. However Firefox (probably) or Node.js (possibly) doesn't
-like that and closes the socket when we do."
-
 server -> client
 
 
@@ -315,10 +308,6 @@ unocommandresult: 
 Callback that an UNO command has finished.
 See LOK_CALLBACK_UNO_COMMAND_RESULT for details.
 
-pong:
-
-See above.
-
 invalidateviewcursor:
 
 Per-view cursor position invalidation. JSON payload.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - bootstrap.1 solenv/bin

2016-07-27 Thread Damjan Jovanovic
 bootstrap.1  |   16 
 solenv/bin/download_external_dependencies.pl |6 +-
 2 files changed, 13 insertions(+), 9 deletions(-)

New commits:
commit 9650c1489ac9e210b04b728f98ac72b7a7155a89
Author: Damjan Jovanovic 
Date:   Wed Jul 27 17:22:09 2016 +

The AOOJavaDownloader may be necessary for downloading extensions

even if DO_FETCH_TARBALLS is disabled.

Patch by: me

diff --git a/bootstrap.1 b/bootstrap.1
index 045b547..faeb891 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -37,18 +37,18 @@ chmod +x "$SRC_ROOT/solenv/bin/build_client.pl"
 chmod +x "$SRC_ROOT/solenv/bin/zipdep.pl"
 chmod +x "$SRC_ROOT/solenv/bin/gccinstlib.pl"
 
+# build the AOOJavaDownloader
+mkdir -p "$SOLARENV/$INPATH/class"
+"$JAVACOMPILER" "$SOLARENV/javadownloader/AOOJavaDownloader.java" -d 
"$SOLARENV/$INPATH/class"
+if [ "$?" != "0" ]; then
+echo "*** Failed to build AOOJavaDownloader, aborting! ***"
+exit 1
+fi
+
 # fetch or update external tarballs
 if [ "$DO_FETCH_TARBALLS" = "yes" ]; then
 # check perl include locations
 "$PERL" -e 'print "\nInclude locations: @INC\n\n"';
-
-mkdir -p "$SOLARENV/$INPATH/class"
-"$JAVACOMPILER" "$SOLARENV/javadownloader/AOOJavaDownloader.java" -d 
"$SOLARENV/$INPATH/class"
-if [ "$?" != "0" ]; then
-echo "*** Failed to build AOOJavaDownloader, aborting! ***"
-exit 1
-fi
-
 "$PERL" "$SOLARENV/bin/download_external_dependencies.pl" 
$SRC_ROOT/external_deps.lst
 if [ "$?" != "0" ]; then
 echo "*** Error downloading external dependencies, please fix the 
previous problems and try again ***"
commit b50546145d4d5bc6ed44d0539a6a3e62e03e783f
Author: Damjan Jovanovic 
Date:   Wed Jul 27 17:15:45 2016 +

Allow Ctrl+C to interrupt ./bootstrap.

Patch by: me

diff --git a/solenv/bin/download_external_dependencies.pl 
b/solenv/bin/download_external_dependencies.pl
index ec68036..3990e34 100755
--- a/solenv/bin/download_external_dependencies.pl
+++ b/solenv/bin/download_external_dependencies.pl
@@ -538,10 +538,14 @@ sub DownloadFile ($$$)
 {
 return 1;
 }
-else
+elsif ($? == 1)
 {
 return 0;
 }
+else
+{
+exit $?;
+}
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/uiconfig

2016-07-27 Thread Akshay Deep
 sfx2/uiconfig/ui/templatedlg.ui |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 982d96408ea3c1e30caa3432c5962a0dd13a
Author: Akshay Deep 
Date:   Wed Jul 27 15:34:44 2016 +0530

tdf#101116 Template manager not correctly exposed to assistive technolgies

Tooltips to work as labels

Change-Id: Ie4637028b018a962ce8c59667c43ae4eee0fea74
Reviewed-on: https://gerrit.libreoffice.org/27575
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 

diff --git a/sfx2/uiconfig/ui/templatedlg.ui b/sfx2/uiconfig/ui/templatedlg.ui
index c4624f0..1602113 100644
--- a/sfx2/uiconfig/ui/templatedlg.ui
+++ b/sfx2/uiconfig/ui/templatedlg.ui
@@ -143,6 +143,7 @@
   
 True
 True
+Search...
 Search...
   
   
@@ -290,6 +291,7 @@
   
 True
 False
+Settings
 action_menu
 sfx2/imglst/actionaction013.png
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sax/source

2016-07-27 Thread Mohammed Abdul Azeem
 sax/source/fastparser/fastparser.cxx   |  109 +
 sax/source/fastparser/legacyfastparser.cxx |   16 
 2 files changed, 67 insertions(+), 58 deletions(-)

New commits:
commit 84db6c1d9c57c3dc115dc22413442cf1aa5e69df
Author: Mohammed Abdul Azeem 
Date:   Wed Jul 27 22:28:39 2016 +0530

GSOC - Avoid tokenizing strings for Unknown elements:

Added a special case when token handler is not set, which
avoids tokenizing strings.

Change-Id: I749a7af22e45180cc8bfc55843832b7ccb529ac6
Reviewed-on: https://gerrit.libreoffice.org/27593
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index 49038b8..ab324a1 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -738,9 +738,6 @@ void FastSaxParserImpl::parseStream(const InputSource& 
maStructSource)
 Entity entity( maData );
 entity.maStructSource = maStructSource;
 
-if( !entity.mxTokenHandler.is() )
-throw SAXException("No token handler, use setTokenHandler()", 
Reference< XInterface >(), Any() );
-
 if( !entity.maStructSource.aInputStream.is() )
 throw SAXException("No input source", Reference< XInterface >(), Any() 
);
 
@@ -1072,60 +1069,88 @@ void FastSaxParserImpl::callbackStartElement(const 
xmlChar *localName , const xm
 
 try
 {
-/*  #158414# Each element may define new namespaces, also for 
attribues.
-First, process all namespaces, second, process the attributes 
after namespaces
-have been initialized. */
-
-// #158414# first: get namespaces
-for (int i = 0; i < numNamespaces * 2; i += 2)
+if ( rEntity.mxTokenHandler.is() )
 {
-// namespaces[] is (prefix/URI)
-if( namespaces[ i ] != nullptr )
+/*  #158414# Each element may define new namespaces, also for 
attribues.
+First, process all namespaces, second, process the attributes 
after namespaces
+have been initialized. */
+
+// #158414# first: get namespaces
+for (int i = 0; i < numNamespaces * 2; i += 2)
 {
-DefineNamespace( OString( XML_CAST( namespaces[ i ] )),
-OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( 
XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ));
-if( rEntity.mxNamespaceHandler.is() )
-rEvent.mxDeclAttributes->addUnknown( OString( 
XML_CAST( namespaces[ i ] ) ), OString( XML_CAST( namespaces[ i + 1 ] ) ) );
+// namespaces[] is (prefix/URI)
+if( namespaces[ i ] != nullptr )
+{
+DefineNamespace( OString( XML_CAST( namespaces[ i ] )),
+OUString( XML_CAST( namespaces[ i + 1 ] ), strlen( 
XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 ));
+}
+else
+{
+// default namespace
+sNamespace = OUString( XML_CAST( namespaces[ i + 1 ] ), 
strlen( XML_CAST( namespaces[ i + 1 ] )), RTL_TEXTENCODING_UTF8 );
+nNamespaceToken = GetNamespaceToken( sNamespace );
+}
 }
+
+// #158414# second: fill attribute list with other attributes
+for (int i = 0; i < numAttributes * 5; i += 5)
+{
+// attributes[] is ( localname / prefix / nsURI / valueBegin / 
valueEnd )
+if( attributes[ i + 1 ] != nullptr )
+{
+sal_Int32 nAttributeToken = GetTokenWithPrefix( 
attributes[ i + 1 ], strlen( XML_CAST( attributes[ i + 1 ] )), attributes[ i ], 
strlen( XML_CAST( attributes[ i ] )));
+if( nAttributeToken != FastToken::DONTKNOW )
+rEvent.mxAttributes->add( nAttributeToken, XML_CAST( 
attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] );
+else
+rEvent.mxAttributes->addUnknown( OUString( XML_CAST( 
attributes[ i + 1 ] ), strlen( XML_CAST( attributes[ i + 1 ] )), 
RTL_TEXTENCODING_UTF8 ),
+OString( XML_CAST( attributes[ i ] )), 
OString( XML_CAST( attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 
3 ] ));
+}
+else
+{
+sal_Int32 nAttributeToken = GetToken( attributes[ i ], 
strlen( XML_CAST( attributes[ i ] )));
+if( nAttributeToken != FastToken::DONTKNOW )
+rEvent.mxAttributes->add( nAttributeToken, XML_CAST( 
attributes[ i + 3 ] ), attributes[ i + 4 ] - attributes[ i + 3 ] );
+else
+rEvent.mxAttributes->addUnknown( XML_CAST( attributes[ 
i ] ),
+   

Re: GSoC Progress

2016-07-27 Thread Mohammed Abdul Azeem
Hi,

*Progress for week8 and 9:*
We managed to fix those issues which occured while trying to use
LegacyFastParser in place of XParser (
https://gerrit.libreoffice.org/#/c/27222/ and
https://gerrit.libreoffice.org/#/c/27278/ ).

Since then I've been trying to see if there is a performance gain in using
LegacyFastParser over XParser. But XParser still has better wall-clock time
for importing documents than our new parser. We are looking at couple of
places where our threaded approach is taking more time and trying to remove
all unnecessary overheads and optimize this path of unknown elements and
attributes.

Regards,
Azeem
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sfx2/source

2016-07-27 Thread Giuseppe Castagno
 sfx2/source/doc/docfile.cxx |   12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 3b26a2a403ca5e99b0dd07d042d47501c091af16
Author: Giuseppe Castagno 
Date:   Wed Jul 27 21:50:39 2016 +0200

tdf#95144: Add a default css::ucb::XCommandEnvironment

Makes use of a dedicated interaction wrapper to server
ssl certificates correctly.
See comphelper::SimpleFileAccessInteraction for details.

Change-Id: I5728225065ec03f9b793940de316ccd97ee7114d
Reviewed-on: https://gerrit.libreoffice.org/27596
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 7e8283b..7af4a77 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -72,6 +72,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -415,7 +416,16 @@ Reference < XContent > SfxMedium::GetContent() const
 if ( !pImpl->aContent.get().is() )
 {
 Reference < css::ucb::XContent > xContent;
-Reference < css::ucb::XCommandEnvironment > xEnv;
+
+// tdf#95144 add a default css::ucb::XCommandEnvironment
+// in order to have http and https protocol manage certificates 
correctly
+css:: uno::Reference< task::XInteractionHandler > xIH(
+css::task::InteractionHandler::createWithParent( 
comphelper::getProcessComponentContext(), nullptr ) );
+
+css::uno::Reference< css::ucb::XProgressHandler > xProgress;
+::ucbhelper::CommandEnvironment* pCommandEnv = new 
::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( 
xIH ), xProgress);
+
+Reference < css::ucb::XCommandEnvironment > xEnv(static_cast< 
css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY);
 
 const SfxUnoAnyItem* pItem = 
SfxItemSet::GetItem(pImpl->m_pSet, SID_CONTENT, false);
 if ( pItem )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: starmath/CppunitTest_starmath_import.mk

2016-07-27 Thread Caolán McNamara
 starmath/CppunitTest_starmath_import.mk |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 748525431147ff17248cb33fbfefd1b540717889
Author: Caolán McNamara 
Date:   Wed Jul 27 21:26:22 2016 +0100

add uui to starmath import filters test

Change-Id: I0482891fa628f810c42e6a780abdec35bc62ea7e

diff --git a/starmath/CppunitTest_starmath_import.mk 
b/starmath/CppunitTest_starmath_import.mk
index b981be0..9397aab 100644
--- a/starmath/CppunitTest_starmath_import.mk
+++ b/starmath/CppunitTest_starmath_import.mk
@@ -77,6 +77,7 @@ $(eval $(call gb_CppunitTest_use_components,starmath_import,\
 svl/util/svl \
 svx/util/svx \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 ))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - chart2/CppunitTest_chart2_export.mk dbaccess/CppunitTest_dbaccess_dialog_save.mk dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk sc/CppunitTest_sc_bugfix

2016-07-27 Thread Caolán McNamara
 chart2/CppunitTest_chart2_export.mk|1 +
 dbaccess/CppunitTest_dbaccess_dialog_save.mk   |1 +
 dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk |1 +
 sc/CppunitTest_sc_bugfix_test.mk   |1 +
 sc/source/core/tool/interpr1.cxx   |4 ++--
 5 files changed, 6 insertions(+), 2 deletions(-)

New commits:
commit b32d3f24bb1e1b6e2f24dd4ad60273aadc607cfc
Author: Caolán McNamara 
Date:   Wed Jul 27 21:33:20 2016 +0100

add uui component to some other places

Change-Id: Ia1e449f8f52e7d353944b8e80f9fc586f1eab2f7

diff --git a/chart2/CppunitTest_chart2_export.mk 
b/chart2/CppunitTest_chart2_export.mk
index 50780b1..931edeb 100644
--- a/chart2/CppunitTest_chart2_export.mk
+++ b/chart2/CppunitTest_chart2_export.mk
@@ -122,6 +122,7 @@ $(eval $(call gb_CppunitTest_use_components,chart2_export,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 writerfilter/util/writerfilter \
 xmloff/util/xo \
 xmlscript/util/xmlscript \
diff --git a/dbaccess/CppunitTest_dbaccess_dialog_save.mk 
b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
index 1b4cf73..19d7767 100644
--- a/dbaccess/CppunitTest_dbaccess_dialog_save.mk
+++ b/dbaccess/CppunitTest_dbaccess_dialog_save.mk
@@ -98,6 +98,7 @@ $(eval $(call 
gb_CppunitTest_use_components,dbaccess_dialog_save,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 ))
 
diff --git a/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk 
b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
index 470726f..ffb2937 100644
--- a/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
+++ b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk
@@ -98,6 +98,7 @@ $(eval $(call 
gb_CppunitTest_use_components,dbaccess_empty_stdlib_save,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 ))
 
diff --git a/sc/CppunitTest_sc_bugfix_test.mk b/sc/CppunitTest_sc_bugfix_test.mk
index 5cab2c0..8d07cf1 100644
--- a/sc/CppunitTest_sc_bugfix_test.mk
+++ b/sc/CppunitTest_sc_bugfix_test.mk
@@ -101,6 +101,7 @@ $(eval $(call gb_CppunitTest_use_components,sc_bugfix_test,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 xmlsecurity/util/xmlsecurity \
 xmlsecurity/util/xsec_fw \
commit ebe04c075649c677b55941e3b4e57fbca150b5db
Author: Caolán McNamara 
Date:   Wed Jul 27 21:28:59 2016 +0100

use div() instead of /0 to content ubsan

for the same reason as...

commit fb2c146752074b132d665e40343a08dcb2e6672e
Author: Eike Rathke 
Date:   Mon Jul 25 13:32:17 2016 +0200

use div() instead of /0 to content ubsan

While we do handle double floating point division by 0 at least on
IEEE754 systems, ubsan builds mock about.

Change-Id: Id2e34686b053707c83ca535689b693d80b606533

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index dbbc55e..37afb35 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1695,7 +1695,7 @@ void ScInterpreter::ScTan()
 
 void ScInterpreter::ScCot()
 {
-PushDouble( div( 1.0, ::rtl::math::tan(GetDouble(;
+PushDouble(div(1.0, ::rtl::math::tan(GetDouble(;
 }
 
 void ScInterpreter::ScArcSin()
@@ -1735,7 +1735,7 @@ void ScInterpreter::ScTanHyp()
 
 void ScInterpreter::ScCotHyp()
 {
-PushDouble(1.0 / tanh(GetDouble()));
+PushDouble(div(1.0, tanh(GetDouble(;
 }
 
 void ScInterpreter::ScArcSinHyp()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: desktop/CppunitTest_desktop_lib.mk sw/CppunitTest_sw_rtfimport.mk

2016-07-27 Thread Caolán McNamara
 desktop/CppunitTest_desktop_lib.mk |1 +
 sw/CppunitTest_sw_rtfimport.mk |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit b014a121ac40fae6da41ecdcd69a79ce9ffbe74d
Author: Caolán McNamara 
Date:   Wed Jul 27 21:35:53 2016 +0100

add uui component to some other places

Change-Id: If07caacf7bc18b39820db73fe64201f9cb97bc6c

diff --git a/desktop/CppunitTest_desktop_lib.mk 
b/desktop/CppunitTest_desktop_lib.mk
index aed16db..93b75f0 100644
--- a/desktop/CppunitTest_desktop_lib.mk
+++ b/desktop/CppunitTest_desktop_lib.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_CppunitTest_use_components,desktop_lib,\
 ucb/source/core/ucb1 \
 ucb/source/ucp/file/ucpfile1 \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 i18npool/source/search/i18nsearch \
 filter/source/graphic/graphicfilter \
diff --git a/sw/CppunitTest_sw_rtfimport.mk b/sw/CppunitTest_sw_rtfimport.mk
index 537a211..3be64d0 100644
--- a/sw/CppunitTest_sw_rtfimport.mk
+++ b/sw/CppunitTest_sw_rtfimport.mk
@@ -72,7 +72,8 @@ $(eval $(call gb_CppunitTest_use_components,sw_rtfimport,\
 ucb/source/ucp/file/ucpfile1 \
 unotools/util/utl \
 unoxml/source/service/unoxml \
-   writerfilter/util/writerfilter \
+uui/util/uui \
+writerfilter/util/writerfilter \
 xmloff/util/xo \
 ))
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/CppunitTest_dbaccess_firebird_test.mk dbaccess/CppunitTest_dbaccess_macros_test.mk sd/CppunitTest_sd_import_tests.mk sfx2/source sw/CppunitTest_sw_

2016-07-27 Thread Caolán McNamara
 dbaccess/CppunitTest_dbaccess_firebird_test.mk |1 +
 dbaccess/CppunitTest_dbaccess_macros_test.mk   |1 +
 sd/CppunitTest_sd_import_tests.mk  |1 +
 sfx2/source/doc/docfile.cxx|   22 +++---
 sw/CppunitTest_sw_ww8export.mk |1 +
 5 files changed, 19 insertions(+), 7 deletions(-)

New commits:
commit d4cb9c3a8851cb874fd8b6c77d4d7521da7579b7
Author: Caolán McNamara 
Date:   Wed Jul 27 21:43:22 2016 +0100

temp tinderbox fix

Change-Id: Id233762e6b8547078544c55b2932462a10749882

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 7af4a77..a77589b 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -416,16 +416,24 @@ Reference < XContent > SfxMedium::GetContent() const
 if ( !pImpl->aContent.get().is() )
 {
 Reference < css::ucb::XContent > xContent;
+Reference < css::ucb::XCommandEnvironment > xEnv;
 
-// tdf#95144 add a default css::ucb::XCommandEnvironment
-// in order to have http and https protocol manage certificates 
correctly
-css:: uno::Reference< task::XInteractionHandler > xIH(
-css::task::InteractionHandler::createWithParent( 
comphelper::getProcessComponentContext(), nullptr ) );
+try
+{
+// tdf#95144 add a default css::ucb::XCommandEnvironment
+// in order to have http and https protocol manage certificates 
correctly
+css:: uno::Reference< task::XInteractionHandler > xIH(
+css::task::InteractionHandler::createWithParent( 
comphelper::getProcessComponentContext(), nullptr ) );
 
-css::uno::Reference< css::ucb::XProgressHandler > xProgress;
-::ucbhelper::CommandEnvironment* pCommandEnv = new 
::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( 
xIH ), xProgress);
+css::uno::Reference< css::ucb::XProgressHandler > xProgress;
+::ucbhelper::CommandEnvironment* pCommandEnv = new 
::ucbhelper::CommandEnvironment(new comphelper::SimpleFileAccessInteraction( 
xIH ), xProgress);
 
-Reference < css::ucb::XCommandEnvironment > xEnv(static_cast< 
css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY);
+xEnv = Reference < css::ucb::XCommandEnvironment >(static_cast< 
css::ucb::XCommandEnvironment* >(pCommandEnv), css::uno::UNO_QUERY);
+}
+catch(...)
+{
+//temp tinderbox fix
+}
 
 const SfxUnoAnyItem* pItem = 
SfxItemSet::GetItem(pImpl->m_pSet, SID_CONTENT, false);
 if ( pItem )
commit 01c12dd928f6d0e65d458295c3863314e8483269
Author: Caolán McNamara 
Date:   Wed Jul 27 21:43:07 2016 +0100

add uui component to some other places

Change-Id: Ic703b509bac0a57e0780bbb83537e7e4323a79d0

diff --git a/dbaccess/CppunitTest_dbaccess_firebird_test.mk 
b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
index f438dfd..491f853 100644
--- a/dbaccess/CppunitTest_dbaccess_firebird_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_firebird_test.mk
@@ -61,6 +61,7 @@ $(eval $(call 
gb_CppunitTest_use_components,dbaccess_firebird_test,\
 ucb/source/core/ucb1 \
 ucb/source/ucp/file/ucpfile1 \
 unotools/util/utl \
+uui/util/uui \
 xmloff/util/xo \
 ))
 
diff --git a/dbaccess/CppunitTest_dbaccess_macros_test.mk 
b/dbaccess/CppunitTest_dbaccess_macros_test.mk
index 1afdac5..6a2bbc1 100644
--- a/dbaccess/CppunitTest_dbaccess_macros_test.mk
+++ b/dbaccess/CppunitTest_dbaccess_macros_test.mk
@@ -97,6 +97,7 @@ $(eval $(call 
gb_CppunitTest_use_components,dbaccess_macros_test,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 ))
 
diff --git a/sd/CppunitTest_sd_import_tests.mk 
b/sd/CppunitTest_sd_import_tests.mk
index 0440e3d..adebcf0 100644
--- a/sd/CppunitTest_sd_import_tests.mk
+++ b/sd/CppunitTest_sd_import_tests.mk
@@ -106,6 +106,7 @@ $(eval $(call 
gb_CppunitTest_use_components,sd_import_tests,\
 unotools/util/utl \
 unoxml/source/rdf/unordf \
 unoxml/source/service/unoxml \
+uui/util/uui \
 xmloff/util/xo \
 xmlsecurity/util/xsec_fw \
 xmlsecurity/util/xmlsecurity \
diff --git a/sw/CppunitTest_sw_ww8export.mk b/sw/CppunitTest_sw_ww8export.mk
index fa0f33e..a92d22b 100644
--- a/sw/CppunitTest_sw_ww8export.mk
+++ b/sw/CppunitTest_sw_ww8export.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ww8export,\
 unotools/util/utl \
 unoxml/source/service/unoxml \
 unoxml/source/rdf/unordf \
+uui/util/uui \
 $(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
 xmloff/util/xo \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2016-07-27 Thread Eike Rathke
 sc/source/ui/dialogs/searchresults.cxx |   55 ++---
 sc/source/ui/inc/searchresults.hxx |2 -
 sc/source/ui/view/viewfun2.cxx |3 +
 3 files changed, 47 insertions(+), 13 deletions(-)

New commits:
commit 4f719263ae8dc44eabfba4654f9dbed92a9c5360
Author: Eike Rathke 
Date:   Thu Jul 28 00:43:03 2016 +0200

display the SearchAll() and ReplaceAll() results for notes, tdf#65334 
related

Change-Id: Ib9ff40b26526efdf242db2ef1804e54611f16b0e

diff --git a/sc/source/ui/dialogs/searchresults.cxx 
b/sc/source/ui/dialogs/searchresults.cxx
index 225fb2f..c6e7470 100644
--- a/sc/source/ui/dialogs/searchresults.cxx
+++ b/sc/source/ui/dialogs/searchresults.cxx
@@ -50,24 +50,57 @@ void SearchResultsDlg::dispose()
 ModelessDialog::dispose();
 }
 
-void SearchResultsDlg::FillResults( ScDocument* pDoc, const ScRangeList 
&rMatchedRanges )
+void SearchResultsDlg::FillResults( ScDocument* pDoc, const ScRangeList 
&rMatchedRanges, bool bCellNotes )
 {
 mpList->Clear();
 mpList->SetUpdateMode(false);
 std::vector aTabNames = pDoc->GetAllTableNames();
 SCTAB nTabCount = aTabNames.size();
-for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i)
+if (bCellNotes)
 {
-ScCellIterator aIter(pDoc, *rMatchedRanges[i]);
-for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
+for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i)
 {
-ScAddress aPos = aIter.GetPos();
-if (aPos.Tab() >= nTabCount)
-// Out-of-bound sheet index.
-continue;
-
-OUString aPosStr = aPos.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention());
-mpList->InsertEntry(aTabNames[aPos.Tab()] + "\t" + aPosStr + "\t" 
+ pDoc->GetString(aPos));
+/* TODO: a CellNotes iterator would come handy and migt speed
+ * things up a little, though we only loop through the
+ * search/replace result positions here. */
+ScRange aRange( *rMatchedRanges[i] );
+// Bear in mind that mostly the range is one address position
+// or a column or a row joined.
+ScAddress aPos( aRange.aStart );
+for ( ; aPos.Tab() <= aRange.aEnd.Tab(); aPos.IncTab())
+{
+if (aPos.Tab() >= nTabCount)
+break;  // can this even happen? we just searched on 
existing sheets ...
+for (aPos.SetCol( aRange.aStart.Col()); aPos.Col() <= 
aRange.aEnd.Col(); aPos.IncCol())
+{
+for (aPos.SetRow( aRange.aStart.Row()); aPos.Row() <= 
aRange.aEnd.Row(); aPos.IncRow())
+{
+const ScPostIt* pNote = pDoc->GetNote( aPos);
+if (pNote)
+{
+OUString aPosStr = 
aPos.Format(ScRefFlags::ADDR_ABS, nullptr, pDoc->GetAddressConvention());
+mpList->InsertEntry(aTabNames[aPos.Tab()] + "\t" + 
aPosStr + "\t" + pNote->GetText());
+}
+}
+}
+}
+}
+}
+else
+{
+for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i)
+{
+ScCellIterator aIter(pDoc, *rMatchedRanges[i]);
+for (bool bHas = aIter.first(); bHas; bHas = aIter.next())
+{
+ScAddress aPos = aIter.GetPos();
+if (aPos.Tab() >= nTabCount)
+// Out-of-bound sheet index.
+continue;
+
+OUString aPosStr = aPos.Format(ScRefFlags::ADDR_ABS, nullptr, 
pDoc->GetAddressConvention());
+mpList->InsertEntry(aTabNames[aPos.Tab()] + "\t" + aPosStr + 
"\t" + pDoc->GetString(aPos));
+}
 }
 }
 mpList->SetUpdateMode(true);
diff --git a/sc/source/ui/inc/searchresults.hxx 
b/sc/source/ui/inc/searchresults.hxx
index 8143c48..776a23f 100644
--- a/sc/source/ui/inc/searchresults.hxx
+++ b/sc/source/ui/inc/searchresults.hxx
@@ -32,7 +32,7 @@ public:
 virtual ~SearchResultsDlg();
 virtual void dispose() override;
 
-void FillResults( ScDocument* pDoc, const ScRangeList& rMatchedRanges );
+void FillResults( ScDocument* pDoc, const ScRangeList& rMatchedRanges, 
bool bCellNotes );
 
 virtual bool Close() override;
 };
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 6a7a7e8..c6e2a94 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -1748,7 +1748,8 @@ bool ScViewFunc::SearchAndReplace( const SvxSearchItem* 
pSearchItem,
 {
 sc::SearchResultsDlg* pDlg = 
static_cast(pWnd->GetWindow());
 if (pDlg)
-pDlg->FillResults(&rDoc, aMatchedRanges);
+pDlg->FillResults(&rDoc, aMatchedRanges,
+

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - bootstrap.1 fetch_tarballs.sh

2016-07-27 Thread Damjan Jovanovic
 bootstrap.1   |2 
 fetch_tarballs.sh |  258 --
 2 files changed, 1 insertion(+), 259 deletions(-)

New commits:
commit 90f47bb41c5c54cfd9935bcbc95ede1c0248d7be
Author: Damjan Jovanovic 
Date:   Wed Jul 27 22:52:02 2016 +

main/fetch_tarballs.sh was apparently migrated to the Perl (and now Java)

scripts a long time ago, and hasn't been used since at least AOO 3.4.
Goodbye.

Patch by: me

diff --git a/bootstrap.1 b/bootstrap.1
index faeb891..90d8f42 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -61,7 +61,7 @@ fi
 
 if test -n "$DMAKE_URL" -a  ! -x "$SOLARENV/$INPATH/bin/dmake$EXEEXT"; then
 
-# Assume that the dmake archive has been downloaded by fetch_tarballs.sh
+# Assume that the dmake archive has been downloaded
 # Determine the name of the downloaded file.
 dmake_package_name=`echo $DMAKE_URL | sed "s/^\(.*\/\)//"`
 
diff --git a/fetch_tarballs.sh b/fetch_tarballs.sh
deleted file mode 100755
index 427fca2..000
--- a/fetch_tarballs.sh
+++ /dev/null
@@ -1,258 +0,0 @@
-#!/usr/bin/env bash
-#**
-#
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing,
-#  software distributed under the License is distributed on an
-#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-#  KIND, either express or implied.  See the License for the
-#  specific language governing permissions and limitations
-#  under the License.
-#
-#**
-
-file_list_name=$1
-
-if [ -z "$TARFILE_LOCATION" ]; then
-echo "ERROR: no destination defined! please set TARFILE_LOCATION!"
-exit
-fi
-
-if [ ! -d "$TARFILE_LOCATION" ]; then
-mkdir $TARFILE_LOCATION
-fi
-if [ ! -d "$TARFILE_LOCATION" ]; then
-echo "ERROR: can't create"
-exit
-fi
-
-if [ -z "$1" ]; then
-echo "ERROR: parameter missing!"
-echo "usage: $0 "
-echo "first line must define the base url."
-exit
-fi
-
-# Downloader method selection
-fetch_bin=
-fetch_args=
-
-#Look for FreeBSD's fetch(1) first
-if [ -x /usr/bin/fetch ]; then
-fetch_bin=/usr/bin/fetch
-fetch_args="-Fpr"
-echo found FreeBSD fetch: $fetch_bin
-else
-  for wg in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget 
/opt/sfw/bin/wget /opt/local/bin/wget; do
-eval "$wg --version" > /dev/null 2>&1
-ret=$?
-if [ $ret -eq 0 ]; then
-fetch_bin=$wg
-fetch_args="-nv -N"
-echo found wget at `which $fetch_bin`
-break 2
-fi
-  done
-  if [ -z "$fetch_bin" ]; then
-for c in curl /usr/bin/curl /usr/local/bin/curl /usr/sfw/bin/curl 
/opt/sfw/bin/curl /opt/local/bin/curl; do
-# mac curl returns "2" on --version
-#eval "$i --version" > /dev/null 2>&1
-#ret=$?
-#if [ $ret -eq 0 ]; then
-if [ -x $c ]; then
-fetch_bin=$c
-fetch_args="$file_date_check -O"
-echo found curl at `which $fetch_bin`
-break 2
-fi
-done
-  fi
-  if [ -z "$fetch_bin" ]; then
-echo "ERROR: neither wget nor curl found!"
-exit
-  fi
-fi
-
-#Checksummer selection
-md5sum=
-
-for i in md5 md5sum /usr/local/bin/md5sum gmd5sum /usr/sfw/bin/md5sum 
/opt/sfw/bin/gmd5sum /opt/local/bin/md5sum; do
-if [ "$i" = "md5" ]; then
-eval "$i -x" > /dev/null 2>&1
-else
-eval "$i --version" > /dev/null 2>&1
-fi
-ret=$?
-if [ $ret -eq 0 ]; then
-md5sum=$i
-echo found md5sum at `which $md5sum`
-break 2
-fi
-done
-
-if [ "$md5sum" = "md5" ]; then
-md5special=-r
-fi
-
-if [ -z "$md5sum" ]; then
-echo "Warning: no md5sum: found!"
-fi
-
-start_dir=`pwd`
-logfile=$TARFILE_LOCATION/fetch.log
-date >> $logfile
-
-# Create and go to a temporary directory under the tar file destination.
-mkdir -p $TARFILE_LOCATION/tmp
-cd $TARFILE_LOCATION/tmp
-
-
-basename ()
-{
-echo $1 | sed "s/^\(.*\/\)//"
-}
-
-
-#
-# Download a file from a URL and add its md5 checksum to its name.
-#
-download ()
-{
-local URL=$1
-
-if [ -n "$URL" ]; then
-local basename=$(basename $URL)
-local candidate=$(find "$TARFILE_LOCATION" -type f -name "*-$basename")
-if [ -n "$candidate" ]; then
-echo "$basename is already present ($candidate)"
-else
-echo fetching $basename
-$fetch_bin $fetch_args $URL 2>&1 | tee -a $logfile
-
-if [ $? -ne 0 ]; then

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/bin

2016-07-27 Thread Damjan Jovanovic
 solenv/bin/download_external_dependencies.pl |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ad3e8774955aa8779ed5c4afbd5903f40e2d9c84
Author: Damjan Jovanovic 
Date:   Thu Jul 28 04:38:47 2016 +

Perl returns the exit code of a subprocess shifted right by 8 bits.

Shift it left before use.

Patch by: me

diff --git a/solenv/bin/download_external_dependencies.pl 
b/solenv/bin/download_external_dependencies.pl
index 3990e34..ddef6dd 100755
--- a/solenv/bin/download_external_dependencies.pl
+++ b/solenv/bin/download_external_dependencies.pl
@@ -534,17 +534,18 @@ sub DownloadFile ($$$)
 $URL);
 }
 
-if ($? == 0)
+my $rc = $? >> 8;
+if ($rc == 0)
 {
 return 1;
 }
-elsif ($? == 1)
+elsif ($rc == 1)
 {
 return 0;
 }
 else
 {
-exit $?;
+exit $rc;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/source

2016-07-27 Thread Samuel Mehrbrodt
 vcl/source/window/accessibility.cxx |1 +
 vcl/source/window/stacking.cxx  |2 +-
 vcl/source/window/window.cxx|2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit cec4c3c563c70d846f372966f22e431b6358cece
Author: Samuel Mehrbrodt 
Date:   Wed Jul 27 14:50:54 2016 +0200

vcl: Guard against invalid states

Got crashes here in 5.0, seem to be gone in master, but better be safe
than sorry

Change-Id: I434800f0e4a465233024b6a1ae1f48b010319f5c
Reviewed-on: https://gerrit.libreoffice.org/27594
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 

diff --git a/vcl/source/window/accessibility.cxx 
b/vcl/source/window/accessibility.cxx
index 2b42c13..55c9d30 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -143,6 +143,7 @@ css::uno::Reference< css::accessibility::XAccessible > 
Window::CreateAccessible(
 
 void Window::SetAccessible( const css::uno::Reference< 
css::accessibility::XAccessible >& x )
 {
+assert(mpWindowImpl);
 mpWindowImpl->mxAccessible = x;
 }
 
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index b1c54e5..019dc05 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -845,7 +845,7 @@ void Window::SetParent( vcl::Window* pNewParent )
 SAL_WARN_IF( !pNewParent, "vcl", "Window::SetParent(): pParent == NULL" );
 SAL_WARN_IF( pNewParent == this, "vcl", "someone tried to reparent a 
window to itself" );
 
-if( pNewParent == this )
+if( !pNewParent || pNewParent == this )
 return;
 
 // check if the taskpanelist would change and move the window pointer 
accordingly
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 0de3312..f6d460d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -3143,6 +3143,8 @@ const OUString& Window::GetHelpText() const
 
 void Window::SetWindowPeer( Reference< css::awt::XWindowPeer > const & xPeer, 
VCLXWindow* pVCLXWindow  )
 {
+assert(mpWindowImpl);
+
 // be safe against re-entrance: first clear the old ref, then assign the 
new one
 mpWindowImpl->mxWindowPeer.clear();
 mpWindowImpl->mxWindowPeer = xPeer;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svx

2016-07-27 Thread Miklos Vajna
 include/svx/svdedxv.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 66dd26659e7c4bb731a88e7dbc809c5b53cb79c3
Author: Miklos Vajna 
Date:   Thu Jul 28 08:23:51 2016 +0200

svx: fix loplugin:nullptr

Change-Id: Iff5fbb5c8b2885b0ba84c08f1357fdfc82ecf016

diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 4527086..5957bce 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -110,7 +110,7 @@ protected:
 
 // Create a new OutlinerView at the heap and initialize all required 
parameters.
 // pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized
-OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, 
OutlinerView* pGivenView, SfxViewShell* pViewShell = 0) const;
+OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, 
OutlinerView* pGivenView, SfxViewShell* pViewShell = nullptr) const;
 void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, 
OutputDevice& rTargetDevice) const;
 void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucb/CppunitTest_ucb_webdav_neon_opts.mk ucb/Library_ucpdav1.mk ucb/Module_ucb.mk ucb/qa ucb/source

2016-07-27 Thread Giuseppe Castagno
 ucb/CppunitTest_ucb_webdav_neon_opts.mk  |   55 ++
 ucb/Library_ucpdav1.mk   |1 
 ucb/Module_ucb.mk|1 
 ucb/qa/cppunit/webdav/webdav_options.cxx |  255 +++
 ucb/source/ucp/webdav-neon/DAVTypes.cxx  |   67 
 ucb/source/ucp/webdav-neon/DAVTypes.hxx  |  124 +--
 6 files changed, 491 insertions(+), 12 deletions(-)

New commits:
commit f950b49393ee6539f2a7b3c306aa4fc119f24a84
Author: Giuseppe Castagno 
Date:   Sat Jan 9 17:32:26 2016 +0100

tdf#101094 (1) OPTIONS: New class to store retrieved OPTIONS

This class describes the DAV options useful to LO.
Added behavioural unit tests as well.

Change-Id: I7ba0230f1a1469b12f9b3f59f21e5c2730c65b81
Reviewed-on: https://gerrit.libreoffice.org/27595
Tested-by: Jenkins 
Reviewed-by: Giuseppe Castagno 

diff --git a/ucb/CppunitTest_ucb_webdav_neon_opts.mk 
b/ucb/CppunitTest_ucb_webdav_neon_opts.mk
new file mode 100644
index 000..91e167b
--- /dev/null
+++ b/ucb/CppunitTest_ucb_webdav_neon_opts.mk
@@ -0,0 +1,55 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,ucb_webdav_neon_opts))
+
+$(eval $(call gb_CppunitTest_use_api,ucb_webdav_neon_opts, \
+   offapi \
+   udkapi \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,ucb_webdav_neon_opts, \
+   comphelper \
+   cppu \
+   cppuhelper \
+   sal \
+   salhelper \
+   test \
+   ucbhelper \
+))
+
+$(eval $(call gb_CppunitTest_use_library_objects,ucb_webdav_neon_opts, \
+   ucpdav1 \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,ucb_webdav_neon_opts,\
+   boost_headers \
+   libxml2 \
+   neon \
+   openssl \
+))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,ucb_webdav_neon_opts,\
+   officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,ucb_webdav_neon_opts, \
+ucb/qa/cppunit/webdav/webdav_options \
+))
+
+$(eval $(call gb_CppunitTest_set_include,ucb_webdav_neon_opts,\
+$$(INCLUDE) \
+-I$(SRCDIR)/ucb/source/ucp/webdav-neon \
+))
+
+$(eval $(call gb_CppunitTest_use_static_libraries,ucb_webdav_neon_opts))
+
+# vim: set noet sw=4 ts=4:
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index 37f3c8f..02e3681 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -43,6 +43,7 @@ $(eval $(call gb_Library_add_exception_objects,ucpdav1,\
ucb/source/ucp/webdav-neon/DAVProperties \
ucb/source/ucp/webdav-neon/DAVResourceAccess \
ucb/source/ucp/webdav-neon/DAVSessionFactory \
+   ucb/source/ucp/webdav-neon/DAVTypes \
ucb/source/ucp/webdav-neon/LinkSequence \
ucb/source/ucp/webdav-neon/LockEntrySequence \
ucb/source/ucp/webdav-neon/LockSequence \
diff --git a/ucb/Module_ucb.mk b/ucb/Module_ucb.mk
index a69b937..e14c524 100644
--- a/ucb/Module_ucb.mk
+++ b/ucb/Module_ucb.mk
@@ -35,6 +35,7 @@ ifeq ($(WITH_WEBDAV),neon)
 
 $(eval $(call gb_Module_add_check_targets,ucb,\
 CppunitTest_ucb_webdav_local_neon \
+CppunitTest_ucb_webdav_neon_opts \
 ))
 
 endif
diff --git a/ucb/qa/cppunit/webdav/webdav_options.cxx 
b/ucb/qa/cppunit/webdav/webdav_options.cxx
new file mode 100644
index 000..dd7ad24
--- /dev/null
+++ b/ucb/qa/cppunit/webdav/webdav_options.cxx
@@ -0,0 +1,255 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include "DAVTypes.hxx"
+
+
+namespace
+{
+
+class webdav_opts_test: public test::BootstrapFixture
+{
+
+public:
+webdav_opts_test() : BootstrapFixture( true, true ) {}
+
+// initialise your test code values here.
+void setUp(  ) override;
+
+void tearDown(  ) override;
+
+void DAVTypesCheckReset( webdav_ucp::DAVOptions aDavType );
+void DAVTypesTest();
+
+// Change the following lines only, if you add, remove or rename
+// member functions of the current class,
+// because these macros are need by auto register mechanism.
+
+CPPUNIT_TEST_SUITE( webdav_opts_test );
+CPPUNIT_TEST( DAVTypesTest );
+CPPUNIT_TEST_SUITE_END();
+};  // class webdav_local_test
+
+// initialise your test

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.hpp loolwsd/README loolwsd/Util.hpp

2016-07-27 Thread Miklos Vajna
 loolwsd/LOOLWSD.hpp |   12 ++--
 loolwsd/README  |4 +---
 loolwsd/Util.hpp|   18 +-
 3 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit 84ef81b7b46aae991046c76686bedb9388648d1e
Author: Miklos Vajna 
Date:   Thu Jul 28 08:39:03 2016 +0200

LOOLWSD, Util: follow coding style when prefixing data members

Change-Id: Iaf788cc8e5b7df473a52fbe8496d500f0f63c117

diff --git a/loolwsd/LOOLWSD.hpp b/loolwsd/LOOLWSD.hpp
index ff282d6..46a8c18 100644
--- a/loolwsd/LOOLWSD.hpp
+++ b/loolwsd/LOOLWSD.hpp
@@ -75,18 +75,18 @@ private:
 
 class ConfigValueGetter
 {
-Poco::Util::LayeredConfiguration& mconfig;
-const std::string& mname;
+Poco::Util::LayeredConfiguration& _config;
+const std::string& _name;
 
 public:
 ConfigValueGetter(Poco::Util::LayeredConfiguration& config,
   const std::string& name)
-: mconfig(config)
-, mname(name)
+: _config(config)
+, _name(name)
 {}
 
-void operator()(unsigned int& value) { value = mconfig.getUInt(mname); 
}
-void operator()(bool& value) { value = mconfig.getBool(mname); }
+void operator()(unsigned int& value) { value = _config.getUInt(_name); 
}
+void operator()(bool& value) { value = _config.getBool(_name); }
 };
 
 template
diff --git a/loolwsd/README b/loolwsd/README
index ec1ae2e..2c21e7d 100644
--- a/loolwsd/README
+++ b/loolwsd/README
@@ -349,6 +349,4 @@ The style is roughly as follows, in rough order of 
importance:
 - Member functions use camelCaseWithInitialLowerCase. I don't like
   CamelCaseWithInitialUpperCase.
 
-- [ No kind of Hungarian prefixes. ] This rule seems to have been
-  totally ignored lately. So now the codebase is inconsistent in
-  naming conventions. Oh well.
+- [ No kind of Hungarian prefixes. ]
diff --git a/loolwsd/Util.hpp b/loolwsd/Util.hpp
index e2dd51b..1bbd377 100644
--- a/loolwsd/Util.hpp
+++ b/loolwsd/Util.hpp
@@ -188,20 +188,20 @@ namespace Util
 template
 class RuntimeConstant
 {
-T mValue;
-bool mInitialized;
+T _value;
+bool _initialized;
 
 public:
 RuntimeConstant()
-: mValue()
-, mInitialized(false)
+: _value()
+, _initialized(false)
 {}
 
 const T& get()
 {
-if(mInitialized)
+if(_initialized)
 {
-return mValue;
+return _value;
 }
 else
 {
@@ -211,10 +211,10 @@ namespace Util
 
 void set(const T& value)
 {
-assert(!mInitialized);
+assert(!_initialized);
 
-mInitialized = true;
-mValue = value;
+_initialized = true;
+_value = value;
 }
 };
 } // end namespace Util
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits