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

2016-06-20 Thread Tomaž Vajngerl
 vcl/opengl/salbmp.cxx |   92 +++---
 1 file changed, 66 insertions(+), 26 deletions(-)

New commits:
commit c2fc93cae194a1aad94721edc51078b168a34f5f
Author: Tomaž Vajngerl 
Date:   Tue Jun 21 14:34:45 2016 +0800

tdf#100451 convert texture buffer to 1-bit and 4-bit palette buffer

OpenGL doesn't support palettes so when the texture is created,
the bitmap buffer is converted to 24-bit RGB. This works nice for
showing the bitmaps on screen. The problem arises when we want to
read the bitmap buffer back (like in a PDF export) as we have to
convert that back to 1-bit or 4-bit palette bitmap buffer. For 4-bit
this was not implemented yet, on the other hand for 1-bit it was
implemented but it didn't take palette into account so the bitmap
was not correct (inverted).

This commit introduces a ScanlineWriter which handles writing
RGB colors to 1-bit and 4-bit palette scanlines. The class sets
up the masks and shifts needed to place the color information
at the correct place in a byte. It also automatically converts a
RGB to palette index.

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

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index fbfcf6f..ef081ee 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -415,7 +415,48 @@ void lclInstantiateTexture(OpenGLTexture& rTexture, const 
int nWidth, const int
 rTexture = OpenGLTexture (nWidth, nHeight, nFormat, nType, pData);
 }
 
-}
+// Write color information for 1 and 4 bit palette bitmap scanlines.
+class ScanlineWriter
+{
+BitmapPalette& maPalette;
+sal_uInt8 mnColorsPerByte; // number of colors that are stored in one byte
+sal_uInt8 mnColorBitSize;  // number of bits a color takes
+sal_uInt8 mnColorBitMask;  // bit mask used to isolate the color
+sal_uInt8* mpCurrentScanline;
+long mnX;
+
+public:
+ScanlineWriter(BitmapPalette& aPalette, sal_Int8 nColorsPerByte)
+: maPalette(aPalette)
+, mnColorsPerByte(nColorsPerByte)
+, mnColorBitSize(8 / mnColorsPerByte) // bit size is number of bit in 
a byte divided by number of colors per byte (8 / 2 = 4 for 4-bit)
+, mnColorBitMask((1 << mnColorBitSize) - 1) // calculate the bit mask 
from the bit size
+, mpCurrentScanline(nullptr)
+, mnX(0)
+{}
+
+inline void writeRGB(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB)
+{
+// calculate to which index we will write
+long nScanlineIndex = mnX / mnColorsPerByte;
+
+// calculate the number of shifts to get the color information to the 
right place
+long nShift = (8 - mnColorBitSize) - ((mnX % mnColorsPerByte) * 
mnColorBitSize);
+
+sal_uInt16 nColorIndex = maPalette.GetBestIndex(BitmapColor(nR, nG, 
nB));
+mpCurrentScanline[nScanlineIndex] &= ~(mnColorBitMask << nShift); // 
clear
+mpCurrentScanline[nScanlineIndex] |= (nColorIndex & mnColorBitMask) << 
nShift; // set
+mnX++;
+}
+
+inline void nextLine(sal_uInt8* pScanline)
+{
+mnX = 0;
+mpCurrentScanline = pScanline;
+}
+};
+
+} // end anonymous namespace
 
 Size OpenGLSalBitmap::GetSize() const
 {
@@ -567,43 +608,43 @@ bool OpenGLSalBitmap::ReadTexture()
 #endif
 return true;
 }
-else if (mnBits == 1)
-{   // convert buffers from 24-bit RGB to 1-bit Mask
+else if (mnBits == 1 || mnBits == 4)
+{   // convert buffers from 24-bit RGB to 1 or 4-bit buffer
 std::vector aBuffer(mnWidth * mnHeight * 3);
 
 sal_uInt8* pBuffer = aBuffer.data();
 determineTextureFormat(24, nFormat, nType);
 maTexture.Read(nFormat, nType, pBuffer);
+sal_uInt16 nSourceBytesPerRow = lclBytesPerRow(24, mnWidth);
 
-int nShift = 7;
-size_t nIndex = 0;
-
-sal_uInt8* pCurrent = pBuffer;
+std::unique_ptr pWriter;
+switch(mnBits)
+{
+case 1:
+pWriter.reset(new ScanlineWriter(maPalette, 8));
+break;
+case 4:
+default:
+pWriter.reset(new ScanlineWriter(maPalette, 2));
+break;
+}
 
 for (int y = 0; y < mnHeight; ++y)
 {
+sal_uInt8* pSource = &pBuffer[y * nSourceBytesPerRow];
+sal_uInt8* pDestination = &pData[y * mnBytesPerRow];
+
+pWriter->nextLine(pDestination);
+
 for (int x = 0; x < mnWidth; ++x)
 {
-if (nShift < 0)
-{
-nShift = 7;
-nIndex++;
-pData[nIndex] = 0;
-}
-
-sal_uInt8 nR = *pCurrent++;
-sal_uInt8 nG = *pCurrent++;
-sal_uInt8 nB = *pCurrent++;
+// re

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

2016-06-20 Thread Muhammet Kara
 basic/source/basmgr/basmgr.cxx |   25 ++---
 1 file changed, 14 insertions(+), 11 deletions(-)

New commits:
commit fafb309d2ec6b7a7125409dabffd13613ad65a0d
Author: Muhammet Kara 
Date:   Mon Jun 20 13:56:03 2016 +0300

prefer OUStringBuffer to concatenating OUString in a loop

And improve OUString readability and efficiency.
See: https://goo.gl/jsVAwy:

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

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 9b8cf68..918d61d 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1626,29 +1626,32 @@ ErrCode BasicManager::ExecuteMacro( OUString const& 
i_fullyQualifiedName, OUStri
 sArgs.remove( 0, 1 );
 sArgs.remove( sArgs.getLength() - 1, 1 );
 
-sQuotedArgs = "(";
+OUStringBuffer aBuff;
 OUString sArgs2 = sArgs.makeStringAndClear();
 sal_Int32 nCount = comphelper::string::getTokenCount(sArgs2, ',');
+
+aBuff.append("(");
 for (sal_Int32 n = 0; n < nCount; ++n)
 {
-sQuotedArgs += "\"";
-sQuotedArgs += sArgs2.getToken(n, ',');
-sQuotedArgs += "\"";
+aBuff.append( "\"" );
+aBuff.append( sArgs2.getToken(n, ',') );
+aBuff.append( "\"" );
+
 if ( n < nCount - 1 )
 {
-sQuotedArgs += ",";
+aBuff.append( "," );
 }
 }
+aBuff.append( ")" );
 
-sQuotedArgs += ")";
+sQuotedArgs = aBuff.makeStringAndClear();
 }
 
 // add quoted arguments and do the call
-OUString sCall;
-sCall += "[";
-sCall += pMethod->GetName();
-sCall += sQuotedArgs;
-sCall += "]";
+OUString sCall = "["
+   + pMethod->GetName()
+   + sQuotedArgs
+   + "]";
 
 SbxVariable* pRet = pMethod->GetParent()->Execute( sCall );
 if ( pRet && ( pRet != pMethod ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Diana Sedlak License Statement

2016-06-20 Thread jan iversen
WELCOME
Thanks for your license statement.

I have added you to our wiki:
https://wiki.documentfoundation.org/Development/Developers

If you want help to get started or have any questions, then please contact me. 
I am here to help you (and others) in getting their first patch submitted.

LibreOffice is a very big program and getting it built, setting up gerrit, and 
getting the first patch right can be a bit challenging, therefore do not 
hesitate to email me if you want help.

We have made a step by step guide to help you get started:
https://wiki.documentfoundation.org/Development/GetInvolved/DeveloperStepByStep

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


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

2016-06-20 Thread Takeshi Abe
 starmath/source/parse.cxx |   47 +-
 1 file changed, 22 insertions(+), 25 deletions(-)

New commits:
commit 2fb88cb41e9d606280271c8dd78d2a776aa06ce2
Author: Takeshi Abe 
Date:   Fri Jun 17 11:47:46 2016 +0900

This can be an assert()

Change-Id: I2b0a8f50359e5b12fa27bf48c355f736e2b05033
Reviewed-on: https://gerrit.libreoffice.org/26491
Tested-by: Jenkins 
Reviewed-by: Takeshi Abe 

diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5092532..7d02bad 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1987,39 +1987,36 @@ void SmParser::DoBrace()
 }
 else
 {
-if (TokenInGroup(TG::LBrace))
-{
-pLeft = new SmMathSymbolNode(m_aCurToken);
+assert(TokenInGroup(TG::LBrace));
 
-NextToken();
-DoBracebody(false);
-pBody = popOrZero(m_aNodeStack);
+pLeft = new SmMathSymbolNode(m_aCurToken);
 
-SmTokenType  eExpectedType = TUNKNOWN;
-switch (pLeft->GetToken().eType)
-{   case TLPARENT : eExpectedType = TRPARENT;   break;
-case TLBRACKET :eExpectedType = TRBRACKET;  break;
-case TLBRACE :  eExpectedType = TRBRACE;break;
-case TLDBRACKET :   eExpectedType = TRDBRACKET; break;
-case TLLINE :   eExpectedType = TRLINE; break;
-case TLDLINE :  eExpectedType = TRDLINE;break;
-case TLANGLE :  eExpectedType = TRANGLE;break;
-case TLFLOOR :  eExpectedType = TRFLOOR;break;
-case TLCEIL :   eExpectedType = TRCEIL; break;
-default :
-SAL_WARN("starmath", "unknown case");
+NextToken();
+DoBracebody(false);
+pBody = popOrZero(m_aNodeStack);
+
+SmTokenType  eExpectedType = TUNKNOWN;
+switch (pLeft->GetToken().eType)
+{   case TLPARENT : eExpectedType = TRPARENT;   break;
+case TLBRACKET :eExpectedType = TRBRACKET;  break;
+case TLBRACE :  eExpectedType = TRBRACE;break;
+case TLDBRACKET :   eExpectedType = TRDBRACKET; break;
+case TLLINE :   eExpectedType = TRLINE; break;
+case TLDLINE :  eExpectedType = TRDLINE;break;
+case TLANGLE :  eExpectedType = TRANGLE;break;
+case TLFLOOR :  eExpectedType = TRFLOOR;break;
+case TLCEIL :   eExpectedType = TRCEIL; break;
+default :
+SAL_WARN("starmath", "unknown case");
 }
 
-if (m_aCurToken.eType == eExpectedType)
-{
+if (m_aCurToken.eType == eExpectedType)
+{
 pRight = new SmMathSymbolNode(m_aCurToken);
 NextToken();
-}
-else
-eError = PE_PARENT_MISMATCH;
 }
 else
-eError = PE_LBRACE_EXPECTED;
+eError = PE_PARENT_MISMATCH;
 }
 
 if (eError == PE_NONE)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - setup_native/scripts setup_native/source solenv/bin

2016-06-20 Thread Christian Lohmaier
 setup_native/scripts/osx_install_languagepack.applescript |8 ++
 setup_native/source/mac/Info.plist.langpack   |2 -
 solenv/bin/modules/installer/simplepackage.pm |   18 ++
 3 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 3491a1a7d17bc12a30af900fa83df44ddbd75108
Author: Christian Lohmaier 
Date:   Mon Jun 20 21:55:08 2016 +0200

tdf#89657 sign Mac languagepack installer and force-start-close LO

starting LO once satisfies Gatekeeper's verification, even when the
langaugepack's content are added afterwards

Change-Id: Ie548df39a7ec07cc485c40148e4ca75101346798
(cherry picked from commit 78c7929ac4f03d90e956cc1052208c646feaabf3)
Reviewed-on: https://gerrit.libreoffice.org/26528
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/setup_native/scripts/osx_install_languagepack.applescript 
b/setup_native/scripts/osx_install_languagepack.applescript
index cbd7743..49c8e54 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -143,6 +143,14 @@ end if
 -- touch extensions folder to have LO register bundled dictionaries
 set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " 
-xjf " & quoted form of sourcedir & "/tarball.tar.bz2 && touch " & quoted form 
of (choice as string) & "/Contents/Resources/extensions"
 try
+   (* A start of unchanged LO must take place so Gatekeeper will verify
+  the signature prior to installing the languagepack
+   *)
+   if application choice is not running then
+   -- this will flash the startcenter once...
+   tell application choice to activate
+   tell application choice to quit
+   end if
do shell script tarCommand

 on error errMSG number errNUM
diff --git a/setup_native/source/mac/Info.plist.langpack 
b/setup_native/source/mac/Info.plist.langpack
index 372e645e..361a4b4 100644
--- a/setup_native/source/mac/Info.plist.langpack
+++ b/setup_native/source/mac/Info.plist.langpack
@@ -35,7 +35,7 @@
CFBundleShortVersionString
9
CFBundleIdentifier
-   ${BUNDLEIDENTIFIER}
+   [BUNDLEIDENTIFIER].langpack
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/solenv/bin/modules/installer/simplepackage.pm 
b/solenv/bin/modules/installer/simplepackage.pm
index ac33798..95ccfe7 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -379,19 +379,27 @@ sub create_package
 $destfile = $subdir . "/" . $iconfile;
 installer::systemactions::copy_one_file($iconfileref, $destfile);
 
-my $installname = "Info.plist";
 my $infoplistfile = $ENV{'SRCDIR'} . 
"/setup_native/source/mac/Info.plist.langpack";
 if (! -f $infoplistfile) { installer::exiter::exit_program("ERROR: 
Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
-$destfile = $contentsfolder . "/" . $installname;
-installer::systemactions::copy_one_file($infoplistfile, $destfile);
-
+$destfile = "$contentsfolder/Info.plist";
 # Replacing variables in Info.plist
-$scriptfilecontent = installer::files::read_file($destfile);
+$scriptfilecontent = installer::files::read_file($infoplistfile);
 # replace_one_variable_in_shellscript($scriptfilecontent, 
$volume_name, "FULLPRODUCTNAME" );
 replace_one_variable_in_shellscript($scriptfilecontent, 
$volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
+replace_one_variable_in_shellscript($scriptfilecontent, 
$ENV{'MACOSX_BUNDLE_IDENTIFIER'}, "BUNDLEIDENTIFIER" );
 installer::files::save_file($destfile, $scriptfilecontent);
 
 chdir $localfrom;
+
+if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && 
$ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) {
+my @lp_sign = ('codesign', '--verbose', '--sign', 
$ENV{'MACOSX_CODESIGNING_IDENTITY'}, '--deep', $appfolder);
+if (system(@lp_sign) == 0) {
+$infoline = "Success: \"@lp_sign\" executed 
successfully!\n";
+} else {
+$infoline = "ERROR: Could not codesign the languagepack 
using \"@lp_sign\"!\n";
+}
+push( @installer::globals::logfileinfo, $infoline);
+}
 }
 elsif ($volume_name_classic_app eq 'LibreOffice' || 
$volume_name_classic_app eq 'LibreOfficeDev')
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.1' - 33 commits - desktop/inc editeng/source sc/CppunitTest_sc_tiledrendering.mk sc/inc sc/Library_sc.mk sc/qa sc/source sw/source vcl/hea

2016-06-20 Thread Andras Timar
 desktop/inc/lib/init.hxx |   43 ++
 editeng/source/editeng/editeng.cxx   |1 
 sc/CppunitTest_sc_tiledrendering.mk  |1 
 sc/Library_sc.mk |1 
 sc/inc/document.hxx  |2 
 sc/inc/fillinfo.hxx  |   54 +++
 sc/inc/markarr.hxx   |1 
 sc/inc/markdata.hxx  |   24 +
 sc/inc/markmulti.hxx |   84 +
 sc/inc/segmenttree.hxx   |2 
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   55 +++
 sc/source/core/data/column.cxx   |   52 +--
 sc/source/core/data/column3.cxx  |2 
 sc/source/core/data/documen2.cxx |   34 +-
 sc/source/core/data/fillinfo.cxx |  414 +--
 sc/source/core/data/markarr.cxx  |   11 
 sc/source/core/data/markdata.cxx |  371 +++-
 sc/source/core/data/markmulti.cxx|  348 ++
 sc/source/core/data/segmenttree.cxx  |2 
 sc/source/core/data/table1.cxx   |   11 
 sc/source/ui/inc/viewdata.hxx|8 
 sc/source/ui/unoobj/docuno.cxx   |3 
 sc/source/ui/view/formatsh.cxx   |   11 
 sc/source/ui/view/gridwin4.cxx   |   93 +-
 sc/source/ui/view/tabview3.cxx   |   42 ++
 sc/source/ui/view/viewdata.cxx   |2 
 sw/source/core/crsr/viscrs.cxx   |3 
 sw/source/uibase/docvw/SidebarTxtControl.cxx |5 
 sw/source/uibase/docvw/SidebarWin.cxx|6 
 vcl/headless/svpinst.cxx |   61 +++
 vcl/inc/headless/svpinst.hxx |9 
 31 files changed, 1375 insertions(+), 381 deletions(-)

New commits:
commit 71deb1dacf61e5f9a1d95e14453885178d5a6f53
Author: Andras Timar 
Date:   Wed Jun 1 23:24:01 2016 +0200

Linux x86 build fix

Change-Id: I34a393745265b8daca832c7df896bea090bb2554
(cherry picked from commit 72d1b6663a340e745af42aaf94541e4c1309b434)

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 3bc285a..24f45db 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1061,7 +1061,7 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
 firstCol = (firstCol >= 0 ? firstCol : nStartCol);
 lastCol = (lastCol >= 0 ? lastCol : nEndCol);
 
-auto capacity = std::min(nEndRow + 3, 1002);
+auto capacity = std::min(nEndRow + 3, sal_Int32(1002));
 ScTableInfo aTabInfo(capacity);
 pDoc->FillInfo(aTabInfo, nStartCol, nStartRow, lastCol, lastRow, nTab, 
fPPTX, fPPTY, false, false, NULL);
 
commit aff7d0ff0fc241e7d062cae4a9f6b47f365a1aea
Author: Ashod Nakashian 
Date:   Wed Jun 1 10:07:59 2016 -0400

LOK: calc tile rendering

Change-Id: I122922ac18a652dbbce01932eaaad92ded45098d
Reviewed-on: https://gerrit.libreoffice.org/25782
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit bd63faaedc6d268ca1f4552aa6d18fc74e23809c)

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index f949ef6..3bc285a 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1061,7 +1061,8 @@ void ScGridWindow::PaintTile( VirtualDevice& rDevice,
 firstCol = (firstCol >= 0 ? firstCol : nStartCol);
 lastCol = (lastCol >= 0 ? lastCol : nEndCol);
 
-ScTableInfo aTabInfo(nEndRow + 3);
+auto capacity = std::min(nEndRow + 3, 1002);
+ScTableInfo aTabInfo(capacity);
 pDoc->FillInfo(aTabInfo, nStartCol, nStartRow, lastCol, lastRow, nTab, 
fPPTX, fPPTY, false, false, NULL);
 
 ScOutputData aOutputData(&rDevice, OUTTYPE_WINDOW, aTabInfo, pDoc, nTab,
commit 69ef944d9a2d868a596699658f28121edd674f23
Author: Ashod Nakashian 
Date:   Sat May 28 10:20:10 2016 -0400

bccu#1845 - Calc tile rendering very slow

For some reason trying to draw exactly the
region of the tile results in black tiles.
That is, when the top rows and left columns
are not drawn, black tiles show.

This patch still reduces the time to render
a given tile by limiting the bottom-most row
and right-most column to the max necessary.
For large tabs rendering the first few 100
rows is very fast (<100ms at most).

More work is necessary to reduce drawing time
for large sheets (when rendering tiles at the
bottom). Still, even those slow bottom-rows
are now faster with this patch.

Currently the slowest function by far is
ScGridWindow::DrawContent.

Change-Id: I6e88c7b3a1c483bf43bfcfb38f4b41ffc08a9744
Reviewed-on: https://gerrit.libreoffice.org/25586
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 56e290acca0f51f1aa888f9e7787cfcdc6bb8fd9)

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gri

[Libreoffice-commits] core.git: vcl/osx vcl/quartz

2016-06-20 Thread Thorsten Behrens
 vcl/osx/salframeview.mm |3 ---
 vcl/quartz/salbmp.cxx   |6 +-
 2 files changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 5d336fb1d515b0967bc730e47ac3e4b850cf9872
Author: Thorsten Behrens 
Date:   Tue Jun 21 03:41:48 2016 +0200

vcl: remove some commented-out code

Change-Id: Iac827fd102404ae615dfd1685886010e949ff653

diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index 219c681..3dded25 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -1680,9 +1680,6 @@ private:
 {
 if( AquaSalFrame::isAlive( mpFrame ) )
 {
-#if OSL_DEBUG_LEVEL > 1
-// fprintf( stderr, "SalFrameView: doCommandBySelector %s\n", 
(char*)aSelector );
-#endif
 if( (mpFrame->mnICOptions & InputContextFlags::Text) &&
 aSelector != nullptr && [self respondsToSelector: aSelector] )
 {
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 7c44fb2..86c4dab 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -751,13 +751,9 @@ const BitmapPalette& GetDefaultPalette( int mnBits, bool 
bMonochrome )
 
 BitmapBuffer* QuartzSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ )
 {
+// TODO: AllocateUserData();
 if (!m_pUserBuffer.get())
-//  || m_pContextBuffer.get() && (m_pUserBuffer.get() != 
m_pContextBuffer.get()) )
-{
-// fprintf(stderr,"ASB::Acq(%dx%d,d=%d)\n",mnWidth,mnHeight,mnBits);
-// TODO: AllocateUserData();
 return nullptr;
-}
 
 BitmapBuffer* pBuffer = new BitmapBuffer;
 pBuffer->mnWidth = mnWidth;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Thorsten Behrens
 vcl/unx/generic/app/i18n_ic.cxx|6 --
 vcl/unx/generic/app/randrwrapper.cxx   |2 +-
 vcl/unx/generic/glyphs/graphite_serverfont.cxx |7 +++
 vcl/unx/generic/printer/cupsmgr.cxx|2 +-
 vcl/unx/generic/printer/printerinfomanager.cxx |2 +-
 5 files changed, 6 insertions(+), 13 deletions(-)

New commits:
commit 0c1767d9466adf0729eb8e1f43ddb80a31886898
Author: Thorsten Behrens 
Date:   Tue Jun 21 03:12:12 2016 +0200

vcl: fix dbglevel>1 build

Change-Id: I94c35499d395d10a86a821a28e57ad3c1d8ec485

diff --git a/vcl/unx/generic/app/i18n_ic.cxx b/vcl/unx/generic/app/i18n_ic.cxx
index a67e589..585f891 100644
--- a/vcl/unx/generic/app/i18n_ic.cxx
+++ b/vcl/unx/generic/app/i18n_ic.cxx
@@ -511,12 +511,6 @@ SalI18N_InputContext::SupportInputMethodStyle( XIMStyles 
*pIMStyles )
 }
 }
 
-#if OSL_DEBUG_LEVEL > 1
-char pBuf[ 128 ];
-fprintf( stderr, "selected inputmethod style = %s\n",
- GetMethodName(mnPreeditStyle | mnStatusStyle, pBuf, sizeof(pBuf)) 
);
-#endif
-
 return (mnPreeditStyle != 0) && (mnStatusStyle != 0) ;
 }
 
diff --git a/vcl/unx/generic/app/randrwrapper.cxx 
b/vcl/unx/generic/app/randrwrapper.cxx
index 54b822f..0ae4027 100644
--- a/vcl/unx/generic/app/randrwrapper.cxx
+++ b/vcl/unx/generic/app/randrwrapper.cxx
@@ -169,7 +169,7 @@ void SalDisplay::processRandREvent( XEvent* pEvent )
 pWrapper->XRRFreeScreenConfigInfo( pConfig );
 
 #if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "screen %d changed to size %dx%d\n", 
(int)i, (int)pTargetSize->width, (int)pTargetSize->height );
+fprintf( stderr, "screen %d changed to size %dx%d\n", 
(int)nId, (int)pTargetSize->width, (int)pTargetSize->height );
 #endif
 }
 }
diff --git a/vcl/unx/generic/glyphs/graphite_serverfont.cxx 
b/vcl/unx/generic/glyphs/graphite_serverfont.cxx
index d2126b0..f07ce70 100644
--- a/vcl/unx/generic/glyphs/graphite_serverfont.cxx
+++ b/vcl/unx/generic/glyphs/graphite_serverfont.cxx
@@ -69,7 +69,7 @@ 
GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
 rServerFont.GetFontSelData().maTargetName, RTL_TEXTENCODING_UTF8 );
 #ifdef DEBUG
 printf("GraphiteServerFontLayout %lx %s size %d %f\n", (long unsigned 
int)this, name.getStr(),
-rServerFont.GetMetricsFT().x_ppem,
+rServerFont.GetFtFace()->size->metrics.x_ppem,
 rServerFont.GetFontSelData().mfExactHeight);
 #endif
 sal_Int32 nFeat = name.indexOf(grutils::GrFeatureParser::FEAT_PREFIX) + 1;
@@ -80,15 +80,14 @@ 
GraphiteServerFontLayout::GraphiteServerFontLayout(ServerFont& rServerFont) thro
 rServerFont.GetGraphiteFace()->face(), aFeat, aLang);
 #ifdef DEBUG
 if (mpFeatures)
-printf("GraphiteServerFontLayout %s/%s/%s %x language %d features 
%d errors\n",
+printf("GraphiteServerFontLayout %s/%s/%s %x language\n",
 OUStringToOString( 
rServerFont.GetFontSelData().GetFamilyName(),
 RTL_TEXTENCODING_UTF8 ).getStr(),
 OUStringToOString( rServerFont.GetFontSelData().maTargetName,
 RTL_TEXTENCODING_UTF8 ).getStr(),
 OUStringToOString( rServerFont.GetFontSelData().maSearchName,
 RTL_TEXTENCODING_UTF8 ).getStr(),
-rServerFont.GetFontSelData().meLanguage,
-(int)mpFeatures->numFeatures(), mpFeatures->parseErrors());
+rServerFont.GetFontSelData().meLanguage);
 #endif
 }
 else
diff --git a/vcl/unx/generic/printer/cupsmgr.cxx 
b/vcl/unx/generic/printer/cupsmgr.cxx
index 2da3bf9..6f000e4 100644
--- a/vcl/unx/generic/printer/cupsmgr.cxx
+++ b/vcl/unx/generic/printer/cupsmgr.cxx
@@ -670,7 +670,7 @@ bool CUPSManager::endSpool( const OUString& rPrintername, 
const OUString& rJobTi
 "option " << pOptions[n].name << "=" << pOptions[n].value);
 #if OSL_DEBUG_LEVEL > 1
 OString aCmd( "cp " );
-aCmd = aCmd + files.front();
+aCmd = aCmd + it->second.getStr();
 aCmd = aCmd + OString( " $HOME/cupsprint.ps" );
 system( aCmd.getStr() );
 #endif
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx 
b/vcl/unx/generic/printer/printerinfomanager.cxx
index be9149c..5e08f42 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -1156,7 +1156,7 @@ void SystemQueueInfo::run()
 OStringBuffer aCmdLine( 128 );
 aCmdLine.append( rParm.pQueueCommand );
 #if OSL_DEBUG_LEVEL > 1
-fprintf( stderr, "trying print queue command \"%s\" ... ", 
aParms[i].pQueueCommand );
+fprintf( stderr, "trying print queue command \"%s\" ... ", 
rParm.pQueueCommand );
 #endif
 aCmdLine.append( " 2>/dev/null" );
 FILE *pPipe;
___
Libreoffi

Disabling of OpenCL by default in Calc

2016-06-20 Thread Markus Mohrhard
Hey guys,

so I'd like to disable OpenCL by default in Calc. I was once again hit by
some nasty issue in the OpenCL code that makes calc unusable for me. In my
opinion we have way too many issues with it and it reduces the reliability
of Calc ( who trusts his OpenCL driver enough to do his taxes with OpenCL
enabled).

Unless someone does some huge refactoring of the OpenCL code and makes sure
that we can trust the OpenCL backend as much as our normal formula code I
would prefer if we disable it. In this case it is a regression from
40b0b9ab7703a165295b008f47df14d2ec076fb1 but that we don't detect such
fundamental problems because of the different engines and the different
devices makes it hard to rely on the OpenCL code.

I would prefer to disable the OpenCL backend by default until we have a
solution to the problems. That includes a way to detect broken drivers
automatically and a way to have a few tinderboxes that are actually
executing the OpenCL code path. Right now we are not even aware if any box
is executing the tests (and I suppose none is).

It would be nice if this could be put onto the ESC agenda so that we could
disable it in 5.2.

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


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

2016-06-20 Thread Caolán McNamara
 sc/source/ui/app/transobj.cxx |   15 +++
 sc/source/ui/inc/transobj.hxx |8 +++-
 sc/source/ui/view/gridwin.cxx |   14 --
 sc/source/ui/view/select.cxx  |1 +
 sc/source/ui/view/tabcont.cxx |2 ++
 5 files changed, 37 insertions(+), 3 deletions(-)

New commits:
commit f9b46bbd2446a6c9a0aaab31016536bda4a77294
Author: Caolán McNamara 
Date:   Mon Jun 20 12:13:02 2016 +0100

tdf#96540 dragging between sheets can change the current cursor position

so the at position at time of drop may not be that at the start of
the drag.

So set the current cursor position to ScTransferObj when the drag starts
and retrieve it later

Related to:

commit ac3b66057ba677903b6de354317417b267be0fa0
Author: Kohei Yoshida 
Date:   Thu Sep 16 11:09:29 2010 +0200

calc-selection-fixed-cursor.diff: Migrated

n#502717, i#21869, i#97093, when making selection, don't move the 
cursor position

and

commit c433fa0639ccf5caeb0c128c8a3794322e2a1c81
Author: Markus Mohrhard 
Date:   Fri Jul 6 02:04:44 2012 +0200

adjust the calculation of the cursor pos if ALT is used, fdo#48869

Change-Id: I6316717c860d999270aa7f0fb50af5f6dfc7efd7

I haven't used SetSourceCursorPos everywhere a ScTransferObj is created, 
just
where its created through a drag event

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

diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 016e0e4..802533f 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -119,6 +119,8 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const 
TransferableObjectDesc
 aObjDesc( rDesc ),
 nDragHandleX( 0 ),
 nDragHandleY( 0 ),
+nSourceCursorX( MAXCOL + 1 ),
+nSourceCursorY( MAXROW + 1 ),
 nDragSourceFlags( 0 ),
 bDragWasInternal( false ),
 bUsedForLink( false ),
@@ -524,6 +526,19 @@ void ScTransferObj::SetDragHandlePos( SCCOL nX, SCROW nY )
 nDragHandleY = nY;
 }
 
+void ScTransferObj::SetSourceCursorPos( SCCOL nX, SCROW nY )
+{
+nSourceCursorX = nX;
+nSourceCursorY = nY;
+}
+
+bool ScTransferObj::WasSourceCursorInSelection() const
+{
+return
+nSourceCursorX >= aBlock.aStart.Col() && nSourceCursorX <= 
aBlock.aEnd.Col() &&
+nSourceCursorY >= aBlock.aStart.Row() && nSourceCursorY <= 
aBlock.aEnd.Row();
+}
+
 void ScTransferObj::SetVisibleTab( SCTAB nNew )
 {
 nVisibleTab = nNew;
diff --git a/sc/source/ui/inc/transobj.hxx b/sc/source/ui/inc/transobj.hxx
index b33c88b..9e2e823 100644
--- a/sc/source/ui/inc/transobj.hxx
+++ b/sc/source/ui/inc/transobj.hxx
@@ -48,6 +48,8 @@ private:
 css::uno::Reference xDragSourceRanges;
 SCCOL   nDragHandleX;
 SCROW   nDragHandleY;
+SCCOL   nSourceCursorX;
+SCROW   nSourceCursorY;
 SCTAB   nVisibleTab;
 sal_uInt16  nDragSourceFlags;
 boolbDragWasInternal;
@@ -82,8 +84,11 @@ public:
 SCROW   GetNonFilteredRows() const { return nNonFiltered; }
 SCCOL   GetDragHandleX() const  { return nDragHandleX; }
 SCROW   GetDragHandleY() const  { return nDragHandleY; }
+boolWasSourceCursorInSelection() const;
+SCCOL   GetSourceCursorX() const  { return nSourceCursorX; }
+SCROW   GetSourceCursorY() const  { return nSourceCursorY; }
 SCTAB   GetVisibleTab() const   { return nVisibleTab; }
-sal_uInt16  GetDragSourceFlags() const  { return 
nDragSourceFlags; }
+sal_uInt16  GetDragSourceFlags() const  { return nDragSourceFlags; 
}
 boolHasFilteredRows() const { return bHasFiltered; }
 boolGetUseInApi() const { return bUseInApi; }
 ScDocShell* GetSourceDocShell();
@@ -92,6 +97,7 @@ public:
 
 voidSetDrawPersist( const SfxObjectShellRef& rRef );
 voidSetDragHandlePos( SCCOL nX, SCROW nY );
+voidSetSourceCursorPos( SCCOL nX, SCROW nY );
 voidSetVisibleTab( SCTAB nNew );
 voidSetDragSource( ScDocShell* pSourceShell, const 
ScMarkData& rMark );
 voidSetDragSourceFlags( sal_uInt16 nFlags );
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 5e46be7..6fb3966 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -4210,8 +4210,18 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* 
pTransObj, SCCOL nDestPos
 {
 pView->MarkRange( aDest, false );
 
-

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

2016-06-20 Thread Vasily Melenchuk
 sw/qa/extras/inc/swmodeltestbase.hxx |   16 +++-
 sw/qa/extras/ww8export/ww8export.cxx |   33 +
 2 files changed, 48 insertions(+), 1 deletion(-)

New commits:
commit ed5dd24cbc5d81ae20a497d02fa968fd7fc7431a
Author: Vasily Melenchuk 
Date:   Fri Jun 17 17:29:08 2016 +0300

Add MS binary format validation in writer export tests

Validation is done with Microsoft Office Binary File Format Validator if it
is enabled. Since currently all doc files are not passing validation, they
are included into validation blacklist.

Change-Id: Ia36c5c9f2248122b13401a6d2834b729dbb75d6c
Reviewed-on: https://gerrit.libreoffice.org/26422
Reviewed-by: Thorsten Behrens 
Tested-by: Thorsten Behrens 

diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx 
b/sw/qa/extras/inc/swmodeltestbase.hxx
index fca647b..8cff2ea 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -644,11 +644,25 @@ protected:
 // too many validation errors right now
 validate(maTempFile.GetFileName(), test::OOXML);
 }
-else if(aFilterName == "writer8")
+else if(aFilterName == "writer8"
+|| aFilterName == "OpenDocument Text Flat XML")
 {
 // still a few validation errors
 validate(maTempFile.GetFileName(), test::ODF);
 }
+else if(aFilterName == "MS Word 97")
+{
+validate(maTempFile.GetFileName(), test::MSBINARY);
+}
+else
+{
+OString aMessage("validation requested, but don't know how to 
validate ");
+aMessage += filename;
+aMessage += " (";
+aMessage += OUStringToOString(aFilterName, 
RTL_TEXTENCODING_UTF8);
+aMessage += ")";
+CPPUNIT_FAIL(aMessage.getStr());
+}
 }
 discardDumpedLayout();
 if (mustCalcLayoutOf(filename))
diff --git a/sw/qa/extras/ww8export/ww8export.cxx 
b/sw/qa/extras/ww8export/ww8export.cxx
index 15dd31a..6ff9590 100644
--- a/sw/qa/extras/ww8export/ww8export.cxx
+++ b/sw/qa/extras/ww8export/ww8export.cxx
@@ -46,6 +46,39 @@ public:
 // If the testcase is stored in some other format, it's pointless to 
test.
 return OString(filename).endsWith(".doc");
 }
+
+/**
+ * Validation handling
+ */
+bool mustValidate(const char* filename) const override
+{
+const std::vector aBlacklist =
+{
+// the following doc exports currently don't pass binary validation
+"tdf56321_flipImage_both.doc",
+"cjklist30.doc",
+"cjklist31.doc",
+"cjklist34.doc",
+"cjklist35.doc",
+"fdo77454.doc",
+"new-page-styles.doc",
+"tdf36117_verticalAdjustment.doc",
+"bnc636128.doc",
+"tdf92281.doc",
+"fdo59530.doc",
+"fdo56513.doc",
+"tscp.doc",
+"zoom.doc",
+"comments-nested.doc",
+"commented-table.doc",
+"zoomtype.doc",
+"n325936.doc",
+"first-header-footer.doc"
+};
+
+// Don't bother with non-.doc files; weed out blacklisted .doc files
+return (OString(filename).endsWith(".doc") && 
std::find(aBlacklist.begin(), aBlacklist.end(), filename) == aBlacklist.end());
+}
 protected:
 bool CjkNumberedListTestHelper(sal_Int16 &nValue)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes25' - 3 commits -

2016-06-20 Thread László Németh
 0 files changed

New commits:
commit 8bdf38b09f505d1182f040951df230e0db798ead
Author: László Németh 
Date:   Tue Jun 21 00:59:44 2016 +0200

empty commit (repeat)

Change-Id: I9a51b7ce1f000a32e01e0060a0ec3ee6ab82ab11
commit bc566871fc12bd2b78531c98d2343a4bace677b6
Author: László Németh 
Date:   Tue Jun 21 00:59:34 2016 +0200

empty commit (repeat)

Change-Id: I6f5f3f9142832018dbae71f0acf277a8bbffccd7
commit c4068a3ccc6828d17bc4ba5fed6061c955b40c62
Author: László Németh 
Date:   Tue Jun 21 00:58:37 2016 +0200

empty commit (orig. but empty doc)

Change-Id: I66c32ca7c6a7bc0d1bbba2ab60fd32459af63cf9
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Vort
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit b65f46127a9a1042edd4198f4a44820d7ea357a6
Author: Vort 
Date:   Fri Jun 17 17:55:08 2016 +0300

tdf#96080 PDF Import: fix incorrect whitespace characters sequence

Change-Id: I0f8e0217cb661be318af611216191def1b209ea1
Reviewed-on: https://gerrit.libreoffice.org/26426
Tested-by: Jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 4282999..5c09619 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -873,6 +873,13 @@ void PDFOutDev::drawChar(GfxState *state, double x, double 
y,
 if( u == nullptr )
 return;
 
+// Fix for tdf#96080
+if (uLen == 4 && u[0] == '\t' && u[1] == '\r' && u[2] == ' ' && u[3] == 
0xA0)
+{
+u += 2;
+uLen = 1;
+}
+
 double csdx = 0.0;
 double csdy = 0.0;
 if (state->getFont()->getWMode())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/dialog-screenshots' - solenv/gbuild

2016-06-20 Thread Katarina Behrens
 solenv/gbuild/CppunitTest.mk |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit b66011433ffc13243eef235300cd86bc65f2c4d7
Author: Katarina Behrens 
Date:   Wed Jun 15 14:07:16 2016 +0200

Unset VCL_HIDE_WINDOWS for the purpose of taking screenshots

those cppunit tests need to run in non-headless mode with dialog
windows exposed (i.e. VCL_HIDE_WINDOWS must not be set)

To preserve the current behaviour (VCL_HIDE_WINDOWS is set always
on Win and Mac, and in use_vcl_non_headless case on Linux), introduce
2 new variables:

gb_CppunitTest_show_windows: unset VCL_HIDE_WINDOWS unconditionally
gb_CppunitTest_hide_windows: set VCL_HIDE_WINDOWS=1 if HEADLESS is empty

(i.e. let's not use emptiness of HEADLESS as an indicator, as it is
empty in 2 mutually exclusive cases)

Change-Id: Ib2f7a9cfb1202944d10856c44b6ac7c41156b333

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 5ab32ca..ff60649 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -95,6 +95,8 @@ $(call gb_CppunitTest_get_clean_target,%) :
 $(call gb_CppunitTest_get_target,%) :| $(gb_CppunitTest_RUNTIMEDEPS)
$(call gb_Output_announce,$*,$(true),CUT,2)
$(call gb_Helper_abbreviate_dirs,\
+   $(if $(gb_CppunitTest_vcl_hide_windows),VCL_HIDE_WINDOWS=1 && ) 
\
+   $(if $(gb_CppunitTest_vcl_show_windows),unset VCL_HIDE_WINDOWS 
&& ) \
mkdir -p $(dir $@) && \
rm -fr $@.user && mkdir $@.user && \
$(if $(gb_CppunitTest__use_confpreinit), \
@@ -105,7 +107,6 @@ $(call gb_CppunitTest_get_target,%) :| 
$(gb_CppunitTest_RUNTIMEDEPS)
($(gb_CppunitTest_CPPTESTPRECOMMAND) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
$(if 
$(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
-   $(if $(HEADLESS),,VCL_HIDE_WINDOWS=1) \
$(gb_CppunitTest_malloc_check) \
$(if $(strip $(PYTHON_URE)),\
PYTHONDONTWRITEBYTECODE=1) \
@@ -206,6 +207,14 @@ endef
 
 define gb_CppunitTest_use_vcl_non_headless
 $(call gb_CppunitTest_get_target,$(1)) : HEADLESS :=
+$(call gb_CppunitTest_get_target,$(1)) : gb_CppunitTest_vcl_hide_windows := 
$(true)
+$(call gb_CppunitTest__use_vcl,$(1),$(false))
+
+endef
+
+define gb_CppunitTest_use_vcl_non_headless_with_windows
+$(call gb_CppunitTest_get_target,$(1)) : HEADLESS :=
+$(call gb_CppunitTest_get_target,$(1)) : gb_CppunitTest_vcl_show_windows := 
$(true)
 $(call gb_CppunitTest__use_vcl,$(1),$(false))
 
 endef
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: setup_native/scripts setup_native/source solenv/bin

2016-06-20 Thread Christian Lohmaier
 setup_native/scripts/osx_install_languagepack.applescript |8 ++
 setup_native/source/mac/Info.plist.langpack   |2 -
 solenv/bin/modules/installer/simplepackage.pm |   18 ++
 3 files changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 78c7929ac4f03d90e956cc1052208c646feaabf3
Author: Christian Lohmaier 
Date:   Mon Jun 20 21:55:08 2016 +0200

tdf#89657 sign Mac languagepack installer and force-start-close LO

starting LO once satisfies Gatekeeper's verification, even when the
langaugepack's content are added afterwards

Change-Id: Ie548df39a7ec07cc485c40148e4ca75101346798

diff --git a/setup_native/scripts/osx_install_languagepack.applescript 
b/setup_native/scripts/osx_install_languagepack.applescript
index cbd7743..49c8e54 100644
--- a/setup_native/scripts/osx_install_languagepack.applescript
+++ b/setup_native/scripts/osx_install_languagepack.applescript
@@ -143,6 +143,14 @@ end if
 -- touch extensions folder to have LO register bundled dictionaries
 set tarCommand to "/usr/bin/tar -C " & quoted form of (choice as string) & " 
-xjf " & quoted form of sourcedir & "/tarball.tar.bz2 && touch " & quoted form 
of (choice as string) & "/Contents/Resources/extensions"
 try
+   (* A start of unchanged LO must take place so Gatekeeper will verify
+  the signature prior to installing the languagepack
+   *)
+   if application choice is not running then
+   -- this will flash the startcenter once...
+   tell application choice to activate
+   tell application choice to quit
+   end if
do shell script tarCommand

 on error errMSG number errNUM
diff --git a/setup_native/source/mac/Info.plist.langpack 
b/setup_native/source/mac/Info.plist.langpack
index 372e645e..361a4b4 100644
--- a/setup_native/source/mac/Info.plist.langpack
+++ b/setup_native/source/mac/Info.plist.langpack
@@ -35,7 +35,7 @@
CFBundleShortVersionString
9
CFBundleIdentifier
-   ${BUNDLEIDENTIFIER}
+   [BUNDLEIDENTIFIER].langpack
CFBundleInfoDictionaryVersion
6.0
CFBundleName
diff --git a/solenv/bin/modules/installer/simplepackage.pm 
b/solenv/bin/modules/installer/simplepackage.pm
index ac33798..95ccfe7 100644
--- a/solenv/bin/modules/installer/simplepackage.pm
+++ b/solenv/bin/modules/installer/simplepackage.pm
@@ -379,19 +379,27 @@ sub create_package
 $destfile = $subdir . "/" . $iconfile;
 installer::systemactions::copy_one_file($iconfileref, $destfile);
 
-my $installname = "Info.plist";
 my $infoplistfile = $ENV{'SRCDIR'} . 
"/setup_native/source/mac/Info.plist.langpack";
 if (! -f $infoplistfile) { installer::exiter::exit_program("ERROR: 
Could not find Apple script Info.plist: $infoplistfile!", "create_package"); }
-$destfile = $contentsfolder . "/" . $installname;
-installer::systemactions::copy_one_file($infoplistfile, $destfile);
-
+$destfile = "$contentsfolder/Info.plist";
 # Replacing variables in Info.plist
-$scriptfilecontent = installer::files::read_file($destfile);
+$scriptfilecontent = installer::files::read_file($infoplistfile);
 # replace_one_variable_in_shellscript($scriptfilecontent, 
$volume_name, "FULLPRODUCTNAME" );
 replace_one_variable_in_shellscript($scriptfilecontent, 
$volume_name_classic_app, "FULLAPPPRODUCTNAME" ); # OpenOffice.org Language Pack
+replace_one_variable_in_shellscript($scriptfilecontent, 
$ENV{'MACOSX_BUNDLE_IDENTIFIER'}, "BUNDLEIDENTIFIER" );
 installer::files::save_file($destfile, $scriptfilecontent);
 
 chdir $localfrom;
+
+if ( defined($ENV{'MACOSX_CODESIGNING_IDENTITY'}) && 
$ENV{'MACOSX_CODESIGNING_IDENTITY'} ne "" ) {
+my @lp_sign = ('codesign', '--verbose', '--sign', 
$ENV{'MACOSX_CODESIGNING_IDENTITY'}, '--deep', $appfolder);
+if (system(@lp_sign) == 0) {
+$infoline = "Success: \"@lp_sign\" executed 
successfully!\n";
+} else {
+$infoline = "ERROR: Could not codesign the languagepack 
using \"@lp_sign\"!\n";
+}
+push( @installer::globals::logfileinfo, $infoline);
+}
 }
 elsif ($volume_name_classic_app eq 'LibreOffice' || 
$volume_name_classic_app eq 'LibreOfficeDev')
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Zoner Draw import, Week 4 report

2016-06-20 Thread Alex P
During this week I implemented transparency, shadows, groups and (after
curves format was fully reverse engineered with help of my mentor)
combinations of shapes in libzmf.

http://i.imgur.com/BCMkFUl.png
http://i.imgur.com/aCamfTZ.png
http://i.imgur.com/ZIbyibD.png

Also during the second half of this week my mentor and I did a lot of
reverse engineering (curves, text, tables, polygons, pen advanced
styles/arrows, internal bitmap format, layer and document settings, ...),
so I think all or almost all important parts of ZMF4-5 format are currently
known, mostly the implementation left.
https://github.com/renyxa/re-lab/commits/master
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - vcl/opengl

2016-06-20 Thread Markus Mohrhard
 vcl/opengl/win/WinDeviceInfo.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 97b0b8c1f7310c3ca85229a9455decf35e08811f
Author: Markus Mohrhard 
Date:   Fri Jun 17 21:44:49 2016 +0200

add some OpenGL info to the crash reporter

Change-Id: Id377bc3bd814fad822d577603b1f147b71ad9ae2
Reviewed-on: https://gerrit.libreoffice.org/26445
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 
(cherry picked from commit 55bd0ac154a7118f7cce48ffd1e44a48d9099413)
Reviewed-on: https://gerrit.libreoffice.org/26517

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index e9278b1..b2d5bff 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -521,8 +521,10 @@ void writeToLog(SvStream& rStrm, const char* pKey, const 
OUString rVal)
 
 bool WinOpenGLDeviceInfo::isDeviceBlocked()
 {
-// CrashReporter::AddKeyAndValue("AdapterVendorId", maAdapterVendorID);
-// CrashReporter::AddKeyAndValue("AdapterDeviceId", maAdapterDeviceID);
+CrashReporter::AddKeyValue("OpenGLVendor", maAdapterVendorID);
+CrashReporter::AddKeyValue("OpenGLDevice", maAdapterDeviceID);
+CrashReporter::AddKeyValue("OpenGLDriver", maDriverVersion);
+
 SAL_INFO("vcl.opengl", maDriverVersion);
 SAL_INFO("vcl.opengl", maDriverDate);
 SAL_INFO("vcl.opengl", maDeviceID);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Weekly Report #4 - Toolbars infrastructure via .ui files

2016-06-20 Thread Szymon Kłos
Hello,

This is my next weekly report.

This week finally, after modifying SvxLRSpaceItem's QueryValue and
PutValue methods, paragraph spacing controls are working using normal
sfx2 mechanism.

I've also removed timer from my second patch (Slide transition panel)
and added possibility to change icon size in the SidebarToolBox. I will
continue work with icon size after Design meeting when we will know
which solution is the best.

Currently I'm working on context dependent controls. I've extended vcl
builder to parse 'style classes' (where we can add values like 'context
-table') and set suitable value to the widget. In the similiar way I
will be able to add priority support.

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


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

2016-06-20 Thread Arnaud Versini
 ucb/source/regexp/regexp.cxx |   10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 7e5b36af8c524671a30b91dd2323d812686aca2c
Author: Arnaud Versini 
Date:   Sun Jun 12 20:54:33 2016 +0200

UCB: Simplify ucb_impl::Regexp rtl/character.hxx usage.

Change-Id: I2298732602ad6f5acc040673f550040802ec580c
Reviewed-on: https://gerrit.libreoffice.org/26328
Tested-by: Jenkins 
Reviewed-by: Arnaud Versini 

diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index fae2aee..28e5940 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -67,13 +67,7 @@ bool matchStringIgnoreCase(sal_Unicode const ** pBegin,
 
 while (q != qEnd)
 {
-sal_Unicode c1 = *p++;
-sal_Unicode c2 = *q++;
-if (c1 >= 'a' && c1 <= 'z')
-c1 -= 'a' - 'A';
-if (c2 >= 'a' && c2 <= 'z')
-c2 -= 'a' - 'A';
-if (c1 != c2)
+if (rtl::compareIgnoreAsciiCase(*p++, *q++) != 0)
 return false;
 }
 
@@ -183,7 +177,7 @@ bool isScheme(OUString const & rString, bool bColon)
 if (p == pEnd)
 return !bColon;
 sal_Unicode c = *p++;
-if (!(rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c)
+if (!(rtl::isAsciiAlphanumeric(c)
   || c == '+' || c == '-' || c == '.'))
 return bColon && c == ':' && p == pEnd;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Mike Saunders
 svx/uiconfig/ui/crashreportdlg.ui |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit fe63bcdf700e4fe5c3c3ed8721f9748ecb7aaf34
Author: Mike Saunders 
Date:   Mon Jun 20 19:13:44 2016 +0200

improve wording for crash report dialog a bit

Change-Id: Ibf27d45d9a9a0dd57a82fdf9c44f4017a43d953a
Reviewed-on: https://gerrit.libreoffice.org/26525
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/svx/uiconfig/ui/crashreportdlg.ui 
b/svx/uiconfig/ui/crashreportdlg.ui
index 240b334..39c6a34 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -69,9 +69,9 @@
   
 True
 False
-We are sorry but it 
seems that %PRODUCTNAME crashed the last time.
+Unfortunately it seems 
that %PRODUCTNAME crashed when it was last run.
 
-You can help us fix this issue by sending the crash report to the %PRODUCTNAME 
crash reporting server.
+You can help us to fix this issue by sending an anonymous crash report to the 
%PRODUCTNAME crash reporting server.
 True
   
   
@@ -86,7 +86,7 @@ You can help us fix this issue by sending the crash report to 
the %PRODUCTNAME c
 center
 0
 The crash report was 
successfully uploaded.
-You can soon find the report on:
+You can soon find the report at:
 crashreport.libreoffice.org/stats/crash_details/%CRASHID
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/commonsallayout' - vcl/headless vcl/inc vcl/source vcl/unx

2016-06-20 Thread Akash Jain
 vcl/headless/svptext.cxx |5 
 vcl/inc/CommonSalLayout.hxx  |5 
 vcl/inc/headless/svpgdi.hxx  |2 
 vcl/inc/salgdi.hxx   |2 
 vcl/inc/textrender.hxx   |2 
 vcl/inc/unx/cairotextrender.hxx  |2 
 vcl/inc/unx/genpspgraphics.h |1 
 vcl/inc/unx/salgdi.h |2 
 vcl/source/gdi/CommonSalLayout.cxx   |   25 ++--
 vcl/unx/generic/gdi/cairotextrender.cxx  |  176 +++
 vcl/unx/generic/gdi/font.cxx |4 
 vcl/unx/generic/print/genpspgraphics.cxx |5 
 12 files changed, 222 insertions(+), 9 deletions(-)

New commits:
commit 38c7eb826d47e37f751ff58c0d880e91a00e3141
Author: Akash Jain 
Date:   Mon Jun 20 23:49:53 2016 +0530

Integrate CommonSalLayout in unx/ code path

Change-Id: I7591d4b159d2d92027dba162b5752468cb69e7a7

diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index e8fd525..c4bf42c 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -121,6 +121,11 @@ void SvpSalGraphics::DrawServerFontLayout( const 
ServerFontLayout& rSalLayout )
 m_aTextRenderImpl.DrawServerFontLayout(rSalLayout );
 }
 
+void SvpSalGraphics::DrawCommonSalLayout( const CommonSalLayout& rSalLayout )
+{
+m_aTextRenderImpl.DrawCommonSalLayout( rSalLayout );
+}
+
 void SvpSalGraphics::SetTextColor( SalColor nSalColor )
 {
 m_aTextRenderImpl.SetTextColor(nSalColor);
diff --git a/vcl/inc/CommonSalLayout.hxx b/vcl/inc/CommonSalLayout.hxx
index 0d941f9..6d6d19e 100755
--- a/vcl/inc/CommonSalLayout.hxx
+++ b/vcl/inc/CommonSalLayout.hxx
@@ -36,6 +36,9 @@ class CommonSalLayout : public GenericSalLayout
 css::uno::Reference mxBreak;
 #ifdef _WIN32
 HDC mhDC;
+#elif defined(MACOSX) || defined(IOS)
+#else
+ServerFont& mrServerFont;
 #endif
 
 public:
@@ -45,7 +48,9 @@ public:
 explicitCommonSalLayout(const CoreTextStyle*);
 #else
 explicitCommonSalLayout(ServerFont&);
+ServerFont& GetServerFont() const {return mrServerFont;}
 #endif
+
 virtual ~CommonSalLayout();
 voidSetNeedFallback(ImplLayoutArgs&, sal_Int32, bool);
 voidAdjustLayout(ImplLayoutArgs&) override;
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index dc88a60..626aab9 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -46,6 +46,7 @@
 struct BitmapBuffer;
 class GlyphCache;
 class ServerFont;
+class CommonSalLayout;
 typedef struct _cairo cairo_t;
 typedef struct _cairo_surface cairo_surface_t;
 typedef struct _cairo_user_data_key cairo_user_data_key_t;
@@ -153,6 +154,7 @@ public:
 virtual boolGetGlyphOutline( sal_GlyphId nIndex, 
basegfx::B2DPolyPolygon& ) override;
 virtual SalLayout*  GetTextLayout( ImplLayoutArgs&, int nFallbackLevel 
) override;
 virtual voidDrawServerFontLayout( const ServerFontLayout& ) 
override;
+virtual voidDrawCommonSalLayout( const CommonSalLayout& ) 
override;
 virtual boolsupportsOperation( OutDevSupportType ) const 
override;
 virtual voiddrawPixel( long nX, long nY ) override;
 virtual voiddrawPixel( long nX, long nY, SalColor nSalColor ) 
override;
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 56fe42d..79ea307 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -44,6 +44,7 @@ class FontSubsetInfo;
 class OpenGLContext;
 class OutputDevice;
 class ServerFontLayout;
+class CommonSalLayout;
 struct SystemGraphicsData;
 
 #if ENABLE_CAIRO_CANVAS
@@ -218,6 +219,7 @@ public:
 
 virtual SalLayout*  GetTextLayout( ImplLayoutArgs&, int 
nFallbackLevel ) = 0;
 virtual voidDrawServerFontLayout( const ServerFontLayout& 
) = 0;
+virtual voidDrawCommonSalLayout( const CommonSalLayout& ) 
= 0;
 
 virtual boolsupportsOperation( OutDevSupportType ) const = 
0;
 
diff --git a/vcl/inc/textrender.hxx b/vcl/inc/textrender.hxx
index e08274e..1f49591 100644
--- a/vcl/inc/textrender.hxx
+++ b/vcl/inc/textrender.hxx
@@ -27,6 +27,7 @@
 class ImplLayoutArgs;
 class ImplFontMetricData;
 class ServerFontLayout;
+class CommonSalLayout;
 class PhysicalFontCollection;
 class PhysicalFontFace;
 
@@ -72,6 +73,7 @@ public:
 virtual boolGetGlyphOutline( sal_GlyphId nIndex, 
basegfx::B2DPolyPolygon& ) = 0;
 virtual SalLayout*  GetTextLayout( ImplLayoutArgs&, int 
nFallbackLevel ) = 0;
 virtual voidDrawServerFontLayout( const 
ServerFontLayout& ) = 0;
+virtual voidDrawCommonSalLayout( const 
CommonSalLayout& ) = 0;
 #if ENABLE_CAIRO_CANVAS
 virtual SystemFontData  GetSysFontData( int nFallbackLevel ) const 
= 0;
 #endif // ENABLE_CAIRO_CANVAS
diff --git a/vcl/inc/unx/cairotextr

[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - svx/uiconfig

2016-06-20 Thread Mike Saunders
 svx/uiconfig/ui/crashreportdlg.ui |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 31e4b88f4bf13cc58ba499c0f97b6c88e079558e
Author: Mike Saunders 
Date:   Mon Jun 20 19:13:44 2016 +0200

improve wording for crash report dialog a bit

Change-Id: Ibf27d45d9a9a0dd57a82fdf9c44f4017a43d953a
Reviewed-on: https://gerrit.libreoffice.org/26524
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/svx/uiconfig/ui/crashreportdlg.ui 
b/svx/uiconfig/ui/crashreportdlg.ui
index 240b334..39c6a34 100644
--- a/svx/uiconfig/ui/crashreportdlg.ui
+++ b/svx/uiconfig/ui/crashreportdlg.ui
@@ -69,9 +69,9 @@
   
 True
 False
-We are sorry but it 
seems that %PRODUCTNAME crashed the last time.
+Unfortunately it seems 
that %PRODUCTNAME crashed when it was last run.
 
-You can help us fix this issue by sending the crash report to the %PRODUCTNAME 
crash reporting server.
+You can help us to fix this issue by sending an anonymous crash report to the 
%PRODUCTNAME crash reporting server.
 True
   
   
@@ -86,7 +86,7 @@ You can help us fix this issue by sending the crash report to 
the %PRODUCTNAME c
 center
 0
 The crash report was 
successfully uploaded.
-You can soon find the report on:
+You can soon find the report at:
 crashreport.libreoffice.org/stats/crash_details/%CRASHID
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Week 4

2016-06-20 Thread Akash Jain
Dear Community,

During the 4th week I have continued to integrate the new class in the
current code base. Integration with current unix code path is almost
complete and can be enabled by setting an env var. I will continue to
integrate the new class on other platforms.

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


Re: LibreOffice fails to link when built with recent clang

2016-06-20 Thread Davide Italiano
On Mon, Jun 20, 2016 at 1:21 AM, Stephan Bergmann  wrote:
> On 06/20/2016 10:19 AM, Stephan Bergmann wrote:
>>
>> You need the patches from  "[GCC]
>> PR23529 Sema part of attrbute abi_tag support" and
>>  "[GCC] PR23529 Mangler part of attrbute
>> abi_tag support" to make Clang support the abi_tag attribute.
>
>
> (The first one is closed for a while now, so you should already have it
> included in your trunk Clang sources.)

That fixed my problem, thanks! (looking forward to see that patch or a
variation of it committed to clang).

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


GSoC Week 4 Report

2016-06-20 Thread Rosemary Sebastian
Hello everyone

This week I implemented the export of the start and the end positions of a
redline within a paragraph and based on this, also the change type, i.e.,
"text" or "paragraph".
Currently I'm trying to make sure that paragraph styles such as outline
level are also exported.during addition or deletion of a paragraph. I also
need to look into the boundary cases while exporting the change type.

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


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

2016-06-20 Thread Miklos Vajna
 libreofficekit/source/gtk/lokdocview.cxx |   59 ++-
 1 file changed, 58 insertions(+), 1 deletion(-)

New commits:
commit ada901d2c412f8a1b1ae668e883114ccb9c69277
Author: Miklos Vajna 
Date:   Mon Jun 20 17:14:30 2016 +0200

lokdocview: handle LOK_CALLBACK_INVALIDATE_VIEW_CURSOR

It's similar to the normal cursor, but it's colored and does not blink.

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

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index d4ca4a9..90f01d9 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -72,6 +72,9 @@ struct LOKDocViewPrivateImpl
 gint m_nParts;
 /// Position and size of the visible cursor.
 GdkRectangle m_aVisibleCursor;
+/// Position and size of the view cursors. The current view can only see
+/// them, can't modify them. Key is the view id.
+std::map m_aViewCursors;
 /// Cursor overlay is visible or hidden (for blinking).
 gboolean m_bCursorOverlayVisible;
 /// Cursor is visible or hidden (e.g. for graphic selection).
@@ -1031,6 +1034,7 @@ callback (gpointer pData)
   priv->m_aVisibleCursor.y,
   priv->m_aVisibleCursor.width,
   priv->m_aVisibleCursor.height);
+std::cerr << "debug, LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR: i am " << 
priv->m_nViewId << ", i got " << pCallback->m_aPayload << " for myself" << 
std::endl;
 gtk_widget_queue_draw(GTK_WIDGET(pDocView));
 }
 break;
@@ -1162,7 +1166,13 @@ callback (gpointer pData)
 }
 case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
 {
-// TODO: Implement me
+std::stringstream aStream(pCallback->m_aPayload);
+boost::property_tree::ptree aTree;
+boost::property_tree::read_json(aStream, aTree);
+std::uintptr_t nViewId = aTree.get("viewId");
+const std::string& rRectangle = aTree.get("rectangle");
+priv->m_aViewCursors[nViewId] = payloadToRectangle(pDocView, 
rRectangle.c_str());
+gtk_widget_queue_draw(GTK_WIDGET(pDocView));
 break;
 }
 default:
@@ -1402,6 +1412,32 @@ renderDocument(LOKDocView* pDocView, cairo_t* pCairo)
 return FALSE;
 }
 
+static const GdkRGBA& getDarkColor(std::uintptr_t nViewId)
+{
+static std::map aColorMap;
+auto it = aColorMap.find(nViewId);
+if (it != aColorMap.end())
+return it->second;
+
+// Based on tools/colordata.hxx, COL_AUTHOR1_DARK..COL_AUTHOR9_DARK.
+static std::vector aColors =
+{
+{((double)198)/255, ((double)146)/255, ((double)0)/255, 0},
+{((double)6)/255, ((double)70)/255, ((double)162)/255, 0},
+{((double)87)/255, ((double)157)/255, ((double)28)/255, 0},
+{((double)105)/255, ((double)43)/255, ((double)157)/255, 0},
+{((double)197)/255, ((double)0)/255, ((double)11)/255, 0},
+{((double)0)/255, ((double)128)/255, ((double)128)/255, 0},
+{((double)140)/255, ((double)132)/255, ((double)0)/255, 0},
+{((double)43)/255, ((double)85)/255, ((double)107)/255, 0},
+{((double)209)/255, ((double)118)/255, ((double)0)/255, 0},
+};
+static int nColorCounter = 0;
+GdkRGBA aColor = aColors[nColorCounter++ % aColors.size()];
+aColorMap[nViewId] = aColor;
+return aColorMap[nViewId];
+}
+
 static gboolean
 renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 {
@@ -1422,6 +1458,27 @@ renderOverlay(LOKDocView* pDocView, cairo_t* pCairo)
 cairo_fill(pCairo);
 }
 
+// View cursors: they do not blink and are colored.
+if (priv->m_bEdit && !priv->m_aViewCursors.empty())
+{
+for (auto& rPair : priv->m_aViewCursors)
+{
+GdkRectangle& rCursor = rPair.second;
+if (rCursor.width < 30)
+// Set a minimal width if it would be 0.
+rCursor.width = 30;
+
+const GdkRGBA& rDark = getDarkColor(priv->m_nViewId);
+cairo_set_source_rgb(pCairo, rDark.red, rDark.green, rDark.blue);
+cairo_rectangle(pCairo,
+twipToPixel(rCursor.x, priv->m_fZoom),
+twipToPixel(rCursor.y, priv->m_fZoom),
+twipToPixel(rCursor.width, priv->m_fZoom),
+twipToPixel(rCursor.height, priv->m_fZoom));
+cairo_fill(pCairo);
+}
+}
+
 if (priv->m_bEdit && priv->m_bCursorVisible && 
!isEmptyRectangle(priv->m_aVisibleCursor) && 
priv->m_aTextSelectionRectangles.empty())
 {
 // Have a cursor, but no selection: we need the middle handle.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/lib

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

2016-06-20 Thread Stephan Bergmann
 include/comphelper/property.hxx |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 92712332f32988e7827520f3480aaef9dfd5804a
Author: Stephan Bergmann 
Date:   Mon Jun 20 18:21:27 2016 +0200

Restrict tryPropertyValueEnum to enum types

Change-Id: I54a6fdc341185fe4bdb9cc7d1b1a1feb0737bf47

diff --git a/include/comphelper/property.hxx b/include/comphelper/property.hxx
index 74c3183..a4171fd 100644
--- a/include/comphelper/property.hxx
+++ b/include/comphelper/property.hxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -95,12 +96,9 @@ bool tryPropertyValue(css::uno::Any& 
/*out*/_rConvertedValue, css::uno::Any& /*o
 @exception  InvalidArgumentException thrown if the value could not be 
converted to the requested type (which is the template argument)
 */
 template 
-bool tryPropertyValueEnum(css::uno::Any& /*out*/_rConvertedValue, 
css::uno::Any& /*out*/_rOldValue, const css::uno::Any& _rValueToSet, const 
ENUMTYPE& _rCurrentValue)
+typename std::enable_if::value, bool>::type
+tryPropertyValueEnum(css::uno::Any& /*out*/_rConvertedValue, css::uno::Any& 
/*out*/_rOldValue, const css::uno::Any& _rValueToSet, const ENUMTYPE& 
_rCurrentValue)
 {
-if (cppu::getTypeFavourUnsigned(&_rCurrentValue).getTypeClass()
-!= css::uno::TypeClass_ENUM)
-return tryPropertyValue(_rConvertedValue, _rOldValue, _rValueToSet, 
_rCurrentValue);
-
 bool bModified(false);
 ENUMTYPE aNewValue;
 ::cppu::any2enum(aNewValue, _rValueToSet);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: forms/source framework/source include/comphelper sd/source

2016-06-20 Thread Stephan Bergmann
 forms/source/inc/property.hxx |1 -
 framework/source/services/frame.cxx   |1 -
 include/comphelper/propstate.hxx  |1 -
 sd/source/filter/eppt/epptso.cxx  |1 -
 sd/source/ui/slidesorter/shell/SlideSorterService.cxx |1 -
 sd/source/ui/unoidl/SdUnoDrawView.cxx |1 -
 sd/source/ui/unoidl/SdUnoOutlineView.cxx  |1 -
 7 files changed, 7 deletions(-)

New commits:
commit 033517b4e6dfb648678500b23ebe5cd54bee9001
Author: Stephan Bergmann 
Date:   Mon Jun 20 18:18:45 2016 +0200

Remove unused includes

Change-Id: I25bb67449c8c572075d354e62b1c731e95655b4f

diff --git a/forms/source/inc/property.hxx b/forms/source/inc/property.hxx
index 062e321..202d449 100644
--- a/forms/source/inc/property.hxx
+++ b/forms/source/inc/property.hxx
@@ -28,7 +28,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/framework/source/services/frame.cxx 
b/framework/source/services/frame.cxx
index 1dbd723..2588e9f 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -71,7 +71,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/include/comphelper/propstate.hxx b/include/comphelper/propstate.hxx
index aa3b50e..a06296f 100644
--- a/include/comphelper/propstate.hxx
+++ b/include/comphelper/propstate.hxx
@@ -25,7 +25,6 @@
 
 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 478d89a..4a3555a 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -67,7 +67,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx 
b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
index 129d2fd..dbfc6b0 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterService.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
diff --git a/sd/source/ui/unoidl/SdUnoDrawView.cxx 
b/sd/source/ui/unoidl/SdUnoDrawView.cxx
index 5a0207637..820e77c 100644
--- a/sd/source/ui/unoidl/SdUnoDrawView.cxx
+++ b/sd/source/ui/unoidl/SdUnoDrawView.cxx
@@ -30,7 +30,6 @@
 #include "pres.hxx"
 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx 
b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
index 1be0bdb..cf97b61 100644
--- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx
+++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx
@@ -24,7 +24,6 @@
 #include "sdpage.hxx"
 #include "unopage.hxx"
 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Stephan Bergmann
 sd/source/filter/eppt/pptexsoundcollection.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 978e7b03f8c966ec23b6781d67f612e4665a09f7
Author: Stephan Bergmann 
Date:   Mon Jun 20 18:17:59 2016 +0200

This code unlikely wants conversion from UNO Bool or Char Anys

...which would be the main difference with convertPropertyValue, in 
addition to throwing an
exception upon failure that would be caught directly by the surrounding 
try-catch block

Change-Id: I960e23b797c71be655c4059125effade84d0630c

diff --git a/sd/source/filter/eppt/pptexsoundcollection.cxx 
b/sd/source/filter/eppt/pptexsoundcollection.cxx
index 5475c5e..2027ff3 100644
--- a/sd/source/filter/eppt/pptexsoundcollection.cxx
+++ b/sd/source/filter/eppt/pptexsoundcollection.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 namespace ppt
@@ -39,7 +38,7 @@ ExSoundEntry::ExSoundEntry(const OUString& rString)
 css::uno::Reference< css::ucb::XCommandEnvironment >(),
 comphelper::getProcessComponentContext() );
 sal_Int64 nVal = 0;
-::cppu::convertPropertyValue( nVal, aCnt.getPropertyValue("Size") );
+aCnt.getPropertyValue("Size") >>= nVal;
 nFileSize = (sal_uInt32)nVal;
 }
 catch( css::uno::Exception& )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - comphelper/CppunitTest_comphelper_threadpool_test.mk comphelper/Module_comphelper.mk comphelper/qa comphelper/source include/comphelper packa

2016-06-20 Thread Ashod Nakashian
 comphelper/CppunitTest_comphelper_threadpool_test.mk |   30 ++
 comphelper/Module_comphelper.mk  |1 
 comphelper/qa/unit/threadpooltest.cxx|   55 +++
 comphelper/source/misc/threadpool.cxx|   26 
 include/comphelper/threadpool.hxx|6 ++
 package/source/zippackage/ZipPackageStream.cxx   |2 
 sc/source/filter/excel/xetable.cxx   |2 
 sc/source/filter/oox/workbookfragment.cxx|2 
 solenv/gbuild/CppunitTest.mk |3 +
 9 files changed, 122 insertions(+), 5 deletions(-)

New commits:
commit 197c1dacd5725db8ab2faf0aa9b39a2655eb4940
Author: Ashod Nakashian 
Date:   Tue Jun 14 07:19:20 2016 -0400

tdf#98955 hardware_concurrency not ideal for thread pools

A new static member getPreferredConcurrency added to
comphelper::ThreadPool to return a configurable max
number of threads.

By default the new function returns the hardware_concurrency
value provided by std::thread. When MAX_CONCURRENCY envar is
defined, the return value is limited to whatever is set there.

Three call-sites that used std::thread::hardware_concurrency
have been replaced with getPreferredConcurrency.

Unittests added to cover the functionality of the new member.

Unittests are capped to 4 threads.

Reviewed-on: https://gerrit.libreoffice.org/26254
Tested-by: Jenkins 
Reviewed-by: Ashod Nakashian 
(cherry picked from commit 60e75fb276778459f6055360646d879b8c615d83)

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

diff --git a/comphelper/CppunitTest_comphelper_threadpool_test.mk 
b/comphelper/CppunitTest_comphelper_threadpool_test.mk
new file mode 100644
index 000..aa4e0f0
--- /dev/null
+++ b/comphelper/CppunitTest_comphelper_threadpool_test.mk
@@ -0,0 +1,30 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,comphelper_threadpool_test))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,comphelper_threadpool_test, 
\
+comphelper/qa/unit/threadpooltest \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,comphelper_threadpool_test,\
+   boost_headers \
+))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_threadpool_test))
+
+$(eval $(call gb_CppunitTest_use_libraries,comphelper_threadpool_test, \
+comphelper \
+cppuhelper \
+cppu \
+sal \
+   $(gb_UWINAPI) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/comphelper/Module_comphelper.mk b/comphelper/Module_comphelper.mk
index acd50c6..f89626c 100644
--- a/comphelper/Module_comphelper.mk
+++ b/comphelper/Module_comphelper.mk
@@ -28,6 +28,7 @@ $(eval $(call 
gb_Module_add_subsequentcheck_targets,comphelper,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,comphelper,\
+CppunitTest_comphelper_threadpool_test \
 CppunitTest_comphelper_syntaxhighlight_test \
 CppunitTest_comphelper_variadictemplates_test \
 CppunitTest_comphelper_test \
diff --git a/comphelper/qa/unit/threadpooltest.cxx 
b/comphelper/qa/unit/threadpooltest.cxx
new file mode 100644
index 000..d71a111
--- /dev/null
+++ b/comphelper/qa/unit/threadpooltest.cxx
@@ -0,0 +1,55 @@
+/* -*- 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 "cppunit/TestAssert.h"
+#include "cppunit/TestFixture.h"
+#include "cppunit/extensions/HelperMacros.h"
+#include "cppunit/plugin/TestPlugIn.h"
+
+#include 
+#include 
+
+class ThreadPoolTest : public CppUnit::TestFixture
+{
+public:
+void testPreferredConcurrency();
+
+CPPUNIT_TEST_SUITE(ThreadPoolTest);
+CPPUNIT_TEST(testPreferredConcurrency);
+CPPUNIT_TEST_SUITE_END();
+};
+
+void ThreadPoolTest::testPreferredConcurrency() {
+
+// Check default.
+auto nThreads = comphelper::ThreadPool::getPreferredConcurrency();
+sal_Int32 nExpected = 4; // UTs are capped to 4.
+CPPUNIT_ASSERT_MESSAGE("Expected no more than 4 threads", nExpected >= 
nThreads);
+
+#ifndef _WIN32_WINNT
+// The result should be cached, so this should change anything.
+nThreads = std::thread::hardware_concurrency() * 2;
+setenv("MAX_CONCURRENCY", std::to_string(nThreads).c_str(), true);
+nThreads = co

[Libreoffice-commits] core.git: Branch 'feature/fixes25' -

2016-06-20 Thread László Németh
 0 files changed

New commits:
commit 43a22925499a17a245a83253c8160228d2399191
Author: László Németh 
Date:   Mon Jun 20 18:15:50 2016 +0200

empty commit (repeat)

Change-Id: I2e5f94a126df075198df247377ed9df46915b5c0
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Jochen Nitschke
 vcl/source/app/help.cxx   |1 -
 vcl/source/control/button.cxx |4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7dddccdcec91d8136d95469f4e607ce0829bde65
Author: Jochen Nitschke 
Date:   Mon Jun 20 15:51:55 2016 +0200

reduce warnings in vcl

pHelpWin is always false,
array sizes can be checked at compile time

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

diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 877d1b5..28bc632 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -539,7 +539,6 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 
nHelpWinStyle, QuickHe
 )
 nDelayMode = HELPDELAY_NONE;
 
-SAL_WARN_IF( pHelpWin, "vcl", "Noch ein HelpWin ?!" );
 pHelpWin = VclPtr::Create( pParent, rHelpText, 
nHelpWinStyle, nStyle );
 pSVData->maHelpData.mpHelpWin = pHelpWin;
 pHelpWin->SetStatusText( rStatusText );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e427370..0e4dc5b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2792,10 +2792,10 @@ static void LoadThemedImageList (const StyleSettings 
&rStyleSettings,
 aColorAry2[5] = rStyleSettings.GetWindowTextColor();
 
 Color aMaskColor(0x00, 0x00, 0xFF );
-SAL_WARN_IF( sizeof(aColorAry1) != sizeof(aColorAry2), "vcl", 
"aColorAry1 must match aColorAry2" );
+static_assert( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must 
match aColorAry2" );
 // FIXME: do we want the mask for the checkbox ?
 pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
-aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
+aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1));
 }
 
 Image RadioButton::GetRadioImage( const AllSettings& rSettings, 
DrawButtonFlags nFlags )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'feature/fixes25'

2016-06-20 Thread David Tardon
New branch 'feature/fixes25' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


"make clean" needed with Windows on master

2016-06-20 Thread Stephan Bergmann
...after 
 
"switch to EHs on windows" (unless you explicitly --disable-pch)

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


GSoC Weekly Report #4 - Table Styles

2016-06-20 Thread Jakub Trzebiatowski

Dear Community,

This was the fourth week. This week I was working on:

- Implemented isInUse() and isUserDefined() for table styles and cell 
styles.

  This was required for a correct export.
  + https://gerrit.libreoffice.org/#/c/26366/

- Expanded table styles by table:first-row-end-column,
  table:first-row-start-column, table:last-row-end-column,
  table:last-row-start-column properties.
  + https://gerrit.libreoffice.org/#/c/26359/

- Implemented basic export of cell styles and table styles (table-template).
  To properly map a core table style class (SwTableAutoFormat) and
  odf table-template implemented new table-template elements in loext 
namespace:

  loext:first-row-even-column, loext:last-row-even-column
  loext:first-row-end-column, loext:first-row-start-column
  loext:last-row-end-column, loext:last-row-start-column.
  + https://gerrit.libreoffice.org/#/c/26185/

Plans for this week:
- Will be working on cell style and table style import.

Regards,
Jakub Trzebiatowski, ubap

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


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

2016-06-20 Thread Stephan Bergmann
 include/cppuhelper/proptypehlp.hxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 0ac092ed0b04ce4ea8b401a56998e36bc2cca402
Author: Stephan Bergmann 
Date:   Mon Jun 20 17:20:02 2016 +0200

Clean up uses of Any::getValue() in cppuhelper

Change-Id: Ibe25c23a273db957905af972dcae64e3a0d3be8a

diff --git a/include/cppuhelper/proptypehlp.hxx 
b/include/cppuhelper/proptypehlp.hxx
index 5169c5b4..9f3dcf4 100644
--- a/include/cppuhelper/proptypehlp.hxx
+++ b/include/cppuhelper/proptypehlp.hxx
@@ -65,7 +65,7 @@ inline void SAL_CALL convertPropertyValue( sal_Bool & b   , 
const css::uno::Any
 b = i16 != 0;
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
-b = *static_cast(a.getValue());
+a >>= b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
 sal_Int8 i8 = 0;
@@ -122,7 +122,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int64 & i  , 
const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_Int64 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -175,7 +175,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt64 & i  
, const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_uInt64 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -219,7 +219,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int32 & i  , 
const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_Int32 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -266,7 +266,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt32 & i  
, const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_uInt32 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -299,7 +299,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int16 & i  , 
const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_Int16 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -331,7 +331,7 @@ inline void SAL_CALL convertPropertyValue( sal_uInt16 & i  
, const css::uno::Any
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_Int16 ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -358,7 +358,7 @@ inline void SAL_CALL convertPropertyValue( sal_Int8 & i  , 
const css::uno::Any &
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 i = ( sal_Int8 ) b;
 }
 else {
@@ -405,7 +405,7 @@ inline void SAL_CALL convertPropertyValue( float &f , const 
css::uno::Any &a )
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 f = ( float ) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
@@ -470,7 +470,7 @@ inline void SAL_CALL convertPropertyValue( double &d , 
const css::uno::Any &a )
 }
 else if ( css::uno::TypeClass_BOOLEAN == tc ) {
 bool b;
-b =  *static_cast(a.getValue());
+a >>= b;
 d = (double) b;
 }
 else if ( css::uno::TypeClass_BYTE == tc ) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cli_ure/Executable_climaker.mk cli_ure/Library_cli_cppuhelper_native.mk cli_ure/Library_cli_uno.mk desktop/source sal/inc sal/osl solenv/gbuild

2016-06-20 Thread Markus Mohrhard
 cli_ure/Executable_climaker.mk   |2 -
 cli_ure/Library_cli_cppuhelper_native.mk |1 
 cli_ure/Library_cli_uno.mk   |1 
 desktop/source/app/app.cxx   |3 -
 sal/inc/signalshared.hxx |2 -
 sal/osl/all/signalshared.cxx |9 +
 sal/osl/unx/signal.cxx   |2 -
 sal/osl/w32/signal.cxx   |   48 ---
 solenv/gbuild/platform/com_MSC_defs.mk   |2 -
 9 files changed, 7 insertions(+), 63 deletions(-)

New commits:
commit 62c047ffb397802c09df9070492e70725928cadf
Author: Markus Mohrhard 
Date:   Mon Jun 20 09:02:47 2016 +0200

switch to EHs on windows

This seems to be a good idea based on several discussions
in the project. In the end catching SEH exceptions is just
going to cause strange platform dependent bahavior.

This patch is based on on

http://thread.gmane.org/gmane.comp.documentfoundation.libreoffice.scm/39102/focus=55516
and includes some additional cleanup of the sal signal code.

Change-Id: Iedc998e37e6495afec445eccb60fa1c2b1a7defd
Reviewed-on: https://gerrit.libreoffice.org/26497
Reviewed-by: Michael Meeks 
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/cli_ure/Executable_climaker.mk b/cli_ure/Executable_climaker.mk
index 2d99b1f..298f01e 100644
--- a/cli_ure/Executable_climaker.mk
+++ b/cli_ure/Executable_climaker.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_Executable_use_package,climaker,\
 
 $(eval $(call gb_Executable_add_cxxflags,climaker,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
-   -clr \
+   -EHa -clr \
-LN \
-wd4339 \
-wd4715 \
diff --git a/cli_ure/Library_cli_cppuhelper_native.mk 
b/cli_ure/Library_cli_cppuhelper_native.mk
index 952bba8..52314a3 100644
--- a/cli_ure/Library_cli_cppuhelper_native.mk
+++ b/cli_ure/Library_cli_cppuhelper_native.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_Library_Assembly,cli_cppuhelper))
 # in CLR meta-data - use of this type may lead to a runtime exception":
 $(eval $(call gb_Library_add_cxxflags,cli_cppuhelper,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
+   -EHa \
-clr \
-wd4339 \
 ))
diff --git a/cli_ure/Library_cli_uno.mk b/cli_ure/Library_cli_uno.mk
index 58b2d4f..0629a17 100644
--- a/cli_ure/Library_cli_uno.mk
+++ b/cli_ure/Library_cli_uno.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_Library_Library,cli_uno))
 
 $(eval $(call gb_Library_add_cxxflags,cli_uno,\
-AI $(INSTDIR)/$(LIBO_URE_LIB_FOLDER) \
+   -EHa \
-clr \
-wd4339 \
 ))
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index cee0fb9..fab48e1 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1433,9 +1433,6 @@ int Desktop::Main()
 
 SetSplashScreenProgress(30);
 
-// set static variable to disable crash reporting
-osl_setErrorReporting( false );
-
 // create title string
 LanguageTag aLocale( LANGUAGE_SYSTEM);
 ResMgr* pLabelResMgr = GetDesktopResManager();
diff --git a/sal/inc/signalshared.hxx b/sal/inc/signalshared.hxx
index 3eaa32c..fecedf5 100644
--- a/sal/inc/signalshared.hxx
+++ b/sal/inc/signalshared.hxx
@@ -30,7 +30,6 @@ struct oslSignalHandlerImpl
 oslSignalHandlerImpl*   pNext;
 };
 
-extern bool bErrorReportingEnabled;
 extern bool bInitSignal;
 
 oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
@@ -38,7 +37,6 @@ oslSignalAction callSignalHandler(oslSignalInfo* pInfo);
 // platform-specific functions that need to be implemented
 bool onInitSignal();
 bool onDeInitSignal();
-void onErrorReportingChanged(bool enabled);
 
 #endif
 
diff --git a/sal/osl/all/signalshared.cxx b/sal/osl/all/signalshared.cxx
index 341d7dc..9110ab1 100644
--- a/sal/osl/all/signalshared.cxx
+++ b/sal/osl/all/signalshared.cxx
@@ -23,7 +23,6 @@
 
 #include 
 
-bool bErrorReportingEnabled = true;
 bool bInitSignal = false;
 
 namespace
@@ -156,12 +155,10 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 
userSignal, void* userData)
 return action;
 }
 
-sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
+sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool /*bEnable*/ )
 {
-bool bOld = bErrorReportingEnabled;
-bErrorReportingEnabled = bEnable;
-onErrorReportingChanged(bEnable);
-return bOld;
+// this is part of the stable API
+return false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index d424451..ba54979 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -281,8 +281,6 @@ bool onDeInitSignal()
 return false;
 }
 
-void onErrorReportingChanged(SAL_UNUSED_PARAMETER bool) {}
-
 namespace
 {
 void printStack(int sig)
diff --git a/sal/osl/w32/signal.cxx b/sal/osl/w32/signal.cxx
index 071df17..743d2b2 100644
--- a/sal/osl/w32/signal.cxx
+++ b/sal/osl

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

2016-06-20 Thread Miklos Vajna
 include/svx/svdmodel.hxx   |   16 --
 sc/source/ui/docshell/docsh.cxx|3 --
 sc/source/ui/unoobj/docuno.cxx |4 ---
 sd/source/ui/docshell/docshell.cxx |4 ---
 sd/source/ui/unoidl/unomodel.cxx   |4 ---
 svx/source/svdraw/svdmodel.cxx |   42 -
 sw/inc/viewsh.hxx  |5 
 sw/source/core/view/viewsh.cxx |   12 --
 sw/source/uibase/app/docsh.cxx |7 --
 sw/source/uibase/uno/unotxdoc.cxx  |7 --
 10 files changed, 7 insertions(+), 97 deletions(-)

New commits:
commit 3f6ad98c4764402dc6e876106867e49e3e888f8f
Author: Miklos Vajna 
Date:   Mon Jun 20 16:43:04 2016 +0200

Remove no longer needed SdrModel::libreOfficeKitCallback()

All former clients are changed to call
SfxViewShell::libreOfficeKitViewCallback() instead.

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

diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx
index b0e4d56..709844d 100644
--- a/include/svx/svdmodel.hxx
+++ b/include/svx/svdmodel.hxx
@@ -143,7 +143,7 @@ public:
 
 struct SdrModelImpl;
 
-class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< 
SdrModel >, public OutlinerSearchable
+class SVX_DLLPUBLIC SdrModel : public SfxBroadcaster, public tools::WeakBase< 
SdrModel >
 {
 protected:
 std::vector maMaPag; // master pages
@@ -168,10 +168,6 @@ protected:
 SdrOutliner*pChainingOutliner; // an Outliner for chaining overflowing 
text
 sal_uIntPtr   nDefTextHgt;// Default text height in logical 
units
 VclPtr  pRefOutDev; // ReferenceDevice for the EditEngine
-LibreOfficeKitCallback mpLibreOfficeKitCallback;
-void* mpLibreOfficeKitData;
-/// Set if we are in the middle of a tiled search.
-bool mbTiledSearching;
 sal_uIntPtr   nProgressAkt;   // for the
 sal_uIntPtr   nProgressMax;   // ProgressBar-
 sal_uIntPtr   nProgressOfs;   // -Handler
@@ -328,16 +324,6 @@ public:
 // ReferenceDevice for the EditEngine
 void SetRefDevice(OutputDevice* pDev);
 OutputDevice*GetRefDevice() const   { return 
pRefOutDev.get(); }
-/// The actual implementation of the 
vcl::ITiledRenderable::registerCallback() API.
-void registerLibreOfficeKitCallback(LibreOfficeKitCallback 
pCallback, void* pLibreOfficeKitData);
-/// Gets the LOK data registered by registerLibreOfficeKitCallback().
-void*getLibreOfficeKitData() const;
-/// Invokes the registered callback, if there are any.
-void libreOfficeKitCallback(int nType, const char* 
pPayload) const override;
-/// Set if we are doing tiled searching.
-void setTiledSearching(bool bTiledSearching);
-/// Are we doing tiled searching?
-bool isTiledSearching() const;
 // If a new MapMode is set on the RefDevice (or similar)
 void RefDeviceChanged(); // not yet implemented
 // default font height in logical units
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 95bb72d..12f8b5d 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3220,9 +3220,8 @@ bool ScDocShell::GetProtectionHash( /*out*/ 
css::uno::Sequence< sal_Int8 > &rPas
 return bRes;
 }
 
-void ScDocShell::libreOfficeKitCallback(int nType, const char* pPayload) const
+void ScDocShell::libreOfficeKitCallback(int /*nType*/, const char* 
/*pPayload*/) const
 {
-aDocument.GetDrawLayer()->libreOfficeKitCallback(nType, pPayload);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ac0314a..2dfbc2c 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -554,10 +554,8 @@ Size ScModelObj::getDocumentSize()
 return aSize;
 }
 
-void ScModelObj::registerCallback(LibreOfficeKitCallback pCallback, void* 
pData)
+void ScModelObj::registerCallback(LibreOfficeKitCallback /*pCallback*/, void* 
/*pData*/)
 {
-SolarMutexGuard aGuard;
-
pDocShell->GetDocument().GetDrawLayer()->registerLibreOfficeKitCallback(pCallback,
 pData);
 }
 
 void ScModelObj::postKeyEvent(int nType, int nCharCode, int nKeyCode)
diff --git a/sd/source/ui/docshell/docshell.cxx 
b/sd/source/ui/docshell/docshell.cxx
index 65dafa0..b948bd9 100644
--- a/sd/source/ui/docshell/docshell.cxx
+++ b/sd/source/ui/docshell/docshell.cxx
@@ -478,10 +478,8 @@ void DrawDocShell::ClearUndoBuffer()
 pUndoManager->Clear();
 }
 
-void DrawDocShell::libreOfficeKitCallback(int nType, const char* pPayload) 
const
+void DrawDocShell::libreOfficeKitCallback(int /*nType*/, const char* 
/*pPayload*/) const
 {
-if (mpDoc)
-mpDoc->li

[Libreoffice-commits] core.git: desktop/source include/LibreOfficeKit include/sfx2 libreofficekit/source sfx2/source sw/source

2016-06-20 Thread Miklos Vajna
 desktop/source/lib/init.cxx  |2 ++
 include/LibreOfficeKit/LibreOfficeKitEnums.h |   17 +
 include/sfx2/lokhelper.hxx   |2 +-
 libreofficekit/source/gtk/lokdocview.cxx |7 +++
 sfx2/source/view/lokhelper.cxx   |   12 +---
 sw/source/core/crsr/viscrs.cxx   |   22 ++
 6 files changed, 58 insertions(+), 4 deletions(-)

New commits:
commit c544a8b674dd7ac9dd466a84a440ede030942438
Author: Miklos Vajna 
Date:   Mon Jun 20 16:42:34 2016 +0200

sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSOR

So a view can be aware where cursors of other views are.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c0477a5..a150535 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -446,6 +446,7 @@ 
CallbackFlushHandler::CallbackFlushHandler(LibreOfficeKitDocument* pDocument, Li
 m_states.emplace(LOK_CALLBACK_TEXT_SELECTION, "NIL");
 m_states.emplace(LOK_CALLBACK_GRAPHIC_SELECTION, "NIL");
 m_states.emplace(LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR, "NIL");
+m_states.emplace(LOK_CALLBACK_INVALIDATE_VIEW_CURSOR , "NIL");
 m_states.emplace(LOK_CALLBACK_STATE_CHANGED, "NIL");
 m_states.emplace(LOK_CALLBACK_MOUSE_POINTER, "NIL");
 m_states.emplace(LOK_CALLBACK_CELL_CURSOR, "NIL");
@@ -561,6 +562,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 // These come with rects, so drop earlier
 // only when the latter includes former ones.
 case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
+case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
 case LOK_CALLBACK_INVALIDATE_TILES:
 if (payload.empty())
 {
diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 4b8ff35..4229e73 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -312,6 +312,23 @@ typedef enum
  */
 LOK_CALLBACK_CONTEXT_MENU,
 
+/**
+ * The size and/or the position of the view cursor changed. A view cursor
+ * is a cursor of an other view, the current view can't change it.
+ *
+ * Rectangle format is the same as LOK_CALLBACK_INVALIDATE_TILES.
+ * The payload format:
+ *
+ * {
+ * "viewId": "..."
+ * "rectangle": "..."
+ * }
+ *
+ * - viewId is a value returned earlier by lok::Document::createView()
+ * - rectangle uses the format of LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR
+ */
+LOK_CALLBACK_INVALIDATE_VIEW_CURSOR,
+
 }
 LibreOfficeKitCallbackType;
 
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 2a691f6..43c0189 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -26,7 +26,7 @@ public:
 /// Set a view shell as current one.
 static void setView(std::uintptr_t nId);
 /// Get the currently active view.
-static std::uintptr_t getView();
+static std::uintptr_t getView(SfxViewShell *pViewShell = nullptr);
 /// Get the number of views of the current object shell.
 static std::size_t getViews();
 };
diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index 6f2b8ea..d4ca4a9 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -341,6 +341,8 @@ callbackTypeToString (int nType)
 return "LOK_CALLBACK_DOCUMENT_PASSWORD_TO_MODIFY";
 case LOK_CALLBACK_CONTEXT_MENU:
 return "LOK_CALLBACK_CONTEXT_MENU";
+case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
+return "LOK_CALLBACK_INVALIDATE_VIEW_CURSOR";
 }
 return nullptr;
 }
@@ -1158,6 +1160,11 @@ callback (gpointer pData)
 // TODO: Implement me
 break;
 }
+case LOK_CALLBACK_INVALIDATE_VIEW_CURSOR:
+{
+// TODO: Implement me
+break;
+}
 default:
 g_assert(false);
 break;
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 3a306cf..ba42188 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -60,16 +60,22 @@ void SfxLokHelper::setView(std::uintptr_t nId)
 
 }
 
-std::uintptr_t SfxLokHelper::getView()
+std::uintptr_t SfxLokHelper::getView(SfxViewShell *pViewShell)
 {
-return reinterpret_cast(SfxViewShell::Current());
+if (!pViewShell)
+pViewShell = SfxViewShell::Current();
+return reinterpret_cast(pViewShell);
 }
 
 std::size_t SfxLokHelper::getViews()
 {
 std::size_t nRet = 0;
 
-SfxObjectShell* pObjectShell = SfxViewFrame::Current()->GetObjectShell();
+SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+if (!pViewFrame)
+return nRet;
+
+ 

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

2016-06-20 Thread Markus Mohrhard
 vcl/opengl/win/WinDeviceInfo.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 55bd0ac154a7118f7cce48ffd1e44a48d9099413
Author: Markus Mohrhard 
Date:   Fri Jun 17 21:44:49 2016 +0200

add some OpenGL info to the crash reporter

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

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index e9278b1..b2d5bff 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -521,8 +521,10 @@ void writeToLog(SvStream& rStrm, const char* pKey, const 
OUString rVal)
 
 bool WinOpenGLDeviceInfo::isDeviceBlocked()
 {
-// CrashReporter::AddKeyAndValue("AdapterVendorId", maAdapterVendorID);
-// CrashReporter::AddKeyAndValue("AdapterDeviceId", maAdapterDeviceID);
+CrashReporter::AddKeyValue("OpenGLVendor", maAdapterVendorID);
+CrashReporter::AddKeyValue("OpenGLDevice", maAdapterDeviceID);
+CrashReporter::AddKeyValue("OpenGLDriver", maDriverVersion);
+
 SAL_INFO("vcl.opengl", maDriverVersion);
 SAL_INFO("vcl.opengl", maDriverDate);
 SAL_INFO("vcl.opengl", maDeviceID);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: Branch 'libreoffice-5-2' - source/text

2016-06-20 Thread Adolfo Jayme Barrientos
 source/text/scalc/guide/print_details.xhp   |2 +-
 source/text/scalc/guide/print_exact.xhp |4 ++--
 source/text/scalc/guide/print_landscape.xhp |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit f2eddfea1039b1a7db0c38856a61b52aa5a9f821
Author: Adolfo Jayme Barrientos 
Date:   Mon Jun 20 08:09:12 2016 -0500

“Page Break Preview” → “Page Break” in Calc

Change-Id: Ic0d6cbe429305760a21ebc9fdbee67f0d752fe23
(cherry picked from commit 1abe8b8b3462e7f62e1d5563402672c0b2ae4851)
Reviewed-on: https://gerrit.libreoffice.org/26514
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/source/text/scalc/guide/print_details.xhp 
b/source/text/scalc/guide/print_details.xhp
index 47f063c..c5645ec 100644
--- a/source/text/scalc/guide/print_details.xhp
+++ b/source/text/scalc/guide/print_details.xhp
@@ -86,7 +86,7 @@
 
 
 
-View - Page Break Preview
+View - Page 
Break
 
 
 
diff --git a/source/text/scalc/guide/print_exact.xhp 
b/source/text/scalc/guide/print_exact.xhp
index 05ce5e9..11ae165 100644
--- a/source/text/scalc/guide/print_exact.xhp
+++ b/source/text/scalc/guide/print_exact.xhp
@@ -45,7 +45,7 @@
 Go to the sheet to be printed.
 
 
-Choose View - Page Break Preview.
+Choose 
View - Page Break.
 
 
 You will see the automatic distribution of the sheet across the 
print pages. The automatically created print ranges are indicated by dark blue 
lines, and the user-defined ones by light blue lines. The page breaks (line 
breaks and column breaks) are marked as black lines.
@@ -55,7 +55,7 @@
 
 
 
-View - Page Break Preview
+View - Page 
Break
 
 
 
diff --git a/source/text/scalc/guide/print_landscape.xhp 
b/source/text/scalc/guide/print_landscape.xhp
index f52c726..d204559 100644
--- a/source/text/scalc/guide/print_landscape.xhp
+++ b/source/text/scalc/guide/print_landscape.xhp
@@ -34,7 +34,7 @@
 mw corrected a typo in "printing; sheet..."
 Printing Sheets in Landscape Format
 
-  In order to print a sheet you have a number of interactive options 
available under View - Page Break Preview. Drag the delimiter 
lines to define the range of printed cells on each page.
+  In order 
to print a sheet you have a number of interactive options available under 
View - Page Break. Drag the delimiter lines to define the range of 
printed cells on each page.
   To print in landscape format, proceed as follows:
   
  
@@ -71,7 +71,7 @@
   
   If under Format - Print ranges you have defined one or 
more print ranges, only the contents of these print ranges will be 
printed.
   
- View - Page Break Preview
+ View - Page 
Break
  Defining Print Ranges 
on a Sheet
  
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - helpcontent2

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

New commits:
commit 12e8a8e0f4cb9588a4a26fe60223bc85075c691a
Author: Adolfo Jayme Barrientos 
Date:   Mon Jun 20 08:09:12 2016 -0500

Updated core
Project: help  f2eddfea1039b1a7db0c38856a61b52aa5a9f821

“Page Break Preview” → “Page Break” in Calc

Change-Id: Ic0d6cbe429305760a21ebc9fdbee67f0d752fe23
(cherry picked from commit 1abe8b8b3462e7f62e1d5563402672c0b2ae4851)
Reviewed-on: https://gerrit.libreoffice.org/26514
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index 47ae547..f2eddfe 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 47ae5470075b828b5e5f439e5fede6415972148b
+Subproject commit f2eddfea1039b1a7db0c38856a61b52aa5a9f821
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Firebird - Build with Jenkins

2016-06-20 Thread Stephan Bergmann

On 06/20/2016 03:00 PM, Bunth Tamás wrote:

On gerrit, Jenkins had an error:

*** No rule to make target '/home/tdf/lode/ext_tar/ltm-1.0.zip',
needed by 
'/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Linux/workdir/UnpackedTarget/ltm-1.0.zip'.

That is the zip file of the libtommath package.

But on my PC, I made a full build without errors (on Linux).

The related patch:
https://gerrit.libreoffice.org/25673/

I don't know yet what is the problem. On my PC I copied this
ltm_1.0.zip to external/Tarballs.
I added a md5sum and the file name to the download.lst file. The zip
file was uploaded yesterday to http://dev-www.libreoffice.org/src/
( https://lists.freedesktop.org/archives/libreoffice/2016-June/074586.html )
Maybe I should have added this "pgp signature" somewhere?


Looks like you didn't adapt Makefile.fetch.  (Remove the file you 
manually added to external/Tarballs, and see that "make" works locally 
for you before trying it on Jenkins.)

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


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

2016-06-20 Thread Adolfo Jayme Barrientos
 source/text/scalc/guide/print_details.xhp   |2 +-
 source/text/scalc/guide/print_exact.xhp |4 ++--
 source/text/scalc/guide/print_landscape.xhp |4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1abe8b8b3462e7f62e1d5563402672c0b2ae4851
Author: Adolfo Jayme Barrientos 
Date:   Mon Jun 20 08:09:12 2016 -0500

“Page Break Preview” → “Page Break” in Calc

Change-Id: Ic0d6cbe429305760a21ebc9fdbee67f0d752fe23

diff --git a/source/text/scalc/guide/print_details.xhp 
b/source/text/scalc/guide/print_details.xhp
index 47f063c..c5645ec 100644
--- a/source/text/scalc/guide/print_details.xhp
+++ b/source/text/scalc/guide/print_details.xhp
@@ -86,7 +86,7 @@
 
 
 
-View - Page Break Preview
+View - Page 
Break
 
 
 
diff --git a/source/text/scalc/guide/print_exact.xhp 
b/source/text/scalc/guide/print_exact.xhp
index 05ce5e9..11ae165 100644
--- a/source/text/scalc/guide/print_exact.xhp
+++ b/source/text/scalc/guide/print_exact.xhp
@@ -45,7 +45,7 @@
 Go to the sheet to be printed.
 
 
-Choose View - Page Break Preview.
+Choose 
View - Page Break.
 
 
 You will see the automatic distribution of the sheet across the 
print pages. The automatically created print ranges are indicated by dark blue 
lines, and the user-defined ones by light blue lines. The page breaks (line 
breaks and column breaks) are marked as black lines.
@@ -55,7 +55,7 @@
 
 
 
-View - Page Break Preview
+View - Page 
Break
 
 
 
diff --git a/source/text/scalc/guide/print_landscape.xhp 
b/source/text/scalc/guide/print_landscape.xhp
index f52c726..d204559 100644
--- a/source/text/scalc/guide/print_landscape.xhp
+++ b/source/text/scalc/guide/print_landscape.xhp
@@ -34,7 +34,7 @@
 mw corrected a typo in "printing; sheet..."
 Printing Sheets in Landscape Format
 
-  In order to print a sheet you have a number of interactive options 
available under View - Page Break Preview. Drag the delimiter 
lines to define the range of printed cells on each page.
+  In order 
to print a sheet you have a number of interactive options available under 
View - Page Break. Drag the delimiter lines to define the range of 
printed cells on each page.
   To print in landscape format, proceed as follows:
   
  
@@ -71,7 +71,7 @@
   
   If under Format - Print ranges you have defined one or 
more print ranges, only the contents of these print ranges will be 
printed.
   
- View - Page Break Preview
+ View - Page 
Break
  Defining Print Ranges 
on a Sheet
  
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

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

New commits:
commit 2286144f86a14463fd93145a533144f74fb0c0e9
Author: Adolfo Jayme Barrientos 
Date:   Mon Jun 20 08:09:12 2016 -0500

Updated core
Project: help  1abe8b8b3462e7f62e1d5563402672c0b2ae4851

“Page Break Preview” → “Page Break” in Calc

Change-Id: Ic0d6cbe429305760a21ebc9fdbee67f0d752fe23

diff --git a/helpcontent2 b/helpcontent2
index 2db7585..1abe8b8b 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 2db75854e290a7ce93e869214b3d6fba86d93ae7
+Subproject commit 1abe8b8b3462e7f62e1d5563402672c0b2ae4851
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sd/source

2016-06-20 Thread David Tardon
 sd/source/ui/view/ViewShellBase.cxx |   86 
 1 file changed, 30 insertions(+), 56 deletions(-)

New commits:
commit cd6a76d7c0c6b5d90fd5f1d9e2b3847cc3425ca4
Author: David Tardon 
Date:   Wed Jun 15 16:52:26 2016 +0200

rhbz#1343752 fix view status in menu

... after commit 229fc164dc1773484b74eca016863cf68860e81b .

Change-Id: Ibfbbb86c81527f008b8e1cbe9d8ca3174a944931
(cherry picked from commit c4c7fe98b0f05329edf7930ff92b44892d4724e6)
Reviewed-on: https://gerrit.libreoffice.org/26500
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/sd/source/ui/view/ViewShellBase.cxx 
b/sd/source/ui/view/ViewShellBase.cxx
index 887db26..0bf6ac6 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -1233,13 +1233,13 @@ void ViewShellBase::Implementation::GetSlotState 
(SfxItemSet& rSet)
 SfxWhichIter aSetIterator (rSet);
 sal_uInt16 nItemId (aSetIterator.FirstWhich());
 
-FrameView *pFrameView;
 while (nItemId > 0)
 {
 bool bState (false);
 Reference xResourceId;
 try
 {
+// Check if the right view is active
 switch (nItemId)
 {
 case SID_LEFT_PANE_IMPRESS:
@@ -1254,22 +1254,13 @@ void ViewShellBase::Implementation::GetSlotState 
(SfxItemSet& rSet)
 bState = xConfiguration->hasResource(xResourceId);
 break;
 
+case SID_DRAWINGMODE:
 case SID_NORMAL_MULTI_PANE_GUI:
-if (ViewShell* pViewShell = 
mrBase.GetMainViewShell().get())
-{
-pFrameView = pViewShell->GetFrameView();
-bState = pFrameView->GetViewShEditMode() == EM_PAGE
-&& pFrameView->GetPageKind() == PK_STANDARD;
-}
-break;
-
 case SID_SLIDE_MASTER_MODE:
-if (ViewShell* pViewShell = 
mrBase.GetMainViewShell().get())
-{
-pFrameView = pViewShell->GetFrameView();
-bState = pFrameView->GetViewShEditMode() == 
EM_MASTERPAGE
-&& pFrameView->GetPageKind() == PK_STANDARD;
-}
+xResourceId = ResourceId::createWithAnchorURL(
+xContext, FrameworkHelper::msImpressViewURL,
+FrameworkHelper::msCenterPaneURL);
+bState = xConfiguration->hasResource(xResourceId);
 break;
 
 case SID_SLIDE_SORTER_MULTI_PANE_GUI:
@@ -1290,30 +1281,18 @@ void ViewShellBase::Implementation::GetSlotState 
(SfxItemSet& rSet)
 break;
 
 case SID_HANDOUT_MASTER_MODE:
-if (ViewShell* pViewShell = 
mrBase.GetMainViewShell().get())
-{
-pFrameView = pViewShell->GetFrameView();
-bState = pFrameView->GetViewShEditMode() == 
EM_MASTERPAGE
-&& pFrameView->GetPageKind() == PK_HANDOUT;
-}
+xResourceId = ResourceId::createWithAnchorURL(
+xContext, FrameworkHelper::msHandoutViewURL,
+FrameworkHelper::msCenterPaneURL);
+bState = xConfiguration->hasResource(xResourceId);
 break;
 
 case SID_NOTES_MODE:
-if (ViewShell* pViewShell = 
mrBase.GetMainViewShell().get())
-{
-pFrameView = pViewShell->GetFrameView();
-bState = pFrameView->GetViewShEditMode() == EM_PAGE
-&& pFrameView->GetPageKind() == PK_NOTES;
-}
-break;
-
 case SID_NOTES_MASTER_MODE:
-if (ViewShell* pViewShell = 
mrBase.GetMainViewShell().get())
-{
-pFrameView = pViewShell->GetFrameView();
-bState = pFrameView->GetViewShEditMode() == 
EM_MASTERPAGE
-&& pFrameView->GetPageKind() == PK_NOTES;
-}
+xResourceId = ResourceId::createWithAnchorURL(
+xContext, FrameworkHelper::msNotesViewURL,
+FrameworkHelper::msCenterPaneURL);
+bState = xConfiguration->hasResource(xResourceId);
 break;
 
 case SID_TOGGLE_TABBAR_VISIBILITY:
@@

Firebird - Build with Jenkins

2016-06-20 Thread Bunth Tamás
On gerrit, Jenkins had an error:

*** No rule to make target '/home/tdf/lode/ext_tar/ltm-1.0.zip',
needed by 
'/home/tdf/lode/jenkins/workspace/lo_gerrit_master/Gerrit/Gerrit/Platform/Linux/workdir/UnpackedTarget/ltm-1.0.zip'.

That is the zip file of the libtommath package.

But on my PC, I made a full build without errors (on Linux).

The related patch:
https://gerrit.libreoffice.org/25673/

I don't know yet what is the problem. On my PC I copied this
ltm_1.0.zip to external/Tarballs.
I added a md5sum and the file name to the download.lst file. The zip
file was uploaded yesterday to http://dev-www.libreoffice.org/src/
( https://lists.freedesktop.org/archives/libreoffice/2016-June/074586.html )
Maybe I should have added this "pgp signature" somewhere?

regards,
Tamás Bunth
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2016-06-20 Thread Stephan Bergmann
 sc/qa/unit/data/functions/fods/eastersunday.fods |   16 +++-
 1 file changed, 15 insertions(+), 1 deletion(-)

New commits:
commit f92fb1cc0a4fb3e2024665a4274c543f64946538
Author: Stephan Bergmann 
Date:   Mon Jun 20 14:44:11 2016 +0200

Check that EASTERSUNDAY with negative value causes error

...even though that's not obvious from the implementation of
ScInterpreter::ScEasterSunday (sc/source/core/tool/interpr2.cxx), which 
calls
SvNumberFormatter::ExpandTwoDigitYear on that value, which also only checks 
that
the value is < 100, but not whether it is non-negative.  However,
ExpandTwoDigitYear takes its argument as sal_uInt16, so any negative value 
is
guaranteed to be converted into a large sal_uInt16 value that is not < 100.

Change-Id: I6f10672e510918f6e9010061541829fcd98e6dd0

diff --git a/sc/qa/unit/data/functions/fods/eastersunday.fods 
b/sc/qa/unit/data/functions/fods/eastersunday.fods
index 5f21573..0ff92a6 100644
--- a/sc/qa/unit/data/functions/fods/eastersunday.fods
+++ b/sc/qa/unit/data/functions/fods/eastersunday.fods
@@ -868,6 +868,20 @@
  
 
 
+ 
+  Err:502
+ 
+ 
+  #VALUE
+ 
+ 
+  TRUE
+ 
+ 
+  =EASTERSUNDAY(-1)
+ 
+
+
  
  
  
@@ -991,4 +1005,4 @@

   
  
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - cppuhelper/source

2016-06-20 Thread Michael Stahl
 cppuhelper/source/weak.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 72cd79fa1ff3e385eec5a2aed380aa9a776d1a07
Author: Michael Stahl 
Date:   Fri Jun 17 21:58:09 2016 +0200

cppuhelper: fix use-after-free race in OWeakConnectionPoint

OWeakObject::m_pWeakConnectionPoint is returned from
OWeakObject::queryAdapter(), and stored in
OWeakRefListener::m_xWeakConnectionPoint.

This is cleared in OWeakRefListener::dispose(), called from
OWeakConnectionPoint::dispose(), called from
OWeakObject::disposeWeakConnectionPoint(), but it can happen that
another thread is in WeakReferenceHelper::get() and has copied
m_xWeakConnectionPoint onto the stack before the OWeakObject is
released and deleted, then calls OWeakConnectionPoint::queryAdapted()
after it is released, accessing the dead m_pObject.

(cherry picked from commit 131e604073f89e6c1dd54be88b94b7befd881f2e)

Change-Id: I7782e6fb7e07f5a48cf7064115217376714ba8e8
Reviewed-on: https://gerrit.libreoffice.org/26441
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 72b8896..82e279e 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -105,6 +105,12 @@ void SAL_CALL OWeakConnectionPoint::release() throw()
 
 void SAL_CALL OWeakConnectionPoint::dispose() throw(css::uno::RuntimeException)
 {
+{
+MutexGuard aGuard(getWeakMutex());
+// OWeakObject is not the only owner of this, so clear m_pObject
+// so that queryAdapted() won't use it now that it's dead
+m_pObject = nullptr;
+}
 Any ex;
 OInterfaceIteratorHelper aIt( m_aReferences );
 while( aIt.hasMoreElements() )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Jakub Trzebiatowski
 include/xmloff/table/XMLTableExport.hxx |1 
 include/xmloff/xmltoken.hxx |8 +
 sw/inc/unostyle.hxx |7 +
 sw/qa/python/check_styles.py|2 
 sw/source/core/doc/tblafmt.cxx  |   45 +++--
 sw/source/core/unocore/unomap.cxx   |   14 ++-
 sw/source/core/unocore/unostyle.cxx |   40 
 sw/source/filter/xml/xmlfmte.cxx|1 
 xmloff/source/core/xmltoken.cxx |8 +
 xmloff/source/style/prhdlfac.cxx|   21 
 xmloff/source/table/XMLTableExport.cxx  |  146 +---
 xmloff/source/text/txtprhdl.cxx |   19 
 12 files changed, 270 insertions(+), 42 deletions(-)

New commits:
commit 309bc35559cb823415139044272b10feccdb6ae7
Author: Jakub Trzebiatowski 
Date:   Sat Jun 11 15:17:48 2016 +0200

GSoC Table Styles, Export Cell Styles

Exporting cell-styles
Exporting table-template
To be able to map SwTableAutoFormat to table-template 1:1
extended table-template by the following elements:
loext:first-row-even-column
loext:last-row-even-column
loext:first-row-end-column
loext:first-row-start-column
loext:last-row-end-column
loext:last-row-start-column

Added attributes describing box format to SwXTextCellStyle

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

diff --git a/include/xmloff/table/XMLTableExport.hxx 
b/include/xmloff/table/XMLTableExport.hxx
index 73ad0e3..c91c734 100644
--- a/include/xmloff/table/XMLTableExport.hxx
+++ b/include/xmloff/table/XMLTableExport.hxx
@@ -83,6 +83,7 @@ private:
 std::map< const css::uno::Reference< css::table::XColumnRowRange >, 
std::shared_ptr< XMLTableInfo > >
 maTableInfoMap;
 boolmbExportTables;
+boolmbWriter;
 
 protected:
 SvXMLExport& GetExport() { return mrExport; }
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index aaabbba..5b0902d 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3067,6 +3067,14 @@ namespace xmloff { namespace token {
 XML_ODD_ROWS,
 XML_EVEN_COLUMNS,
 XML_ODD_COLUMNS,
+// table styles
+XML_FIRST_ROW_EVEN_COLUMN,
+XML_LAST_ROW_EVEN_COLUMN,
+XML_FIRST_ROW_END_COLUMN,
+XML_FIRST_ROW_START_COLUMN,
+XML_LAST_ROW_END_COLUMN,
+XML_LAST_ROW_START_COLUMN,
+
 XML_HORIZONTAL_ON_ODD,
 // Password error from 1.4 to 2.0 Beta (#i45874#)
 XML_RESTART_NUMBERING,
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index cbb04f5..07311e8 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -272,6 +272,13 @@ class SwXTextTableStyle : public cppu::WeakImplHelper
 ODD_COLUMNS_STYLE,
 BODY_STYLE,
 BACKGROUND_STYLE,
+// loext namespace
+FIRST_ROW_START_COLUMN_STYLE,
+FIRST_ROW_END_COLUMN_STYLE,
+LAST_ROW_START_COLUMN_STYLE,
+LAST_ROW_END_COLUMN_STYLE,
+FIRST_ROW_EVEN_COLUMN_STYLE,
+LAST_ROW_EVEN_COLUMN_STYLE,
 STYLE_COUNT
 };
 
diff --git a/sw/qa/python/check_styles.py b/sw/qa/python/check_styles.py
index 7a3e80e..144082a 100644
--- a/sw/qa/python/check_styles.py
+++ b/sw/qa/python/check_styles.py
@@ -206,7 +206,7 @@ class CheckStyle(unittest.TestCase):
 def test_CellFamily(self):
 xDoc = CheckStyle._uno.openEmptyWriterDoc()
 xCellStyles = xDoc.StyleFamilies["CellStyles"]
-vEmptyDocStyles = ['Default Style.1', 'Default Style.2', 'Default 
Style.3', 'Default Style.4', 'Default Style.5', 'Default Style.6', 'Default 
Style.7', 'Default Style.8', 'Default Style.9', 'Default Style.10']
+vEmptyDocStyles = ['Default Style.1', 'Default Style.2', 'Default 
Style.3', 'Default Style.4', 'Default Style.5', 'Default Style.6', 'Default 
Style.7', 'Default Style.8', 'Default Style.9', 'Default Style.10', 'Default 
Style.11', 'Default Style.12', 'Default Style.13', 'Default Style.14', 'Default 
Style.15', 'Default Style.16']
 self.__test_StyleFamily(xCellStyles, vEmptyDocStyles, 
"SwXTextCellStyle")
 self.__test_StyleFamilyIndex(xCellStyles, vEmptyDocStyles, 
"SwXTextCellStyle")
 self.__test_StyleFamilyInsert(xDoc, xCellStyles, vEmptyDocStyles, 
"com.sun.star.style.CellStyle", "com.sun.star.style.CharacterStyle")
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index d5b623d..481f65f 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1073,22 +1073,47 @@ OUString 
SwTableAutoFormat::GetTableTemplateCellSubName(const SwBoxAutoFormat& r
 return OUString();
 }
 
+/*
+ * Mapping schema
+ *  012

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

2016-06-20 Thread Marco Cecchetti
 filter/source/svg/svgwriter.cxx |  101 ++--
 filter/source/svg/svgwriter.hxx |   19 +++
 2 files changed, 116 insertions(+), 4 deletions(-)

New commits:
commit ac094c9fad665654c7049bef5565025efce93c47
Author: Marco Cecchetti 
Date:   Sun Jun 19 23:45:20 2016 +0200

bccu#1307 - svg filter - added support for clip region meta action

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

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index f2e5470..9859195 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -33,8 +33,11 @@
 #include 
 
 
+static const char   aPrefixClipPathId[] = "clip_path_";
+
 static const char   aXMLElemG[] = "g";
 static const char   aXMLElemA[] = "a";
+static const char   aXMLElemClipPath[] = "clipPath";
 static const char   aXMLElemDefs[] = "defs";
 static const char   aXMLElemLine[] = "line";
 static const char   aXMLElemRect[] = "rect";
@@ -52,6 +55,8 @@ static const char   aXMLElemStop[] = "stop";
 static const char   aXMLAttrTransform[] = "transform";
 static const char   aXMLAttrStyle[] = "style";
 static const char   aXMLAttrId[] = "id";
+static const char   aXMLAttrClipPath[] = "clip-path";
+static const char   aXMLAttrClipPathUnits[] = "clipPathUnits";
 static const char   aXMLAttrD[] = "d";
 static const char   aXMLAttrX[] = "x";
 static const char   aXMLAttrY[] = "y";
@@ -96,7 +101,7 @@ static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = 
"NumberingType";
 static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
 
 
-PushFlags SVGContextHandler::getLastUsedFlags() const
+PushFlags SVGContextHandler::getPushFlags() const
 {
 if (maStateStack.empty())
 return PushFlags::NONE;
@@ -120,6 +125,11 @@ void SVGContextHandler::pushState( PushFlags eFlags )
 aPartialState.setFont( maCurrentState.aFont );
 }
 
+if (eFlags & PushFlags::CLIPREGION)
+{
+aPartialState.mnRegionClipPathId = maCurrentState.nRegionClipPathId;
+}
+
 maStateStack.push( std::move(aPartialState) );
 }
 
@@ -136,6 +146,11 @@ void SVGContextHandler::popState()
 maCurrentState.aFont = rPartialState.getFont( vcl::Font() );
 }
 
+if (eFlags & PushFlags::CLIPREGION)
+{
+maCurrentState.nRegionClipPathId = rPartialState.mnRegionClipPathId;
+}
+
 maStateStack.pop();
 }
 
@@ -1716,6 +1731,8 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, 
SVGFontExport& rFontExport
 mnCurGradientId( 1 ),
 mnCurMaskId( 1 ),
 mnCurPatternId( 1 ),
+mnCurClipPathId( 1 ),
+mpCurrentClipRegionElem(),
 mrExport( rExport ),
 mrFontExport( rFontExport ),
 maContextHandler(),
@@ -2106,6 +2123,55 @@ void SVGActionWriter::ImplWriteShape( const 
SVGShapeDescriptor& rShape, bool bAp
 ImplWritePolyPolygon( aPolyPoly, bLineOnly, false );
 }
 
+
+
+void SVGActionWriter::ImplCreateClipPathDef( const tools::PolyPolygon& 
rPolyPoly )
+{
+OUString aClipPathId = aPrefixClipPathId + OUString::number( 
mnCurClipPathId++ );
+
+SvXMLElementExport aElemDefs( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, 
true, true );
+
+{
+mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId, aClipPathId );
+mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrClipPathUnits, 
"userSpaceOnUse" );
+SvXMLElementExport aElemClipPath( mrExport, XML_NAMESPACE_NONE, 
aXMLElemClipPath, true, true );
+
+ImplWritePolyPolygon(rPolyPoly, false, true);
+}
+}
+
+void SVGActionWriter::ImplStartClipRegion(sal_Int32 nClipPathId)
+{
+assert(!mpCurrentClipRegionElem);
+
+if (nClipPathId == 0)
+return;
+
+OUString aUrl = OUString("url(#") + aPrefixClipPathId + OUString::number( 
nClipPathId ) + ")";
+mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrClipPath, aUrl );
+mpCurrentClipRegionElem.reset( new SvXMLElementExport( mrExport, 
XML_NAMESPACE_NONE, aXMLElemG, true, true ) );
+}
+
+void SVGActionWriter::ImplEndClipRegion()
+{
+if (mpCurrentClipRegionElem)
+{
+mpCurrentClipRegionElem.reset();
+}
+}
+
+void SVGActionWriter::ImplWriteClipPath( const tools::PolyPolygon& rPolyPoly )
+{
+ImplEndClipRegion();
+
+if( rPolyPoly.Count() == 0 )
+return;
+
+ImplCreateClipPathDef(rPolyPoly);
+mrCurrentState.nRegionClipPathId = mnCurClipPathId - 1;
+ImplStartClipRegion( mrCurrentState.nRegionClipPathId );
+}
+
 void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
 const Hatch* pHatch,
 const Gradient* pGradient,
@@ -3604,10 +3670,40 @@ void SVGActionWriter::ImplWriteActions( const 
GDIMetaFile& rMtf,
 case( MetaActionType::MOVECLIPREGION ):
 {
 const_cast(pAction)->Execu

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

2016-06-20 Thread Marco Cecchetti
 filter/source/svg/svgwriter.cxx |  118 +++-
 filter/source/svg/svgwriter.hxx |   97 +---
 2 files changed, 143 insertions(+), 72 deletions(-)

New commits:
commit b392fd706545c23bed0afc9ae5b397f76c5ab7e5
Author: Marco Cecchetti 
Date:   Fri Jun 17 16:22:47 2016 +0200

svg filter - rewritten context handling

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

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 6273fe5..f2e5470 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -95,20 +95,60 @@ static const char aOOOAttrNumberingType[] = NSPREFIX 
"numbering-type";
 static sal_Char const XML_UNO_NAME_NRULE_NUMBERINGTYPE[] = "NumberingType";
 static sal_Char const XML_UNO_NAME_NRULE_BULLET_CHAR[] = "BulletChar";
 
-SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& 
rFontExport )
+
+PushFlags SVGContextHandler::getLastUsedFlags() const
+{
+if (maStateStack.empty())
+return PushFlags::NONE;
+
+const PartialState& rPartialState = maStateStack.top();
+return rPartialState.meFlags;
+}
+
+SVGState& SVGContextHandler::getCurrentState()
+{
+return maCurrentState;
+}
+
+void SVGContextHandler::pushState( PushFlags eFlags )
+{
+PartialState aPartialState;
+aPartialState.meFlags = eFlags;
+
+if (eFlags & PushFlags::FONT)
+{
+aPartialState.setFont( maCurrentState.aFont );
+}
+
+maStateStack.push( std::move(aPartialState) );
+}
+
+void SVGContextHandler::popState()
+{
+if (maStateStack.empty())
+return;
+
+const PartialState& rPartialState = maStateStack.top();
+PushFlags eFlags = rPartialState.meFlags;
+
+if (eFlags & PushFlags::FONT)
+{
+maCurrentState.aFont = rPartialState.getFont( vcl::Font() );
+}
+
+maStateStack.pop();
+}
+
+SVGAttributeWriter::SVGAttributeWriter( SVGExport& rExport, SVGFontExport& 
rFontExport, SVGState& rCurState )
 : mrExport( rExport )
 , mrFontExport( rFontExport )
+, mrCurrentState( rCurState )
 , mpElemFont( NULL )
-, mpElemPaint( NULL )
-, maLineJoin(basegfx::B2DLINEJOIN_NONE)
-, maLineCap(css::drawing::LineCap_BUTT)
 {
 }
 
 SVGAttributeWriter::~SVGAttributeWriter()
 {
-if( mpElemPaint )
-delete mpElemPaint;
 if( mpElemFont )
 delete mpElemFont;
 }
@@ -292,12 +332,14 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& 
rObjRect, const Gradie
 
 void SVGAttributeWriter::SetFontAttr( const vcl::Font& rFont )
 {
-if( rFont != maCurFont )
+vcl::Font& rCurFont = mrCurrentState.aFont;
+
+if( rFont != rCurFont )
 {
 OUString  aFontStyle, aTextDecoration;
 sal_Int32nFontWeight;
 
-maCurFont = rFont;
+rCurFont = rFont;
 
 // Font Family
 setFontFamily();
@@ -381,23 +423,25 @@ void SVGAttributeWriter::endFontSettings()
 
 void SVGAttributeWriter::setFontFamily()
 {
+vcl::Font& rCurFont = mrCurrentState.aFont;
+
 if( mrExport.IsUsePositionedCharacters() )
 {
-mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, 
mrFontExport.GetMappedFontName( maCurFont.GetName() ) );
+mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrFontFamily, 
mrFontExport.GetMappedFontName( rCurFont.GetName() ) );
 }
 else
 {
 sal_Int32   nNextTokenPos( 0 );
-const OUString& rsFontName = maCurFont.GetName();
+const OUString& rsFontName = rCurFont.GetName();
 OUString sFontFamily( rsFontName.getToken( 0, ';', nNextTokenPos ) );
-FontPitch ePitch = maCurFont.GetPitch();
+FontPitch ePitch = rCurFont.GetPitch();
 if( ePitch == PITCH_FIXED )
 {
 sFontFamily += ", monospace";
 }
 else
 {
-FontFamily eFamily = maCurFont.GetFamily();
+FontFamily eFamily = rCurFont.GetFamily();
 if( eFamily == FAMILY_ROMAN )
 sFontFamily += ", serif";
 else if( eFamily == FAMILY_SWISS )
@@ -407,9 +451,9 @@ void SVGAttributeWriter::setFontFamily()
 }
 }
 
-SVGTextWriter::SVGTextWriter( SVGExport& rExport )
+SVGTextWriter::SVGTextWriter( SVGExport& rExport,  SVGAttributeWriter& 
rAttributeWriter  )
 :   mrExport( rExport ),
-mpContext( NULL ),
+mrAttributeWriter( rAttributeWriter ),
 mpVDev( NULL ),
 mbIsTextShapeStarted( false ),
 mrTextShape(),
@@ -1336,7 +1380,7 @@ void SVGTextWriter::implWriteBulletChars()
 "," + OUString::number( rInfo.aPos.Y() ) + ")";
 mrExport.AddAttribute( XML_NAMESPACE_NONE, "transform", 
sPosition );
 
-mpContext->AddPaintAttr( COL_TRANSPARENT, rInfo.aColor );
+mrAttributeWrite

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

2016-06-20 Thread Marco Cecchetti
 filter/source/svg/svgwriter.hxx |   56 ++--
 1 file changed, 26 insertions(+), 30 deletions(-)

New commits:
commit 4788601e8b4d24c9fe2bc1c3d6b8d2d694659bbf
Author: Marco Cecchetti 
Date:   Thu Jun 16 13:36:51 2016 +0200

svgfilter - polish code formatting

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

diff --git a/filter/source/svg/svgwriter.hxx b/filter/source/svg/svgwriter.hxx
index c99e4cb..498fda4 100644
--- a/filter/source/svg/svgwriter.hxx
+++ b/filter/source/svg/svgwriter.hxx
@@ -90,20 +90,20 @@ class SVGAttributeWriter
 {
 private:
 
-vcl::Font  maCurFont;
-Color  maCurLineColor;
-Color  maCurFillColor;
-SVGExport& mrExport;
-SVGFontExport& mrFontExport;
-SvXMLElementExport*mpElemFont;
-SvXMLElementExport*mpElemPaint;
+vcl::Font   maCurFont;
+Color   maCurLineColor;
+Color   maCurFillColor;
+SVGExport&  mrExport;
+SVGFontExport&  mrFontExport;
+SvXMLElementExport* mpElemFont;
+SvXMLElementExport* mpElemPaint;
+basegfx::B2DLineJoinmaLineJoin;
+com::sun::star::drawing::LineCapmaLineCap;
 
-basegfx::B2DLineJoin maLineJoin;
-com::sun::star::drawing::LineCap maLineCap;
 
 SVGAttributeWriter();
 
-static doubleImplRound( double fVal, sal_Int32 nDecs = 3 );
+static double   ImplRound( double fVal, sal_Int32 nDecs = 3 );
 
 public:
 
@@ -125,19 +125,17 @@ public:
 
 struct SVGShapeDescriptor
 {
-tools::PolyPolygon maShapePolyPoly;
-Color   maShapeFillColor;
-Color   maShapeLineColor;
-sal_Int32   mnStrokeWidth;
-SvtGraphicStroke::DashArray maDashArray;
-::std::unique_ptr< Gradient > mapShapeGradient;
-OUString maId;
-
+tools::PolyPolygon  maShapePolyPoly;
+Color   maShapeFillColor;
+Color   maShapeLineColor;
+sal_Int32   mnStrokeWidth;
+SvtGraphicStroke::DashArray maDashArray;
+::std::unique_ptr< Gradient >   mapShapeGradient;
+OUStringmaId;
 basegfx::B2DLineJoinmaLineJoin;
 com::sun::star::drawing::LineCapmaLineCap;
 
 
-
 SVGShapeDescriptor() :
 maShapeFillColor( Color( COL_TRANSPARENT ) ),
 maShapeLineColor( Color( COL_TRANSPARENT ) ),
@@ -179,9 +177,9 @@ class SVGTextWriter
 SVGExport&  mrExport;
 SVGAttributeWriter* mpContext;
 VclPtr   mpVDev;
-boolmbIsTextShapeStarted;
+boolmbIsTextShapeStarted;
 ReferencemrTextShape;
-OUString msShapeId;
+OUStringmsShapeId;
 Reference mrParagraphEnumeration;
 Reference mrCurrentTextParagraph;
 Reference mrTextPortionEnumeration;
@@ -282,8 +280,6 @@ class SVGTextWriter
 
 void implRegisterInterface( const Reference< XInterface >& rxIf );
 const OUString & implGetValidIDFromInterface( const Reference< XInterface 
>& rxIf );
-
-
 };
 
 
@@ -306,8 +302,8 @@ private:
 VclPtr   mpVDev;
 MapMode maTargetMapMode;
 sal_uInt32  mnInnerMtfCount;
-boolmbClipAttrChanged;
-boolmbIsPlaceholderShape;
+boolmbClipAttrChanged;
+boolmbIsPlaceholderShape;
 
 
 SVGAttributeWriter* ImplAcquireContext()
@@ -332,7 +328,7 @@ private:
 Size&   ImplMap( const Size& rSz, Size& rDstSz ) const;
 Rectangle&  ImplMap( const Rectangle& rRect, Rectangle& 
rDstRect ) const;
 Polygon&ImplMap( const Polygon& rPoly, Polygon& rDstPoly ) 
const;
-tools::PolyPolygon&ImplMap( const tools::PolyPolygon& 
rPolyPoly, tools::PolyPolygon& rDstPolyPoly ) const;
+tools::PolyPolygon& ImplMap( const tools::PolyPolygon& rPolyPoly, 
tools::PolyPolygon& rDstPolyPoly ) const;
 
 voidImplWriteLine( const Point& rPt1, const Point& 
rPt2, const Color* pLineColor = NULL,

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

2016-06-20 Thread Marco Cecchetti
 filter/source/svg/svgwriter.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 383b9d2cedb66c3e99457230f12f56f2e6380e39
Author: Marco Cecchetti 
Date:   Tue Jun 14 13:04:59 2016 +0200

lool - bccu#1307 - stop colors for background gradient was wrong

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

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 8fddd23..6273fe5 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -186,13 +186,13 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& 
rObjRect, const Gradie
 Rectangle aRect( aPoly.GetBoundRect() );
 
 // adjust start/end colors with intensities
-aStartColor.SetRed( (sal_uInt8)( (long) aStartColor.GetRed() * 
rGradient.GetStartIntensity() ) / 100 );
-aStartColor.SetGreen( (sal_uInt8)( (long) aStartColor.GetGreen() * 
rGradient.GetStartIntensity() ) / 100 );
-aStartColor.SetBlue( (sal_uInt8)( (long) aStartColor.GetBlue() * 
rGradient.GetStartIntensity() ) / 100 );
+aStartColor.SetRed( (sal_uInt8)( ( aStartColor.GetRed() * 
rGradient.GetStartIntensity() ) / 100 ) );
+aStartColor.SetGreen( (sal_uInt8)( ( aStartColor.GetGreen() * 
rGradient.GetStartIntensity() ) / 100 ) );
+aStartColor.SetBlue( (sal_uInt8)( ( aStartColor.GetBlue() * 
rGradient.GetStartIntensity() ) / 100 ) );
 
-aEndColor.SetRed( (sal_uInt8)( (long) aEndColor.GetRed() * 
rGradient.GetEndIntensity() ) / 100 );
-aEndColor.SetGreen( (sal_uInt8)( (long) aEndColor.GetGreen() * 
rGradient.GetEndIntensity() ) / 100 );
-aEndColor.SetBlue( (sal_uInt8)( (long) aEndColor.GetBlue() * 
rGradient.GetEndIntensity() ) / 100 );
+aEndColor.SetRed( (sal_uInt8)( ( aEndColor.GetRed() * 
rGradient.GetEndIntensity() ) / 100 ) );
+aEndColor.SetGreen( (sal_uInt8)( ( aEndColor.GetGreen() * 
rGradient.GetEndIntensity() ) / 100 ) );
+aEndColor.SetBlue( (sal_uInt8)( ( aEndColor.GetBlue() * 
rGradient.GetEndIntensity() ) / 100 ) );
 
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrId,
 ( rGradientId = "Gradient_" ) += OUString::number( 
nCurGradientId++ ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Marco Cecchetti
 filter/source/svg/svgwriter.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 2e76c7ad6acf663b11e3971c0281714ffe0acc51
Author: Marco Cecchetti 
Date:   Tue Jun 14 13:03:06 2016 +0200

lool - bccu#1307 - images must be scaled in a non-uniform way

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

diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 9fd1f6e..8fddd23 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -80,6 +80,7 @@ static const char   aXMLAttrTextDecoration[] = 
"text-decoration";
 static const char   aXMLAttrXLinkHRef[] = "xlink:href";
 static const char   aXMLAttrGradientUnits[] = "gradientUnits";
 static const char   aXMLAttrPatternUnits[] = "patternUnits";
+static const char   aXMLAttrPreserveAspectRatio[] = "preserveAspectRatio";
 static const char   aXMLAttrOffset[] = "offset";
 static const char   aXMLAttrStopColor[] = "stop-color";
 static const char   aXMLAttrStrokeLinejoin[] = "stroke-linejoin";
@@ -2657,6 +2658,10 @@ void SVGActionWriter::ImplWriteBmp( const BitmapEx& 
rBmpEx,
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrY, 
OUString::number( aPt.Y() ) );
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrWidth, 
OUString::number( aSz.Width() ) );
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrHeight, 
OUString::number( aSz.Height() ) );
+
+// the image must be scaled to aSz in a non-uniform way
+mrExport.AddAttribute( XML_NAMESPACE_NONE, 
aXMLAttrPreserveAspectRatio, "none" );
+
 mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, 
aBuffer.makeStringAndClear() );
 {
 SvXMLElementExport aElem( mrExport, XML_NAMESPACE_NONE, 
aXMLElemImage, true, true );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Caolán McNamara
 lingucomponent/source/spellcheck/spell/sspellimp.cxx |4 +---
 sc/source/ui/cctrl/checklistmenu.cxx |2 +-
 sc/source/ui/unoobj/docuno.cxx   |2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 7423629f0abec966bd9403800ca0bd5c96a8b3a6
Author: Caolán McNamara 
Date:   Mon Jun 20 09:30:02 2016 +0100

cppcheck: oppositeInnerCondition if new fails, its going to throw

not return nullptr

Change-Id: I8f46e49b28fd9547fb3e32dca0c6b99ee2cd5c7d

diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx 
b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
index 69836bc..1d291f1 100644
--- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx
+++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx
@@ -334,9 +334,7 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString 
&rWord, const Locale &rL
 #endif
 
 aDicts[i] = new 
Hunspell(aTmpaff.getStr(),aTmpdict.getStr());
-aDEncs[i] = RTL_TEXTENCODING_DONTKNOW;
-if (aDicts[i])
-aDEncs[i] = 
getTextEncodingFromCharset(aDicts[i]->get_dic_encoding());
+aDEncs[i] = 
getTextEncodingFromCharset(aDicts[i]->get_dic_encoding());
 }
 pMS = aDicts[i];
 eEnc = aDEncs[i];
commit a2e0d0c9b5f86cd6721982fa2e162b73142f
Author: Caolán McNamara 
Date:   Mon Jun 20 09:23:20 2016 +0100

cppcheck: catchExceptionByValue

Change-Id: I1e6001d2c806a5808b2c2a8057d0ea403ab0f894

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index b41a200..ac0314a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -777,7 +777,7 @@ OString ScModelObj::getTextSelection(const char* pMimeType, 
OString& rUsedMimeTy
 {
 aAny = xTransferable->getTransferData(aFlavor);
 }
-catch (const datatransfer::UnsupportedFlavorException e)
+catch (const datatransfer::UnsupportedFlavorException& e)
 {
 OSL_TRACE("Caught UnsupportedFlavorException '%s'", 
OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
 return OString();
commit 83524482162caf4b875a6ea2c404f5aca46b26a0
Author: Caolán McNamara 
Date:   Mon Jun 20 09:22:53 2016 +0100

cppcheck: redundantCondition

Change-Id: I02566ed92197a2573cd4a1a6c7e9fe54aeab3301

diff --git a/sc/source/ui/cctrl/checklistmenu.cxx 
b/sc/source/ui/cctrl/checklistmenu.cxx
index b3634b9..32e2e11 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1707,7 +1707,7 @@ void ScCheckListBox::CheckEntry( SvTreeListEntry* 
pParent, bool bCheck )
 SvTreeListEntry* ScCheckListBox::ShowCheckEntry( const OUString& sName, 
ScCheckListMember& rMember, bool bShow, bool bCheck )
 {
 SvTreeListEntry* pEntry = nullptr;
-if ( !rMember.mbDate || ( rMember.mbDate && rMember.mpParent ) )
+if (!rMember.mbDate || rMember.mpParent)
 pEntry = FindEntry( rMember.mpParent, sName );
 
 if ( bShow )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/LOOLWSD.cpp loolwsd/loolwsd.xml.in loolwsd/test

2016-06-20 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp  |7 +++
 loolwsd/loolwsd.xml.in   |5 +
 loolwsd/test/Makefile.am |2 ++
 3 files changed, 14 insertions(+)

New commits:
commit e4de35737c6f6396a92ab02f599a4777e9547c55
Author: Ashod Nakashian 
Date:   Wed Jun 15 18:46:13 2016 -0400

loolwsd: max_concurrency setting added

Change-Id: Iae3789d26ed2e1aba3806a6f99511fa6c7097988
(cherry picked from commit f7587443721c66b0cbf2243ae00d799bfa8c6891)
Reviewed-on: https://gerrit.libreoffice.org/26509
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 192c332..1e27187 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -1256,6 +1257,12 @@ void LOOLWSD::initialize(Application& self)
 NumPreSpawnedChildren = config().getUInt("num_prespawn_children", 1);
 }
 
+const auto maxConcurrency = 
config().getInt("per_document.max_concurrency");
+if (maxConcurrency > 0)
+{
+setenv("MAX_CONCURRENCY", std::to_string(maxConcurrency).c_str(), 1);
+}
+
 StorageBase::initialize();
 
 ServerApplication::initialize(self);
diff --git a/loolwsd/loolwsd.xml.in b/loolwsd/loolwsd.xml.in
index cb524a8..96c80dc 100644
--- a/loolwsd/loolwsd.xml.in
+++ b/loolwsd/loolwsd.xml.in
@@ -1,5 +1,7 @@
 
 
+
+
 
 
 
@@ -10,6 +12,9 @@
 
 
 1
+
+4
+
 
 loleaflet.html
 
diff --git a/loolwsd/test/Makefile.am b/loolwsd/test/Makefile.am
index c36cc2a..24c350c 100644
--- a/loolwsd/test/Makefile.am
+++ b/loolwsd/test/Makefile.am
@@ -1,3 +1,5 @@
+# Cap threads pools to 4.
+export MAX_CONCURRENCY=4
 AUTOMAKE_OPTION = serial-tests
 
 check_PROGRAMS = test
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Miklos Vajna
 sw/source/filter/html/htmltabw.cxx   |   58 +-
 sw/source/filter/inc/wrtswtbl.hxx|   40 +++
 sw/source/filter/writer/wrtswtbl.cxx |  198 +--
 3 files changed, 148 insertions(+), 148 deletions(-)

New commits:
commit aab2af1557d00a76258899c97bc024e85adb0ba0
Author: Miklos Vajna 
Date:   Mon Jun 20 09:15:18 2016 +0200

sw: prefix members of SwWriteTable

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

diff --git a/sw/source/filter/html/htmltabw.cxx 
b/sw/source/filter/html/htmltabw.cxx
index 9582d1f..fb3fa03 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -107,7 +107,7 @@ SwHTMLWrtTable::SwHTMLWrtTable( const SwHTMLTableLayout 
*pLayoutInfo )
 : SwWriteTable(nullptr, pLayoutInfo)
 {
 // Einige Twip-Werte an Pixel-Grenzen anpassen
-if( bCollectBorderWidth )
+if( m_bCollectBorderWidth )
 PixelizeBorders();
 }
 
@@ -126,9 +126,9 @@ void SwHTMLWrtTable::Pixelize( sal_uInt16& rValue )
 
 void SwHTMLWrtTable::PixelizeBorders()
 {
-Pixelize( nBorder );
-Pixelize( nCellSpacing );
-Pixelize( nCellPadding );
+Pixelize( m_nBorder );
+Pixelize( m_nCellSpacing );
+Pixelize( m_nCellPadding );
 }
 
 bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox,
@@ -269,7 +269,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
 if ( !nRowSpan )
 return;
 
-SwWriteTableCol *pCol = aCols[nCol];
+SwWriteTableCol *pCol = m_aCols[nCol];
 bool bOutWidth = true;
 
 const SwStartNode* pSttNd = pBox->GetSttNd();
@@ -328,7 +328,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
 sal_uInt32 nPrcWidth = SAL_MAX_UINT32;
 if( bOutWidth )
 {
-if( bLayoutExport )
+if( m_bLayoutExport )
 {
 if( pCell->HasPrcWidthOpt() )
 {
@@ -381,7 +381,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
 sOut.append(static_cast(aPixelSz.Width()));
 }
 sOut.append("\"");
-if( !bLayoutExport && nColSpan==1 )
+if( !m_bLayoutExport && nColSpan==1 )
 pCol->SetOutWidth( false );
 }
 
@@ -572,10 +572,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 
eAlign,
 // Wert fur RULES bestimmen
 bool bRowsHaveBorder = false;
 bool bRowsHaveBorderOnly = true;
-SwWriteTableRow *pRow = aRows[0];
-for( SwWriteTableRows::size_type nRow=1; nRow < aRows.size(); ++nRow )
+SwWriteTableRow *pRow = m_aRows[0];
+for( SwWriteTableRows::size_type nRow=1; nRow < m_aRows.size(); ++nRow )
 {
-SwWriteTableRow *pNextRow = aRows[nRow];
+SwWriteTableRow *pNextRow = m_aRows[nRow];
 bool bBorder = ( pRow->bBottomBorder || pNextRow->bTopBorder );
 bRowsHaveBorder |= bBorder;
 bRowsHaveBorderOnly &= bBorder;
@@ -595,10 +595,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 
eAlign,
 
 bool bColsHaveBorder = false;
 bool bColsHaveBorderOnly = true;
-SwWriteTableCol *pCol = aCols[0];
-for( SwWriteTableCols::size_type nCol=1; nColbRightBorder || pNextCol->bLeftBorder );
 bColsHaveBorder |= bBorder;
 bColsHaveBorderOnly &= bBorder;
@@ -642,16 +642,16 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 
eAlign,
 }
 
 // WIDTH ausgeben: Stammt aus Layout oder ist berechnet
-if( nTabWidth )
+if( m_nTabWidth )
 {
 sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
 append("=\"");
 if( HasRelWidths() )
-sOut.append(static_cast(nTabWidth)).append('%');
+sOut.append(static_cast(m_nTabWidth)).append('%');
 else if( Application::GetDefaultDevice() )
 {
 sal_Int32 nPixWidth = 
Application::GetDefaultDevice()->LogicToPixel(
-Size(nTabWidth,0), MapMode(MAP_TWIP) ).Width();
+Size(m_nTabWidth,0), MapMode(MAP_TWIP) ).Width();
 if( !nPixWidth )
 nPixWidth = 1;
 
@@ -690,11 +690,11 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 
eAlign,
 
 // CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
 sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellpadding).
-
append("=\"").append(static_cast(SwHTMLWriter::ToPixel(nCellPadding,false))).append("\"");
+
append("=\"").append(static_cast(SwHTMLWriter::ToPixel(m_nCellPadding,false))).append("\"");
 
 // CELLSPACING ausgeben: Stammt aus Layout oder ist berechnet
 sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing).
-
append("=\"").append(static_cast(SwHTMLWriter::ToPixel(nCellSpacing,false))).append("\"");
+
append("=\"").append(static_cast(SwHTMLWriter::ToPixel(m_nCellSpacing,false))).append("\"");
 
 rWrt.Strm().WriteCharPtr( sOut.makeS

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

2016-06-20 Thread Xisco Fauli
 unotools/source/config/defaultoptions.cxx |2 +-
 unotools/source/config/misccfg.cxx|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fb784cf569ad2a27d844d7c52f8a804aa2f8deaa
Author: Xisco Fauli 
Date:   Wed Jun 15 00:50:57 2016 +0200

Mark these functions as final

Comment from Michael Stahl in Gerrit:
"to prevent potential disasters if somebody adds
a sub-class and overrides ImplCommit,
which is then not called here."

Change-Id: I2d991c713734fd516827a5dd6c8929aa64e59409
Reviewed-on: https://gerrit.libreoffice.org/26278
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/unotools/source/config/defaultoptions.cxx 
b/unotools/source/config/defaultoptions.cxx
index 0bcba50..5d0ad67 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -99,7 +99,7 @@ public:
 virtual voidNotify( const css::uno::Sequence& 
aPropertyNames) override;
 
 private:
-virtual voidImplCommit() override;
+virtual voidImplCommit() final override;
 };
 
 // global 
diff --git a/unotools/source/config/misccfg.cxx 
b/unotools/source/config/misccfg.cxx
index d50542c..afb59da 100644
--- a/unotools/source/config/misccfg.cxx
+++ b/unotools/source/config/misccfg.cxx
@@ -46,7 +46,7 @@ private:
 static const css::uno::Sequence GetPropertyNames();
 voidLoad();
 
-virtual voidImplCommit() override;
+virtual voidImplCommit() final override;
 
 public:
 SfxMiscCfg( );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Stephan Bergmann
 vcl/unx/kde4/KDESalGraphics.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 149edab4435256b13a8681ac69bd4c35f6da8bb7
Author: Stephan Bergmann 
Date:   Mon Jun 20 12:28:21 2016 +0200

-Werror,-Wswitch

Change-Id: I319f932f24a5b4c2eb331eac6795731a1bc483ca

diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx
index e6536e3..a31eca9 100644
--- a/vcl/unx/kde4/KDESalGraphics.cxx
+++ b/vcl/unx/kde4/KDESalGraphics.cxx
@@ -403,6 +403,8 @@ bool KDESalGraphics::drawNativeControl( ControlType type, 
ControlPart part,
 draw( QStyle::CC_ComboBox, &option, m_image.get(),
   vclStateValue2StateFlag(nControlState, value) );
 break;
+default:
+break;
 }
 }
 else if (type == ControlType::ListNode)
@@ -761,6 +763,8 @@ bool KDESalGraphics::getNativeControlRegion( ControlType 
type, ControlPart part,
 case ControlPart::ListboxWindow:
 retVal = true;
 break;
+default:
+break;
 }
 break;
 }
@@ -814,6 +818,8 @@ bool KDESalGraphics::getNativeControlRegion( ControlType 
type, ControlPart part,
 w = 
QApplication::style()->pixelMetric(QStyle::PM_ExclusiveIndicatorWidth);
 retVal = true;
 break;
+default:
+break;
 }
 if (retVal) {
 contentRect = QRect(0, 0, w, h);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Akshay Deep
 sfx2/source/control/recentdocsview.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 487a6b491f8a514541eccf3aef20277493c66744
Author: Akshay Deep 
Date:   Sun Jun 19 11:13:04 2016 +0530

tdf#79889 Make Recent Docs thumbnail titles consistent with recent files 
menu

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

diff --git a/sfx2/source/control/recentdocsview.cxx 
b/sfx2/source/control/recentdocsview.cxx
index abfc888..d303801 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -180,8 +180,6 @@ void RecentDocsView::Reload()
 
 if (rRecentEntry[j].Name == "URL")
 a >>= aURL;
-else if (rRecentEntry[j].Name == "Title")
-a >>= aTitle;
 //fdo#74834: only load thumbnail if the corresponding option is 
not disabled in the configuration
 else if (rRecentEntry[j].Name == "Thumbnail" && 
officecfg::Office::Common::History::RecentDocsThumbnail::get())
 {
@@ -199,6 +197,13 @@ void RecentDocsView::Reload()
 }
 }
 
+if(!aURL.isEmpty())
+{
+INetURLObject  aURLObj( aURL );
+//Remove extension from url's last segment and use it as title
+aTitle = aURLObj.GetBase(); //DECODE_WITH_CHARSET
+}
+
 if (isAcceptedFile(aURL))
 {
 insertItem(aURL, aTitle, aThumbnail, i+1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: tdf#50916 : Calc : Dynamic column container

2016-06-20 Thread Dennis Francis
Adding Markus and Eike to make sure they did not miss my last post in this
thread.

Thanks in advance for your feedback.

Thanks,
Dennis


On Fri, Jun 10, 2016 at 3:08 PM, Dennis Francis 
wrote:

> Hi All
>
> It has been quite a while since I worked on this bug. Lately I have been
> thinking about "a better way to handle row formattings".
> In the current setting, if someone formats whole row, it is required that
> we have all columns from 0 to MAXCOL allocated, which is bad when MAXCOL is
> a big number.
>
> The formatting attributes of a column are stored in ScColumn::pAttrArray (
> type is ScAttrArray* )
>
> The methods of ScAttrArray are mostly to set and get specific attributes
> in addition to
> SetPattern(), SetPatternArea(), GetPattern() and GetPatternRange() which
> sets/gets whole set of formatting attributes for a row/row segment.
>
> One of my ideas to solve the row formatting issue was to create and
> maintain a ScAttrArray object in ScTable (say aRowAttrArray) to hold only
> the row formattings.
> In the ScTable *set* methods related to formatting we could check if the
> request is for the column range 0 to MAXCOL (full row operation) and
> store the specified row formatting in aRowAttrArray in addition to letting
> the existing columns to receive the row formatting.
>
> *For example* :
>
> void ScTable::ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL
> nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle )
> {
> if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
> {
> PutInOrder(nStartCol, nEndCol);
> PutInOrder(nStartRow, nEndRow);
> for (SCCOL i = nStartCol; i <= nEndCol; i++)
> aCol[i].ApplyStyleArea(nStartRow, nEndRow, rStyle);
> }
> }
>
> can be modified to :
>
> void ScTable::ApplyStyleArea( SCCOL nStartCol, SCROW nStartRow, SCCOL
> nEndCol, SCROW nEndRow, const ScStyleSheet& rStyle )
> {
> if (ValidColRow(nStartCol, nStartRow) && ValidColRow(nEndCol, nEndRow))
> {
> PutInOrder(nStartCol, nEndCol);
> PutInOrder(nStartRow, nEndRow);
>
> if( nStartCol == 0 && nEndCol == MAXCOL )
> {
> aRowAttrArray.ApplyStyleArea(nStartRow, nEndRow,
> const_cast(&rStyle));
> SCCOL nLastCol = aCol.size() - 1;
> for (SCCOL i = 0; i <= nLastCol; i++)
> aCol[i].ApplyStyleArea(nStartRow, nEndRow, rStyle);
> }
> else
> {
> if ( aCol.size() <= nEndCol )
> aCol.CreateCol( nEndCol, nTab ); // This method has to be
> added again as the commit for loplugin:unusedmethods removed it.
> for (SCCOL i = nStartCol; i <= nEndCol; i++)
> aCol[i].ApplyStyleArea(nStartRow, nEndRow, rStyle);
> }
> }
> }
>
> Now this aRowAttrArray can be used to instantiate pAttrArray of column to
> be created later on as it represents the attributes of all columns that are
> yet to be created.
>
> Next we need to modify the Get methods of ScTable related to formatting in
> a way that it will respond with
> correct formatting on the not-yet-created columns.
>
> *For example* :
>
> const ScPatternAttr* ScTable::GetPattern( SCCOL nCol, SCROW nRow ) const
> {
>  if (ValidColRow(nCol,nRow))
>  return aCol[nCol].GetPattern( nRow );
>  else
>  {
>  OSL_FAIL("wrong column or row");
>  return pDocument->GetDefPattern();  // for safety
>  }
> }
>
> needs to be modified to :
>
> const ScPatternAttr* ScTable::GetPattern( SCCOL nCol, SCROW nRow ) const
> {
>  if (!ValidColRow(nCol,nRow))
>  {
>  OSL_FAIL("wrong column or row");
>  return pDocument->GetDefPattern();  // for safety
>  }
>  if ( nCol < aCol.size() )
>  return aCol[nCol].GetPattern( nRow );
>  return aRowAttrArray.GetPattern( nRow );
> }
>
>
>
>
> While the above idea might work for a new document getting edited; but I
> am not sure what the situation is when a non trivial document is
> loaded/saved. During file loading if row attributes get applied column by
> column separately, it will defeat the idea presented in the sample code
> above.
> *For example*, a row stylesheet get applied by the import code by calling
> either :
>
> 1) for ( nCol = 0; nCol <= MAXCOL; ++nCol)
>ScTable::ApplyStyle(nCol, nRow, rStyle)
> or
>
> 2) ScTable::ApplyStyleArea( 0, nRow, MAXCOL, nRow, rStyle )
>
> In case 2) we can avoid creating all columns by special handling, but not
> in case 1)
>
> In oox and excel import filters, it looks like attributes are applied
> column by column (more like case 1)
> See
> http://opengrok.libreoffice.org/xref/core/sc/source/filter/oox/sheetdatabuffer.cxx#496
> and
>
> http://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xistyle.cxx#2030
> where it calls ScDocumentImport::setAttrEntries( SCTAB nTab, SCCOL nCol,
> Attrs& rAttrs ), which in-turn sets the Attr entries by directly
> manipulating pAttrArray of each colum

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

2016-06-20 Thread Stephan Bergmann
 comphelper/source/container/container.cxx   |5 ++-
 comphelper/source/eventattachermgr/eventattachermgr.cxx |   21 +---
 comphelper/source/misc/types.cxx|5 ++-
 include/comphelper/uno3.hxx |8 ++
 4 files changed, 21 insertions(+), 18 deletions(-)

New commits:
commit 50a0473e821081c1db2646dd4c3fcc24f5c11bf3
Author: Stephan Bergmann 
Date:   Mon Jun 20 11:43:37 2016 +0200

Clean up uses of Any::getValue() in comphelper

Change-Id: I433cca20fb29c6b6ede934edcb2e200f15b060f2

diff --git a/comphelper/source/container/container.cxx 
b/comphelper/source/container/container.cxx
index df7c75f..00e3b77 100644
--- a/comphelper/source/container/container.cxx
+++ b/comphelper/source/container/container.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 
@@ -65,7 +66,7 @@ css::uno::Reference< css::uno::XInterface> 
IndexAccessIterator::Next()
 if (xContainerAccess.is() && xContainerAccess->getCount() && 
ShouldStepInto(xContainerAccess))
 {
 css::uno::Any aElement(xContainerAccess->getByIndex(0));
-xSearchLoop = *static_cast const *>(aElement.getValue());
+xSearchLoop = 
*o3tl::doAccess>(aElement);
 bCheckingStartingPoint = false;
 
 m_arrChildIndizies.push_back((sal_Int32)0);
@@ -90,7 +91,7 @@ css::uno::Reference< css::uno::XInterface> 
IndexAccessIterator::Next()
 ++nOldSearchChildIndex;
 // and check the next child
 css::uno::Any 
aElement(xContainerAccess->getByIndex(nOldSearchChildIndex));
-xSearchLoop = *static_cast const *>(aElement.getValue());
+xSearchLoop = 
*o3tl::doAccess>(aElement);
 bCheckingStartingPoint = false;
 // and update its position in the list.
 
m_arrChildIndizies.push_back((sal_Int32)nOldSearchChildIndex);
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx 
b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index e4f0698..cf3232b 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -284,24 +287,24 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( 
const AllEventObject& Even
 
 case TypeClass_BOOLEAN:
 // FALSE -> Return
-if( !(*static_cast(aRet.getValue())) )
+if( !(*o3tl::forceAccess(aRet)) )
 return aRet;
 break;
 
 case TypeClass_STRING:
 // none empty string -> return
-if( !(static_cast(aRet.getValue()))->isEmpty() )
+if( !o3tl::forceAccess(aRet)->isEmpty() )
 return aRet;
 break;
 
 // none zero number -> return
-case TypeClass_FLOAT:   if( *static_cast(aRet.getValue()) )return aRet; break;
-case TypeClass_DOUBLE:  if( *static_cast(aRet.getValue()) )   return aRet; break;
-case TypeClass_BYTE:if( *static_cast(aRet.getValue()) )return aRet; break;
-case TypeClass_SHORT:   if( *static_cast(aRet.getValue()) )return aRet; break;
-case TypeClass_LONG:if( *static_cast(aRet.getValue()) )return aRet; break;
-case TypeClass_UNSIGNED_SHORT:  if( *static_cast(aRet.getValue()) )   return aRet; break;
-case TypeClass_UNSIGNED_LONG:   if( *static_cast(aRet.getValue()) )   return aRet; break;
+case TypeClass_FLOAT:   if( 
*o3tl::forceAccess(aRet) )return aRet; break;
+case TypeClass_DOUBLE:  if( 
*o3tl::forceAccess(aRet) )   return aRet; break;
+case TypeClass_BYTE:if( 
*o3tl::forceAccess(aRet) )return aRet; break;
+case TypeClass_SHORT:   if( 
*o3tl::forceAccess(aRet) )return aRet; break;
+case TypeClass_LONG:if( 
*o3tl::forceAccess(aRet) )return aRet; break;
+case TypeClass_UNSIGNED_SHORT:  if( 
*o3tl::forceAccess(aRet) )   return aRet; break;
+case TypeClass_UNSIGNED_LONG:   if( 
*o3tl::forceAccess(aRet) )   return aRet; break;
 
 default:
 OSL_ASSERT(false);
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index e70e19e..e8ccfed 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #in

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

2016-06-20 Thread Katarina Behrens
 sd/source/ui/sidebar/SlideBackground.cxx |   35 ++-
 sd/source/ui/sidebar/SlideBackground.hxx |2 +
 2 files changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 4833ed2f7fed76cba5fa40b0490da14c6838e8b6
Author: Katarina Behrens 
Date:   Sat Jun 18 14:15:07 2016 +0200

tdf#100441: Fix listbox state in master vs. normal mode

Events appear in following order:
normal -> master: 1. EID_EDIT_MODE_MASTER, 2. EID_EDIT_VIEW_SELECTION
master -> normal: 1. EID_EDIT_MODE_NORMAL, 2. EID_END_TEXT_EDIT

This is only partial fix, selecting the right master page in other than
normal mode is still broken

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

diff --git a/sd/source/ui/sidebar/SlideBackground.cxx 
b/sd/source/ui/sidebar/SlideBackground.cxx
index d2fb73c..10a6c91 100644
--- a/sd/source/ui/sidebar/SlideBackground.cxx
+++ b/sd/source/ui/sidebar/SlideBackground.cxx
@@ -94,6 +94,7 @@ SlideBackground::SlideBackground(
 mpGradientItem(),
 mpHatchItem(),
 mpBitmapItem(),
+mbEditModeChangePending(false),
 mxFrame(rxFrame),
 maContext(),
 mbTitle(false),
@@ -302,6 +303,10 @@ void SlideBackground::addListener()
 tools::EventMultiplexerEvent::EID_CURRENT_PAGE |
 tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED |
 tools::EventMultiplexerEvent::EID_SHAPE_CHANGED |
+tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL |
+tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER |
+tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION |
+tools::EventMultiplexerEvent::EID_END_TEXT_EDIT |
 tools::EventMultiplexerEvent::EID_VIEW_ADDED);
 }
 
@@ -321,17 +326,29 @@ IMPL_LINK_TYPED(SlideBackground, EventMultiplexerListener,
 case tools::EventMultiplexerEvent::EID_SHAPE_CHANGED:
 populateMasterSlideDropdown();
 break;
-case tools::EventMultiplexerEvent::EID_MAIN_VIEW_ADDED:
+case tools::EventMultiplexerEvent::EID_EDIT_MODE_NORMAL:
+case tools::EventMultiplexerEvent::EID_EDIT_MODE_MASTER:
+mbEditModeChangePending = true;
+break;
+case tools::EventMultiplexerEvent::EID_EDIT_VIEW_SELECTION:
+case tools::EventMultiplexerEvent::EID_END_TEXT_EDIT:
 {
-ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
-
-if (pMainViewShell)
+if (mbEditModeChangePending)
 {
-DrawViewShell* pDrawViewShell = 
static_cast(pMainViewShell);
-EditMode eMode = pDrawViewShell->GetEditMode();
+ViewShell* pMainViewShell = mrBase.GetMainViewShell().get();
+
+if (pMainViewShell)
+{
+DrawViewShell* pDrawViewShell = 
static_cast(pMainViewShell);
+EditMode eMode = pDrawViewShell->GetEditMode();
+
+if ( eMode == EM_MASTERPAGE)
+mpMasterSlide->Disable();
+else // EM_PAGE
+mpMasterSlide->Enable();
+}
 
-if ( eMode == EM_MASTERPAGE)
-mpMasterSlide->Disable();
+mbEditModeChangePending = false;
 }
 }
 break;
@@ -405,8 +422,6 @@ void SlideBackground::updateMasterSlideSelection()
 SdPage* pMasterPage = static_cast(&rMasterPage);
 mpMasterSlide->SelectEntry(pMasterPage->GetName());
 }
-else
-mpMasterSlide->SetNoSelection();
 }
 
 void SlideBackground::dispose()
diff --git a/sd/source/ui/sidebar/SlideBackground.hxx 
b/sd/source/ui/sidebar/SlideBackground.hxx
index 65d9080..1fba18a 100644
--- a/sd/source/ui/sidebar/SlideBackground.hxx
+++ b/sd/source/ui/sidebar/SlideBackground.hxx
@@ -102,6 +102,8 @@ private:
 std::unique_ptr< XFillHatchItem > mpHatchItem;
 std::unique_ptr< XFillBitmapItem > mpBitmapItem;
 
+bool mbEditModeChangePending;
+
 css::uno::Reference mxFrame;
 ::sfx2::sidebar::EnumContextmaContext;
 bool mbTitle;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Review of Sidebar & It's functionality - Weekly Report #4

2016-06-20 Thread Susobhan Ghosh
Hi,

Another week of GSoC is now over, and this is what I've done over the past
week:

1. Writer Page Tab: Tweaks made to patches, most merged to master
a) Margin Panel has been removed (change merged to Master) -
https://gerrit.libreoffice.org/#/c/26217/
b) The margin preset controls have been moved to Format panel (merged to
Master) - https://gerrit.libreoffice.org/25520
c) Header and Footer Panels merged to Master -
https://gerrit.libreoffice.org/25781
d) The styles panel is still under review -
https://gerrit.libreoffice.org/#/c/26020/

2. The Slide Background Panel for Impress has been enabled for Draw and
renamed as the Page Background Panel. Merged to master and 5.2 (
https://gerrit.libreoffice.org/26159 and
https://gerrit.libreoffice.org/26357)

3. Area Content Panel - Working to add Import Bitmap functionality and fix
a few existing issues (
https://bugs.documentfoundation.org/show_bug.cgi?id=90078#c4)

TO-DO:
1. Start with Shapes Tab once Area Content Panel issues are resolved.

Regards,
Susobhan Ghosh
IRC: susobhang70
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: desktop/source include/vcl sc/source svtools/source vcl/osx vcl/source vcl/unx vcl/win

2016-06-20 Thread Noel Grandin
 desktop/source/splash/splash.cxx  |6 
 include/vcl/salnativewidgets.hxx  |   92 -
 sc/source/ui/app/inputwin.cxx |2 
 sc/source/ui/cctrl/checklistmenu.cxx  |   20 -
 svtools/source/contnr/svimpbox.cxx|4 
 svtools/source/contnr/svlbitm.cxx |8 
 svtools/source/contnr/treelistbox.cxx |4 
 svtools/source/control/headbar.cxx|   12 -
 svtools/source/control/tabbar.cxx |4 
 svtools/source/control/toolbarmenu.cxx|   32 +--
 vcl/osx/salnativewidgets.cxx  |  155 +++
 vcl/source/app/help.cxx   |6 
 vcl/source/control/button.cxx |   74 +++
 vcl/source/control/combobox.cxx   |8 
 vcl/source/control/edit.cxx   |   12 -
 vcl/source/control/imp_listbox.cxx|   28 +-
 vcl/source/control/listbox.cxx|   18 -
 vcl/source/control/prgsbar.cxx|4 
 vcl/source/control/scrbar.cxx |   68 +++---
 vcl/source/control/slider.cxx |6 
 vcl/source/control/spinbtn.cxx|4 
 vcl/source/control/spinfld.cxx|   34 +--
 vcl/source/control/tabctrl.cxx|   26 +-
 vcl/source/window/brdwin.cxx  |   16 -
 vcl/source/window/decoview.cxx|8 
 vcl/source/window/dialog.cxx  |8 
 vcl/source/window/dockingarea.cxx |   14 -
 vcl/source/window/menu.cxx|   38 +--
 vcl/source/window/menubarwindow.cxx   |   20 -
 vcl/source/window/menufloatingwindow.cxx  |   14 -
 vcl/source/window/paint.cxx   |2 
 vcl/source/window/status.cxx  |   22 +-
 vcl/source/window/tabpage.cxx |6 
 vcl/source/window/toolbox.cxx |   36 +--
 vcl/source/window/window.cxx  |4 
 vcl/unx/gtk/salnativewidgets-gtk.cxx  |  306 +++---
 vcl/unx/gtk3/gtk3salnativewidgets-gtk.cxx |  180 -
 vcl/unx/kde/salnativewidgets-kde.cxx  |  122 +--
 vcl/unx/kde4/KDESalGraphics.cxx   |   96 -
 vcl/win/gdi/salnativewidgets-luna.cxx |  210 ++--
 40 files changed, 867 insertions(+), 862 deletions(-)

New commits:
commit cf5208b67180dc1deaeca611706087b1e2acc1ae
Author: Noel Grandin 
Date:   Fri Jun 10 19:55:12 2016 +0200

Convert PART to scoped enum

Change-Id: If4c2849beb207593d3d450ae3846ed24eaf66ca4
Reviewed-on: https://gerrit.libreoffice.org/26173
Reviewed-by: Jochen Nitschke 
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index d598060..091eeeb 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -620,7 +620,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& 
rRenderContext, const Rectang
 
 //native drawing
 // in case of native controls we need to draw directly to the window
-if (pSpl->_bNativeProgress && 
rRenderContext.IsNativeControlSupported(ControlType::IntroProgress, 
PART_ENTIRE_CONTROL))
+if (pSpl->_bNativeProgress && 
rRenderContext.IsNativeControlSupported(ControlType::IntroProgress, 
ControlPart::Entire))
 {
 rRenderContext.DrawBitmapEx(Point(), pSpl->_aIntroBmp);
 
@@ -628,7 +628,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& 
rRenderContext, const Rectang
 Rectangle aDrawRect( Point(pSpl->_tlx, pSpl->_tly), Size( 
pSpl->_barwidth, pSpl->_barheight));
 Rectangle aNativeControlRegion, aNativeContentRegion;
 
-if (rRenderContext.GetNativeControlRegion(ControlType::IntroProgress, 
PART_ENTIRE_CONTROL, aDrawRect,
+if (rRenderContext.GetNativeControlRegion(ControlType::IntroProgress, 
ControlPart::Entire, aDrawRect,
   ControlState::ENABLED, 
aValue, OUString(),
   aNativeControlRegion, 
aNativeContentRegion))
 {
@@ -637,7 +637,7 @@ void SplashScreenWindow::Paint(vcl::RenderContext& 
rRenderContext, const Rectang
   aDrawRect.Bottom() += (nProgressHeight - pSpl->_barheight)/2;
 }
 
-if ((rRenderContext.DrawNativeControl(ControlType::IntroProgress, 
PART_ENTIRE_CONTROL, aDrawRect,
+if ((rRenderContext.DrawNativeControl(ControlType::IntroProgress, 
ControlPart::Entire, aDrawRect,
   ControlState::ENABLED, aValue, 
pSpl->_sProgressText)))
 {
 return;
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 37487f4..54b4209 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -48,7 +48,7 @@ enum class ControlType {
 Editbox=  30,
 // Control that allows text entry, but without the usual border
 // Has to be handled separately, because this one cannot handle
-// HAS_BACKGROUND_TEXTURE, which is dra

[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loleaflet/dist

2016-06-20 Thread Pranav Kant
 loleaflet/dist/loleaflet.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit cbc997aa8f018859032de23b8898db35e4b8300b
Author: Pranav Kant 
Date:   Mon Jun 20 14:11:52 2016 +0530

bccu#1894: Don't show any outline for menubar selection

Change-Id: Ifa3095247a0c18c599c2c294a473add8f6d48104
(cherry picked from commit 7701de1e4887e961eeaad20cd052f9057ede3c93)

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index c82f194..68cbdf2 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -25,6 +25,7 @@
 left: 0;
 padding-left: 125px;
 z-index: 1000;
+outline: none;
 }
 
 body {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Michael Stahl
 cppuhelper/source/weak.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 1b992e4b470af3e2492b520df93d362fe14b4b69
Author: Michael Stahl 
Date:   Fri Jun 17 21:58:09 2016 +0200

cppuhelper: fix use-after-free race in OWeakConnectionPoint

OWeakObject::m_pWeakConnectionPoint is returned from
OWeakObject::queryAdapter(), and stored in
OWeakRefListener::m_xWeakConnectionPoint.

This is cleared in OWeakRefListener::dispose(), called from
OWeakConnectionPoint::dispose(), called from
OWeakObject::disposeWeakConnectionPoint(), but it can happen that
another thread is in WeakReferenceHelper::get() and has copied
m_xWeakConnectionPoint onto the stack before the OWeakObject is
released and deleted, then calls OWeakConnectionPoint::queryAdapted()
after it is released, accessing the dead m_pObject.

Change-Id: I7782e6fb7e07f5a48cf7064115217376714ba8e8
(cherry picked from commit 131e604073f89e6c1dd54be88b94b7befd881f2e)
Reviewed-on: https://gerrit.libreoffice.org/26442
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index ed1f772..85cf3f6 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -111,6 +111,9 @@ void SAL_CALL OWeakConnectionPoint::dispose() 
throw(css::uno::RuntimeException)
 std::vector> aCopy;
 { // only hold the mutex while we access the field
 MutexGuard aGuard(getWeakMutex());
+// OWeakObject is not the only owner of this, so clear m_pObject
+// so that queryAdapted() won't use it now that it's dead
+m_pObject = nullptr;
 // other code is going to call removeReference while we are doing 
this, so we need a
 // copy, but since we are disposing and going away, we can just take 
the original data
 aCopy.swap(m_aReferences);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loleaflet/dist

2016-06-20 Thread Pranav Kant
 loleaflet/dist/loleaflet.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 7701de1e4887e961eeaad20cd052f9057ede3c93
Author: Pranav Kant 
Date:   Mon Jun 20 14:11:52 2016 +0530

bccu#1894: Don't show any outline for menubar selection

Change-Id: Ifa3095247a0c18c599c2c294a473add8f6d48104

diff --git a/loleaflet/dist/loleaflet.css b/loleaflet/dist/loleaflet.css
index c82f194..68cbdf2 100644
--- a/loleaflet/dist/loleaflet.css
+++ b/loleaflet/dist/loleaflet.css
@@ -25,6 +25,7 @@
 left: 0;
 padding-left: 125px;
 z-index: 1000;
+outline: none;
 }
 
 body {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Pushing to LibO-5-2

2016-06-20 Thread Stephan Bergmann

On 06/19/2016 09:07 AM, jan iversen wrote:

https://wiki.documentfoundation.org/Development/Branches


...states, for "libreoffice-X-Y": "Only fixes go in, no features".  I'd 
encourage everyone to read that as "only fixes to recently introduced 
featues or recently introduced regressions, or security relevant fixes." 
 Fixes for minor issues that had been broken since ~forever can likely 
wait for the next LO X+1.

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


Re: LibreOffice fails to link when built with recent clang

2016-06-20 Thread Stephan Bergmann

On 06/20/2016 10:19 AM, Stephan Bergmann wrote:

You need the patches from  "[GCC]
PR23529 Sema part of attrbute abi_tag support" and
 "[GCC] PR23529 Mangler part of attrbute
abi_tag support" to make Clang support the abi_tag attribute.


(The first one is closed for a while now, so you should already have it 
included in your trunk Clang sources.)

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


Re: LibreOffice fails to link when built with recent clang

2016-06-20 Thread Stephan Bergmann

On 06/18/2016 10:28 PM, Davide Italiano wrote:

on Fedora 22


I guess F22 has a libstdc++ using abi_tag by now, too (as have F23 and 
later).



Clang Version:
$ ~/work/llvm/build-release/bin/clang++ --version
clang version 3.9.0 (trunk 272933) (llvm/trunk 273027)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/davide/work/llvm/build-release/bin


You need the patches from  "[GCC] 
PR23529 Sema part of attrbute abi_tag support" and 
 "[GCC] PR23529 Mangler part of attrbute 
abi_tag support" to make Clang support the abi_tag attribute.

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


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

2016-06-20 Thread Jan Holesovsky
 sw/source/core/doc/DocumentStatisticsManager.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2d67042dc2f0672d1aca4784e61eb2a5d0e91e08
Author: Jan Holesovsky 
Date:   Mon Jun 20 10:15:23 2016 +0200

tdf#95797: Don't jump to the cursor position after auto-save.

Apparently the commit 07c7c88bc2d9d860ea92ab562ea0431ec1949b29 changed
the condition; I suppose that not deliberately.

Big thanks to raal for the bisect!

Change-Id: I775e133396ceb763e31aca101d365880652e1ac8

diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx 
b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 90bc30b..51d398e 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -49,9 +49,9 @@ namespace
 {
 if (!m_pViewShell)
 return;
-for(SwViewShell& rShell : m_pViewShell->GetRingContainer())
+for (SwViewShell& rShell : m_pViewShell->GetRingContainer())
 {
-if(rShell.IsViewLocked())
+if (!rShell.IsViewLocked())
 {
 m_aViewWasUnLocked.push_back(&rShell);
 rShell.LockView(true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Jan Holesovsky
 sw/source/core/doc/DocumentStatisticsManager.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4fabfb654bc65a564da1162f10f441efce167706
Author: Jan Holesovsky 
Date:   Mon Jun 20 10:15:23 2016 +0200

tdf#95797: Don't jump to the cursor position after auto-save.

Apparently the commit 07c7c88bc2d9d860ea92ab562ea0431ec1949b29 changed
the condition; I suppose that not deliberately.

Big thanks to raal for the bisect!

Change-Id: I775e133396ceb763e31aca101d365880652e1ac8

diff --git a/sw/source/core/doc/DocumentStatisticsManager.cxx 
b/sw/source/core/doc/DocumentStatisticsManager.cxx
index 81ed9f4..dfa6d1d 100644
--- a/sw/source/core/doc/DocumentStatisticsManager.cxx
+++ b/sw/source/core/doc/DocumentStatisticsManager.cxx
@@ -49,9 +49,9 @@ namespace
 {
 if (!m_pViewShell)
 return;
-for(SwViewShell& rShell : m_pViewShell->GetRingContainer())
+for (SwViewShell& rShell : m_pViewShell->GetRingContainer())
 {
-if(rShell.IsViewLocked())
+if (!rShell.IsViewLocked())
 {
 m_aViewWasUnLocked.push_back(&rShell);
 rShell.LockView(true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Caolán McNamara
 sc/source/ui/view/gridwin.cxx  |3 ---
 vcl/inc/unx/gtk/glomenu.h  |   10 ++
 vcl/inc/unx/gtk/gtksalmenu.hxx |1 +
 vcl/unx/gtk/glomenu.cxx|   37 +
 vcl/unx/gtk/gtksalmenu.cxx |   32 
 5 files changed, 80 insertions(+), 3 deletions(-)

New commits:
commit 5bbee0969965b2f92288d87c48aaa4b1d95af569
Author: Caolán McNamara 
Date:   Sun Jun 19 17:42:56 2016 +0100

Resolves: tdf#99310 data validity cell range dropdown empty under windows

if I make this block unconditional then it also disappears under Linux
so I speculate that this is why its missing under Windows.

I can't see why this is the way it is (since initial import in 2000),

This is reportedly a problem since

commit dd46727b99d4bb5135451aa7e5e1bdb197373843
Author: Caolán McNamara 
Date:   Tue Apr 5 15:27:38 2016 +0100

Resolves; tdf#87120 no keyboard navigation inside floating windows

(cherry picked from commit c3a5012c5a9699040698505d3e34672382c026b8)

Change-Id: I6159d419bccef851c8f9e965d063882173d91620

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index f106884..fa62d3f 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -283,9 +283,6 @@ void ScFilterListBox::EndInit()
 
 void ScFilterListBox::LoseFocus()
 {
-#ifndef UNX
-Hide();
-#endif
 vcl::Window::LoseFocus();
 }
 
commit 497cb8bd5b4fa58ce01abb5359e894ae810c412d
Author: Caolán McNamara 
Date:   Fri Jun 17 21:15:20 2016 +0100

Resolve: tdf#100429 gtk3: set custom icons in native gtk menus

Change-Id: I4798274f38c34c99d6f22f3c7959ebd9673a8966
(cherry picked from commit 1409b974003ca69e4682507f5d34c55f346b864a)

diff --git a/vcl/inc/unx/gtk/glomenu.h b/vcl/inc/unx/gtk/glomenu.h
index b2ed606..5586aa4 100644
--- a/vcl/inc/unx/gtk/glomenu.h
+++ b/vcl/inc/unx/gtk/glomenu.h
@@ -69,11 +69,21 @@ voidg_lo_menu_set_label 
(GLOMenu
  gint  
   position,
  const 
gchar *label);
 
+voidg_lo_menu_set_icon 
(GLOMenu *menu,
+gint   
  position,
+const 
GIcon *icon);
+
+
 voidg_lo_menu_set_label_to_item_in_section  
(GLOMenu *menu,
  gint  
   section,
  gint  
   position,
  const 
gchar *label);
 
+voidg_lo_menu_set_icon_to_item_in_section  
(GLOMenu *menu,
+gint   
  section,
+gint   
  position,
+const 
GIcon *icon);
+
 gchar * g_lo_menu_get_label_from_item_in_section
(GLOMenu *menu,
  gint  
   section,
  gint  
   position);
diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx
index ad3e1d9..90fcb7d 100644
--- a/vcl/inc/unx/gtk/gtksalmenu.hxx
+++ b/vcl/inc/unx/gtk/gtksalmenu.hxx
@@ -93,6 +93,7 @@ public:
 boolIsItemVisible( unsigned nPos );
 
 voidNativeSetItemText( unsigned nSection, unsigned 
nItemPos, const OUString& rText );
+voidNativeSetItemIcon( unsigned nSection, unsigned 
nItemPos, const Image& rImage );
 boolNativeSetItemCommand( unsigned nSection,
   unsigned nItemPos,
   sal_uInt16 nId,
diff --git a/vcl/unx/gtk/glomenu.cxx b/vcl/unx/gtk/glomenu.cxx
index bf2b701..ffa43e5 100644
--- a/vcl/unx/gtk/glomenu.cxx
+++ b/vcl/unx/gtk/glomenu.cxx
@@ -229,6 +229,23 @@ g_lo_menu_set_label (GLOMenu *menu,
 }
 
 void
+g_lo_menu_set_icon (GLOMenu *menu,
+gint position,
+const GIcon *icon)
+{
+g_return_if_fail (G_IS_LO_MENU (menu));
+
+GVariant *value;
+
+if (icon != nullptr)
+value = g_icon_serialize (const_cast(icon));
+else
+value = nullptr;
+
+g_lo_menu_set_attribute_value (menu, position, G_MENU_ATTRIBUTE_ICON, 
value);
+}
+
+void
 g_lo_menu_set_label_t

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

2016-06-20 Thread Caolán McNamara
 sc/source/ui/view/gridwin.cxx |6 --
 1 file changed, 6 deletions(-)

New commits:
commit 9924925d2c815294d677411acfca8725611d0ca0
Author: Caolán McNamara 
Date:   Sun Jun 19 17:53:15 2016 +0100

ScFilterListBox::LoseFocus doesn't seem to have a purpose...

after the strange code was removed by...

commit c3a5012c5a9699040698505d3e34672382c026b8
Author: Caolán McNamara 
Date:   Sun Jun 19 17:42:56 2016 +0100

Related: tdf#99310 data validity cell range dropdown empty under windows

Change-Id: Icf6acdb2e5fff90aff45704f17f7918c877e166e

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c3afda7..5e46be7 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -219,7 +219,6 @@ private:
 ScFilterBoxMode eMode;
 
 protected:
-virtual voidLoseFocus() override;
 voidSelectHdl();
 
 public:
@@ -282,11 +281,6 @@ void ScFilterListBox::EndInit()
 bInit = false;
 }
 
-void ScFilterListBox::LoseFocus()
-{
-vcl::Window::LoseFocus();
-}
-
 bool ScFilterListBox::PreNotify( NotifyEvent& rNEvt )
 {
 bool bDone = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-06-20 Thread Stephan Bergmann
 sc/source/core/tool/interpr2.cxx |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2606915f0f480af30367a5d0f67adbf930c2c6b9
Author: Stephan Bergmann 
Date:   Mon Jun 20 09:54:14 2016 +0200

Avoid undefined behavior when converting from double to sal_Int16

Change-Id: Iced9d25a15f25076b1c23b064eabfe5f0899882c

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 812c858..c9a73d4 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -305,7 +305,14 @@ void ScInterpreter::ScEasterSunday()
 if ( MustHaveParamCount( GetByte(), 1 ) )
 {
 sal_Int16 nDay, nMonth, nYear;
-nYear = (sal_Int16) ::rtl::math::approxFloor( GetDouble() );
+double x = rtl::math::approxFloor( GetDouble() );
+if (x <= sal_Int32(SAL_MIN_INT16) - 1
+|| x >= sal_Int32(SAL_MAX_INT16) + 1)
+{
+PushIllegalArgument();
+return;
+}
+nYear = static_cast(x);
 if ( nYear < 100 )
 nYear = pFormatter->ExpandTwoDigitYear( nYear );
 if (nYear < 1583 || nYear > 9956)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Update to firebird 3.0 - install build

2016-06-20 Thread Stephan Bergmann

On 06/18/2016 03:37 PM, Lionel Elie Mamane wrote:

So, in my opinion, a solution based on passing a full absolute path to
--with-fb-plugins will not work in both situations. The effect of that
is that the dlopen() call is to
dlopen("/the/full/path/passed/to/with-fplugins/libEngine12.so", ...)

No choice of full path will work in both situations.

My best hunch, whose beginning was in the first part of my email of 2
June with Message-Id <20160602191615.ga32...@capsaicin.mamane.lu>, but
was not completely developed there, is to arrange for the dlopen()
call to be just:

dlopen("libEngine12.so", ...)

Then dlopen() will do a search in various directories as documented in
the manpage dlopen in section 3, and ld.so in section 8: rpath,
LD_LIBRARY_PATH, runpath, /etc/ld.so.cache, the directories configured
in /etc/ld.so.conf, ...

Since we want to control the first directory searched, we will use the
rpath, which is set at runtime. See e.g.

$ objdump -p instdir/program/libfirebird_sdbclo.so|grep RPATH
  RPATH$ORIGIN

"$ORIGIN" is a special value that is replaced at *runtime* by (dixit
"man 8 ld.so") the directory containing the application executable.

AFAIK, that's how LibreOffice itself finds its various subpieces, such
as e.g. libfirebird_sdbclo.so, at least on Unix-like systems like
e.g. GNU/Linux. Anybody on the mailing list can teach us what happens
on Microsoft Windows and MacOS X?


In LO itself:

Link-time recording of dependencies on dynamic libraries is indeed done 
via RPATH on Linux (and via @executable_path/... or @loader_path/... 
relative paths on OS X, and mainly via "everything in one directory, and 
executables picking up dynamic libraries next to them" on Windows).


Dynamic loading of dynamic libraries (via the osl::Module abstraction; 
i.e., dlopen on Linux) is done with absolute paths computed at runtime 
(e.g., by passing macro'fied paths like "$BRAND_BASE_DIR/..." through 
rtl::Bootstrap::expandMacros, or by using osl::Module::loadRelative).

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


Re: [libreoffice-projects] Re: [libreoffice-design] Minutes of the Design Hangout: 2016-Jun-17

2016-06-20 Thread Stephan Bergmann

On 06/17/2016 09:31 PM, Heiko Tietze wrote:

On Freitag, 17. Juni 2016 16:13:46 CEST Stephan Bergmann wrote:

On 06/17/2016 03:47 PM, Heiko Tietze wrote:

Enhancements and proposals
+ Push extensions (Heiko)

Just to clarify: You're talking about .oxt extensions here?


If you want so, yes. Whether binary code or python script, extensions should be 
utilized in a similar ways as for Mozilla's software. I'm aware of the 
problems, beginning with the increased effort to enable external access rather 
than code directly.


Both binary code and Python scripts (and many other things) can be 
included in (.oxt) extensions.  In short, everything that is managed via 
"Tools - Extension Manager..." and everything available at 
 is such an extension.


I just asked because sometimes "extension" is used with different meanings.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice