MSVC being stupid (again)?

2018-03-06 Thread Bjoern Michaelsen
Hi,

Im going slightly mad over:

 https://gerrit.libreoffice.org/#/c/49565/

it:

- uses a class which has a move ctor in a std container and a deleted copy
  ctor, which _should_ be fine
- compiles fine on OSX and Linux gcc and Linux clang
- it fails on MSVC with some bull&^(t errors that start off with "I tried to
  instanciate the deleted copy ctor" (which sounds almost reasonable) but ends
  with stuff including boost::args. which has ~nothing to do with the changes
  stl stuff involved and sound like it really took a wrong turn at some place
- copying and renaming the involved clasess to uwriter seems to make the
  std::list compile just fine

My gut feeling is that window precompiled headers are hitting a broken corner
case here. Anyone having any hints?

Best,

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


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

2018-03-06 Thread Noel Grandin
 editeng/source/accessibility/AccessibleEditableTextPara.cxx |   12 -
 editeng/source/accessibility/AccessibleImageBullet.cxx  |4 +--
 editeng/source/editeng/impedit3.cxx |6 ++--
 editeng/source/items/frmitems.cxx   |   12 -
 editeng/source/items/numitem.cxx|2 -
 editeng/source/items/textitem.cxx   |   15 
 editeng/source/uno/unonrule.cxx |2 -
 extensions/source/propctrlr/fontdialog.cxx  |   10 
 extensions/source/propctrlr/formcomponenthandler.cxx|9 ++-
 extensions/source/propctrlr/standardcontrol.cxx |4 +--
 filter/source/flash/swfwriter1.cxx  |2 -
 filter/source/msfilter/escherex.cxx |6 ++--
 filter/source/msfilter/msdffimp.cxx |2 -
 filter/source/msfilter/svdfppt.cxx  |9 +++
 filter/source/msfilter/util.cxx |6 ++--
 forms/source/component/Grid.cxx |4 +--
 forms/source/component/formcontrolfont.cxx  |8 +++---
 forms/source/component/navigationbar.cxx|8 +++---
 forms/source/inc/formcontrolfont.hxx|9 ---
 forms/source/richtext/richtextcontrol.cxx   |4 +--
 forms/source/solar/component/navbarcontrol.cxx  |6 ++--
 21 files changed, 66 insertions(+), 74 deletions(-)

New commits:
commit a498b12dc1723b072a165f8c528c377024fd4c98
Author: Noel Grandin 
Date:   Wed Mar 7 08:42:58 2018 +0200

use more Color in editeng..forms

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

diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx 
b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 90859aac7a73..cbb1d51bb224 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -1143,12 +1143,12 @@ namespace accessibility
 sal_Int32 SAL_CALL AccessibleEditableTextPara::getBackground(  )
 {
 // #10# Added to XAccessibleComponent interface
-Color aColor( 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor() );
+Color aColor( 
Application::GetSettings().GetStyleSettings().GetWindowColor() );
 
 // the background is transparent
 aColor.SetTransparency( 0xFF);
 
-return static_cast( aColor.GetColor() );
+return static_cast( aColor );
 }
 
 // XAccessibleText
@@ -1470,7 +1470,7 @@ namespace accessibility
 if (rRes.Name == "CharColor")
 {
 uno::Any &anyChar = rRes.Value;
-sal_uInt32 crChar = static_cast( 
reinterpret_cast(anyChar.pReserved));
+Color crChar = static_cast( 
reinterpret_cast(anyChar.pReserved));
 if (COL_AUTO == crChar )
 {
 uno::Reference< css::accessibility::XAccessibleComponent > 
xComponent(mxParent,uno::UNO_QUERY);
@@ -1485,7 +1485,7 @@ namespace accessibility
 else
 {
 Color cr(xComponent->getBackground());
-crChar = sal_uInt32(cr.IsDark() ? COL_WHITE : 
COL_BLACK);
+crChar = cr.IsDark() ? COL_WHITE : COL_BLACK;
 anyChar <<= crChar;
 }
 }
@@ -1501,7 +1501,7 @@ namespace accessibility
 if (rRes.Name == "CharUnderlineColor")
 {
 uno::Any &anyCharUnderLine = rRes.Value;
-sal_uInt32 crCharUnderLine = static_cast( 
reinterpret_cast( anyCharUnderLine.pReserved));
+Color crCharUnderLine = static_cast( 
reinterpret_cast( anyCharUnderLine.pReserved));
 if (COL_AUTO == crCharUnderLine )
 {
 uno::Reference< css::accessibility::XAccessibleComponent > 
xComponent(mxParent,uno::UNO_QUERY);
@@ -1516,7 +1516,7 @@ namespace accessibility
 else
 {
 Color cr(xComponent->getBackground());
-crCharUnderLine = sal_uInt32(cr.IsDark() ? 
COL_WHITE : COL_BLACK);
+crCharUnderLine = cr.IsDark() ? COL_WHITE : 
COL_BLACK;
 anyCharUnderLine <<= crCharUnderLine;
 }
 }
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx 
b/editeng/source/accessibility/AccessibleImageBullet.cxx
index 5ab8259f92a7..38bacff7245b 100644
--- a/editeng/source/acce

[Libreoffice-commits] core.git: include/svx officecfg/registry sc/inc sc/sdi sc/source sc/uiconfig

2018-03-06 Thread Samuel Mehrbrodt
 include/svx/svdobj.hxx   |3 
 include/svx/svdograf.hxx |2 
 include/svx/svdomedia.hxx|2 
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |5 +
 sc/inc/globstr.hrc   |1 
 sc/inc/sc.hrc|1 
 sc/sdi/drawsh.sdi|1 
 sc/sdi/scalc.sdi |   18 +++
 sc/source/ui/drawfunc/drawsh2.cxx|8 +
 sc/source/ui/drawfunc/drawsh5.cxx|4 
 sc/source/ui/inc/drawview.hxx|1 
 sc/source/ui/view/drawvie4.cxx   |   46 
++
 sc/uiconfig/scalc/menubar/menubar.xml|1 
 sc/uiconfig/scalc/popupmenu/chart.xml|1 
 sc/uiconfig/scalc/popupmenu/draw.xml |1 
 sc/uiconfig/scalc/popupmenu/form.xml |1 
 sc/uiconfig/scalc/popupmenu/graphic.xml  |1 
 sc/uiconfig/scalc/popupmenu/media.xml|1 
 sc/uiconfig/scalc/popupmenu/oleobject.xml|1 
 19 files changed, 99 insertions(+)

New commits:
commit 073b4eadd2a9a00b915c664df90b15d5b2d709c0
Author: Samuel Mehrbrodt 
Date:   Thu Mar 1 12:17:46 2018 +0100

tdf#116108 Add option to fit images into their cell

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

diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index 2f9542659cb0..3e97a472084f 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -733,6 +733,9 @@ public:
 void SetMarkProtect(bool bProt);
 bool IsMarkProtect() const { return bMarkProt;}
 
+/// Whether the aspect ratio should be kept by default when resizing.
+virtual bool shouldKeepAspectRatio() const { return false; }
+
 // application specific data
 sal_uInt16 GetUserDataCount() const;
 SdrObjUserData* GetUserData(sal_uInt16 nNum) const;
diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx
index f31ed858e575..abea8f1b222e 100644
--- a/include/svx/svdograf.hxx
+++ b/include/svx/svdograf.hxx
@@ -211,6 +211,8 @@ public:
 bool IsMirrored() const { return bMirrored;}
 void SetMirrored( bool _bMirrored );
 
+virtual bool shouldKeepAspectRatio() const override { return true; }
+
 // Access to GrafAnimationAllowed flag
 void SetGrafAnimationAllowed(bool bNew);
 
diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx
index f0bf09300aff..43356da4e302 100644
--- a/include/svx/svdomedia.hxx
+++ b/include/svx/svdomedia.hxx
@@ -69,6 +69,8 @@ public:
 GetInputStream();
 void
SetInputStream(css::uno::Reference const&);
 
+virtual bool shouldKeepAspectRatio() const override { return true; }
+
 private:
 
 voidmediaPropertiesChanged( const 
::avmedia::MediaItem& rNewState );
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index af2f0c643cc5..22f09405bf64 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -2181,6 +2181,11 @@
   ~Original Size
 
   
+  
+
+  ~Fit to Cell Size
+
+  
   
 
   Gr~id and Helplines
diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 89f3150fa8d0..d08ec69ed2a5 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -93,6 +93,7 @@
 #define STR_UNDO_DETREFRESH NC_("STR_UNDO_DETREFRESH", 
"Refresh Traces")
 #define STR_UNDO_CHARTDATA  NC_("STR_UNDO_CHARTDATA", 
"Modify chart data range")
 #define STR_UNDO_ORIGINALSIZE   NC_("STR_UNDO_ORIGINALSIZE", 
"Original Size")
+#define STR_UNDO_FITCELLSIZENC_("STR_UNDO_FITCELLSIZE", 
"Fit to Cell Size")
 #define STR_UNDO_UPDATELINK NC_("STR_UNDO_UPDATELINK", 
"Update Link")
 #define STR_UNDO_REMOVELINK NC_("STR_UNDO_REMOVELINK", 
"Unlink")
 #define STR_UNDO_INSERTAREALINK NC_("STR_UNDO_INSERTAREALINK", 
"Insert Link")
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 64ee13afc73c..5f1ae5ef385b 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -409,6 +409,7 @@
 #define SID_ANCHOR_CELL_RESIZE  (DRAW_BAR_START+26)
 #define SID_ANCHOR_

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - openssl/makefile.mk openssl/openssl.patch soltools/javadep

2018-03-06 Thread Damjan Jovanovic
 openssl/makefile.mk|   18 --
 openssl/openssl.patch  |   30 ++
 soltools/javadep/javadep.c |   14 +-
 3 files changed, 55 insertions(+), 7 deletions(-)

New commits:
commit dbda740d5e12fb77f3452c3e5515bdad233b91d8
Author: Damjan Jovanovic 
Date:   Wed Mar 7 06:16:30 2018 +

Get openssl to build on Win64.

Patch by: me

diff --git a/openssl/makefile.mk b/openssl/makefile.mk
index 6762f642d4b2..dc97bb1c7459 100644
--- a/openssl/makefile.mk
+++ b/openssl/makefile.mk
@@ -151,12 +151,18 @@ OUT2BIN += out/libeay32.dll
 .ENDIF
 
 #CONFIGURE_ACTION=cmd /c $(PERL:s!\!/!) configure
-CONFIGURE_ACTION=$(PERL) configure $(NO_ASM)
-CONFIGURE_FLAGS=VC-WIN32
-.IF "$(NASM_PATH)"=="NO_NASM_HOME"
-  BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 
$(PERL)))" && nmake -f ms/ntdll.mak
-.ELSE
-  BUILD_ACTION=cmd /c "ms$(EMQ)\do_nasm.bat $(subst,/,\ $(normpath,1 
$(PERL)))" && nmake -f ms/ntdll.mak
+.IF "$(CPUNAME)"=="INTEL"
+CONFIGURE_ACTION=$(PERL) configure $(NO_ASM)
+CONFIGURE_FLAGS=VC-WIN32
+.IF "$(NASM_PATH)"=="NO_NASM_HOME"
+  BUILD_ACTION=cmd /c "ms$(EMQ)\do_ms.bat $(subst,/,\ $(normpath,1 
$(PERL)))" && nmake -f ms/ntdll.mak
+.ELSE
+  BUILD_ACTION=cmd /c "ms$(EMQ)\do_nasm.bat $(subst,/,\ 
$(normpath,1 $(PERL)))" && nmake -f ms/ntdll.mak
+.ENDIF
+.ELIF "$(CPUNAME)"=="X86_64"
+CONFIGURE_ACTION=$(PERL) configure $(NO_ASM)
+CONFIGURE_FLAGS=VC-WIN64A
+BUILD_ACTION=cmd /c "ms$(EMQ)\do_win64a.bat $(subst,/,\ 
$(normpath,1 $(PERL)))" && cmd /c "nmake -f ms/ntdll.mak"
 .ENDIF
 
 OUT2LIB = out32dll$/ssleay32.lib
diff --git a/openssl/openssl.patch b/openssl/openssl.patch
index b487f8fc5db4..27a01adffaa2 100644
--- a/openssl/openssl.patch
+++ b/openssl/openssl.patch
@@ -122,3 +122,33 @@ diff -ur misc/openssl-1.0.2h/util/pl/VC-32.pl 
misc/build/openssl-1.0.2h/util/pl/
  if ($FLAVOR =~ /WIN64/)
  {
  # Note that we currently don't have /WX on Win64! There is a lot of
+diff -Nur misc/build/openssl-1.0.2h/ms/do_win64a.bat 
misc/build/openssl-1.0.2h/ms/do_win64a.bat
+--- misc/build/openssl-1.0.2h/ms/do_win64a.bat 2016-05-03 15:44:42.0 
+0200
 misc/build/openssl-1.0.2h/ms/do_win64a.bat 2018-03-07 07:59:41.870638000 
+0200
+@@ -1,19 +1,19 @@
+-perl util\mkfiles.pl >MINFO
++%1 util\mkfiles.pl >MINFO
+ 
+ cmd /c "nasm -f win64 -v" >NUL 2>&1
+ if %errorlevel% neq 0 goto ml64
+ 
+-perl ms\uplink-x86_64.pl nasm > ms\uptable.asm
++%1 ms\uplink-x86_64.pl nasm > ms\uptable.asm
+ nasm -f win64 -o ms\uptable.obj ms\uptable.asm
+ goto proceed
+ 
+ :ml64
+-perl ms\uplink-x86_64.pl masm > ms\uptable.asm
++%1 ms/uplink-x86_64.pl masm > ms/uptable.asm
+ ml64 -c -Foms\uptable.obj ms\uptable.asm
+ 
+ :proceed
+-perl util\mk1mf.pl VC-WIN64A >ms\nt.mak
+-perl util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
++%1 util\mk1mf.pl VC-WIN64A >ms\nt.mak
++%1 util\mk1mf.pl dll VC-WIN64A >ms\ntdll.mak
+ 
+-perl util\mkdef.pl 32 libeay > ms\libeay32.def
+-perl util\mkdef.pl 32 ssleay > ms\ssleay32.def
++%1 util\mkdef.pl 32 libeay > ms\libeay32.def
++%1 util\mkdef.pl 32 ssleay > ms\ssleay32.def
commit 756f141b6bfa64854d61230201ca9fc9d52a6b78
Author: Damjan Jovanovic 
Date:   Wed Mar 7 05:14:45 2018 +

Update the main/soltools javadep tool to deal with Java 9

(possibily 7 and 8 too, when using invokedynamic).

Patch by: me

diff --git a/soltools/javadep/javadep.c b/soltools/javadep/javadep.c
index e0902ba678b2..06e332f6a6f8 100644
--- a/soltools/javadep/javadep.c
+++ b/soltools/javadep/javadep.c
@@ -93,7 +93,10 @@ enum {
 CONSTANT_Long   = 5,
 CONSTANT_Double = 6,
 CONSTANT_NameAndType= 12,
-CONSTANT_Utf8   = 1
+CONSTANT_Utf8   = 1,
+CONSTANT_MethodHandle   = 15,
+CONSTANT_MethodType = 16,
+CONSTANT_InvokeDynamic  = 18
 };
 
 enum { NGROW_INIT = 10, NGROW = 2 };
@@ -512,6 +515,15 @@ process_class_file(const char *pfilename, const struct 
growable *pfilt)
 a_utf8 = read_utf8(&file);
 pc_pool[i] = a_utf8;
 break;
+case CONSTANT_MethodHandle:
+skip_bytes(&file, 3);
+break;
+case CONSTANT_MethodType:
+skip_bytes(&file, 2);
+break;
+case CONSTANT_InvokeDynamic:
+skip_bytes(&file, 4);
+break;
 default:
 /* Unknown Constant_pool entry, this means we are
  * in trouble
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Noel Grandin
 xmloff/source/style/XMLFootnoteSeparatorImport.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1163bcd5da3063e7e988ebf49d9b60dfd6f6c703
Author: Noel Grandin 
Date:   Tue Mar 6 15:18:53 2018 +0200

tdf#115432 footnote separator position wrong (2nd attempt)

the first attempt (d4a8d91abd40dee7f7bd739a678a502a6e34cb59)
incorrectly changed the type of a UNO property defined in a
published IDL file.

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

diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx 
b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index 5ec390c459cc..9ebf9549e45e 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -159,7 +159,7 @@ void XMLFootnoteSeparatorImport::StartElement(
 sal_Int32 nIndex;
 
 nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_ADJUST);
-XMLPropertyState aLineAdjust( nIndex, uno::Any(eLineAdjust));
+XMLPropertyState aLineAdjust( nIndex, uno::Any(sal_Int16(eLineAdjust)) );
 rProperties.push_back(aLineAdjust);
 
 nIndex = rMapper->FindEntryIndex(CTF_PM_FTN_LINE_COLOR);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Pranav Kant
 vcl/source/window/cursor.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 843f8e43e1e79bbd22cadabb54022c615c7a0d64
Author: Pranav Kant 
Date:   Tue Mar 6 19:21:48 2018 +0530

lokdialog: Fix cursor invalidates for some vcl controls

... like TextEdit, etc. The problem was that the code assumed that there
would be a mpData->mpWindow whenever a new cursor position is set. While
that's the case with most views, some controls set the position when
there's no window set.

With this patch, we send the cursor_invalidate just before we make the
cursor visible; by that time, we already have a valid mpWindow set in
the ImplCursorData.

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

diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 2da864f9bcd2..0da13be25d16 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -189,9 +189,6 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool 
bRestore )
 mpData->mbCurVisible = false;
 mpData->maTimer.SetInvokeHandler( LINK( this, Cursor, 
ImplTimerHdl ) );
 mpData->maTimer.SetDebugName( "vcl ImplCursorData maTimer" );
-
-// tell about "initial" coordinates
-LOKNotify( pWindow, "cursor_invalidate" );
 }
 
 mpData->mpWindow= pWindow;
@@ -206,6 +203,7 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool 
bRestore )
 mpData->maTimer.Start();
 else if ( !mpData->mbCurVisible )
 ImplDraw();
+LOKNotify( pWindow, "cursor_invalidate" );
 LOKNotify( pWindow, "cursor_visible" );
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Mike Kaganski
 shell/source/win32/simplemail/smplmailclient.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 01c71fba5f525b035f8a723215669d499bc27a3f
Author: Mike Kaganski 
Date:   Wed Mar 7 06:45:51 2018 +0100

Don't return local variable address

Oversight in 2f061dad7f875f704e3744fc5780c1d145b22e9f

Change-Id: I4cd4fcab7f5fa87f49ecc193a3f481fb9ac33932
Reviewed-on: https://gerrit.libreoffice.org/50857
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/shell/source/win32/simplemail/smplmailclient.cxx 
b/shell/source/win32/simplemail/smplmailclient.cxx
index 3a659548bbd1..87e324b4eeb5 100644
--- a/shell/source/win32/simplemail/smplmailclient.cxx
+++ b/shell/source/win32/simplemail/smplmailclient.cxx
@@ -170,7 +170,7 @@ namespace {
 // senddoc process lifetime. So we use base temppath for the attachments,
 // and let the senddoc to do the cleanup if it was started successfully.
 // This function works like Desktop::CreateTemporaryDirectory()
-OUString&& InitBaseTempDirURL()
+OUString InitBaseTempDirURL()
 {
 // No need to intercept an exception here, since
 // Desktop::CreateTemporaryDirectory() has ensured that path manager is 
available
@@ -183,7 +183,7 @@ OUString&& InitBaseTempDirURL()
 if (aRetURL.endsWith("/"))
 aRetURL = aRetURL.copy(0, aRetURL.getLength() - 1);
 
-return std::move(aRetURL);
+return aRetURL;
 }
 
 const OUString& GetBaseTempDirURL()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Zdeněk Crhonek
 sc/qa/uitest/calc_tests/data/tdf55734.ods |binary
 sc/qa/uitest/calc_tests/data/tdf56958.ods |binary
 sc/qa/uitest/calc_tests/data/tdf88735.ods |binary
 sc/qa/uitest/calc_tests/data/tdf88792.ods |binary
 sc/qa/uitest/calc_tests/subtotals.py  |  188 ++
 5 files changed, 188 insertions(+)

New commits:
commit a790ee54319583897d82d4372243df870d4452a6
Author: Zdeněk Crhonek 
Date:   Sun Feb 25 23:20:06 2018 +0100

uitest - calc subtotals; tdf#114720 tdf#88792 tdf#88735 tdf#56958 tdf#55734

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

diff --git a/sc/qa/uitest/calc_tests/data/tdf55734.ods 
b/sc/qa/uitest/calc_tests/data/tdf55734.ods
new file mode 100644
index ..d3ccc258faf5
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf55734.ods differ
diff --git a/sc/qa/uitest/calc_tests/data/tdf56958.ods 
b/sc/qa/uitest/calc_tests/data/tdf56958.ods
new file mode 100644
index ..e2c65a21851e
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf56958.ods differ
diff --git a/sc/qa/uitest/calc_tests/data/tdf88735.ods 
b/sc/qa/uitest/calc_tests/data/tdf88735.ods
new file mode 100644
index ..59abf6050bfe
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf88735.ods differ
diff --git a/sc/qa/uitest/calc_tests/data/tdf88792.ods 
b/sc/qa/uitest/calc_tests/data/tdf88792.ods
new file mode 100644
index ..ecd9e60407cd
Binary files /dev/null and b/sc/qa/uitest/calc_tests/data/tdf88792.ods differ
diff --git a/sc/qa/uitest/calc_tests/subtotals.py 
b/sc/qa/uitest/calc_tests/subtotals.py
new file mode 100644
index ..fa1e4f5602cf
--- /dev/null
+++ b/sc/qa/uitest/calc_tests/subtotals.py
@@ -0,0 +1,188 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.framework import UITestCase
+from libreoffice.calc.document import get_column
+from uitest.path import get_srcdir_url
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.calc.document import get_cell_by_position
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.common import get_state_as_dict
+import time
+from uitest.debug import sleep
+
+def get_url_for_data_file(file_name):
+return get_srcdir_url() + "/sc/qa/uitest/calc_tests/data/" + file_name
+
+class Subtotals(UITestCase):
+
+def test_tdf114720(self):
+calc_doc = self.ui_test.create_doc_in_start_center("calc")
+XcalcDoc = self.xUITest.getTopFocusWindow()
+document = self.ui_test.get_component()
+gridwin = XcalcDoc.getChild("grid_window")
+
+enter_text_to_cell(gridwin, "A1", "1")
+enter_text_to_cell(gridwin, "A2", "1")
+enter_text_to_cell(gridwin, "A3", "1")
+enter_text_to_cell(gridwin, "A4", "1")
+enter_text_to_cell(gridwin, "A5", "1")
+enter_text_to_cell(gridwin, "A6", "1")
+enter_text_to_cell(gridwin, "A7", "1")
+enter_text_to_cell(gridwin, "A8", "1")
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A9"}))
+
+self.ui_test.execute_dialog_through_command(".uno:DataSubTotals")
+xDialog = self.xUITest.getTopFocusWindow()
+
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+self.assertEqual(get_cell_by_position(document, 0, 0, 7).getValue(), 1)
+self.assertEqual(get_cell_by_position(document, 0, 0, 8).getString(), 
"")
+self.ui_test.close_doc()
+
+def test_tdf88792(self):
+calc_doc = 
self.ui_test.load_file(get_url_for_data_file("tdf88792.ods"))
+XcalcDoc = self.xUITest.getTopFocusWindow()
+document = self.ui_test.get_component()
+gridwin = XcalcDoc.getChild("grid_window")
+
+# go to cell A1
+gridwin.executeAction("SELECT", mkPropertyValues({"CELL": "A1"}))
+# Select from the menu bar Data
+# Select option subtotal
+# Subtotal dialog displays
+self.ui_test.execute_dialog_through_command(".uno:DataSubTotals")
+xDialog = self.xUITest.getTopFocusWindow()
+# Select group by: Category
+xGroupBy = xDialog.getChild("group_by")
+props = {"TEXT": "Category"}
+actionProps = mkPropertyValues(props)
+xGroupBy.executeAction("SELECT", actionProps)
+# Select calculate subtotals for the months -  selected by default
+# Select tab options
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "3")
+# select option include formats
+xformats = xDialog.getChild("formats")
+xformats.

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

2018-03-06 Thread Markus Mohrhard
 sc/source/ui/uitest/uiobject.cxx |4 +++-
 uitest/calc_tests/gridwin.py |   17 +
 2 files changed, 20 insertions(+), 1 deletion(-)

New commits:
commit ab26cddc3325a6422993a3421a557536d6023936
Author: Markus Mohrhard 
Date:   Wed Mar 7 01:36:12 2018 +0100

uitest: add demo showing how to select different sheet

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

diff --git a/uitest/calc_tests/gridwin.py b/uitest/calc_tests/gridwin.py
index 1afbe8142f54..7c9c87de0b03 100644
--- a/uitest/calc_tests/gridwin.py
+++ b/uitest/calc_tests/gridwin.py
@@ -6,6 +6,7 @@
 #
 
 from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict
 
 from uitest.framework import UITestCase
 
@@ -28,4 +29,20 @@ class GridWinTest(UITestCase):
 
 self.ui_test.close_doc()
 
+def test_select_sheet(self):
+
+self.ui_test.create_doc_in_start_center("calc")
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWindow = xCalcDoc.getChild("grid_window")
+
+for i in range(3):
+self.ui_test.execute_dialog_through_command(".uno:Insert")
+current_dialog = self.xUITest.getTopFocusWindow()
+
+xOkButton = current_dialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOkButton)
+
+xGridWindow.executeAction("SELECT", mkPropertyValues({"TABLE": "2"}))
+self.assertEqual(get_state_as_dict(xGridWindow)["SelectedTable"], "2")
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
commit 455fe33df4d498d8c374d43f57caf14897636749
Author: Markus Mohrhard 
Date:   Wed Mar 7 01:33:25 2018 +0100

uitest: fix small bug when trying to select different sheet in calc

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

diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx
index 323ae82e517a..3e98e1535bfc 100644
--- a/sc/source/ui/uitest/uiobject.cxx
+++ b/sc/source/ui/uitest/uiobject.cxx
@@ -131,7 +131,9 @@ void ScGridWinUIObject::execute(const OUString& rAction,
 auto itr = rParameters.find("TABLE");
 const OUString rStr = itr->second;
 sal_Int32 nTab = rStr.toUInt32();
-mxGridWindow->getViewData()->SetTabNo(nTab);
+ScTabView* pTabView = mxGridWindow->getViewData()->GetView();
+if (pTabView)
+pTabView->SetTabNo(nTab);
 }
 else if (rParameters.find("OBJECT") != rParameters.end())
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Julien Nabet
 desktop/source/deployment/registry/dp_registry.cxx  |   45 +--
 desktop/source/deployment/registry/package/dp_package.cxx   |   19 -
 desktop/source/migration/migration.cxx  |  137 +---
 desktop/source/migration/services/basicmigration.cxx|   16 -
 desktop/source/migration/services/oo3extensionmigration.cxx |   16 -
 desktop/source/migration/services/wordbookmigration.cxx |   18 -
 desktop/source/pkgchk/unopkg/unopkg_misc.cxx|6 
 7 files changed, 113 insertions(+), 144 deletions(-)

New commits:
commit 1b0beef8794210b2af49d8c4a00ca7d4e3ebedb7
Author: Julien Nabet 
Date:   Tue Mar 6 22:36:02 2018 +0100

Use for-range loops in desktop (part2)

+ use 1 time replace size() > 0 by !empty()

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

diff --git a/desktop/source/deployment/registry/dp_registry.cxx 
b/desktop/source/deployment/registry/dp_registry.cxx
index 09180c066a83..83cd03179119 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -134,10 +134,9 @@ inline void PackageRegistryImpl::check()
 void PackageRegistryImpl::disposing()
 {
 // dispose all backends:
-t_registryset::const_iterator iPos( m_allBackends.begin() );
-t_registryset::const_iterator const iEnd( m_allBackends.end() );
-for ( ; iPos != iEnd; ++iPos ) {
-try_dispose( *iPos );
+for (auto const& backend : m_allBackends)
+{
+try_dispose(backend);
 }
 m_mediaType2backend = t_string2registry();
 m_ambiguousBackends = t_registryset();
@@ -265,10 +264,9 @@ void PackageRegistryImpl::insertBackend(
 }
 
 // cut out ambiguous filters:
-t_stringset::const_iterator iPos( ambiguousFilters.begin() );
-const t_stringset::const_iterator iEnd( ambiguousFilters.end() );
-for ( ; iPos != iEnd; ++iPos ) {
-m_filter2mediaType.erase( *iPos );
+for (auto const& ambiguousFilter : ambiguousFilters)
+{
+m_filter2mediaType.erase(ambiguousFilter);
 }
 }
 
@@ -366,18 +364,16 @@ Reference 
PackageRegistryImpl::create(
 {
 t_registryset allBackends;
 dp_misc::TRACE("> [dp_registry.cxx] media-type detection:\n\n" );
-for ( t_string2string::const_iterator iPos(
-  that->m_filter2mediaType.begin() );
-  iPos != that->m_filter2mediaType.end(); ++iPos )
+for (auto const& elem : that->m_filter2mediaType)
 {
 OUStringBuffer buf;
 buf.append( "extension \"" );
-buf.append( iPos->first );
+buf.append( elem.first );
 buf.append( "\" maps to media-type \"" );
-buf.append( iPos->second );
+buf.append( elem.second );
 buf.append( "\" maps to backend " );
 const Reference xBackend(
-that->m_mediaType2backend.find( iPos->second )->second );
+that->m_mediaType2backend.find( elem.second )->second );
 allBackends.insert( xBackend );
 buf.append( Reference(
 xBackend, UNO_QUERY_THROW )
@@ -385,17 +381,15 @@ Reference 
PackageRegistryImpl::create(
 dp_misc::TRACE( buf.makeStringAndClear() + "\n");
 }
 dp_misc::TRACE( "> [dp_registry.cxx] ambiguous backends:\n\n" );
-for ( t_registryset::const_iterator iPos(
-  that->m_ambiguousBackends.begin() );
-  iPos != that->m_ambiguousBackends.end(); ++iPos )
+for (auto const& ambiguousBackend : that->m_ambiguousBackends)
 {
 OUStringBuffer buf;
 buf.append(
 Reference(
-*iPos, UNO_QUERY_THROW )->getImplementationName() );
+ambiguousBackend, UNO_QUERY_THROW 
)->getImplementationName() );
 buf.append( ": " );
 const Sequence< Reference > types(
-(*iPos)->getSupportedPackageTypes() );
+ambiguousBackend->getSupportedPackageTypes() );
 for ( sal_Int32 pos = 0; pos < types.getLength(); ++pos ) {
 Reference const & xInfo =
 types[ pos ];
@@ -425,10 +419,9 @@ Reference 
PackageRegistryImpl::create(
 void PackageRegistryImpl::update()
 {
 check();
-t_registryset::const_iterator iPos( m_allBackends.begin() );
-const t_registryset::const_iterator iEnd( m_allBackends.end() );
-for ( ; iPos != iEnd; ++iPos ) {
-const Reference xUpdatable( *iPos, UNO_QUERY );
+for (auto const& backend : m_allBackends)
+{
+const Reference xUpdatable(backend, UNO_QUERY);
 if (xUpdatable.is())
 xUpdatable->update();
 }
@@ -479,12 +472,10 @@ Reference 
PackageRegistryImpl::bindPackage(
 if (mediaType.isEmpty())
 {
 // try a

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

2018-03-06 Thread Noel Grandin
 sc/inc/appoptio.hxx |   24 -
 sc/source/core/data/document10.cxx  |2 
 sc/source/core/tool/appoptio.cxx|   24 -
 sc/source/core/tool/detfunc.cxx |8 +--
 sc/source/core/tool/viewopti.cxx|2 
 sc/source/filter/excel/xestyle.cxx  |8 +--
 sc/source/filter/excel/xiescher.cxx |2 
 sc/source/filter/excel/xistyle.cxx  |2 
 sc/source/filter/excel/xlstyle.cxx  |   34 ++---
 sc/source/filter/html/htmlexp.cxx   |2 
 sc/source/filter/inc/stylesbuffer.hxx   |   12 ++--
 sc/source/filter/inc/themebuffer.hxx|4 -
 sc/source/filter/inc/viewsettings.hxx   |2 
 sc/source/filter/oox/condformatbuffer.cxx   |   17 +-
 sc/source/filter/oox/pagesettings.cxx   |2 
 sc/source/filter/oox/stylesbuffer.cxx   |   52 ++--
 sc/source/filter/oox/themebuffer.cxx|8 +--
 sc/source/filter/oox/viewsettings.cxx   |4 -
 sc/source/filter/xcl97/xcl97rec.cxx |2 
 sc/source/filter/xml/xmlsceni.cxx   |6 --
 sc/source/ui/Accessibility/AccessibleCellBase.cxx   |8 +--
 sc/source/ui/Accessibility/AccessibleCsvControl.cxx |8 +--
 sc/source/ui/app/rfindlst.cxx   |4 -
 sc/source/ui/cctrl/cbuttonw.cxx |2 
 sc/source/ui/optdlg/opredlin.cxx|   18 +++---
 sc/source/ui/sidebar/CellBorderUpdater.cxx  |2 
 sc/source/ui/unoobj/cellsuno.cxx|4 -
 sc/source/ui/unoobj/condformatuno.cxx   |   13 +
 sc/source/ui/unoobj/confuno.cxx |2 
 sc/source/ui/unoobj/viewuno.cxx |4 -
 sc/source/ui/vba/vbaborders.cxx |2 
 sc/source/ui/vba/vbainterior.cxx|   19 +++
 sc/source/ui/vba/vbapalette.cxx |   16 +++---
 sc/source/ui/view/formatsh.cxx  |2 
 sc/source/ui/view/viewdata.cxx  |7 +-
 35 files changed, 154 insertions(+), 174 deletions(-)

New commits:
commit 9d1f56903b05841020dfae21dca0c686483b2494
Author: Noel Grandin 
Date:   Tue Mar 6 13:34:11 2018 +0200

use more Color in sc

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

diff --git a/sc/inc/appoptio.hxx b/sc/inc/appoptio.hxx
index cdc055e07ee2..43a75832be4b 100644
--- a/sc/inc/appoptio.hxx
+++ b/sc/inc/appoptio.hxx
@@ -57,14 +57,14 @@ public:
 voidSetDetectiveAuto( bool bNew )   { bDetectiveAuto = bNew; }
 boolGetDetectiveAuto() const{ return bDetectiveAuto; }
 
-voidSetTrackContentColor(sal_uInt32 nNew) { nTrackContentColor = 
nNew; }
-sal_uInt32  GetTrackContentColor() const { return nTrackContentColor; }
-voidSetTrackInsertColor(sal_uInt32 nNew)  { nTrackInsertColor = 
nNew;  }
-sal_uInt32  GetTrackInsertColor() const  { return nTrackInsertColor;  }
-voidSetTrackDeleteColor(sal_uInt32 nNew)  { nTrackDeleteColor = 
nNew;  }
-sal_uInt32  GetTrackDeleteColor() const  { return nTrackDeleteColor;  }
-voidSetTrackMoveColor(sal_uInt32 nNew){ nTrackMoveColor = 
nNew;}
-sal_uInt32  GetTrackMoveColor() const{ return nTrackMoveColor;}
+voidSetTrackContentColor(Color nNew) { nTrackContentColor = nNew; }
+Color   GetTrackContentColor() const { return nTrackContentColor; }
+voidSetTrackInsertColor(Color nNew)  { nTrackInsertColor = nNew;  }
+Color   GetTrackInsertColor() const  { return nTrackInsertColor;  }
+voidSetTrackDeleteColor(Color nNew)  { nTrackDeleteColor = nNew;  }
+Color   GetTrackDeleteColor() const  { return nTrackDeleteColor;  }
+voidSetTrackMoveColor(Color nNew){ nTrackMoveColor = nNew;}
+Color   GetTrackMoveColor() const{ return nTrackMoveColor;}
 
 ScLkUpdMode GetLinkMode() const { return eLinkMode ;}
 voidSetLinkMode( ScLkUpdMode nSet ) {   eLinkMode  = nSet;}
@@ -92,10 +92,10 @@ private:
 sal_uInt32  nStatusFunc;
 boolbAutoComplete;
 boolbDetectiveAuto;
-sal_uInt32  nTrackContentColor;
-sal_uInt32  nTrackInsertColor;
-sal_uInt32  nTrackDeleteColor;
-sal_uInt32  nTrackMoveColor;
+Color   nTrackContentColor;
+Color   nTrackInsertColor;
+Color   nTrackDeleteColor;
+Color   nTrackMoveColor;
 ScLkUpdMode eLinkMode;
 sal_Int32   nDefaultObjectSizeWidth;
 sal_Int32   nDefaultObjectSizeHeight;
diff --git a/sc/source/cor

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

2018-03-06 Thread Noel Grandin
 sd/qa/unit/import-tests.cxx|4 +-
 sd/source/core/EffectMigration.cxx |2 -
 sd/source/core/drawdoc4.cxx|2 -
 sd/source/filter/eppt/epptbase.hxx |2 -
 sd/source/filter/eppt/pptx-stylesheet.cxx  |   13 +++
 sd/source/filter/html/htmlex.cxx   |   10 ++---
 sd/source/filter/html/pubdlg.cxx   |   10 ++---
 sd/source/filter/ppt/ppt97animations.cxx   |6 ++-
 sd/source/filter/ppt/ppt97animations.hxx   |5 +-
 sd/source/filter/ppt/pptin.cxx |2 -
 sd/source/filter/ppt/pptinanimations.cxx   |4 +-
 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx |4 +-
 sd/source/ui/accessibility/AccessibleSlideSorterView.cxx   |4 +-
 sd/source/ui/animations/CustomAnimationDialog.cxx  |   10 ++---
 sd/source/ui/animations/motionpathtag.cxx  |2 -
 sd/source/ui/dlg/copydlg.cxx   |6 +--
 sd/source/ui/slideshow/slideshowimpl.cxx   |4 +-
 sd/source/ui/slidesorter/shell/SlideSorterService.cxx  |8 ++--
 sd/source/ui/slidesorter/view/SlideSorterView.cxx  |4 +-
 sd/source/ui/slidesorter/view/SlsTheme.cxx |   22 ++---
 sd/source/ui/unoidl/unoobj.cxx |2 -
 21 files changed, 64 insertions(+), 62 deletions(-)

New commits:
commit 1a41c0711d10bcfa45c7cd7d56c1e7f0055fa310
Author: Noel Grandin 
Date:   Tue Mar 6 13:18:13 2018 +0200

use more Color in sd

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

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 4fcc325b2370..bc343af65ba5 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -993,11 +993,11 @@ void SdImportTest::testBnc584721_4()
 // Get first run of the paragraph
 uno::Reference xRun( getRunFromParagraph (0, xParagraph 
) );
 uno::Reference< beans::XPropertySet > xPropSet( xRun, uno::UNO_QUERY_THROW 
);
-sal_Int32 nCharColor;
+Color nCharColor;
 xPropSet->getPropertyValue( "CharColor" ) >>= nCharColor;
 
 // Color should be black
-CPPUNIT_ASSERT_EQUAL( sal_Int32(COL_BLACK), nCharColor );
+CPPUNIT_ASSERT_EQUAL( COL_BLACK, nCharColor );
 
 xDocShRef->DoClose();
 }
diff --git a/sd/source/core/EffectMigration.cxx 
b/sd/source/core/EffectMigration.cxx
index 62b10a680f23..59f60cb21323 100644
--- a/sd/source/core/EffectMigration.cxx
+++ b/sd/source/core/EffectMigration.cxx
@@ -1019,7 +1019,7 @@ void EffectMigration::SetDimPrevious( SvxShape* pShape, 
bool bDimPrevious )
 Any aColor;
 
 if( bDimPrevious )
-aColor <<= static_cast(COL_LIGHTGRAY);
+aColor <<= COL_LIGHTGRAY;
 
 sd::MainSequencePtr pMainSequence = 
static_cast(pObj->GetPage())->getMainSequence();
 
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 7fda9ef61e67..bf9686b5a777 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -550,7 +550,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
 XHatchaNullHatch(aNullCol);
 
 rISet.Put(XFillStyleItem(drawing::FillStyle_SOLID));
-rISet.Put(XFillColorItem(OUString(), 0x00ff));
+rISet.Put(XFillColorItem(OUString(), Color(0x00ff)));
 
 vcl::Font aLatinFont, aCJKFont, aCTLFont;
 
diff --git a/sd/source/filter/eppt/epptbase.hxx 
b/sd/source/filter/eppt/epptbase.hxx
index b47d1a44fb4a..76f45a490da4 100644
--- a/sd/source/filter/eppt/epptbase.hxx
+++ b/sd/source/filter/eppt/epptbase.hxx
@@ -229,7 +229,7 @@ struct PPTExCharLevel
 sal_uInt16  mnAsianOrComplexFont;
 sal_uInt16  mnFontHeight;
 sal_uInt16  mnEscapement;
-sal_uInt32  mnFontColor;
+Color   mnFontColor;
 };
 
 struct PPTExCharSheet
diff --git a/sd/source/filter/eppt/pptx-stylesheet.cxx 
b/sd/source/filter/eppt/pptx-stylesheet.cxx
index e848deb77820..1dbd28ee8a11 100644
--- a/sd/source/filter/eppt/pptx-stylesheet.cxx
+++ b/sd/source/filter/eppt/pptx-stylesheet.cxx
@@ -102,8 +102,8 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 nLev, 
bool bSimpleText,
.WriteUInt16( rLev.mnFlags )
.WriteUInt16( rLev.mnFont );
 
-sal_uInt32 nFontColor = rLev.mnFontColor;
-if ( nFontColor == sal_uInt32(COL_AUTO) )
+Color nFontColor = rLev.mnFontColor;
+if ( nFontColor == COL_AUTO )
 {
 bool bIsDark = false;
 css::uno::Any aAny;
@@ -111,12 +111,11 @@ void PPTExCharSheet::Write( SvStream& rSt, sal_uInt16 
nLev, bool bSimpleText,
 aAny >>= bIsDark;
 nFontColor = bIsDark ? 0xff : 0x00;
 }
-nFontColor &= 0xff;
-nFontColor |= 0xfe00;
+nFontC

[Libreoffice-commits] core.git: sfx2/source slideshow/source starmath/source svl/source svtools/source

2018-03-06 Thread Noel Grandin
 sfx2/source/control/thumbnailviewacc.cxx   |8 +++---
 sfx2/source/dialog/backingwindow.cxx   |4 +--
 sfx2/source/sidebar/Tools.cxx  |4 +--
 slideshow/source/engine/shapes/gdimtftools.cxx |2 -
 starmath/source/accessibility.cxx  |   16 ++--
 starmath/source/dialog.cxx |4 +--
 starmath/source/tmpdevice.cxx  |2 -
 svl/source/numbers/numfmuno.cxx|6 ++--
 svtools/source/config/colorcfg.cxx |   32 ++---
 svtools/source/config/extcolorcfg.cxx  |2 -
 svtools/source/config/optionsdrawinglayer.cxx  |   16 ++--
 svtools/source/contnr/imivctl1.cxx |2 -
 svtools/source/control/accessibleruler.cxx |4 +--
 svtools/source/control/toolbarmenuacc.cxx  |8 +++---
 svtools/source/control/valueacc.cxx|   12 -
 svtools/source/dialogs/colrdlg.cxx |9 +--
 svtools/source/graphic/grfmgr2.cxx |4 +--
 svtools/source/uno/svtxgridcontrol.cxx |4 +--
 svtools/source/uno/unocontroltablemodel.cxx|2 -
 svtools/source/uno/unoiface.cxx|7 ++---
 20 files changed, 73 insertions(+), 75 deletions(-)

New commits:
commit 26a016be816826c80fc914a927758a814f29136c
Author: Noel Grandin 
Date:   Tue Mar 6 13:08:51 2018 +0200

use more Color in sfx2..svtools

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

diff --git a/sfx2/source/control/thumbnailviewacc.cxx 
b/sfx2/source/control/thumbnailviewacc.cxx
index 600e8d705e21..04a7435ccb54 100644
--- a/sfx2/source/control/thumbnailviewacc.cxx
+++ b/sfx2/source/control/thumbnailviewacc.cxx
@@ -394,14 +394,14 @@ void SAL_CALL ThumbnailViewAcc::grabFocus()
 sal_Int32 SAL_CALL ThumbnailViewAcc::getForeground(  )
 {
 ThrowIfDisposed();
-sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
 return static_cast(nColor);
 }
 
 sal_Int32 SAL_CALL ThumbnailViewAcc::getBackground(  )
 {
 ThrowIfDisposed();
-sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
 return static_cast(nColor);
 }
 
@@ -884,13 +884,13 @@ void SAL_CALL ThumbnailViewItemAcc::grabFocus()
 
 sal_Int32 SAL_CALL ThumbnailViewItemAcc::getForeground(  )
 {
-sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor().GetColor();
+Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowTextColor();
 return static_cast(nColor);
 }
 
 sal_Int32 SAL_CALL ThumbnailViewItemAcc::getBackground(  )
 {
-return 
static_cast(Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor());
+return 
static_cast(Application::GetSettings().GetStyleSettings().GetWindowColor());
 }
 
 sal_Int64 SAL_CALL ThumbnailViewItemAcc::getSomething( const uno::Sequence< 
sal_Int8 >& rId )
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 8966a27face4..d2a30e25acdf 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -72,7 +72,7 @@ float const fMultiplier = 1.4f;
 BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 Window( i_pParent ),
 mbLocalViewInitialized(false),
-
maButtonsTextColor(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get()),
+
maButtonsTextColor(Color(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get())),
 mbInitControls( false )
 {
 m_pUIBuilder.reset(new VclBuilder(this, getUIRootDir(), 
"sfx/ui/startcenter.ui", "StartCenter" ));
@@ -279,7 +279,7 @@ void BackingWindow::initControls()
 mpHelpButton->SetControlForeground(maButtonsTextColor);
 mpExtensionsButton->SetControlForeground(maButtonsTextColor);
 
-const Color 
aButtonsBackground(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
+const Color aButtonsBackground = 
Color(officecfg::Office::Common::Help::StartCenter::StartCenterBackgroundColor::get());
 
 mpAllButtonsBox->SetBackground(aButtonsBackground);
 mpSmallButtonsBox->SetBackground(aButtonsBackground);
diff --git a/sfx2/source/sidebar/Tools.cxx b/sfx2/source/sidebar/Tools.cxx
index deeb3eb56808..727cd6f24bec 100644
--- a/sfx2/source/sidebar/Tools.cxx
+++ b/sfx2/source/sidebar/Tools.cxx
@@ -97,8 +97,8 @@ Gradient Tools::AwtToVclGradient (const css::awt::Gradient& 
rAwtGradient)
 {
 Gradient aVclGradient (
 GradientStyle(rAwtGradient.Style),
-rAwtGradient.StartColor,
-rAwtGradient.EndColor);
+Color(rAwtGradient.StartColor),

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

2018-03-06 Thread Noel Grandin
 sw/inc/unosett.hxx   |4 ++--
 sw/source/core/access/acccell.cxx|6 +++---
 sw/source/core/access/accpara.cxx|   10 +-
 sw/source/core/access/acctable.cxx   |6 +++---
 sw/source/core/doc/docfmt.cxx|2 +-
 sw/source/core/edit/edfcol.cxx   |2 +-
 sw/source/core/layout/atrfrm.cxx |2 +-
 sw/source/core/text/inftxt.cxx   |4 ++--
 sw/source/core/txtnode/fntcache.cxx  |   12 ++--
 sw/source/core/unocore/unosett.cxx   |2 +-
 sw/source/core/view/viewimp.cxx  |2 +-
 sw/source/filter/html/css1atr.cxx|6 +++---
 sw/source/filter/html/htmlatr.cxx|4 ++--
 sw/source/filter/html/htmlform.cxx   |2 +-
 sw/source/filter/html/wrthtml.cxx|6 +++---
 sw/source/filter/inc/wrtswtbl.hxx|2 +-
 sw/source/filter/writer/wrtswtbl.cxx |4 ++--
 sw/source/filter/ww8/docxattributeoutput.cxx |2 +-
 sw/source/filter/ww8/rtfattributeoutput.cxx  |   10 +-
 sw/source/filter/ww8/rtfexport.cxx   |4 ++--
 sw/source/filter/ww8/wrtw8esh.cxx|2 +-
 sw/source/filter/ww8/wrtww8.cxx  |2 +-
 sw/source/filter/ww8/ww8atr.cxx  |   14 +++---
 sw/source/filter/ww8/ww8par.hxx  |4 ++--
 sw/source/filter/ww8/ww8par2.cxx |   10 +-
 sw/source/filter/ww8/ww8par3.cxx |2 +-
 sw/source/filter/ww8/ww8par6.cxx |   22 +++---
 sw/source/filter/ww8/ww8scan.cxx |2 +-
 sw/source/filter/ww8/ww8struc.hxx|7 ++-
 sw/source/filter/xml/xmlexpit.cxx|2 +-
 sw/source/filter/xml/xmlimpit.cxx|4 +---
 sw/source/filter/xml/xmlithlp.cxx|3 +--
 sw/source/ui/config/optpage.cxx  |   10 +-
 sw/source/uibase/app/docsh2.cxx  |2 +-
 sw/source/uibase/config/modcfg.cxx   |   10 +-
 sw/source/uibase/config/usrpref.cxx  |4 ++--
 sw/source/uibase/config/viewopt.cxx  |2 +-
 sw/source/uibase/docvw/AnnotationWin2.cxx|2 +-
 sw/source/uibase/utlui/shdwcrsr.cxx  |2 +-
 sw/source/uibase/utlui/uiitems.cxx   |7 ---
 40 files changed, 104 insertions(+), 101 deletions(-)

New commits:
commit 9a97b9c051735afb3797888d111f1b6b2cab1a83
Author: Noel Grandin 
Date:   Tue Mar 6 11:09:21 2018 +0200

use more Color in sw

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

diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index 295eb06fe671..bf83e499f7b7 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -256,7 +256,7 @@ class SwXTextColumns : public cppu::WeakAggImplHelper4
 
 //separator line
 sal_Int32   nSepLineWidth;
-sal_Int32   nSepLineColor;
+Color   nSepLineColor;
 sal_Int8nSepLineHeightRelative;
 css::style::VerticalAlignment nSepLineVertAlign;
 boolbSepLineIsOn;
@@ -295,7 +295,7 @@ public:
 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() 
override;
 
 sal_Int32   GetSepLineWidth() const {return nSepLineWidth;}
-sal_Int32   GetSepLineColor() const {return nSepLineColor;}
+Color   GetSepLineColor() const {return nSepLineColor;}
 sal_Int8GetSepLineHeightRelative() const {return
nSepLineHeightRelative;}
 css::style::VerticalAlignment GetSepLineVertAlign() const {return 
nSepLineVertAlign;}
 boolGetSepLineIsOn() const {return  bSepLineIsOn;}
diff --git a/sw/source/core/access/acccell.cxx 
b/sw/source/core/access/acccell.cxx
index 90fff856bf2e..f75a6fda8cdd 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -418,7 +418,7 @@ sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
 SolarMutexGuard g;
 
 const SvxBrushItem &rBack = GetFrame()->GetAttrSet()->GetBackground();
-sal_uInt32 crBack = rBack.GetColor().GetColor();
+Color crBack = rBack.GetColor();
 
 if (COL_AUTO == crBack)
 {
@@ -428,11 +428,11 @@ sal_Int32 SAL_CALL SwAccessibleCell::getBackground()
 uno::Reference xCompoentDoc(xAccDoc, 
uno::UNO_QUERY);
 if (xCompoentDoc.is())
 {
-crBack = 
static_cast(xCompoentDoc->getBackground());
+crBack = Color(xCompoentDoc->getBackground());
 }
 }
 }
-return crBack;
+return sal_Int32(crBack);
 }
 
 // XAccessibleSelection
diff --git a/sw/source/core/access/accpara.cxx 
b/sw/source/core/access/accpara.cxx
index 0b35cdf968c9..beb170862692 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.

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

2018-03-06 Thread Noel Grandin
 vcl/inc/svdata.hxx |   12 ++--
 vcl/qa/cppunit/BitmapProcessorTest.cxx |2 +-
 vcl/qa/cppunit/BitmapTest.cxx  |2 +-
 vcl/source/app/settings.cxx|2 +-
 vcl/source/control/button.cxx  |   24 
 vcl/source/gdi/gdimetafiletools.cxx|2 +-
 vcl/source/gdi/gdimtf.cxx  |6 +++---
 vcl/source/gdi/pngread.cxx |2 +-
 vcl/source/window/decoview.cxx |2 +-
 vcl/win/window/salframe.cxx|4 ++--
 vcl/workben/vcldemo.cxx|   10 +-
 11 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit b3ee860e523dce3df16350a4053a67f39c2f92f8
Author: Noel Grandin 
Date:   Tue Mar 6 10:42:13 2018 +0200

use more Color in vcl

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

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index a074b3ce937f..42300a1e56e2 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -232,12 +232,12 @@ struct ImplSVCtrlData
 ImplTBDragMgr*  mpTBDragMgr = nullptr;  // DragMgr for 
ToolBox
 sal_uInt16  mnCheckStyle = 0;   // CheckBox-Style 
for ImageList-Update
 sal_uInt16  mnRadioStyle = 0;   // Radio-Style for 
ImageList-Update
-sal_uLong   mnLastCheckFColor = 0;  // Last FaceColor 
for CheckImage
-sal_uLong   mnLastCheckWColor = 0;  // Last 
WindowColor for CheckImage
-sal_uLong   mnLastCheckLColor = 0;  // Last LightColor 
for CheckImage
-sal_uLong   mnLastRadioFColor = 0;  // Last FaceColor 
for RadioImage
-sal_uLong   mnLastRadioWColor = 0;  // Last 
WindowColor for RadioImage
-sal_uLong   mnLastRadioLColor = 0;  // Last LightColor 
for RadioImage
+Color   mnLastCheckFColor;  // Last FaceColor 
for CheckImage
+Color   mnLastCheckWColor;  // Last 
WindowColor for CheckImage
+Color   mnLastCheckLColor;  // Last LightColor 
for CheckImage
+Color   mnLastRadioFColor;  // Last FaceColor 
for RadioImage
+Color   mnLastRadioWColor;  // Last 
WindowColor for RadioImage
+Color   mnLastRadioLColor;  // Last LightColor 
for RadioImage
 FieldUnitStringList*mpFieldUnitStrings = nullptr;   // list with field 
units
 FieldUnitStringList*mpCleanUnitStrings = nullptr;   // same list but 
with some "fluff" like spaces removed
 };
diff --git a/vcl/qa/cppunit/BitmapProcessorTest.cxx 
b/vcl/qa/cppunit/BitmapProcessorTest.cxx
index 558401f84771..300302d41d60 100644
--- a/vcl/qa/cppunit/BitmapProcessorTest.cxx
+++ b/vcl/qa/cppunit/BitmapProcessorTest.cxx
@@ -50,7 +50,7 @@ void BitmapProcessorTest::testDisabledImage()
 {
 Bitmap::ScopedReadAccess pReadAccess(aDisabledBitmap);
 Color aColor(pReadAccess->GetPixel(0, 0).GetColor());
-CPPUNIT_ASSERT_EQUAL(sal_uInt32(0x001E1E1E), sal_uInt32(aColor));
+CPPUNIT_ASSERT_EQUAL(Color(0x001E1E1E), aColor);
 }
 }
 
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 5af967052326..3f112fa6f86b 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -484,7 +484,7 @@ void BitmapTest::testCRC()
 #endif
 
 // a 1x1 black & white checkerboard
-aVDev->DrawCheckered(Point(), aVDev->GetOutputSizePixel(), 1, 1);
+aVDev->DrawCheckered(Point(), aVDev->GetOutputSizePixel(), 1, Color(0, 0, 
1));
 Bitmap aChecker = getAsBitmap(aVDev);
 checkAndInsert(aCRCs, aChecker, "checkerboard");
 aChecker.Invert();
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index f7c35931ee60..f9eaf47ce645 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2159,7 +2159,7 @@ static void setupPersonaHeaderFooter( WhichPersona 
eWhich, OUString& rHeaderFoot
 if ( nIndex > 0 )
 {
 OUString aColor = aPersonaSettings.getToken( 0, ';', ++nIndex );
-rMenuBarTextColor = Color( aColor.toUInt64( 16 ) );
+rMenuBarTextColor = Color( aColor.toUInt32( 16 ) );
 }
 }
 
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index bffbd1e93b66..35400b70ed8a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2756,15 +2756,15 @@ Image RadioButton::GetRadioImage( const AllSettings& 
rSettings, DrawButtonFlags
 
 if ( pSVData->maCtrlData.maRadioImgList.empty() ||
  (pSVData->maCtrlData.mnRadioStyle != nStyle) ||
- (pSVData->maCtrlData.mnLastRadioFColor != 
rStyleSettings.GetFaceColor().GetColor()) ||
- (pSV

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

2018-03-06 Thread Noel Grandin
 sw/source/core/unocore/unomap1.cxx |3 +--
 sw/source/uibase/utlui/uiitems.cxx |   11 +++
 xmloff/source/style/XMLFootnoteSeparatorExport.cxx |3 +--
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2407c183092d6559771738891d57d6375c4212ab
Author: Noel Grandin 
Date:   Tue Mar 6 14:16:48 2018 +0100

Revert "tdf#115432 footnote separator position remain in the left side"

This reverts commit d4a8d91abd40dee7f7bd739a678a502a6e34cb59.

because it changes the type of an UNO property defined in a published IDL 
file

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

diff --git a/sw/source/core/unocore/unomap1.cxx 
b/sw/source/core/unocore/unomap1.cxx
index 522a9bc8610e..fbe12b66844e 100644
--- a/sw/source/core/unocore/unomap1.cxx
+++ b/sw/source/core/unocore/unomap1.cxx
@@ -58,7 +58,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -584,7 +583,7 @@ const SfxItemPropertyMapEntry*  
SwUnoPropertyMapProvider::GetPageStylePropertyMa
 { OUString(UNO_NAME_FOOTNOTE_LINE_COLOR), FN_PARAM_FTN_INFO,
cppu::UnoType::get(),   PROPERTY_NONE , MID_LINE_COLOR},
 { OUString(UNO_NAME_FOOTNOTE_LINE_STYLE), FN_PARAM_FTN_INFO,
cppu::UnoType::get(),PROPERTY_NONE , MID_FTN_LINE_STYLE},
 { OUString(UNO_NAME_FOOTNOTE_LINE_RELATIVE_WIDTH), FN_PARAM_FTN_INFO,  
 cppu::UnoType::get(),PROPERTY_NONE , 
MID_LINE_RELWIDTH},
-{ OUString(UNO_NAME_FOOTNOTE_LINE_ADJUST), FN_PARAM_FTN_INFO,   
cppu::UnoType::get(),   PROPERTY_NONE , 
MID_LINE_ADJUST },
+{ OUString(UNO_NAME_FOOTNOTE_LINE_ADJUST), FN_PARAM_FTN_INFO,   
cppu::UnoType::get(),   PROPERTY_NONE , MID_LINE_ADJUST },
 { OUString(UNO_NAME_FOOTNOTE_LINE_TEXT_DISTANCE), FN_PARAM_FTN_INFO,   
 cppu::UnoType::get(),   PROPERTY_NONE , MID_LINE_TEXT_DIST  
 |CONVERT_TWIPS },
 { OUString(UNO_NAME_FOOTNOTE_LINE_DISTANCE), FN_PARAM_FTN_INFO,
 cppu::UnoType::get(),   PROPERTY_NONE , 
MID_LINE_FOOTNOTE_DIST|CONVERT_TWIPS},
 { OUString(UNO_NAME_WRITING_MODE), RES_FRAMEDIR, 
cppu::UnoType::get(), PROPERTY_NONE, 0 },
diff --git a/sw/source/uibase/utlui/uiitems.cxx 
b/sw/source/uibase/utlui/uiitems.cxx
index eb1d80be738f..8b3f02a74b8a 100644
--- a/sw/source/uibase/utlui/uiitems.cxx
+++ b/sw/source/uibase/utlui/uiitems.cxx
@@ -18,7 +18,6 @@
  */
 
 #include 
-#include 
 #include 
 
 #include 
@@ -87,7 +86,7 @@ bool SwPageFootnoteInfoItem::QueryValue( Any& rVal, sal_uInt8 
nMemberId ) const
 rVal <<= static_cast(static_cast(aTmp));
 }
 break;
-case MID_LINE_ADJUST   : rVal <<= 
aFootnoteInfo.GetAdj();break;//text::HorizontalAdjust
+case MID_LINE_ADJUST   : rVal <<= 
static_cast(aFootnoteInfo.GetAdj());break;//text::HorizontalAdjust
 case MID_LINE_TEXT_DIST: rVal <<= 
static_cast(convertTwipToMm100(aFootnoteInfo.GetTopDist()));break;
 case MID_LINE_FOOTNOTE_DIST: rVal <<= 
static_cast(convertTwipToMm100(aFootnoteInfo.GetBottomDist()));break;
 case MID_FTN_LINE_STYLE:
@@ -157,8 +156,12 @@ bool SwPageFootnoteInfoItem::PutValue(const Any& rVal, 
sal_uInt8 nMemberId)
 break;
 case MID_LINE_ADJUST   :
 {
-text::HorizontalAdjust nSet = 
*o3tl::forceAccess(rVal);
-aFootnoteInfo.SetAdj(nSet);
+sal_Int16 nSet = 0;
+rVal >>= nSet;
+if(nSet >= 0 && nSet < 3) //text::HorizontalAdjust
+
aFootnoteInfo.SetAdj(static_cast(nSet));
+else
+bRet = false;
 }
 break;
 case MID_FTN_LINE_STYLE:
diff --git a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx 
b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
index edf57dd3a6bd..5446398e5e72 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorExport.cxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 
 
 using namespace ::com::sun::star;
@@ -76,7 +75,7 @@ void XMLFootnoteSeparatorExport::exportXML(
 switch (rMapper->GetEntryContextId(rState.mnIndex))
 {
 case CTF_PM_FTN_LINE_ADJUST:
-eLineAdjust = 
*o3tl::forceAccess(rState.maValue);
+rState.maValue >>= eLineAdjust;
 break;
 case CTF_PM_FTN_LINE_COLOR:
 rState.maValue >>= nLineColor;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - icc/makefile.mk icc/SampleICC-1.3.2-Win64.patch salhelper/source

2018-03-06 Thread Damjan Jovanovic
 icc/SampleICC-1.3.2-Win64.patch |   11 +++
 icc/makefile.mk |2 -
 salhelper/source/makefile.mk|2 +
 salhelper/source/mscx.map   |   58 
 4 files changed, 72 insertions(+), 1 deletion(-)

New commits:
commit 4fd38c7a96b91bdce3804a490e6f4b643000c212
Author: Damjan Jovanovic 
Date:   Wed Mar 7 04:37:48 2018 +

Patch main/icc to build on Win64.

Patch by: me

diff --git a/icc/SampleICC-1.3.2-Win64.patch b/icc/SampleICC-1.3.2-Win64.patch
new file mode 100644
index ..ad1c8a54f81c
--- /dev/null
+++ b/icc/SampleICC-1.3.2-Win64.patch
@@ -0,0 +1,11 @@
+--- misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h 2018-03-07 
06:19:39.296824700 +0200
 misc/build/SampleICC-1.3.2/IccProfLib/IccProfLibConf.h 2018-03-07 
06:33:33.075513600 +0200
+@@ -80,7 +80,7 @@
+ #endif
+ 
+ //PC, visual C++
+-#if defined(_MSC_VER) && !defined(__MWERKS__) && defined(_M_IX86)
++#if defined(_MSC_VER) && !defined(__MWERKS__) && (defined(_M_IX86) || 
defined(_M_AMD64))
+ 
+   //Define how 64 bit integers are represented
+   #define ICCUINT64 unsigned __int64
diff --git a/icc/makefile.mk b/icc/makefile.mk
index 40e849058e27..3b6d3102c75f 100644
--- a/icc/makefile.mk
+++ b/icc/makefile.mk
@@ -34,7 +34,7 @@ TARGET=icc
 
 TARFILE_NAME=SampleICC-1.3.2
 TARFILE_MD5=fdb27bfe2dbe2e7b57ae194d9bf36bab
-PATCH_FILES=$(TARFILE_NAME).patch $(TARFILE_NAME).format-security.patch
+PATCH_FILES=$(TARFILE_NAME).patch $(TARFILE_NAME).format-security.patch 
SampleICC-1.3.2-Win64.patch
 
 CONVERTFILES= \
 IccProfLib$/IccTagProfSeqId.h \
commit fbff6744fa4f49e5a3389a1c1d174b2a9914a211
Author: Damjan Jovanovic 
Date:   Wed Mar 7 04:15:14 2018 +

Add a linker map file for salhelper on Win64.

Patch by: me

diff --git a/salhelper/source/makefile.mk b/salhelper/source/makefile.mk
index 440bc6c2b11e..2f9ed8485e98 100644
--- a/salhelper/source/makefile.mk
+++ b/salhelper/source/makefile.mk
@@ -64,6 +64,8 @@ DEF1NAME= $(SHL1TARGET)
 
 .IF "$(COMNAME)"=="msci"
 SHL1VERSIONMAP=msci.map
+.ELIF "$(COMNAME)"=="mscx"
+SHL1VERSIONMAP=mscx.map
 .ELIF "$(GUI)"=="OS2"
 SHL1VERSIONMAP=gcc3os2.map
 .ELIF "$(COMNAME)"=="sunpro5"
diff --git a/salhelper/source/mscx.map b/salhelper/source/mscx.map
new file mode 100644
index ..a9d950b11e89
--- /dev/null
+++ b/salhelper/source/mscx.map
@@ -0,0 +1,58 @@
+###
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+###
+UDK_3_0_0 {
+global:
+GetVersionInfo
+??0ORealDynamicLoader@salhelper@@IEAA@PEAPEAV01@AEBVOUString@rtl@@1PEAX2@Z
+??1ORealDynamicLoader@salhelper@@MEAA@XZ
+??_7ORealDynamicLoader@salhelper@@6B@
+?acquire@ORealDynamicLoader@salhelper@@QEAAKXZ
+?getApi@ORealDynamicLoader@salhelper@@QEBAPEAXXZ
+?newInstance@ORealDynamicLoader@salhelper@@SAPEAV12@PEAPEAV12@AEBVOUString@rtl@@1@Z
+?release@ORealDynamicLoader@salhelper@@QEAAKXZ
+??1SimpleReferenceObject@salhelper@@MEAA@XZ
+??2SimpleReferenceObject@salhelper@@SAPEAX_K@Z
+??2SimpleReferenceObject@salhelper@@SAPEAX_KAEBUnothrow_t@std@@@Z
+??3SimpleReferenceObject@salhelper@@SAXPEAX@Z
+??3SimpleReferenceObject@salhelper@@SAXPEAXAEBUnothrow_t@std@@@Z
+local:
+*;
+};
+
+UDK_3.1 {
+global:
+??_7SimpleReferenceObject@salhelper@@6B@;
+
+??0Condition@salhelper@@QEAA@AEAVMutex@osl@@@Z;
+??1Condition@salhelper@@UEAA@XZ;
+
+??0ConditionModifier@salhelper@@QEAA@AEAVCondition@1@@Z;
+??1ConditionModifier@salhelper@@QEAA@XZ
+
+??0ConditionWaiter@salhelper@@QEAA@AEAVCondition@1@@Z;
+??0ConditionWaiter@salhelper@@QEAA@AEAVCondition@1@K@Z;
+??1ConditionWaiter@salhelper@@QEAA@XZ
+
+??0timedout@ConditionWaiter@salhelper@@QEAA@XZ;
+??0timedout@ConditionWaiter@salhelper@@QEAA@AEBU012@@Z;
+??1timedout@ConditionWaiter@salhelper@@UEAA@XZ;
+??4timedout@ConditionWaiter@salhelper@@QEAAAEAU012@AEBU012@@Z;
+} UDK_3_0_0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/list

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

2018-03-06 Thread Tomaž Vajngerl
 include/oox/drawingml/shapepropertymap.hxx |   16 
 include/oox/helper/modelobjecthelper.hxx   |5 -
 oox/source/drawingml/fillproperties.cxx|8 
 oox/source/drawingml/shapepropertymap.cxx  |   18 +-
 oox/source/helper/modelobjecthelper.cxx|   15 ---
 5 files changed, 21 insertions(+), 41 deletions(-)

New commits:
commit e092c72b44d99ea5c6c7f71cd717b20a4a86f5ac
Author: Tomaž Vajngerl 
Date:   Tue Mar 6 20:02:05 2018 +0900

oox: rename FillBitmapUrl to FillBitmap, remove obsolete methods

Change-Id: I597aaa280ef12e46cf2d060cef1b042413d838d4
Reviewed-on: https://gerrit.libreoffice.org/50851
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/oox/drawingml/shapepropertymap.hxx 
b/include/oox/drawingml/shapepropertymap.hxx
index 8ba077ea3d27..2fb237cd496f 100644
--- a/include/oox/drawingml/shapepropertymap.hxx
+++ b/include/oox/drawingml/shapepropertymap.hxx
@@ -64,7 +64,7 @@ enum class ShapeProperty
 FillTransparency,
 GradientTransparency,
 FillGradient, /// Explicit fill gradient or name of a fill 
gradient stored in a global container.
-FillBitmapUrl,/// Explicit fill bitmap URL or name of a 
fill bitmap URL stored in a global container.
+FillBitmap,   /// Explicit fill bitmap or name of a fill 
bitmap stored in a global container.
 FillBitmapMode,
 FillBitmapSizeX,
 FillBitmapSizeY,
@@ -73,7 +73,7 @@ enum class ShapeProperty
 FillBitmapRectanglePoint,
 FillHatch,
 ShadowXDistance,
-FillBitmapNameFromUrl,
+FillBitmapName,
 FillBackground,
 LAST = FillBackground
 };
@@ -86,13 +86,13 @@ struct OOX_DLLPUBLIC ShapePropertyInfo
 bool mbNamedLineMarker;  /// True = use named line marker instead of 
explicit line marker.
 bool mbNamedLineDash;/// True = use named line dash instead of 
explicit line dash.
 bool mbNamedFillGradient;/// True = use named fill gradient instead of 
explicit fill gradient.
-bool mbNamedFillBitmapUrl;   /// True = use named fill bitmap URL instead 
of explicit fill bitmap URL.
+bool mbNamedFillBitmap;  /// True = use named fill bitmap instead of 
explicit fill bitmap.
 
 static ShapePropertyInfo DEFAULT;   /// Default property info 
(used as default parameter of other methods).
 
 explicit ShapePropertyInfo(const ShapePropertyIds& rnPropertyIds,
bool bNamedLineMarker, bool bNamedLineDash,
-   bool bNamedFillGradient, bool 
bNamedFillBitmapUrl);
+   bool bNamedFillGradient, bool bNamedFillBitmap);
 
 bool has(ShapeProperty ePropId) const
 {
@@ -143,10 +143,10 @@ private:
 bool setFillGradient( sal_Int32 nPropId, const css::uno::Any& rValue );
 /** Creates a named transparency gradient. */
 bool setGradientTrans( sal_Int32 nPropId, const css::uno::Any& rValue );
-/** Sets an explicit fill bitmap URL, or creates a named fill bitmap URL. 
*/
-bool setFillBitmapUrl( sal_Int32 nPropId, const css::uno::Any& rValue );
-/** Sets an explicit fill bitmap URL and pushes the name to FillBitmapName 
*/
-bool setFillBitmapNameFromUrl( const css::uno::Any& rValue );
+/** Sets an explicit fill bitmap, or creates a named fill bitmap. */
+bool setFillBitmap( sal_Int32 nPropId, const css::uno::Any& rValue );
+/** Sets an explicit fill bitmap and pushes the name to FillBitmapName */
+bool setFillBitmapName( const css::uno::Any& rValue );
 
 // not implemented, to prevent implicit conversion from enum to int
 css::uno::Any& operator[]( ShapeProperty ePropId ) = delete;
diff --git a/include/oox/helper/modelobjecthelper.hxx 
b/include/oox/helper/modelobjecthelper.hxx
index 694bdf13ddb7..eb9c7ba97228 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -105,15 +105,10 @@ public:
 
 OUString insertTransGrandient( const css::awt::Gradient& rGradient );
 
-/** Inserts a new named fill bitmap URL, returns the bitmap name, based on
-an internal constant name with a new unused index appended. */
-OUString insertFillBitmapUrl( const OUString& rGraphicUrl );
-
 /** Inserts a new named fill graphic, returns the bitmap name, based on
 an internal constant name with a new unused index appended. */
 OUString 
insertFillBitmapXGraphic(css::uno::Reference const & 
rxGraphic);
 
-OUString getFillBitmapUrl( const OUString& rGraphicName );
 css::uno::Reference getFillBitmap(OUString const & 
rGraphicName);
 
 private:
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index c22654ebeb6f..9ba7e46ac215 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -598,7 +598,7 @@ void FillProperties::pushToPropMap( ShapePro

[Libreoffice-commits] core.git: include/sfx2 shell/Executable_senddoc.mk shell/Library_smplmail.mk shell/source

2018-03-06 Thread Mike Kaganski
 include/sfx2/strings.hrc |3 
 shell/Executable_senddoc.mk  |4 
 shell/Library_smplmail.mk|3 
 shell/source/win32/simplemail/senddoc.cxx|  170 +--
 shell/source/win32/simplemail/smplmailclient.cxx |  120 +++-
 shell/source/win32/simplemail/smplmailclient.hxx |7 
 6 files changed, 287 insertions(+), 20 deletions(-)

New commits:
commit 2f061dad7f875f704e3744fc5780c1d145b22e9f
Author: Mike Kaganski 
Date:   Tue Feb 27 23:40:15 2018 +0300

tdf#116074: Don't block on sending email interactively

When sending e-mail using a MAPI mail client that doesn't recognize
MAPI_DIALOG_MODELESS flag, and doesn't return from MAPISendMail until
message compose dialog is closed (like MS Outlook 2010 and older),
waiting for the senddoc process blocks UI, which is unexpected and
prevents users from copying stuff from documents to the mail body.

Waiting for senddoc process completion is used for two things:
1. To serialize sending multiple mails (e.g., using mailmerge);
2. To show error in case when it failed.

This patch allows to avoid blocking the UI in case when compose UI is
requested - i.e., user interaction with the mail client is expected,
and serialization is not required. In this case, the senddoc process
will show the error message itself -> no need for main application to
wait for its return. The error message now includes actual error code.

To avoid cases when closing main program would remove temporary
attachment files before they were used by mail client, they are
copied to base temporary directory (instead of default session
temporary directory that gets deleted upon program shutdown).
senddoc cleans up its temporaries itself.

The temporary attachment files are copied to files with ASCII-only
filenames, and their original filenames are passed to mail clients
using MAPI. This allows to avoid cases when the filenames contain
characters outside of current Windows codepage, and the mail client
does not support Unicode MAPI, thus receiving wrong filename and
erroring out from the send.

Change-Id: I4a517bd7a797e76e4c0b7ea48bb1a7b652741a81
Reviewed-on: https://gerrit.libreoffice.org/50826
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/include/sfx2/strings.hrc b/include/sfx2/strings.hrc
index 4e8346b209a5..e5532815f63e 100644
--- a/include/sfx2/strings.hrc
+++ b/include/sfx2/strings.hrc
@@ -234,6 +234,9 @@
 #define STR_PRINT_NEWORISIZENC_("STR_PRINT_NEWORISIZE", 
"The page size and orientation have been modified.\nWould you like to save the 
new settings in the\nactive document?")
 #define STR_CANT_CLOSE  NC_("STR_CANT_CLOSE", "The 
document cannot be closed because a\n print job is being carried out.")
 #define STR_ERROR_SEND_MAIL NC_("STR_ERROR_SEND_MAIL", "An 
error occurred in sending the message. Possible errors could be a missing user 
account or a defective setup.\nPlease check the %PRODUCTNAME settings or your 
e-mail program settings.")
+// Error codes look like "MAPI_E_FAILURE" or "1234"
+#define STR_ERROR_SEND_MAIL_CODE
NC_("STR_ERROR_SEND_MAIL_CODE", "An error occurred in sending the message. 
Possible errors could be a missing user account or a defective setup.\n\nError 
code is $1")
+#define STR_ERROR_SEND_MAIL_HEADER  
NC_("STR_ERROR_SEND_MAIL_HEADER", "Error sending mail")
 #define STR_QUERY_OPENASTEMPLATE
NC_("STR_QUERY_OPENASTEMPLATE", "This document cannot be edited, possibly due 
to missing access rights. Do you want to edit a copy of the document?")
 #define STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE   
NC_("STR_QUERY_OPENASTEMPLATE_ALLOW_IGNORE", "This document cannot be edited, 
because it is locked in another session. Do you want to edit a copy of the 
document?\n\nYou can also try to ignore the lock and open the file for 
editing.")
 #define STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN   
NC_("STR_QUERY_OPENASTEMPLATE_OPENCOPY_BTN", "Open ~Copy")
diff --git a/shell/Executable_senddoc.mk b/shell/Executable_senddoc.mk
index f51c8441aada..4b8c5e3d18bb 100644
--- a/shell/Executable_senddoc.mk
+++ b/shell/Executable_senddoc.mk
@@ -13,8 +13,12 @@ $(eval $(call gb_Executable_use_system_win32_libs,senddoc,\
kernel32 \
 ))
 
+$(eval $(call gb_Executable_use_sdk_api,senddoc))
+
 $(eval $(call gb_Executable_use_libraries,senddoc,\
+   i18nlangtag \
sal \
+   utl \
 ))
 
 $(eval $(call gb_Executable_add_exception_objects,senddoc,\
diff --git a/shell/Library_smplmail.mk b/shell/Library_smplmail.mk
index d68f0a65e8ec..fa8c222943ed 100644
--- a/shell/Library_smplmail.mk
+++ b/shell/Library_smplmail.mk
@@ -18,7 +18,10 @@ $(eval $(call gb_Library_use_system_win32_libs,smplmail,\
 $(eval $(call gb_Library_use_librarie

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - icu/createmakWin64.cfg icu/makefile.mk

2018-03-06 Thread Damjan Jovanovic
 icu/createmakWin64.cfg |  452 +
 icu/makefile.mk|4 
 2 files changed, 456 insertions(+)

New commits:
commit ef2aacc05233f278a9f25c93f3ad4674aa1431da
Author: Damjan Jovanovic 
Date:   Wed Mar 7 02:27:01 2018 +

Get main/icu building on Win64.

Patch by: me

diff --git a/icu/createmakWin64.cfg b/icu/createmakWin64.cfg
new file mode 100644
index ..3c98ec3c1af3
--- /dev/null
+++ b/icu/createmakWin64.cfg
@@ -0,0 +1,452 @@
+[Copy]
+SOURCE=
+InputPath=
+"" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+
+
+[Deps]
+SOURCE=.\.
+"$(INTDIR)\.obj": $(SOURCE) "$(INTDIR)" 
+
+[Cpp]
+CPP=cl.exe
+[Link]
+LINK32=link.exe
+[CDefs_Common]
+
+[RSC_Template]
+RSC=rc.exe
+RSC_PROJ=/l 0x409 /fo"$(INTDIR)\.res" /i "..\common" /d "NDEBUG"
+SOURCE=
+"$(INTDIR)\.res" : $(SOURCE) "$(INTDIR)"
+   $(RSC) $(RSC_PROJ) $(SOURCE)
+
+[General_CFlags]
+CPP_PROJ_INCLUDES=
+CDEFS=
+COPT=-nologo -O2 -Ob2
+CPDBOBJ=-FD -Fo"$(INTDIR)\\" -Fd"$(INTDIR)\\"
+CTOOLSFLAGS=-nologo -W3 $(EXCEPTIONSWITCH) $(CPP_PROJ_INCLUDES) $(CDEFS) 
$(CPDBOBJ) -c
+CDEF1FLAGS= -D "_WINDOWS" -D "_MBCS"
+
+[CFlags_common]
+CPP_PROJ=-nologo -MD -Za -Zi -W3 -GF -O2 -Ob2 $(EXCEPTIONSWITCH) 
$(CPP_PROJ_INCLUDES) $(CDEFS) $(CPDBOBJ) -c
+
+[CFlags_i18n]
+CPP_PROJ=-MD -W3 -Oi -Op -GF -FD -GS -Gy -Za -Zi $(EXCEPTIONSWITCH) $(COPT) 
$(CPP_PROJ_INCLUDES) $(CDEFS) -Fp".\Release/i18n.pch" $(CPDBOBJ) -c
+
+[CFlags_extra_uconv]
+CPP_PROJ=-MD -W3 -Op -GF -Gy $(EXCEPTIONSWITCH) $(COPT) $(CPP_PROJ_INCLUDES) 
$(CDEFS) -Fp".\Release/uconv.pch" $(CPDBOBJ) -c
+
+[CFlags_layout]
+CPP_PROJ=-Za -GF -Gy -W3 $(EXCEPTIONSWITCH) -O2 $(CPP_PROJ_INCLUDES) $(CDEFS) 
-D "LAYOUT_EXPORTS" -D "_WINDOWS" -D "_MBCS" -D "_USRDLL" $(CPDBOBJ) -c
+
+[CFlags_io]
+CPP_PROJ=-Za -GF -Gy -W3 $(EXCEPTIONSWITCH) -O2 $(CPP_PROJ_INCLUDES) $(CDEFS) 
-D "LAYOUT_EXPORTS" -D "_WINDOWS" -D "_MBCS" -D "_USRDLL" $(CPDBOBJ) -c
+
+[CFlags_layoutex]
+CPP_PROJ=-MT -W3 -Op -GF -Gy $(EXCEPTIONSWITCH) $(COPT) $(CPP_PROJ_INCLUDES) 
$(CDEFS) -Fp".\Release/layoutex.pch" $(CPDBOBJ) -c
+
+[CFlags_stubdata]
+CPP_PROJ=-MD -W3 -Op -GF -Gy -Za $(EXCEPTIONSWITCH) $(COPT) 
$(CPP_PROJ_INCLUDES) $(CDEFS) -Fp".\Release/stubdata.pch" $(CPDBOBJ) -c
+
+[CFlags_test_cintltst]
+CPP_PROJ=-MT -Za -O2 -W3 $(EXCEPTIONSWITCH) $(CPP_PROJ_INCLUDES) $(CDEFS) 
$(CPDBOBJ) -c
+
+[CFlags_test_intltest]
+CPP_PROJ=-nologo -MT -Za -Zi -Ox -Ob0 -W3 $(EXCEPTIONSWITCH) 
$(CPP_PROJ_INCLUDES) $(CDEFS) $(CPDBOBJ) -c
+
+[CFlags_test_iotest]
+CPP_PROJ=-nologo -MD -Za -Zi -Ox -Ob0 -W3 $(EXCEPTIONSWITCH) 
$(CPP_PROJ_INCLUDES) $(CDEFS) $(CPDBOBJ) -c
+
+[CFlags_test_letest]
+CPP_PROJ=-nologo -MD -Za -Zi -Ox -Ob0 -W3 $(EXCEPTIONSWITCH) 
$(CPP_PROJ_INCLUDES) $(CDEFS) $(CPDBOBJ) -c
+
+[CFlags_tools_ctestfw]
+CPP_PROJ=-nologo -MD -O2 -Op -FD -Za -W3 $(EXCEPTIONSWITCH) 
$(CPP_PROJ_INCLUDES) $(CDEFS) -Fp".\Release/icutest.pch" $(CPDBOBJ) -c
+
+[CFlags_tools_genbrk]
+CPP_PROJ=-nologo -MD -Za -O2 -W3 $(EXCEPTIONSWITCH) $(CPP_PROJ_INCLUDES) 
$(CDEFS) $(CPDBOBJ) -c
+
+[CFlags_tools_gencase]
+CPP_PROJ=-nologo -MD -GF -Za -Zi -W3 $(EXCEPTIONSWITCH) $(COPT) $(CPDBOBJ) -c
+
+[CFlags_tools_genccode]
+CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_gencmn]
+CPP_PROJ=-O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_genctd]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_gencnval]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_gennames]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_gennorm]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_genpname]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_genprops]
+CPP_PROJ=-MD -O2 -Za $(CTOOLSFLAGS)
+
+[CFlags_tools_genrb]
+CPP_PROJ=-Za $(CTOOLSFLAGS)
+
+[CFlags_tools_genrb.derb]
+CPP_PROJ=-Za -GX $(CTOOLSFLAGS)
+
+[CFlags_tools_gensprep]
+CPP_PROJ=-Za $(CTOOLSFLAGS)
+
+[CFlags_tools_gentest]
+CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_genuca]
+CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_gencase]
+CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_genbidi]
+CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_icupkg]
+CPP_PROJ=-O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_icuswap]
+CPP_PROJ=-O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_makeconv]
+CPP_PROJ=-Za $(CTOOLSFLAGS)
+
+[CFlags_tools_pkgdata]
+CPP_PROJ=-Za -O2 $(CTOOLSFLAGS)
+
+[CFlags_tools_toolutil]
+CPP_PROJ=-MD -O2 $(CTOOLSFLAGS)
+
+[CommonLinkFlags]
+PDBOUT=/pdb:"" /out:""
+COMMONLINKFLAGS=/incremental:no /machine:X64 /nologo $(PDBOUT) /NXCOMPAT 
/DYNAMICBASE
+COMMONLINKFLAGS_CONSOLE=$(COMMONLINKFLAGS) /subsystem:console
+COMMONLINKFLAGS_DLL=$(COMMONLINKFLAGS) /dll
+
+[LinkFlags_common]
+LINK32_FLAGS=icudata.lib kernel32.lib user32.lib advapi32.lib shell32.lib 
$(COMMONLINKFLAGS_DLL) /base:"0x4a80" /implib:"$(OUTDIR)\icuuc.lib" 
/libpath:"..\..\lib"
+
+[LinkFlags_i18n]
+LINK32_FLAGS=icuuc.lib  $(COMMONLINKFLAGS_DLL) /base:"0x4a90" 
/implib:"$(OUTDIR)\icuin.lib" /libpath:"..\..\lib"
+
+[LinkFlags_extra_uconv]
+LINK32_FLAGS=icuuc.lib icuin.lib uconvmsg.lib $(COMMONLINKFLAGS_CONSOLE) 
/libpath:

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

2018-03-06 Thread Tomaž Vajngerl
 include/svx/xmlgrhlp.hxx|2 +-
 svx/source/xml/xmlgrhlp.cxx |7 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit bec51fdb04bf25b9d670982dccab728c55c83fdf
Author: Tomaž Vajngerl 
Date:   Tue Mar 6 18:47:46 2018 +0900

cache location and mime type when saving a graphic to a storage

Change-Id: If27a5f617a103da235d6690ea0447d6c64538dea
Reviewed-on: https://gerrit.libreoffice.org/50810
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/svx/xmlgrhlp.hxx b/include/svx/xmlgrhlp.hxx
index 94cc40d17179..578b9a5f98fb 100644
--- a/include/svx/xmlgrhlp.hxx
+++ b/include/svx/xmlgrhlp.hxx
@@ -63,7 +63,7 @@ private:
 ::std::set< OUString >  maURLSet;
 
 std::unordered_map> 
maGraphicObjects;
-std::unordered_map maExportGraphics;
+std::unordered_map> 
maExportGraphics;
 
 SvXMLGraphicHelperMode  meCreateMode;
 OUStringmaOutputMimeType;
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index f8f690747959..62aa1bb6dd1b 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -49,6 +49,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
@@ -1070,7 +1071,9 @@ OUString 
SvXMLGraphicHelper::implSaveGraphic(css::uno::Referencesecond;
+auto const & aURLAndMimePair = aIterator->second;
+rOutSavedMimeType = aURLAndMimePair.second;
+return aURLAndMimePair.first;
 }
 
 GraphicObject aGraphicObject(aGraphic);
@@ -1275,7 +1278,7 @@ OUString 
SvXMLGraphicHelper::implSaveGraphic(css::uno::Referencehttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Tomaž Vajngerl
 oox/source/drawingml/shapepropertymap.cxx |2 -
 oox/source/export/drawingml.cxx   |   34 ++
 oox/source/export/shapes.cxx  |   31 ---
 oox/source/token/properties.txt   |3 --
 sc/source/filter/inc/pagesettings.hxx |2 -
 sc/source/filter/oox/pagesettings.cxx |   14 +++-
 6 files changed, 31 insertions(+), 55 deletions(-)

New commits:
commit e030fbbf67a2490c4e734583d9f987c27506179e
Author: Tomaž Vajngerl 
Date:   Tue Mar 6 18:29:40 2018 +0900

oox: remove property FillBitmapURL, BackGraphicURL and GraphicURL

Change-Id: I1f75b1775fec4b47ad78a32724785333a90d3baf
Reviewed-on: https://gerrit.libreoffice.org/50809
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/oox/source/drawingml/shapepropertymap.cxx 
b/oox/source/drawingml/shapepropertymap.cxx
index c0704381b19c..6d487f51c2ed 100644
--- a/oox/source/drawingml/shapepropertymap.cxx
+++ b/oox/source/drawingml/shapepropertymap.cxx
@@ -43,7 +43,7 @@ static const ShapePropertyIds spnDefaultShapeIds =
 PROP_LineStyle, PROP_LineWidth, PROP_LineColor, PROP_LineTransparence, 
PROP_LineDash, PROP_LineJoint,
 PROP_LineStartName, PROP_LineStartWidth, PROP_LineStartCenter, 
PROP_LineEndName, PROP_LineEndWidth, PROP_LineEndCenter,
 PROP_FillStyle, PROP_FillColor, PROP_FillTransparence, 
PROP_FillTransparenceGradientName, PROP_FillGradient,
-PROP_FillBitmapURL, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
+PROP_FillBitmap, PROP_FillBitmapMode, PROP_FillBitmapSizeX, 
PROP_FillBitmapSizeY,
 PROP_FillBitmapPositionOffsetX, PROP_FillBitmapPositionOffsetY, 
PROP_FillBitmapRectanglePoint,
 PROP_FillHatch,
 PROP_ShadowXDistance,
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index d3ccf3d81223..ca7c303acd6e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1220,39 +1220,25 @@ void DrawingML::WriteBlipFill( const Reference< 
XPropertySet >& rXPropSet, const
 {
 if ( GetProperty( rXPropSet, sURLPropName ) )
 {
+uno::Reference xGraphic;
 if (mAny.has>())
 {
 uno::Reference xBitmap;
 xBitmap = mAny.get>();
-uno::Reference xGraphic(xBitmap, 
uno::UNO_QUERY);
-if (xBitmap.is() && xGraphic.is())
-{
-bool bWriteMode = false;
-if (sURLPropName == "FillBitmap" || sURLPropName == 
"BackGraphic")
-bWriteMode = true;
-WriteXGraphicBlipFill(rXPropSet, xGraphic, nXmlNamespace, 
bWriteMode);
-}
+if (xBitmap.is())
+xGraphic.set(xBitmap, uno::UNO_QUERY);
 }
 else if (mAny.has>())
 {
-uno::Reference xGraphic;
 xGraphic = mAny.get>();
-if (xGraphic.is())
-{
-bool bWriteMode = false;
-if (sURLPropName == "FillBitmap" || sURLPropName == 
"BackGraphic")
-bWriteMode = true;
-WriteXGraphicBlipFill(rXPropSet, xGraphic, nXmlNamespace, 
bWriteMode);
-}
 }
-else
+
+if (xGraphic.is())
 {
-OUString aURL;
-mAny >>= aURL;
 bool bWriteMode = false;
-if( sURLPropName == "FillBitmapURL" || sURLPropName == 
"BackGraphicURL")
+if (sURLPropName == "FillBitmap" || sURLPropName == "BackGraphic")
 bWriteMode = true;
-WriteBlipFill( rXPropSet, aURL, nXmlNamespace, bWriteMode );
+WriteXGraphicBlipFill(rXPropSet, xGraphic, nXmlNamespace, 
bWriteMode);
 }
 }
 }
diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt
index 6754ee58558c..86dd843d12b7 100644
--- a/oox/source/token/properties.txt
+++ b/oox/source/token/properties.txt
@@ -22,7 +22,6 @@ BackColor
 BackColorTransparency
 BackGraphicLocation
 BackGraphic
-BackGraphicURL
 Background
 BackgroundColor
 BasicLibraries
@@ -167,7 +166,6 @@ FillBitmapPositionOffsetY
 FillBitmapRectanglePoint
 FillBitmapSizeX
 FillBitmapSizeY
-FillBitmapURL
 FillBitmap
 FillColor
 FillGradient
@@ -209,7 +207,6 @@ GraphicBitmap
 GraphicColorMode
 GraphicCrop
 GraphicSize
-GraphicURL
 GridColor
 GroupInfo
 GroupName
diff --git a/sc/source/filter/inc/pagesettings.hxx 
b/sc/source/filter/inc/pagesettings.hxx
index 03a0c8d32e36..2868d8eac4ad 100644
--- a/sc/source/filter/inc/pagesettings.hxx
+++ b/sc/source/filter/inc/pagesettings.hxx
@@ -34,7 +34,7 @@ class HeaderFooterParser;
 /** Holds page style data for a single sheet. */
 struct PageSettingsModel
 {
-OUString maGraphicUrl;   /// URL of the graphic object.
+css::uno::Reference mxGraphic; /// Background 
Graphic
 OUString maBinSettPath;  /// Relation identifier of binary 
printer settings.
 OUString maOddHeader;//

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

2018-03-06 Thread Tomaž Vajngerl
 xmloff/source/draw/shapeexport.cxx |   98 +++--
 1 file changed, 42 insertions(+), 56 deletions(-)

New commits:
commit f7d3fc1774f3ada2af1c752bc8a63055a2ff
Author: Tomaž Vajngerl 
Date:   Tue Mar 6 13:54:45 2018 +0900

xmloff: remove "GraphicURL" from XMLShapeExport

Change-Id: If1967a7d87a934e2eea776bcd41b305e800f711a
Reviewed-on: https://gerrit.libreoffice.org/50790
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/xmloff/source/draw/shapeexport.cxx 
b/xmloff/source/draw/shapeexport.cxx
index 89a92f14229c..e028f56e846e 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -2356,56 +2356,38 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 
 const bool bSaveBackwardsCompatible = bool( mrExport.getExportFlags() & 
SvXMLExportFlags::SAVEBACKWARDCOMPATIBLE );
 
-OUString sImageURL;
-uno::Reference xGraphic;
-
-if( !bIsEmptyPresObj || bSaveBackwardsCompatible )
+if (!bIsEmptyPresObj || bSaveBackwardsCompatible)
 {
-if( !bIsEmptyPresObj )
+uno::Reference xGraphic;
+OUString sOutMimeType;
+
+if (!bIsEmptyPresObj)
 {
 OUString aStreamURL;
 xPropSet->getPropertyValue("GraphicStreamURL") >>= aStreamURL;
-
 OUString sRequestedName = getNameFromStreamURL(aStreamURL);
 
-xPropSet->getPropertyValue("GraphicURL") >>= sImageURL;
-
-uno::Any aGraphicAny = xPropSet->getPropertyValue("Graphic");
-if (aGraphicAny.has>())
-xGraphic = 
aGraphicAny.get>();
+xPropSet->getPropertyValue("Graphic") >>= xGraphic;
 
-OUString aStoredURL;
+OUString sInternalURL;
 
 if (xGraphic.is())
-{
-aStoredURL = mrExport.AddEmbeddedXGraphic(xGraphic, 
sRequestedName);
-}
-else
-{
-OUString aResolveURL(sImageURL);
-if (!sRequestedName.isEmpty())
-aResolveURL += "?requestedName=" + sRequestedName;
-
-aStoredURL = mrExport.AddEmbeddedGraphicObject(aResolveURL);
-}
-
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, aStoredURL);
+sInternalURL = mrExport.AddEmbeddedXGraphic(xGraphic, 
sOutMimeType, sRequestedName);
 
-if (!aStoredURL.isEmpty())
+if (!sInternalURL.isEmpty())
 {
-const OUString sPackageURL("vnd.sun.star.Package:");
-
 // apply possible changed stream URL to embedded image object
 if (!sRequestedName.isEmpty())
 {
+const OUString sPackageURL("vnd.sun.star.Package:");
 OUString newStreamURL = sPackageURL;
-if (aStoredURL[0] == '#')
+if (sInternalURL[0] == '#')
 {
-newStreamURL += aStoredURL.copy(1, 
aStoredURL.getLength() - 1);
+newStreamURL += sInternalURL.copy(1, 
sInternalURL.getLength() - 1);
 }
 else
 {
-newStreamURL += aStoredURL;
+newStreamURL += sInternalURL;
 }
 
 if (newStreamURL != aStreamURL)
@@ -2414,40 +2396,44 @@ void XMLShapeExport::ImpExportGraphicObjectShape(
 }
 }
 
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE );
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED 
);
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, 
XML_ONLOAD );
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, 
sInternalURL);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, 
XML_SIMPLE);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, 
XML_EMBED);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, 
XML_ONLOAD);
 }
 }
 else
 {
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, OUString() );
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED );
-mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, XML_ONLOAD 
);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, OUString());
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_SHOW, XML_EMBED);
+mrExport.AddAttribute(XML_NAMESPACE_XLINK, XML_ACTUATE, 
XML_ONLOAD);
 }
 
 {
-// We can't guess the mimetype from sImageURL because the image 
type might be changed
-// while creating the stream (by SvXMLGraphicIn

[Libreoffice-commits] core.git: sw/CppunitTest_sw_odfimport.mk sw/qa xmloff/inc xmloff/source

2018-03-06 Thread Tomaž Vajngerl
 sw/CppunitTest_sw_odfimport.mk |1 
 sw/qa/extras/globalfilter/globalfilter.cxx |6 -
 xmloff/inc/xmlmultiimagehelper.hxx |4 
 xmloff/source/core/xmlmultiimagehelper.cxx |   39 ++--
 xmloff/source/draw/ximpshap.cxx|   10 --
 xmloff/source/draw/ximpshap.hxx|5 -
 xmloff/source/text/XMLTextFrameContext.cxx |   44 +++---
 xmloff/source/text/XMLTextFrameContext.hxx |5 -
 xmloff/source/text/txtparae.cxx|  126 -
 9 files changed, 127 insertions(+), 113 deletions(-)

New commits:
commit 27008aa028cde8d270e898c5743a9fe5c7701dab
Author: Tomaž Vajngerl 
Date:   Mon Mar 5 20:44:08 2018 +0900

xmloff: convert XMLTextParagraphExport to get rid of "GraphicURL"

Change-Id: I10cc1115bfe628dc296b67b75e386e1a2e4a6c46
Reviewed-on: https://gerrit.libreoffice.org/50789
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sw/CppunitTest_sw_odfimport.mk b/sw/CppunitTest_sw_odfimport.mk
index 302f24a86897..be599de21a48 100644
--- a/sw/CppunitTest_sw_odfimport.mk
+++ b/sw/CppunitTest_sw_odfimport.mk
@@ -83,6 +83,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfimport,\
 ) \
$(if $(filter DESKTOP,$(BUILD_TYPE)),xmlhelp/util/ucpchelp1) \
 xmloff/util/xo \
+svgio/svgio \
 ))
 
 $(eval $(call gb_CppunitTest_use_configuration,sw_odfimport))
diff --git a/sw/qa/extras/globalfilter/globalfilter.cxx 
b/sw/qa/extras/globalfilter/globalfilter.cxx
index 7bd0c1bb2633..7c3082aec701 100644
--- a/sw/qa/extras/globalfilter/globalfilter.cxx
+++ b/sw/qa/extras/globalfilter/globalfilter.cxx
@@ -189,11 +189,7 @@ void Test::testLinkedGraphicRT()
 {
 SwGrfNode* pGrfNode = aNodes[nIndex]->GetGrfNode();
 CPPUNIT_ASSERT(pGrfNode);
-// RT via DOCX makes linked graphic embedded?!
-if( aFilterNames[nFilter] != "Office Open XML Text" )
-{
-CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), 
pGrfNode->IsGrfLink());
-}
+
 const GraphicObject& rGraphicObj = pGrfNode->GetGrfObj(true);
 CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), 
!rGraphicObj.IsSwappedOut());
 CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), 
int(GraphicType::Bitmap), int(rGraphicObj.GetType()));
diff --git a/xmloff/inc/xmlmultiimagehelper.hxx 
b/xmloff/inc/xmlmultiimagehelper.hxx
index 2b29835c2f26..90a279c083d2 100644
--- a/xmloff/inc/xmlmultiimagehelper.hxx
+++ b/xmloff/inc/xmlmultiimagehelper.hxx
@@ -32,9 +32,9 @@ private:
 
 protected:
 /// helper to get the created xShape instance, override this
-virtual OUString getGraphicURLFromImportContext(const SvXMLImportContext& 
rContext) const = 0;
 virtual void removeGraphicFromImportContext(const SvXMLImportContext& 
rContext) = 0;
-virtual css::uno::Reference 
getGraphicFromImportContext(const SvXMLImportContext& rContext) const;
+virtual OUString getGraphicPackageURLFromImportContext(const 
SvXMLImportContext& rContext) const = 0;
+virtual css::uno::Reference 
getGraphicFromImportContext(const SvXMLImportContext& rContext) const = 0;
 
 public:
 MultiImageImportHelper();
diff --git a/xmloff/source/core/xmlmultiimagehelper.cxx 
b/xmloff/source/core/xmlmultiimagehelper.cxx
index 83cee5bbae2a..6acf7b30ed28 100644
--- a/xmloff/source/core/xmlmultiimagehelper.cxx
+++ b/xmloff/source/core/xmlmultiimagehelper.cxx
@@ -29,19 +29,10 @@ namespace
 OUString getMimeTypeForURL(const OUString& rString)
 {
 OUString sMimeType;
-if (rString.startsWith("vnd.sun.star.GraphicObject"))
+if (rString.startsWith("vnd.sun.star.Package"))
 {
-sMimeType = 
comphelper::GraphicMimeTypeHelper::GetMimeTypeForImageUrl(rString);
-}
-else if (rString.startsWith("vnd.sun.star.Package"))
-{
-sMimeType
-= 
comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(OUStringToOString(
-rString.copy(rString.lastIndexOf(".") + 1), 
RTL_TEXTENCODING_ASCII_US));
-}
-else
-{
-SAL_WARN("xmloff", "Unknown image source: " << rString);
+OString aExtension = 
OUStringToOString(rString.copy(rString.lastIndexOf(".") + 1), 
RTL_TEXTENCODING_ASCII_US);
+sMimeType = 
comphelper::GraphicMimeTypeHelper::GetMimeTypeForExtension(aExtension);
 }
 return sMimeType;
 }
@@ -116,23 +107,22 @@ SvXMLImportContextRef 
MultiImageImportHelper::solveMultipleImages()
 {
 const SvXMLImportContext& rContext = *maImplContextVector[a].get();
 
-sal_uInt32 nNewQuality = 0;
 
-uno::Reference 
xGraphic(getGraphicFromImportContext(rContext));
-if (xGraphic.is())
+OUString sMimeType;
+
+const OUString 
aStreamURL(getGraphicPackageURLFromImportContext(rContext));
+ 

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

2018-03-06 Thread Tomaž Vajngerl
 chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx  |2 
 chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx |   76 
+++---
 xmloff/source/chart/PropertyMap.hxx  |4 
 xmloff/source/chart/PropertyMaps.cxx |   21 +-
 xmloff/source/chart/XMLSymbolImageContext.cxx|   18 +-
 5 files changed, 51 insertions(+), 70 deletions(-)

New commits:
commit 5a4d6162f643050faf00ccf08d58feed00dcd781
Author: Tomaž Vajngerl 
Date:   Mon Mar 5 17:12:01 2018 +0900

convert SymbolBitmapURL to SymbolBitmap used in chart2

Change-Id: Ib35ee5b5890ff5ca30796fc8608f00ff4b6b03e2
Reviewed-on: https://gerrit.libreoffice.org/50788
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git 
a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 36619d12417c..dec06433ac9a 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -590,7 +590,7 @@ beans::PropertyState SAL_CALL 
DataSeriesPointWrapper::getPropertyState( const OU
 beans::PropertyState aState( beans::PropertyState_DIRECT_VALUE );
 try
 {
-if (rPropertyName == "SymbolBitmapURL")
+if (rPropertyName == "SymbolBitmap")
 {
 uno::Any aAny = WrappedPropertySet::getPropertyValue("SymbolType");
 sal_Int32 nVal = css::chart::ChartSymbolType::NONE;
diff --git 
a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx 
b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 0547222017c8..ec84b1f869ad 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -61,13 +61,13 @@ public:
tSeriesOrDiagramPropertyType 
ePropertyType);
 };
 
-class WrappedSymbolBitmapURLProperty : public WrappedSeriesOrDiagramProperty< 
OUString >
+class WrappedSymbolBitmapProperty : public 
WrappedSeriesOrDiagramProperty>
 {
 public:
-virtual OUString getValueFromSeries( const Reference< beans::XPropertySet 
>& xSeriesPropertySet ) const override;
-virtual void setValueToSeries( const Reference< beans::XPropertySet >& 
xSeriesPropertySet, const OUString& aNewGraphicURL ) const override;
+virtual uno::Reference getValueFromSeries(const 
Reference& xSeriesPropertySet) const override;
+virtual void setValueToSeries(const Reference & 
xSeriesPropertySet, uno::Reference const & aNewGraphicURL) 
const override;
 
-explicit WrappedSymbolBitmapURLProperty(const 
std::shared_ptr& spChart2ModelContact,
+explicit WrappedSymbolBitmapProperty(const 
std::shared_ptr& spChart2ModelContact,
 tSeriesOrDiagramPropertyType 
ePropertyType);
 };
 
@@ -99,7 +99,7 @@ enum
 {
 //symbol properties
 PROP_CHART_SYMBOL_TYPE = FAST_PROPERTY_ID_START_CHART_SYMBOL_PROP,
-PROP_CHART_SYMBOL_BITMAP_URL,
+PROP_CHART_SYMBOL_BITMAP,
 PROP_CHART_SYMBOL_SIZE,
 PROP_CHART_SYMBOL_AND_LINES
 };
@@ -154,7 +154,7 @@ void lcl_addWrappedProperties( std::vector< 
WrappedProperty* >& rList
 , tSeriesOrDiagramPropertyType 
ePropertyType )
 {
 rList.push_back( new WrappedSymbolTypeProperty( spChart2ModelContact, 
ePropertyType ) );
-rList.push_back( new WrappedSymbolBitmapURLProperty( spChart2ModelContact, 
ePropertyType ) );
+rList.push_back( new WrappedSymbolBitmapProperty( spChart2ModelContact, 
ePropertyType ) );
 rList.push_back( new WrappedSymbolSizeProperty( spChart2ModelContact, 
ePropertyType  ) );
 rList.push_back( new WrappedSymbolAndLinesProperty( spChart2ModelContact, 
ePropertyType  ) );
 }
@@ -169,9 +169,9 @@ void WrappedSymbolProperties::addProperties( std::vector< 
Property > & rOutPrope
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEDEFAULT );
 
-rOutProperties.emplace_back( "SymbolBitmapURL",
-  PROP_CHART_SYMBOL_BITMAP_URL,
-  cppu::UnoType::get(),
+rOutProperties.emplace_back( "SymbolBitmap",
+  PROP_CHART_SYMBOL_BITMAP,
+  cppu::UnoType::get(),
   beans::PropertyAttribute::BOUND
   | beans::PropertyAttribute::MAYBEDEFAULT );
 
@@ -281,66 +281,42 @@ beans::PropertyState 
WrappedSymbolTypeProperty::getPropertyState( const Referenc
 return WrappedProperty::getPropertyState( xInnerPropertyState );
 }
 
-WrappedSymbolBitmapURLProperty::WrappedSymbolBitmapURLProperty(
+WrappedSymbolBitmapProperty::WrappedSymbolBitmapProperty(
 const std::shared_ptr& spChart2ModelContact,
 tSeriesOrDiagramPropertyType ePropertyType )
-: WrappedSeriesOrDiagramProperty

[Libreoffice-commits] core.git: include/editeng include/oox include/xmloff oox/source sc/qa sw/qa sw/source writerfilter/source xmloff/inc xmloff/source

2018-03-06 Thread Tomaž Vajngerl
 include/editeng/memberids.h   |   19 ++---
 include/oox/helper/modelobjecthelper.hxx  |4 -
 include/xmloff/xmltypes.hxx   |1 
 oox/source/drawingml/fillproperties.cxx   |7 --
 oox/source/drawingml/shape.cxx|   14 ++--
 oox/source/drawingml/shapepropertymap.cxx |   17 ++--
 oox/source/export/drawingml.cxx   |   17 
 oox/source/helper/modelobjecthelper.cxx   |9 ++
 oox/source/token/properties.txt   |2 
 sc/qa/unit/subsequent_export-test.cxx |9 +-
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |   13 ++-
 sw/qa/extras/rtfexport/rtfexport.cxx  |   13 ++-
 sw/source/core/unocore/unosett.cxx|   48 +++---
 sw/source/core/unocore/unotbl.cxx |1 
 sw/source/filter/ww8/docxattributeoutput.cxx  |2 
 sw/source/filter/xml/xmlbrsh.cxx  |   75 ++
 sw/source/filter/xml/xmlbrshi.hxx |7 +-
 sw/source/filter/xml/xmlexpit.cxx |   12 ---
 sw/source/filter/xml/xmlimpit.cxx |   11 ---
 writerfilter/source/dmapper/NumberingManager.cxx  |   25 ---
 writerfilter/source/dmapper/NumberingManager.hxx  |2 
 writerfilter/source/dmapper/PropertyIds.cxx   |1 
 writerfilter/source/dmapper/PropertyIds.hxx   |1 
 xmloff/inc/XMLBackgroundImageContext.hxx  |4 -
 xmloff/source/style/PageMasterStyleMap.cxx|6 -
 xmloff/source/style/XMLBackgroundImageContext.cxx |   29 
 xmloff/source/style/XMLBackgroundImageExport.cxx  |   30 
 xmloff/source/style/prstylei.cxx  |8 +-
 xmloff/source/style/xmlnume.cxx   |   30 +++-
 xmloff/source/text/txtprhdl.cxx   |   38 ++-
 xmloff/source/text/txtprmap.cxx   |6 -
 31 files changed, 257 insertions(+), 204 deletions(-)

New commits:
commit d72145f9307c732ced4a546ac1e5093ec7c1a982
Author: Tomaž Vajngerl 
Date:   Thu Mar 1 08:39:11 2018 +0900

Move BackGraphicURL property & friends to BackGraphic + fixes

This moves BackGraphicURL, HeaderGraphicURL, FooterGraphicURL and
ParaBackGraphicURL properties to BackGraphic, HeaderBackGraphic,
FooterBackGraphic and ParaBackGraphic. With this the property type
changes from String to XGraphic.

This change also fixes a bunch of test failures, changes the tests
to use the new properties and the correct type, changes the import
and export filters like xmloff and oox, to make the tests happy.

Change-Id: Ie66097514203c6dc36ab27420faf265322e9279e
Reviewed-on: https://gerrit.libreoffice.org/50760
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/include/editeng/memberids.h b/include/editeng/memberids.h
index d7d0a538ee4d..2f13be47a0f2 100644
--- a/include/editeng/memberids.h
+++ b/include/editeng/memberids.h
@@ -157,16 +157,15 @@
 //BrushItem
 #define MID_BACK_COLOR  0
 #define MID_GRAPHIC_POSITION1
-#define MID_GRAPHIC_LINK2
-#define MID_GRAPHIC 3
-#define MID_GRAPHIC_TRANSPARENT 4
-#define MID_GRAPHIC_URL 5
-#define MID_GRAPHIC_FILTER  6
-#define MID_GRAPHIC_REPEAT  7
-#define MID_GRAPHIC_TRANSPARENCY 8
-#define MID_BACK_COLOR_R_G_B9
-#define MID_BACK_COLOR_TRANSPARENCY 10
-#define MID_SHADING_VALUE   11
+#define MID_GRAPHIC 2
+#define MID_GRAPHIC_TRANSPARENT 3
+#define MID_GRAPHIC_URL 4
+#define MID_GRAPHIC_FILTER  5
+#define MID_GRAPHIC_REPEAT  6
+#define MID_GRAPHIC_TRANSPARENCY 7
+#define MID_BACK_COLOR_R_G_B8
+#define MID_BACK_COLOR_TRANSPARENCY 9
+#define MID_SHADING_VALUE   10
 
 //SvxFormatBreakItem
 #define MID_BREAK_BEFORE0
diff --git a/include/oox/helper/modelobjecthelper.hxx 
b/include/oox/helper/modelobjecthelper.hxx
index 67980b57f6c8..694bdf13ddb7 100644
--- a/include/oox/helper/modelobjecthelper.hxx
+++ b/include/oox/helper/modelobjecthelper.hxx
@@ -27,7 +27,8 @@
 #include 
 
 namespace com { namespace sun { namespace star {
-namespace awt { struct Gradient; }
+namespace awt { struct Gradient;
+class XBitmap; }
 namespace graphic { class XGraphic; }
 namespace container { class XNameContainer; }
 namespace drawing { struct LineDash; }
@@ -113,6 +114,7 @@ public:
 OUString 
insertFillBitmapXGraphic(css::uno::Reference const & 
rxGraphic);
 
 OUString getFillBitmapUrl( const OUString& rGraphicName );
+css::uno::Reference getFillBitmap(OUString const & 
rGraphicName);
 
 private:
 ObjectContainer maMarkerContainer;  ///< Contains all named line 
markers (line end polygons).
diff --git a/include/xmloff/xmltypes.hxx b/include/xmloff/xmltypes.hxx
index 8b7fc23981c7..dc2e6558321e 100644
--- a/include/xmloff/xmltypes.hxx
+++ b/include/xmloff/xmltypes.hxx
@@ -290,6 +290,7 @@
 #d

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

2018-03-06 Thread Tomaž Vajngerl
 editeng/source/items/frmitems.cxx  |   52 +++--
 sw/source/core/unocore/swunohelper.cxx |2 +
 sw/source/core/unocore/unoframe.cxx|9 +
 sw/source/core/unocore/unotbl.cxx  |1 
 4 files changed, 55 insertions(+), 9 deletions(-)

New commits:
commit 6b39ed0eaffabb6ffe11496d833053c094c72f7b
Author: Tomaž Vajngerl 
Date:   Thu Mar 1 06:33:30 2018 +0900

MID_GRAPHIC as alternative to set graphic to the SvxBrushItem

Change-Id: I6e17d1a34f0bd17a0eafd7c741162f23279e9d1a
Reviewed-on: https://gerrit.libreoffice.org/50539
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 5d3f3370bbde..f7a73d190229 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -84,6 +85,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::editeng;
 using namespace ::com::sun::star;
@@ -3190,10 +3192,6 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 rVal <<= 
static_cast(static_cast(eGraphicPos));
 break;
 
-case MID_GRAPHIC:
-SAL_WARN( "editeng.items", "not implemented" );
-break;
-
 case MID_GRAPHIC_TRANSPARENT:
 rVal <<= ( aColor.GetTransparency() == 0xff );
 break;
@@ -3214,6 +3212,22 @@ bool SvxBrushItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 }
 break;
 
+case MID_GRAPHIC:
+{
+uno::Reference xGraphic;
+if (!maStrLink.isEmpty())
+{
+Graphic aGraphic(vcl::graphic::loadFromURL(maStrLink));
+xGraphic = aGraphic.GetXGraphic();
+}
+else if (xGraphicObject)
+{
+xGraphic = xGraphicObject->GetGraphic().GetXGraphic();
+}
+rVal <<= xGraphic;
+}
+break;
+
 case MID_GRAPHIC_FILTER:
 {
 rVal <<= maStrFilter;
@@ -3276,10 +3290,6 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 }
 break;
 
-case MID_GRAPHIC:
-SAL_WARN( "editeng.items", "not implemented" );
-break;
-
 case MID_GRAPHIC_TRANSPARENT:
 aColor.SetTransparency( Any2Bool( rVal ) ? 0xff : 0 );
 break;
@@ -3316,6 +3326,32 @@ bool SvxBrushItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 }
 break;
 
+case MID_GRAPHIC:
+{
+if (rVal.getValueType() == cppu::UnoType::get())
+{
+auto xGraphic = rVal.get>();
+
+Graphic aGraphic(xGraphic);
+maStrLink.clear();
+
+std::unique_ptr 
xOldGrfObj(std::move(xGraphicObject));
+xGraphicObject.reset(new GraphicObject(aGraphic));
+ApplyGraphicTransparency_Impl();
+xOldGrfObj.reset();
+
+if (aGraphic && eGraphicPos == GPOS_NONE)
+{
+eGraphicPos = GPOS_MM;
+}
+else if (!aGraphic)
+{
+eGraphicPos = GPOS_NONE;
+}
+}
+}
+break;
+
 case MID_GRAPHIC_FILTER:
 {
 if( rVal.getValueType() == ::cppu::UnoType::get() )
diff --git a/sw/source/core/unocore/swunohelper.cxx 
b/sw/source/core/unocore/swunohelper.cxx
index 354ff65703a5..9d2040e87d55 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -313,6 +313,8 @@ bool needToMapFillItemsToSvxBrushItemTypes(const 
SfxItemSet& rSet,
 {
 case MID_GRAPHIC_URL:
 return SfxItemState::SET == 
rSet.GetItemState(XATTR_FILLBITMAP);
+case MID_GRAPHIC:
+return SfxItemState::SET == 
rSet.GetItemState(XATTR_FILLBITMAP);
 case MID_GRAPHIC_POSITION:
 return SfxItemState::SET == 
rSet.GetItemState(XATTR_FILLBMP_STRETCH)
 || SfxItemState::SET == 
rSet.GetItemState(XATTR_FILLBMP_TILE)
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index f93ed469dd21..bb2f794d7a3e 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -212,12 +212,14 @@ bool 
BaseFrameProperties_Impl::FillBaseProperties(SfxItemSet& rToSet, const SfxI
 const ::uno::Any* pTrans = nullptr; GetProperty(RES_BACKGROUND, 
MID_GRAPHIC_TRANSPARENT, pTrans );
 const ::uno::Any* pGrLoc = nullptr; GetProperty(RES_BACKGROUND, 
MID_GRAPHIC_POSITION, pGrLoc );
 const ::uno::Any* pGrURL = nullptr; GetProperty(RES_BACKGROUND, 
MID_GRAPHIC_URL, pGrURL );
+const ::uno::Any* pGraphic = nullptr; GetProperty(RES_BA

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - solenv/inc solenv/win64

2018-03-06 Thread Damjan Jovanovic
 solenv/inc/wntmscx.mk|4 +++
 solenv/win64/win64.patch |   49 ++-
 2 files changed, 40 insertions(+), 13 deletions(-)

New commits:
commit 3337115c2d0769e12205f99943f2f3391791ef11
Author: Damjan Jovanovic 
Date:   Wed Mar 7 00:39:35 2018 +

Add a missing .ENDIF

Patch by: me

diff --git a/solenv/win64/win64.patch b/solenv/win64/win64.patch
index f32d9f20acab..dad8f61b5de5 100644
--- a/solenv/win64/win64.patch
+++ b/solenv/win64/win64.patch
@@ -261,7 +261,7 @@ Index: solenv/inc/tg_compv.mk
 ===
 --- solenv/inc/tg_compv.mk (revision 1826001)
 +++ solenv/inc/tg_compv.mk (working copy)
-@@ -72,7 +72,10 @@
+@@ -72,9 +72,13 @@
  .IF "$(COM)"=="MSC"
  .IF "$(CCNUMVER)">="0012"
  COMID=MSC
@@ -271,6 +271,9 @@ Index: solenv/inc/tg_compv.mk
 +COMNAME=mscx
  .ENDIF
  .ENDIF
++.ENDIF
+ 
+ .IF "$(COM)"=="GCC"
  
 Index: odk/settings/settings.mk
 ===
commit 8f22401f2952c4265824d3e0f48597b35aca2f7b
Author: Damjan Jovanovic 
Date:   Wed Mar 7 00:23:51 2018 +

Further updates to the Win64 patch, to use the correct CPPU_ENV

and COMNAME for Win64.

Patch by: me

diff --git a/solenv/win64/win64.patch b/solenv/win64/win64.patch
index 17f96f0cee1b..f32d9f20acab 100644
--- a/solenv/win64/win64.patch
+++ b/solenv/win64/win64.patch
@@ -1,6 +1,6 @@
 Index: configure.ac
 ===
 configure.ac   (revision 1825802)
+--- configure.ac   (revision 1826001)
 +++ configure.ac   (working copy)
 @@ -2116,18 +2116,27 @@
PATH="$MSPDB_PATH:$PATH"
@@ -48,7 +48,7 @@ Index: configure.ac
AC_MSG_CHECKING([the Mingwin32 C++ Compiler])
 Index: set_soenv.in
 ===
 set_soenv.in   (revision 1825825)
+--- set_soenv.in   (revision 1826001)
 +++ set_soenv.in   (working copy)
 @@ -687,8 +687,6 @@
$USE_DIRECTX5   = "";
@@ -173,22 +173,27 @@ Index: set_soenv.in
   if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
 Index: solenv/gbuild/platform/windows.mk
 ===
 solenv/gbuild/platform/windows.mk  (revision 1825802)
+--- solenv/gbuild/platform/windows.mk  (revision 1826001)
 +++ solenv/gbuild/platform/windows.mk  (working copy)
-@@ -63,7 +63,12 @@
+@@ -59,11 +59,15 @@
+   -D_MT \
+   -D_DLL \
+   -DBOOST_MEM_FN_ENABLE_CDECL \
+-  -DCPPU_ENV=msci \
-DFULL_DESK \
-DM1500 \
  
+-gb_CPUDEFS := -DINTEL -D_X86_=1
 +ifeq ($(CPUNAME),INTEL)
- gb_CPUDEFS := -DINTEL -D_X86_=1
++gb_CPUDEFS := -DINTEL -D_X86_=1 -DCPPU_ENV=msci
 +endif
 +ifeq ($(CPUNAME),X86_64)
-+gb_CPUDEFS := -DX86_64 -D_AMD64_=1
++gb_CPUDEFS := -DX86_64 -D_AMD64_=1 -DCPPU_ENV=mscx
 +endif
  
  gb_RCDEFS := \
   -DWINVER=0x0400 \
-@@ -187,12 +192,21 @@
+@@ -187,12 +191,21 @@
  
  gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
  
@@ -211,7 +216,7 @@ Index: solenv/gbuild/platform/windows.mk
  gb_DEBUG_CFLAGS := -Zi
  
  ifeq ($(gb_DEBUGGING),TRUE)
-@@ -437,7 +451,12 @@
+@@ -437,7 +450,12 @@
  # Library class
  
  gb_Library_DEFS := -D_DLL_
@@ -224,7 +229,7 @@ Index: solenv/gbuild/platform/windows.mk
  gb_Library_get_rpath :=
  
  gb_Library_SYSPRE := i
-@@ -608,7 +627,12 @@
+@@ -608,7 +626,12 @@
  # Executable class
  
  gb_Executable_EXT := .exe
@@ -239,7 +244,7 @@ Index: solenv/gbuild/platform/windows.mk
  
 Index: solenv/inc/wnt.mk
 ===
 solenv/inc/wnt.mk  (revision 1825802)
+--- solenv/inc/wnt.mk  (revision 1826001)
 +++ solenv/inc/wnt.mk  (working copy)
 @@ -39,6 +39,10 @@
  .INCLUDE : wntgcci.mk
@@ -252,10 +257,25 @@ Index: solenv/inc/wnt.mk
  # --- changes for W32-tcsh - should move into settings.mk ---
  JAVAC=javac
  JAVA=java
-Index: main/odk/settings/settings.mk
+Index: solenv/inc/tg_compv.mk
 ===
 main/odk/settings/settings.mk  (revision 1825955)
-+++ main/odk/settings/settings.mk  (revision 1825956)
+--- solenv/inc/tg_compv.mk (revision 1826001)
 solenv/inc/tg_compv.mk (working copy)
+@@ -72,7 +72,10 @@
+ .IF "$(COM)"=="MSC"
+ .IF "$(CCNUMVER)">="0012"
+ COMID=MSC
++.IF "$(CPUNAME)"=="INTEL"
+ COMNAME=msci
++.ELIF "$(CPUNAME)"=="X86_64"
++COMNAME=mscx
+ .ENDIF
+ .ENDIF
+ 
+Index: odk/settings/settings.mk
+===
+--- odk/settings/settings.mk   (revision 1826001)
 odk/settings/settings.mk   (working copy)
 @@ -57,6 +57,8 @@
  ifeq "$(PLATFORM)" "windows"
  # Settings for Windows using Microsoft compiler/linker
commit 511cb39c6ebc7951681d70d300eff1540b1c55ca
Author: Damjan Jovanovic 
Date:   Wed Mar 

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

2018-03-06 Thread Zdeněk Crhonek
 sw/qa/uitest/writer_tests/lineNumbering.py |  121 +
 1 file changed, 121 insertions(+)

New commits:
commit f480bda7a8ddc40da300d0faebda159cd94ac052
Author: Zdeněk Crhonek 
Date:   Wed Feb 28 19:27:55 2018 +0100

uitest - Writer Line Numbering dialog; tdf#86185 test

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

diff --git a/sw/qa/uitest/writer_tests/lineNumbering.py 
b/sw/qa/uitest/writer_tests/lineNumbering.py
new file mode 100644
index ..b9d46ecb1ad6
--- /dev/null
+++ b/sw/qa/uitest/writer_tests/lineNumbering.py
@@ -0,0 +1,121 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# 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/.
+#
+
+from uitest.framework import UITestCase
+from uitest.debug import sleep
+from uitest.path import get_srcdir_url
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import get_state_as_dict, type_text
+from uitest.uihelper.common import select_pos
+
+class WriterLineNumbering(UITestCase):
+
+def test_line_numbering_dialog(self):
+self.ui_test.create_doc_in_start_center("writer")
+document = self.ui_test.get_component()
+
+self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog")  
#optionsdialog
+xDialog = self.xUITest.getTopFocusWindow()
+xPages = xDialog.getChild("pages")
+xWriterEntry = xPages.getChild('3') # Writer
+xWriterEntry.executeAction("EXPAND", tuple())
+xWriterGeneralEntry = xWriterEntry.getChild('0')
+xWriterGeneralEntry.executeAction("SELECT", tuple())  #General 
- set centimeters
+xMetric = xDialog.getChild("metric")
+props = {"TEXT": "Centimeter"}
+actionProps = mkPropertyValues(props)
+xMetric.executeAction("SELECT", actionProps)
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.execute_dialog_through_command(".uno:LineNumberingDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xshownumbering = xDialog.getChild("shownumbering")
+xstyledropdown = xDialog.getChild("styledropdown")
+xformatdropdown = xDialog.getChild("formatdropdown")
+xpositiondropdown = xDialog.getChild("positiondropdown")
+xspacingspin = xDialog.getChild("spacingspin")
+xintervalspin = xDialog.getChild("intervalspin")
+xtextentry = xDialog.getChild("textentry")
+xlinesspin = xDialog.getChild("linesspin")
+xblanklines = xDialog.getChild("blanklines")
+xlinesintextframes = xDialog.getChild("linesintextframes")
+xshowfooterheadernumbering = 
xDialog.getChild("showfooterheadernumbering")
+xrestarteverynewpage = xDialog.getChild("restarteverynewpage")
+
+xshownumbering.executeAction("CLICK", tuple())
+props = {"TEXT": "Bullets"}
+actionProps = mkPropertyValues(props)
+xstyledropdown.executeAction("SELECT", actionProps)
+props2 = {"TEXT": "A, B, C, ..."}
+actionProps2 = mkPropertyValues(props2)
+xformatdropdown.executeAction("SELECT", actionProps2)
+props3 = {"TEXT": "Right"}
+actionProps3 = mkPropertyValues(props3)
+xpositiondropdown.executeAction("SELECT", actionProps3)
+xspacingspin.executeAction("UP", tuple())
+xintervalspin.executeAction("UP", tuple())
+xtextentry.executeAction("TYPE", mkPropertyValues({"TEXT":";"}))
+xlinesspin.executeAction("UP", tuple())
+xblanklines.executeAction("CLICK", tuple())
+xlinesintextframes.executeAction("CLICK", tuple())
+xshowfooterheadernumbering.executeAction("CLICK", tuple())
+xrestarteverynewpage.executeAction("CLICK", tuple())
+xOKBtn = xDialog.getChild("ok")
+self.ui_test.close_dialog_through_button(xOKBtn)
+
+self.ui_test.execute_dialog_through_command(".uno:LineNumberingDialog")
+xDialog = self.xUITest.getTopFocusWindow()
+xshownumbering = xDialog.getChild("shownumbering")
+xstyledropdown = xDialog.getChild("styledropdown")
+xformatdropdown = xDialog.getChild("formatdropdown")
+xpositiondropdown = xDialog.getChild("positiondropdown")
+xspacingspin = xDialog.getChild("spacingspin")
+xintervalspin = xDialog.getChild("intervalspin")
+xtextentry = xDialog.getChild("textentry")
+xlinesspin = xDialog.getChild("linesspin")
+xblanklines = xDialog.getChild("blanklines")
+xlinesintextframes = xDialog.getChild("linesintextframes")
+xshowfooterheadernumbering = 
xDialog.getChild("showfooterheadernumbering")
+  

Re: CppunitTest_xmlsecurity_signing Unit Test Failure on 32-bit Linux

2018-03-06 Thread Luke Benes
Here is the strace log:

https://gist.githubusercontent.com/slacka/a07fac3b1ab0396df066968e2e216c8d/raw/6e1b1414b9db9da04a306a00dd27e1446f9e1377/strace.txt

Let me know if there's anything else I can do to help.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-03-06 Thread Caolán McNamara
 sc/source/ui/drawfunc/drtxtob.cxx|2 +-
 sc/source/ui/inc/viewutil.hxx|4 +---
 sc/source/ui/view/cellsh1.cxx|   18 +-
 sc/source/ui/view/editsh.cxx |2 +-
 sc/source/ui/view/viewutil.cxx   |   15 ++-
 sd/source/ui/func/fubullet.cxx   |   18 ++
 sw/source/uibase/shells/annotsh.cxx  |   26 ++
 sw/source/uibase/shells/drwtxtsh.cxx |   22 ++
 sw/source/uibase/shells/textsh.cxx   |   21 ++---
 9 files changed, 14 insertions(+), 114 deletions(-)

New commits:
commit 2523f32dc68d35b69a7b0ee9764e61f7d8efb3ce
Author: Caolán McNamara 
Date:   Tue Mar 6 17:02:30 2018 +

if the arg is true, the dialog dispatchs InsertSpecialChar itself

and GetOutputItemSet is unused and the args won't be there. While
they are there if the arg is false

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

diff --git a/sc/source/ui/drawfunc/drtxtob.cxx 
b/sc/source/ui/drawfunc/drtxtob.cxx
index 6d718002f33f..dfdd03576e77 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -238,7 +238,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq )
 aNewItem = rItem;
 }
 else
-ScViewUtil::ExecuteCharMap( rItem, 
*pViewData->GetViewShell()->GetViewFrame(), aNewItem, aString );
+ScViewUtil::ExecuteCharMap( rItem, 
*pViewData->GetViewShell()->GetViewFrame() );
 
 if ( !aString.isEmpty() )
 {
diff --git a/sc/source/ui/inc/viewutil.hxx b/sc/source/ui/inc/viewutil.hxx
index 5ea8308220b3..5678033c969a 100644
--- a/sc/source/ui/inc/viewutil.hxx
+++ b/sc/source/ui/inc/viewutil.hxx
@@ -44,9 +44,7 @@ class SC_DLLPUBLIC ScViewUtil
 {
 public:
 static bool ExecuteCharMap( const SvxFontItem&  rOldFont,
-SfxViewFrame&   rFrame,
-SvxFontItem&rNewFont,
-OUString&   rString );
+SfxViewFrame&   rFrame );
 
 static bool IsActionShown( const ScChangeAction& rAction,
 const ScChangeViewSettings& rSettings,
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index d54d7d51ce5a..e92e560d99d2 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -2470,23 +2470,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), 
aCurFont.GetFamilyName(), aCurFont.GetStyleName(), aCurFont.GetPitch(), 
aCurFont.GetCharSet(), GetPool().GetWhich(SID_ATTR_CHAR_FONT) ) );
 
 ScopedVclPtr 
pDlg(pFact->CreateCharMapDialog( pTabViewShell->GetDialogParent(), aSet, true 
));
-
-if ( pDlg->Execute() == RET_OK )
-{
-const SfxStringItem* pItem = 
SfxItemSet::GetItem(pDlg->GetOutputItemSet(), SID_CHARMAP, 
false);
-const SvxFontItem* pFontItem = 
SfxItemSet::GetItem(pDlg->GetOutputItemSet(), SID_ATTR_CHAR_FONT, 
false);
-
-if ( pItem && pFontItem )
-{
-vcl::Font aNewFont( pFontItem->GetFamilyName(), 
pFontItem->GetStyleName(), Size(1,1) );
-aNewFont.SetCharSet( pFontItem->GetCharSet() );
-aNewFont.SetPitch( pFontItem->GetPitch() );
-pTabViewShell->InsertSpecialChar( pItem->GetValue(), 
aNewFont );
-rReq.AppendItem( *pFontItem );
-rReq.AppendItem( *pItem );
-rReq.Done();
-}
-}
+pDlg->Execute();
 }
 break;
 
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 1876f088d2b3..762dfb4757ce 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -412,7 +412,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 }
 else
 {
-ScViewUtil::ExecuteCharMap( rItem, 
*pViewData->GetViewShell()->GetViewFrame(), aNewItem, aString );
+ScViewUtil::ExecuteCharMap( rItem, 
*pViewData->GetViewShell()->GetViewFrame() );
 
 // while the dialog was open, edit mode may have been 
stopped
 if (!SC_MOD()->IsInputMode())
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index f303f7d7a85f..cb8ef91e37b3 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -327,9 +327,7 @@ void ScViewUtil::HideDisabledSlot( SfxItemSet& rSet, 
SfxBindings& rBindings,

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

2018-03-06 Thread Caolán McNamara
 vcl/unx/gtk3/gtk3gtkinst.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1ce72593df9ab690ae4666160ec47494d1cd9a07
Author: Caolán McNamara 
Date:   Tue Mar 6 14:35:58 2018 +

wrong row-activated callback signature

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

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 5ce282bd5362..b3071c9a4ee4 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1952,7 +1952,7 @@ private:
 pThis->signal_changed();
 }
 
-static void signalRowActivated(GtkTreeView*, gpointer widget)
+static void signalRowActivated(GtkTreeView*, GtkTreePath*, 
GtkTreeViewColumn*, gpointer widget)
 {
 GtkInstanceTreeView* pThis = static_cast(widget);
 pThis->signal_row_activated();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Tomaž Vajngerl
 include/vcl/GraphicLoader.hxx|   25 +
 vcl/Library_vcl.mk   |3 +-
 vcl/source/graphic/GraphicLoader.cxx |   49 +++
 3 files changed, 76 insertions(+), 1 deletion(-)

New commits:
commit 5f618375a5360160e67f6aac4aece90ab218c081
Author: Tomaž Vajngerl 
Date:   Thu Mar 1 05:36:10 2018 +0900

add GraphicLoader and funct. to load graphic from URL

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

diff --git a/include/vcl/GraphicLoader.hxx b/include/vcl/GraphicLoader.hxx
new file mode 100644
index ..9b96ec13b8a2
--- /dev/null
+++ b/include/vcl/GraphicLoader.hxx
@@ -0,0 +1,25 @@
+/* -*- 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/.
+ */
+
+#ifndef INCLUDED_VCL_GRAPHIC_LOADER_HXX
+#define INCLUDED_VCL_GRAPHIC_LOADER_HXX
+
+#include 
+
+namespace vcl
+{
+namespace graphic
+{
+Graphic VCL_DLLPUBLIC loadFromURL(OUString const& rURL);
+}
+} // end vcl::graphic
+
+#endif // INCLUDED_VCL_GRAPHIC_TOOLS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 9e292916f843..0aecb5e16a1c 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -300,7 +300,8 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/gdi/wall \
 vcl/source/gdi/scrptrun \
 vcl/source/gdi/CommonSalLayout \
-   vcl/source/bitmap/bitmap \
+vcl/source/graphic/GraphicLoader \
+vcl/source/bitmap/bitmap \
 vcl/source/bitmap/bitmapfilter \
 vcl/source/bitmap/bitmappaint \
 vcl/source/bitmap/bitmapscalesuper \
diff --git a/vcl/source/graphic/GraphicLoader.cxx 
b/vcl/source/graphic/GraphicLoader.cxx
new file mode 100644
index ..76495e290a9b
--- /dev/null
+++ b/vcl/source/graphic/GraphicLoader.cxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+//#include 
+//#include 
+#include 
+//#include 
+
+using namespace css;
+
+namespace vcl
+{
+namespace graphic
+{
+Graphic loadFromURL(OUString const& rURL)
+{
+uno::Reference xGraphic;
+
+uno::Reference 
xContext(comphelper::getProcessComponentContext());
+uno::Reference xProv(
+css::graphic::GraphicProvider::create(xContext));
+
+uno::Sequence aLoadProps(1);
+aLoadProps[0].Name = "URL";
+aLoadProps[0].Value <<= rURL;
+
+xGraphic = xProv->queryGraphic(aLoadProps);
+
+Graphic aGraphic(xGraphic);
+aGraphic.setOriginURL(rURL);
+return aGraphic;
+}
+}
+} // end vcl::graphic
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Caolán McNamara
 xmloff/source/text/XMLTextMarkImportContext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8fbacaccf41c914bb3e8328980b9981018b187fe
Author: Caolán McNamara 
Date:   Tue Mar 6 11:46:37 2018 +

ofz#6764 Null-Dereference

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

diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx 
b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 28f3f71fdd24..3854f6c7e2da 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -291,7 +291,7 @@ void XMLTextMarkImportContext::EndElement()
 m_rHelper.GetCursorAsRange()->getStart());
 
 // check if beginning and end are in same XText
-if (xStartRange->getText() == xEndRange->getText())
+if (xStartRange.is() && xEndRange.is() && 
xStartRange->getText() == xEndRange->getText())
 {
 // create range for insertion
 Reference xInsertionCursor =
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cd-5.3' - 43 commits - compilerplugins/clang dbaccess/source editeng/source filter/source hwpfilter/source include/o3tl officecfg/registry pack

2018-03-06 Thread Caolán McNamara
 compilerplugins/clang/refcounting.cxx |4 
 dbaccess/source/core/dataaccess/datasource.cxx|5 
 dbaccess/source/core/dataaccess/datasource.hxx|3 
 dbaccess/source/ui/inc/browserids.hxx |   10 
 editeng/source/editeng/impedit2.cxx   |9 
 filter/source/msfilter/msdffimp.cxx   |3 
 hwpfilter/source/hcode.cxx|   28 -
 hwpfilter/source/hiodev.cxx   |   24 -
 hwpfilter/source/hiodev.h |6 
 include/o3tl/safeint.hxx  |   37 +
 officecfg/registry/schema/org/openoffice/Setup.xcs|2 
 package/source/zipapi/ZipFile.cxx |   15 
 sal/textenc/tcvtkr6.tab   |4 
 sc/qa/unit/data/xls/fail/ofz5527-1.xls|binary
 sc/source/core/data/grouptokenconverter.cxx   |   20 +
 sc/source/core/tool/token.cxx |3 
 sc/source/filter/excel/xicontent.cxx  |4 
 sc/source/ui/docshell/externalrefmgr.cxx  |9 
 sc/source/ui/view/cellsh2.cxx |6 
 sd/source/ui/remotecontrol/BluetoothServer.cxx|9 
 sd/source/ui/remotecontrol/Server.cxx |2 
 sot/source/sdstor/stgstrms.cxx|4 
 sw/qa/core/data/rtf/pass/forcepoint-1.rtf |  193 ++
 sw/source/core/bastyp/swcache.cxx |   32 +
 sw/source/core/txtnode/fntcache.cxx   |3 
 sw/source/filter/html/htmlctxt.cxx|1 
 sw/source/filter/html/htmltab.cxx |3 
 sw/source/filter/html/swhtml.cxx  |   33 +
 sw/source/filter/html/swhtml.hxx  |2 
 sw/source/filter/ww8/ww8par.hxx   |2 
 sw/source/filter/ww8/ww8par2.cxx  |9 
 sw/source/filter/ww8/ww8par3.cxx  |8 
 sw/source/filter/ww8/ww8scan.cxx  |   17 
 sw/source/filter/ww8/ww8scan.hxx  |9 
 sw/source/filter/ww8/ww8toolbar.cxx   |4 
 sw/source/ui/envelp/label1.cxx|   13 
 sysui/desktop/freedesktop/freedesktop-menus.spec  |   24 -
 sysui/desktop/macosx/Info.plist.in|   28 -
 sysui/desktop/menus/calc.desktop  |2 
 sysui/desktop/menus/impress.desktop   |2 
 sysui/desktop/menus/writer.desktop|2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.desktop |2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.keys|2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.keys |2 
 sysui/desktop/mimetypes/ms-excel-template-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-template-12.keys |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.keys|2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.keys|2 
 sysui/desktop/mimetypes/ms-word-document-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-document-12.keys  |2 
 sysui/desktop/mimetypes/ms-word-template-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-template-12.keys  |2 
 sysui/desktop/mimetypes/openoffice.applications   |2 
 sysui/desktop/mimetypes/openoffice.mime   |   14 
 sysui/desktop/solaris/mime.types  |   12 
 vcl/inc/sft.hxx   |9 
 vcl/source/fontsubset/sft.cxx |  148 +--
 vcl/source/gdi/pdfwriter_impl.cxx |2 
 vcl/source/helper/strhelper.cxx   |9 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx  |6 
 writerfilter/source/dmapper/TableManager.cxx  |2 
 writerfilter/source/rtftok/rtfdispatchvalue.cxx   |2 
 writerperfect/source/common/WPXSvInputStream.cxx  |5 
 xmloff/source/draw/XMLNumberStyles.cxx|5 
 xmloff/source/table/XMLTableExport.cxx|   18 
 xmloff/source/text/txtparai.cxx   |   15 
 69 files changed, 632 insertions(+), 239 deletions(-)

New commits:
commit

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

2018-03-06 Thread Caolán McNamara
 vcl/inc/CommonSalLayout.hxx|1 +
 vcl/source/gdi/CommonSalLayout.cxx |7 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 0c8e2d204f5225c0438da0046898cd92db3b7730
Author: Caolán McNamara 
Date:   Tue Mar 6 10:23:06 2018 +

ofz: timeout

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

diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx
index 0947f9eaba2c..3b6e61308248 100644
--- a/vcl/inc/CommonSalLayout.hxx
+++ b/vcl/inc/CommonSalLayout.hxx
@@ -75,6 +75,7 @@ class VCL_DLLPUBLIC CommonSalLayout : public GenericSalLayout
 voidgetScale(double* nXScale, double* nYScale);
 
 hb_set_t*   mpVertGlyphs;
+boolmbFuzzing;
 boolHasVerticalAlternate(sal_UCS4 aChar, sal_UCS4 
aNextChar);
 
 voidSetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index fe557ac9c78b..de701febe63b 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -20,6 +20,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -193,6 +194,7 @@ CommonSalLayout::CommonSalLayout(HDC hDC, WinFontInstance& 
rWinFontInstance, con
 ,   mrWinFontInstance(rWinFontInstance)
 ,   mnAveWidthFactor(1.0f)
 ,   mpVertGlyphs(nullptr)
+,   mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
 mpHbFont = rWinFontFace.GetHbFont();
 if (!mpHbFont)
@@ -240,6 +242,7 @@ CommonSalLayout::CommonSalLayout(const CoreTextStyle& 
rCoreTextStyle)
 :   mrFontSelData(rCoreTextStyle.maFontSelData)
 ,   mrCoreTextStyle(rCoreTextStyle)
 ,   mpVertGlyphs(nullptr)
+,   mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
 mpHbFont = rCoreTextStyle.GetHbFont();
 if (!mpHbFont)
@@ -283,6 +286,7 @@ CommonSalLayout::CommonSalLayout(const FontSelectPattern 
&rFSP,
 , mbUseQt5(bUseQt5)
 , mpQFont(pQt5Font)
 , mpVertGlyphs(nullptr)
+, mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
 if (mbUseQt5)
 {
@@ -321,6 +325,7 @@ CommonSalLayout::CommonSalLayout(FreetypeFont& 
rFreetypeFont)
 : mrFontSelData(rFreetypeFont.GetFontSelData())
 , mpFreetypeFont(&rFreetypeFont)
 , mpVertGlyphs(nullptr)
+, mbFuzzing(utl::ConfigManager::IsFuzzing())
 {
 InitFromFreetypeFont();
 }
@@ -425,7 +430,7 @@ std::shared_ptr 
CommonSalLayout::CreateTextLayoutCache(OUS
 
 void CommonSalLayout::SetNeedFallback(ImplLayoutArgs& rArgs, sal_Int32 
nCharPos, bool bRightToLeft)
 {
-if (nCharPos < 0)
+if (nCharPos < 0 || mbFuzzing)
 return;
 
 using namespace ::com::sun::star;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Caolán McNamara
 chart2/source/controller/main/ChartController_TextEdit.cxx |2 
 cui/source/factory/dlgfact.cxx |   29 -
 cui/source/factory/dlgfact.hxx |9 ++--
 include/svx/svxdlg.hxx |   13 ++---
 sc/source/ui/drawfunc/drawsh.cxx   |2 
 sc/source/ui/view/cellsh1.cxx  |3 -
 sc/source/ui/view/viewutil.cxx |2 
 sd/source/ui/func/fubullet.cxx |5 --
 svx/source/dialog/imapwnd.cxx  |2 
 sw/source/ui/dialog/macassgn.cxx   |5 --
 sw/source/ui/misc/glossary.cxx |4 -
 sw/source/ui/misc/insfnote.cxx |3 -
 sw/source/ui/misc/srtdlg.cxx   |3 -
 sw/source/uibase/shells/annotsh.cxx|3 -
 sw/source/uibase/shells/drwtxtsh.cxx   |3 -
 sw/source/uibase/shells/textsh.cxx |3 -
 16 files changed, 39 insertions(+), 52 deletions(-)

New commits:
commit 6e90bcdcd918a44f94f77098c54ed264a939c43c
Author: Caolán McNamara 
Date:   Tue Mar 6 16:55:10 2018 +

disambiguate CreateSfxDialog

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

diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx 
b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 60ff53feb417..f3c59f6c9d21 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -166,7 +166,7 @@ void 
ChartController::executeDispatch_InsertSpecialCharacter()
 vcl::Font aCurFont = 
m_pDrawViewWrapper->getOutliner()->GetRefDevice()->GetFont();
 aSet.Put( SvxFontItem( aCurFont.GetFamilyType(), aCurFont.GetFamilyName(), 
aCurFont.GetStyleName(), aCurFont.GetPitch(), aCurFont.GetCharSet(), 
SID_ATTR_CHAR_FONT ) );
 
-ScopedVclPtr pDlg(pFact->CreateSfxDialog( 
GetChartWindow(), aSet, getFrame(), RID_SVXDLG_CHARMAP, false ));
+ScopedVclPtr pDlg(pFact->CreateCharMapDialog( 
GetChartWindow(), aSet, false ));
 OSL_ENSURE( pDlg, "Couldn't create SvxCharacterMap dialog" );
 if( pDlg->Execute() == RET_OK )
 {
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index b441edfdf85f..5f0bc3f9751b 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1204,27 +1204,20 @@ VclPtr 
AbstractDialogFactory_Impl::CreateSvxLineTabDialog(
 return VclPtr::Create( pDlg );
 }
 
-VclPtr AbstractDialogFactory_Impl::CreateSfxDialog( 
vcl::Window* pParent,
+VclPtr AbstractDialogFactory_Impl::CreateCharMapDialog( 
vcl::Window* pParent,
 const 
SfxItemSet& rAttr,
-const 
Reference< XFrame >& _rxDocumentFrame,
-
sal_uInt32 nResId, bool bInsert )
+bool 
bInsert )
 {
-SfxModalDialog* pDlg=nullptr;
-switch ( nResId )
-{
-case SID_EVENTCONFIG :
-pDlg = VclPtr::Create( pParent, 
_rxDocumentFrame, rAttr );
-break;
-case RID_SVXDLG_CHARMAP :
-pDlg = VclPtr::Create( pParent, &rAttr, bInsert );
-break;
-default:
-break;
-}
+SfxModalDialog* pDlg = VclPtr::Create(pParent, &rAttr, 
bInsert);
+return VclPtr::Create(pDlg);
+}
 
-if ( pDlg )
-return VclPtr::Create( pDlg );
-return nullptr;
+VclPtr AbstractDialogFactory_Impl::CreateEventConfigDialog( 
vcl::Window* pParent,
+const 
SfxItemSet& rAttr,
+const 
Reference< XFrame >& _rxDocumentFrame)
+{
+SfxModalDialog* pDlg = VclPtr::Create(pParent, 
_rxDocumentFrame, rAttr);
+return VclPtr::Create(pDlg);
 }
 
 VclPtr AbstractDialogFactory_Impl::CreateSfxDialog( 
vcl::Window* pParent,
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index c5b69f6aec31..635e553c0552 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -468,10 +468,13 @@ public:
 const SfxItemSet& rAttr,
 const SdrView* pView,
 sal_uInt32 nResId ) override;
-virtual VclPtrCreateSfxDialog( vcl::Window* pParent,
+virtual VclPtrCreateCharMapDialog( vcl::Window* 
pParent,
+

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

2018-03-06 Thread Caolán McNamara
 lotuswordpro/inc/xfilter/xfcellstyle.hxx |4 +-
 lotuswordpro/inc/xfilter/xfframestyle.hxx|2 -
 lotuswordpro/inc/xfilter/xfheaderstyle.hxx   |2 -
 lotuswordpro/inc/xfilter/xfpagemaster.hxx|2 -
 lotuswordpro/inc/xfilter/xfparastyle.hxx |2 -
 lotuswordpro/inc/xfilter/xftablestyle.hxx|2 -
 lotuswordpro/source/filter/lwpbackgroundstuff.cxx|   12 +++---
 lotuswordpro/source/filter/lwpbackgroundstuff.hxx|2 -
 lotuswordpro/source/filter/lwpcelllayout.cxx |   12 +++---
 lotuswordpro/source/filter/lwpframelayout.cxx|   12 +++---
 lotuswordpro/source/filter/lwplayout.cxx |   15 +++
 lotuswordpro/source/filter/lwplayout.hxx |4 +-
 lotuswordpro/source/filter/lwppagelayout.cxx |   36 +--
 lotuswordpro/source/filter/lwppara.cxx   |4 +-
 lotuswordpro/source/filter/lwptablelayout.cxx|   12 +++---
 lotuswordpro/source/filter/xfilter/xfcellstyle.cxx   |   20 --
 lotuswordpro/source/filter/xfilter/xfframestyle.cxx  |4 +-
 lotuswordpro/source/filter/xfilter/xfheaderstyle.cxx |4 +-
 lotuswordpro/source/filter/xfilter/xfpagemaster.cxx  |4 +-
 lotuswordpro/source/filter/xfilter/xfparastyle.cxx   |4 +-
 lotuswordpro/source/filter/xfilter/xftablestyle.cxx  |4 +-
 21 files changed, 80 insertions(+), 83 deletions(-)

New commits:
commit 6e32cf8b654abc103f3f742b7b7ae0fff0e64f69
Author: Caolán McNamara 
Date:   Tue Mar 6 09:46:35 2018 +

ofz: memory leak

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

diff --git a/lotuswordpro/inc/xfilter/xfcellstyle.hxx 
b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
index 6dc5724e7784..82730ed4005f 100644
--- a/lotuswordpro/inc/xfilter/xfcellstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfcellstyle.hxx
@@ -124,7 +124,7 @@ public:
 /**
  * descr:   set cell background image.
  */
-voidSetBackImage(XFBGImage *pImage);
+voidSetBackImage(std::unique_ptr& rImage);
 
 virtual enumXFStyle GetStyleFamily() override;
 
@@ -139,7 +139,7 @@ private:
 
 double  m_fTextIndent;
 XFColor m_aBackColor;
-XFBGImage   *m_pBackImage;
+std::unique_ptr m_xBackImage;
 XFMargins   m_aMargin;
 XFPadding   m_aPadding;
 rtl::Reference m_pFont;
diff --git a/lotuswordpro/inc/xfilter/xfframestyle.hxx 
b/lotuswordpro/inc/xfilter/xfframestyle.hxx
index 6fa40fe0bca0..20ec941fa6de 100644
--- a/lotuswordpro/inc/xfilter/xfframestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfframestyle.hxx
@@ -115,7 +115,7 @@ public:
 /**
  * @descr:  set the background image of the frame.
  */
-voidSetBackImage(XFBGImage *iamge);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * @descr:  set the background color of the frame.
diff --git a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx 
b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
index 3207694bcb51..6bc8dd6f1977 100644
--- a/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfheaderstyle.hxx
@@ -107,7 +107,7 @@ public:
  */
 voidSetBorders(XFBorders *pBorders);
 
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * @descr   Set header background color.
diff --git a/lotuswordpro/inc/xfilter/xfpagemaster.hxx 
b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
index 1de301d54125..ee326a88ab2c 100644
--- a/lotuswordpro/inc/xfilter/xfpagemaster.hxx
+++ b/lotuswordpro/inc/xfilter/xfpagemaster.hxx
@@ -96,7 +96,7 @@ public:
 
 voidSetBackColor(XFColor color);
 
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 voidSetColumns(XFColumns *pColumns);
 
diff --git a/lotuswordpro/inc/xfilter/xfparastyle.hxx 
b/lotuswordpro/inc/xfilter/xfparastyle.hxx
index 2efced099158..051901381734 100644
--- a/lotuswordpro/inc/xfilter/xfparastyle.hxx
+++ b/lotuswordpro/inc/xfilter/xfparastyle.hxx
@@ -190,7 +190,7 @@ public:
  * @descr   Set background image of the paragraph.
  * @param   image the background image to set.
  */
-voidSetBackImage(XFBGImage *image);
+voidSetBackImage(std::unique_ptr& rImage);
 
 /**
  * descrYou can only set one break property for every para style 
object.
diff --git a/lotuswordpro/inc/xfilter/xftablestyle.hxx 
b/lotuswordpro/inc/xfilter/xftablestyle.hxx
index 55b318c4f0a9..7fff8c45e6ad 100644
--- a/lotuswordpro/inc/xfilter/xftablestyle.hxx
+++ b/lotuswordpro/inc/xfilter/xftablestyle.hxx
@@ -84,7 +84,7 @@ public:
 
 voidSetBackColor(XFColor const & color);
 
-voidSetBackImage(XFBGImage *pImage);
+voidSetBackImage(std::unique_ptr& rImage);
 
 virtual voidToXml(IXFStream *pStrm) override;
 
diff --g

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3-desktop' - 46 commits - compilerplugins/clang dbaccess/source editeng/source filter/source hwpfilter/source include/o3tl officecfg/regis

2018-03-06 Thread Caolán McNamara
 compilerplugins/clang/refcounting.cxx |4 
 dbaccess/source/core/dataaccess/datasource.cxx|5 
 dbaccess/source/core/dataaccess/datasource.hxx|3 
 dbaccess/source/ui/inc/browserids.hxx |   10 
 editeng/source/editeng/impedit2.cxx   |9 
 filter/source/msfilter/msdffimp.cxx   |3 
 hwpfilter/source/hcode.cxx|   28 -
 hwpfilter/source/hinfo.cxx|   11 
 hwpfilter/source/hinfo.h  |2 
 hwpfilter/source/hiodev.cxx   |   24 -
 hwpfilter/source/hiodev.h |6 
 hwpfilter/source/hpara.cxx|4 
 hwpfilter/source/hwpfile.cxx  |6 
 hwpfilter/source/hwpfile.h|5 
 include/o3tl/safeint.hxx  |   37 +
 officecfg/registry/schema/org/openoffice/Setup.xcs|2 
 package/source/zipapi/ZipFile.cxx |   15 
 sal/textenc/tcvtkr6.tab   |4 
 sc/qa/unit/data/xls/fail/ofz5527-1.xls|binary
 sc/source/core/data/grouptokenconverter.cxx   |   20 +
 sc/source/core/tool/token.cxx |3 
 sc/source/filter/excel/xicontent.cxx  |4 
 sc/source/ui/docshell/externalrefmgr.cxx  |9 
 sc/source/ui/view/cellsh2.cxx |6 
 sd/source/ui/remotecontrol/BluetoothServer.cxx|9 
 sd/source/ui/remotecontrol/Server.cxx |2 
 sot/source/sdstor/stgstrms.cxx|4 
 svl/source/numbers/zforscan.cxx   |   14 
 sw/qa/core/data/html/pass/ofz5535-1.html  |1 
 sw/qa/core/data/rtf/pass/forcepoint-1.rtf |  193 ++
 sw/source/core/bastyp/swcache.cxx |   32 +
 sw/source/core/txtnode/fntcache.cxx   |3 
 sw/source/filter/html/htmlctxt.cxx|1 
 sw/source/filter/html/htmltab.cxx |3 
 sw/source/filter/html/swhtml.cxx  |   33 +
 sw/source/filter/html/swhtml.hxx  |2 
 sw/source/filter/ww8/ww8par.hxx   |2 
 sw/source/filter/ww8/ww8par2.cxx  |9 
 sw/source/filter/ww8/ww8par3.cxx  |8 
 sw/source/filter/ww8/ww8scan.cxx  |   17 
 sw/source/filter/ww8/ww8scan.hxx  |9 
 sw/source/filter/ww8/ww8toolbar.cxx   |4 
 sw/source/ui/envelp/label1.cxx|   13 
 sysui/desktop/freedesktop/freedesktop-menus.spec  |   24 -
 sysui/desktop/macosx/Info.plist.in|   28 -
 sysui/desktop/menus/calc.desktop  |2 
 sysui/desktop/menus/impress.desktop   |2 
 sysui/desktop/menus/writer.desktop|2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.desktop |2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.keys|2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.keys |2 
 sysui/desktop/mimetypes/ms-excel-template-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-template-12.keys |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.keys|2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.keys|2 
 sysui/desktop/mimetypes/ms-word-document-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-document-12.keys  |2 
 sysui/desktop/mimetypes/ms-word-template-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-template-12.keys  |2 
 sysui/desktop/mimetypes/openoffice.applications   |2 
 sysui/desktop/mimetypes/openoffice.mime   |   14 
 sysui/desktop/solaris/mime.types  |   12 
 vcl/inc/sft.hxx   |9 
 vcl/source/fontsubset/sft.cxx |  148 +--
 vcl/source/gdi/pdfwriter_impl.cxx |2 
 vcl/source/helper/strhelper.cxx   |9 
 writerfilter/source/dmapper/DomainMapperTableManager.cxx  |6 
 wri

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

2018-03-06 Thread Eike Rathke
 sc/source/ui/view/viewfun2.cxx |   23 ---
 1 file changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 9d8dcec608dde63c68b34450a95a3b168121e289
Author: Eike Rathke 
Date:   Tue Mar 6 21:26:23 2018 +0100

Resolves: tdf#116215 separate column sums and row sums, tdf#71339 related

Change-Id: Ifc7ab0c460f521ad3be4aa2785d54a1e4ed304e5

diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index a4406ad3cbaf..2727e0b7f733 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -632,7 +632,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 SCCOL nMarkEndCol = nEndCol;
 SCROW nMarkEndRow = nEndRow;
 ScAutoSum eSum = ScAutoSumNone;
-ScRangeList aSumRangeList;
+SCROW nColSums = 0;
+SCCOL nRowSums = 0;
+SCROW nColSumsStartRow = 0;
+SCCOL nRowSumsStartCol = 0;
 
 if ( bRow )
 {
@@ -656,12 +659,15 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nCol, nStartRow, nCol, nSumEndRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start row.
 const ScRange aRange( nCol, rRange.aStart.Row(), nTab, nCol, 
nSumEndRow, nTab );
-if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, 
aSumRangeList, aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForColumnRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
+if (++nRowSums == 1)
+nRowSumsStartCol = aRangeList[0]->aStart.Col();
 const OUString aFormula = GetAutoSumFormula(
-aSumRangeList, bSubTotal, ScAddress(nCol, nInsRow, 
nTab));
+aRangeList, bSubTotal, ScAddress(nCol, nInsRow, nTab));
 EnterData( nCol, nInsRow, nTab, aFormula );
 }
 }
@@ -690,11 +696,14 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 {
 if ( !pDoc->IsBlockEmpty( nTab, nStartCol, nRow, nSumEndCol, nRow 
) )
 {
+ScRangeList aRangeList;
 // Include the originally selected start column.
 const ScRange aRange( rRange.aStart.Col(), nRow, nTab, 
nSumEndCol, nRow, nTab );
-if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aSumRangeList, 
aRange )) != ScAutoSumNone )
+if ( (eSum = lcl_GetAutoSumForRowRange( pDoc, aRangeList, 
aRange )) != ScAutoSumNone )
 {
-const OUString aFormula = GetAutoSumFormula( 
aSumRangeList, bSubTotal, ScAddress(nInsCol, nRow, nTab) );
+if (++nColSums == 1)
+nColSumsStartRow = aRangeList[0]->aStart.Row();
+const OUString aFormula = GetAutoSumFormula( aRangeList, 
bSubTotal, ScAddress(nInsCol, nRow, nTab) );
 EnterData( nInsCol, nRow, nTab, aFormula );
 }
 }
@@ -707,10 +716,10 @@ bool ScViewFunc::AutoSum( const ScRange& rRange, bool 
bSubTotal, bool bSetCursor
 // original selection. All extended by end column/row where the sum is put.
 const ScRange aMarkRange(
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Col() : 
nStartCol) :
+ (nRowSums == 1 ? nRowSumsStartCol : nStartCol) :
  rRange.aStart.Col()),
 (eSum == ScAutoSumSum ?
- (aSumRangeList.size() == 1 ? aSumRangeList[0]->aStart.Row() : 
nStartRow) :
+ (nColSums == 1 ? nColSumsStartRow : nStartRow) :
  rRange.aStart.Row()),
 nTab, nMarkEndCol, nMarkEndRow, nTab );
 MarkRange( aMarkRange, false, bContinue );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2018-03-06 Thread Adolfo Jayme Barrientos
 source/text/shared/guide/template_manager.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 274ff2e2f3e369e8e69af243844038444dc41644
Author: Adolfo Jayme Barrientos 
Date:   Tue Mar 6 14:20:36 2018 -0600

Fix menu path for Templates dialog

Change-Id: I73d79c5d5a0b8f7e643614e3c8788bb9d6885ee3

diff --git a/source/text/shared/guide/template_manager.xhp 
b/source/text/shared/guide/template_manager.xhp
index 84059566e..45afaaa55 100644
--- a/source/text/shared/guide/template_manager.xhp
+++ b/source/text/shared/guide/template_manager.xhp
@@ -120,7 +120,7 @@
 Open %PRODUCTNAME Writer
   
   
-Press CommandCtrl+Shift+N
 or File – New Template to open the Template Manager
+Press CommandCtrl+Shift+N
 or choose File - New - Templates to open the Template 
Manager
   
   
 Type “business letter” into the search box
@@ -143,7 +143,7 @@
 Open %PRODUCTNAME Calc
   
   
-Press CommandCtrl+Shift+N
 or File – New Template to open the Template Manager
+Press CommandCtrl+Shift+N
 or choose File - New - Templates to open the Template 
Manager
   
   
 Click on the world icon to browse for online 
templates
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-03-06 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cc15e3ddffce0c62ba442c04160dc5f0c06856ee
Author: Adolfo Jayme Barrientos 
Date:   Tue Mar 6 14:20:36 2018 -0600

Updated core
Project: help  274ff2e2f3e369e8e69af243844038444dc41644

Fix menu path for Templates dialog

Change-Id: I73d79c5d5a0b8f7e643614e3c8788bb9d6885ee3

diff --git a/helpcontent2 b/helpcontent2
index d258dd60b0e8..274ff2e2f3e3 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d258dd60b0e84b513e38cb170eea7ac1e3b4e771
+Subproject commit 274ff2e2f3e369e8e69af243844038444dc41644
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/systools

2018-03-06 Thread Damjan Jovanovic
 sal/systools/win32/kill/kill.cxx   |   21 
 sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp |   21 +++-
 sal/systools/win32/uwinapi/makefile.mk |   19 ---
 sal/systools/win32/uwinapi/uwinapi.dxp |1 
 sal/systools/win32/uwinapi/uwinapi64.dxp   |   22 +
 5 files changed, 77 insertions(+), 7 deletions(-)

New commits:
commit 6c23838c651a392004274ac27db335eb5b0221a9
Author: Damjan Jovanovic 
Date:   Tue Mar 6 18:27:27 2018 +

Port the "kill" command and some useful parts

of the Windows API wrapper "uwinapi" to AMD64.

We aren't going to rewrite it in AMD64 assembly
as most of the uwinapi thunked/emulated
functions are very old, and AMD64 only came out
in the Windows XP and Windows 2003 era, so only
function not available on those versions of
Windows such as SHCreateItemFromParsingName
and (unbelievably!!) snprintf and co need to
be ported. And I've used C code instead of
assembly as it's clearer and performance isn't
that important nowdays.

Patch by: me

diff --git a/sal/systools/win32/kill/kill.cxx b/sal/systools/win32/kill/kill.cxx
index 76f0b2669d35..ab1cb57d7973 100644
--- a/sal/systools/win32/kill/kill.cxx
+++ b/sal/systools/win32/kill/kill.cxx
@@ -190,6 +190,7 @@ static BOOL RaiseSignalEx( HANDLE hProcess, int sig )
 
 if ( fSuccess )
 {
+#if defined(INTEL)
 if ( sig )
 {
 DWORD   dwStackBuffer[] =
@@ -207,8 +208,28 @@ static BOOL RaiseSignalEx( HANDLE hProcess, int sig )
 }
 else
 {
+// FIXME: why? Does AMD64 need it too?
 aContext.Ecx = aContext.Eax = aContext.Ebx = aContext.Edx 
= aContext.Esi = aContext.Edi = 0;
 }
+#elif defined(X86_64)
+if ( sig )
+{
+DWORD   dwStackBuffer[] =
+{
+(DWORD)(aContext.Rip >> 32),
+(DWORD)(aContext.Rip),
+SignalToExceptionCode( sig ),
+EXCEPTION_NONCONTINUABLE,
+0,
+0,
+0
+};
+
+aContext.Rsp -= sizeof(dwStackBuffer);
+WriteProcessMemory( hProcess, (LPVOID)aContext.Rsp, 
dwStackBuffer, sizeof(dwStackBuffer), NULL );
+aContext.Rip = (DWORD64) GetProcAddressEx( hProcess, 
GetModuleHandleA("KERNEL32"), "RaiseException" );
+}
+#endif
 
 fSuccess = SetThreadContext( hThread, &aContext );
 }
diff --git a/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp 
b/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp
index eb7624ed656c..b59f2972679e 100644
--- a/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp
+++ b/sal/systools/win32/uwinapi/SHCreateItemFromParsingName.cpp
@@ -26,4 +26,23 @@
 
 #include "macros.h"
 
-DEFINE_DEFAULT_THUNK( shell32, TRYLOAD, HRESULT, WINAPI, 
SHCreateItemFromParsingName, (PCWSTR pszPath, IBindCtx *pbc, REFIID riid, void 
**ppv) )
\ No newline at end of file
+static HRESULT WINAPI SHCreateItemFromParsingName_Failure (PCWSTR pszPath, 
IBindCtx *pbc, REFIID riid, void **ppv)
+{
+return E_NOTIMPL;
+}
+
+extern HRESULT (WINAPI *pSHCreateItemFromParsingName)(PCWSTR pszPath, IBindCtx 
*pbc, REFIID riid, void **ppv);
+
+static HRESULT WINAPI SHCreateItemFromParsingName_Thunk (PCWSTR pszPath, 
IBindCtx *pbc, REFIID riid, void **ppv)
+{
+ResolveThunk_TRYLOAD( (FARPROC*)&pSHCreateItemFromParsingName, 
"shell32.dll", "SHCreateItemFromParsingName", 0, 
(FARPROC)SHCreateItemFromParsingName_Failure);
+return pSHCreateItemFromParsingName(pszPath, pbc, riid, ppv);
+}
+
+extern "C" HRESULT WINAPI SHCreateItemFromParsingName (PCWSTR pszPath, 
IBindCtx *pbc, REFIID riid, void **ppv)
+{
+return pSHCreateItemFromParsingName(pszPath, pbc, riid, ppv);
+}
+
+HRESULT (WINAPI *pSHCreateItemFromParsingName)(PCWSTR pszPath, IBindCtx *pbc, 
REFIID riid, void **ppv) = SHCreateItemFromParsingName_Thunk;
+
diff --git a/sal/systools/win32/uwinapi/makefile.mk 
b/sal/systools/win32/uwinapi/makefile.mk
index effeea41f8b3..ff4aa4f24fd8 100644
--- a/sal/systools/win32/uwinapi/makefile.mk
+++ b/sal/systools/win32/uwinapi/makefile.mk
@@ -51,6 +51,14 @@ LINK=$(WRAPCMD) "$(PSDK_HOME)$/Bin$/Win64$/LINK.EXE"
 .ENDIF
 
 SLOFILES=\
+$(SLO)$/ResolveThunk.obj\
+$(SLO)$/SHCreateItemFromParsingName.obj\
+$(SLO)$/snprintf.obj\
+$(SLO)$/snwprintf.obj
+
+
+.IF "$(CPUNAME)"=="INTEL"
+SLOFILES+=\
 $(SLO)$/CheckTokenMembership.obj\
 $(SLO)$/CommandLineToArgvW.obj\
 $(SLO)$/CopyFileExA.obj\
@@ -71,10 +79,7 @@ SLOFILES=\
 $(SLO)$/MoveFileExA.obj\
 $(SLO)$/MoveFileE

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

2018-03-06 Thread Miklos Vajna
 sw/qa/extras/htmlimport/data/reqif-ole-img.png   |binary
 sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml |6 ++
 sw/qa/extras/htmlimport/htmlimport.cxx   |   12 
 sw/source/filter/html/htmlplug.cxx   |   23 +++
 sw/source/filter/html/swhtml.cxx |5 +
 sw/source/filter/html/swhtml.hxx |7 +++
 6 files changed, 53 insertions(+)

New commits:
commit 62eb6d3f964e78fa210bba4af81ebf63ba8a16a9
Author: Miklos Vajna 
Date:   Tue Mar 6 11:01:52 2018 +0100

sw XHTML import: map nested  to replacement graphic

Handle the case when the native data is the outer element and the
replacement image is the inner one.

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

diff --git a/sw/qa/extras/htmlimport/data/reqif-ole-img.png 
b/sw/qa/extras/htmlimport/data/reqif-ole-img.png
new file mode 100644
index ..fdad35484e7c
Binary files /dev/null and b/sw/qa/extras/htmlimport/data/reqif-ole-img.png 
differ
diff --git a/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml 
b/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml
new file mode 100644
index ..05abc7721d24
--- /dev/null
+++ b/sw/qa/extras/htmlimport/data/reqif-ole-img.xhtml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index 03d500850edd..6a1a2f9b046b 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -306,6 +307,17 @@ DECLARE_HTMLIMPORT_TEST(testReqIfOleData, 
"reqif-ole-data.xhtml")
 CPPUNIT_ASSERT_EQUAL(static_cast(1), xObjects->getCount());
 }
 
+DECLARE_HTMLIMPORT_TEST(testReqIfOleImg, "reqif-ole-img.xhtml")
+{
+uno::Reference xSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xObjects(xSupplier->getEmbeddedObjects(),
+ uno::UNO_QUERY);
+uno::Reference 
xObject(xObjects->getByIndex(0),
+   uno::UNO_QUERY);
+// This failed, OLE object had no replacement image.
+CPPUNIT_ASSERT(xObject->getReplacementGraphic().is());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/htmlplug.cxx 
b/sw/source/filter/html/htmlplug.cxx
index 3ebef3437dde..638835931b4e 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -65,6 +65,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace com::sun::star;
 
@@ -423,6 +424,19 @@ void SwHTMLParser::InsertEmbed()
 if( !bHasURL && !bHasType && !bHasData )
 return;
 
+if (!m_aEmbeds.empty())
+{
+// Nested XHTML  element: points to replacement graphic.
+SwOLENode* pOLENode = m_aEmbeds.top();
+svt::EmbeddedObjectRef& rObj = pOLENode->GetOLEObj().GetObject();
+Graphic aGraphic;
+if (GraphicFilter::GetGraphicFilter().ImportGraphic(aGraphic, aURLObj) 
!= ERRCODE_NONE)
+return;
+
+rObj.SetGraphic(aGraphic, OUString());
+return;
+}
+
 // create the plug-in
 comphelper::EmbeddedObjectContainer aCnt;
 OUString aObjName;
@@ -513,6 +527,15 @@ void SwHTMLParser::InsertEmbed()
 // character-bound frame, here we must create the frames by hand.
 RegisterFlyFrame( pFlyFormat );
 }
+
+if (!bHasData)
+return;
+
+SwOLENode* pOLENode = pNoTextNd->GetOLENode();
+if (!pOLENode)
+return;
+
+m_aEmbeds.push(pOLENode);
 }
 
 #if HAVE_FEATURE_JAVA
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index d798f0ba0a51..af3e3c65c003 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1424,6 +1424,11 @@ void SwHTMLParser::NextToken( HtmlTokenId nToken )
 #endif
 break;
 
+case HtmlTokenId::OBJECT_OFF:
+if (!m_aEmbeds.empty())
+m_aEmbeds.pop();
+break;
+
 case HtmlTokenId::APPLET_ON:
 #if HAVE_FEATURE_JAVA
 InsertApplet();
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index ffbb42d334aa..911042defa20 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 class SfxMedium;
 class SfxViewFrame;
@@ -506,6 +507,12 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
 
 bool m_bXHTML = false;
 
+/**
+ * Non-owning pointers to already inserted OLE nodes, matching opened
+ *  XHTML elements.
+ */
+std::stack m_aEmbeds;
+
 void DeleteFormImpl();
 
 void DocumentDetected();
_

Re: Help in Libreoffice extension development

2018-03-06 Thread toki
On 03/06/2018 03:26 PM, Samuel Mehrbrodt wrote:

>This page indicates there already exists a spell checker and even
grammar checker for Tamil

If you mean the Tamil spell checker that allegedly resides at
https://extensions.libreoffice.org/extensions/tamil-spellchecker
there is no stable release.

The spelling dictionary listed at
https://extensions.openoffice.org/en/project/tamil-spellchecker-dictionary
has a warning that it hasn't been updated since AOo 4.3.

The hyphenation dictionary listed at
https://extensions.openoffice.org/en/project/tamil-hyphenation-dictionary
has a warning that it hasn't been updated since AOo 3.4.

As far grammar checking is concerned,
https://languagetool.org/languages/ states that they are looking for a
maintainer.

Going by the announcements at http://thamizha.org/, it looks like that
project is dormant. I didn't delve beyond the first page.  IF it is an
active project, the home page is in desperate need of being updated.

>did you check that?

Huge disconnects between the languages that LibO claims are supported,
and the languages that are supported, are not uncommon.

Looks like I need to update
https://libreoffice-environment.blogspot.com/search/label/grammar%20checking
especially not all dictionary extensions can be installed in LibO 6.x.
Maybe that is the fault of the _daily build/alpha/beta/not for use
anywhere near a production environment_ version that I was doing the
testing on.

Pattabhi wrote:

>We read through Libreoffice documentation.

LibO documentation, especially in terms of l10n and i18n, is woefully
inadequate.

That said, I'd suggest heading over to
https://languagetool.org/development/ to work on grammar checking, and
https://hunspell.github.io/ to work on spell checking.

FWIW, I wouldn't be surprised is the spell checker and hyphenation
dictionary for AOo simply needed to be updated, and vocabulary expanded.

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


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

2018-03-06 Thread Eike Rathke
 formula/source/core/api/FormulaCompiler.cxx |6 +-
 formula/source/ui/dlg/formula.cxx   |1 +
 include/formula/paramclass.hxx  |   11 +--
 sc/source/core/tool/interpr1.cxx|9 -
 4 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit cfc6cf5177f8df23af35c4509c0276a19de56cce
Author: Eike Rathke 
Date:   Tue Mar 6 18:41:56 2018 +0100

Resolves: tdf#116215 fewer array of references cases, tdf#58874 related

In particular if in any ForceArray context use the matrix result
instead of the array of references list.

Change-Id: I72328a690760637f6d31fadba447641c64711a67

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index a83cc129a93c..537f8f74f074 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -2579,9 +2579,11 @@ void FormulaCompiler::ForceArrayOperator( 
FormulaTokenRef const & rCurr )
 else if (eType == formula::ParamClass::ReferenceOrForceArray)
 {
 // Inherit further only if the return class of the nested function is
-// not Reference.
+// not Reference. Else flag as suppressed.
 if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != 
ParamClass::Reference)
 rCurr->SetInForceArray( eType);
+else
+rCurr->SetInForceArray( 
formula::ParamClass::SuppressedReferenceOrForceArray);
 return;
 }
 
@@ -2595,6 +2597,8 @@ void FormulaCompiler::ForceArrayOperator( FormulaTokenRef 
const & rCurr )
 {
 if (GetForceArrayParameter( rCurr.get(), SAL_MAX_UINT16) != 
ParamClass::Reference)
 rCurr->SetInForceArray( eType);
+else
+rCurr->SetInForceArray( 
formula::ParamClass::SuppressedReferenceOrForceArray);
 }
 }
 }
diff --git a/formula/source/ui/dlg/formula.cxx 
b/formula/source/ui/dlg/formula.cxx
index 745554c5493e..2e5d3569b68d 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -762,6 +762,7 @@ void FormulaDlg_Impl::MakeTree( StructPage* _pTree, 
SvTreeListEntry* pParent, co
 case ParamClass::Array:
 case ParamClass::ForceArray:
 case ParamClass::ReferenceOrForceArray:
+case ParamClass::SuppressedReferenceOrForceArray:
 ;   // nothing, only as array/matrix
 // no default to get compiler warning
 }
diff --git a/include/formula/paramclass.hxx b/include/formula/paramclass.hxx
index e8d411088061..a22854fc890c 100644
--- a/include/formula/paramclass.hxx
+++ b/include/formula/paramclass.hxx
@@ -51,8 +51,15 @@ namespace formula
 propagated to subsequent operators and functions being part of a
 parameter of this function. Used with functions that treat
 references separately from arrays, but need the forced array
-calculation of parameters that are not references.*/
-ReferenceOrForceArray
+calculation of parameters that are not references. */
+ReferenceOrForceArray,
+
+/** Same as ReferenceOrForceArray but suppressed / not inherited in the
+compiler's ForceArray context to indicate that a result of
+Reference in JumpMatrix context should use the result matrix
+instead of the array of references. Never used as initial parameter
+classification. */
+SuppressedReferenceOrForceArray
 };
 }
 
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 546f72a15332..3123ba8fd54f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -800,12 +800,19 @@ bool ScInterpreter::JumpMatrix( short nStackLevel )
 }
 if ( !bCont )
 {   // We're done with it, throw away jump matrix, keep result.
-// For an intermediate result of Reference use the array of references,
+// For an intermediate result of Reference use the array of references
+// if there are more than one reference and the current ForceArray
+// context is not ForceArray or related, suppressed, ...,
 // else (also for a final result of Reference) use the matrix.
 // Treat the result of a jump command as final and use the matrix (see
 // tdf#115493 for why).
+ParamClass eParamClass;
 if (!FormulaCompiler::IsOpCodeJumpCommand( pJumpMatrix->GetOpCode()) &&
+pJumpMatrix->GetRefList().size() > 1 &&
 ScParameterClassification::GetParameterType( pCur, 
SAL_MAX_UINT16) == ParamClass::Reference &&
+(eParamClass = pCur->GetInForceArray()) != 
ParamClass::ForceArray &&
+eParamClass != ParamClass::ReferenceOrForceArray &&
+eParamC

[Libreoffice-commits] core.git: download.lst external/libxml2

2018-03-06 Thread Michael Stahl
 download.lst |4 ++--
 external/libxml2/libxml2-icu.patch.0 |   13 +++--
 external/libxml2/libxml2-vc10.patch  |2 +-
 3 files changed, 10 insertions(+), 9 deletions(-)

New commits:
commit f775b5427bf085577feb5badb762156283d76ae5
Author: Michael Stahl 
Date:   Tue Mar 6 14:49:29 2018 +0100

libxml2: upgrade to release 2.9.8

Change-Id: Ic6802c16b740f6aee59ae2f74b7edcd37461f1f3
Reviewed-on: https://gerrit.libreoffice.org/50835
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/download.lst b/download.lst
index 641a397c9b15..424c642298c4 100644
--- a/download.lst
+++ b/download.lst
@@ -152,8 +152,8 @@ export LIBTOMMATH_SHA256SUM := 
083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export XMLSEC_SHA256SUM := 
967ca83edf25ccb5b48a3c4a09ad3405a63365576503bf34290a42de1b92fcd2
 export XMLSEC_TARBALL := xmlsec1-1.2.25.tar.gz
-export LIBXML_SHA256SUM := 
f63c5e7d30362ed28b38bfa1ac6313f9a80230720b7fb6c80575eeab3ff5900c
-export LIBXML_VERSION_MICRO := 7
+export LIBXML_SHA256SUM := 
0b74e51595654f958148759cfef0993114ddbb6f31aee018f3558e8e2732
+export LIBXML_VERSION_MICRO := 8
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LIBXSLT_SHA256SUM := 
526ecd0abaf4a7789041622c3950c0e7f2c4c8835471515fd77eec684a355460
 export LIBXSLT_VERSION_MICRO := 32
diff --git a/external/libxml2/libxml2-icu.patch.0 
b/external/libxml2/libxml2-icu.patch.0
index 9aaad2de4915..b390b03d8787 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -1,3 +1,5 @@
+Find bundled ICU in workdir and use debug .libs when needed
+
 diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
 --- win32/Makefile.msvc.dt 2014-07-18 19:00:23.372103963 +0200
 +++ win32/Makefile.msvc2014-07-18 19:01:39.347982929 +0200
@@ -18,15 +20,14 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
  LIBS =
  !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
 @@ -78,7 +78,11 @@ LIBS = $(LIBS) wsock32.lib ws2_32.lib
- LIBS = $(LIBS) iconv.lib
- !endif 
- !if "$(WITH_ICU)" == "1"
--LIBS = $(LIBS) icu.lib
+ !if "$(STATIC)" == "1"
+ LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
+ !else
 +!if "$(WITH_RUN_DEBUG)" == "1"
 +LIBS = $(LIBS) icuind.lib icuucd.lib icudtd.lib
 +!else
-+LIBS = $(LIBS) icuin.lib icuuc.lib icudt.lib
+ LIBS = $(LIBS) icuuc.lib icuin.lib icudt.lib
 +!endif
  !endif
+ !endif
  !if "$(WITH_ZLIB)" == "1"
- # could be named differently zdll or zlib
diff --git a/external/libxml2/libxml2-vc10.patch 
b/external/libxml2/libxml2-vc10.patch
index f3f2b511f3f2..3892b518d35d 100644
--- a/external/libxml2/libxml2-vc10.patch
+++ b/external/libxml2/libxml2-vc10.patch
@@ -3,7 +3,7 @@ Add SOLARINC, and disable SSE2 default for MSVC2012
 --- build/libxml2-2.7.6/win32/Makefile.msvc.old2010-09-20 
20:22:41.5 +0200
 +++ build/libxml2-2.7.6/win32/Makefile.msvc2010-09-20 20:23:00.25000 
+0200
 @@ -59,6 +59,7 @@
- CFLAGS = $(CFLAGS) /D "HAVE_LZMA_H"
+ CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
  !endif
  CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 +CFLAGS = $(CFLAGS) -arch:SSE $(SOLARINC)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Call for help in MSI/DEB/RPM packaging for new help

2018-03-06 Thread Olivier Hallot
HI Stephan

Em 06/03/2018 13:43, Stephan Bergmann escreveu:
> On 06.03.2018 16:13, Olivier Hallot wrote:
>> The task looks simple: once the new help is built (--with-help=html),
>> the help files are available in core/instdir/help/6.1 so it must take
>> the 6.1/ folder and make a package, which is as simple as zipping it. Of
>> course, replace '6.1' by %PRODUCTVERSION.
> 
> Looks odd to me that the help content would be stored in the LO instset
> under a %PRODUCTVERSION dir.  Any given LO instset will only contain
> help content for the given LO version, anyway, I assume?

It was originally designed for online display, where many LOHelp
versions are hosted in the same server, and the version is passed as
param in the URL by LO.


> 
> (If, for example, some subset of the help content would happen to remain
> identical across two subsequent LO versions, then intelligent update
> processes could exploit that and leave that part of the LO installation
> alone.  If, however, there is an artificial difference because of a path
> change from .../6.1/... to .../6.2/..., that only makes the intelligent
> update process's job harder.)

The version can be removed from the path (need a hack in the XSLT).
Please advise if this is to be done.

Thanks for the comments

-- 
Olivier Hallot
LibreOffice Documentation Coordinator
Comunidade LibreOffice
Rio de Janeiro - Brasil - Local Time: UTC-03:00
http://tdf.io/joinus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - odk/settings officecfg/registry solenv/win64

2018-03-06 Thread Damjan Jovanovic
 odk/settings/settings.mk   |8 --
 officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu |2 
 solenv/win64/win64.patch   |   28 
++
 3 files changed, 29 insertions(+), 9 deletions(-)

New commits:
commit ddd858ea859bab6078d1add02ecb57578385f3b7
Author: Damjan Jovanovic 
Date:   Tue Mar 6 16:59:52 2018 +

Revert 1825956 and put it into the win64.patch file instead,

as it may break building 32 bit AOO on 64 bit Windows.

Patch by: me

diff --git a/odk/settings/settings.mk b/odk/settings/settings.mk
index f22d2d1eedb2..0976ec27b988 100644
--- a/odk/settings/settings.mk
+++ b/odk/settings/settings.mk
@@ -57,8 +57,6 @@ JAVABIN=bin
 ifeq "$(PLATFORM)" "windows"
 # Settings for Windows using Microsoft compiler/linker
 
-PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1 | sed -e 
's/^i.86$$/i386/')
-
 OS=WIN
 PS=\\
 ICL=$$
@@ -121,14 +119,8 @@ SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" 
-I"$(OO_SDK_JAVA_HOME)/inclu
 # define for used compiler necessary for UNO
 # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
 
-ifeq "$(PROCTYPE)" "i386"
 CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
 CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
-endif
-ifeq "$(PROCTYPE)" "x86_64"
-CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx
-CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx
-endif
 CC_OUTPUT_SWITCH=-Fo
 
 LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv
diff --git a/solenv/win64/win64.patch b/solenv/win64/win64.patch
index ff17fc5e4865..17f96f0cee1b 100644
--- a/solenv/win64/win64.patch
+++ b/solenv/win64/win64.patch
@@ -252,3 +252,31 @@ Index: solenv/inc/wnt.mk
  # --- changes for W32-tcsh - should move into settings.mk ---
  JAVAC=javac
  JAVA=java
+Index: main/odk/settings/settings.mk
+===
+--- main/odk/settings/settings.mk  (revision 1825955)
 main/odk/settings/settings.mk  (revision 1825956)
+@@ -57,6 +57,8 @@
+ ifeq "$(PLATFORM)" "windows"
+ # Settings for Windows using Microsoft compiler/linker
+ 
++PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1 | sed -e 
's/^i.86$$/i386/')
++
+ OS=WIN
+ PS=\\
+ ICL=$$
+@@ -119,8 +121,14 @@
+ # define for used compiler necessary for UNO
+ # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
+ 
++ifeq "$(PROCTYPE)" "i386"
+ CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
+ CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
++endif
++ifeq "$(PROCTYPE)" "x86_64"
++CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx
++CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx
++endif
+ CC_OUTPUT_SWITCH=-Fo
+ 
+ LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv
commit 9e642822f4394464c52af6f2268511154f5bc744
Author: Matthias Seidel 
Date:   Tue Mar 6 15:21:07 2018 +

Changed links to https to avoid redirection

diff --git a/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu 
b/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
index 39a7c7077a61..fbc98bc46f3a 100644
--- a/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/ExtensionManager.xcu
@@ -26,7 +26,7 @@
 http://openoffice.org/2001/registry";>
   
 
-  http://extensions.openoffice.org/getmore?cid=920794
+  https://extensions.openoffice.org/getmore?cid=920794
 
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2018-03-06 Thread Adolfo Jayme Barrientos
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 42ec994f97f82e6aaa2ffc4b99481886909c4163
Author: Adolfo Jayme Barrientos 
Date:   Tue Mar 6 10:48:36 2018 -0600

Updated core
Project: help  d258dd60b0e84b513e38cb170eea7ac1e3b4e771

This is not idiomatic in English; looks like a Gallicism

Change-Id: Iecd507c4bdde2201528787a6e95e359e9a789735

diff --git a/helpcontent2 b/helpcontent2
index 913d1549aa0b..d258dd60b0e8 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 913d1549aa0bf4686ab50737731b9fe77f3b7ae4
+Subproject commit d258dd60b0e84b513e38cb170eea7ac1e3b4e771
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: source/text

2018-03-06 Thread Adolfo Jayme Barrientos
 source/text/sbasic/shared/0304.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d258dd60b0e84b513e38cb170eea7ac1e3b4e771
Author: Adolfo Jayme Barrientos 
Date:   Tue Mar 6 10:48:36 2018 -0600

This is not idiomatic in English; looks like a Gallicism

Change-Id: Iecd507c4bdde2201528787a6e95e359e9a789735

diff --git a/source/text/sbasic/shared/0304.xhp 
b/source/text/sbasic/shared/0304.xhp
index 02bf9d230..b223fa71f 100644
--- a/source/text/sbasic/shared/0304.xhp
+++ b/source/text/sbasic/shared/0304.xhp
@@ -257,8 +257,8 @@
 vbNewLine
 
 
-\x0D\x0A (13 10) for Windows 32 bits
-\x0A (10) for other 64 bits systems
+\x0D\x0A (13 10) for 32-bit Windows
+\x0A (10) for other 64-bit systems
 
 
 LF or CRLF 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Call for help in MSI/DEB/RPM packaging for new help

2018-03-06 Thread Stephan Bergmann

On 06.03.2018 16:13, Olivier Hallot wrote:

The task looks simple: once the new help is built (--with-help=html),
the help files are available in core/instdir/help/6.1 so it must take
the 6.1/ folder and make a package, which is as simple as zipping it. Of
course, replace '6.1' by %PRODUCTVERSION.


Looks odd to me that the help content would be stored in the LO instset 
under a %PRODUCTVERSION dir.  Any given LO instset will only contain 
help content for the given LO version, anyway, I assume?


(If, for example, some subset of the help content would happen to remain 
identical across two subsequent LO versions, then intelligent update 
processes could exploit that and leave that part of the LO installation 
alone.  If, however, there is an artificial difference because of a path 
change from .../6.1/... to .../6.2/..., that only makes the intelligent 
update process's job harder.)

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


[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - sw/source

2018-03-06 Thread Michael Stahl
 sw/source/core/layout/sectfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 45d59e98f4905475648d5e3ccacfa1279eb69a18
Author: Michael Stahl 
Date:   Tue Mar 6 09:51:46 2018 +0100

forcepoint #18 sw: fix condition for detecting section-in-table splits

The problem with the bugdoc is that SwFrame::GetNextSctLeaf() creates a
follow frame for a section in a table, and puts it outside the table,
below the page's body frame, while moving text frames that have the
mbInfTab flag set into the follow frame.

Checking for CanContainSplitSection() at this point doesn't make sense
to me: if it's not allowed to split the section, we can't just split it
anyway and put the follow outside the table.

Just removing it fails in testTableInNestedSection() but it turns out
that the problem there is that the mbInfTab flag is set on a outermost
SwTabFrame itself, so we need to check the parent's flag instead to
check if this frame needs to go into a cell.

(regression from 652556ec3e9218655a67b4c4de4e26fbe81855de)

Change-Id: I79663391fb1b2cb10f008676feb01a2607cfb33d
Reviewed-on: https://gerrit.libreoffice.org/50804
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 
(cherry picked from commit 054be0850ed7574473452ed965001504caf0b5e2)
Reviewed-on: https://gerrit.libreoffice.org/50821
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 2b6def165059..c0479dc53673 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1601,9 +1601,9 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType 
eMakePage )
 SwLayoutFrame *pLayLeaf;
 
 SwLayoutFrame* pCellLeaf = nullptr;
-if (IsInTab() && CanContainSplitSection(this))
+if (GetUpper()->IsInTab())
 {
-// We are in a table (which is itself not in a section), see if there
+// We are *in* a table (not an outermost SwTabFrame), see if there
 // is a follow cell frame created already.
 pCellLeaf = GetNextCellLeaf();
 if (!pCellLeaf)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: CppunitTest_xmlsecurity_signing Unit Test Failure on 32-bit Linux

2018-03-06 Thread Luke Benes
One more clue as to what is going on. I copied the source tree from my external 
HD to my home folder and the rebuilt. This time the build succeeded without any 
errors.


There something about the path on my system that's triggering this bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 47 commits - compilerplugins/clang dbaccess/source editeng/source filter/source hwpfilter/source include/o3tl officecfg/registry pack

2018-03-06 Thread Caolán McNamara
 compilerplugins/clang/refcounting.cxx |4 
 dbaccess/source/core/dataaccess/datasource.cxx|5 
 dbaccess/source/core/dataaccess/datasource.hxx|3 
 dbaccess/source/ui/inc/browserids.hxx |   10 
 editeng/source/editeng/impedit2.cxx   |9 
 filter/source/msfilter/msdffimp.cxx   |3 
 hwpfilter/source/hcode.cxx|   28 -
 hwpfilter/source/hinfo.cxx|   11 
 hwpfilter/source/hinfo.h  |2 
 hwpfilter/source/hiodev.cxx   |   24 -
 hwpfilter/source/hiodev.h |6 
 hwpfilter/source/hpara.cxx|4 
 hwpfilter/source/hwpfile.cxx  |6 
 hwpfilter/source/hwpfile.h|5 
 include/o3tl/safeint.hxx  |   37 +
 officecfg/registry/schema/org/openoffice/Setup.xcs|2 
 package/source/zipapi/ZipFile.cxx |   15 
 sal/textenc/tcvtkr6.tab   |4 
 sc/qa/unit/data/xls/fail/ofz5527-1.xls|binary
 sc/source/core/data/grouptokenconverter.cxx   |   20 +
 sc/source/core/tool/token.cxx |3 
 sc/source/filter/excel/xicontent.cxx  |4 
 sc/source/ui/docshell/externalrefmgr.cxx  |9 
 sc/source/ui/view/cellsh2.cxx |6 
 sd/source/ui/remotecontrol/BluetoothServer.cxx|9 
 sd/source/ui/remotecontrol/Server.cxx |2 
 sot/source/sdstor/stgstrms.cxx|4 
 svl/source/numbers/zforscan.cxx   |   14 
 sw/qa/core/data/html/pass/ofz5535-1.html  |1 
 sw/qa/core/data/rtf/pass/forcepoint-1.rtf |  193 ++
 sw/source/core/bastyp/swcache.cxx |   32 +
 sw/source/core/txtnode/fntcache.cxx   |3 
 sw/source/filter/html/htmlctxt.cxx|1 
 sw/source/filter/html/htmltab.cxx |3 
 sw/source/filter/html/swhtml.cxx  |   33 +
 sw/source/filter/html/swhtml.hxx  |2 
 sw/source/filter/ww8/ww8par.hxx   |2 
 sw/source/filter/ww8/ww8par2.cxx  |9 
 sw/source/filter/ww8/ww8par3.cxx  |8 
 sw/source/filter/ww8/ww8scan.cxx  |   17 
 sw/source/filter/ww8/ww8scan.hxx  |9 
 sw/source/filter/ww8/ww8toolbar.cxx   |4 
 sw/source/ui/envelp/label1.cxx|   13 
 sysui/desktop/freedesktop/freedesktop-menus.spec  |   24 -
 sysui/desktop/macosx/Info.plist.in|   28 -
 sysui/desktop/menus/calc.desktop  |2 
 sysui/desktop/menus/impress.desktop   |2 
 sysui/desktop/menus/writer.desktop|2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.desktop |2 
 sysui/desktop/mimetypes/ms-excel-sheet-12.keys|2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-sheet-binary-12.keys |2 
 sysui/desktop/mimetypes/ms-excel-template-12.desktop  |2 
 sysui/desktop/mimetypes/ms-excel-template-12.keys |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-presentation-12.keys|2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.desktop |2 
 sysui/desktop/mimetypes/ms-powerpoint-template-12.keys|2 
 sysui/desktop/mimetypes/ms-word-document-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-document-12.keys  |2 
 sysui/desktop/mimetypes/ms-word-template-12.desktop   |2 
 sysui/desktop/mimetypes/ms-word-template-12.keys  |2 
 sysui/desktop/mimetypes/openoffice.applications   |2 
 sysui/desktop/mimetypes/openoffice.mime   |   14 
 sysui/desktop/solaris/mime.types  |   12 
 vcl/inc/sft.hxx   |9 
 vcl/source/control/ctrl.cxx   |3 
 vcl/source/fontsubset/sft.cxx |  148 +--
 vcl/source/gdi/pdfwriter_impl.cxx |2 
 vcl/source/helper/strhelper.cxx   |9 
 wri

Re: Help in Libreoffice extension development

2018-03-06 Thread Pattabhi RK
Dear Samuel,

We read through Libreoffice documentation. My understanding of the
extension creation is as follows,

We have create UNO component and call our required function in that
component.

To create the UNO component,
First we have create IDL file, from IDL file we have to create URD file.
>From URD file we need to create RDB file.

The newly created RDB file along with types.RDB in libreoffice should be
given to javamaker to create java class file.

Actually we tried using the command line option but we were struck with
javamaker command. We were getting types.rdb file mismatch error.

So then we started with Eclipse.  And tried to install the
starrter-project-extension  given by you. We were able to install your
extension. As we said in the earlier mail, we were struck in UNO type
selection wizard not coming up. And we could not figure out, where to put
the respective files in your code.

We have a better FST based spellchecker for Tamil and we wanted to  come up
with an oxt as a part of our research project.


And I just checked the link given by you. There is no spellchecker or
grammar checker for Tamil given in those links.

Thank you very much for your prompt responses.

regards,
Pattabhi,

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.


On Tue, Mar 6, 2018 at 8:56 PM, Samuel Mehrbrodt 
wrote:

> Hi Pattabhi,
>
> well I can't create the extension for you. You need to get a basic
> understanding how LibreOffice extensions work if you want to do that work.
>
> But why do you want to create an extension for that? If you want spell
> checking in Tamil, you can just provide a dictionary file. You can also
> provide the dictionary as an extension without code.
>
> This page indicates there already exists a spell checker and even grammar
> checker for Tamil, did you check that? https://wiki.
> documentfoundation.org/Language_support_of_LibreOffice
>
> Regards
> Samuel
>
> Am 06.03.2018 um 15:58 schrieb Pattabhi RK:
>
> Dear Samuel,
>
>   Sorry to disturb you with my silly problems. I am new to this
> libreoffice development. I went through the sample codes provided by you. I
> could not understand where these codes have to be used or put into the
> starter-extension project so that it can be customised for spellchecking
> task.
>
>   In the starter project extension we have the StarterImpl.java. And I
> think instead of this we need to put in SampleSpellChecker.java. Now
> accordingly how should the RegistrationHandler.java be modified I could not
> understand. And similarly how should the StarterProject.idl be modified I
> could not understand. So towards this I thought I will build a new
> Extension project, as given in the page https://wiki.openoffice.org/
> wiki/JavaEclipseTuto and specify the UNO type as "XSpellChecker", so that
> these basic codes and .urd, .idl and types.rdb will be built by the Eclipse
> and I will put the code given in SpellChecker.java in the Impl.java.
>
>   So this is where I got error of UNO type selection wizard not working.
> The StarterProject Extension is working well in my system and not getting
> any errors. So please kindly help me in knowing how and where I should
> modify your StarterProject extension code to put SpellChecker.java code.
>
>  Thank you very much.
>
> regards,
> Pattabhi
>
> Research Scholar,
> AU-KBC Research Centre,
> Anna University, Chennai, India.
>
>
>
> --
> Samuel Mehrbrodt
> Softwareentwickler LibreOffice
> –––
> CIB software GmbH
> Geschäftsstelle Hamburg
> Flachsland 10
> 
> 22083 Hamburg
> –––
> T +49 (40) / 28 48 42 -224
> F +49 (40) / 28 48 42 -100
>
> samuel.mehrbr...@cib.de
> www.cib.de
> –––
> Sitz: München
> Registergericht München, HRB 123286
> Geschäftsführer: Dipl.-Ing. Ulrich Brandner
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help in Libreoffice extension development

2018-03-06 Thread Samuel Mehrbrodt

Hi Pattabhi,

well I can't create the extension for you. You need to get a basic 
understanding how LibreOffice extensions work if you want to do that work.


But why do you want to create an extension for that? If you want spell 
checking in Tamil, you can just provide a dictionary file. You can also 
provide the dictionary as an extension without code.


This page indicates there already exists a spell checker and even 
grammar checker for Tamil, did you check that? 
https://wiki.documentfoundation.org/Language_support_of_LibreOffice


Regards
Samuel


Am 06.03.2018 um 15:58 schrieb Pattabhi RK:

Dear Samuel,

  Sorry to disturb you with my silly problems. I am new to this 
libreoffice development. I went through the sample codes provided by 
you. I could not understand where these codes have to be used or put 
into the starter-extension project so that it can be customised for 
spellchecking task.


  In the starter project extension we have the StarterImpl.java. And I 
think instead of this we need to put in SampleSpellChecker.java. Now 
accordingly how should the RegistrationHandler.java be modified I 
could not understand. And similarly how should the StarterProject.idl 
be modified I could not understand. So towards this I thought I will 
build a new Extension project, as given in the page 
https://wiki.openoffice.org/wiki/JavaEclipseTuto and specify the UNO 
type as "XSpellChecker", so that these basic codes and .urd, .idl and 
types.rdb will be built by the Eclipse and I will put the code given 
in SpellChecker.java in the Impl.java.


  So this is where I got error of UNO type selection wizard not 
working. The StarterProject Extension is working well in my system and 
not getting any errors. So please kindly help me in knowing how and 
where I should modify your StarterProject extension code to put 
SpellChecker.java code.


 Thank you very much.

regards,
Pattabhi

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.




--
Samuel Mehrbrodt
Softwareentwickler LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -224
F +49 (40) / 28 48 42 -100

samuel.mehrbr...@cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Call for help in MSI/DEB/RPM packaging for new help

2018-03-06 Thread Olivier Hallot
Hello all

We have a new help system where we use default browser to show help
pages. After some time spent looking into the way LO packages are build
I really need advise and help to proceed and build the necessary
packages to replace the old help.

It requires understanding of build process, makefiles and perl scripts
in scp2/ module.

The task looks simple: once the new help is built (--with-help=html),
the help files are available in core/instdir/help/6.1 so it must take
the 6.1/ folder and make a package, which is as simple as zipping it. Of
course, replace '6.1' by %PRODUCTVERSION.

https://bugs.documentfoundation.org/show_bug.cgi?id=116240
https://bugs.documentfoundation.org/show_bug.cgi?id=115312

Any collaboration or help here is welcome. Question on the task here or
in #libreoffice-dev

Thank you all in advance.
-- 
Olivier Hallot
LibreOffice Documentation Coordinator
Comunidade LibreOffice
Rio de Janeiro - Brasil - Local Time: UTC-03:00
http://tdf.io/joinus
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Help in Libreoffice extension development

2018-03-06 Thread Pattabhi RK
Dear Samuel,

  Sorry to disturb you with my silly problems. I am new to this libreoffice
development. I went through the sample codes provided by you. I could not
understand where these codes have to be used or put into the
starter-extension project so that it can be customised for spellchecking
task.

  In the starter project extension we have the StarterImpl.java. And I
think instead of this we need to put in SampleSpellChecker.java. Now
accordingly how should the RegistrationHandler.java be modified I could not
understand. And similarly how should the StarterProject.idl be modified I
could not understand. So towards this I thought I will build a new
Extension project, as given in the page
https://wiki.openoffice.org/wiki/JavaEclipseTuto and specify the UNO type
as "XSpellChecker", so that these basic codes and .urd, .idl and types.rdb
will be built by the Eclipse and I will put the code given in
SpellChecker.java in the Impl.java.

  So this is where I got error of UNO type selection wizard not working.
The StarterProject Extension is working well in my system and not getting
any errors. So please kindly help me in knowing how and where I should
modify your StarterProject extension code to put SpellChecker.java code.

 Thank you very much.

regards,
Pattabhi

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.



On Tue, Mar 6, 2018 at 7:44 PM, Samuel Mehrbrodt 
wrote:

> Hi Pattabhi,
>
> I gave you some resources yesterday.
>
> Did you look at those?
>
> What did you try and where exactly are you stuck?
>
> Regards
> Samuel
>
> Am 06.03.2018 um 15:10 schrieb Pattabhi RK:
>
> Dear Samuel,
>
>   Thank you very much for kind reply. Actually we are not knowing how to
> customize your libreoffice-starter extension for making a new extension for
> the XSpellChecker service. Actually our objective is to create a
> spellchecker extension for Tamil (Indian Language). We have a java stand
> alone spellcheker code in java, which takes a string and checks for
> spelling, if there is error it gives alternative suggestions. We have
> developed using FST.
>
>  I request you to please kindly help us in customizing the starter
> extension project for this.
>
> Thanks & regards,
> Pattabhi,
>
> Research Scholar,
> AU-KBC Research Centre,
> Anna University, Chennai, India.
>
>
> On Tue, Mar 6, 2018 at 7:19 PM, Samuel Mehrbrodt 
> wrote:
>
>>
>> Ah that looks like https://github.com/LibreOffice/loeclipse/issues/62
>> which is fixed but not released yet.
>>
>> Although the bug and also your stack looks like the error occurs when
>> exporting the package via File->Export and not when creating the run config.
>>
>> Anyway, it means you have no valid project that can be built. Please
>> create a fresh project, or use the starter extension:
>> https://github.com/smehrbrodt/libreoffice-starter-extension
>>
>> Regards
>> Samuel
>>
>>
> --
> Samuel Mehrbrodt
> Softwareentwickler LibreOffice
> –––
> CIB software GmbH
> Geschäftsstelle Hamburg
> Flachsland 10
> 
> 22083 Hamburg
> –––
> T +49 (40) / 28 48 42 -224
> F +49 (40) / 28 48 42 -100
>
> samuel.mehrbr...@cib.de
> www.cib.de
> –––
> Sitz: München
> Registergericht München, HRB 123286
> Geschäftsführer: Dipl.-Ing. Ulrich Brandner
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-03-06 Thread Samuel Mehrbrodt
 sc/qa/extras/anchor.cxx  |   46 +++
 sc/qa/unit/data/ods/3AnchorTypes.ods |binary
 2 files changed, 46 insertions(+)

New commits:
commit 782d504649ccb2dbe1a55d7abdf5c532b62f5c39
Author: Samuel Mehrbrodt 
Date:   Mon Feb 12 15:32:15 2018 +0100

tdf#114552 Add unit test for ODF Import of anchor types

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

diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx
index 5d79caad7df9..dc0a8942b9dd 100644
--- a/sc/qa/extras/anchor.cxx
+++ b/sc/qa/extras/anchor.cxx
@@ -38,10 +38,12 @@ public:
 
 void testUndoAnchor();
 void testTdf76183();
+void testODFAnchorTypes();
 
 CPPUNIT_TEST_SUITE(ScAnchorTest);
 CPPUNIT_TEST(testUndoAnchor);
 CPPUNIT_TEST(testTdf76183);
+CPPUNIT_TEST(testODFAnchorTypes);
 CPPUNIT_TEST_SUITE_END();
 private:
 
@@ -187,6 +189,50 @@ void ScAnchorTest::testTdf76183()
 pDocSh->DoClose();
 }
 
+void ScAnchorTest::testODFAnchorTypes()
+{
+OUString aFileURL;
+createFileURL("3AnchorTypes.ods", aFileURL);
+// open the document with graphic included
+uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileURL);
+CPPUNIT_ASSERT(xComponent.is());
+
+// Get the document model
+SfxObjectShell* pFoundShell = 
SfxObjectShell::GetShellFromComponent(xComponent);
+CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
+
+ScDocShell* pDocSh = dynamic_cast(pFoundShell);
+CPPUNIT_ASSERT(pDocSh);
+
+// Check whether graphic imported well
+ScDocument& rDoc = pDocSh->GetDocument();
+ScDrawLayer* pDrawLayer = rDoc.GetDrawLayer();
+CPPUNIT_ASSERT(pDrawLayer);
+
+const SdrPage *pPage = pDrawLayer->GetPage(0);
+CPPUNIT_ASSERT(pPage);
+
+// Check 1st object: Page anchored
+SdrGrafObj* pObject = dynamic_cast(pPage->GetObj(0));
+CPPUNIT_ASSERT(pObject);
+ScAnchorType anchorType = ScDrawLayer::GetAnchorType(*pObject);
+CPPUNIT_ASSERT_EQUAL(SCA_PAGE, anchorType);
+
+// Check 2nd object: Cell anchored, resize with cell
+pObject = dynamic_cast(pPage->GetObj(1));
+CPPUNIT_ASSERT(pObject);
+anchorType = ScDrawLayer::GetAnchorType(*pObject);
+CPPUNIT_ASSERT_EQUAL(SCA_CELL_RESIZE, anchorType);
+
+ // Check 3rd object: Cell anchored
+pObject = dynamic_cast(pPage->GetObj(2));
+CPPUNIT_ASSERT(pObject);
+anchorType = ScDrawLayer::GetAnchorType(*pObject);
+CPPUNIT_ASSERT_EQUAL(SCA_CELL, anchorType);
+
+pDocSh->DoClose();
+}
+
 void ScAnchorTest::tearDown()
 {
 if (mxComponent.is())
diff --git a/sc/qa/unit/data/ods/3AnchorTypes.ods 
b/sc/qa/unit/data/ods/3AnchorTypes.ods
new file mode 100644
index ..a68c36271595
Binary files /dev/null and b/sc/qa/unit/data/ods/3AnchorTypes.ods differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: officecfg/registry sc/inc sc/qa sc/sdi sc/source sc/uiconfig

2018-03-06 Thread Samuel Mehrbrodt
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |   17 
 sc/inc/drwlayer.hxx   |4 -
 sc/inc/global.hxx |5 -
 sc/inc/sc.hrc |5 -
 sc/inc/strings.hrc|1 
 sc/inc/userdat.hxx|1 
 sc/qa/extras/anchor.cxx   |4 -
 sc/qa/unit/subsequent_export-test.cxx |6 -
 sc/qa/unit/ucalc.cxx  |   12 +--
 sc/qa/unit/ucalc_sort.cxx |2 
 sc/sdi/drawsh.sdi |1 
 sc/sdi/scalc.sdi  |   18 
 sc/source/core/data/drwlayer.cxx  |   40 
--
 sc/source/core/data/userdat.cxx   |3 
 sc/source/filter/excel/xiescher.cxx   |2 
 sc/source/filter/inc/drawingbase.hxx  |3 
 sc/source/filter/oox/drawingbase.cxx  |2 
 sc/source/filter/oox/drawingfragment.cxx  |3 
 sc/source/filter/xcl97/xcl97rec.cxx   |   10 +-
 sc/source/filter/xml/XMLExportIterator.hxx|1 
 sc/source/filter/xml/XMLTableShapeImportHelper.cxx|3 
 sc/source/filter/xml/xmlexprt.cxx |6 +
 sc/source/ui/drawfunc/drawsh2.cxx |   18 +++-
 sc/source/ui/drawfunc/drawsh5.cxx |   17 +++-
 sc/source/ui/drawfunc/fuins1.cxx  |   21 -
 sc/source/ui/inc/drawview.hxx |2 
 sc/source/ui/view/drawvie3.cxx|   18 +++-
 sc/source/ui/view/viewfun7.cxx|6 +
 sc/uiconfig/scalc/popupmenu/anchor.xml|3 
 29 files changed, 183 insertions(+), 51 deletions(-)

New commits:
commit acf0bad4e2b8c3c43aaaee8312c8a61d3552fcc2
Author: Samuel Mehrbrodt 
Date:   Fri Feb 9 12:52:52 2018 +0100

tdf#114552 Add a third anchor type for calc graphics

This allows to have two cell anchored types:
* Only cell anchored (moves with the cell when sorting etc)
* Cell anchored, also resizes with the cell

Beforehand, all cell anchored images would resize with the cell,
which was often not what users expected.

The new default (when inserting images) is now that inserted images
are only anchored to the cell, but don't resize with the cell.

This makes use of the ODF elements table:end-cell-address, table:end-x, 
table:end-y.
When images should resize with the cell, the end address is written
(it has always been written earlier, so documents would still import 
correctly).
If not, they are omitted.

Also implements xlsx import & export

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index 979e90349570..3d2e0783a081 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -1965,6 +1965,9 @@
 
   To P~age
 
+
+  Anchor to p~age
+
   
   
 
@@ -1973,6 +1976,20 @@
 
   To ~Cell
 
+
+  Anchor to ~cell (move with cell)
+
+  
+  
+
+  Anchor: To Cell (~resize with cell)
+
+
+  To Cell (~resize with cell)
+
+
+  Anchor to cell (move and ~resize with 
cell)
+
   
   
 
diff --git a/sc/inc/drwlayer.hxx b/sc/inc/drwlayer.hxx
index 92fc4f0449df..123463855a25 100644
--- a/sc/inc/drwlayer.hxx
+++ b/sc/inc/drwlayer.hxx
@@ -80,6 +80,7 @@ class ScUndoAnchorData : public SdrUndoObj
 {
 private:
 boolmbWasCellAnchored;
+boolmbWasResizeWithCell;
 ScDocument* mpDoc;
 SCTAB   mnTab;
 public:
@@ -174,12 +175,13 @@ public:
 voidEnsureGraphicNames();
 
 static bool IsCellAnchored( const SdrObject& rObj );
+static bool IsResizeWithCell( const SdrObject& rObj );
 static void SetPageAnchored( SdrObject& );
 static void SetCellAnchored( SdrObject&, const ScDrawObjData 
&rAnchor );
 static void  

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

2018-03-06 Thread David Tardon
 external/icu/UnpackedTarball_icu.mk |1 +
 external/icu/ofz4860.patch.2|   25 +
 2 files changed, 26 insertions(+)

New commits:
commit 2b69156c43261ceae55eb4d3b644c4c2d73231ba
Author: David Tardon 
Date:   Tue Mar 6 15:17:13 2018 +0100

forcepoint: fix out-of-bounds read in ICU

Change-Id: I5061d38d0e7df0de9a5c7574d522ce69934e4a24

diff --git a/external/icu/UnpackedTarball_icu.mk 
b/external/icu/UnpackedTarball_icu.mk
index 499650976a55..a4d0b16ecb36 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
$(if $(filter-out 
ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
external/icu/icu4c-khmerbreakengine.patch.1 \
external/icu/icu4c-59-werror-shadow.patch.1 \
+   external/icu/ofz4860.patch.2 \
 ))
 
 $(eval $(call 
gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/ofz4860.patch.2 b/external/icu/ofz4860.patch.2
new file mode 100644
index ..14114d52878b
--- /dev/null
+++ b/external/icu/ofz4860.patch.2
@@ -0,0 +1,25 @@
+From 529ba01ee606940ca273b187be8ce9ba31cf2d90 Mon Sep 17 00:00:00 2001
+From: David Tardon 
+Date: Fri, 19 Jan 2018 10:41:02 +0100
+Subject: [PATCH] ofz#4860 fix past-the-end read from array
+
+---
+ icu4c/source/common/locmap.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp
+index cbb2b810a..6d62d8310 100644
+--- a/icu4c/source/common/locmap.cpp
 b/icu4c/source/common/locmap.cpp
+@@ -1015,7 +1015,7 @@ static const char*
+ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID)
+ {
+ uint32_t i;
+-for (i = 0; i <= this_0->numRegions; i++)
++for (i = 0; i < this_0->numRegions; i++)
+ {
+ if (this_0->regionMaps[i].hostID == hostID)
+ {
+-- 
+2.14.3
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Caolán McNamara
 vcl/source/filter/jpeg/jpegc.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 12278d018d7a0ad92f219c1040d3c135fd166638
Author: Caolán McNamara 
Date:   Tue Mar 6 09:53:37 2018 +

ofz: timeout, reduce warning limit further

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

diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 5b36ba3f1e7c..228de495f01a 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -72,7 +72,7 @@ extern "C" void outputMessage (j_common_ptr cinfo)
 
 static int GetWarningLimit()
 {
-return utl::ConfigManager::IsFuzzing() ? 10 : 1000;
+return utl::ConfigManager::IsFuzzing() ? 5 : 1000;
 }
 
 extern "C" void emitMessage (j_common_ptr cinfo, int msg_level)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Help in Libreoffice extension development

2018-03-06 Thread Samuel Mehrbrodt

Hi Pattabhi,

I gave you some resources yesterday.

Did you look at those?

What did you try and where exactly are you stuck?

Regards
Samuel


Am 06.03.2018 um 15:10 schrieb Pattabhi RK:

Dear Samuel,

  Thank you very much for kind reply. Actually we are not knowing how 
to customize your libreoffice-starter extension for making a new 
extension for the XSpellChecker service. Actually our objective is to 
create a spellchecker extension for Tamil (Indian Language). We have a 
java stand alone spellcheker code in java, which takes a string and 
checks for spelling, if there is error it gives alternative 
suggestions. We have developed using FST.


 I request you to please kindly help us in customizing the starter 
extension project for this.


Thanks & regards,
Pattabhi,

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.


On Tue, Mar 6, 2018 at 7:19 PM, Samuel Mehrbrodt 
mailto:samuel.mehrbr...@cib.de>> wrote:



Ah that looks like
https://github.com/LibreOffice/loeclipse/issues/62
 which is
fixed but not released yet.

Although the bug and also your stack looks like the error occurs
when exporting the package via File->Export and not when creating
the run config.

Anyway, it means you have no valid project that can be built.
Please create a fresh project, or use the starter extension:
https://github.com/smehrbrodt/libreoffice-starter-extension


Regards
Samuel




--
Samuel Mehrbrodt
Softwareentwickler LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -224
F +49 (40) / 28 48 42 -100

samuel.mehrbr...@cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Cppuno in bridges, HELP needed.

2018-03-06 Thread Jan Iversen


> On 6 Mar 2018, at 14:17, Stephan Bergmann  wrote:
> 
> On 06.03.2018 11:38, Jan Iversen wrote:
>> At some point a piece of code (in the same executable) decides to make a uno 
>> call, this looks like
>> Cpp2uno_call() ->
>>  raise_exception()
>>  __cxa_throw() ->
>>  ( C++ throw handling) ->
>>  getCaughtException() ->
>>  UnoInterfaceProxyDispatch() ->
>>  cpp_call() ->
>>  CallVirtualMethod() ->
>>  ( Call requested 
>> function )
> 
> Hard to tell what you're actually looking at without seeing a real backtrace 
> (e.g., I have no idea what "Cpp2uno_call()" is supposed to mean).

No problem, I just tried to limit the mail size :-) cpp2uno_call is a function 
implemented in bridges/source/cppuno/gcc*

Backtrace:

(lldb) bt
* thread #10, name = 'LOKitThread.queue', stop reason = breakpoint 14.1
  * frame #0: 0x00010cb6b416 
libKit.dylib`gcc3::callVirtualMethod(pThis=0x0001173b0f20, nVtableIndex=4, 
pRegisterReturn=0x, pReturnTypeRef=0x60898830, 
bSimpleReturn=true, pStack=0x72a04dd0, nStack=0, 
pGPR=0x72a050e0, pFPR=0x72a050a0) at callvirtualmethod.cxx:73
frame #1: 0x00010cb6a48f 
libKit.dylib`cpp_call(pThis=0x604000e76c40, aVtableSlot=(offset = 0, index 
= 4), pReturnTypeRef=0x60898830, nParams=0, pParams=0x, 
pUnoReturn=0x, pUnoArgs=0x, 
ppUnoExc=0x72a053f0) at uno2cpp.cxx:233
frame #2: 0x00010cb69bee 
libKit.dylib`unoInterfaceProxyDispatch(pUnoI=0x604000e76c40, 
pMemberDescr=0x60c00015bcd0, pReturn=0x, 
pArgs=0x, ppException=0x72a053f0) at uno2cpp.cxx:418
frame #3: 0x0001133528cd 
libKit.dylib`com::sun::star::uno::UnoInterfaceReference::dispatch(this=0x72a05418,
 pMemberType=0x60c00015bcd0, pReturn=0x, 
pArgs=0x, ppException=0x72a053f0) const at 
dispatcher.hxx:173
frame #4: 0x000113352558 libKit.dylib`cppu::getCaughtException() at 
exc_thrower.cxx:238
frame #5: 0x00011371d85f 
libKit.dylib`utl::UCBContentHelper::IsDocument(url=0x72a059e0) at 
ucbhelper.cxx:150
frame #6: 0x00010c83d005 
libKit.dylib`FSStorageFactory::createInstanceWithArguments(this=0x61a6b300,
 aArguments=0x72a05b40) at fsfactory.cxx:128
frame #7: 0x00010c83d883 libKit.dylib`non-virtual thunk to 
FSStorageFactory::createInstanceWithArguments(this=0x61a6b300, 
aArguments=0x72a05b40) at fsfactory.cxx:0
frame #8: 0x00010c917d91 
libKit.dylib`framework::PresetHandler::getOrCreateRootStorageShare(this=0x601f2500)
 at presethandler.cxx:226
frame #9: 0x00010c918d52 
libKit.dylib`framework::PresetHandler::connectToResource(this=0x601f2500,
 eConfigType=E_MODULES, sResource=0x72a06740, 
sModule=0x7fb0704781a0, xDocumentRoot=0x72a06738, 
rLanguageTag=0x72a067a0) at presethandler.cxx:349
frame #10: 0x00010cab7a6c libKit.dylib`(anonymous 
namespace)::ModuleUIConfigurationManager::ModuleUIConfigurationManager(this=0x7fb0704780a0,
 xContext=0x72a06890, aArguments=0x72a06de0) at 
moduleuiconfigurationmanager.cxx:888
frame #11: 0x00010cab6dd5 libKit.dylib`(anonymous 
namespace)::ModuleUIConfigurationManager::ModuleUIConfigurationManager(this=0x7fb0704780a0,
 xContext=0x72a06890, aArguments=0x72a06de0) at 
moduleuiconfigurationmanager.cxx:855
frame #12: 0x00010cab6cba 
libKit.dylib`::com_sun_star_comp_framework_ModuleUIConfigurationManager_get_implementation(context=0x60800012af00,
 arguments=0x72a06de0) at moduleuiconfigurationmanager.cxx:1676
frame #13: 0x0001133c55a0 libKit.dylib`com::sun::star::uno::XInterface* 
std::__1::__invoke_void_return_wrapper::__call const&), 
com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence 
const&>(com::sun::star::uno::XInterface* 
(*&&&)(com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence const&), 
com::sun::star::uno::XComponentContext*&&, 
com::sun::star::uno::Sequence const&&&) [inlined] 
decltype(__f=0x600f6998, __args=0x72a069c0, 
__args=0x72a06de0)(com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence 
const&)>(fp)(std::__1::forward const&>(fp0))) 
std::__1::__invoke const&), 
com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence 
const&>(com::sun::star::uno::XInterface* 
(*&&&)(com::sun::star::uno::XComponentContext*, 
com::sun::star::uno::Sequence const&), 
com::sun::star::uno::XComponentContext*&&, 
com::sun::star::uno::Sequence const&&&) at 
type_traits:4291
frame #14: 0x0001133c5574 libKit.dylib`com::sun::star::uno::XInterface* 
std::__1

Re: Help in Libreoffice extension development

2018-03-06 Thread Pattabhi RK
Hi,

  Thanks for the immediate response. As suggested by you I have ignored the
type selector wizard. But while run the project using Run Configuration >
LibreOffice Application I am getting the following error message:

"Unhandled event loop exception" in the plugin: org.eclipse.ui

The full stack trace is


java.lang.NullPointerException
at
org.libreoffice.ide.eclipse.core.gui.PackageContentSelector.getDefaultContent(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.gui.PackageContentSelector.loadDefaults(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.wizards.pages.UnoPackageExportPage.loadData(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.wizards.pages.UnoPackageExportPage.createControl(Unknown
Source)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:176)
at
org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:688)
at
org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1128)
at
org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1181)
at
org.eclipse.jface.wizard.WizardDialog.lambda$3(WizardDialog.java:1169)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at
org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1169)
at
org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:864)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:413)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at
org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4602)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4183)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at
org.eclipse.ui.internal.handlers.WizardHandler$Export.executeHandler(WizardHandler.java:106)
at
org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:290)
at
org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
at
org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
at
org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
at
org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at
org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at
org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at
org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at
org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:390)
at
org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:151)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at
org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5348)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4602)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4183)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at
org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at
org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at
org.eclipse.u

Re: Help in Libreoffice extension development

2018-03-06 Thread Stephan Bergmann

On 06.03.2018 14:12, Pattabhi RK wrote:
   We are trying to develop a libreoffice extension for spellchecker. 
And to start with we have tried to develop HelloWorld extension as given 
in the link.


https://wiki.openoffice.org/wiki/JavaEclipseTuto


Sorry, I have no idea about using Eclipse for LibreOffice extension 
development.  From the below exception, it looks like that 
OpenOffice.org Eclipse integration you link to above might not actually 
work with LO.  (The program/types.rdb in LO is in a different format 
than what it was back in OOo.  LO usually treats those different formats 
transparently, but apparently something does not work well in 
combination with that OOo Eclipse integration.)


I see 
 
mentioning something supposedly LO-specific for developing extensions 
with Eclipse.  Have you checked that out?


We are not able to load UNO types selector and we have got the following 
error:



om.sun.star.registry.InvalidRegistryException: 
com.sun.star.registry.SimpleRegistry.open(file:///opt/libreoffice5.4/program/types.rdb): 
underlying Registry::open/create() = 6

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


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

2018-03-06 Thread Katarina Behrens
 cui/source/inc/treeopt.hxx|   13 +++--
 cui/source/options/optjava.cxx|   21 -
 cui/source/options/optjava.hxx|4 
 cui/source/options/treeopt.cxx|   19 ++-
 include/svtools/restartdialog.hxx |4 +++-
 5 files changed, 48 insertions(+), 13 deletions(-)

New commits:
commit 5bf62a3e7d15108a4754e0b15db9d1cb97bfc3a0
Author: Katarina Behrens 
Date:   Tue Mar 6 14:05:54 2018 +0100

After Java settings have changed, restart LibO for real

Previously restart LibO dialog was shown, but did nothing. I haven't
found an easy way to close all frames with 3 modal dialogs opened, so
now restart dialog simply pops up later (after user bonks OK button
on Tools > Options dialog)

Change-Id: I5638420163da90d514ba251bd84e226d4c74e62b

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index 9cac9922a408..1eb79df44b9b 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -20,6 +20,8 @@
 #ifndef INCLUDED_CUI_SOURCE_INC_TREEOPT_HXX
 #define INCLUDED_CUI_SOURCE_INC_TREEOPT_HXX
 
+#include 
+#include 
 #include 
 #include 
 
@@ -126,14 +128,16 @@ class SvxColorTabPage;
 class OfaTreeOptionsDialog : public SfxModalDialog
 {
 private:
-SvTreeListEntry*pCurrentPageEntry;
-
 VclPtr   pOkPB;
 VclPtr pBackPB;
 
 VclPtr  pTreeLB;
 VclPtr pTabBox;
 
+VclPtrm_pParent;
+
+SvTreeListEntry*   pCurrentPageEntry;
+
 OUString   sTitle;
 OUString   sNotLoadedError;
 
@@ -147,6 +151,9 @@ private:
 // check "for the current document only" and set focus to "Western" 
languages box
 bool   bIsForSetDocumentLanguage;
 
+bool   bNeedsRestart;
+svtools::RestartReason eRestartReason;
+
 css::uno::Reference < css::awt::XContainerWindowProvider >
 m_xContainerWinProvider;
 
@@ -194,6 +201,8 @@ public:
 
 // helper functions to call the language settings TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
+
+voidSetNeedsRestart( svtools::RestartReason eReason );
 };
 
 // class OfaPageResource -
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index cbb18b2ef84c..5c175dfbd925 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -21,6 +21,7 @@
 
 #include "optaboutconfig.hxx"
 #include "optjava.hxx"
+#include "treeopt.hxx"
 #include 
 
 #include 
@@ -158,6 +159,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* 
pParent, const SfxItemSet&
 get(m_pExperimentalCB, "experimental");
 get(m_pMacroCB, "macrorecording");
 get(m_pExpertConfigBtn, "expertconfig");
+m_pParentDlg.reset( 
dynamic_cast(getNonLayoutParent(pParent)) );
 m_sAccessibilityText = get("a11y")->GetText();
 m_sAddDialogText = get("selectruntime")->GetText();
 
@@ -224,6 +226,7 @@ void SvxJavaOptionsPage::dispose()
 
 jfw_unlock();
 #endif
+m_pParentDlg.clear();
 m_pJavaEnableCB.clear();
 m_pJavaBox.clear();
 m_pJavaPathText.clear();
@@ -331,8 +334,7 @@ IMPL_LINK_NOARG_TYPED(SvxJavaOptionsPage, 
ParameterHdl_Impl, Button*, void)
 (void)eErr;
 if ( bRunning )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS);
+RequestRestart( 
svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS );
 }
 }
 }
@@ -376,8 +378,7 @@ IMPL_LINK_NOARG_TYPED(SvxJavaOptionsPage, 
ClassPathHdl_Impl, Button*, void)
 (void)eErr;
 if ( bRunning )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_FOLDERS);
+RequestRestart( svtools::RESTART_REASON_ASSIGNING_FOLDERS );
 }
 }
 }
@@ -636,6 +637,11 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 #endif
 }
 
+void SvxJavaOptionsPage::RequestRestart( svtools::RestartReason eReason )
+{
+if ( m_pParentDlg )
+m_pParentDlg->SetNeedsRestart( eReason );
+}
 
 VclPtr SvxJavaOptionsPage::Create( vcl::Window* pParent, const 
SfxItemSet* rAttrSet )
 {
@@ -652,8 +658,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 SvtMiscOptions aMiscOpt;
 aMiscOpt.SetExperimentalMode( m_pExperimentalCB->IsChecked() );
 bModified = true;
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_EXP_FEATURES);
+RequestRestart( svtools::RESTART_REASON_EXP_FEATURES );
 }
 
 if ( m_pMacroCB->Is

Re: Help in Libreoffice extension development

2018-03-06 Thread Samuel Mehrbrodt

Hi Pattabhi,

this is a known bug in LOEclipse: 
https://github.com/LibreOffice/loeclipse/issues/22


You have two options:

 * Ignore the type selector (you can use the wizard just fine without it)
 * Fix the bug

Regards
Samuel

Am 06.03.2018 um 14:12 schrieb Pattabhi RK:


Hi,

  We are trying to develop a libreoffice extension for spellchecker. 
And to start with we have tried to develop HelloWorld extension as 
given in the link.


https://wiki.openoffice.org/wiki/JavaEclipseTuto

We are not able to load UNO types selector and we have got the 
following error:



om.sun.star.registry.InvalidRegistryException: 
com.sun.star.registry.SimpleRegistry.open(file:///opt/libreoffice5.4/program/types.rdb): 
underlying Registry::open/create() = 6
    at 
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:158)

    at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:122)
    at 
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:312)
    at 
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
    at 
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
    at 
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:618)
    at 
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
    at 
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)

    at com.sun.proxy.$Proxy30.open(Unknown Source)
    at 
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.getTypesFromRegistry(Unknown 
Source)
    at 
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.queryTypes(Unknown 
Source)
    at 
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.getTypes(Unknown 
Source)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.libreoffice.ide.eclipse.core.office.TypesGetter.getTypes(Unknown 
Source)
    at 
org.libreoffice.ide.eclipse.core.unotypebrowser.UnoTypeProvider$UnoTypesGetterThread.run(Unknown 
Source)



When we have loaded the LibreOffice and SDK using "Window > Preference 
> LibreOffice Path, we got message saying " Office bootstrapped"


So we are not able to understand where we are going wrong. I request 
you to kindly help in resolving this problem.



We are using Eclipse Oxygen 2, Libreoffice 5.4.5 and sdk 5.4.5. And 
using Ubuntu 14.04 LTS.


Thanks,
Pattabhi,

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.






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


--
Samuel Mehrbrodt
Softwareentwickler LibreOffice
–––
CIB software GmbH
Geschäftsstelle Hamburg
Flachsland 10
22083 Hamburg
–––
T +49 (40) / 28 48 42 -224
F +49 (40) / 28 48 42 -100

samuel.mehrbr...@cib.de
www.cib.de
–––
Sitz: München
Registergericht München, HRB 123286
Geschäftsführer: Dipl.-Ing. Ulrich Brandner
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Cppuno in bridges, HELP needed.

2018-03-06 Thread Stephan Bergmann

On 06.03.2018 11:38, Jan Iversen wrote:

At some point a piece of code (in the same executable) decides to make a uno 
call, this looks like

Cpp2uno_call() ->
raise_exception()
__cxa_throw() ->
( C++ throw handling) ->
getCaughtException() ->
UnoInterfaceProxyDispatch() ->
cpp_call() ->
CallVirtualMethod() ->
( Call requested 
function )


Hard to tell what you're actually looking at without seeing a real 
backtrace (e.g., I have no idea what "Cpp2uno_call()" is supposed to mean).


As there is "getCaughtException()" in your picture: 
cppu::getCaughtException (cppuhelper/exc_hlp.hxx) internally uses the 
bridge between C++ and binary UNO to translate the C++ exception being 
caught by the current catch block into a css::uno::Any.  You need that 
bridge in all its glory, beautiful assembler hackery and all, for that 
functionality to work.



Because on iOS, no external process will ever call the UNO interface, it is 1 
single executable (I also removed the pipes etc).


Just to be clear:  The bridge between C++ and binary UNO is used in more 
scenarios than just inter-process communication.  Other examples are 
bridging to code in other languages like Java, the thread-affine bridge 
used by some (Java) database code, or cppu::getCaughtException mentioned 
above.  While the former examples may not be relevant on iOS, the latter 
one certainly is.

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


Help in Libreoffice extension development

2018-03-06 Thread Pattabhi RK
Hi,

  We are trying to develop a libreoffice extension for spellchecker. And to
start with we have tried to develop HelloWorld extension as given in the
link.

  https://wiki.openoffice.org/wiki/JavaEclipseTuto

We are not able to load UNO types selector and we have got the following
error:


om.sun.star.registry.InvalidRegistryException:
com.sun.star.registry.SimpleRegistry.open(file:///opt/libreoffice5.4/program/types.rdb):
underlying Registry::open/create() = 6
at
com.sun.star.lib.uno.environments.remote.Job.remoteUnoRequestRaisedException(Job.java:158)
at com.sun.star.lib.uno.environments.remote.Job.execute(Job.java:122)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:312)
at
com.sun.star.lib.uno.environments.remote.JobQueue.enter(JobQueue.java:281)
at
com.sun.star.lib.uno.environments.remote.JavaThreadPool.enter(JavaThreadPool.java:81)
at
com.sun.star.lib.uno.bridges.java_remote.java_remote_bridge.sendRequest(java_remote_bridge.java:618)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.request(ProxyFactory.java:145)
at
com.sun.star.lib.uno.bridges.java_remote.ProxyFactory$Handler.invoke(ProxyFactory.java:129)
at com.sun.proxy.$Proxy30.open(Unknown Source)
at
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.getTypesFromRegistry(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.queryTypes(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.internal.office.TypesGetter.getTypes(Unknown
Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.libreoffice.ide.eclipse.core.office.TypesGetter.getTypes(Unknown
Source)
at
org.libreoffice.ide.eclipse.core.unotypebrowser.UnoTypeProvider$UnoTypesGetterThread.run(Unknown
Source)


When we have loaded the LibreOffice and SDK using "Window > Preference >
LibreOffice Path, we got message saying " Office bootstrapped"

So we are not able to understand where we are going wrong. I request you to
kindly help in resolving this problem.


We are using Eclipse Oxygen 2, Libreoffice 5.4.5 and sdk 5.4.5. And using
Ubuntu 14.04 LTS.

Thanks,
Pattabhi,

Research Scholar,
AU-KBC Research Centre,
Anna University, Chennai, India.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2018-03-06 Thread Michael Stahl
 sw/source/core/layout/sectfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1eda4a770a64c2ebf7092f841ecd8c82e62f7bf7
Author: Michael Stahl 
Date:   Tue Mar 6 10:03:53 2018 +0100

sw: convert that to assert too

Change-Id: I4f06fc4871cbb92b40d950b31a06b5e185aed321
Reviewed-on: https://gerrit.libreoffice.org/50806
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index e9cf9479dc91..786cca7ffbae 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1749,7 +1749,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType 
eMakePage )
 pNxt = static_cast(pTmp);
 else
 {
-OSL_ENSURE( pTmp->IsTabFrame(), "GetNextSctLeaf: Wrong 
Type" );
+assert(pTmp->IsTabFrame());
 pNxt = static_cast(pTmp);
 }
 while( !pNxtContent && nullptr != ( pTmp = pTmp->GetNext() 
) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Caolán McNamara
 emfio/source/reader/wmfreader.cxx   |   23 ++--
 vcl/qa/cppunit/graphicfilter/data/wmf/fail/exttextout-2.wmf |binary
 2 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 7cfb3d2873f0e281e20ccd5ff004746eb4bd4ce5
Author: Caolán McNamara 
Date:   Tue Mar 6 09:24:04 2018 +

ofz: timeout

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

diff --git a/emfio/source/reader/wmfreader.cxx 
b/emfio/source/reader/wmfreader.cxx
index e82d756f28b2..eafff0378716 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -1387,7 +1387,7 @@ namespace emfio
 
 if( mnEndPos - mnStartPos )
 {
-   bool bEMFAvailable = false;
+bool bEMFAvailable = false;
 while( true )
 {
 mnCurrentAction++;
@@ -1404,6 +1404,15 @@ namespace emfio
 
 break;
 }
+
+const sal_uInt32 nAvailableBytes = mnEndPos - nPos;
+const sal_uInt32 nMaxPossibleRecordSize = 
nAvailableBytes/2;
+if (mnRecSize > nMaxPossibleRecordSize)
+{
+mpInputStream->SetError(SVSTREAM_FILEFORMAT_ERROR);
+break;
+}
+
 if ( !bEMFAvailable )
 {
 if(   !maBmpSaveList.empty()
@@ -1448,16 +1457,8 @@ namespace emfio
 }
 }
 
-const sal_uInt32 nAvailableBytes = mnEndPos - nPos;
-const sal_uInt32 nMaxPossibleRecordSize = 
nAvailableBytes/2;
-
-if (mnRecSize <= nMaxPossibleRecordSize)
-{
-nPos += mnRecSize * 2;
-mpInputStream->Seek(nPos);
-}
-else
-mpInputStream->SetError( SVSTREAM_FILEFORMAT_ERROR );
+nPos += mnRecSize * 2;
+mpInputStream->Seek(nPos);
 }
 }
 else
diff --git a/vcl/qa/cppunit/graphicfilter/data/wmf/fail/exttextout-2.wmf 
b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/exttextout-2.wmf
new file mode 100644
index ..02c72ad88fa8
Binary files /dev/null and 
b/vcl/qa/cppunit/graphicfilter/data/wmf/fail/exttextout-2.wmf differ
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Katarina Behrens
 cui/source/inc/treeopt.hxx|   13 +++--
 cui/source/options/optjava.cxx|   22 +-
 cui/source/options/optjava.hxx|4 
 cui/source/options/treeopt.cxx|   20 +++-
 include/svtools/restartdialog.hxx |2 ++
 5 files changed, 49 insertions(+), 12 deletions(-)

New commits:
commit 683a68cb5106e99db0fbe892b5784d837cf8cb27
Author: Katarina Behrens 
Date:   Thu Mar 1 12:23:21 2018 +0100

After Java settings have changed, restart LibO for real

Previously restart LibO dialog was shown, but did nothing. I haven't
found an easy way to close all frames with 3 modal dialogs opened, so
now restart dialog simply pops up later (after user bonks OK button
on Tools > Options dialog)

Change-Id: I6e61fa1fc41199c2f16cb80da771202c255f3810
Reviewed-on: https://gerrit.libreoffice.org/50566
Tested-by: Jenkins 
Reviewed-by: Katarina Behrens 

diff --git a/cui/source/inc/treeopt.hxx b/cui/source/inc/treeopt.hxx
index e71302449678..032e432bfc05 100644
--- a/cui/source/inc/treeopt.hxx
+++ b/cui/source/inc/treeopt.hxx
@@ -24,6 +24,8 @@
 
 #include 
 
+#include 
+#include 
 #include 
 
 class SfxModule;
@@ -119,14 +121,16 @@ class SvxColorTabPage;
 class OfaTreeOptionsDialog final: public SfxModalDialog
 {
 private:
-SvTreeListEntry*pCurrentPageEntry;
-
 VclPtr   pOkPB;
 VclPtr pBackPB;
 
 VclPtr  pTreeLB;
 VclPtr pTabBox;
 
+VclPtrm_pParent;
+
+SvTreeListEntry*   pCurrentPageEntry;
+
 OUString   sTitle;
 OUString   sNotLoadedError;
 
@@ -136,6 +140,9 @@ private:
 // check "for the current document only" and set focus to "Western" 
languages box
 bool   bIsForSetDocumentLanguage;
 
+bool   bNeedsRestart;
+svtools::RestartReason eRestartReason;
+
 css::uno::Reference < css::awt::XContainerWindowProvider >
 m_xContainerWinProvider;
 
@@ -182,6 +189,8 @@ public:
 
 // helper functions to call the language settings TabPage from the 
SpellDialog
 static void ApplyLanguageOptions(const SfxItemSet& rSet);
+
+voidSetNeedsRestart( svtools::RestartReason eReason );
 };
 
 // class ExtensionsTabPage ---
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 50264e96e777..79e210f125a3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -26,6 +26,7 @@
 
 #include "optaboutconfig.hxx"
 #include "optjava.hxx"
+#include 
 #include 
 
 #include 
@@ -125,6 +126,7 @@ SvxJavaOptionsPage::SvxJavaOptionsPage( vcl::Window* 
pParent, const SfxItemSet&
 get(m_pExperimentalCB, "experimental");
 get(m_pMacroCB, "macrorecording");
 get(m_pExpertConfigBtn, "expertconfig");
+m_pParentDlg.reset( 
dynamic_cast(getNonLayoutParent(pParent)) );
 m_sAccessibilityText = get("a11y")->GetText();
 m_sAddDialogText = get("selectruntime")->GetText();
 
@@ -191,6 +193,7 @@ void SvxJavaOptionsPage::dispose()
 
 jfw_unlock();
 #endif
+m_pParentDlg.clear();
 m_pJavaEnableCB.clear();
 m_pJavaBox.clear();
 m_pJavaPathText.clear();
@@ -286,8 +289,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ParameterHdl_Impl, 
Button*, void)
 aParameterList = m_pParamDlg->GetParameters();
 if ( jfw_isVMRunning() )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS);
+RequestRestart( 
svtools::RESTART_REASON_ASSIGNING_JAVAPARAMETERS );
 }
 }
 }
@@ -326,8 +328,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, ClassPathHdl_Impl, 
Button*, void)
 sClassPath = m_pPathDlg->GetClassPath();
 if ( jfw_isVMRunning() )
 {
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_ASSIGNING_FOLDERS);
+RequestRestart( svtools::RESTART_REASON_ASSIGNING_FOLDERS );
 }
 }
 }
@@ -562,6 +563,12 @@ void SvxJavaOptionsPage::AddFolder( const OUString& 
_rFolder )
 #endif
 }
 
+void SvxJavaOptionsPage::RequestRestart( svtools::RestartReason eReason )
+{
+if ( m_pParentDlg )
+m_pParentDlg->SetNeedsRestart( eReason );
+}
+
 
 VclPtr SvxJavaOptionsPage::Create( vcl::Window* pParent, const 
SfxItemSet* rAttrSet )
 {
@@ -578,8 +585,7 @@ bool SvxJavaOptionsPage::FillItemSet( SfxItemSet* 
/*rCoreSet*/ )
 SvtMiscOptions aMiscOpt;
 aMiscOpt.SetExperimentalMode( m_pExperimentalCB->IsChecked() );
 bModified = true;
-SolarMutexGuard aGuard;
-
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), 
nullptr, svtools::RESTART_REASON_EXP_FE

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

2018-03-06 Thread Michael Stahl
 sw/source/core/layout/findfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit eef36faf5d8450f9ba5c905da8e87d31c2fa73d5
Author: Michael Stahl 
Date:   Tue Mar 6 10:00:28 2018 +0100

sw: convert checks about mbInfTab and cell parent to assert()

Change-Id: Ia9e517936d546f60f76ae99062ff57a09209dc8a
Reviewed-on: https://gerrit.libreoffice.org/50805
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/layout/findfrm.cxx 
b/sw/source/core/layout/findfrm.cxx
index 4f2453e09f93..60b37f363555 100644
--- a/sw/source/core/layout/findfrm.cxx
+++ b/sw/source/core/layout/findfrm.cxx
@@ -750,7 +750,7 @@ SwFrame *SwFrame::FindNext_()
 SwLayoutFrame *pUp = pThis->GetUpper();
 while (pUp && !pUp->IsCellFrame())
 pUp = pUp->GetUpper();
-SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell.");
+assert(pUp && "Content flag says it's in table but it's not in cell.");
 SwFrame* pNxt = pUp ? static_cast(pUp)->GetFollowCell() 
: nullptr;
 if ( pNxt )
 pNxt = static_cast(pNxt)->ContainsContent();
@@ -1108,7 +1108,7 @@ SwFrame *SwFrame::FindPrev_()
 SwLayoutFrame *pUp = pThis->GetUpper();
 while (pUp && !pUp->IsCellFrame())
 pUp = pUp->GetUpper();
-SAL_WARN_IF(!pUp, "sw.core", "Content in table but not in cell.");
+assert(pUp && "Content flag says it's in table but it's not in 
cell.");
 if (pUp && pUp->IsAnLower(pPrvCnt))
 return pPrvCnt;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Michael Stahl
 sw/source/core/layout/sectfrm.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 054be0850ed7574473452ed965001504caf0b5e2
Author: Michael Stahl 
Date:   Tue Mar 6 09:51:46 2018 +0100

forcepoint #18 sw: fix condition for detecting section-in-table splits

The problem with the bugdoc is that SwFrame::GetNextSctLeaf() creates a
follow frame for a section in a table, and puts it outside the table,
below the page's body frame, while moving text frames that have the
mbInfTab flag set into the follow frame.

Checking for CanContainSplitSection() at this point doesn't make sense
to me: if it's not allowed to split the section, we can't just split it
anyway and put the follow outside the table.

Just removing it fails in testTableInNestedSection() but it turns out
that the problem there is that the mbInfTab flag is set on a outermost
SwTabFrame itself, so we need to check the parent's flag instead to
check if this frame needs to go into a cell.

(regression from 652556ec3e9218655a67b4c4de4e26fbe81855de)

Change-Id: I79663391fb1b2cb10f008676feb01a2607cfb33d
Reviewed-on: https://gerrit.libreoffice.org/50804
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/layout/sectfrm.cxx 
b/sw/source/core/layout/sectfrm.cxx
index 319974f41713..e9cf9479dc91 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1602,9 +1602,9 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType 
eMakePage )
 SwLayoutFrame *pLayLeaf;
 
 SwLayoutFrame* pCellLeaf = nullptr;
-if (IsInTab() && CanContainSplitSection(this))
+if (GetUpper()->IsInTab())
 {
-// We are in a table (which is itself not in a section), see if there
+// We are *in* a table (not an outermost SwTabFrame), see if there
 // is a follow cell frame created already.
 pCellLeaf = GetNextCellLeaf();
 if (!pCellLeaf)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Noel Grandin
 svx/source/accessibility/AccessibleFrameSelector.cxx  |4 -
 svx/source/accessibility/AccessibleShape.cxx  |6 -
 svx/source/accessibility/GraphCtlAccessibleContext.cxx|2 
 svx/source/accessibility/charmapacc.cxx   |   16 ++--
 svx/source/accessibility/svxpixelctlaccessiblecontext.cxx |8 +-
 svx/source/accessibility/svxrectctaccessiblecontext.cxx   |8 +-
 svx/source/dialog/fntctrl.cxx |6 -
 svx/source/dialog/svxruler.cxx|2 
 svx/source/fmcomp/fmgridif.cxx|6 -
 svx/source/form/fmcontrolbordermanager.cxx|6 -
 svx/source/form/fmshimp.cxx   |2 
 svx/source/form/formcontroller.cxx|2 
 svx/source/inc/fmcontrolbordermanager.hxx |   19 ++---
 svx/source/sdr/overlay/overlaymanagerbuffered.cxx |2 
 svx/source/svdraw/svdotextdecomposition.cxx   |4 -
 svx/source/svdraw/svdpagv.cxx |2 
 svx/source/svdraw/svdpntv.cxx |2 
 svx/source/tbxctrls/PaletteManager.cxx|4 -
 svx/source/tbxctrls/tbcontrl.cxx  |   15 +---
 svx/source/tbxctrls/tbxcolorupdate.cxx|2 
 svx/source/unodraw/XPropertyTable.cxx |   14 ++--
 svx/source/unodraw/unobrushitemhelper.cxx |2 
 svx/source/unodraw/unoctabl.cxx   |4 -
 svx/source/xoutdev/xattr.cxx  |   48 +++---
 svx/source/xoutdev/xtabcolr.cxx   |4 -
 25 files changed, 93 insertions(+), 97 deletions(-)

New commits:
commit 4a0ca3a2ec5290419617b6dace216e981b03254e
Author: Noel Grandin 
Date:   Tue Mar 6 11:11:12 2018 +0200

use more Color in svx

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

diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx 
b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 470f9275874e..4f31f7665b7c 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -353,14 +353,14 @@ sal_Int32 AccFrameSelector::getForeground(  )
 {
 SolarMutexGuard aGuard;
 IsValid();
-return mpFrameSel->GetControlForeground().GetColor();
+return sal_Int32(mpFrameSel->GetControlForeground());
 }
 
 sal_Int32 AccFrameSelector::getBackground(  )
 {
 SolarMutexGuard aGuard;
 IsValid();
-return mpFrameSel->GetControlBackground().GetColor();
+return sal_Int32(mpFrameSel->GetControlBackground());
 }
 
 void AccFrameSelector::addAccessibleEventListener( const Reference< 
XAccessibleEventListener >& xListener )
diff --git a/svx/source/accessibility/AccessibleShape.cxx 
b/svx/source/accessibility/AccessibleShape.cxx
index cd3a84889f86..c7ca57d87d8e 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -685,7 +685,7 @@ sal_Int32 SAL_CALL AccessibleShape::getForeground()
 sal_Int32 SAL_CALL AccessibleShape::getBackground()
 {
 ThrowIfDisposed ();
-sal_Int32 nColor (0);
+Color nColor;
 
 try
 {
@@ -708,14 +708,14 @@ sal_Int32 SAL_CALL AccessibleShape::getBackground()
 nTrans = short(256 - nTrans / 100. * 256);
 crBk.SetTransparency(sal_uInt8(nTrans));
 }
-nColor = crBk.GetColor();
+nColor = crBk;
 }
 }
 catch (const css::beans::UnknownPropertyException &)
 {
 // Ignore exception and return default color.
 }
-return nColor;
+return sal_Int32(nColor);
 }
 
 // XAccessibleEventBroadcaster
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx 
b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 57585a5715f3..5b886c8a7d4d 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -439,7 +439,7 @@ sal_Int32 SAL_CALL 
SvxGraphCtrlAccessibleContext::getForeground()
 
 sal_Int32 SAL_CALL SvxGraphCtrlAccessibleContext::getBackground()
 {
-sal_uInt32 nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor().GetColor();
+Color nColor = 
Application::GetSettings().GetStyleSettings().GetWindowColor();
 return static_cast(nColor);
 }
 
diff --git a/svx/source/accessibility/charmapacc.cxx 
b/svx/source/accessibility/charmapacc.cxx
index 02b67240f626..1f19eafc2fff 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -760,11 +760,11 @@ sal_Int32 SAL_CALL 
SvxShowCharSetVirtualAcc::getForeground(  )
 {
 OExternalLockGuard aGuard( this );
 
-sal_Int32 nColor = 0;
+Color nColor;
 if ( m

[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - connectivity/source offapi/com sc/source

2018-03-06 Thread Stephan Bergmann
 connectivity/source/drivers/file/FConnection.cxx  |   24 ++--
 offapi/com/sun/star/sdbc/FILEConnectionProperties.idl |4 ++
 sc/source/ui/docshell/docsh8.cxx  |   27 +++---
 3 files changed, 25 insertions(+), 30 deletions(-)

New commits:
commit db7dae40a2082d5d2b1ac22008d32ef9ebf86f4e
Author: Stephan Bergmann 
Date:   Mon Mar 5 13:56:59 2018 +0100

tdf#116171: Tunnel arbitrary rtl_TextEncoding from sc to sdbc:dbase 
connection

...including those that have no corresponding textual IANA character set 
name
representation, like RTL_TEXTENCODING_MS_950 which is apparently used in 
some
DBase files.

In the past, if eCharSet was RTL_TEXTENCODING_DONTKNOW in 
lcl_getDBaseConnection
it was sent as an empty string CharSet property, which the receiving
OConnection::construct translated back to

  else
  m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;

so the net effect remains the same for that special case.

Change-Id: I84eec8a93d000752b3c429976c58721ea9ea32a4
Reviewed-on: https://gerrit.libreoffice.org/50772
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins 
(cherry picked from commit 5ad62544bce42396faaae2bc79c7517af6ff085b)
Reviewed-on: https://gerrit.libreoffice.org/50780
Reviewed-by: Eike Rathke 

diff --git a/connectivity/source/drivers/file/FConnection.cxx 
b/connectivity/source/drivers/file/FConnection.cxx
index 378bd2d9cd0a..d9d2378c0f7f 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -105,15 +106,22 @@ void OConnection::construct(const OUString& url,const 
Sequence< PropertyValue >&
 OSL_VERIFY( pIter->Value >>= aExt );
 else if( pIter->Name == "CharSet" )
 {
-OUString sIanaName;
-OSL_VERIFY( pIter->Value >>= sIanaName );
-
-::dbtools::OCharsetMap aLookupIanaName;
-::dbtools::OCharsetMap::const_iterator aLookup = 
aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA());
-if (aLookup != aLookupIanaName.end())
-m_nTextEncoding = (*aLookup).getEncoding();
+if (auto const numeric = o3tl::tryAccess(pIter->Value))
+{
+m_nTextEncoding = *numeric;
+}
 else
-m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+{
+OUString sIanaName;
+OSL_VERIFY( pIter->Value >>= sIanaName );
+
+::dbtools::OCharsetMap aLookupIanaName;
+::dbtools::OCharsetMap::const_iterator aLookup = 
aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA());
+if (aLookup != aLookupIanaName.end())
+m_nTextEncoding = (*aLookup).getEncoding();
+else
+m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+}
 }
 else if( pIter->Name == "ShowDeleted" )
 {
diff --git a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl 
b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
index 1e1f36efc8e1..43c6d4c74740 100644
--- a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
+++ b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
@@ -45,6 +45,10 @@ service FILEConnectionProperties
 
 See the http://www.iana.org/assignments/character-sets";>IANA character set 
list
 for a list of valid values.
+
+For internal purposes (e.g., when using an encoding for which no 
IANA character set name
+exists), this may also be an UNSIGNED SHORT value representing one of 
the rtl_TextEncoding
+values in rtl/textenc.h.
 */
 [optional, property] string CharSet;
 };
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index 198cc709debe..6fcce1eafc4d 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -30,10 +30,6 @@
 #include 
 #include 
 
-#if HAVE_FEATURE_DBCONNECTIVITY
-#include 
-#endif
-
 #include 
 #include 
 #include 
@@ -124,26 +120,13 @@ namespace
 OUString aConnUrl("sdbc:dbase:");
 aConnUrl += aPath;
 
-::std::vector< rtl_TextEncoding > aEncodings;
-svxform::charset_helper::getSupportedTextEncodings( aEncodings );
-::std::vector< rtl_TextEncoding >::iterator aIter = 
::std::find(aEncodings.begin(),aEncodings.end(), eCharSet);
-if ( aIter == aEncodings.end() )
-{
-OSL_FAIL( "DBaseImport: dbtools::OCharsetMap doesn't know text 
encoding" );
-return SCERR_IMPORT_CONNECT;
-} // if ( aIter == aMap.end() )
-OUString aCharSetStr;
-if ( RTL_TEXTENCODING_DONTKNOW != *aIter )
-{   // it's not the virtual "system charset"
-const char* pIanaName = rtl_getMimeCharsetFromText

[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - connectivity/source offapi/com sc/source

2018-03-06 Thread Stephan Bergmann
 connectivity/source/drivers/file/FConnection.cxx  |   24 ++--
 offapi/com/sun/star/sdbc/FILEConnectionProperties.idl |4 ++
 sc/source/ui/docshell/docsh8.cxx  |   27 +++---
 3 files changed, 25 insertions(+), 30 deletions(-)

New commits:
commit 8d96cdf9ac8dedd54620d31bafbccc76d75d7757
Author: Stephan Bergmann 
Date:   Mon Mar 5 13:56:59 2018 +0100

tdf#116171: Tunnel arbitrary rtl_TextEncoding from sc to sdbc:dbase 
connection

...including those that have no corresponding textual IANA character set 
name
representation, like RTL_TEXTENCODING_MS_950 which is apparently used in 
some
DBase files.

In the past, if eCharSet was RTL_TEXTENCODING_DONTKNOW in 
lcl_getDBaseConnection
it was sent as an empty string CharSet property, which the receiving
OConnection::construct translated back to

  else
  m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;

so the net effect remains the same for that special case.

Reviewed-on: https://gerrit.libreoffice.org/50772
Reviewed-by: Lionel Elie Mamane 
Tested-by: Jenkins 
(cherry picked from commit 5ad62544bce42396faaae2bc79c7517af6ff085b)
Conflicts:
sc/source/ui/docshell/docsh8.cxx

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

diff --git a/connectivity/source/drivers/file/FConnection.cxx 
b/connectivity/source/drivers/file/FConnection.cxx
index 27d2b2d9ee03..64017737140f 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -38,6 +38,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include "resource/file_res.hrc"
@@ -106,15 +107,22 @@ void OConnection::construct(const OUString& url,const 
Sequence< PropertyValue >&
 OSL_VERIFY( pIter->Value >>= aExt );
 else if( pIter->Name == "CharSet" )
 {
-OUString sIanaName;
-OSL_VERIFY( pIter->Value >>= sIanaName );
-
-::dbtools::OCharsetMap aLookupIanaName;
-::dbtools::OCharsetMap::const_iterator aLookup = 
aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA());
-if (aLookup != aLookupIanaName.end())
-m_nTextEncoding = (*aLookup).getEncoding();
+if (auto const numeric = o3tl::tryAccess(pIter->Value))
+{
+m_nTextEncoding = *numeric;
+}
 else
-m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+{
+OUString sIanaName;
+OSL_VERIFY( pIter->Value >>= sIanaName );
+
+::dbtools::OCharsetMap aLookupIanaName;
+::dbtools::OCharsetMap::const_iterator aLookup = 
aLookupIanaName.find(sIanaName, ::dbtools::OCharsetMap::IANA());
+if (aLookup != aLookupIanaName.end())
+m_nTextEncoding = (*aLookup).getEncoding();
+else
+m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;
+}
 }
 else if( pIter->Name == "ShowDeleted" )
 {
diff --git a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl 
b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
index 1e1f36efc8e1..43c6d4c74740 100644
--- a/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
+++ b/offapi/com/sun/star/sdbc/FILEConnectionProperties.idl
@@ -45,6 +45,10 @@ service FILEConnectionProperties
 
 See the http://www.iana.org/assignments/character-sets";>IANA character set 
list
 for a list of valid values.
+
+For internal purposes (e.g., when using an encoding for which no 
IANA character set name
+exists), this may also be an UNSIGNED SHORT value representing one of 
the rtl_TextEncoding
+values in rtl/textenc.h.
 */
 [optional, property] string CharSet;
 };
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index a021745855d9..73f8bfffe2ac 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -29,10 +29,6 @@
 #include 
 #include 
 
-#if HAVE_FEATURE_DBCONNECTIVITY
-#include 
-#endif
-
 #include 
 #include 
 #include 
@@ -123,28 +119,15 @@ namespace
 OUString aConnUrl("sdbc:dbase:");
 aConnUrl += aPath;
 
-::std::vector< rtl_TextEncoding > aEncodings;
-svxform::charset_helper::getSupportedTextEncodings( aEncodings );
-::std::vector< rtl_TextEncoding >::iterator aIter = 
::std::find(aEncodings.begin(),aEncodings.end(), eCharSet);
-if ( aIter == aEncodings.end() )
-{
-OSL_FAIL( "DBaseImport: dbtools::OCharsetMap doesn't know text 
encoding" );
-return SCERR_IMPORT_CONNECT;
-} // if ( aIter == aMap.end() )
-OUString aCharSetStr;
-if ( RTL_TEXTENCODING_DONTKNOW != *aIter )
-

[Libreoffice-commits] dev-tools.git: 3 commits - esc-reporting/common.py esc-reporting/esc-analyze.py esc-reporting/esc-automate.py esc-reporting/esc-collect.py esc-reporting/esc-report.py

2018-03-06 Thread Xisco Fauli
 esc-reporting/common.py   |   10 +-
 esc-reporting/esc-analyze.py  |   32 ++--
 esc-reporting/esc-automate.py |9 +
 esc-reporting/esc-collect.py  |   12 ++--
 esc-reporting/esc-report.py   |   40 ++--
 5 files changed, 56 insertions(+), 47 deletions(-)

New commits:
commit b8a5ac0da7f4724ad41470f81dcffa4a201261c0
Author: Xisco Fauli 
Date:   Tue Mar 6 12:16:35 2018 +0100

ESC: Replace another os.system

diff --git a/esc-reporting/common.py b/esc-reporting/common.py
index 3116122..327db68 100644
--- a/esc-reporting/common.py
+++ b/esc-reporting/common.py
@@ -26,10 +26,10 @@ def sendMail(cfg, mail, subject, content, attachFile=None):
 msg.attach(MIMEText(content))
 
 if attachFile:
-fp = open(attachFile, 'rb')
-attach = MIMEApplication(fp.read(), 'pdf')
+fp = open(attachFile['path'], 'rb')
+attach = MIMEApplication(fp.read(), attachFile['extension'])
 fp.close()
-attach.add_header('Content-Disposition', "attachment'; 
filename=award.pdf")
+attach.add_header('Content-Disposition','attachment; 
filename="{}"'.format(attachFile['name']))
 msg.attach(attach)
 
 p = Popen(["/usr/sbin/sendmail", "-t", "-oi"], stdin=PIPE)
diff --git a/esc-reporting/esc-automate.py b/esc-reporting/esc-automate.py
index dff1b4f..3a8c5ee 100755
--- a/esc-reporting/esc-automate.py
+++ b/esc-reporting/esc-automate.py
@@ -84,7 +84,7 @@ def doGerrit(id, command):
   raise Exception('error: ' + cmd + ' failed')
 
 
-def doMail(mail, subject, content, attachFile=None):
+def doMail(cfg, mail, subject, content, attachFile=None):
 error = common.sendMail(cfg, mail, subject, content, attachFile)
 if error:
 raise Exception('mail failed')
@@ -163,13 +163,14 @@ def handle_mail_pdf(email, name):
 
 filePdf = '/tmp/award.pdf'
 pdfGen = 'pdftk ' + cfg['homedir'] + 'AcknowledgmentForm.pdf fill_form ' + 
fileFdf + ' output ' + filePdf
+attachFile= {'path': filePdf, 'name': 'award.pdf', 'extension': 'pdf'}
 r = os.system(pdfGen)
 if r != 0:
   raise Exception('pdf generation failed ')
 
 text = cfg['automate']['1st award']['content'].format(name)
 
-doMail(email, cfg['automate']['1st award']['subject'], text, 
attachFile=filePdf)
+doMail(cfg, email, cfg['automate']['1st award']['subject'], text, 
attachFile)
 
 
 
@@ -177,7 +178,7 @@ def handle_mail_miss_you(email, name):
 global cfg
 
 text = cfg['automate']['we miss you']['content'].format(name)
-doMail(email, cfg['automate']['we miss you']['subject'], text)
+doMail(cfg, email, cfg['automate']['we miss you']['subject'], text)
 
 
 
diff --git a/esc-reporting/esc-report.py b/esc-reporting/esc-report.py
index dc0d7cf..33f548a 100755
--- a/esc-reporting/esc-report.py
+++ b/esc-reporting/esc-report.py
@@ -446,11 +446,12 @@ def report_bug_metrics():
   # only generate un tuesdays
   return
 
-filename = cfg['homedir'] + 'bug-metrics/bug-metrics.ods'
+fileName = 'bug-metrics/bug-metrics.ods'
+filePath = cfg['homedir'] + fileName
 fileContent = '/tmp/bugs/content.xml'
 
 os.system('rm -rf /tmp/bugs')
-os.system('unzip -d /tmp/bugs ' + filename)
+os.system('unzip -d /tmp/bugs ' + filePath)
 fp = open(fileContent, encoding='utf-8')
 text = fp.read()
 fp.close()
@@ -485,7 +486,7 @@ def report_bug_metrics():
 fp = open(fileContent, 'w', encoding='utf-8')
 print(text, file=fp)
 fp.close()
-os.system('cd /tmp/bugs; zip ' + filename + ' *')
+os.system('cd /tmp/bugs; zip ' + filePath + ' *')
 os.system('cd ' + cfg['homedir'] + 'bug-metrics; git add *; git commit -m 
\'new version ' + statList['addDate'] + '\'')
 
 fileBody='/tmp/esc_odf.txt'
@@ -494,7 +495,8 @@ def report_bug_metrics():
 fp.close()
 
 data = 'ESC bug_metric.fods, based on stats.json from '+statList['addDate']
-return {'title': data, 'mail': 'mentor...@documentfoundation.org', 
'attach': filename, 'file' : fileBody}
+return {'title': data, 'mail': 'mentor...@documentfoundation.org',
+'attach': {'name': fileName, 'path': filePath, 'extension': 
'ods'}, 'file' : fileBody}
 
 
 
@@ -823,12 +825,14 @@ def runReport():
   pass
 
 for i in xMail:
-  if 'attach' in i:
-attach = '-a ' + i['attach'] + ' '
-  else:
-attach = ''
-  r = os.system("mail -r mentor...@documentfoundation.org " + 
cfg['mail']['bcc'] + " -s '" + i['title'] + "' " + attach + i['mail'] + " <  " 
+ i['file'])
-  if r != 0:
+  with open(i['file'], 'r') as content_file:
+text = content_file.read()
+
+  if 'attach' not in i:
+i['attach'] = None
+
+  error = common.sendMail(cfg, i['mail'], i['title'], text, i['attach'])
+  if error:
 common.util_errorMail(cfg, 'esc-report', 'ERROR: mailing failed with ' 
+ str(e))
 
 
commit e94577eadf1fc36fc37ae65a6c45a953a2b9dce3

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

2018-03-06 Thread Noel Grandin
 vbahelper/source/msforms/vbacontrol.cxx   |2 +-
 vbahelper/source/vbahelper/vbacolorformat.cxx |2 +-
 vbahelper/source/vbahelper/vbahelper.cxx  |1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b8b7f8a8f8d97088181d287bb75e74facece16c6
Author: Noel Grandin 
Date:   Tue Mar 6 10:46:22 2018 +0200

use more Color in vbahelper

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

diff --git a/vbahelper/source/msforms/vbacontrol.cxx 
b/vbahelper/source/msforms/vbacontrol.cxx
index 0db919760dc6..8ea64d041ee5 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -424,7 +424,7 @@ void SAL_CALL ScVbaControl::setTag( const OUString& aTag )
 
 ::sal_Int32 SAL_CALL ScVbaControl::getForeColor()
 {
-sal_Int32 nForeColor = -1;
+Color nForeColor;
 m_xProps->getPropertyValue( "TextColor" ) >>= nForeColor;
 return OORGBToXLRGB( nForeColor );
 }
diff --git a/vbahelper/source/vbahelper/vbacolorformat.cxx 
b/vbahelper/source/vbahelper/vbacolorformat.cxx
index 39ec1c090d93..a052f90c1385 100644
--- a/vbahelper/source/vbahelper/vbacolorformat.cxx
+++ b/vbahelper/source/vbahelper/vbacolorformat.cxx
@@ -77,7 +77,7 @@ ScVbaColorFormat::getRGB()
 default:
 throw uno::RuntimeException( "Second parameter of ColorFormat is 
wrong." );
 }
-nRGB = OORGBToXLRGB( nRGB );
+nRGB = OORGBToXLRGB( Color(nRGB) );
 return nRGB;
 }
 
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx 
b/vbahelper/source/vbahelper/vbahelper.cxx
index b7432c59935c..77174c82fb93 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx
@@ -304,6 +304,7 @@ OORGBToXLRGB( sal_Int32 nCol )
 sal_Int32 nRGB =  ( nAutoBits | (nBlue << 16) | (nGreen << 8) | nRed );
 return nRGB;
 }
+
 sal_Int32
 XLRGBToOORGB( sal_Int32 nCol )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Noel Grandin
 toolkit/source/awt/stylesettings.cxx |   10 ++--
 toolkit/source/awt/vclxaccessiblecomponent.cxx   |   20 -
 toolkit/source/awt/vclxgraphics.cxx  |   10 ++--
 toolkit/source/awt/vclxwindow.cxx|   41 +--
 toolkit/source/awt/vclxwindows.cxx   |   22 +-
 toolkit/source/controls/accessiblecontrolcontext.cxx |   16 +++
 6 files changed, 59 insertions(+), 60 deletions(-)

New commits:
commit a0a57a35673ddee39b7b0a78a39cfec0eb50e91c
Author: Noel Grandin 
Date:   Tue Mar 6 10:47:05 2018 +0200

use more Color in toolkit

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

diff --git a/toolkit/source/awt/stylesettings.cxx 
b/toolkit/source/awt/stylesettings.cxx
index 419216e66e23..556fa8040371 100644
--- a/toolkit/source/awt/stylesettings.cxx
+++ b/toolkit/source/awt/stylesettings.cxx
@@ -132,15 +132,15 @@ namespace toolkit
 const VclPtr& pWindow = 
i_rData.pOwningWindow->GetWindow();
 const AllSettings aAllSettings = pWindow->GetSettings();
 const StyleSettings& aStyleSettings = 
aAllSettings.GetStyleSettings();
-return (aStyleSettings.*i_pGetter)().GetColor();
+return sal_Int32((aStyleSettings.*i_pGetter)());
 }
 
-void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void 
(StyleSettings::*i_pSetter)( Color const & ), const sal_Int32 i_nColor )
+void lcl_setStyleColor( WindowStyleSettings_Data const & i_rData, void 
(StyleSettings::*i_pSetter)( Color const & ), sal_Int32 i_nColor )
 {
 VclPtr pWindow = i_rData.pOwningWindow->GetWindow();
 AllSettings aAllSettings = pWindow->GetSettings();
 StyleSettings aStyleSettings = aAllSettings.GetStyleSettings();
-(aStyleSettings.*i_pSetter)( Color( i_nColor ) );
+(aStyleSettings.*i_pSetter)( Color(i_nColor) );
 aAllSettings.SetStyleSettings( aStyleSettings );
 pWindow->SetSettings( aAllSettings );
 }
@@ -383,7 +383,7 @@ namespace toolkit
 const VclPtr& pWindow = 
m_pData->pOwningWindow->GetWindow();
 const AllSettings aAllSettings = pWindow->GetSettings();
 const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
-return aStyleSettings.GetFaceGradientColor().GetColor();
+return sal_Int32(aStyleSettings.GetFaceGradientColor());
 }
 
 
@@ -673,7 +673,7 @@ namespace toolkit
 const VclPtr& pWindow = 
m_pData->pOwningWindow->GetWindow();
 const AllSettings aAllSettings = pWindow->GetSettings();
 const StyleSettings& aStyleSettings = aAllSettings.GetStyleSettings();
-return aStyleSettings.GetSeparatorColor().GetColor();
+return sal_Int32(aStyleSettings.GetSeparatorColor());
 }
 
 
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx 
b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index a94714d51096..015fafabd425 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -720,12 +720,12 @@ sal_Int32 SAL_CALL 
VCLXAccessibleComponent::getForeground(  )
 {
 OExternalLockGuard aGuard( this );
 
-sal_Int32 nColor = 0;
+Color nColor;
 VclPtr pWindow = GetWindow();
 if ( pWindow )
 {
 if ( pWindow->IsControlForeground() )
-nColor = pWindow->GetControlForeground().GetColor();
+nColor = pWindow->GetControlForeground();
 else
 {
 vcl::Font aFont;
@@ -733,31 +733,31 @@ sal_Int32 SAL_CALL 
VCLXAccessibleComponent::getForeground(  )
 aFont = pWindow->GetControlFont();
 else
 aFont = pWindow->GetFont();
-nColor = aFont.GetColor().GetColor();
+nColor = aFont.GetColor();
 // COL_AUTO is not very meaningful for AT
-if ( nColor == sal_Int32(COL_AUTO))
-nColor = pWindow->GetTextColor().GetColor();
+if ( nColor == COL_AUTO)
+nColor = pWindow->GetTextColor();
 }
 }
 
-return nColor;
+return sal_Int32(nColor);
 }
 
 sal_Int32 SAL_CALL VCLXAccessibleComponent::getBackground(  )
 {
 OExternalLockGuard aGuard( this );
 
-sal_Int32 nColor = 0;
+Color nColor;
 VclPtr pWindow = GetWindow();
 if ( pWindow )
 {
 if ( pWindow->IsControlBackground() )
-nColor = pWindow->GetControlBackground().GetColor();
+nColor = pWindow->GetControlBackground();
 else
-nColor = pWindow->GetBackground().GetColor().GetColor();
+nColor = pWindow->GetBackground().GetColor();
 }
 
-return nColor;
+return sal_Int32(nColor);
 }
 
 // XAccessibleExtendedComponent
diff --git a/toolkit/source/awt/vclxgraphics.cxx 
b/t

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

2018-03-06 Thread Noel Grandin
 xmloff/source/chart/ColorPropertySet.hxx   |5 +++--
 xmloff/source/draw/XMLGraphicsDefaultStyle.cxx |6 +++---
 xmloff/source/style/TransGradientStyle.cxx |8 
 xmloff/source/style/shadwhdl.cxx   |7 ++-
 xmloff/source/style/xmlnumfi.cxx   |2 +-
 xmloff/source/style/xmlnumi.cxx|9 +
 6 files changed, 18 insertions(+), 19 deletions(-)

New commits:
commit f02b1ba18deeab9744c5fe25162f5853d69b438e
Author: Noel Grandin 
Date:   Tue Mar 6 10:34:00 2018 +0200

use more Color in xmloff

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

diff --git a/xmloff/source/chart/ColorPropertySet.hxx 
b/xmloff/source/chart/ColorPropertySet.hxx
index 785f7f9482e6..772aa002ef46 100644
--- a/xmloff/source/chart/ColorPropertySet.hxx
+++ b/xmloff/source/chart/ColorPropertySet.hxx
@@ -20,6 +20,7 @@
 #define XMLOFF_COLORPROPERTYSET_HXX
 
 #include 
+#include 
 
 #include 
 #include 
@@ -71,8 +72,8 @@ protected:
 private:
 css::uno::Reference< css::beans::XPropertySetInfo > m_xInfo;
 OUString  m_aColorPropName;
-sal_Int32m_nColor;
-sal_Int32m_nDefaultColor;
+Color m_nColor;
+Color m_nDefaultColor;
 };
 
 } //  namespace chart
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx 
b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index 51c83ba96505..7c35e6258580 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -152,11 +152,11 @@ void XMLGraphicsDefaultStyle::SetDefaults()
 if (std::none_of(GetProperties().begin(), GetProperties().end(),
  XMLPropertyByIndex(nStrokeIndex)))
 {
-sal_Int32 const nStroke(
+Color const nStroke(
 bIsAOO4 ? Color(128, 128, 128) : COL_BLACK);
 xDefaults->setPropertyValue("LineColor", makeAny(nStroke));
 }
-sal_Int32 const nFillColor( bIsAOO4
+Color const nFillColor( bIsAOO4
 ? Color(0xCF, 0xE7, 0xF5) : Color(153, 204, 255));
 sal_Int32 const nFillIndex(
 pImpPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, "fill-color", 0));
@@ -172,7 +172,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
 if (std::none_of(GetProperties().begin(), GetProperties().end(),
  XMLPropertyByIndex(nFill2Index)))
 {
-xDefaults->setPropertyValue("FillColor2", makeAny(nFillColor));
+xDefaults->setPropertyValue("FillColor2", 
makeAny(sal_Int32(nFillColor)));
 }
 }
 }
diff --git a/xmloff/source/style/TransGradientStyle.cxx 
b/xmloff/source/style/TransGradientStyle.cxx
index c5e424fb5ed7..622e2af57366 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -151,7 +151,7 @@ void XMLTransGradientStyleImport::importXML(
 ( (100 - aStartTransparency) * 255 ) / 100 );
 
 Color aColor( n, n, n );
-aGradient.StartColor = static_cast( 
aColor.GetColor() );
+aGradient.StartColor = static_cast( aColor );
 }
 break;
 case XML_TOK_GRADIENT_END:
@@ -163,7 +163,7 @@ void XMLTransGradientStyleImport::importXML(
 ( (100 - aEndTransparency) * 255 ) / 100 );
 
 Color aColor( n, n, n );
-aGradient.EndColor = static_cast( aColor.GetColor() 
);
+aGradient.EndColor = static_cast( aColor );
 }
 break;
 case XML_TOK_GRADIENT_ANGLE:
@@ -248,14 +248,14 @@ void XMLTransGradientStyleExport::exportXML(
 Color aColor;
 
 // Transparency start
-aColor = aGradient.StartColor;
+aColor = Color(aGradient.StartColor);
 sal_Int32 aStartValue = 100 - 
static_cast(((aColor.GetRed() + 1) * 100) / 255);
 ::sax::Converter::convertPercent( aOut, aStartValue );
 aStrValue = aOut.makeStringAndClear();
 rExport.AddAttribute( XML_NAMESPACE_DRAW, XML_START, aStrValue 
);
 
 // Transparency end
-aColor = aGradient.EndColor;
+aColor = Color(aGradient.EndColor);
 sal_Int32 aEndValue = 100 - 
static_cast(((aColor.GetRed() + 1) * 100) / 255);
 ::sax::Converter::convertPercent( aOut, aEndValue );
 aStrValue = aOut.makeStringAndClear();
diff --git a/xmloff/source/style/shadwhdl.cxx b/xmloff/source/style/shadwhdl.cxx
index bccfab9e017d..b3c2739aa1db 100644
--- a/xmloff/source/style/shadwhdl.cxx
+++ b/xmloff/source/style/shadwhdl.cxx
@@ -63,12 +63,9 @@ bool XMLShadowPropHdl::importXML( const OUString& 
rStrImpValue, uno::Any& rValue
 }
 

Cppuno in bridges, HELP needed.

2018-03-06 Thread Jan Iversen
Hi.

I am still trying to get my head around understanding bridges, and how I can 
make it work for arm64/iOS.

At some point a piece of code (in the same executable) decides to make a uno 
call, this looks like

Cpp2uno_call() ->
raise_exception()
__cxa_throw() ->
( C++ throw handling) ->
getCaughtException() ->
UnoInterfaceProxyDispatch() ->
cpp_call() ->
CallVirtualMethod() ->
( Call requested 
function )

Now it all looks synchronous to me, and I right in assuming this all happens 
without any dispatch.

If my assumption is correct, I should be able to shortcut the whole lot and 
make a simple:
Cpp2uno_call() ->
( Call requested function )

Because on iOS, no external process will ever call the UNO interface, it is 1 
single executable (I also removed the pipes etc).

Can someone please tell me, if/where I am thinking totally wrong. My objective 
is to get rid of all the ugly assembler code.

Thanks in advance.
rgds
Jan I.


Ps. I had never expected the need to “expert” on the lower layers of LO, but 
after having been fighting SAL_TIMER, then threads and now cppuno, I think I am 
slowly understanding how the very low level of LO works. This might be a good 
thing when/if we do another port (or just want to optimise).


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


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

2018-03-06 Thread Stephan Bergmann
 test/source/screenshot_test.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit d15ff312ad80e4d1f210636e3374a81c14c229a2
Author: Stephan Bergmann 
Date:   Tue Mar 6 11:22:08 2018 +0100

Normalize computation of directory and file-in-directory URLs

There are occasional failures of Jenkins "Daily Screenshot Build on Windows"
like 

and 
,
always failing with

> 
C:/cygwin/home/tdf/lode/jenkins/workspace/lo_tb_master_win_screenshot/test/source/screenshot_test.cxx(84)
 : error : Assertion
> Test name: ReportdesignDialogsTest::openAnyDialog
> assertion failed
> - Expression: aNew.IsOpen()
> - Failed to open 
:
 796

(where 796 is ERRCODE_IO_NOTEXISTSPATH).  Beats me how that can happen, when
ScreenshotTest::implSaveScreenshot first creates the dir and then the 
file-in-
dir (and it is rather unlikely that something else deletes the dir in the
meantime, for various builds of that Jenkins bot, always for the same dir
workdir/screenshots/modules/dbreport/ui/condformatdialog/), and why it 
always
happens for exactly the same file,
workdir/screenshots/modules/dbreport/ui/condformatdialog/CondFormat.png 
during
CppunitTest_reportdesign_dialogs_test.

However, one curiosity was that the dir's URL was computed with

  m_directories.getURLFromWorkdir(aDirname);

(without a leading slash inserted before aDirname) while the file's 
pathname was
computed with

  m_directories.getPathFromWorkdir("/" + aDirname + ...)

(with a leading slash inserted before aDirname).  Turns out that 
SvFileStream
accepts a URL as well as a pathname, so normalize the computation of the 
dir's
and the file's URL.  Maybe that will give a clue why that Jenkins bot 
sometimes
fails.

Change-Id: I53b59b51ffc4355c45aa0ca72f6e187cf2010f92

diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx
index 2e7575b0f48d..558e4f160890 100644
--- a/test/source/screenshot_test.cxx
+++ b/test/source/screenshot_test.cxx
@@ -70,18 +70,18 @@ void ScreenshotTest::implSaveScreenshot(const Bitmap& 
rScreenshot, const OString
 aDirname = m_aScreenshotDirectory + "/" + aDirname +
( (maCurrentLanguage == "en-US") ? OUString() : "/" + 
maCurrentLanguage );
 
-auto const path = m_directories.getURLFromWorkdir(aDirname);
-auto const e = osl::Directory::createPath(path);
+auto const dirUrl = m_directories.getURLFromWorkdir(aDirname);
+auto const e = osl::Directory::createPath(dirUrl);
 if (e != osl::FileBase::E_EXIST) {
 CPPUNIT_ASSERT_EQUAL_MESSAGE(
 OUStringToOString(
-"Failed to create " + path, RTL_TEXTENCODING_UTF8).getStr(),
+"Failed to create " + dirUrl, RTL_TEXTENCODING_UTF8).getStr(),
 osl::FileBase::E_None, e);
 }
 
-OUString aFullPath = m_directories.getPathFromWorkdir("/" + aDirname + "/" 
+ aBasename + ".png");
-SvFileStream aNew(aFullPath, StreamMode::WRITE | StreamMode::TRUNC);
-CPPUNIT_ASSERT_MESSAGE(OUStringToOString("Failed to open <" + aFullPath + 
">: " + OUString::number(sal_uInt32(aNew.GetErrorCode())), 
RTL_TEXTENCODING_UTF8).getStr(), aNew.IsOpen());
+auto const pngUrl = OUString(dirUrl + "/" + aBasename + ".png");
+SvFileStream aNew(pngUrl, StreamMode::WRITE | StreamMode::TRUNC);
+CPPUNIT_ASSERT_MESSAGE(OUStringToOString("Failed to open <" + pngUrl + ">: 
" + OUString::number(sal_uInt32(aNew.GetErrorCode())), 
RTL_TEXTENCODING_UTF8).getStr(), aNew.IsOpen());
 
 vcl::PNGWriter aPNGWriter(rScreenshot);
 aPNGWriter.Write(aNew);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Some points on clang-format usage

2018-03-06 Thread Stephan Bergmann

On 17.11.2017 10:03, Stephan Bergmann wrote:

* Don't reformat when moving an existing file

When moving an old file that is listed in solenv/clang-format/blacklist 
(so doesn't automatically get reformatted upon commit), adapt 
solenv/clang-format/blacklist to contain the new name, instead of 
provoking a reformat upon commit.  Otherwise, if the reformatted code 
looks sufficiently different from the original, it's hard to impossible 
to keep track in the git history of which file was moved where.


Please also follow this advice when moving part of an existing file out 
to a new file, as happened e.g. at 
 
"vcl: split painting bitmap functions to bitmappaint.cxx".

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


Re: Let failed Jenkins builds set Verified: -1 in Gerrit?

2018-03-06 Thread Stephan Bergmann

On 05.03.2018 21:41, Christian Lohmaier wrote:

On Wed, Feb 28, 2018 at 9:24 AM, Stephan Bergmann  wrote:

On 23.02.2018 18:57, Christian Lohmaier wrote:


Done - now jenkins' message should be sent to ALL (owner, reviewer and
"interested" users (those who starred the change or watch another user
on the changeset)



Doesn't seem to work.


I certainly do get the jenkins build-status comments sent as email
notifications..

I assume you already did the usual look-in-spamfolder dance? Also I
assume you do receive the rest of the gerrit-comments, just not the
ones from jenkins?


There's no such mails blocked in my spam folder.  And I'm pretty sure 
that, for a Gerrit change on which I'm listed as reviewer, I do get 
mails for mine and all other people's comments, just not for comments 
from Jenkins.  But I don't have a fresh example handy right now where 
that happened; I'll keep an eye out when this happens again.


(At  I didn't find any 
mail-related settings other than "CC Me On Comments I Write" on the 
Preferences page, which is ticked for me.)

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


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

2018-03-06 Thread Noel Grandin
 sdext/source/pdfimport/inc/genericelements.hxx |   32 +--
 sdext/source/pdfimport/inc/treevisiting.hxx|   16 -
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |  122 +++---
 sdext/source/pdfimport/tree/drawtreevisiting.hxx   |   48 ++---
 sdext/source/pdfimport/tree/genericelements.cxx|   76 -
 sdext/source/pdfimport/tree/pdfiprocessor.cxx  |   12 -
 sdext/source/pdfimport/tree/style.cxx  |2 
 sdext/source/pdfimport/tree/writertreevisiting.cxx |  176 ++---
 sdext/source/pdfimport/tree/writertreevisiting.hxx |   48 ++---
 9 files changed, 263 insertions(+), 269 deletions(-)

New commits:
commit a9ef943769b06e6bdffe7326f288b27e08a95698
Author: Noel Grandin 
Date:   Wed Feb 28 11:09:43 2018 +0200

loplugin:useuniqueptr in sdext

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

diff --git a/sdext/source/pdfimport/inc/genericelements.hxx 
b/sdext/source/pdfimport/inc/genericelements.hxx
index 9a5db64016fd..fb3fcf93703d 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -77,7 +77,7 @@ namespace pdfi
 : x( 0 ), y( 0 ), w( 0 ), h( 0 ), StyleId( -1 ), Parent( pParent )
 {
 if( pParent )
-pParent->Children.push_back( this );
+pParent->Children.emplace_back( this );
 }
 
 public:
@@ -87,7 +87,7 @@ namespace pdfi
 To be implemented by every tree node that needs to be
 visitable.
  */
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& rParentIt ) = 0;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& rParentIt ) = 0;
 /// Apply visitor to all children
 void applyToChildren( ElementTreeVisitor& );
 /// Union element geometry with given element
@@ -100,18 +100,18 @@ namespace pdfi
 /** el must be a valid dereferenceable iterator of el->Parent->Children
 pNewParent must not be NULL
 */
-static void setParent( std::list::iterator const & el, 
Element* pNewParent );
+static void setParent( std::list>::iterator 
const & el, Element* pNewParent );
 
 double  x, y, w, h;
 sal_Int32   StyleId;
 Element*Parent;
-std::list Children;
+std::list> Children;
 };
 
 struct ListElement : public Element
 {
 ListElement() : Element( nullptr ) {}
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& ) override;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& ) override;
 };
 
 struct HyperlinkElement : public Element
@@ -121,7 +121,7 @@ namespace pdfi
 HyperlinkElement( Element* pParent, const OUString& rURI )
 : Element( pParent ), URI( rURI ) {}
 public:
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& ) override;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& ) override;
 
 OUString URI;
 };
@@ -166,7 +166,7 @@ namespace pdfi
 : DrawElement( pParent, nGCId ) {}
 
 public:
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& ) override;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& ) override;
 };
 
 struct TextElement : public GraphicalElement
@@ -177,7 +177,7 @@ namespace pdfi
 : GraphicalElement( pParent, nGCId ), FontId( nFontId ) {}
 
 public:
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& ) override;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& ) override;
 
 OUStringBuffer Text;
 sal_Int32   FontId;
@@ -190,7 +190,7 @@ namespace pdfi
 explicit ParagraphElement( Element* pParent ) : Element( pParent ), 
Type( Normal ), bRtl( false ) {}
 
 public:
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::const_iterator& rParentIt ) override;
+virtual void visitedBy( ElementTreeVisitor&, const std::list< 
std::unique_ptr >::const_iterator& rParentIt ) override;
 
 // returns true only if only a single line is contained
 bool isSingleLined( PDFIProcessor const & rProc ) const;
@@ -213,7 +213,7 @@ namespace pdfi
  const basegfx::B2DPolyPolygon& rPolyPoly,
  sal_Int8 nAction );
 public:
-virtual void visitedBy( ElementTreeVisitor&, const std::list< Element* 
>::cons

[Libreoffice-commits] core.git: filter/source framework/inc framework/source include/comphelper odk/examples sc/source sw/source unotools/source vcl/unx

2018-03-06 Thread Andrea Gelmini
 filter/source/config/cache/filtercache.cxx 
  |6 ++--
 filter/source/config/cache/filtercache.hxx 
  |   14 +-
 framework/inc/jobs/helponstartup.hxx   
  |2 -
 framework/inc/jobs/jobdata.hxx 
  |8 ++---
 framework/source/services/autorecovery.cxx 
  |4 +-
 framework/source/services/pathsettings.cxx 
  |4 +-
 include/comphelper/base64.hxx  
  |2 -
 
odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter/AsciiReplaceFilter.java
 |2 -
 sc/source/ui/unoobj/cellsuno.cxx   
  |6 ++--
 sw/source/filter/ww8/ww8graf2.cxx  
  |2 -
 unotools/source/config/moduleoptions.cxx   
  |4 +-
 vcl/unx/gtk/salprn-gtk.cxx 
  |2 -
 12 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit 240e67e37e1aaf459315e31a298bfb434fc1da8c
Author: Andrea Gelmini 
Date:   Mon Mar 5 21:20:27 2018 +0100

Fix typos

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

diff --git a/filter/source/config/cache/filtercache.cxx 
b/filter/source/config/cache/filtercache.cxx
index f56186ac0cde..e9b810b78a5b 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -438,7 +438,7 @@ void FilterCache::setItem(  EItemTypeeType ,
 aItem.validateUINames(m_sActLocale);
 
 // remove implicit properties as e.g. FINALIZED or MANDATORY
-// They can't be saved here and must be readed on demand later, if they 
are needed.
+// They can't be saved here and must be read on demand later, if they are 
needed.
 removeStatePropsFromItem(aItem);
 
 rList[sItem] = aItem;
@@ -950,7 +950,7 @@ void FilterCache::impl_validateAndOptimize()
 // SAFE ->
 ::osl::ResettableMutexGuard aLock(m_aLock);
 
-// First check if any filter or type could be readed
+// First check if any filter or type could be read
 // from the underlying configuration!
 bool bSomeTypesShouldExist   = ((m_eFillState & E_CONTAINS_STANDARD   
) == E_CONTAINS_STANDARD   );
 bool bAllFiltersShouldExist  = ((m_eFillState & E_CONTAINS_FILTERS
) == E_CONTAINS_FILTERS);
@@ -1364,7 +1364,7 @@ void FilterCache::impl_load(EFillState eRequiredState)
 // update fill state. Note: it's a bit field, which combines different 
parts.
 m_eFillState = 
static_cast(static_cast(m_eFillState) | 
static_cast(eRequiredState));
 
-// any data readed?
+// any data read?
 // yes! => validate it and update optimized structures.
 impl_validateAndOptimize();
 
diff --git a/filter/source/config/cache/filtercache.hxx 
b/filter/source/config/cache/filtercache.hxx
index 78339a26b8c1..033e12a05093 100644
--- a/filter/source/config/cache/filtercache.hxx
+++ b/filter/source/config/cache/filtercache.hxx
@@ -87,11 +87,11 @@ class FilterCache : public BaseLock
 
 @descr  This cache supports a 2-step load mechanism.
 First only types (and only some special properties of 
every type!)
-but no filters/frame loaders/content handlers will be 
readed.
+but no filters/frame loaders/content handlers will be 
read.
 That should be enough to work with this cache e.g. for 
loading
 the first document. After this first document was 
loaded successfully,
 a special "load-on-demand-thread" will be started to 
fill this cache
-with ALL other information, which was not readed 
before.
+with ALL other information, which was not read before.
 That's the second step. All operations on top of this 
cache will be
 blocked then.
  */
@@ -112,7 +112,7 @@ class FilterCache : public BaseLock
 
 
 /** @short  regulate, which properties of a configured item
-will be readed.
+will be read.
 
 @descr  To perform reading of all configuration items,
 only standard properties will be handled. At a second
@@ -304,7 +304,7 @@ class FilterCache : public BaseLock
 /** @short  force special fill state of this cache.
 
 @descr  This method checks, if all reques

Re: dconf error during make

2018-03-06 Thread Miklos Vajna
Hi,

On Mon, Mar 05, 2018 at 11:26:20PM +0530, Aditya Sood 
 wrote:
> (If all else fails, you should be able to just work around this issue by
> > configuring --disable-dconf.)
> >
> 
> It built successfully after making this change. But since dconf was
> disabled, won't it lead to errors later during execution of the app?

No, it won't. dconf is specific to Linux desktop builds, it's not useful
for Android.

Regards,

Miklos


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


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

2018-03-06 Thread Jan-Marek Glogowski
 fpicker/source/win32/filepicker/asyncrequests.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3e38b81a65ced47595e9760bdc622d9434b72cc0
Author: Jan-Marek Glogowski 
Date:   Mon Mar 5 20:43:53 2018 +0100

tdf#116147 guard triggerRequestThreadAware

It didn't help putting a SolarMutexGuard into
VCLXButton::ProcessWindowEvent, which was my first suspect in my
own backtrace, as VCLXWindowImpl::OnProcessCallbacks releases it
to process the callbacks.

Since the gtk backend also guards all calls into the file picker
code, I think it's save to do the same for the Windows picker.

I have no idea where it is actually released again...

Change-Id: I3ab3b47904dc3d0033739a82f7afd91e6e80403d
Reviewed-on: https://gerrit.libreoffice.org/50783
Tested-by: Jenkins 
Reviewed-by: Jan-Marek Glogowski 

diff --git a/fpicker/source/win32/filepicker/asyncrequests.cxx 
b/fpicker/source/win32/filepicker/asyncrequests.cxx
index e3e97a0e090b..766a2309d991 100644
--- a/fpicker/source/win32/filepicker/asyncrequests.cxx
+++ b/fpicker/source/win32/filepicker/asyncrequests.cxx
@@ -138,6 +138,7 @@ void AsyncRequests::triggerRequestThreadAware(const 
RequestRef& rRequest,
 {
 oslThreadIdentifier nOurThreadId= getIdentifier();
 oslThreadIdentifier nCallerThreadId = 
::osl::Thread::getCurrentIdentifier();
+SolarMutexGuard aGuard;
 if (nOurThreadId == nCallerThreadId)
 triggerRequestDirectly(rRequest);
 else if (nWait == BLOCKED)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2018-03-06 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/tdf115861.docx  |binary
 sw/qa/extras/ooxmlexport/ooxmlexport11.cxx|7 +++
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 ++
 writerfilter/source/dmapper/util.cxx  |   14 +-
 4 files changed, 26 insertions(+), 1 deletion(-)

New commits:
commit 49cf733effc56c09c5e2eb023120c2d3532b5b3d
Author: Miklos Vajna 
Date:   Mon Mar 5 22:09:39 2018 +0100

tdf#115861 DOCX import: avoid last-paragraph removal when discarding footer

Discarding header/footer is necessary when the document or section
settings request to ignore first or even headers/footers. In the bugdoc
case settings.xml didn't opt-in for different even/odd footers, but
there was an even footer to be ignored.

Handle this state at two more places, so we don't end up in a situation
where we ignore the footer but not its "remove last (empty) paragraph at
the end of the footer" action.

Also make the debug dumper for text ranges more robust to have a working
token dump when we try to get the string for a table.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf115861.docx 
b/sw/qa/extras/ooxmlexport/data/tdf115861.docx
new file mode 100644
index ..f42a7bad2cfa
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf115861.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index ebc3d81d9f4a..813b0c3c4f3c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -83,6 +83,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf112694, "tdf112694.docx")
 CPPUNIT_ASSERT(!getProperty(aPageStyle, "HeaderIsOn"));
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf115861, "tdf115861.docx")
+{
+// Second item in the paragraph enumeration was a table, 2nd paragraph was
+// lost.
+CPPUNIT_ASSERT_EQUAL(OUString("(k)"), getParagraph(2)->getString());
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf67207_MERGEFIELD, "mailmerge.docx")
 {
 uno::Reference xTextField = getProperty< 
uno::Reference >(getRun(getParagraph(1), 2), "TextField");
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 649898923a9b..ece3775fc686 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -390,6 +390,9 @@ void DomainMapper_Impl::AddDummyParaForTableInSection()
 
 void DomainMapper_Impl::RemoveLastParagraph( )
 {
+if (m_bDiscardHeaderFooter)
+return;
+
 if (m_aTextAppendStack.empty())
 return;
 uno::Reference< text::XTextAppend > xTextAppend = 
m_aTextAppendStack.top().xTextAppend;
@@ -1087,6 +1090,9 @@ static sal_Int32 lcl_getListId(const StyleSheetEntryPtr& 
rEntry, const StyleShee
 
 void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
 {
+if (m_bDiscardHeaderFooter)
+return;
+
 #ifdef DEBUG_WRITERFILTER
 TagLogger::getInstance().startElement("finishParagraph");
 #endif
diff --git a/writerfilter/source/dmapper/util.cxx 
b/writerfilter/source/dmapper/util.cxx
index e721d6cecb9b..378e30b08a9d 100644
--- a/writerfilter/source/dmapper/util.cxx
+++ b/writerfilter/source/dmapper/util.cxx
@@ -34,7 +34,19 @@ std::string XTextRangeToString(uno::Reference< 
text::XTextRange > const & textRa
 #ifdef DEBUG_WRITERFILTER
 if (textRange.get())
 {
-OUString aOUStr = textRange->getString();
+OUString aOUStr;
+
+try
+{
+aOUStr = textRange->getString();
+}
+catch (const uno::Exception& rException)
+{
+result += "(exception: ";
+result += rException.Message.toUtf8().getStr();
+result += ")";
+}
+
 OString aOStr(aOUStr.getStr(), aOUStr.getLength(),  
RTL_TEXTENCODING_ASCII_US );
 
 result = aOStr.getStr();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits