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

2017-11-15 Thread Noel Grandin
 chart2/source/controller/dialogs/res_DataLabel.cxx |   
 2 
 chart2/source/controller/dialogs/tp_AxisLabel.cxx  |   
 2 
 chart2/source/controller/dialogs/tp_LegendPosition.cxx |   
 2 
 chart2/source/controller/dialogs/tp_TitleRotation.cxx  |   
 2 
 chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx |   
 8 +--
 chart2/source/controller/itemsetwrapper/SchWhichPairs.hxx  |   
 2 
 chart2/source/view/main/ChartView.cxx  |   
 2 
 chart2/source/view/main/DrawModelWrapper.cxx   |   
 2 
 editeng/inc/editdoc.hxx|   
 2 
 editeng/source/editeng/editdbg.cxx |   
14 +++---
 editeng/source/editeng/editdoc.cxx |   
 4 -
 editeng/source/editeng/eerdll.cxx  |   
22 +-
 editeng/source/editeng/eertfpar.cxx|   
 2 
 editeng/source/editeng/impedit.hxx |   
 2 
 editeng/source/editeng/impedit4.cxx|   
 8 +--
 editeng/source/outliner/outliner.cxx   |   
 2 
 editeng/source/outliner/outlvw.cxx |   
10 ++--
 editeng/source/uno/unotext.cxx |   
10 ++--
 editeng/source/xml/xmltxtexp.cxx   |   
 6 +-
 filter/source/msfilter/msdffimp.cxx|   
 6 +-
 filter/source/msfilter/svdfppt.cxx |   
18 
 forms/source/richtext/rtattributehandler.cxx   |   
 2 
 include/editeng/editeng.hxx|   
 2 
 include/editeng/unotext.hxx|   
20 -
 include/svl/itempool.hxx   |   
10 +---
 include/svl/itemset.hxx|   
15 --
 include/svl/poolitem.hxx   |   
 6 --
 include/svl/typedwhich.hxx |   
11 ++---
 include/svx/svdobj.hxx |   
 2 
 sc/source/core/data/drwlayer.cxx   |   
 4 -
 sc/source/core/data/patattr.cxx|   
 8 +--
 sc/source/ui/app/inputwin.cxx  |   
 2 
 sc/source/ui/drawfunc/drawsh5.cxx  |   
 4 -
 sc/source/ui/drawfunc/drtxtob.cxx  |   
 4 -
 sc/source/ui/drawfunc/drtxtob2.cxx |   
 8 +--
 sc/source/ui/view/printfun.cxx |   
 2 
 sd/source/core/drawdoc.cxx |   
 2 
 sd/source/core/drawdoc4.cxx|   
16 +++
 sd/source/core/sdpage.cxx  |   
 4 -
 sd/source/core/stlpool.cxx |   
10 ++--
 sd/source/ui/dlg/dlgolbul.cxx  |   
 2 
 sd/source/ui/func/fuolbull.cxx |   
 2 
 sd/source/ui/func/fupage.cxx   |   
 4 -
 sd/source/ui/func/futempl.cxx  |   
 2 
 sd/source/ui/view/drtxtob1.cxx |   
12 ++---
 sd/source/ui/view/drviews2.cxx |   
 8 +--
 sd/source/ui/view/drviews3.cxx |   
12 ++---
 sd/source/ui/view/outlview.cxx |   
 2 
 sd/source/ui/view/viewshel.cxx |   
 2 
 svx/source/svdraw/svdattr.cxx  |   
12 ++---
 sw/source/uibase/shells/annotsh.cxx|   
 6 +-
 sw/source/uibase/shells/drwtxtex.cxx   |   
 6 +-
 sw/source/uibase/uiview/viewdraw.cxx   |   
 6 +-
 53 files changed, 159 insertions(+), 177 deletions(-)

New commits:
commit 13b89618c49adfd77d184f22e23420a7b6d4678b
Author: Noel Grandin 
Date:   Wed Nov 15 14:19:37 2017 +0200

use implict conversion operator in TypedWhichId

instead of spreading calls to Which() everywhere.

Change-Id: Ie32d106e44f5cb583908eeebe254ab8b8168ae61
Reviewed-on: https://ge

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

2017-11-15 Thread Noel Grandin
 hwpfilter/source/hbox.h  |6 -
 hwpfilter/source/hwpfile.cxx |   45 +++
 hwpfilter/source/hwpfile.h   |   15 +++---
 hwpfilter/source/hwpread.cxx |8 +++
 4 files changed, 25 insertions(+), 49 deletions(-)

New commits:
commit 121303615054568c204def97872343d2014af4a0
Author: Noel Grandin 
Date:   Wed Nov 15 16:23:52 2017 +0200

loplugin:useuniqueptr in hwpfilter

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

diff --git a/hwpfilter/source/hbox.h b/hwpfilter/source/hbox.h
index d934c9bf6622..8592e7d4cd8d 100644
--- a/hwpfilter/source/hbox.h
+++ b/hwpfilter/source/hbox.h
@@ -510,14 +510,10 @@ struct TCell
 struct Table
 {
  Table() : box(nullptr) {};
- ~Table() {
-  for (auto const& cell : cells)
-delete cell;
- };
 
  Columns columns;
  Rowsrows;
- std::vector cells;
+ std::vector> cells;
  TxtBox *box;
 };
 
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx
index 62006be23a34..69653f162f6d 100644
--- a/hwpfilter/source/hwpfile.cxx
+++ b/hwpfilter/source/hwpfile.cxx
@@ -62,21 +62,6 @@ HWPFile::~HWPFile()
 {
 delete oledata;
 delete hiodev;
-
-for (auto const& column : columnlist)
-delete column;
-
-for (auto const& paragraph : plist)
-delete paragraph;
-
-for (auto const& table : tables)
-delete table;
-
-for (auto const& emb : emblist)
-delete emb;
-
-for (auto const& hyperlink : hyperlist)
-delete hyperlink;
 }
 
 int HWPFile::ReadHwpFile(HStream * stream)
@@ -323,12 +308,10 @@ void HWPFile::TagsRead()
 {
 case FILETAG_EMBEDDED_PICTURE:
 {
-EmPicture *emb = new EmPicture(size);
+std::unique_ptr emb(new EmPicture(size));
 
 if (emb->Read(*this))
-emblist.push_back(emb);
-else
-delete emb;
+emblist.push_back(std::move(emb));
 }
 break;
 case FILETAG_OLE_OBJECT:
@@ -346,14 +329,11 @@ void HWPFile::TagsRead()
 const int nRecords = size / nRecordLen;
 for (int i = 0 ; i < nRecords; ++i)
 {
-HyperText *hypert = new HyperText;
+std::unique_ptr hypert(new HyperText);
 if (hypert->Read(*this))
-hyperlist.push_back(hypert);
+hyperlist.push_back(std::move(hypert));
 else
-{
-delete hypert;
 break;
-}
 }
 }
 break;
@@ -454,7 +434,7 @@ HyperText *HWPFile::GetHyperText()
 {
 ++currenthyper;
 if (static_cast(currenthyper) <= hyperlist.size())
-return hyperlist[currenthyper-1];
+return hyperlist[currenthyper-1].get();
 else
 return nullptr;
 }
@@ -469,7 +449,7 @@ EmPicture *HWPFile::GetEmPicture(Picture * pic)
 
 for (auto const& emb : emblist)
 if (strcmp(name, emb->name) == 0)
-return emb;
+return emb.get();
 return nullptr;
 }
 
@@ -481,7 +461,7 @@ EmPicture *HWPFile::GetEmPictureByName(char * name)
 
 for (auto const& emb : emblist)
 if (strcmp(name, emb->name) == 0)
-return emb;
+return emb.get();
 return nullptr;
 }
 
@@ -536,7 +516,7 @@ Table *HWPFile::getTable(int index)
 {
 if (index < 0 || static_cast(index) >= tables.size())
 return nullptr;
-return tables[index];
+return tables[index].get();
 }
 
 void HWPFile::AddParaShape(std::shared_ptr const & pshape)
@@ -585,14 +565,13 @@ void HWPFile::AddCharShape(std::shared_ptr 
const & cshape)
 
 void HWPFile::AddColumnInfo()
 {
-ColumnInfo *cinfo = new ColumnInfo(m_nCurrentPage);
-columnlist.push_back(cinfo);
+columnlist.emplace_back(new ColumnInfo(m_nCurrentPage));
 setMaxSettedPage();
 }
 
 void HWPFile::SetColumnDef(ColumnDef *coldef)
 {
-ColumnInfo *cinfo = columnlist.back();
+ColumnInfo *cinfo = columnlist.back().get();
 if( cinfo->bIsSet )
 return;
 cinfo->coldef = coldef;
@@ -615,9 +594,9 @@ void HWPFile::AddHeaderFooter(HeaderFooter * hbox)
 headerfooters.push_back(hbox);
 }
 
-void HWPFile::AddTable(Table * hbox)
+void HWPFile::AddTable(std::unique_ptr hbox)
 {
-tables.push_back(hbox);
+tables.push_back(std::move(hbox));
 }
 
 void HWPFile::AddFBoxStyle(FBoxStyle * fbstyle)
diff --git a/hwpfilter/source/hwpfile.h b/hwpfilter/source/hwpfile.h
index 817173d24707..83bf28860f9b 100644
--- a/hwpfilter/source/hwpfile.h
+++ b/hwpfilter/source/hwpfile.h
@@ -27,6 +27,7 @@
 
 #include 
 #includ

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

2017-11-15 Thread Andrea Gelmini
 sd/source/ui/view/ImpressViewShellBase.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e1dd5d0ca425058174feeff28859672827946bac
Author: Andrea Gelmini 
Date:   Wed Nov 15 15:23:16 2017 +0100

Removed duplicated include

Change-Id: Ic59458337966b35f46279e653a73ab601787d7b9
Reviewed-on: https://gerrit.libreoffice.org/44764
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/sd/source/ui/view/ImpressViewShellBase.cxx 
b/sd/source/ui/view/ImpressViewShellBase.cxx
index 6c6c95acbb8a..96d2461ddb72 100644
--- a/sd/source/ui/view/ImpressViewShellBase.cxx
+++ b/sd/source/ui/view/ImpressViewShellBase.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Content is not visible on Android Viewer

2017-11-15 Thread Tomaž Vajngerl
Hi,

On Wed, Nov 15, 2017 at 6:27 PM, Mert Tümer  wrote:
> Hello,
>
> Is there anyone working on this bug:
> https://bugs.documentfoundation.org/show_bug.cgi?id=111871
>
> or does anyone know what caused this? It seems to be a major bug. I was
> contributing to the Android Viewer but due to this i can't really work on
> anything.

Sorry for that, I'll look into this once I have some time. We are
nearing the feature freeze for 6.0 so my focus is to get some features
in before that and then concentrate on fixing bugs.

For now, you'll have to revert the commit that is mentioned in the bug
report if you want to get it working again (which might not be that
trivial anymore). What exactly is the cause in that commit that screws
with tile rendering on android is not known as it works fine for
online (or it would be already fixed).

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


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

2017-11-15 Thread Ximeng Zu
 android/source/AndroidManifest.xml   |   11 
 android/source/res/layout/toolbar_bottom.xml |   10 
 android/source/res/values/strings.xml|   11 
 android/source/res/xml/file_paths.xml|4 
 android/source/src/java/org/libreoffice/FormattingController.java|  208 
+-
 android/source/src/java/org/libreoffice/LOEvent.java |1 
 android/source/src/java/org/libreoffice/LOKitThread.java |4 
 android/source/src/java/org/libreoffice/LOKitTileProvider.java   |8 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java |7 
 9 files changed, 262 insertions(+), 2 deletions(-)

New commits:
commit 8d977511e3ab755da65d34a0bd618ef3c9db90c7
Author: Ximeng Zu 
Date:   Mon Aug 14 11:41:30 2017 -0500

tdf#106370 Android: add ability to insert pictures

Added ability to insert pictures to Android Viewer.
You can take photo or select photo from device or
the cloud (Google photos, Dropbox). You can also
compress the picture before inserting it with multiple
compress grades. So far, inserting doesn't work for
Writer due LO native library issues (I think).

Change-Id: If6841ba04fe18585703c8b85909cf39747dbbc2f
Reviewed-on: https://gerrit.libreoffice.org/41150
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/android/source/AndroidManifest.xml 
b/android/source/AndroidManifest.xml
index c2a3656f8e92..fb51eb4b0e43 100644
--- a/android/source/AndroidManifest.xml
+++ b/android/source/AndroidManifest.xml
@@ -7,6 +7,7 @@
 
 
 
+
 
 
 
@@ -133,6 +134,16 @@
 android:value=".LibreOfficeMainActivity" />
 
 
+
+
+
+
 
 
 
diff --git a/android/source/res/layout/toolbar_bottom.xml 
b/android/source/res/layout/toolbar_bottom.xml
index 1b4730d89adf..a537a52d32b9 100644
--- a/android/source/res/layout/toolbar_bottom.xml
+++ b/android/source/res/layout/toolbar_bottom.xml
@@ -328,6 +328,16 @@
 android:paddingBottom="12dp"
 android:paddingTop="12dp"
 app:srcCompat="@drawable/ic_rect" />
+
+
 
 
 
diff --git a/android/source/res/values/strings.xml 
b/android/source/res/values/strings.xml
index e84c496db3c5..3f6955cd7a7b 100644
--- a/android/source/res/values/strings.xml
+++ b/android/source/res/values/strings.xml
@@ -157,4 +157,15 @@
 Cancel
 Please enter password
 
+
+Take Photo
+Select Photo
+Select Picture
+No Camera Found
+Smallest Size
+Medium Size
+Max Quality
+Don\'t Compress
+Do you want to compress the 
photo?
+
 
diff --git a/android/source/res/xml/file_paths.xml 
b/android/source/res/xml/file_paths.xml
new file mode 100644
index ..2bbe2aef17ea
--- /dev/null
+++ b/android/source/res/xml/file_paths.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/android/source/src/java/org/libreoffice/FormattingController.java 
b/android/source/src/java/org/libreoffice/FormattingController.java
index 4d36249dc6b9..0ba72cf50875 100644
--- a/android/source/src/java/org/libreoffice/FormattingController.java
+++ b/android/source/src/java/org/libreoffice/FormattingController.java
@@ -1,15 +1,45 @@
 package org.libreoffice;
 
+import android.app.Activity;
+import android.app.AlertDialog;
+import android.content.DialogInterface;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.content.pm.ResolveInfo;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.Environment;
+import android.provider.MediaStore;
+import android.support.design.widget.Snackbar;
+import android.support.v4.content.FileProvider;
 import android.util.Log;
 import android.view.View;
 import android.widget.ImageButton;
 
+import org.json.JSONException;
+import org.json.JSONObject;
 import org.libreoffice.kit.Document;
 
- class FormattingController implements View.OnClickListener {
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+
+import static org.libreoffice.SearchController.addProperty;
+
+class FormattingController implements View.OnClickListener {
 private static final String LOGTAG = 
ToolbarController.class.getSimpleName();
+private static final int TAKE_PHOTO = 1;
+private static final int SELECT_PHOTO = 2;
+private static final int IMAGE_BUFFER_SIZE = 4 * 1024;
 
 private LibreOfficeMainActivity mContext;
+private String mCurrentPhotoPath;
 
 FormattingC

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

2017-11-15 Thread Ximeng Zu
 android/source/res/layout/activity_main.xml|   
24 
 android/source/res/values/dimens.xml   |   
 2 
 android/source/src/java/org/libreoffice/InvalidationHandler.java   |   
26 
 android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java   |   
 2 
 android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java |   
54 +-
 5 files changed, 106 insertions(+), 2 deletions(-)

New commits:
commit 4e2555b7f37172ab28d43d5aecfa52a38c0cdd65
Author: Ximeng Zu 
Date:   Thu Jul 20 09:17:15 2017 -0500

[Android] Add address/formula bars

Added address bar and formula bar to Calc.

Change-Id: I7cc7047d6d07629ab564261d294e481ae585fd29
Reviewed-on: https://gerrit.libreoffice.org/40842
Reviewed-by: Tomaž Vajngerl 
Tested-by: Tomaž Vajngerl 

diff --git a/android/source/res/layout/activity_main.xml 
b/android/source/res/layout/activity_main.xml
index e157e23454de..9f53b4f5d3dd 100644
--- a/android/source/res/layout/activity_main.xml
+++ b/android/source/res/layout/activity_main.xml
@@ -35,6 +35,30 @@
 
 
 
+
+
+
+
+
+
+
+
 
diff --git a/android/source/res/values/dimens.xml 
b/android/source/res/values/dimens.xml
index 8a153790ac69..3a3343ff56b0 100644
--- a/android/source/res/values/dimens.xml
+++ b/android/source/res/values/dimens.xml
@@ -11,4 +11,6 @@
 256dp
 48dp
 24dp
+40dp
+96dp
 
diff --git a/android/source/src/java/org/libreoffice/InvalidationHandler.java 
b/android/source/src/java/org/libreoffice/InvalidationHandler.java
index fbe7d96b63d6..6cd93ba51615 100644
--- a/android/source/src/java/org/libreoffice/InvalidationHandler.java
+++ b/android/source/src/java/org/libreoffice/InvalidationHandler.java
@@ -5,6 +5,7 @@ import android.graphics.PointF;
 import android.graphics.RectF;
 import android.net.Uri;
 import android.util.Log;
+import android.widget.EditText;
 
 import org.json.JSONArray;
 import org.json.JSONException;
@@ -98,6 +99,12 @@ public class InvalidationHandler implements 
Document.MessageCallback, Office.Mes
 case Document.CALLBACK_INVALIDATE_HEADER:
 invalidateHeader();
 break;
+case Document.CALLBACK_CELL_ADDRESS:
+cellAddress(payload);
+break;
+case Document.CALLBACK_CELL_FORMULA:
+cellFormula(payload);
+break;
 case Document.CALLBACK_DOCUMENT_PASSWORD:
 documentPassword();
 break;
@@ -106,6 +113,24 @@ public class InvalidationHandler implements 
Document.MessageCallback, Office.Mes
 }
 }
 
+private void cellFormula(final String payload) {
+LOKitShell.getMainHandler().post(new Runnable() {
+@Override
+public void run() {
+
((EditText)mContext.findViewById(R.id.calc_formula)).setText(payload);
+}
+});
+}
+
+private void cellAddress(final String payload) {
+LOKitShell.getMainHandler().post(new Runnable() {
+@Override
+public void run() {
+
((EditText)mContext.findViewById(R.id.calc_address)).setText(payload);
+}
+});
+}
+
 private void invalidateHeader() {
 LOKitShell.sendEvent(new LOEvent(LOEvent.UPDATE_CALC_HEADERS));
 }
@@ -128,6 +153,7 @@ public class InvalidationHandler implements 
Document.MessageCallback, Office.Mes
 
 if (cellCursorRect != null) {
 mDocumentOverlay.showCellSelection(cellCursorRect);
+moveViewportToMakeSelectionVisible(cellCursorRect);
 }
 }
 
diff --git 
a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java 
b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
index 83f0267095a7..defd0d18476e 100644
--- a/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
+++ b/android/source/src/java/org/libreoffice/LibreOfficeMainActivity.java
@@ -742,6 +742,8 @@ public class LibreOfficeMainActivity extends 
AppCompatActivity implements Settin
 
findViewById(R.id.calc_header_top_left).setVisibility(View.VISIBLE);
 findViewById(R.id.calc_header_row).setVisibility(View.VISIBLE);
 
findViewById(R.id.calc_header_column).setVisibility(View.VISIBLE);
+findViewById(R.id.calc_address).setVisibility(View.VISIBLE);
+findViewById(R.id.calc_formula).setVisibility(View.VISIBLE);
 }
 });
 }
diff --git 
a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java 
b/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java
index a7ff26a5ea88..8bce80afd851 100644
--- a/android/source/src/java/org/libreoffice/overlay/CalcHeadersController.java
+++ b/android/source/src/java/org/libr

Content is not visible on Android Viewer

2017-11-15 Thread Mert Tümer
Hello,

Is there anyone working on this bug: 
https://bugs.documentfoundation.org/show_bug.cgi?id=111871

or does anyone know what caused this? It seems to be a major bug. I was 
contributing to the Android Viewer but due to this i can't really work on 
anything.

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


Copyright infringement and future of Hunspell

2017-11-15 Thread Németh László
Hi,

A week ago you modified Hunspell’s license in the official Hunspell
repository
without permission of the author, me, and the main contributor and
maintainer,
Caolán McNamara.

==
commit d49170ce949dbe0d2e6ad74b6b876e5580704a5e
Author: Dimitrij Mijoski 
Date:   Wed Nov 8 18:30:29 2017 +0100

License everything under LGPLv3+. No more three licenses mumbo jumbo.

commit 6ff9a6fb5a63ee63294131eba7ce4e67624dffa5
Author: PanderMusubi 
Date:   Wed Nov 8 16:45:35 2017 +0100

improved copyright and authors
==

Free licenses and rich functionality helped Hunspell equally to
spread better multilingual spell checking among desktop and web
applications, so I don’t plan to replace the recent MPL/LGPL/GPL
tri-license with LGPL 3.

Moreover, it’s misleading to refer yourselves as the authors of Hunspell
(see your change in Hunspell’s AUTHORS file), when you are contributors
of the project.

If I right think, these modifications are related to your Mozilla funded
Hunspell
development, in which, unfortunately, I wasn’t able to take part in it,
and I didn’t follow  your Mozilla application last year. I read about its
success(?)
and your plan to create a spell checker from scratch only a few weeks ago.
(You have informed Caolán and me only about the first steps of the
application,
if I right know.)

>From its name and place in Hunspell repository, “Hunspell 2” is a
future replacement or successor of Hunspell library and command-line
executable, but it seems, it’s more like a fork of Hunspell development
efforts. According to your plan: “That aim for Hunspell 2.0 is to
recreate the most common functionality in Hunspell 1, and that is
detection and correction of spelling errors.”

Reimplementing a subset of the features and dropping dictionary formats
can result worse spell checking and dictionary incompatibilities between
applications (as I see in the case of Hungarian dictionary in your
project).

“Hunspell 2” won’t contain functions used by LibreOffice, main
target of Hunspell development. For example, every thesaurus uses Hunspell
for stemming, some of them also for morphological generation.

You promise the same spelling as in Hunspell, but you’ve already removed
all unit tests of Hunspell library to the dictionary “v1cmdline”.

Spell checking of LaTeX, HTML/XML and OpenDocument files will be also
“dropped” in your development, but this is a basic function of the
targeted academic publishing and automatized command-line document editing.

As the author of the half of Hunspell’s code base (the second half is
the work of Kevin Hendricks, author of MySpell), I don’t believe your
incomplete rewriting from scratch is a viable option with your limited
resources and experience (one C++ developer, insufficient knowledge
of the aim, usage and implementation of Hunspell features and
dictionaries).

[For example, you wrote the following about the LANG option of Hunspell
affix file in your analysis: “In the source code is no implementation
existing. Deprecate this option?”, while this option is really used
several places in language-specific parts of Hunspell. I have just added
support for special casing of Crimean Tatar language (extending the
Turkish and Azeri support – those were mentioned in Hunspell(5) manual
page), also adapted orthography changes in the special LANG_hu part of the
general compounding functions.]

See why trying to rewrite from scratch is a huge risk:
https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i

Please, consider Caolán’s more than 700 Hunspell commits: excellent
and unique code-cleaning based on Red Hat, LibreOffice and Coverity bug
reports and – partly covering your aims – massive C++11 porting in
Hunspell library and command-line tool.

I think, the most important thing is to open Hunspell for more languages,
supporting research results of the academic sphere (see
https://pdfs.semanticscholar.org/dad3/5c719bb8bf5dffa8c757166fd1086be4d6c6.pdf
,
http://voikko.puimula.org/architecture.html), improving recent
dictionaries and creating competitive linguistic features, especially for
LibreOffice.

I’m glad of that I can work on the Hungarian Hunspell dictionary these
months supported by FSF.hu Foundation, Hungary, fixing some minor
problems in Hunspell and LibreOffice, too. Moreover, last week I
adapted an interesting Hunspell feature to LibreOffice. I think, this
“Grammar By” improvement of the user dictionaries will be quite useful
for professional Writer users in several languages:
https://wiki.documentfoundation.org/ReleaseNotes/6.0#.E2.80.9CGrammar_By.E2.80.9D_spell_checking
.

I would be glad of fixing the recent regression of the English thesauri
(morphological descriptions were removed by English dictionary update) in
LibreOffice, refining parts in Hunspell related to this and to the
“Grammar By” feature, giving frequency and pronunciation based
suggestions, avoiding overgeneration in compounding,
sup

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

2017-11-15 Thread Caolán McNamara
 sc/source/core/tool/compiler.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit a5550289a37950195b7a7e5b22cba79ce5b5a673
Author: Caolán McNamara 
Date:   Wed Nov 15 11:48:47 2017 +

ofz: special case max index for cSymbol

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

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index ef64f87afede..1228c22110f3 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3266,6 +3266,8 @@ bool ScCompiler::IsReference( const OUString& rName, 
const OUString* pErrRef )
 return true;
 // Now try with a symbol up to the range operator, rewind source
 // position.
+if (mnRangeOpPosInSymbol == MAXSTRLEN-1)
+return false;
 sal_Int32 nLen = mnRangeOpPosInSymbol;
 while (cSymbol[++nLen])
 ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source

2017-11-15 Thread Caolán McNamara
 sw/source/filter/ww8/docxattributeoutput.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 7804cbaf548922a1297316571a47d43283bb55d8
Author: Caolán McNamara 
Date:   Wed Nov 15 15:44:20 2017 +

crashtesting: assert on export of fdo59645-3.odt to docx

probably since...

commit 3f2e84b4bd0bbd936e0af845ba7cbf68cb2803d6
Date:   Tue Oct 31 23:39:26 2017 +0100

tdf#38778 Fix output of the font in DOC run

The font information should be output before field declaration.
Added unit test.

tdf#38778 DOCX output: no double output of the font info

need to also not double output the complex script font info as well
as the western and ctl info

I misread hAnsi as Asian the last time so thought CJK was already
handled, handle it for real this time

Change-Id: If57a3ca3f96a7b76f1fb8702a0d5071c0b3e5cd9
Reviewed-on: https://gerrit.libreoffice.org/44771
Reviewed-by: Serge Krot (CIB) 
Tested-by: Serge Krot (CIB) 
Reviewed-on: https://gerrit.libreoffice.org/44779
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 0ffdd716b88c..f78cf7f96c53 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6731,6 +6731,14 @@ void DocxAttributeOutput::CharBackground( const 
SvxBrushItem& rBrush )
 
 void DocxAttributeOutput::CharFontCJK( const SvxFontItem& rFont )
 {
+if (m_pFontsAttrList && m_pFontsAttrList->hasAttribute(FSNS(XML_w, 
XML_eastAsia)))
+{
+// tdf#38778: do to fields output into DOC the font could be added 
before and after field declaration
+// that all sub runs of the field will have correct font inside.
+// For DOCX we should do not add the same font information twice in 
the same node
+return;
+}
+
 const OUString& sFontName(rFont.GetFamilyName());
 OString sFontNameUtf8 = OUStringToOString(sFontName, 
RTL_TEXTENCODING_UTF8);
 AddToAttrList( m_pFontsAttrList, FSNS( XML_w, XML_eastAsia ), 
sFontNameUtf8.getStr() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - kit/DummyLibreOfficeKit.cpp tools/KitClient.cpp

2017-11-15 Thread Aron Budea
 kit/DummyLibreOfficeKit.cpp |4 ++--
 tools/KitClient.cpp |2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a72faa0460e308c227a9f0fb684d943e2ef78398
Author: Aron Budea 
Date:   Sun Sep 24 19:25:21 2017 +0200

Adapt to lok API CHANGE in core

Introduced in commit 5bcc79e825d542c40c9ee0f48d1d72ea9aa53c54.

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

diff --git a/kit/DummyLibreOfficeKit.cpp b/kit/DummyLibreOfficeKit.cpp
index cad7aec1..891ac6ed 100644
--- a/kit/DummyLibreOfficeKit.cpp
+++ b/kit/DummyLibreOfficeKit.cpp
@@ -180,7 +180,7 @@ static voidlo_registerCallback 
(LibreOfficeKit* pThis,
 LibreOfficeKitCallback 
pCallback,
 void* pData);
 static char* lo_getFilterTypes(LibreOfficeKit* pThis);
-static void lo_setOptionalFeatures(LibreOfficeKit* pThis, uint64_t features);
+static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long 
features);
 static voidlo_setDocumentPassword(LibreOfficeKit* pThis,
const char* pURL,
const char* pPassword);
@@ -534,7 +534,7 @@ static char* lo_getFilterTypes(LibreOfficeKit* pThis)
 return nullptr;
 }
 
-static void lo_setOptionalFeatures(LibreOfficeKit* pThis, uint64_t const 
features)
+static void lo_setOptionalFeatures(LibreOfficeKit* pThis, unsigned long long 
const features)
 {
 (void) pThis;
 (void) features;
diff --git a/tools/KitClient.cpp b/tools/KitClient.cpp
index ab77cff9..d03d81be 100644
--- a/tools/KitClient.cpp
+++ b/tools/KitClient.cpp
@@ -79,6 +79,8 @@ extern "C"
 CASE(INVALIDATE_HEADER);
 CASE(CELL_ADDRESS);
 CASE(RULER_UPDATE);
+CASE(DIALOG);
+CASE(DIALOG_CHILD);
 #undef CASE
 }
 std::cout << " payload: " << payload << std::endl;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/svtools solenv/clang-format svtools/Library_svt.mk svtools/source

2017-11-15 Thread Caolán McNamara
 include/svtools/toolpanelopt.hxx   |   70 -
 solenv/clang-format/blacklist  |2 
 svtools/Library_svt.mk |1 
 svtools/source/config/toolpanelopt.cxx |  388 -
 4 files changed, 461 deletions(-)

New commits:
commit b2f2070ab6c1c4cf775e3f6cc6ef4a35cc7d7cc7
Author: Caolán McNamara 
Date:   Wed Nov 15 15:38:23 2017 +

drop now unused ToolPanelOpt

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

diff --git a/include/svtools/toolpanelopt.hxx b/include/svtools/toolpanelopt.hxx
deleted file mode 100644
index 1d2e957972e4..
--- a/include/svtools/toolpanelopt.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 .
- */
-
-#ifndef INCLUDED_SVTOOLS_TOOLPANELOPT_HXX
-#define INCLUDED_SVTOOLS_TOOLPANELOPT_HXX
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-class SvtToolPanelOptions_Impl;
-
-/** collect information about sidebar group
-
-\attention This class is partially threadsafe.
-*/
-class SVT_DLLPUBLIC SvtToolPanelOptions: public utl::detail::Options
-{
-public:
-SvtToolPanelOptions();
-virtual ~SvtToolPanelOptions() override;
-
-bool GetVisibleImpressView() const;
-void SetVisibleImpressView( bool bVisible );
-bool GetVisibleOutlineView() const;
-void SetVisibleOutlineView( bool bVisible );
-bool GetVisibleNotesView() const;
-void SetVisibleNotesView( bool bVisible );
-bool GetVisibleHandoutView() const;
-void SetVisibleHandoutView( bool bVisible );
-bool GetVisibleSlideSorterView() const;
-void SetVisibleSlideSorterView( bool bVisible );
-
-
-private:
-/** return a reference to a static mutex
-
-These class is partially threadsafe (for de-/initialization only).
-All access methods are'nt safe!
-We create a static mutex only for one ime and use at different 
times.
-
-\return A reference to a static mutex member.*/
-SVT_DLLPRIVATE static ::osl::Mutex& GetInitMutex();
-
-private:
-std::shared_ptr m_pImpl;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 0dbcf0ef3b04..4916f26ba6de 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7200,7 +7200,6 @@ include/svtools/templatefoldercache.hxx
 include/svtools/textwindowpeer.hxx
 include/svtools/toolbarmenu.hxx
 include/svtools/toolboxcontroller.hxx
-include/svtools/toolpanelopt.hxx
 include/svtools/transfer.hxx
 include/svtools/treelist.hxx
 include/svtools/treelistbox.hxx
@@ -14000,7 +13999,6 @@ svtools/source/config/optionsdrawinglayer.cxx
 svtools/source/config/printoptions.cxx
 svtools/source/config/slidesorterbaropt.cxx
 svtools/source/config/test/test.cxx
-svtools/source/config/toolpanelopt.cxx
 svtools/source/contnr/DocumentInfoPreview.cxx
 svtools/source/contnr/contentenumeration.cxx
 svtools/source/contnr/contentenumeration.hxx
diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk
index 8ac7f495c0a2..263d2646b910 100644
--- a/svtools/Library_svt.mk
+++ b/svtools/Library_svt.mk
@@ -85,7 +85,6 @@ $(eval $(call gb_Library_add_exception_objects,svt,\
 svtools/source/config/menuoptions \
 svtools/source/config/miscopt \
 svtools/source/config/slidesorterbaropt \
-svtools/source/config/toolpanelopt \
 svtools/source/config/optionsdrawinglayer \
 svtools/source/config/printoptions \
 svtools/source/contnr/DocumentInfoPreview \
diff --git a/svtools/source/config/toolpanelopt.cxx 
b/svtools/source/config/toolpanelopt.cxx
deleted file mode 100644
index eba249e99a61..
--- a/svtools/source/config/toolpanelopt.cxx
+++ /dev/null
@@ -1,388 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice pr

[Libreoffice-commits] core.git: sd/Library_sd.mk sd/source

2017-11-15 Thread Caolán McNamara
 sd/Library_sd.mk  |1 
 sd/source/ui/framework/module/ImpressModule.cxx   |1 
 sd/source/ui/framework/module/ToolPanelModule.cxx |   88 --
 sd/source/ui/framework/module/ToolPanelModule.hxx |   52 -
 4 files changed, 142 deletions(-)

New commits:
commit 83111eda2e441f288201aac5cc21cf179744947f
Author: Caolán McNamara 
Date:   Wed Nov 15 15:32:20 2017 +

remove now unused ToolPanelModule

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

diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index ecaf83587f26..ae4592e340f3 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -250,7 +250,6 @@ $(eval $(call gb_Library_add_exception_objects,sd,\
sd/source/ui/framework/module/ShellStackGuard \
sd/source/ui/framework/module/SlideSorterModule \
sd/source/ui/framework/module/ToolBarModule \
-   sd/source/ui/framework/module/ToolPanelModule \
sd/source/ui/framework/module/ViewTabBarModule \
sd/source/ui/framework/tools/FrameworkHelper \
sd/source/ui/func/bulmaper \
diff --git a/sd/source/ui/framework/module/ImpressModule.cxx 
b/sd/source/ui/framework/module/ImpressModule.cxx
index bf2ee2472c93..3b62e17ae380 100644
--- a/sd/source/ui/framework/module/ImpressModule.cxx
+++ b/sd/source/ui/framework/module/ImpressModule.cxx
@@ -23,7 +23,6 @@
 #include "ViewTabBarModule.hxx"
 #include "CenterViewFocusModule.hxx"
 #include "SlideSorterModule.hxx"
-#include "ToolPanelModule.hxx"
 #include "ToolBarModule.hxx"
 #include "ShellStackGuard.hxx"
 
diff --git a/sd/source/ui/framework/module/ToolPanelModule.cxx 
b/sd/source/ui/framework/module/ToolPanelModule.cxx
deleted file mode 100644
index ab8d6fc25430..
--- a/sd/source/ui/framework/module/ToolPanelModule.cxx
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 .
- */
-
-#include "ToolPanelModule.hxx"
-
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-
-using namespace ::com::sun::star;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::drawing::framework;
-
-using ::sd::framework::FrameworkHelper;
-
-namespace sd { namespace framework {
-
-//= ToolPanelModule ==
-
-ToolPanelModule::ToolPanelModule (
-const Reference& rxController,
-const OUString& rsSidebarPaneURL)
-: ResourceManager(rxController,
-FrameworkHelper::CreateResourceId(FrameworkHelper::msSidebarViewURL, 
rsSidebarPaneURL))
-{
-if (mxConfigurationController.is())
-{
-if (SvtToolPanelOptions().GetVisibleImpressView())
-AddActiveMainView(FrameworkHelper::msImpressViewURL);
-if (SvtToolPanelOptions().GetVisibleOutlineView())
-AddActiveMainView(FrameworkHelper::msOutlineViewURL);
-if (SvtToolPanelOptions().GetVisibleNotesView())
-AddActiveMainView(FrameworkHelper::msNotesViewURL);
-if (SvtToolPanelOptions().GetVisibleHandoutView())
-AddActiveMainView(FrameworkHelper::msHandoutViewURL);
-if (SvtToolPanelOptions().GetVisibleSlideSorterView())
-AddActiveMainView(FrameworkHelper::msSlideSorterURL);
-
-mxConfigurationController->addConfigurationChangeListener(
-this,
-FrameworkHelper::msResourceActivationEvent,
-Any());
-}
-}
-
-ToolPanelModule::~ToolPanelModule()
-{
-}
-
-void ToolPanelModule::SaveResourceState()
-{
-
SvtToolPanelOptions().SetVisibleImpressView(IsResourceActive(FrameworkHelper::msImpressViewURL));
-
SvtToolPanelOptions().SetVisibleOutlineView(IsResourceActive(FrameworkHelper::msOutlineViewURL));
-
SvtToolPanelOptions().SetVisibleNotesView(IsResourceActive(FrameworkHelper::msNotesViewURL));
-
SvtToolPanelOptions().SetVisibleHandoutView(IsResourceActive(FrameworkHelper::msHandoutViewURL));
-
SvtToolPanelOptions().SetVisibleSlideSorterView(IsResourceActive

Minutes of design meeting 2017-Nov-15

2017-11-15 Thread Heiko Tietze
Present: Adolfo, Csogor, Thomas, Heiko, Jay, Stuart

 * Set page orientation automatically depending on user settings
   + https://bugs.documentfoundation.org/show_bug.cgi?id=106890
   + WFM (Heiko, Adolfo)
   + Possible flickers (Adolfo)
   + Go with the proposal (Jay, Csogor)
   + delete radio buttons and have a button to toggle as Csogor proposed, same 
in sidebar (Thomas)
   + make sure to be compatible with ODF (Stuart)
   + issue in sidebar with user defined values (Tomaz), 
 should be fixed with the change (Stuart)
   => Go with a patch

 * Set background image (to all slides)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=112650
   + drop the dialog, e.g. never apply to all pages (Jay)
   + supposed workflow to place an image on all slides is per master slides
   + introduce a checkbox "add to all slide" in insert image dialog (Adolfo, 
Thomas, Jay)
   => 100% agreement

 * Adjust zoom level depending on sidebar on/off
   + https://bugs.documentfoundation.org/show_bug.cgi?id=95337
   + open to all solutions, even WF is okay (Jay)
   + go with 'fit to width' (Cor) - involves user action (Adolfo)
   + consider toolbars vertically, navigator horizontally tech. challenging 
(Stuart)
   + zoom is also an a11y feature for visually impaired people, so better no 
automatic change (Thomas)
   => agreement on WONTFIX

 * SVG application icons clean-up
   + https://bugs.documentfoundation.org/show_bug.cgi?id=98141
   + not much benefit (Heiko)
   + may improve on performance (Adolfo)
   => add 24, 64, 96px
   AI: Andreas

 * Same labels in Draw/Impress
  + https://bugs.documentfoundation.org/show_bug.cgi?id=76332
  + ticket not actionable but relevant
  + many issues have been fixed (Jay)
  => WFM (and file new tickets where needed diff between draw & impress)

 * Text is not shown behind frame set to 'Wrap Through' and with fill set to 
None
  + https://bugs.documentfoundation.org/show_bug.cgi?id=71920
  + setting a color and transparency none for frames (Heiko)
  + text frames have a different use case and take the color of the background 
(Jay)
  + Shapes and frames are different type of objects (Stuart)
  + Frames should be 100% transparent with None color by default (Regina)
  + Frames should have no color and no transparancy by default, same as text 
frames -> results in transparent background (Thomas)
  + will break older docs and the new behaviour needs carefully documentation 
(Adolfo, Jay)
  => change behavior of Frames to show transparent by default with None fill, 
likely not an easyhack



signature.asc
Description: OpenPGP digital signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 45 commits - comphelper/source desktop/inc desktop/qa desktop/source include/comphelper include/LibreOfficeKit include/sal include/sf

2017-11-15 Thread Jan Holesovsky
 comphelper/source/misc/lok.cxx  |   12 
 desktop/inc/lib/init.hxx|4 
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   47 
 desktop/source/lib/init.cxx |  296 +
 include/LibreOfficeKit/LibreOfficeKit.h |   63 
 include/LibreOfficeKit/LibreOfficeKit.hxx   |  117 
 include/LibreOfficeKit/LibreOfficeKitEnums.h|   24 
 include/comphelper/lok.hxx  |4 
 include/sal/log-areas.dox   |1 
 include/sfx2/lokhelper.hxx  |4 
 include/vcl/IDialogRenderable.hxx   |   59 
 include/vcl/ctrl.hxx|2 
 include/vcl/dialog.hxx  |   25 
 include/vcl/floatwin.hxx|1 
 libreofficekit/Executable_gtktiledviewer.mk |   27 
 libreofficekit/README   |4 
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 2295 
--
 libreofficekit/qa/gtktiledviewer/gtv-application-window.cxx |  471 ++
 libreofficekit/qa/gtktiledviewer/gtv-application-window.hxx |  114 
 libreofficekit/qa/gtktiledviewer/gtv-application.cxx|  157 
 libreofficekit/qa/gtktiledviewer/gtv-application.hxx|   42 
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx|  220 
 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.hxx|   58 
 libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.cxx   |  112 
 libreofficekit/qa/gtktiledviewer/gtv-comments-sidebar.hxx   |   48 
 libreofficekit/qa/gtktiledviewer/gtv-helpers.cxx|  170 
 libreofficekit/qa/gtktiledviewer/gtv-helpers.hxx|   47 
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx |  683 ++
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.hxx |   50 
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.cxx |  408 +
 libreofficekit/qa/gtktiledviewer/gtv-lokdocview-signal-handlers.hxx |   36 
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.cxx   |  307 +
 libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.hxx   |   58 
 libreofficekit/qa/gtktiledviewer/gtv-main.cxx   |   19 
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.cxx|  767 +++
 libreofficekit/qa/gtktiledviewer/gtv-signal-handlers.hxx|   68 
 libreofficekit/qa/gtktiledviewer/gtv.ui |  761 +++
 libreofficekit/source/gtk/lokdocview.cxx|   99 
 sc/qa/unit/screenshots/screenshots.cxx  |2 
 sfx2/source/dialog/basedlgs.cxx |5 
 sfx2/source/view/lokhelper.cxx  |   38 
 sw/inc/unotxdoc.hxx |   19 
 sw/source/uibase/uno/unotxdoc.cxx   |  196 
 vcl/Library_vcl.mk  |2 
 vcl/source/app/IDialogRenderable.cxx|   22 
 vcl/source/app/ITiledRenderable.cxx |   22 
 vcl/source/control/ctrl.cxx |   31 
 vcl/source/gdi/virdev.cxx   |   10 
 vcl/source/window/debugevent.cxx|3 
 vcl/source/window/dialog.cxx|  163 
 vcl/source/window/floatwin.cxx  |   29 
 51 files changed, 5774 insertions(+), 2448 deletions(-)

New commits:
commit ab54d2213915ac48873e6952617cf0b23107dce3
Author: Jan Holesovsky 
Date:   Thu Sep 14 09:23:46 2017 +0200

[API CHANGE] lok: Don't use 'bool' and 'uint64_t' in the stable API.

This is a f70e0ec6b3c61a7c7caa469949b0ac8016c89854 follow-up.

Change-Id: I4acf00a6da85ed14be4ed0ca20d541a9441736e7
Reviewed-on: https://gerrit.libreoffice.org/42266
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 78688ddc4e8c..88d5201ea123 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1286,7 +1286,7 @@ static void doc_destroy(LibreOfficeKitDocument *pThis)
 static voidlo_destroy   (LibreOfficeKit* pThis);
 static int lo_initialize(LibreOfficeKit* pThis, const 
char* pInstallPath, const char* pUserProfilePath);
 static LibreOfficeKitDocument* lo_documentLoad  (LibreOfficeKit* pThis, const 
c

Trying to avoid oosplash

2017-11-15 Thread Jens Tröger
Hello,

I am starting an office instance like so:

  $ soffice -env:UserInstallation=file:///tmp/tmp62a2frgk/profile 
--accept=pipe,name=soffice-pipe;urp;StarOffice.ServiceManager --headless 
--invisible --nologo

and always do I see two processes:

  /usr/lib64/libreoffice/program/oosplash
  /usr/lib64/libreoffice/program/soffice.bin

I thought that --nologo avoids the splash?  How can I avoid that splash,
and what exactly does it do?

Cheers,
Jens

-- 
Jens Tröger
http://savage.light-speed.de/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - config.guess config.sub instsetoo_native/inc_openoffice

2017-11-15 Thread Matthias Seidel
 config.guess   |  773 
--
 config.sub |  391 +++--
 instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt  |4 
 instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt |2 
 4 files changed, 624 insertions(+), 546 deletions(-)

New commits:
commit 9f84f56c9103c1228cd09dbb83395dbac2a8f52c
Author: Matthias Seidel 
Date:   Wed Nov 15 17:24:08 2017 +

Removed unused (and invisible) field for serial number from Windows 
installer

diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt 
b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
index de216916aaab..88b8c9fb804e 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
@@ -45,7 +45,7 @@ CustomerInformation   BackPushButton  164 243 
66  17  3   OOO_CONTROL_32  Next
 CustomerInformationBanner  Bitmap  0   0   374 44  1   
BannerBmp   
 CustomerInformationBannerLine  Line0   44  376 0   
1   
 CustomerInformationCancel  PushButton  301 243 66  17  
3   OOO_CONTROL_35  NameLabel   
-CustomerInformationCompanyEdit Edit21  100 249 17  
3   COMPANYNAME OOO_CONTROL_36  SerialLabel 
+CustomerInformationCompanyEdit Edit21  100 249 17  
3   COMPANYNAME OOO_CONTROL_36  RadioGroup  
 CustomerInformationCompanyLabelText21  89  75  10  
3   OOO_CONTROL_37  CompanyEdit 
 CustomerInformationDlgDesc Text21  23  249 25  65539   
OOO_CONTROL_38  
 CustomerInformationDlgLine Line0   234 376 0   1   

@@ -55,8 +55,6 @@ CustomerInformation   NameEditEdit21  63  
249 17  3   USERNAMEOOO_CONTROL_41  Company
 CustomerInformationNameLabel   Text21  52  75  10  
3   OOO_CONTROL_42  NameEdit
 CustomerInformationNextPushButton  230 243 66  17  
3   OOO_CONTROL_43  Cancel  
 CustomerInformationRadioGroup  RadioButtonGroup63  170 
300 50  3   ApplicationUsersBack
-CustomerInformationSerialLabel Text21  127 109 10  
2   OOO_CONTROL_45  SerialNumber
-CustomerInformationSerialNumberMaskedEdit  21  138 237 
17  2   ISX_SERIALNUM   RadioGroup  
 CustomSetupBackPushButton  164 243 66  17  3   
OOO_CONTROL_46  Next
 CustomSetupBanner  Bitmap  0   0   374 44  1   
BannerBmp   
 CustomSetupBannerLine  Line0   44  376 0   1   

diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt 
b/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
index f335fb6828e1..62a057e333ff 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/ControlC.idt
@@ -7,8 +7,6 @@ CustomerInformation DlgRadioGroupText   Hide
Version9X
 CustomerInformationRadioGroup  HideNOT Privileged
 CustomerInformationRadioGroup  HideProductState > 0
 CustomerInformationRadioGroup  HideVersion9X
-CustomerInformationSerialLabel ShowSERIALNUMSHOW
-CustomerInformationSerialNumberShowSERIALNUMSHOW
 CustomSetupChangeFolderHideInstalled
 CustomSetupDetails HideInstalled
 CustomSetupInstallLabelHideInstalled
commit 69907f2b899746c4dff0879ada9388e36f5d1c56
Author: Matthias Seidel 
Date:   Wed Nov 15 17:15:16 2017 +

Updated to the latest version:

- config.guess 2017-11-07
- config.sub 2017-11-04

diff --git a/config.guess b/config.guess
index c2246a4f7f4c..31e01efec3e3 100755
--- a/config.guess
+++ b/config.guess
@@ -1,14 +1,12 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-#   Free Software Foundation, Inc.
+#   Copyright 1992-2017 Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2017-11-07'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the Li

Re: calc parallel review call minutes

2017-11-15 Thread Eike Rathke
Hi,

On Wednesday, 2017-11-15 16:10:17 +, Michael Meeks wrote:

>   Avoid SvTokenArray thrash
>   in concept ok – but need to only re-using the same type (Eike)

Fwiw, all FormulaToken::Set...() virtual dummy methods now assert(),
cherry-picked to feature/calc-parallel and also changed the one new Set
function there to assert. Didn't build with debug so don't know if
anything breaks due to that now..

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice-commits] core.git: include/svl sc/qa sc/sdi sc/source sc/uiconfig sfx2/source

2017-11-15 Thread Eike Rathke
Hi Henry,

On Tuesday, 2017-11-14 16:44:18 -0400, Henry Castro wrote:

> > Spell checking in Calc does not work this way with a global document
> > language or paragraph language, language is a cell attribute (or in-cell
> > EditEngine text portion attribute).
> 
> Indeed, after reading code they are designed to cell attribute, but I did not
> find anything to apply this, since they are not set, the cell take the global
> document language

*If* not set then it's equal to the document language.

To obtain the font/spell-checking language attribute of the current
selection (single cell, range, or multi-selection) you could use
something like this

ScTabViewShell* pTabViewShell = GetViewData()->GetViewShell();
const SfxItemSet& rAttrSet = 
pTabViewShell->GetSelectionPattern()->GetItemSet();
LanguageType nLang = static_cast(rAttrSet.Get(ATTR_FONT_LANGUAGE)).GetValue();
if (nLang == LANGUAGE_SYSTEM)
nLang = Application::GetSettings().GetLanguageTag().getLanguageType();

Note that for multiple cells the returned LanguageType may not match the
individual values if cells have different attribute values. You may want
to check if the ATTR_FONT_LANGUAGE SfxItem is actually set in the
SfxItemSet (rAttrSet.Get(ATTR_FONT_LANGUAGE).GetItemState() == 
SfxItemState::SET)
and otherwise use LANGUAGE_MULTIPLE. YMMV.

This is only the Western language attribute, if you also want CJK and
CTL (which are not used for spell-checking) check how it's done in

LanguageType ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& 
rPos )

and use pTabViewShell->GetSelectionScriptType().


To apply a new (Western) font language to the current selection use

pTabViewShell->ApplyAttr( SvxLanguageItem( nLang, ATTR_FONT_LANGUAGE));

Do not use multiple consecutive ApplyAttr() calls, to apply more than
one attribute in one go there's ApplySelectionPattern(const ScPatternAttr& 
rAttr)


Hope this helps.

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Care about Free Software, support the FSFE https://fsfe.org/support/?erack


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-11-15 Thread Tamás Zolnai
 extras/source/glade/libreoffice-catalog.xml.in |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0eb5a4daf0da5658681ec448af5bdbda6ead6455
Author: Tamás Zolnai 
Date:   Wed Nov 15 16:42:52 2017 +0100

Add ColorConfigCtrl to glade catalog

Change-Id: I8c6740bf6249f32eaeace1452073f8451d0df978
Reviewed-on: https://gerrit.libreoffice.org/44770
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/extras/source/glade/libreoffice-catalog.xml.in 
b/extras/source/glade/libreoffice-catalog.xml.in
index 85a65eaf3df1..a3f9cc6e770f 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -865,5 +865,8 @@
 
+
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/RotateFlyFrame3' - sw/source

2017-11-15 Thread Armin Le Grand
 sw/source/core/draw/dflyobj.cxx  |   11 +++---
 sw/source/core/frmedt/fefly1.cxx |   19 ++-
 sw/source/core/inc/flyfrms.hxx   |1 
 sw/source/core/inc/frame.hxx |   34 +---
 sw/source/core/layout/fly.cxx|   32 ++-
 sw/source/core/layout/wsfrm.cxx  |   64 ---
 6 files changed, 124 insertions(+), 37 deletions(-)

New commits:
commit 724a9c37c94ea3fc03b17ec9b2798db312e715f3
Author: Armin Le Grand 
Date:   Wed Nov 15 18:51:21 2017 +0100

RotateFlyFrame3: Further adaptions

Restructured TransformableSwFrame to directly re-create
last non-transformed SwFrame(s) from the SwFrameAreaDefinition
from the current Transformations, offering the untransformed
SwRect(s) now for usage.
Identified and corrected erro when FlyFrame was translated
using keyboard, the accessing method needed to adapt positon
in the transformed case.
Started to look at Contour stuff, adapted a set contour to be
correctly used by adapting it as needed in the transformed case.

Change-Id: I0d5f14958bcd6f826b9abd53f1f47b7d0bc5a0e2

diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index bc16d4712ce2..a4466f1f9085 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -1000,13 +1000,14 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef, 
const Fraction& xFact, const
 basegfx::B2DVector aScale, aTranslate;
 double fRotate, fShearX;
 aNewMat.decompose(aScale, aTranslate, fRotate, fShearX);
+const basegfx::B2DVector aAbsScale(basegfx::absolute(aScale));
 
-// create new modified OutRect
+// create new modified, but untransformed OutRect
 aOutRect = tools::Rectangle(
-basegfx::fround(aCenter.getX() - (0.5 * aScale.getX())),
-basegfx::fround(aCenter.getY() - (0.5 * aScale.getY())),
-basegfx::fround(aCenter.getX() + (0.5 * aScale.getX())),
-basegfx::fround(aCenter.getY() + (0.5 * aScale.getY(;
+basegfx::fround(aCenter.getX() - (0.5 * aAbsScale.getX())),
+basegfx::fround(aCenter.getY() - (0.5 * aAbsScale.getY())),
+basegfx::fround(aCenter.getX() + (0.5 * aAbsScale.getX())),
+basegfx::fround(aCenter.getY() + (0.5 * aAbsScale.getY(;
 
 // restore FrameAreas so that actions below not adapted to new
 // full transformations take the correct actions
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index f36eac32c09c..105689dbf848 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -368,7 +368,24 @@ void SwFEShell::SetFlyPos( const Point& rAbsPos )
 // Set an anchor starting from the absolute position for paragraph bound 
Flys
 // Anchor and new RelPos will be calculated and set by the Fly
 if ( pFly->IsFlyAtContentFrame() )
-static_cast(pFly)->SetAbsPos( rAbsPos );
+{
+if(pFly->IsFlyFreeFrame() && 
static_cast(pFly)->isTransformableSwFrame())
+{
+// RotateFlyFrame3: When we have a change and are in transformed 
state (e.g. rotation used),
+// we need to correct the absolute position (rAbsPos) which was 
created in
+// transformed coordinates to untransformed state
+TransformableSwFrame* 
pTransformableSwFrame(static_cast(pFly)->getTransformableSwFrame());
+const SwRect 
aUntransformedFrameArea(pTransformableSwFrame->getUntransformedFrameArea());
+const Point aNewAbsPos(
+rAbsPos.X() + aUntransformedFrameArea.Left() - 
pFly->getFrameArea().Left(),
+rAbsPos.Y() + aUntransformedFrameArea.Top() - 
pFly->getFrameArea().Top());
+static_cast(pFly)->SetAbsPos(aNewAbsPos);
+}
+else
+{
+static_cast(pFly)->SetAbsPos( rAbsPos );
+}
+}
 else
 {
 const SwFrame *pAnch = pFly->GetAnchorFrame();
diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 5334a0269447..eaae5b89059d 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -25,6 +25,7 @@
 
 // #i28701#
 class SwFlyAtContentFrame;
+class SwNoTextFrame;
 
 double getLocalFrameRotation_from_SwNoTextFrame(const SwNoTextFrame& 
rNoTextFrame);
 
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index c0df129946f1..cc455a995008 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -213,8 +213,8 @@ public:
 };
 
 /// RotateFlyFrame3: Helper class when you want to make your SwFrame derivate
-/// transformable. It provides some tooling to do so. To use,
-/// derive your SwFrame from it
+/// transformable. It provides some tooling to do so. To use, add as member
+/// (see e.g. SwFlyFreeFrame which uses 'std::unique_ptr< TransformableSwFrame 
>')
 class SW_DLLPUBLIC Tra

[Libreoffice-commits] core.git: include/test qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests sc/qa test/Library_subsequenttest.mk test/source

2017-11-15 Thread Jens Carl
 include/test/sheet/xscenariossupplier.hxx   |   34 +++
 qadevOOo/Jar_OOoRunner.mk   |1 
 qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv |1 
 qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier.java  |   47 
--
 sc/qa/extras/sctablesheetobj.cxx|   11 +-
 test/Library_subsequenttest.mk  |1 
 test/source/sheet/xscenariossupplier.cxx|   32 ++
 7 files changed, 75 insertions(+), 52 deletions(-)

New commits:
commit 9ccd22820d6b57393b59fe0f70b29dce71eade48
Author: Jens Carl 
Date:   Wed Nov 15 07:05:22 2017 +

tdf#45904 Move _XScenariosSupplier Java test to C++

Change-Id: I152f6358e505d7a480e157bd49613e0bb496e163
Reviewed-on: https://gerrit.libreoffice.org/44748
Tested-by: Jenkins 
Reviewed-by: Jens Carl 

diff --git a/include/test/sheet/xscenariossupplier.hxx 
b/include/test/sheet/xscenariossupplier.hxx
new file mode 100644
index ..e4a6eea11f17
--- /dev/null
+++ b/include/test/sheet/xscenariossupplier.hxx
@@ -0,0 +1,34 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#ifndef INCLUDED_TEST_SHEET_XSCENARIOSSUPPLIER_HXX
+#define INCLUDED_TEST_SHEET_XSCENARIOSSUPPLIER_HXX
+
+#include 
+#include 
+
+#include 
+
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XScenariosSupplier
+{
+public:
+virtual css::uno::Reference init() = 0;
+
+void testGetScenarios();
+
+protected:
+~XScenariosSupplier() {}
+};
+}
+
+#endif // INCLUDED_TEST_SHEET_XSCENARIOSSUPPLIER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk
index f239a22e9cfd..229bef198f03 100644
--- a/qadevOOo/Jar_OOoRunner.mk
+++ b/qadevOOo/Jar_OOoRunner.mk
@@ -610,7 +610,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\
 qadevOOo/tests/java/ifc/sheet/_XRecentFunctions \
 qadevOOo/tests/java/ifc/sheet/_XScenario \
 qadevOOo/tests/java/ifc/sheet/_XScenarioEnhanced \
-qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier \
 qadevOOo/tests/java/ifc/sheet/_XSheetAnnotationAnchor \
 qadevOOo/tests/java/ifc/sheet/_XSheetAuditing \
 qadevOOo/tests/java/ifc/sheet/_XSheetCellCursor \
diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv 
b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
index d43bdf798988..9c5a9b9fe29f 100644
--- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
+++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScTableSheetObj.csv
@@ -42,7 +42,6 @@
 
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsForbiddenRules"
 
"ScTableSheetObj";"com::sun::star::style::CharacterPropertiesAsian";"ParaIsHangingPunctuation"
 
"ScTableSheetObj";"com::sun::star::sheet::XCellRangeAddressable";"getRangeAddress()"
-"ScTableSheetObj";"com::sun::star::sheet::XScenariosSupplier";"getScenarios()"
 
"ScTableSheetObj";"com::sun::star::util::XReplaceable";"createReplaceDescriptor()"
 "ScTableSheetObj";"com::sun::star::util::XReplaceable";"replaceAll()"
 
"ScTableSheetObj";"com::sun::star::chart::XChartData";"addChartDataChangeEventListener()"
diff --git a/qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier.java 
b/qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier.java
deleted file mode 100644
index eb112c7efaa7..
--- a/qadevOOo/tests/java/ifc/sheet/_XScenariosSupplier.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 .
- */
-
-package ifc.sheet;
-
-import lib.MultiMethodTest;
-
-import com.sun.star.sheet.XScenarios;
-import com.sun.star.sheet.XScenariosSupplier;
-
-/**
-* Testing com.sun.star.sheet.XSheetAnnotationsSupplier
-* interface methods :
-* 
-*   getAnnotations()
-*  
-* @see com.sun.star.

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

2017-11-15 Thread Caolán McNamara
 sd/source/ui/framework/module/ImpressModule.cxx |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit ee82c5b96898bb73f5df6fdda7da1f04c3c375cc
Author: Caolán McNamara 
Date:   Wed Nov 15 15:01:33 2017 +

impress constantly trying to create an internal SidebarView

I think since the sidebar was integrated that this is dead
code belonging to the sidebars impress-only ancestor

Nothing creates the SidebarView[1], so attempt fails, a failed attempt
is scheduled in to try again on a configuration update timer

configuration update timer fails to load missing SidebarView
but broadcasts configuration update on each attemp

when the presenter console gets a configuration update it
refreshes its ui by loading the current slide

if the current slide has notes and those notes are long enough
to be scrolled and the user has scrolled to the end, then when the
slide is reloaded the notes are at the top again.

So presenter console notes scroll to the top after 5 seconds because
the configuration update fired, because the previous configuration
update didn't work.

This is old lady that swallowed a fly level stuff

[1] and I think its a typo here anyway and msSidebarViewURL should have
been msSidebarPaneURL

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

diff --git a/sd/source/ui/framework/module/ImpressModule.cxx 
b/sd/source/ui/framework/module/ImpressModule.cxx
index 640783c41654..bf2ee2472c93 100644
--- a/sd/source/ui/framework/module/ImpressModule.cxx
+++ b/sd/source/ui/framework/module/ImpressModule.cxx
@@ -43,9 +43,6 @@ void ImpressModule::Initialize (Reference 
const & rxControll
 new SlideSorterModule(
 rxController,
 FrameworkHelper::msLeftImpressPaneURL);
-new ToolPanelModule(
-rxController,
-FrameworkHelper::msSidebarViewURL);
 new ToolBarModule(rxController);
 new ShellStackGuard(rxController);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/calc-parallel' - formula/source

2017-11-15 Thread Eike Rathke
 formula/source/core/api/token.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0e9facd67e8460b7059e6e877195f6c4ef63e24e
Author: Eike Rathke 
Date:   Wed Nov 15 18:08:30 2017 +0100

Assert also new FormulaToken::SetDoubleType() virtual dummy

Change-Id: I4532d0329dc7cd2609bc96abba140aba3f3d36f3

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 2ed68521e720..07ff7cc59b6e 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -218,7 +218,7 @@ short FormulaToken::GetDoubleType() const
 
 void FormulaToken::SetDoubleType( short )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetDoubleType: virtual dummy 
called" );
+assert( !"virtual dummy called" );
 }
 
 svl::SharedString FormulaToken::GetString() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/calc-parallel' - formula/source

2017-11-15 Thread Eike Rathke
 formula/source/core/api/token.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit bc41b7030082e6699a4cfcad56d76ef0fb3d60a2
Author: Eike Rathke 
Date:   Wed Nov 15 17:41:05 2017 +0100

Assert all FormulaToken::Set...() virtual dummy methods

Attempting to set on a wrong token type can never be right.

Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index bba921d98539..2ed68521e720 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -181,7 +181,7 @@ sal_uInt8 FormulaToken::GetByte() const
 
 void FormulaToken::SetByte( sal_uInt8 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetByte: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 ParamClass FormulaToken::GetInForceArray() const
@@ -192,19 +192,20 @@ ParamClass FormulaToken::GetInForceArray() const
 
 void FormulaToken::SetInForceArray( ParamClass )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetInForceArray: virtual dummy 
called" );
+assert( !"virtual dummy called" );
 }
 
 double FormulaToken::GetDouble() const
 {
-// This one is worth an assert.
-assert( !"FormulaToken::GetDouble: virtual dummy called" );
+// This Get is worth an assert.
+assert( !"virtual dummy called" );
 return 0.0;
 }
 
 double & FormulaToken::GetDoubleAsReference()
 {
-SAL_WARN( "formula.core", "FormulaToken::GetDouble: virtual dummy called" 
);
+// This Get is worth an assert.
+assert( !"virtual dummy called" );
 static double fVal = 0.0;
 return fVal;
 }
@@ -228,7 +229,7 @@ svl::SharedString FormulaToken::GetString() const
 
 void FormulaToken::SetString( const svl::SharedString& )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetString: virtual dummy called" 
);
+assert( !"virtual dummy called" );
 }
 
 sal_uInt16 FormulaToken::GetIndex() const
@@ -239,7 +240,7 @@ sal_uInt16 FormulaToken::GetIndex() const
 
 void FormulaToken::SetIndex( sal_uInt16 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetIndex: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 sal_Int16 FormulaToken::GetSheet() const
@@ -250,7 +251,7 @@ sal_Int16 FormulaToken::GetSheet() const
 
 void FormulaToken::SetSheet( sal_Int16 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetSheet: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 short* FormulaToken::GetJump() const
@@ -281,7 +282,7 @@ FormulaError FormulaToken::GetError() const
 
 void FormulaToken::SetError( FormulaError )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetError: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 const ScSingleRefData* FormulaToken::GetSingleRef() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Eike Rathke
 formula/source/core/api/token.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 48dcf7837e0ac32c939a499c59aba82f97b4a612
Author: Eike Rathke 
Date:   Wed Nov 15 17:41:05 2017 +0100

Assert all FormulaToken::Set...() virtual dummy methods

Attempting to set on a wrong token type can never be right.

Change-Id: I788221505a628f40dfbb9c2ee7c92ac789529303

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 4a4126904691..04c4a203284d 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -181,7 +181,7 @@ sal_uInt8 FormulaToken::GetByte() const
 
 void FormulaToken::SetByte( sal_uInt8 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetByte: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 ParamClass FormulaToken::GetInForceArray() const
@@ -192,19 +192,20 @@ ParamClass FormulaToken::GetInForceArray() const
 
 void FormulaToken::SetInForceArray( ParamClass )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetInForceArray: virtual dummy 
called" );
+assert( !"virtual dummy called" );
 }
 
 double FormulaToken::GetDouble() const
 {
-// This one is worth an assert.
-assert( !"FormulaToken::GetDouble: virtual dummy called" );
+// This Get is worth an assert.
+assert( !"virtual dummy called" );
 return 0.0;
 }
 
 double & FormulaToken::GetDoubleAsReference()
 {
-SAL_WARN( "formula.core", "FormulaToken::GetDouble: virtual dummy called" 
);
+// This Get is worth an assert.
+assert( !"virtual dummy called" );
 static double fVal = 0.0;
 return fVal;
 }
@@ -223,7 +224,7 @@ svl::SharedString FormulaToken::GetString() const
 
 void FormulaToken::SetString( const svl::SharedString& )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetString: virtual dummy called" 
);
+assert( !"virtual dummy called" );
 }
 
 sal_uInt16 FormulaToken::GetIndex() const
@@ -234,7 +235,7 @@ sal_uInt16 FormulaToken::GetIndex() const
 
 void FormulaToken::SetIndex( sal_uInt16 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetIndex: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 sal_Int16 FormulaToken::GetSheet() const
@@ -245,7 +246,7 @@ sal_Int16 FormulaToken::GetSheet() const
 
 void FormulaToken::SetSheet( sal_Int16 )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetSheet: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 short* FormulaToken::GetJump() const
@@ -276,7 +277,7 @@ FormulaError FormulaToken::GetError() const
 
 void FormulaToken::SetError( FormulaError )
 {
-SAL_WARN( "formula.core", "FormulaToken::SetError: virtual dummy called" );
+assert( !"virtual dummy called" );
 }
 
 const ScSingleRefData* FormulaToken::GetSingleRef() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: New Defects reported by Coverity Scan for LibreOffice

2017-11-15 Thread Caolán McNamara
On Wed, 2017-11-15 at 02:55 +, scan-ad...@coverity.com wrote:
> Hi,
> 
> Please find the latest report on new defect(s) introduced to
> LibreOffice found with Coverity Scan.
> 
> 121 new defect(s) introduced to LibreOffice found with Coverity Scan.
> 19 defect(s), reported by Coverity Scan earlier, were marked fixed in
> the recent build analyzed by Coverity Scan.

Due to a tragic accident involved the rm command I had lost my usual
coverity docker image so had to create a new one, based on fedora 27,
and the latest version of coverity. Hence the exciting new status.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Impress video glitch - comments and a workaround

2017-11-15 Thread Caolán McNamara
On Mon, 2017-11-13 at 15:16 +, Mike Scott wrote:
> A minor snag is that if a video starts with a black frame, that's
> what will be seen when the slide is being laid out.
> 
> Is it reasonable to suggest for now a single-character alteration to
> the source code? At line 37 in
> libreoffice/avmedia/source/viewer/mediawindow.cxx
> 
> change
> #define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 3.0
> to
> #define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME_MEDIATIME 0.0

Yeah, it seems reasonable, I suggest going ahead and submit a patch for
that to our gerrit, you can add me on cc on that.

Maybe what we should additionally try to do is to pass an argument to
MediaWindow::grabFrame with the time to use and distinguish between the
case where we're previewing in impress edit mode in which case the
current 3.0 is a reasonable thing, vs the presentation mode where we
definitely want 0.0
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Makefile.in

2017-11-15 Thread Andrea Gelmini
 Makefile.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit deea8e0de97f0e0636b944863290423cc2db8591
Author: Andrea Gelmini 
Date:   Wed Nov 15 15:26:16 2017 +0100

Fix typo

Change-Id: Ia22202a2ce3557301ce7397f009b9b38cef3
Reviewed-on: https://gerrit.libreoffice.org/44765
Reviewed-by: Julien Nabet 
Tested-by: Julien Nabet 

diff --git a/Makefile.in b/Makefile.in
index 7dfad58cf39f..2866783d7fe0 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -354,7 +354,7 @@ ifneq ($(ENABLE_MACOSX_SANDBOX),)
 
 # Remove the gengal binary that we hardly need and the shell scripts
 # for which code signatures (stored as extended attributes) won't
-# survice upload to the App Store anyway. See
+# survive upload to the App Store anyway. See
 # 
https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201
 # We could put the shell scripts somewhere in Resources instead, but
 # no 3rd-party code that would be interested in them would look there
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


calc parallel review call minutes

2017-11-15 Thread Michael Meeks
ODT with pictures, and plain text with cryptic notes as normal =)

Calc Parallel Review call minutes 2017-11-15

Present
Dennis, Eike, Michael, Tor, Mike Kaganski
Commits
NumberFormatter (Eike)
expensive to create one of these per thread
constructing a default formatter doesn’t copy
the used-formats from the documents formatter
better to use the flag that we’re doing threaded calc
use a mutex in the GetFormatTable
otherwise don’t use a mutex.
Return the normal document formatter number pointer.
Should be faster.
Interpreter – rarely used …
final result is obtained – set number format if it was 
general.
Also not working – can’t get the cell formats through the newly 
created formatter.
Would fail for ‘IsNumber’ etc.
Concerned wrt. Ove-ruse of cell formats (Michael)
nervous about its use.
if change when calculating it is pushed through
Excel doesn’t do this.
This is now expected by users (Eike)
yes formula construction.
sc/source/core/data/formulacell.cxx
SvNumberFormatter – is the class that needs locking.
=> better to make this actually thread-safe …
started to look at the places where it is used (Dennis)
not sure why the crash happens when it is shared.
AI: add mutex’s to SvNumberFormatter (Dennis)

Avoid SvTokenArray thrash
re-using some token pointers – for string/double.
Does not work; can’t assign content to a token of a 
different type.
Should put asserts in the virtual base methods.
Huge cost of old mhu allocator, and the token re-use work.
AI: check whether we free MemoryPools en-masse (Michael)
in concept ok – but need to only re-using the same type (Eike)

Problematic pieces here – where type is different.  

AI: if ( pTargetTok && pTargetTok→type != string)  (Dennis)
then replace 
else
new token time …

GetFormatTable assert …
hit under some circumstances ? … stopped in debugger & 
continued.
Concerning → … chase that.

Propose – on by default through betas  (Michael)
and switch to experimental for RC’s (Eike)

InterpretTail – returning from deep recursion (Eike)
happens after a few hundred cells.
Recursion is stack bound; at some point we return & iterate 
over the stacked cells
and try the next bunch.
Does it still work with threaded calculation ?
Do we blow the stack here ?
Uses the RecursionHelper to see if we should do this again.
AI: need to propagate the recursion ‘ERSTART_SYS’ type thing back 
(Dennis)

ScInterpreterContext (Michael)
plan is to move stuff out of thread variables eg. vlookup cache 
and tie from here.

Patch for avoiding excessive allocations
another patch to come doing this on the ScInterpreterContext
how many ? (Eike)
around eight.
Might work.
Should be on the ScInterpreterContext indeed.
Slightly sad S/W group interpreter still wins (Michael)
“Thread the S/W interpreter” patch.

SUMPRODUCT – building Matrix’s (Michael)
Allocates a new ScMatrix each calculation
keeps track of dimensions internally (Eike)
different memory chunks if use only the 
upper-left.
Different semantics here; forces array-mode to all its 
params and sub-params
by definition.
Other functions that do this too.
sc/…/tools/ function classification – some 
force matricees
Could re-use S/W interpreter bits perhaps ?

TODO
Vlookup cache needs reconciling with the main version ideally
whenever a change in the data – all dependent vlookups must be 
re-calculated
do we do smarts with dependencies ? (Michael)
listen to the range (Eike)
when re-calculating, is the initial value we looked up 
the same ?
In this case return the cached value.
This is why we  have ‘MergeBackIntoNonThreadedData()’ fn (Tor)
Error state in TokenArr

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

2017-11-15 Thread Caolán McNamara
 sw/source/filter/ww8/docxattributeoutput.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit 41cd0bc2c4b72e1db116e27802a288b4c44ffc93
Author: Caolán McNamara 
Date:   Wed Nov 15 15:44:20 2017 +

crashtesting: assert on export of fdo59645-3.odt to docx

probably since...

commit 3f2e84b4bd0bbd936e0af845ba7cbf68cb2803d6
Date:   Tue Oct 31 23:39:26 2017 +0100

tdf#38778 Fix output of the font in DOC run

The font information should be output before field declaration.
Added unit test.

tdf#38778 DOCX output: no double output of the font info

need to also not double output the complex script font info as well
as the western and ctl info

I misread hAnsi as Asian the last time so thought CJK was already
handled, handle it for real this time

Change-Id: If57a3ca3f96a7b76f1fb8702a0d5071c0b3e5cd9
Reviewed-on: https://gerrit.libreoffice.org/44771
Reviewed-by: Serge Krot (CIB) 
Tested-by: Serge Krot (CIB) 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9ac659eba81f..98ddfcdc4ee5 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6927,6 +6927,14 @@ void DocxAttributeOutput::CharBackground( const 
SvxBrushItem& rBrush )
 
 void DocxAttributeOutput::CharFontCJK( const SvxFontItem& rFont )
 {
+if (m_pFontsAttrList && m_pFontsAttrList->hasAttribute(FSNS(XML_w, 
XML_eastAsia)))
+{
+// tdf#38778: do to fields output into DOC the font could be added 
before and after field declaration
+// that all sub runs of the field will have correct font inside.
+// For DOCX we should do not add the same font information twice in 
the same node
+return;
+}
+
 const OUString& sFontName(rFont.GetFamilyName());
 OString sFontNameUtf8 = OUStringToOString(sFontName, 
RTL_TEXTENCODING_UTF8);
 AddToAttrList( m_pFontsAttrList, FSNS( XML_w, XML_eastAsia ), 
sFontNameUtf8.getStr() );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/calc-parallel' - formula/source include/formula sc/source

2017-11-15 Thread Dennis Francis
 formula/source/core/api/token.cxx |   10 
 include/formula/token.hxx |2 +
 sc/source/core/inc/interpre.hxx   |4 +++
 sc/source/core/tool/interpr4.cxx  |   45 --
 4 files changed, 55 insertions(+), 6 deletions(-)

New commits:
commit 177c53949d6ec0a285d11a1e30514644ae9dbdf4
Author: Dennis Francis 
Date:   Wed Nov 15 21:08:44 2017 +0530

cache FormulaToken for doubles

Change-Id: Ic0b4dff6f03ef3f88bd150e798fa2d83dfb0f486

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 4a4126904691..bba921d98539 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -215,6 +215,11 @@ short FormulaToken::GetDoubleType() const
 return 0;
 }
 
+void FormulaToken::SetDoubleType( short )
+{
+SAL_WARN( "formula.core", "FormulaToken::SetDoubleType: virtual dummy 
called" );
+}
+
 svl::SharedString FormulaToken::GetString() const
 {
 SAL_WARN( "formula.core", "FormulaToken::GetString: virtual dummy called" 
);
@@ -1796,6 +1801,11 @@ short FormulaTypedDoubleToken::GetDoubleType() const
 return mnType;
 }
 
+void FormulaTypedDoubleToken::SetDoubleType( short nType )
+{
+mnType = nType;
+}
+
 bool FormulaTypedDoubleToken::operator==( const FormulaToken& r ) const
 {
 return FormulaDoubleToken::operator==( r ) && mnType == r.GetDoubleType();
diff --git a/include/formula/token.hxx b/include/formula/token.hxx
index 9b06ae48182c..3de7c761d658 100644
--- a/include/formula/token.hxx
+++ b/include/formula/token.hxx
@@ -181,6 +181,7 @@ public:
 virtual double  GetDouble() const;
 virtual double& GetDoubleAsReference();
 virtual short   GetDoubleType() const;
+virtual voidSetDoubleType( short nType );
 virtual svl::SharedString   GetString() const;
 virtual voidSetString( const svl::SharedString& rStr );
 virtual sal_uInt16  GetIndex() const;
@@ -321,6 +322,7 @@ public:
 
 virtual FormulaToken*   Clone() const override { return new 
FormulaTypedDoubleToken(*this); }
 virtual short   GetDoubleType() const override;
+virtual voidSetDoubleType( short nType ) override;
 virtual booloperator==( const FormulaToken& rToken ) const 
override;
 
 DECL_FIXEDMEMPOOL_NEWDEL_DLL( FormulaTypedDoubleToken )
diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx
index 9c754c2e9386..2ee692f1bc10 100644
--- a/sc/source/core/inc/interpre.hxx
+++ b/sc/source/core/inc/interpre.hxx
@@ -97,6 +97,7 @@ class SharedStringPool;
 }
 
 #define MAXSTACK  (4096 / sizeof(formula::FormulaToken*))
+#define TOKEN_CACHE_SIZE 8
 
 class ScTokenStack
 {
@@ -229,6 +230,8 @@ private:
 boolbMatrixFormula; // formula cell is a matrix formula
 
 VolatileType meVolatileType;
+size_t   mnTokenCachePos;
+std::vector maTokenCache;
 
 /// Merge global and document specific settings.
 void MergeCalcConfig();
@@ -395,6 +398,7 @@ private:
 sc::RangeMatrix PopRangeMatrix();
 void QueryMatrixType(const ScMatrixRef& xMat, short& rRetTypeExpr, 
sal_uLong& rRetIndexExpr);
 
+formula::FormulaToken* CreateFormulaDoubleToken( double fVal, short nFmt = 
css::util::NumberFormat::NUMBER );
 formula::FormulaToken* CreateDoubleOrTypedToken( double fVal );
 
 void PushDouble(double nVal);
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index e62610b1d50b..68ec8df0bcb8 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -731,7 +731,7 @@ void ScInterpreter::PushCellResultToken( bool 
bDisplayEmptyAsString,
 {
 TreatDoubleError( fVal);
 if (!IfErrorPushError())
-PushTempTokenWithoutError( new FormulaDoubleToken( fVal));
+PushTempTokenWithoutError( CreateFormulaDoubleToken( fVal));
 }
 else
 {
@@ -1687,7 +1687,7 @@ void ScInterpreter::QueryMatrixType(const ScMatrixRef& 
xMat, short& rRetTypeExpr
 {
 if ( xMat->IsEmptyPath( 0, 0))
 {   // result of empty FALSE jump path
-FormulaTokenRef xRes = new FormulaDoubleToken( 0.0);
+FormulaTokenRef xRes = CreateFormulaDoubleToken( 0.0);
 PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, 
xMat, xRes.get()));
 rRetTypeExpr = css::util::NumberFormat::LOGICAL;
 }
@@ -1716,7 +1716,7 @@ void ScInterpreter::QueryMatrixType(const ScMatrixRef& 
xMat, short& rRetTypeExpr
 if (nErr != FormulaError::NONE)
 xRes = new FormulaErrorToken( nErr);
 else
-xRes = new FormulaDoubleToken( nMatVal.fVal);
+xRes = CreateFormulaDoubleToken( nMatVal.fVal);
 PushTempToken( new ScMatrixFormulaCellToken(nCols, nRows, xMa

[Libreoffice-commits] core.git: configure.ac download.lst external/libmwaw

2017-11-15 Thread David Tardon
 configure.ac | 
   2 
 download.lst | 
   4 
 external/libmwaw/0001-fix-call-of-explicit-ctor.patch.1  | 
  25 +
 external/libmwaw/0001-make-MWAW_FALLTHROUGH-decl.-more-verbose-again.patch.1 | 
  46 --
 external/libmwaw/ExternalProject_libmwaw.mk  | 
   1 
 external/libmwaw/UnpackedTarball_libmwaw.mk  | 
   2 
 6 files changed, 29 insertions(+), 51 deletions(-)

New commits:
commit a3df638a0c8ec1a5a318df96760119d99d2d66dc
Author: David Tardon 
Date:   Tue Nov 14 20:07:09 2017 +0100

upload libmwaw 0.3.13

Change-Id: I9af801efd81bbe64117de52359491c05069c1947
Reviewed-on: https://gerrit.libreoffice.org/44736
Tested-by: Jenkins 
Reviewed-by: David Tardon 

diff --git a/configure.ac b/configure.ac
index 63ae44336fec..ffb1fdf0c850 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7698,7 +7698,7 @@ libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
 libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
 
 libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.1])
-libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.11])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.13])
 
 libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
 libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.7])
diff --git a/download.lst b/download.lst
index 78bac45c9514..dca14ac081be 100644
--- a/download.lst
+++ b/download.lst
@@ -158,8 +158,8 @@ export MDNSRESPONDER_SHA256SUM := 
4737cb51378377e11d0edb7bcdd1bec79cbdaa7b27ea09
 export MDNSRESPONDER_TARBALL := mDNSResponder-576.30.4.tar.gz
 export MSPUB_SHA256SUM := 
26d488527ffbb0b41686d4bab756e3e6aaeb99f88adeb169d0c16d2cde96859a
 export MSPUB_TARBALL := libmspub-0.1.2.tar.bz2
-export MWAW_SHA256SUM := 
7691a6e6e7221d61c40e3f630a8907e3e516b99a587e47d09ec53f8ac60ed1e7
-export MWAW_VERSION_MICRO := 12
+export MWAW_SHA256SUM := 
db55c728448f9c795cd71a0bb6043f6d4744e3e001b955a018a2c634981d5aea
+export MWAW_VERSION_MICRO := 13
 export MWAW_TARBALL := libmwaw-0.3.$(MWAW_VERSION_MICRO).tar.xz
 export MYSQL_CONNECTOR_CPP_SHA256SUM := 
a25f14dad39e93a2f9cdf09166ee53981f7212dce829e4208e07a522963a8585
 export MYSQL_CONNECTOR_CPP_TARBALL := 
7239a4430efd4d0189c4f24df67f08e5-mysql-connector-c++-1.1.4.tar.gz
diff --git a/external/libmwaw/0001-fix-call-of-explicit-ctor.patch.1 
b/external/libmwaw/0001-fix-call-of-explicit-ctor.patch.1
new file mode 100644
index ..2036fa869f86
--- /dev/null
+++ b/external/libmwaw/0001-fix-call-of-explicit-ctor.patch.1
@@ -0,0 +1,25 @@
+From 4bc8ec0481f89b989b0c34236c9d5d9b8038d4a9 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Wed, 15 Nov 2017 13:15:44 +0100
+Subject: [PATCH] fix call of explicit ctor
+
+---
+ src/lib/libmwaw_internal.hxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx
+index 2875a0fb..b844a9d5 100644
+--- a/src/lib/libmwaw_internal.hxx
 b/src/lib/libmwaw_internal.hxx
+@@ -1027,7 +1027,7 @@ public:
+   }
+   //! generic constructor
+   template  explicit MWAWBox2(MWAWBox2 const &p)
+-: m_data(p.min(), p.max())
++: m_data(MWAWVec2(p.min()), MWAWVec2(p.max()))
+   {
+   }
+ 
+-- 
+2.14.3
+
diff --git 
a/external/libmwaw/0001-make-MWAW_FALLTHROUGH-decl.-more-verbose-again.patch.1 
b/external/libmwaw/0001-make-MWAW_FALLTHROUGH-decl.-more-verbose-again.patch.1
deleted file mode 100644
index dbbe6bfd204c..
--- 
a/external/libmwaw/0001-make-MWAW_FALLTHROUGH-decl.-more-verbose-again.patch.1
+++ /dev/null
@@ -1,46 +0,0 @@
-From a7648cda4017551c1c97c61362eb52d95fbe68e7 Mon Sep 17 00:00:00 2001
-From: David Tardon 
-Date: Mon, 17 Jul 2017 10:43:01 +0200
-Subject: [PATCH] make MWAW_FALLTHROUGH decl. more verbose again
-
-... because older clang doesn't like the former one:
-./libmwaw_internal.hxx:122:58: error: token is not a valid binary operator in 
a preprocessor subexpression
-  ~~~^

- src/lib/libmwaw_internal.hxx | 13 -
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/src/lib/libmwaw_internal.hxx b/src/lib/libmwaw_internal.hxx
-index 4c9580d..cbf0fc0 100644
 a/src/lib/libmwaw_internal.hxx
-+++ b/src/lib/libmwaw_internal.hxx
-@@ -117,17 +117,20 @@ struct MWAW_shared_ptr_noop_deleter {
- #endif
- 
- /** fall through attributes */
--#define MWAW_FALLTHROUGH
--#if defined(__clang__)
-+#if defined(__clang__) && defined(__has_cpp_attribute)
--#  if defined(__has_cpp_attribute) && __has_cpp_attribute(clang::fallthrough)
--#undef MWAW_FALLTHROUGH
-+#  if __has_cpp_attribute(clang::fallthrough)
- #define MWAW_FALLTHROUGH [[clang::fallthrough]]
-+#  else
-+#define MWAW_FALLTHROUGH
- #  endif
- #elif defined(__GNUC__)
- #  if __GNUC__>=7
--#undef MWAW_FALLTHROUGH
--#define MWAW_FA

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

2017-11-15 Thread Stephan Bergmann
 oox/qa/unit/vba_compression.cxx |   34 +-
 1 file changed, 25 insertions(+), 9 deletions(-)

New commits:
commit e6aec5ad0a0db4f41f90b39971c296732372cadf
Author: Stephan Bergmann 
Date:   Wed Nov 15 15:13:35 2017 +0100

Don't pollute /tmp with vba_debug* files

...put them at workdir/CppunitTest/oox_vba_compression.test.user/debug/ 
instead.

Change-Id: I067a82c05e2f91969d70cb582d69c4c1de13951c

diff --git a/oox/qa/unit/vba_compression.cxx b/oox/qa/unit/vba_compression.cxx
index 6541c8517411..2c083e8a8c95 100644
--- a/oox/qa/unit/vba_compression.cxx
+++ b/oox/qa/unit/vba_compression.cxx
@@ -10,8 +10,9 @@
 #include 
 #include 
 #include 
-
+#include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -19,7 +20,6 @@
 class TestVbaCompression : public CppUnit::TestFixture
 {
 public:
-
 // just a sequence of bytes that should not be compressed at all
 void testSimple1();
 
@@ -52,6 +52,22 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 private:
+static OUString const & getDebugDirUrl() {
+struct DebugDirUrl {
+DebugDirUrl() {
+url = "$UserInstallation/debug/";
+rtl::Bootstrap::expandMacros(url);
+//TODO: provide an OUString -> OUString expansion 
function, and which throws on
+// failure
+auto e = osl::Directory::create(url);
+CPPUNIT_ASSERT_EQUAL(osl::FileBase::E_None, e);
+}
+OUString url;
+};
+static DebugDirUrl url;
+return url.url;
+}
+
 test::Directories m_directories;
 };
 
@@ -86,7 +102,7 @@ void TestVbaCompression::testSimple1()
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
 ReadFiles(aTestFile, aReference, aOutputMemoryStream,
-aReferenceMemoryStream, "/tmp/vba_debug.bin");
+aReferenceMemoryStream, getDebugDirUrl() + "vba_debug.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -108,7 +124,7 @@ void TestVbaCompression::testSimple2()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug2.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, getDebugDirUrl() + "vba_debug2.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -130,7 +146,7 @@ void TestVbaCompression::testSimple3()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug3.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, getDebugDirUrl() + "vba_debug3.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -152,7 +168,7 @@ void TestVbaCompression::testComplex1()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug_complex1.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_complex1.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -174,7 +190,7 @@ void TestVbaCompression::testSpec321()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug_spec321.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_spec321.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -196,7 +212,7 @@ void TestVbaCompression::testSpec322()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug_spec322.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, getDebugDirUrl() + "vba_debug_spec322.bin");
 
 CPPUNIT_ASSERT_EQUAL(aReferenceMemoryStream.GetSize(), 
aOutputMemoryStream.GetSize());
 
@@ -218,7 +234,7 @@ void TestVbaCompression::testSpec323()
 
 SvMemoryStream aOutputMemoryStream(4096, 4096);
 SvMemoryStream aReferenceMemoryStream(4096, 4096);
-ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryStream, "/tmp/vba_debug_spec323.bin");
+ReadFiles(aTestFile, aReference, aOutputMemoryStream, 
aReferenceMemoryS

[Libreoffice-commits] core.git: Branch 'feature/RotateFlyFrame3' - include/svx svx/source sw/source

2017-11-15 Thread Armin Le Grand
 include/svx/svdobj.hxx  |7 --
 svx/source/svdraw/svddrgmt.cxx  |   20 +-
 svx/source/svdraw/svdobj.cxx|   10 +--
 svx/source/uitest/sdrobject.cxx |   16 ++---
 sw/source/core/draw/dflyobj.cxx |  123 +++-
 sw/source/core/inc/dflyobj.hxx  |4 -
 sw/source/core/inc/frame.hxx|1 
 sw/source/core/layout/wsfrm.cxx |4 +
 8 files changed, 102 insertions(+), 83 deletions(-)

New commits:
commit d7c5d633de9a78f1b0b233393ca7fc48ad0b5130
Author: Armin Le Grand 
Date:   Wed Nov 15 13:56:38 2017 +0100

RotateFlyFrame3: Corrected interactive Crop

To correct interactive Crop in transformed states, I had to
rework some stuff involved that anyways was in a non optimal
state. Added functionality to translate the object to make
Crop seem to work more seamlessly. Some mapping was needed
to make the Croppped, transformed object to be in the correct
relative position to the uncropped, untransfomed one.

Change-Id: I67da35b4aec11d2bb195720a416dab4dbb42432a

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index cd6953312565..ae92ffa13069 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -74,10 +74,9 @@ class OutputDevice;
 class Fraction;
 
 namespace basegfx {
-
+class B2DPoint;
 class B2DPolyPolygon;
 class B2DHomMatrix;
-
 }
 
 namespace sdr
@@ -510,14 +509,14 @@ public:
 /// Nbc means "no broadcast".
 virtual void NbcMove  (const Size& rSiz);
 virtual void NbcResize(const Point& rRef, const Fraction& xFact, const 
Fraction& yFact);
-virtual void NbcCrop  (const Point& rRef, const Fraction& xFact, const 
Fraction& yFact);
+virtual void NbcCrop  (const basegfx::B2DPoint& rRef, double fxFact, 
double fyFact);
 virtual void NbcRotate(const Point& rRef, long nAngle, double sn, double 
cs);
 virtual void NbcMirror(const Point& rRef1, const Point& rRef2);
 virtual void NbcShear (const Point& rRef, long nAngle, double tn, bool 
bVShear);
 
 virtual void Move  (const Size& rSiz);
 virtual void Resize(const Point& rRef, const Fraction& xFact, const 
Fraction& yFact, bool bUnsetRelative = true);
-virtual void Crop  (const Point& rRef, const Fraction& xFact, const 
Fraction& yFact);
+virtual void Crop  (const basegfx::B2DPoint& rRef, double fxFact, double 
fyFact);
 virtual void Rotate(const Point& rRef, long nAngle, double sn, double cs);
 virtual void Mirror(const Point& rRef1, const Point& rRef2);
 virtual void Shear (const Point& rRef, long nAngle, double tn, bool 
bVShear);
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 714d4e66a334..1e3344c26410 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3766,25 +3766,17 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
 
 if(bExternal)
 {
-// With Ref point (opposed to dragged point), X scale and Y scale,
+// With aLocalStart point (opposed to dragged point), X scale and Y 
scale,
 // we call crop (virtual method) on pSdrObject which calls 
VirtFlyDrawObj
-// crop. aRef needs to be adapted to concrete Object's boundaries which
-// is different from Crop-Ranges. This is because the Graphic and it's
-// SdrObject representation is inside the FlyFrame, but not identical
-// with it.
-const tools::Rectangle& 
rOutRect(pExternalSdrObject->GetCurrentBoundRect());
-const basegfx::B2DHomMatrix aExternalTransform(
-basegfx::utils::createScaleTranslateB2DHomMatrix(
-rOutRect.getWidth(), rOutRect.getHeight(),
-rOutRect.Left(), rOutRect.Top()));
-const basegfx::B2DPoint aRef(aExternalTransform * aLocalStart);
+// crop. Use aLocalStart unchanged, so being relative to the 
Crop-Action,
+// the called instance knows best how to use it
 const double fScaleX(aRangeNewNoShearNoRotate.getWidth() / 
aRangeOriginalNoShearNoRotate.getWidth());
 const double fScaleY(aRangeNewNoShearNoRotate.getHeight() / 
aRangeOriginalNoShearNoRotate.getHeight());
 
 pExternalSdrObject->Crop(
-Point(basegfx::fround(aRef.getX()), basegfx::fround(aRef.getY())),
-Fraction(fScaleX),
-Fraction(fScaleY));
+aLocalStart,
+fScaleX,
+fScaleY);
 }
 else
 {
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index d5ef63b3c842..020c75655be8 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1485,8 +1485,10 @@ void SdrObject::Move(const Size& rSiz)
 }
 }
 
-void SdrObject::NbcCrop(const Point& /*rRef*/, const Fraction& /*xFact*/, 
const Fraction& /*yFact*/) {
-// Default: does nothing. Real behaviour in SwVirtFlyDrawObj and SdrGrafObj
+void SdrObject::NbcCrop(const basegfx::B2DPoint& /*aRef*/, double /*fxFact*/, 
double /*fyFact*/)
+{
+// Default: does nothing. R

[Libreoffice-commits] online.git: 2 commits - loleaflet/src

2017-11-15 Thread Pranav Kant
 loleaflet/src/control/Control.LokDialog.js |   41 ++---
 1 file changed, 37 insertions(+), 4 deletions(-)

New commits:
commit 35457c4cf7c9408fb5cb8736e284800fd2fa3bda
Author: Pranav Kant 
Date:   Tue Nov 14 18:47:58 2017 +0530

lokdialog: Handle 'cursor_visible' callback to hide the cursor

Change-Id: Ia4be5f1533226b493387af896812924d4bf81a72

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index d599d6a3..0914d9b6 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -35,10 +35,15 @@ L.Control.LokDialog = L.Control.extend({
var height = parseInt(rectangle[3]);
 
$('#' + e.dialogId + '-cursor').css({height: 
height});
-
// set the position of the lokdialog-cursor
$(this._dialogs[e.dialogId].cursor).css({left: 
x, top: y});
}
+   } else if (e.action === 'cursor_visible') {
+   var visible = e.visible === 'true';
+   if (visible)
+   $('#' + e.dialogId + '-cursor').css({display: 
'block'});
+   else
+   $('#' + e.dialogId + '-cursor').css({display: 
'none'});
} else if (e.action === 'close') {
this._onDialogClose(e.dialogId);
}
commit 2dcd75ccac9b4c219777c2d4e8e1859928b9c146
Author: Pranav Kant 
Date:   Mon Nov 13 17:25:47 2017 +0530

lokdialog: Blinking cursor for editing fields in dialog

Change-Id: Ib75e87134e650053dbcd5e78f9c52ea7b7fb4f98

diff --git a/loleaflet/src/control/Control.LokDialog.js 
b/loleaflet/src/control/Control.LokDialog.js
index 8460eb0d..d599d6a3 100644
--- a/loleaflet/src/control/Control.LokDialog.js
+++ b/loleaflet/src/control/Control.LokDialog.js
@@ -15,7 +15,9 @@ L.Control.LokDialog = L.Control.extend({
_dialogs: {},
 
_isOpen: function(dialogId) {
-   return $('#' + dialogId).length > 0;
+   return this._dialogs[dialogId] &&
+   this._dialogs[dialogId].open &&
+   $('#' + dialogId).length > 0;
},
 
_onDialogMsg: function(e) {
@@ -25,6 +27,18 @@ L.Control.LokDialog = L.Control.extend({
if (this._isOpen(e.dialogId)) {
this._map.sendDialogCommand(e.dialogId, 
e.rectangle);
}
+   } else if (e.action === 'cursor_invalidate') {
+   if (this._isOpen(e.dialogId) && !!e.rectangle) {
+   var rectangle = e.rectangle.split(',');
+   var x = parseInt(rectangle[0]);
+   var y = parseInt(rectangle[1]);
+   var height = parseInt(rectangle[3]);
+
+   $('#' + e.dialogId + '-cursor').css({height: 
height});
+
+   // set the position of the lokdialog-cursor
+   $(this._dialogs[e.dialogId].cursor).css({left: 
x, top: y});
+   }
} else if (e.action === 'close') {
this._onDialogClose(e.dialogId);
}
@@ -32,11 +46,21 @@ L.Control.LokDialog = L.Control.extend({
 
_openDialog: function(e) {
e.dialogId = e.dialogId.replace('.uno:', '');
-   this._dialogs[e.dialogId] = true;
+   this._dialogs[e.dialogId] = {open: true};
 
this._map.sendDialogCommand(e.dialogId);
},
 
+   _launchDialogCursor: function(dialogId) {
+   if (!this._isOpen(dialogId))
+   return;
+
+   this._dialogs[dialogId].cursor = L.DomUtil.create('div', 
'leaflet-cursor-container', L.DomUtil.get(dialogId));
+   var cursor = L.DomUtil.create('div', 'leaflet-cursor 
lokdialog-cursor', this._dialogs[dialogId].cursor);
+   cursor.id = dialogId + '-cursor';
+   L.DomUtil.addClass(cursor, 'blinking-cursor');
+   },
+
_launchDialog: function(dialogId, width, height) {
var canvas = '' +
'' +
@@ -87,7 +111,11 @@ L.Control.LokDialog = L.Control.extend({
return false;
});
 
-   this._dialogs[dialogId] = true;
+   // set the dialog's cursor
+   this._launchDialogCursor(dialogId);
+
+   if (!this._dialogs[dialogId] || !this._dialogs[dialogId].open)
+   this._dialogs[dialogId] = { open: true };
},
 
_postDialogMouseEvent: function(type, dialogid, x, y, count, buttons, 
modifier) {
@@ -195,7 +223,7 @@ L.Control.LokDialog = L.Control.extend({
_onDialogPaint: function (e) {
   

[Libreoffice-commits] core.git: include/sfx2 include/vcl sfx2/source sw/inc sw/source vcl/source

2017-11-15 Thread Pranav Kant
 include/sfx2/lokhelper.hxx|5 +++
 include/vcl/IDialogRenderable.hxx |6 +++-
 include/vcl/dialog.hxx|2 -
 sfx2/source/view/lokhelper.cxx|   14 --
 sw/inc/unotxdoc.hxx   |4 ++-
 sw/source/uibase/uno/unotxdoc.cxx |6 +++-
 vcl/source/control/edit.cxx   |   49 +-
 vcl/source/window/dialog.cxx  |   14 ++
 8 files changed, 75 insertions(+), 25 deletions(-)

New commits:
commit 43540adb76f764522344c5d66ebc63f7cb0f9c1c
Author: Pranav Kant 
Date:   Tue Nov 14 18:45:02 2017 +0530

lokdialog: Expose cursor visible status

Change the notifyDialog API a bit. Use a std::vector to keep track of
each payload item that needs to be fed to the resulting JSON.

Change-Id: If3229a88d2df5368e14290a0e80ebe6206780639
Reviewed-on: https://gerrit.libreoffice.org/44722
Reviewed-by: pranavk 
Tested-by: pranavk 

diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index b14c35fa3956..e22017c8eccc 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -10,6 +10,7 @@
 #ifndef INCLUDED_SFX2_LOKHELPER_HXX
 #define INCLUDED_SFX2_LOKHELPER_HXX
 
+#include 
 #include 
 #include 
 #include 
@@ -41,7 +42,9 @@ public:
 /// Same as notifyOtherViews(), but works on a selected "other" view, not 
on all of them.
 static void notifyOtherView(SfxViewShell* pThisView, SfxViewShell const* 
pOtherView, int nType, const OString& rKey, const OString& rPayload);
 /// Emits a LOK_CALLBACK_DIALOG
-static void notifyDialog(const OUString& rPayload, const OUString& 
rAction, const tools::Rectangle* rRect);
+static void notifyDialog(const OUString& rDialogId,
+ const OUString& rAction,
+ const std::vector& rPayload);
 /// Emits a LOK_CALLBACK_DIALOG_CHILD
 static void notifyDialogChild(const OUString& rDialogID, const OUString& 
rAction, const Point& rPos);
 /// Emits a LOK_CALLBACK_INVALIDATE_TILES, but tweaks it according to 
setOptionalFeatures() if needed.
diff --git a/include/vcl/IDialogRenderable.hxx 
b/include/vcl/IDialogRenderable.hxx
index 87630d5c2f1d..4137e960edb9 100644
--- a/include/vcl/IDialogRenderable.hxx
+++ b/include/vcl/IDialogRenderable.hxx
@@ -21,6 +21,8 @@
 namespace vcl
 {
 
+typedef std::pair LOKPayloadItem;
+
 typedef OUString DialogID;
 
 class VCL_DLLPUBLIC IDialogRenderable
@@ -45,7 +47,9 @@ public:
int nCount, int nButtons, int 
nModifier) = 0;
 
 // Callbacks
-virtual void notifyDialog(const DialogID& rDialogID, const OUString& 
rAction, const tools::Rectangle* rRect) = 0;
+virtual void notifyDialog(const DialogID& rDialogID,
+  const OUString& rAction,
+  const std::vector& rPayload = 
std::vector()) = 0;
 
 virtual void notifyDialogChild(const DialogID& rDialogID, const OUString& 
rAction, const Point& rPos) = 0;
 };
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 48ae4fec43fd..8d84aab17606 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -97,7 +97,7 @@ public:
 
 void LOKKeyInput(const KeyEvent& rKeyEvent);
 void LOKKeyUp(const KeyEvent& rKeyEvent);
-void LOKCursorInvalidate(const tools::Rectangle& rRect);
+void LOKCursor(const OUString& rAction, const 
std::vector& rPayload);
 
 protected:
 explicitDialog( WindowType nType );
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 633e221e4f86..33464711852f 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -144,7 +144,9 @@ void SfxLokHelper::notifyOtherViews(SfxViewShell* 
pThisView, int nType, const OS
 }
 }
 
-void SfxLokHelper::notifyDialog(const OUString& rDialogID, const OUString& 
rAction, const tools::Rectangle* rRect)
+void SfxLokHelper::notifyDialog(const OUString& rDialogID,
+const OUString& rAction,
+const std::vector& 
rPayload)
 {
 if (SfxLokHelper::getViewsCount() <= 0 || rDialogID.isEmpty())
 return;
@@ -152,9 +154,15 @@ void SfxLokHelper::notifyDialog(const OUString& rDialogID, 
const OUString& rActi
 SfxViewShell* pViewShell = SfxViewShell::GetFirst();
 OString aPayload = OString("{ \"dialogId\": \"") + 
OUStringToOString(rDialogID, RTL_TEXTENCODING_UTF8).getStr() + OString("\"");
 aPayload += OString(", \"action\": \"") + OUStringToOString(rAction, 
RTL_TEXTENCODING_UTF8).getStr() + OString("\"");
-if (!rAction.isEmpty() && rRect && !rRect->IsEmpty())
-aPayload += OString(", \"rectangle\": \"") + rRect->toString() + 
OString("\"");
 
+for (const auto& rItem: rPayload)
+{
+if (!rItem.first.isEmpty() && !rItem.second.isEmpty())
+{
+aPayload += OString(", \"") + rItem.first + OString("\": \"") +
+rI

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

2017-11-15 Thread Pranav Kant
 include/vcl/dialog.hxx   |1 +
 vcl/headless/svpinst.cxx |2 +-
 vcl/source/control/edit.cxx  |   14 ++
 vcl/source/window/dialog.cxx |   10 ++
 4 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit a088f9e729084f950ee58afb8f80e64d4d134144
Author: Pranav Kant 
Date:   Tue Nov 14 16:00:57 2017 +0530

lokdialog: Callback for dialog cursor invalidation

Change-Id: Iecadb68737ed7b1a425d9ea633976fb24d1055c6
Reviewed-on: https://gerrit.libreoffice.org/44721
Tested-by: Jenkins 
Reviewed-by: pranavk 

diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx
index 92d9138e3e8f..48ae4fec43fd 100644
--- a/include/vcl/dialog.hxx
+++ b/include/vcl/dialog.hxx
@@ -97,6 +97,7 @@ public:
 
 void LOKKeyInput(const KeyEvent& rKeyEvent);
 void LOKKeyUp(const KeyEvent& rKeyEvent);
+void LOKCursorInvalidate(const tools::Rectangle& rRect);
 
 protected:
 explicitDialog( WindowType nType );
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index e20592b51b67..9912186c729c 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -266,7 +266,7 @@ bool SvpSalInstance::DoYield(bool bWait, bool 
bHandleAllCurrentEvents)
 {
 // first, process current user events
 bool bEvent = DispatchUserEvents( bHandleAllCurrentEvents );
-if ( !bHandleAllCurrentEvents &&bEvent )
+if ( !bHandleAllCurrentEvents && bEvent )
 return true;
 
 bEvent = CheckTimeout() || bEvent;
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8edf98b274e1..cf8a153ee256 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -17,6 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
 #include 
 #include 
 #include 
@@ -1143,6 +1145,18 @@ void Edit::ImplShowCursor( bool bOnlyIfVisible )
 pCursor->SetSize( Size( nCursorWidth, nTextHeight ) );
 pCursor->Show();
 }
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+const long X = GetOutOffXPixel() + pCursor->GetPos().X();
+const long Y = GetOutOffYPixel() + pCursor->GetPos().Y();
+if (nCursorWidth == 0)
+nCursorWidth = 2;
+const tools::Rectangle aRect(Point(X, Y), Size(nCursorWidth, 
pCursor->GetHeight()));
+Dialog* pParentDlg = GetParentDialog();
+if (pParentDlg)
+pParentDlg->LOKCursorInvalidate(aRect);
+}
 }
 
 void Edit::ImplAlign()
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index a409bdc6e126..8e6d5f101012 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -1015,6 +1015,16 @@ void Dialog::LOKKeyUp(const KeyEvent& rKeyEvent)
 ImplWindowFrameProc(this, SalEvent::ExternalKeyUp, &rKeyEvent);
 }
 
+void Dialog::LOKCursorInvalidate(const tools::Rectangle& aRect)
+{
+assert(comphelper::LibreOfficeKit::isActive());
+
+if (!comphelper::LibreOfficeKit::isDialogPainting() && mpDialogRenderable 
&& !maID.isEmpty())
+{
+mpDialogRenderable->notifyDialog(maID, "cursor_invalidate", &aRect);
+}
+}
+
 void Dialog::ensureRepaint()
 {
 // ensure repaint
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/uiconfig sd/uiconfig sw/uiconfig

2017-11-15 Thread andreas kainz
 sc/uiconfig/scalc/ui/notebookbar.ui|   40 ++--
 sd/uiconfig/simpress/ui/notebookbar.ui |   31 +++---
 sw/uiconfig/swriter/ui/notebookbar.ui  |   54 +
 3 files changed, 104 insertions(+), 21 deletions(-)

New commits:
commit 8aa381f8a15a37017ce8b3d01387214125e35b93
Author: andreas kainz 
Date:   Wed Nov 15 12:05:06 2017 +0100

tdf#108144: tabbed notebookbar add margins to seperators

Change-Id: I374873eed5e89c0788869150187219078d22f986
Reviewed-on: https://gerrit.libreoffice.org/44757
Tested-by: Jenkins 
Reviewed-by: andreas_kainz 

diff --git a/sc/uiconfig/scalc/ui/notebookbar.ui 
b/sc/uiconfig/scalc/ui/notebookbar.ui
index 5eddae38f8a9..283b9fc6d3d8 100644
--- a/sc/uiconfig/scalc/ui/notebookbar.ui
+++ b/sc/uiconfig/scalc/ui/notebookbar.ui
@@ -128,11 +128,6 @@
 False
 sfx2/res/placeholder.png
   
-  
-True
-False
-cmd/lc_signature.png
-  
   
 True
 False
@@ -158,6 +153,11 @@
 False
 cmd/lc_sendtoback.png
   
+  
+True
+False
+cmd/lc_signature.png
+  
   
 True
 False
@@ -499,6 +499,7 @@
   
 False
 True
+6
 3
   
 
@@ -667,7 +668,7 @@
 Specify the 
borders of the selected cells.
 start
 .uno:SetBorderStyle
-toolbutton1
+toolbutton1
 True
   
   
@@ -884,6 +885,7 @@
   
 False
 True
+6
 0
   
 
@@ -1214,8 +1216,8 @@
 
   
 True
-center
 False
+center
 
   
 True
@@ -1229,6 +1231,7 @@
   
 False
 True
+6
 0
   
 
@@ -1380,14 +1383,15 @@
   
 False
 True
+6
 0
   
 
 
   
 True
-center
 False
+center
 vertical
 
   
@@ -1446,8 +1450,8 @@
 
   
 True
-center
 False
+center
 
   
 True
@@ -1461,6 +1465,7 @@
   
 False
 True
+6
 0
   
 
@@ -1596,14 +1601,15 @@
   
 False
 True
+6
 0
   
 
 
   
 True
-center
 False
+center
 vertical
 
   
@@ -1720,6 +1726,7 @@
   
 False
 True
+6
 1
   
 
@@ -1822,6 +1829,7 @@
   
 False
 True
+6
 5
   
 
@@ -1965,6 +1973,7 @@
   
 False
 True
+6
 0
   
 
@@ -2133,6 +2142,7 @@
   
 False
 True
+6
 2
   
 
@@ -2295,6 +2305,7 @@
   
 False
 True
+6
 2
   
 
@@ -2340,6 +2351,7 @@
   
   

[Libreoffice-commits] core.git: Branch 'feature/calc-parallel' - 5 commits - include/tools sal/rtl sc/inc sc/source tools/source

2017-11-15 Thread Dennis Francis
 include/tools/cpuid.hxx  |1 
 sal/rtl/alloc_global.cxx |2 
 sc/inc/tokenarray.hxx|1 
 sc/inc/types.hxx |1 
 sc/source/core/data/formulacell.cxx  |   27 ++-
 sc/source/core/tool/formulagroup.cxx |  299 ---
 sc/source/core/tool/token.cxx|   31 ++-
 tools/source/misc/cpuid.cxx  |   11 +
 8 files changed, 268 insertions(+), 105 deletions(-)

New commits:
commit 8d76f0b2e9eb528101cf3221d13de69dd880c72f
Author: Dennis Francis 
Date:   Wed Nov 15 17:09:08 2017 +0530

halve thread count if HT active for group interpreter too

Change-Id: Iacc93122191152183127500a4172358a14e96c8b

diff --git a/sc/source/core/data/formulacell.cxx 
b/sc/source/core/data/formulacell.cxx
index 1159814783d2..16478302 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -49,6 +49,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -4364,6 +4365,8 @@ bool ScFormulaCell::InterpretFormulaGroup()
 return false;
 }
 
+static bool bHyperThreadingActive = tools::cpuid::hasHyperThreading();
+
 // Then do the threaded calculation
 
 class Executor : public comphelper::ThreadTask
@@ -4411,6 +4414,9 @@ bool ScFormulaCell::InterpretFormulaGroup()
 comphelper::ThreadPool& 
rThreadPool(comphelper::ThreadPool::getSharedOptimalPool());
 sal_Int32 nThreadCount = rThreadPool.getWorkerCount();
 
+if ( bHyperThreadingActive && nThreadCount >= 2 )
+nThreadCount /= 2;
+
 SAL_INFO("sc.threaded", "Running " << nThreadCount << " threads");
 
 {
commit c0f596e5e0f9589e70052a95a90f88e8e2023532
Author: Dennis Francis 
Date:   Wed Nov 15 16:52:44 2017 +0530

Disable custom allocator

This has big positive effect on software interpreter threading
performance scaling.

Change-Id: I8fbb6bf8f7ed410fd53278acee63bf65f13bac38

diff --git a/sal/rtl/alloc_global.cxx b/sal/rtl/alloc_global.cxx
index 3d74287bc7e5..47643f3ea74a 100644
--- a/sal/rtl/alloc_global.cxx
+++ b/sal/rtl/alloc_global.cxx
@@ -35,7 +35,7 @@ AllocMode alloc_mode = AllocMode::UNSET;
 static void determine_alloc_mode()
 {
 assert(alloc_mode == AllocMode::UNSET);
-alloc_mode = (getenv("G_SLICE") == nullptr ? AllocMode::CUSTOM : 
AllocMode::SYSTEM);
+alloc_mode = AllocMode::SYSTEM;
 }
 
 static const sal_Size g_alloc_sizes[] =
commit 02af02d4f576ead19633e52c83463f5bdea8ea9b
Author: Dennis Francis 
Date:   Wed Nov 15 16:37:45 2017 +0530

halve the number of threads if HT is active

added hasHyperThreading() function to tools::cpuid
to detect hyperthreading.

Change-Id: I13fab4b6c649e681c329b7e3f4c9f36bda879d84

diff --git a/include/tools/cpuid.hxx b/include/tools/cpuid.hxx
index d7aa07d54258..419d05714ae4 100644
--- a/include/tools/cpuid.hxx
+++ b/include/tools/cpuid.hxx
@@ -25,6 +25,7 @@ namespace tools
 namespace cpuid
 {
 TOOLS_DLLPUBLIC bool hasSSE2();
+TOOLS_DLLPUBLIC bool hasHyperThreading();
 }
 }
 
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 7be68231..e77554d89805 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -299,6 +300,7 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& 
rDoc, const ScAddres
 // The caller must ensure that the top position is the start position of
 // the group.
 
+static bool bHyperThreadingActive = tools::cpuid::hasHyperThreading();
 ScAddress aTmpPos = rTopPos;
 std::vector aResults(xGroup->mnLength);
 
@@ -335,6 +337,9 @@ bool FormulaGroupInterpreterSoftware::interpret(ScDocument& 
rDoc, const ScAddres
 comphelper::ThreadPool& 
rThreadPool(comphelper::ThreadPool::getSharedOptimalPool());
 sal_Int32 nThreadCount = rThreadPool.getWorkerCount();
 
+if ( bHyperThreadingActive && nThreadCount >= 2 )
+nThreadCount /= 2;
+
 SCROW nLen = xGroup->mnLength;
 SCROW nBatchSize = nLen / nThreadCount;
 if (nLen < nThreadCount)
diff --git a/tools/source/misc/cpuid.cxx b/tools/source/misc/cpuid.cxx
index 1518dfc175c4..e3ba82dffda5 100644
--- a/tools/source/misc/cpuid.cxx
+++ b/tools/source/misc/cpuid.cxx
@@ -16,8 +16,6 @@ namespace tools
 namespace cpuid
 {
 
-#if defined(LO_SSE2_AVAILABLE)
-
 namespace
 {
 #if defined(_MSC_VER)
@@ -35,6 +33,8 @@ void getCpuId(uint32_t array[4])
 #endif
 }
 
+#if defined(LO_SSE2_AVAILABLE)
+
 bool hasSSE2()
 {
 uint32_t cpuInfoArray[] = {0, 0, 0, 0};
@@ -48,6 +48,13 @@ bool hasSSE2() { return false; }
 
 #endif
 
+bool hasHyperThreading()
+{
+uint32_t cpuInfoArray[] = {0, 0, 0, 0};
+getCpuId(cpuInfoArray);
+return (cpuInfoArray[3] & (1 << 28)) != 0;
+}
+
 }
 }
 
commit 198ebcdc33de035f3f1a5d8cec7e7c50e7ef6

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

2017-11-15 Thread Henry Castro
 framework/source/uielement/langselectionstatusbarcontroller.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 5f3216b952a1203af3c2c7c4ff88484f05427da8
Author: Henry Castro 
Date:   Wed Nov 15 00:02:49 2017 -0400

sc: disable context menu of the language status bar item

Change-Id: Ifa4de8abff37179aca57b3890337f2475e5775eb
Reviewed-on: https://gerrit.libreoffice.org/44745
Tested-by: Jenkins 
Reviewed-by: Henry Castro 

diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx 
b/framework/source/uielement/langselectionstatusbarcontroller.cxx
index d898d10db9c5..12321574436b 100644
--- a/framework/source/uielement/langselectionstatusbarcontroller.cxx
+++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -285,7 +286,8 @@ void SAL_CALL 
LangSelectionStatusbarController::statusChanged( const FeatureStat
 if ( m_bDisposed )
 return;
 
-m_bShowMenu = true;
+const Reference xModuleManager  = ModuleManager::create( 
m_xContext );
+m_bShowMenu = xModuleManager->identify(m_xFrame) == 
"com.sun.star.text.TextDocument";
 m_nScriptType = SvtScriptType::LATIN | SvtScriptType::ASIAN | 
SvtScriptType::COMPLEX;  //set the default value
 
 if ( m_xStatusbarItem.is() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: wsd/reference.txt

2017-11-15 Thread Jan Holesovsky
 wsd/reference.txt |   10 ++
 1 file changed, 10 insertions(+)

New commits:
commit fc1680a2539c4cddc46802bb9c7436c03c7655dc
Author: Jan Holesovsky 
Date:   Wed Nov 15 13:16:08 2017 +0100

Document UserExtraInfo.

Change-Id: Ibf73b20c4ec7271579d203564fc8f4594eb6e73b

diff --git a/wsd/reference.txt b/wsd/reference.txt
index 6c07d991..cea5fbf2 100644
--- a/wsd/reference.txt
+++ b/wsd/reference.txt
@@ -73,6 +73,16 @@ EnableOwnerTermination
If set to true, it allows the document owner (the one with OwnerId =
UserId) to send a 'closedocument' message (see protocol.txt)
 
+UserExtraInfo
+   JSON object that contains additional info about the user, namely the
+   avatar image.
+
+   Example: 'UserExtraInfo' => [ 'avatar' => 'http://url/to/user/avatar', 
'mail' => 'u...@server.com' ]
+
+   Note: There is strict Content Security Policy that restricts image
+   resources (img-src), therefore the avatar URL must not violate the
+   CSP,  otherwise it will show as broken images.
+
 WatermarkText
If set to a non-empty string, is used for rendering a watermark-like
text on each tile of the document
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Noel Grandin
 xmloff/source/chart/SchXMLPlotAreaContext.cxx   |  196 +-
 xmloff/source/core/xmlexp.cxx   |  107 -
 xmloff/source/draw/XMLImageMapExport.cxx|  213 +-
 xmloff/source/draw/sdxmlexp.cxx |   35 
 xmloff/source/draw/shapeexport.cxx  | 1493 
 xmloff/source/draw/xexptran.cxx |   45 
 xmloff/source/draw/ximpshap.cxx |   81 
 xmloff/source/forms/elementimport.cxx   |  167 -
 xmloff/source/style/prstylei.cxx|  128 -
 xmloff/source/style/xmlaustp.cxx|  125 -
 xmloff/source/text/XMLFootnoteImportContext.cxx |  115 -
 xmloff/source/text/XMLIndexMarkExport.cxx   |  151 -
 xmloff/source/text/XMLIndexTOCContext.cxx   |  199 +-
 xmloff/source/text/XMLSectionSourceDDEImportContext.cxx |   41 
 xmloff/source/text/txtimp.cxx   |  145 -
 xmloff/source/text/txtparae.cxx |  117 -
 xmloff/source/text/txtstyli.cxx |  375 ++--
 17 files changed, 1880 insertions(+), 1853 deletions(-)

New commits:
commit 5f4938d89d641681346001746f3762dffcb831b4
Author: Noel Grandin 
Date:   Wed Nov 15 10:03:54 2017 +0200

loplugin:flatten in xmloff

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

diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx 
b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 9209efa07ce0..875d3468fb49 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -869,45 +869,46 @@ static void lcl_setErrorBarSequence ( const 
uno::Reference< chart2::XChartDocume
 uno::Reference< chart2::data::XDataSequence > xNewSequence(
 xDataProvider->createDataSequenceByRangeRepresentation( aRange ));
 
-if( xNewSequence.is())
-{
-SchXMLTools::setXMLRangePropertyAtDataSequence(xNewSequence,aXMLRange);
+if( !xNewSequence.is())
+return;
 
-OUStringBuffer aRoleBuffer("error-bars-");
-if( bYError )
-aRoleBuffer.append( 'y' );
-else
-aRoleBuffer.append( 'x');
+SchXMLTools::setXMLRangePropertyAtDataSequence(xNewSequence,aXMLRange);
 
-aRoleBuffer.append( '-' );
+OUStringBuffer aRoleBuffer("error-bars-");
+if( bYError )
+aRoleBuffer.append( 'y' );
+else
+aRoleBuffer.append( 'x');
 
-if( bPositiveValue )
-aRoleBuffer = aRoleBuffer.append( "positive" );
-else
-aRoleBuffer = aRoleBuffer.append( "negative" );
+aRoleBuffer.append( '-' );
 
-OUString aRole = aRoleBuffer.makeStringAndClear();
+if( bPositiveValue )
+aRoleBuffer = aRoleBuffer.append( "positive" );
+else
+aRoleBuffer = aRoleBuffer.append( "negative" );
 
-Reference< beans::XPropertySet > xSeqProp( xNewSequence, 
uno::UNO_QUERY );
+OUString aRole = aRoleBuffer.makeStringAndClear();
 
-xSeqProp->setPropertyValue("Role", uno::makeAny( aRole ));
+Reference< beans::XPropertySet > xSeqProp( xNewSequence, uno::UNO_QUERY );
 
-Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
+xSeqProp->setPropertyValue("Role", uno::makeAny( aRole ));
 
-Reference< chart2::data::XLabeledDataSequence > xLabelSeq( 
chart2::data::LabeledDataSequence::create(xContext),
-uno::UNO_QUERY_THROW );
+Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
 
-rSequences.emplace( tSchXMLIndexWithPart( -2, SCH_XML_PART_ERROR_BARS 
), xLabelSeq );
+Reference< chart2::data::XLabeledDataSequence > xLabelSeq( 
chart2::data::LabeledDataSequence::create(xContext),
+uno::UNO_QUERY_THROW );
 
-xLabelSeq->setValues( xNewSequence );
+rSequences.emplace( tSchXMLIndexWithPart( -2, SCH_XML_PART_ERROR_BARS ), 
xLabelSeq );
 
-uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > 
aSequences(
-xDataSource->getDataSequences());
+xLabelSeq->setValues( xNewSequence );
+
+uno::Sequence< Reference< chart2::data::XLabeledDataSequence > > 
aSequences(
+xDataSource->getDataSequences());
+
+aSequences.realloc( aSequences.getLength() + 1 );
+aSequences[ aSequences.getLength() - 1 ] = xLabelSeq;
+xDataSink->setData( aSequences );
 
-aSequences.realloc( aSequences.getLength() + 1 );
-aSequences[ aSequences.getLength() - 1 ] = xLabelSeq;
-xDataSink->setData( aSequences );
-}
 }
 
 SchXMLStatisticsObjectContext::SchXMLStatisticsObjectContext(
@@ -962,100 +963,101 @@ void SetErrorBarPropertiesFromStyleName( const 
OUString& aStyleName, const uno::
 uno::Any aAny = SchXMLTools::getPropertyFromContext

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - sw/qa sw/source

2017-11-15 Thread Vasily Melenchuk
 sw/qa/extras/ooxmlexport/data/tdf107111.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|   13 +
 sw/source/filter/ww8/ww8atr.cxx  |1 +
 3 files changed, 14 insertions(+)

New commits:
commit a4713560e3b4b7dc3d72e3811e41ff9c4feda24a
Author: Vasily Melenchuk 
Date:   Tue Oct 10 16:42:38 2017 +0300

tdf#107111: DOCX export: restore HideTabLeader... attribute after TOX

Previously m_bHideTabLeaderAndPageNumbers value was not restored after TOX
finish and so causing visibility problems with following hyperlinks.

Reviewed-on: https://gerrit.libreoffice.org/43310
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport9.cxx

Change-Id: I4ba5ce1f70e05d706d17d60e1a33a62995701f9e
Reviewed-on: https://gerrit.libreoffice.org/44754
Tested-by: Jenkins 
Reviewed-by: Serge Krot (CIB) 
Tested-by: Serge Krot (CIB) 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf107111.docx 
b/sw/qa/extras/ooxmlexport/data/tdf107111.docx
new file mode 100644
index ..f89436fda754
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf107111.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index b184c116232a..f67a2b37888f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -684,6 +684,19 @@ DECLARE_OOXMLEXPORT_TEST(testWatermark, 
"watermark-shapetype.docx")
 
CPPUNIT_ASSERT_EQUAL(xPropertySet1->getPropertyValue("TextAutoGrowHeight"), 
xPropertySet2->getPropertyValue("TextAutoGrowHeight"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf107111, "tdf107111.docx")
+{
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+
+// Ensure that hyperlink and its properties are in place.
+assertXPath(pXmlDoc, "/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr", 1);
+
+// Ensure that hyperlink properties do not contain .
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:p[5]/w:hyperlink/w:r/w:rPr/w:webHidden", 0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index cad3bdb73020..a6cc9dc3bbaa 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -2280,6 +2280,7 @@ void AttributeOutputBase::EndTOX( const SwSection& 
rSect,bool bCareEnd )
 }
 }
 GetExport( ).m_bInWriteTOX = false;
+GetExport( ).m_bHideTabLeaderAndPageNumbers = false;
 if (bCareEnd)
 OnTOXEnding();
 }
___
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.3' - sw/qa writerfilter/source

2017-11-15 Thread Mike Kaganski
 sw/qa/extras/ooxmlexport/data/tdf111964.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx |   10 ++
 writerfilter/source/ooxml/OOXMLFastContextHandler.cxx |   28 +-
 3 files changed, 37 insertions(+), 1 deletion(-)

New commits:
commit 1abb4d3469b4ca982602a199578b929cf02d3cdc
Author: Mike Kaganski 
Date:   Wed Aug 23 09:09:57 2017 +0300

tdf#111964: only trim XML whitespace

OUString::trim() uses rtl_uString_newTrim, which relies upon
rtl_ImplIsWhitespace. The latter treats as whitespaces not only
characters with values less than or equal to 32, but also Unicode
General Punctuation area Space and some Control characters. Thus,
using OUString::trim() is incorrect when the goal is to trim XML
whitespace, which is defined as one of 0x09, 0x0A, 0x0D, 0x20.

A unit test included.

Change-Id: I45a132be923a52dcd5a4c35aeecb53d423b49fec
Reviewed-on: https://gerrit.libreoffice.org/41444
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/44746
Reviewed-by: Aron Budea 
Tested-by: Aron Budea 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf111964.docx 
b/sw/qa/extras/ooxmlexport/data/tdf111964.docx
new file mode 100644
index ..7cb85a1d87df
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf111964.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index 313a8e3d4e3c..a7b36683f943 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -564,6 +564,16 @@ DECLARE_OOXMLEXPORT_TEST(tdf112169, "tdf112169.odt")
 // LO crashed while export because of chararacter background color handling
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf111964, "tdf111964.docx")
+{
+xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+if (!pXmlDoc)
+return;
+// Unicode spaces that are not XML whitespace must not be trimmed
+const sal_Unicode sWSReference [] { 0x2002, 0x2002, 0x2002, 0x2002, 
0x2002, 0 };
+assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[4]/w:t", 
sWSReference);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx 
b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 3b39eaa1a954..388f02603f85 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -620,6 +620,32 @@ void OOXMLFastContextHandler::endTxbxContent()
 mpParserState->endTxbxContent();
 }
 
+namespace {
+// XML schema defines white space as one of four characters:
+// #x9 (tab), #xA (line feed), #xD (carriage return), and #x20 (space)
+bool IsXMLWhitespace(sal_Unicode cChar)
+{
+return cChar == 0x9 || cChar == 0xA || cChar == 0xD || cChar == 0x20;
+}
+
+OUString TrimXMLWhitespace(const OUString & sText)
+{
+sal_Int32 nTrimmedStart = 0;
+const sal_Int32 nLen = sText.getLength();
+sal_Int32 nTrimmedEnd = nLen - 1;
+while (nTrimmedStart < nLen && IsXMLWhitespace(sText[nTrimmedStart]))
+++nTrimmedStart;
+while (nTrimmedStart <= nTrimmedEnd && IsXMLWhitespace(sText[nTrimmedEnd]))
+--nTrimmedEnd;
+if ((nTrimmedStart == 0) && (nTrimmedEnd == nLen - 1))
+return sText;
+else if (nTrimmedStart > nTrimmedEnd)
+return OUString();
+else
+return sText.copy(nTrimmedStart, nTrimmedEnd-nTrimmedStart+1);
+}
+}
+
 void OOXMLFastContextHandler::text(const OUString & sText)
 {
 if (isForwardEvents())
@@ -631,7 +657,7 @@ void OOXMLFastContextHandler::text(const OUString & sText)
 // tabs are converted to spaces
 if (!IsPreserveSpace())
 {
-sNormalizedText = sNormalizedText.trim().replaceAll("\t", " ");
+sNormalizedText = 
TrimXMLWhitespace(sNormalizedText).replaceAll("\t", " ");
 }
 mpStream->utext(reinterpret_cast < const sal_uInt8 * >
 (sNormalizedText.getStr()),
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Noel Grandin
 vcl/qa/cppunit/canvasbitmaptest.cxx  |   51 -
 vcl/source/app/help.cxx  |   45 -
 vcl/source/bitmap/BitmapProcessor.cxx|   99 +--
 vcl/source/bitmap/BitmapTools.cxx|   57 -
 vcl/source/control/button.cxx|   45 -
 vcl/source/control/imgctrl.cxx   |   41 -
 vcl/source/control/imp_listbox.cxx   |   79 +-
 vcl/source/control/scrbar.cxx|  205 +++---
 vcl/source/control/spinfld.cxx   |   83 +-
 vcl/source/edit/texteng.cxx  |   71 +-
 vcl/source/filter/wmf/emfwr.cxx  |  400 ++--
 vcl/source/filter/wmf/wmfwr.cxx  |   73 +-
 vcl/source/gdi/gdimtf.cxx|  963 +++
 vcl/source/gdi/pdfwriter_impl.cxx|  487 +++
 vcl/source/gdi/pdfwriter_impl2.cxx   |  307 -
 vcl/source/gdi/print.cxx |  137 ++--
 vcl/source/outdev/gradient.cxx   |  123 ++-
 vcl/source/outdev/transparent.cxx|  129 ++--
 vcl/source/window/EnumContext.cxx|  108 +--
 vcl/source/window/dialog.cxx |   85 +-
 vcl/source/window/menubarwindow.cxx  |   33 -
 vcl/source/window/menufloatingwindow.cxx |   77 +-
 vcl/source/window/mouse.cxx  |  185 ++---
 vcl/source/window/splitwin.cxx   |  318 +-
 vcl/source/window/toolbox.cxx|   59 -
 vcl/source/window/toolbox2.cxx   |   77 +-
 vcl/unx/generic/app/saldata.cxx  |   35 -
 vcl/unx/generic/app/saldisp.cxx  |   91 +-
 vcl/unx/generic/app/wmadaptor.cxx|   78 +-
 vcl/unx/generic/dtrans/X11_selection.cxx |  116 +--
 vcl/unx/generic/print/common_gfx.cxx |  133 ++--
 vcl/unx/generic/print/genprnpsp.cxx  |   45 -
 vcl/unx/generic/window/salframe.cxx  |  173 ++---
 vcl/unx/gtk/gtkobject.cxx|   75 +-
 vcl/unx/gtk/gtksalframe.cxx  |   43 -
 vcl/unx/gtk/salnativewidgets-gtk.cxx |   69 +-
 vcl/unx/gtk3/gtk3gtkframe.cxx|   43 -
 vcl/unx/gtk3/gtk3gtkinst.cxx |   71 +-
 vcl/unx/gtk3/gtk3gtkobject.cxx   |   73 +-
 vcl/workben/svpclient.cxx|   47 -
 40 files changed, 2742 insertions(+), 2687 deletions(-)

New commits:
commit 5b74eb68113d3721e1a3f9fa40024bf9b2a15f0c
Author: Noel Grandin 
Date:   Wed Nov 15 10:18:43 2017 +0200

loplugin:flatten in vcl

Change-Id: I3527477277a9ae96eaf9fd068232f672da7c28c3
Reviewed-on: https://gerrit.libreoffice.org/44753
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx 
b/vcl/qa/cppunit/canvasbitmaptest.cxx
index f8ad6160d256..7570f9c22672 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -207,34 +207,35 @@ void checkCanvasBitmap( const 
rtl::Reference& xBmp,
 CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(
 "150th pixel is not white", 1.0, pRGBStart[150].Blue, 1E-12);
 
-if( nOriginalDepth > 8 )
-{
-uno::Sequence aARGBColor(1);
-uno::Sequence  aRGBColor(1);
-uno::Sequence aPixel3, aPixel4;
+if( nOriginalDepth <= 8 )
+return;
 
-const Color aCol(COL_GREEN);
-aARGBColor[0].Red   = vcl::unotools::toDoubleColor(aCol.GetRed());
-aARGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
-aARGBColor[0].Blue  = vcl::unotools::toDoubleColor(aCol.GetBlue());
-aARGBColor[0].Alpha = 1.0;
-
-aRGBColor[0].Red   = vcl::unotools::toDoubleColor(aCol.GetRed());
-aRGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
-aRGBColor[0].Blue  = vcl::unotools::toDoubleColor(aCol.GetBlue());
-
-aPixel3 = xBmp->convertIntegerFromARGB( aARGBColor );
-aPixel4 = xBmp->getPixel( aLayout, geometry::IntegerPoint2D(5,0) );
-CPPUNIT_ASSERT_MESSAGE( "Green pixel from bitmap mismatch with 
manually converted green pixel",
-bool(aPixel3 == aPixel4));
+uno::Sequence aARGBColor(1);
+uno::Sequence  aRGBColor(1);
+uno::Sequence aPixel3, aPixel4;
 
-if( !aContainedBmpEx.IsTransparent() )
-{
-aPixel3 = xBmp->convertIntegerFromRGB( aRGBColor );
-CPPUNIT_ASSERT_MESSAGE( "Green pixel from bitmap mismatch with 
manually RGB-converted green pixel",
-bool(aPixel3 == aPixel4));
-}
+const Color aCol(COL_GREEN);
+aARGBColor[0].Red   = vcl::unotools::toDoubleColor(aCol.GetRed());
+aARGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
+aARGBColor[0].Blue  = vcl::unotools::toDoubleColor(aCol.GetBlue());
+aARGBColor[0].Alpha = 1.0;
+
+aRGBColor[0].Red   = vcl::unotools::toDoubleColor(aCol.GetRed());
+aRGBColor[0].Green = vcl::unotools::toDoubleColor(aCol.GetGreen());
+aRGBColor[0].Blue  = vcl::unotools::toDoubleColor(aCol.GetBlue());
+
+aPixel3 = xBmp->convertIntegerFromARGB( aARGBColor );
+aPixel4 = xBmp->get

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

2017-11-15 Thread Mike Kaganski
 sw/source/uibase/docvw/PostItMgr.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit b4aa631867638b993fda98b1c4fcfc47e5c6a1aa
Author: Mike Kaganski 
Date:   Wed Nov 15 12:53:01 2017 +0200

3813dd1315 follow-up: revert incorrect loop changes

Change-Id: Ifdccf64630e76f6189668aa7f7412c41a6af04c2
Reviewed-on: https://gerrit.libreoffice.org/44756
Reviewed-by: Mike Kaganski 
Tested-by: Mike Kaganski 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 06c0bc6d75ce..f88c6a19a881 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -246,10 +246,10 @@ SwPostItMgr::~SwPostItMgr()
 void SwPostItMgr::CheckForRemovedPostIts()
 {
 bool bRemoved = false;
-for(auto i = mvPostItFields.begin(); i != mvPostItFields.end(); ++i)
+for(auto i = mvPostItFields.begin(); i != mvPostItFields.end(); )
 {
-auto it = ++i;
-if ( it != mvPostItFields.end() && !(*it)->UseElement() )
+auto it = i++;
+if ( !(*it)->UseElement() )
 {
 SwSidebarItem* p = (*it);
 mvPostItFields.remove(*it);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Caolán McNamara
 svx/source/dialog/ClassificationDialog.cxx |1 +
 sw/qa/extras/tiledrendering/tiledrendering.cxx |3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit c2602c5f0eb6555dc5cbcfc74a02c0e3b0347e37
Author: Caolán McNamara 
Date:   Wed Nov 15 09:14:12 2017 +

coverity#1421163 Unchecked dynamic_cast

and

coverity#1421165 Unchecked dynamic_cast

Change-Id: Iabd9560d41ec3ddbdb7a560b7839024b7749f917

diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering.cxx
index b55e775d0ba7..91f5f2235901 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx
@@ -1828,12 +1828,13 @@ void SwTiledRenderingTest::testAllTrackedChanges()
 
 // view #1
 SwView* pView1 = dynamic_cast(SfxViewShell::Current());
+CPPUNIT_ASSERT(pView1);
 SwWrtShell* pWrtShell1 = pView1->GetWrtShellPtr();
 
 // view #2
 SfxLokHelper::createView();
 SwView* pView2 = dynamic_cast(SfxViewShell::Current());
-CPPUNIT_ASSERT(pView1 != pView2);
+CPPUNIT_ASSERT(pView2 && pView1 != pView2);
 SwWrtShell* pWrtShell2 = pView2->GetWrtShellPtr();
 // Insert text and reject all
 {
commit 44844b60847af68b8b1b91137eb6af4b65979697
Author: Caolán McNamara 
Date:   Wed Nov 15 09:09:51 2017 +

coverity#1421071 Uninitializer scalar field

Change-Id: I6b52c62574013ba24297c2cbd7bfceea0e29

diff --git a/svx/source/dialog/ClassificationDialog.cxx 
b/svx/source/dialog/ClassificationDialog.cxx
index 34b5d1504344..0bb8e7892d4e 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -166,6 +166,7 @@ ClassificationDialog::ClassificationDialog(vcl::Window* 
pParent, const bool bPer
 , maInternationalHelper(SfxObjectShell::Current()->getDocProperties(), 
/*bUseLocalizedPolicy*/ false)
 , m_bPerParagraph(bPerParagraph)
 , m_aParagraphSignHandler(rParagraphSignHandler)
+, m_nCurrentSelectedCategory(-1)
 {
 get(m_pOkButton, "ok");
 get(m_pEditWindow, "classificationEditWindow");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Miklos Vajna
 sw/source/core/inc/bodyfrm.hxx |2 ++
 sw/source/core/inc/pagefrm.hxx |3 ++-
 sw/source/core/inc/rootfrm.hxx |3 ++-
 sw/source/core/inc/txtfrm.hxx  |3 ++-
 sw/source/core/text/porlay.hxx |4 +++-
 sw/source/core/text/porlin.hxx |1 +
 6 files changed, 12 insertions(+), 4 deletions(-)

New commits:
commit e9d6db80177bdaab527de516b53544aeae380d0e
Author: Miklos Vajna 
Date:   Wed Nov 15 09:04:29 2017 +0100

sw: document SwRootFrame -> SwLinePortion encapsulation chain

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

diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx
index 1fa48fd66e12..658585d9856b 100644
--- a/sw/source/core/inc/bodyfrm.hxx
+++ b/sw/source/core/inc/bodyfrm.hxx
@@ -24,6 +24,8 @@
 
 class SwBorderAttrs;
 
+/// Container of body content (i.e. not header or footer). Typical parent is an
+/// SwPageFrame, typical lower is an SwTextFrame.
 class SwBodyFrame: public SwLayoutFrame
 {
 protected:
diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx
index e6b4d92777d2..d49b5275893d 100644
--- a/sw/source/core/inc/pagefrm.hxx
+++ b/sw/source/core/inc/pagefrm.hxx
@@ -36,7 +36,8 @@ namespace vcl { class Font; }
 class SwSortedObjs;
 class SwAnchoredObject;
 
-/// A page of the document layout.
+/// A page of the document layout. Upper frame is expected to be an SwRootFrame
+/// instance. At least an SwBodyFrame lower is expected.
 class SwPageFrame: public SwFootnoteBossFrame
 {
 friend class SwFrame;
diff --git a/sw/source/core/inc/rootfrm.hxx b/sw/source/core/inc/rootfrm.hxx
index 73c020e8e9a8..1767a0814e0e 100644
--- a/sw/source/core/inc/rootfrm.hxx
+++ b/sw/source/core/inc/rootfrm.hxx
@@ -68,7 +68,8 @@ using SwCurrShells = std::set;
 class SwSectionFrame;
 using SwDestroyList = std::set;
 
-/// The root element of a Writer document layout.
+/// The root element of a Writer document layout. Lower frames are expected to
+/// be SwPageFrame instances.
 class SwRootFrame: public SwLayoutFrame
 {
 // Needs to disable the Superfluous temporarily
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index dce33a89a882..19931c15d686 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -45,7 +45,8 @@ class SwScriptInfo;
 
 #define NON_PRINTING_CHARACTER_COLOR RGB_COLORDATA(0x26, 0x8b, 0xd2)
 
-/// Represents the visualization of a paragraph.
+/// Represents the visualization of a paragraph. Typical upper is an
+/// SwBodyFrame. The first text portion of the first line is az SwParaPortion.
 class SW_DLLPUBLIC SwTextFrame: public SwContentFrame
 {
 friend class SwTextIter;
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 6aa245d053b4..c77f25b84981 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -73,7 +73,8 @@ public:
 void   SetRightOfst( const SwTwips nNew ) { nRightOfst = nNew; }
 };
 
-/// Collection of SwLinePortion instances, representing one line of text
+/// Collection of SwLinePortion instances, representing one line of text.
+/// Typically owned by an SwParaPortion.
 class SwLineLayout : public SwTextPortion
 {
 private:
@@ -226,6 +227,7 @@ public:
 };
 
 /// Collection of SwLineLayout instances, represents the paragraph text in 
Writer layout.
+/// Typically owned by an SwTextFrame.
 class SwParaPortion : public SwLineLayout
 {
 // Area that needs repainting
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index c95c052f1171..e048a36fe3e0 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -56,6 +56,7 @@ class SwPortionHandler;
 #define PORGRP_TOXREF   0x0008
 
 /// Base class for anything that can be part of a line in the Writer layout.
+/// Typically owned by SwLineLayout.
 class SwLinePortion: public SwPosSize
 {
 protected:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Calc / threading review call ... - today.

2017-11-15 Thread Michael Meeks
Urgh; I sent this in error to our internal libreoffice list.

Apologies for the late notice; happy to delay to Friday if it's a
problem for anyone.

ATB,

Michael.

On 14/11/17 17:50, Michael Meeks wrote:
>   Just a note to say, that Eike myself, Dennis, Tor will have a hangout
> tomorrow to review the calc parallelism / threading work on the branch
> feature/calc-parallel to get feedback on merging it before the 6.0
> feature freeze.
> 
>   All are welcome of course, I'll post a link to IRC shortly beforehand;
> using the same time as the ESC call - which is 15:00 UTC and 16:00
> Hamburg / European time.
> 
>   Will post some minutes afterwards (with graphs I hope) here.
>
-- 
michael.me...@collabora.com <><, Pseudo Engineer, itinerant idiot
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-11-15 Thread Julien Nabet
 sw/source/uibase/docvw/PostItMgr.cxx |  236 +--
 1 file changed, 115 insertions(+), 121 deletions(-)

New commits:
commit 3813dd13157f022320b5835856b70e0e2ede03bc
Author: Julien Nabet 
Date:   Tue Nov 14 23:31:53 2017 +0100

Use auto/for range loops in PostItMgr (first pass)

+ fix a loop by adding the increment

Change-Id: I27add28e03dee4c882931e0c173ec0c23b44d198
Reviewed-on: https://gerrit.libreoffice.org/44743
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 543c95273bf6..06c0bc6d75ce 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -235,8 +235,8 @@ SwPostItMgr::~SwPostItMgr()
 RemoveSidebarWin();
 EndListening( *mpView->GetDocShell() );
 
-for(std::vector::iterator i = mPages.begin(); i != 
mPages.end() ; ++i)
-delete (*i);
+for (auto const& page : mPages)
+delete page;
 mPages.clear();
 
 delete mpFrameSidebarWinContainer;
@@ -246,10 +246,10 @@ SwPostItMgr::~SwPostItMgr()
 void SwPostItMgr::CheckForRemovedPostIts()
 {
 bool bRemoved = false;
-for(std::list::iterator i = mvPostItFields.begin(); i != 
mvPostItFields.end(); )
+for(auto i = mvPostItFields.begin(); i != mvPostItFields.end(); ++i)
 {
-std::list::iterator it = i++;
-if ( !(*it)->UseElement() )
+auto it = ++i;
+if ( it != mvPostItFields.end() && !(*it)->UseElement() )
 {
 SwSidebarItem* p = (*it);
 mvPostItFields.remove(*it);
@@ -282,9 +282,9 @@ SwSidebarItem* SwPostItMgr::InsertItem(SfxBroadcaster* 
pItem, bool bCheckExisten
 SwSidebarItem* pAnnotationItem = nullptr;
 if (bCheckExistence)
 {
-for(std::list::iterator i = mvPostItFields.begin(); i 
!= mvPostItFields.end() ; ++i)
+for (auto const& postItField : mvPostItFields)
 {
-if ( (*i)->GetBroadCaster() == pItem )
+if ( postItField->GetBroadCaster() == pItem )
 return pAnnotationItem;
 }
 }
@@ -303,7 +303,7 @@ SwSidebarItem* SwPostItMgr::InsertItem(SfxBroadcaster* 
pItem, bool bCheckExisten
 void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
 {
 EndListening(*pBroadcast);
-for(std::list::iterator i = mvPostItFields.begin(); i != 
mvPostItFields.end() ; ++i)
+for(auto i = mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
 {
 if ( (*i)->GetBroadCaster() == pBroadcast )
 {
@@ -393,20 +393,20 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const 
SfxHint& rHint )
 case SwFormatFieldHintWhich::CHANGED:
 {
 SwFormatField* pFormatField = 
dynamic_cast(&rBC);
-for(std::list::iterator i = 
mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
+for (auto const& postItField : mvPostItFields)
 {
-if ( pFormatField == (*i)->GetBroadCaster() )
+if ( pFormatField == postItField->GetBroadCaster() )
 {
-if ((*i)->pPostIt)
+if (postItField->pPostIt)
 {
-(*i)->pPostIt->SetPostItText();
+postItField->pPostIt->SetPostItText();
 mbLayout = true;
 }
 
 // If LOK has disabled tiled annotations, emit 
annotation callbacks
 if (comphelper::LibreOfficeKit::isActive() && 
!comphelper::LibreOfficeKit::isTiledAnnotations())
 {
-lcl_CommentNotification(mpView, 
CommentNotificationType::Modify, *i, 0);
+lcl_CommentNotification(mpView, 
CommentNotificationType::Modify, postItField, 0);
 }
 break;
 }
@@ -417,13 +417,13 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const 
SfxHint& rHint )
 case SwFormatFieldHintWhich::LANGUAGE:
 {
 SwFormatField* pFormatField = 
dynamic_cast(&rBC);
-for(std::list::iterator i = 
mvPostItFields.begin(); i != mvPostItFields.end() ; ++i)
+for (auto const& postItField : mvPostItFields)
 {
-if ( pFormatField == (*i)->GetBroadCaster() )
+if ( pFormatField == postItField->GetBroadCaster() )
 {
-if ((*i)->pPostIt)
+if (postItField->pPostIt)
 {
-const SvtScriptType nScriptType = 
SvtLanguageOptions::GetScriptTypeOfLanguage( 
(*i)->GetFormatField().GetField()->GetLanguage() );
+const SvtScriptType nScriptType = 
SvtLanguageOptions::GetScriptTypeOfLanguag

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

2017-11-15 Thread Caolán McNamara
 extensions/source/abpilot/datasourcehandling.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit c2a4b8afcf3ac67ebc54ea8dbaeffb09cb81f431
Author: Caolán McNamara 
Date:   Wed Nov 15 09:05:18 2017 +

silence coverity#1362777 Explicit null dereferenced

Change-Id: I49089cfac207f67e03c19a09a95c4c7325276b53

diff --git a/extensions/source/abpilot/datasourcehandling.cxx 
b/extensions/source/abpilot/datasourcehandling.cxx
index cf95ac048086..75f2685ea13b 100644
--- a/extensions/source/abpilot/datasourcehandling.cxx
+++ b/extensions/source/abpilot/datasourcehandling.cxx
@@ -371,6 +371,7 @@ namespace abp
 xUri = 
css::uri::VndSunStarPkgUrlReferenceFactory::create(xContext)->createVndSunStarPkgUrlReference(xUri);
 assert(xUri.is());
 OUString const sTmpName = xUri->getUriReference() + "/" + 
aStreamRelPath;
+assert(pObjectShell);
 uno::Reference xStorage = 
pObjectShell->GetStorage();
 uno::Sequence aSequence = 
comphelper::InitPropertySequence(
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Caolán McNamara
 sw/inc/unodraw.hxx |1 +
 sw/source/core/unocore/unodraw.cxx |   20 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit 74030e2aebb68218d829724329744e6992d6543b
Author: Caolán McNamara 
Date:   Tue Nov 14 16:51:56 2017 +

Resolves: tdf#113615 wrong SwXShape from three possibilities returned

There is the group object itself and the two subobjects all registered
with this SwFrameFormat and the right line is randomly returned
instead of the wanted one.

Its possibly the presence of working a11y under gtk3 causing it to be
the only platform apparently with this trouble with a11y querying
for details of the grouped object

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

diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index 5eb68ddac0e1..ec85124980f7 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -127,6 +127,7 @@ class SwXShape : public SwXShapeBaseClass,
 {
 friend class SwXGroupShape;
 friend class SwXDrawPage;
+friend class SwFmDrawPage;
 
 css::uno::Reference< css::uno::XAggregation > xShapeAgg;
 // reference to , determined in the
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index d6732961b804..cdaff02db50a 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -294,9 +294,25 @@ uno::Reference< uno::XInterface >   
SwFmDrawPage::GetInterface( SdrObject* pObj
 if( pObj )
 {
 SwFrameFormat* pFormat = ::FindFrameFormat( pObj );
-SwXShape* pxShape = SwIterator( *pFormat ).First();
-if(pxShape)
+
+SwIterator aIter(*pFormat);
+SwXShape* pxShape = aIter.First();
+if (pxShape)
 {
+//tdf#113615 when mapping from SdrObject to XShape via
+//SwFrameFormat check all the SdrObjects belonging to this
+//SwFrameFormat to find the right one. In the case of Grouped
+//objects there can be both the group and the elements of the group
+//registered here so the first one isn't necessarily the right one
+while (SwXShape* pNext = aIter.Next())
+{
+SvxShape* pSvxShape = pNext->GetSvxShape();
+if (pSvxShape && pSvxShape->GetSdrObject() == pObj)
+{
+pxShape = pNext;
+break;
+}
+}
 xShape =  *static_cast(pxShape);
 }
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Caolán McNamara
 sw/source/filter/ww8/ww8scan.cxx |   37 +++--
 1 file changed, 35 insertions(+), 2 deletions(-)

New commits:
commit 43e17bdc6efa2ddcb1f08e5d2c40e7dc636c80fb
Author: Caolán McNamara 
Date:   Tue Nov 14 21:22:13 2017 +

ofz#4213 Integer-overflow

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

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index e7d37be5fd87..1b24c6686aad 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -1264,8 +1264,41 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC 
nStartPos )
 if( nStartPos < nFcStart )
 nStartPos = nFcStart;
 
-if( nStartPos >= nFcStart + (nCpEnd - nCpStart) * nUnicodeFactor )
-nStartPos  = nFcStart + (nCpEnd - nCpStart - 1) * nUnicodeFactor;
+WW8_CP nCpLen;
+bool bFail = o3tl::checked_sub(nCpEnd, nCpStart, nCpLen);
+if (bFail)
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
+
+WW8_CP nCpLenBytes;
+bFail = o3tl::checked_multiply(nCpLen, nUnicodeFactor, nCpLenBytes);
+if (bFail)
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
+
+WW8_FC nFcLen;
+bFail = o3tl::checked_add(nFcStart, nCpLenBytes, nFcLen);
+if (bFail)
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
+
+WW8_FC nFcEnd;
+bFail = o3tl::checked_add(nFcStart, nFcLen, nFcEnd);
+if (bFail)
+{
+SAL_WARN("sw.ww8", "broken offset, ignoring");
+return WW8_CP_MAX;
+}
+
+
+if (nStartPos >= nFcEnd)
+nStartPos = nFcEnd - (1 * nUnicodeFactor);
 
 return nCpStart + (nStartPos - nFcStart) / nUnicodeFactor;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Caolán McNamara
 sd/source/ui/dlg/prltempl.cxx |   43 +++---
 1 file changed, 4 insertions(+), 39 deletions(-)

New commits:
commit 5f11ab0a62e0370d453f8b89497a1a2274776f36
Author: Caolán McNamara 
Date:   Tue Nov 14 20:54:49 2017 +

Resolves: tdf#113826 use brush vs background conversion mode of dialog

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

diff --git a/sd/source/ui/dlg/prltempl.cxx b/sd/source/ui/dlg/prltempl.cxx
index a81bf0107b95..039f72dbd650 100644
--- a/sd/source/ui/dlg/prltempl.cxx
+++ b/sd/source/ui/dlg/prltempl.cxx
@@ -63,8 +63,6 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( 
SfxObjectShell const * pDocSh,
 pOutSet ( nullptr ),
 pOrgSet ( &rStyleBase.GetItemSet() )
 {
-const SfxPoolItem *pItem = nullptr;
-
 if( IS_OUTLINE(ePO))
 {
 // Unfortunately, the Itemsets of our style sheets are not discreet..
@@ -95,9 +93,9 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( 
SfxObjectShell const * pDocSh,
 pOutSet = new SfxItemSet( rStyleBase.GetItemSet() );
 pOutSet->ClearItem();
 
-
 // If there is no bullet item in this stylesheet, we get it
 // from 'Outline 1' style sheet.
+const SfxPoolItem *pItem = nullptr;
 if( SfxItemState::SET != aInputSet.GetItemState(EE_PARA_NUMBULLET, 
false, &pItem ))
 {
 OUString aStyleName(SdResId(STR_PSEUDOSHEET_OUTLINE) + " 1");
@@ -111,44 +109,11 @@ SdPresLayoutTemplateDlg::SdPresLayoutTemplateDlg( 
SfxObjectShell const * pDocSh,
 // preselect selected layer in dialog
 aInputSet.Put( SfxUInt16Item( SID_PARAM_CUR_NUM_LEVEL, 
1GetValue();
-/* make new SvxBrushItem with this Color */
-SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR );
-
-aInputSet.ClearItem( EE_CHAR_BKGCOLOR );
-/* and stick it into the set */
-aInputSet.Put( aBrushItem );
-}
+SetInputSet(&aInputSet);
 }
 else {
-/*
- * same here
- */
-aInputSet.SetRanges(pOrgSet->GetRanges());
-aInputSet.MergeRange(SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR);
-aInputSet.Put(*pOrgSet, false);
-if ( pOrgSet->GetItemState( EE_CHAR_BKGCOLOR, true, &pItem ) == 
SfxItemState::SET )
-{
-/* extract Color outta SvxBackColorItem */
-Color aBackColor = static_cast(pItem)->GetValue();
-/* make new SvxBrushItem with this Color */
-SvxBrushItem aBrushItem( aBackColor, SID_ATTR_BRUSH_CHAR );
-
-aInputSet.ClearItem( EE_CHAR_BKGCOLOR );
-/* and stick it into the set */
-aInputSet.Put( aBrushItem );
-}
+SetInputSet(pOrgSet);
 }
-SetInputSet( &aInputSet );
 
 SvxColorListItem aColorListItem(*static_cast( 
mpDocShell->GetItem( SID_COLOR_TABLE ) ) );
 SvxGradientListItem aGradientListItem(*static_cast( mpDocShell->GetItem( SID_GRADIENT_LIST ) ) );
@@ -316,7 +281,7 @@ void SdPresLayoutTemplateDlg::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 }
 else if (nId == mnBackground)
 {
-
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)));
+
aSet.Put(SfxUInt32Item(SID_FLAG_TYPE,static_cast(SvxBackgroundTabFlags::SHOW_CHAR_BKGCOLOR)));
 rPage.PageCreated(aSet);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-11-15 Thread Noel Grandin
 include/svl/typedwhich.hxx |   14 ++
 1 file changed, 2 insertions(+), 12 deletions(-)

New commits:
commit f3eaa4f2de419f5cb96608341ac7d979f5a07625
Author: Noel Grandin 
Date:   Wed Nov 15 10:39:52 2017 +0200

update license header on new file

I just copied the license header from a nearby file, which is
wrong, so update from template.

Change-Id: I96d2a8a29eff9020a23b1ccded8642d2f5d0968b

diff --git a/include/svl/typedwhich.hxx b/include/svl/typedwhich.hxx
index 43318cc52303..c9cb3d8e3667 100644
--- a/include/svl/typedwhich.hxx
+++ b/include/svl/typedwhich.hxx
@@ -1,20 +1,10 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
 /*
  * 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 .
  */
 #ifndef INCLUDED_SVL_TYPEDWHICH_HXX
 #define INCLUDED_SVL_TYPEDWHICH_HXX
@@ -58,4 +48,4 @@ template  constexpr bool operator!=(TypedWhichId 
const& lhs, sal_uIn
 
 #endif // INCLUDED_SVL_TYPEDWHICH_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Writer] Macro for "Edit->Links->[Select All]->Break Link

2017-11-15 Thread Jambunathan K
On Sat, Nov 4, 2017 at 9:57 AM, Jambunathan K 
wrote:

> Hello
>
> Could someone help me with a Basic Macro that does
>
>"Writer Menu->Edit->Links->[Select All]->Break Link"
>
> Jambunathan K.
>


The following macro does the job.

Sub BreakLinks()
   Dim section, sectionNames
   Dim sectionFileLink as new com.sun.star.text.SectionFileLink

   sectionFileLink.FileURL=""

   sSectionNames = ThisComponent.getTextSections().getElementNames()

   For i = 0 To UBound(sSectionNames)
  section = ThisComponent.getTextSections().getByName(sSectionNames(i))
  section.setPropertyValue("FileLink",sectionFileLInk)
   Next
End Sub
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice