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

2014-11-16 Thread Stephan Bergmann
 vcl/inc/vcldemo-debug.hxx   |   25 +
 vcl/source/gdi/impimagetree.cxx |4 +---
 vcl/workben/vcldemo.cxx |5 ++---
 3 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit 272d330cec558040d87f8386aa7aaab67f8adab6
Author: Stephan Bergmann 
Date:   Mon Nov 17 08:49:24 2014 +0100

loplugin:unreffun

Change-Id: I27ce8fc805f8b3fa127fb919a9c571de1aeef589

diff --git a/vcl/inc/vcldemo-debug.hxx b/vcl/inc/vcldemo-debug.hxx
new file mode 100644
index 000..37dae24
--- /dev/null
+++ b/vcl/inc/vcldemo-debug.hxx
@@ -0,0 +1,25 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_VCL_INC_VCLDEMO_DEBUG_HXX
+#define INCLUDED_VCL_INC_VCLDEMO_DEBUG_HXX
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+// For vcldemo / debugging
+VCL_DLLPUBLIC css::uno::Sequence< OUString > ImageTree_getAllImageNames();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx
index 9f2741b..fb07567 100644
--- a/vcl/source/gdi/impimagetree.cxx
+++ b/vcl/source/gdi/impimagetree.cxx
@@ -45,6 +45,7 @@
 #include "vcl/settings.hxx"
 #include "vcl/svapp.hxx"
 #include "impimagetree.hxx"
+#include 
 
 namespace {
 
@@ -352,9 +353,6 @@ css::uno::Reference< css::container::XNameAccess > 
ImplImageTree::getNameAccess(
 return m_path.second;
 }
 
-// For vcldemo / debugging
-SAL_DLLPUBLIC css::uno::Sequence< OUString > ImageTree_getAllImageNames();
-
 /// Recursively dump all names ...
 css::uno::Sequence< OUString > ImageTree_getAllImageNames()
 {
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 2238824..1be5351 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -31,12 +31,11 @@
 #include 
 #include 
 
+#include 
+
 #define FIXME_SELF_INTERSECTING_WORKING 0
 #define FIXME_BOUNCE_BUTTON 0
 
-// debugging hook just for us
-SAL_DLLPUBLIC css::uno::Sequence< OUString > ImageTree_getAllImageNames();
-
 using namespace css;
 
 enum RenderStyle {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Tor Lillqvist
 vcl/workben/vcldemo.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 0fcc1718e6cc8cfadabea9ab1344046b716f51df
Author: Tor Lillqvist 
Date:   Mon Nov 17 09:26:21 2014 +0200

WaE: implicit conversion (IntegralCast) from bool to 'int'

Change-Id: I0eef8d71334a29a773aaff80c9d1c1ae8b9d9842

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 94d5492..2238824 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -712,7 +712,7 @@ public:
 Size aSize(maIcons[i].GetSizePixel());
 //  sAL_DEBUG("Draw icon '" << maIconNames[i] << "'");
 
-if (!i % 4)
+if (!(i % 4))
 rDev.DrawBitmapEx(p, maIcons[i]);
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |   21 +++--
 1 file changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 18c50cefd761efe71a5e6957422ed6f153e6ba34
Author: Michael Meeks 
Date:   Mon Nov 17 06:37:06 2014 +

vcldemo: improve my rather trivial inferred alpha maths.

Change-Id: I420628cea2272d6f5af0b13b9c32902627dcf86f

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 7ccde7c..94d5492 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -798,16 +798,25 @@ public:
 // we get the most precision from the largest delta
 long nInverseAlpha = std::max(nAR, std::max(nAG, 
nAB)); // (1-a)
 nInverseAlpha = CLAMP(nInverseAlpha, 0, 255);
+long nAlpha = 255 - nInverseAlpha;
 
 
pMaskAcc->SetPixel(y,x,BitmapColor((sal_Int8)CLAMP(nInverseAlpha,0,255)));
 // now recover the pixels
-long n2R = aColW.GetRed() + aColB.GetRed();
-long n2G = aColW.GetGreen() + aColB.GetGreen();
-long n2B = aColW.GetBlue() + aColB.GetBlue();
+long nR = (aColW.GetRed() + aColB.GetRed() - 
nInverseAlpha) * 128;
+long nG = (aColW.GetGreen() + aColB.GetGreen() - 
nInverseAlpha) * 128;
+long nB = (aColW.GetBlue() + aColB.GetBlue() - 
nInverseAlpha) * 128;
+if (nAlpha == 0)
+{ // doesn't matter what's behind transparency
+nR = nG = nB = 0;
+}
+else
+{
+nR /= nAlpha; nG /= nAlpha; nB /= nAlpha;
+}
 pRecAcc->SetPixel(y,x,BitmapColor(
-
(sal_uInt8)CLAMP((n2R+1)/2-nInverseAlpha,0,255),
-
(sal_uInt8)CLAMP((n2G+1)/2-nInverseAlpha,0,255),
-
(sal_uInt8)CLAMP((n2B+1)/2-nInverseAlpha,0,255)));
+(sal_uInt8)CLAMP(nR,0,255),
+(sal_uInt8)CLAMP(nG,0,255),
+(sal_uInt8)CLAMP(nB,0,255)));
 #undef CLAMP
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 3 commits - vcl/inc vcl/opengl vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/inc/opengl/salbmp.hxx  |2 ++
 vcl/inc/opengl/win/gdiimpl.hxx |1 +
 vcl/inc/opengl/x11/gdiimpl.hxx |1 +
 vcl/inc/openglgdiimpl.hxx  |2 +-
 vcl/opengl/gdiimpl.cxx |4 ++--
 vcl/opengl/salbmp.cxx  |   28 ++--
 vcl/opengl/win/gdiimpl.cxx |6 ++
 vcl/opengl/x11/gdiimpl.cxx |6 ++
 vcl/workben/vcldemo.cxx|   21 +++--
 9 files changed, 52 insertions(+), 19 deletions(-)

New commits:
commit 8c151cbdd5ea2061af469499eda5a70039557cfa
Author: Michael Meeks 
Date:   Mon Nov 17 06:37:06 2014 +

vcldemo: improve my rather trivial inferred alpha maths.

Change-Id: I420628cea2272d6f5af0b13b9c32902627dcf86f

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 9894f4f..336c85d 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -799,16 +799,25 @@ public:
 // we get the most precision from the largest delta
 long nInverseAlpha = std::max(nAR, std::max(nAG, 
nAB)); // (1-a)
 nInverseAlpha = CLAMP(nInverseAlpha, 0, 255);
+long nAlpha = 255 - nInverseAlpha;
 
 
pMaskAcc->SetPixel(y,x,BitmapColor((sal_Int8)CLAMP(nInverseAlpha,0,255)));
 // now recover the pixels
-long n2R = aColW.GetRed() + aColB.GetRed();
-long n2G = aColW.GetGreen() + aColB.GetGreen();
-long n2B = aColW.GetBlue() + aColB.GetBlue();
+long nR = (aColW.GetRed() + aColB.GetRed() - 
nInverseAlpha) * 128;
+long nG = (aColW.GetGreen() + aColB.GetGreen() - 
nInverseAlpha) * 128;
+long nB = (aColW.GetBlue() + aColB.GetBlue() - 
nInverseAlpha) * 128;
+if (nAlpha == 0)
+{ // doesn't matter what's behind transparency
+nR = nG = nB = 0;
+}
+else
+{
+nR /= nAlpha; nG /= nAlpha; nB /= nAlpha;
+}
 pRecAcc->SetPixel(y,x,BitmapColor(
-
(sal_uInt8)CLAMP((n2R+1)/2-nInverseAlpha,0,255),
-
(sal_uInt8)CLAMP((n2G+1)/2-nInverseAlpha,0,255),
-
(sal_uInt8)CLAMP((n2B+1)/2-nInverseAlpha,0,255)));
+(sal_uInt8)CLAMP(nR,0,255),
+(sal_uInt8)CLAMP(nG,0,255),
+(sal_uInt8)CLAMP(nB,0,255)));
 #undef CLAMP
 }
 }
commit 97cb820d3c183a83652dd2779fa2da224ea44240
Author: Michael Meeks 
Date:   Mon Nov 17 05:15:13 2014 +

vcl: always use the default windows' GL Context for now to create bitmaps.

Change-Id: Ie20b10656788113709b0b0720d3cae2653639d78

diff --git a/vcl/inc/opengl/salbmp.hxx b/vcl/inc/opengl/salbmp.hxx
index dbb29d8..9995645 100644
--- a/vcl/inc/opengl/salbmp.hxx
+++ b/vcl/inc/opengl/salbmp.hxx
@@ -52,6 +52,8 @@ private:
 int mnBufHeight;
 std::deque< OpenGLSalBitmapOp* >maPendingOps;
 
+bool makeCurrent();
+
 public:
 OpenGLSalBitmap();
 virtual ~OpenGLSalBitmap();
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index 4b5287e..780c268 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -395,7 +395,7 @@ GLuint OpenGLSalBitmap::CreateTexture()
 }
 }
 
-mpContext->makeCurrent();
+makeCurrent();
 maTexture = OpenGLTexture (mnBufWidth, mnBufHeight, nFormat, nType, pData 
);
 SAL_INFO( "vcl.opengl", "Created texture " << maTexture.Id() );
 
@@ -449,7 +449,7 @@ bool OpenGLSalBitmap::ReadTexture()
 return false;
 }
 
-mpContext->makeCurrent();
+makeCurrent();
 maTexture.Read( nFormat, nType, pData );
 mnBufWidth = mnWidth;
 mnBufHeight = mnHeight;
@@ -462,6 +462,20 @@ sal_uInt16 OpenGLSalBitmap::GetBitCount() const
 return mnBits;
 }
 
+bool OpenGLSalBitmap::makeCurrent()
+{
+OpenGLContextProvider *pProvider;
+pProvider = dynamic_cast< OpenGLContextProvider* >( 
ImplGetDefaultWindow()->GetGraphics() );
+if( pProvider == NULL )
+{
+SAL_WARN( "vcl.opengl", "Couldn't get default OpenGL context provider" 
);
+return false;
+}
+mpContext = pProvider->GetOpenGLContext();
+mpContext->makeCurrent();
+return true;
+}
+
 BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( bool /*bReadOnly*/ )
 {
 if( !maUserBuffer.get() )
@@ -474,15 +488,9 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( bool 
/*bReadOnly*/ )
 
 if( !maPendingOps.empty() )
 {
-OpenGLContextProvider *pProvider;
-pProvider = dynam

LibreOffice Gerrit News for submodules on 2014-11-17

2014-11-16 Thread gerrit
Moin!



~~ Project dictionaries ~~

Nothing moved in the project for the last 25 hours

~~ Project translations ~~

Nothing moved in the project for the last 25 hours

~~ Project help ~~

* Open changes on master for project help changed in the last 25 hours:

+ apply styles dropdown: rename More label and add info about pop-up menu
  in https://gerrit.libreoffice.org/12501 from Stanislav Horáček
+ fdo#80490 rename AutoSpellcheck and reflect its removal from toolbar
  in https://gerrit.libreoffice.org/12498 from Stanislav Horáček
+ fdo#79149 insert image dialog: rename Style to Frame Style
  in https://gerrit.libreoffice.org/12497 from Stanislav Horáček
+ fdo#85046 rename items related to recording changes
  in https://gerrit.libreoffice.org/12496 from Stanislav Horáček
+ Do not make numbers translatable in Help contents
  in https://gerrit.libreoffice.org/12493 from Olivier Hallot
+ fdo#85817 rename Document as E-mail to E-mail Document
  in https://gerrit.libreoffice.org/12490 from Stanislav Horáček


* Merged changes on master for project help changed in the last 25 hours:

None

* Abandoned changes on master for project help changed in the last 25 hours:

None

* Open changes needing tweaks, but being untouched for more than a week:

None

Best,

Your friendly LibreOffice Gerrit Digest Mailer

Note: The bot generating this message can be found and improved here:
   
https://gerrit.libreoffice.org/gitweb?p=dev-tools.git;a=blob;f=gerritbot/send-daily-digest
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


LibreOffice Gerrit News for core on 2014-11-17

2014-11-16 Thread gerrit
Moin!

* Open changes on master for project core changed in the last 25 hours:

 First time contributors doing great things! 
+ fdo#85486 - Clean up unnecessary enumerations from xenum.hxx
  in https://gerrit.libreoffice.org/12507 from Ioan Radu
  about module basctl, cui, filter, include, sd, svx
+ fdo#80838 rearranging the buttons in the toolbar
  in https://gerrit.libreoffice.org/12390 from Yousuf Philips
  about module officecfg, sw
+ fdo#86289 rename 'Page Preview' to 'Print Preview' in toolbar names and p
  in https://gerrit.libreoffice.org/12502 from Yousuf Philips
  about module officecfg, sc, sw
+ revert change made in fdo#86040 as agreed on by design team
  in https://gerrit.libreoffice.org/12395 from Yousuf Philips
  about module officecfg
+ fdo#77268 SVG Import: fix null pointer dereference
  in https://gerrit.libreoffice.org/12472 from Vort
  about module filter
+ fdo#84909 add distribution selection to drawing toolbar
  in https://gerrit.libreoffice.org/12471 from Yousuf Philips
  about module icon-themes, officecfg, sd
+ fdo#84909 more reworking of the toolbars in impress and draw
  in https://gerrit.libreoffice.org/12470 from Yousuf Philips
  about module sd
 End of freshness 

+ fdo#75256 Improve sifr icontheme
  in https://gerrit.libreoffice.org/12505 from Matthias Freund
  about module icon-themes
+ Use boost::signal in SmElementsControl
  in https://gerrit.libreoffice.org/12509 from Marcos Paulo de Souza
  about module starmath
+ assert that no other types than TGOPER can happen in SmParser::Oper()
  in https://gerrit.libreoffice.org/12508 from Takeshi Abe
  about module starmath
+ SVG: improve handling of visibility property
  in https://gerrit.libreoffice.org/12504 from Christina Roßmanith
  about module svgio
+ fdo#86339 Disable manual resizing in Print dialogs
  in https://gerrit.libreoffice.org/12492 from Adolfo Jayme Barrientos
  about module vcl
+ Change disclosure +/- icons to pointers
  in https://gerrit.libreoffice.org/12500 from Adolfo Jayme Barrientos
  about module icon-themes
+ HIG fixes for vcl
  in https://gerrit.libreoffice.org/12499 from Adolfo Jayme Barrientos
  about module vcl
+ Move remaining static vars into the properties container
  in https://gerrit.libreoffice.org/12488 from Michaël Lefèvre
  about module sw
+ fdo#85542: fix DOCX import of overlapping bookmarks
  in https://gerrit.libreoffice.org/12491 from Björn Michaelsen
  about module sw, writerfilter
+ More HIG fixes in filter, svx
  in https://gerrit.libreoffice.org/12489 from Adolfo Jayme Barrientos
  about module filter, svx
+ Move static n*Pixel* into properties container
  in https://gerrit.libreoffice.org/12485 from Michaël Lefèvre
  about module sw
+ Move static pSpecsSubLines into properties container
  in https://gerrit.libreoffice.org/12487 from Michaël Lefèvre
  about module sw
+ Move static pProgress into properties container
  in https://gerrit.libreoffice.org/12486 from Michaël Lefèvre
  about module sw
+ Move pGlobalShell into properties container
  in https://gerrit.libreoffice.org/12482 from Michaël Lefèvre
  about module sw
+ Move *RetoucheFly* into properties container
  in https://gerrit.libreoffice.org/12484 from Michaël Lefèvre
  about module sw
+ Move bFlyMetafile and pFlyMetafileOut into properties container
  in https://gerrit.libreoffice.org/12483 from Michaël Lefèvre
  about module sw
+ Remove dead code
  in https://gerrit.libreoffice.org/12479 from Michaël Lefèvre
  about module sw
+ Move pFlyOnly into properties container
  in https://gerrit.libreoffice.org/12481 from Michaël Lefèvre
  about module sw
+ Move scale factors inside the properties container
  in https://gerrit.libreoffice.org/12480 from Michaël Lefèvre
  about module sw
+ Make const variables const
  in https://gerrit.libreoffice.org/12478 from Michaël Lefèvre
  about module sw
+ Put properties in their own structure
  in https://gerrit.libreoffice.org/12477 from Michaël Lefèvre
  about module sw
+ fdo#75256 Update sifr icontheme
  in https://gerrit.libreoffice.org/12476 from Matthias Freund
  about module icon-themes
+ fdo#75757 remove inheritance from std::vector
  in https://gerrit.libreoffice.org/12474 from Michaël Lefèvre
  about module vcl


* Merged changes on master for project core changed in the last 25 hours:

+ Improve rtf import filter to handle Chinese suffixes of numbered lists.
  in https://gerrit.libreoffice.org/12435 from Mark Hung
+ fdo#56116 : Names of bookmarks should allow all characters which  are val
  in https://gerrit.libreoffice.org/12466 from Brij Mohan Lal Srivastava
+ vcl: SalGraphics::mirror() - always use GetGraphicsWidth()
  in https://gerrit.libreoffice.org/12473 from Chris Sherlock
+ fdo#85432 : Add locale details to help->about Added locale text to About 
  in https://gerrit.libreoffice.org/12464 from Brij Mohan Lal Srivastava
+ fdo#85817 changed 'Document as Email' to 'Email Document'
  in https://gerrit.libreoffice.org/12419 from Yousuf Philips


* Abandoned ch

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

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |  108 
 1 file changed, 101 insertions(+), 7 deletions(-)

New commits:
commit 691402155ef119fa89d1e09d3bde1f7d063a9941
Author: Michael Meeks 
Date:   Mon Nov 17 04:15:04 2014 +0100

vcldemo: prototype Alpha recovery for native theming.

Change-Id: I27706b358e0567139cdd25186963cbff5fe3ed1f

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 0933b9b..7ccde7c 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -699,8 +701,8 @@ public:
 
 void doDrawIcons(OutputDevice &rDev, Rectangle r, bool bExpanded)
 {
-long nMaxH = 0, nVPos = 0;
-Point p(r.TopLeft());
+long nMaxH = 0;
+Point p(r.LeftCenter());
 size_t nToRender = maIcons.size();
 
 if (!bExpanded && maIcons.size() > 64)
@@ -748,16 +750,78 @@ public:
 nMaxH = aSize.Height();
 if (p.X() >= r.Right()) // wrap to next line
 {
-nVPos += nMaxH;
+p = Point(r.Left(), p.Y() + nMaxH);
 nMaxH = 0;
-p = Point(r.Left(), r.Top() + nVPos);
 }
-if (p.Y() >= r.Bottom()) // re-start at top
+if (p.Y() >= r.Bottom()) // re-start at middle
+p = r.LeftCenter();
+}
+}
+
+BitmapEx AlphaRecovery(OutputDevice &rDev, Point aPt, BitmapEx &aSrc)
+{
+// Compositing onto 2x colors beyond our control
+VirtualDevice aWhite, aBlack;
+aWhite.SetOutputSizePixel(aSrc.GetSizePixel());
+aWhite.SetBackground(Wallpaper(COL_WHITE));
+aWhite.Erase();
+aBlack.SetOutputSizePixel(aSrc.GetSizePixel());
+aBlack.SetBackground(Wallpaper(COL_BLACK));
+aBlack.Erase();
+aWhite.DrawBitmapEx(Point(), aSrc);
+aBlack.DrawBitmapEx(Point(), aSrc);
+
+// Now recover that alpha...
+Bitmap aWhiteBmp = aWhite.GetBitmap(Point(),aSrc.GetSizePixel());
+Bitmap aBlackBmp = aBlack.GetBitmap(Point(),aSrc.GetSizePixel());
+AlphaMask aMask(aSrc.GetSizePixel());
+Bitmap aRecovered(aSrc.GetSizePixel(), 24);
+{
+AlphaMask::ScopedWriteAccess pMaskAcc(aMask);
+Bitmap::ScopedWriteAccess pRecAcc(aRecovered);
+Bitmap::ScopedReadAccess pAccW(aWhiteBmp); // a * pix + (1-a)
+Bitmap::ScopedReadAccess pAccB(aBlackBmp); // a * pix + 0
+int nSizeX = aSrc.GetSizePixel().Width();
+int nSizeY = aSrc.GetSizePixel().Height();
+for (int y = 0; y < nSizeY; y++)
 {
-p = r.TopLeft();
-nVPos = 0;
+for (int x = 0; x < nSizeX; x++)
+{
+BitmapColor aColW = pAccW->GetPixel(y,x);
+BitmapColor aColB = pAccB->GetPixel(y,x);
+long nAR = (long)(aColW.GetRed() - aColB.GetRed()); // 
(1-a)
+long nAG = (long)(aColW.GetGreen() - 
aColB.GetGreen()); // (1-a)
+long nAB = (long)(aColW.GetBlue() - aColB.GetBlue()); 
// (1-a)
+
+#define CLAMP(a,b,c) (((a)<=(b))?(b):(((a)>=(c))?(c):(a)))
+
+// we get the most precision from the largest delta
+long nInverseAlpha = std::max(nAR, std::max(nAG, 
nAB)); // (1-a)
+nInverseAlpha = CLAMP(nInverseAlpha, 0, 255);
+
+
pMaskAcc->SetPixel(y,x,BitmapColor((sal_Int8)CLAMP(nInverseAlpha,0,255)));
+// now recover the pixels
+long n2R = aColW.GetRed() + aColB.GetRed();
+long n2G = aColW.GetGreen() + aColB.GetGreen();
+long n2B = aColW.GetBlue() + aColB.GetBlue();
+pRecAcc->SetPixel(y,x,BitmapColor(
+
(sal_uInt8)CLAMP((n2R+1)/2-nInverseAlpha,0,255),
+
(sal_uInt8)CLAMP((n2G+1)/2-nInverseAlpha,0,255),
+
(sal_uInt8)CLAMP((n2B+1)/2-nInverseAlpha,0,255)));
+#undef CLAMP
+}
 }
 }
+rDev.DrawBitmap(aPt, aWhiteBmp);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aBlackBmp);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aRecovered);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aMask.GetBitmap());
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+
+

[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |  108 
 1 file changed, 101 insertions(+), 7 deletions(-)

New commits:
commit 580a0c0741e8956eac87c74797d01057a13b766c
Author: Michael Meeks 
Date:   Mon Nov 17 04:15:04 2014 +0100

vcldemo: prototype Alpha recovery for native theming.

Change-Id: I27706b358e0567139cdd25186963cbff5fe3ed1f

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 3fb14d6..9894f4f 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -26,6 +26,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
@@ -700,8 +702,8 @@ public:
 
 void doDrawIcons(OutputDevice &rDev, Rectangle r, bool bExpanded)
 {
-long nMaxH = 0, nVPos = 0;
-Point p(r.TopLeft());
+long nMaxH = 0;
+Point p(r.LeftCenter());
 size_t nToRender = maIcons.size();
 
 if (!bExpanded && maIcons.size() > 64)
@@ -749,16 +751,78 @@ public:
 nMaxH = aSize.Height();
 if (p.X() >= r.Right()) // wrap to next line
 {
-nVPos += nMaxH;
+p = Point(r.Left(), p.Y() + nMaxH);
 nMaxH = 0;
-p = Point(r.Left(), r.Top() + nVPos);
 }
-if (p.Y() >= r.Bottom()) // re-start at top
+if (p.Y() >= r.Bottom()) // re-start at middle
+p = r.LeftCenter();
+}
+}
+
+BitmapEx AlphaRecovery(OutputDevice &rDev, Point aPt, BitmapEx &aSrc)
+{
+// Compositing onto 2x colors beyond our control
+VirtualDevice aWhite, aBlack;
+aWhite.SetOutputSizePixel(aSrc.GetSizePixel());
+aWhite.SetBackground(Wallpaper(COL_WHITE));
+aWhite.Erase();
+aBlack.SetOutputSizePixel(aSrc.GetSizePixel());
+aBlack.SetBackground(Wallpaper(COL_BLACK));
+aBlack.Erase();
+aWhite.DrawBitmapEx(Point(), aSrc);
+aBlack.DrawBitmapEx(Point(), aSrc);
+
+// Now recover that alpha...
+Bitmap aWhiteBmp = aWhite.GetBitmap(Point(),aSrc.GetSizePixel());
+Bitmap aBlackBmp = aBlack.GetBitmap(Point(),aSrc.GetSizePixel());
+AlphaMask aMask(aSrc.GetSizePixel());
+Bitmap aRecovered(aSrc.GetSizePixel(), 24);
+{
+AlphaMask::ScopedWriteAccess pMaskAcc(aMask);
+Bitmap::ScopedWriteAccess pRecAcc(aRecovered);
+Bitmap::ScopedReadAccess pAccW(aWhiteBmp); // a * pix + (1-a)
+Bitmap::ScopedReadAccess pAccB(aBlackBmp); // a * pix + 0
+int nSizeX = aSrc.GetSizePixel().Width();
+int nSizeY = aSrc.GetSizePixel().Height();
+for (int y = 0; y < nSizeY; y++)
 {
-p = r.TopLeft();
-nVPos = 0;
+for (int x = 0; x < nSizeX; x++)
+{
+BitmapColor aColW = pAccW->GetPixel(y,x);
+BitmapColor aColB = pAccB->GetPixel(y,x);
+long nAR = (long)(aColW.GetRed() - aColB.GetRed()); // 
(1-a)
+long nAG = (long)(aColW.GetGreen() - 
aColB.GetGreen()); // (1-a)
+long nAB = (long)(aColW.GetBlue() - aColB.GetBlue()); 
// (1-a)
+
+#define CLAMP(a,b,c) (((a)<=(b))?(b):(((a)>=(c))?(c):(a)))
+
+// we get the most precision from the largest delta
+long nInverseAlpha = std::max(nAR, std::max(nAG, 
nAB)); // (1-a)
+nInverseAlpha = CLAMP(nInverseAlpha, 0, 255);
+
+
pMaskAcc->SetPixel(y,x,BitmapColor((sal_Int8)CLAMP(nInverseAlpha,0,255)));
+// now recover the pixels
+long n2R = aColW.GetRed() + aColB.GetRed();
+long n2G = aColW.GetGreen() + aColB.GetGreen();
+long n2B = aColW.GetBlue() + aColB.GetBlue();
+pRecAcc->SetPixel(y,x,BitmapColor(
+
(sal_uInt8)CLAMP((n2R+1)/2-nInverseAlpha,0,255),
+
(sal_uInt8)CLAMP((n2G+1)/2-nInverseAlpha,0,255),
+
(sal_uInt8)CLAMP((n2B+1)/2-nInverseAlpha,0,255)));
+#undef CLAMP
+}
 }
 }
+rDev.DrawBitmap(aPt, aWhiteBmp);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aBlackBmp);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aRecovered);
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+rDev.DrawBitmap(aPt, aMask.GetBitmap());
+aPt.Move(aSrc.GetSizePixel().Width(), 0);
+
+

[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

V Stuart Foote  changed:

   What|Removed |Added

 Depends on|81860   |

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |   37 ++---
 1 file changed, 26 insertions(+), 11 deletions(-)

New commits:
commit 50ab596fa526244dbb3115029a5e87464b939305
Author: Michael Meeks 
Date:   Mon Nov 17 02:07:44 2014 +0100

vcldemo: repair mini view, and add alpha blended page corner alike.

Change-Id: I0c047a2b8940e2be76c94bf9de5423aa7e0eff8b

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 5995222..0933b9b 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -54,6 +54,7 @@ class DemoRenderer
 RenderStyle   meStyle;
 bool  mbVDev;
 DemoRenderer *mpDemoRenderer;
+Size  maSize;
 };
 struct RegionRenderer {
 public:
@@ -117,16 +118,15 @@ public:
 
 static std::vector partition(const RenderContext &rCtx, int nX, 
int nY)
 {
-return rCtx.mpDemoRenderer->partition(nX, nY);
+return rCtx.mpDemoRenderer->partition(rCtx.maSize, nX, nY);
 }
 
-std::vector partition(int nX, int nY)
+std::vector partition(Size aSize, int nX, int nY)
 {
 Rectangle r;
 std::vector aRegions;
 
 // Make small cleared area for these guys
-Size aSize(GetSizePixel());
 long nBorderSize = aSize.Width() / 32;
 long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
 long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
@@ -430,7 +430,6 @@ public:
 Gradient aGradient;
 aGradient.SetStartColor(COL_YELLOW);
 aGradient.SetEndColor(COL_RED);
-//  aGradient.SetAngle(45);
 aGradient.SetStyle(GradientStyle_RECT);
 aGradient.SetBorder(r.GetSize().Width()/20);
 rDev.DrawGradient(r, aGradient);
@@ -477,8 +476,23 @@ public:
 aWriter.Write(aStream);
 }
 #endif
-
-rDev.DrawBitmapEx(r.Center(), aShadowStretch);
+Point aRenderPt(r.Center());
+aRenderPt.Move(-nSlice-1, 0);
+rDev.DrawBitmapEx(aRenderPt, aShadowStretch);
+
+AlphaMask aWholeMask(aPageShadowMask.GetBitmap());
+aBlockColor = Bitmap(aPageShadowMask.GetSizePixel(), 24);
+aBlockColor.Erase(COL_GREEN);
+BitmapEx aWhole(aBlockColor, aWholeMask);
+
+aRenderPt = Point(r.Center());
+aRenderPt.Move(nSlice+1, 0);
+
+// An offset background for alpha rendering
+rDev.SetFillColor(COL_BLUE);
+Rectangle aSurround(r.Center(), 
Size(aPageShadowMask.GetSizePixel()));
+rDev.DrawRect(aSurround);
+rDev.DrawBitmapEx(aRenderPt, aWhole);
 }
 
 virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
@@ -585,7 +599,7 @@ public:
 Rectangle aWhole(Point(0,0), r.GetSize());
 
 // mini me
-rCtx.mpDemoRenderer->drawToDevice(*pNested, true);
+rCtx.mpDemoRenderer->drawToDevice(*pNested, r.GetSize(), true);
 
 if (eType == RENDER_AS_BITMAP)
 {
@@ -773,11 +787,12 @@ public:
 }
 };
 
-void drawToDevice(OutputDevice &rDev, bool bVDev)
+void drawToDevice(OutputDevice &rDev, Size aSize, bool bVDev)
 {
 RenderContext aCtx;
 aCtx.mbVDev = bVDev;
 aCtx.mpDemoRenderer = this;
+aCtx.maSize = aSize;
 
 Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
 
@@ -792,7 +807,7 @@ public:
 else
 {
 aCtx.meStyle = RENDER_THUMB;
-std::vector aRegions(partition(mnSegmentsX, 
mnSegmentsY));
+std::vector aRegions(partition(aSize, mnSegmentsX, 
mnSegmentsY));
 DemoRenderer::clearRects(rDev, aRegions);
 for (size_t i = 0; i < maRenderers.size(); i++)
 maRenderers[i]->RenderRegion(rDev, aRegions[i], aCtx);
@@ -881,7 +896,7 @@ bool DemoRenderer::MouseButtonDown(const MouseEvent& rMEvt)
 }
 
 // click on a region to zoom into it
-std::vector aRegions(partition(mnSegmentsX, mnSegmentsY));
+std::vector aRegions(partition(GetSizePixel(), mnSegmentsX, 
mnSegmentsY));
 for (size_t i = 0; i < aRegions.size(); i++)
 {
 if (aRegions[i].IsInside(rMEvt.GetPosPixel()))
@@ -993,7 +1008,7 @@ public:
 {
 mrRenderer.SetSizePixel(GetSizePixel());
 fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), 
rRect.getY(), rRect.getWidth(), rRect.getHeight());
-mrRenderer.drawToDevice(*this, false);
+mrRenderer.drawToDevice(*this, GetSizePixel(), false);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |   37 ++---
 1 file changed, 26 insertions(+), 11 deletions(-)

New commits:
commit 79d1c87bc27231905f21b382e36eae87480e9359
Author: Michael Meeks 
Date:   Mon Nov 17 02:07:44 2014 +0100

vcldemo: repair mini view, and add alpha blended page corner alike.

Change-Id: I0c047a2b8940e2be76c94bf9de5423aa7e0eff8b

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index b553153..3fb14d6 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -54,6 +54,7 @@ class DemoRenderer
 RenderStyle   meStyle;
 bool  mbVDev;
 DemoRenderer *mpDemoRenderer;
+Size  maSize;
 };
 struct RegionRenderer {
 public:
@@ -117,16 +118,15 @@ public:
 
 static std::vector partition(const RenderContext &rCtx, int nX, 
int nY)
 {
-return rCtx.mpDemoRenderer->partition(nX, nY);
+return rCtx.mpDemoRenderer->partition(rCtx.maSize, nX, nY);
 }
 
-std::vector partition(int nX, int nY)
+std::vector partition(Size aSize, int nX, int nY)
 {
 Rectangle r;
 std::vector aRegions;
 
 // Make small cleared area for these guys
-Size aSize(GetSizePixel());
 long nBorderSize = aSize.Width() / 32;
 long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
 long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
@@ -431,7 +431,6 @@ public:
 Gradient aGradient;
 aGradient.SetStartColor(COL_YELLOW);
 aGradient.SetEndColor(COL_RED);
-//  aGradient.SetAngle(45);
 aGradient.SetStyle(GradientStyle_RECT);
 aGradient.SetBorder(r.GetSize().Width()/20);
 rDev.DrawGradient(r, aGradient);
@@ -478,8 +477,23 @@ public:
 aWriter.Write(aStream);
 }
 #endif
-
-rDev.DrawBitmapEx(r.Center(), aShadowStretch);
+Point aRenderPt(r.Center());
+aRenderPt.Move(-nSlice-1, 0);
+rDev.DrawBitmapEx(aRenderPt, aShadowStretch);
+
+AlphaMask aWholeMask(aPageShadowMask.GetBitmap());
+aBlockColor = Bitmap(aPageShadowMask.GetSizePixel(), 24);
+aBlockColor.Erase(COL_GREEN);
+BitmapEx aWhole(aBlockColor, aWholeMask);
+
+aRenderPt = Point(r.Center());
+aRenderPt.Move(nSlice+1, 0);
+
+// An offset background for alpha rendering
+rDev.SetFillColor(COL_BLUE);
+Rectangle aSurround(r.Center(), 
Size(aPageShadowMask.GetSizePixel()));
+rDev.DrawRect(aSurround);
+rDev.DrawBitmapEx(aRenderPt, aWhole);
 }
 
 virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
@@ -586,7 +600,7 @@ public:
 Rectangle aWhole(Point(0,0), r.GetSize());
 
 // mini me
-rCtx.mpDemoRenderer->drawToDevice(*pNested, true);
+rCtx.mpDemoRenderer->drawToDevice(*pNested, r.GetSize(), true);
 
 if (eType == RENDER_AS_BITMAP)
 {
@@ -774,11 +788,12 @@ public:
 }
 };
 
-void drawToDevice(OutputDevice &rDev, bool bVDev)
+void drawToDevice(OutputDevice &rDev, Size aSize, bool bVDev)
 {
 RenderContext aCtx;
 aCtx.mbVDev = bVDev;
 aCtx.mpDemoRenderer = this;
+aCtx.maSize = aSize;
 
 Rectangle aWholeWin(Point(0,0), rDev.GetOutputSizePixel());
 
@@ -793,7 +808,7 @@ public:
 else
 {
 aCtx.meStyle = RENDER_THUMB;
-std::vector aRegions(partition(mnSegmentsX, 
mnSegmentsY));
+std::vector aRegions(partition(aSize, mnSegmentsX, 
mnSegmentsY));
 DemoRenderer::clearRects(rDev, aRegions);
 for (size_t i = 0; i < maRenderers.size(); i++)
 maRenderers[i]->RenderRegion(rDev, aRegions[i], aCtx);
@@ -882,7 +897,7 @@ bool DemoRenderer::MouseButtonDown(const MouseEvent& rMEvt)
 }
 
 // click on a region to zoom into it
-std::vector aRegions(partition(mnSegmentsX, mnSegmentsY));
+std::vector aRegions(partition(GetSizePixel(), mnSegmentsX, 
mnSegmentsY));
 for (size_t i = 0; i < aRegions.size(); i++)
 {
 if (aRegions[i].IsInside(rMEvt.GetPosPixel()))
@@ -994,7 +1009,7 @@ public:
 {
 mrRenderer.SetSizePixel(GetSizePixel());
 fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), 
rRect.getY(), rRect.getWidth(), rRect.getHeight());
-mrRenderer.drawToDevice(*this, false);
+mrRenderer.drawToDevice(*this, GetSizePixel(), false);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |   43 +++
 1 file changed, 43 insertions(+)

New commits:
commit 9071acfe74a6b78a94d661076890b3e22d782601
Author: Michael Meeks 
Date:   Mon Nov 17 00:02:57 2014 +0100

vcldemo: simulate border stretching.

This causes problems with the OpenGL backend; we scale up an 8x1 image
to 8x500, but our fast scaling can't yet cope with that.

Change-Id: I2c91c614167dfdebb53bd03564a577feff64da0b

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 1e2c9b2..5995222 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -440,12 +441,54 @@ public:
 struct DrawBitmap : public RegionRenderer
 {
 RENDER_DETAILS(bitmap,KEY_B)
+
+// Simulate Page Borders rendering - which ultimately should
+// be done with a shader / gradient
+void SimulateBorderStretch(OutputDevice &rDev, Rectangle r)
+{
+static BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
+
+BitmapEx aRight(aPageShadowMask);
+sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 
4;
+// a width x 1 slice
+aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
+  Size(nSlice, 1)));
+AlphaMask aAlphaMask(aRight.GetBitmap());
+Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24);
+aBlockColor.Erase(COL_RED);
+BitmapEx aShadowStretch = BitmapEx(aBlockColor, aAlphaMask);
+
+#ifdef DEBUG
+{ // before - the pristine x1 image
+SvFileStream aStream("/tmp/myshadow.png", STREAM_WRITE);
+vcl::PNGWriter aWriter(aShadowStretch);
+aWriter.Write(aStream);
+}
+#endif
+// and yes - we really do this in the page border rendering code 
...
+aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 
50),
+   BMP_SCALE_FAST);
+aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 
800),
+   BMP_SCALE_FAST);
+#ifdef DEBUG
+{ // after the corrupted image full of fluff ...
+SvFileStream aStream("/tmp/myshadow-50.png", STREAM_WRITE);
+vcl::PNGWriter aWriter(aShadowStretch);
+aWriter.Write(aStream);
+}
+#endif
+
+rDev.DrawBitmapEx(r.Center(), aShadowStretch);
+}
+
 virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
   const RenderContext &rCtx) SAL_OVERRIDE
 {
 Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW);
 aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
 rDev.DrawBitmap(r.TopLeft(), aBitmap);
+
+SimulateBorderStretch(rDev, r);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

David  changed:

   What|Removed |Added

 Depends on||81860

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

David  changed:

   What|Removed |Added

 Depends on||81806

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 65675] LibreOffice 4.2 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=65675

--- Comment #234 from David  ---
Nominate bug 81806 - Document crashes when editing tables. Causes data loss for
any unsaved data. Bugs 81923 and 79569 may be related.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |   43 +++
 1 file changed, 43 insertions(+)

New commits:
commit c6d3fcebf605a544986fcf7d20d5e7b4d4bb4ab1
Author: Michael Meeks 
Date:   Mon Nov 17 00:02:57 2014 +0100

vcldemo: simulate border stretching.

This causes problems with the OpenGL backend; we scale up an 8x1 image
to 8x500, but our fast scaling can't yet cope with that.

Change-Id: I2c91c614167dfdebb53bd03564a577feff64da0b

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 346edda..b553153 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -441,12 +442,54 @@ public:
 struct DrawBitmap : public RegionRenderer
 {
 RENDER_DETAILS(bitmap,KEY_B)
+
+// Simulate Page Borders rendering - which ultimately should
+// be done with a shader / gradient
+void SimulateBorderStretch(OutputDevice &rDev, Rectangle r)
+{
+static BitmapEx aPageShadowMask("sw/res/page-shadow-mask.png");
+
+BitmapEx aRight(aPageShadowMask);
+sal_Int32 nSlice = (aPageShadowMask.GetSizePixel().Width() - 3) / 
4;
+// a width x 1 slice
+aRight.Crop(Rectangle(Point((nSlice * 3) + 3, (nSlice * 2) + 1),
+  Size(nSlice, 1)));
+AlphaMask aAlphaMask(aRight.GetBitmap());
+Bitmap aBlockColor = Bitmap(aAlphaMask.GetSizePixel(), 24);
+aBlockColor.Erase(COL_RED);
+BitmapEx aShadowStretch = BitmapEx(aBlockColor, aAlphaMask);
+
+#ifdef DEBUG
+{ // before - the pristine x1 image
+SvFileStream aStream("/tmp/myshadow.png", STREAM_WRITE);
+vcl::PNGWriter aWriter(aShadowStretch);
+aWriter.Write(aStream);
+}
+#endif
+// and yes - we really do this in the page border rendering code 
...
+aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 
50),
+   BMP_SCALE_FAST);
+aShadowStretch.Scale(Size(aShadowStretch.GetSizePixel().Width(), 
800),
+   BMP_SCALE_FAST);
+#ifdef DEBUG
+{ // after the corrupted image full of fluff ...
+SvFileStream aStream("/tmp/myshadow-50.png", STREAM_WRITE);
+vcl::PNGWriter aWriter(aShadowStretch);
+aWriter.Write(aStream);
+}
+#endif
+
+rDev.DrawBitmapEx(r.Center(), aShadowStretch);
+}
+
 virtual void RenderRegion(OutputDevice &rDev, Rectangle r,
   const RenderContext &rCtx) SAL_OVERRIDE
 {
 Bitmap aBitmap(rCtx.mpDemoRenderer->maIntroBW);
 aBitmap.Scale(r.GetSize(), BMP_SCALE_BESTQUALITY);
 rDev.DrawBitmap(r.TopLeft(), aBitmap);
+
+SimulateBorderStretch(rDev, r);
 }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025
Bug 75025 depends on bug 80939, which changed state.

Bug 80939 Summary: Mac OS X: LibreOffice windows are pixelated on Retina 
displays
https://bugs.freedesktop.org/show_bug.cgi?id=80939

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] buildbot.git: lcov-report/lcov-report.sh

2014-11-16 Thread Maarten Hoes
 lcov-report/lcov-report.sh |   17 -
 1 file changed, 12 insertions(+), 5 deletions(-)

New commits:
commit 01bcb90a73dc7f09b8fd8d10ca1fc061ffe4c16e
Author: Maarten Hoes 
Date:   Sun Nov 16 23:41:00 2014 +0100

Dont 'rm TRACEFILE_DIR' when running '-a', some other minor fixes.

Change-Id: Ie03e3052b6cb675af463c1dab02d5ffb08935746
Reviewed-on: https://gerrit.libreoffice.org/12506
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/lcov-report/lcov-report.sh b/lcov-report/lcov-report.sh
index 4d7046a..a490b3b 100755
--- a/lcov-report/lcov-report.sh
+++ b/lcov-report/lcov-report.sh
@@ -53,7 +53,7 @@ init()
 if [ -z "${SRC_DIR?}" ] ; then
 die "When specifying '-a', you also need to specify '-s'."
 fi
-if [ -d "${HTML_DIR?}" ] ; then
+if [ ! -d "${HTML_DIR?}" ] ; then
 mkdir "${HTML_DIR?}" || die "Failed to create html directory 
${HTML_DIR?}."
 else
 rm -rf "${HTML_DIR?}"
@@ -65,6 +65,9 @@ init()
 if [ -z "${TRACEFILE_DIR?}" ] ; then
 die "When specifying '-a' or '-b', you also need to specify '-t'."
 fi
+fi
+
+if [ "${BEFORE?}" = "TRUE" ] ; then
 if [ ! -d "${TRACEFILE_DIR?}" ] ; then
 mkdir "${TRACEFILE_DIR?}" || die "Failed to create tracefile 
directory ${TRACEFILE_DIR?}."
 else
@@ -73,6 +76,12 @@ init()
 fi
 fi
 
+if [ "${AFTER?}" = "TRUE" ] ; then
+if [ ! -d "${TRACEFILE_DIR?}" ] ; then
+die "Failed to locate tracefile directory ${TRACEFILE_DIR?}."
+fi
+fi
+
 if [ "${SOURCE_COMPILE?}" = "TRUE" ] ; then
 if [ -z "${BUILD_DIR?}" ] ; then
 die "When specifying '-c', you also need to specify '-C'."
@@ -136,7 +145,7 @@ lcov_tracefile_cleanup()
 
 lcov_mkhtml()
 {
-cd "$SRC_DIR"
+cd "${SRC_DIR?}"
 
 COMMIT_SHA1=$(git log --date=iso | head -3 | awk '/^commit/ {print $2}')
 COMMIT_DATE=$(git log --date=iso | head -3 | awk '/^Date/ {print $2}')
@@ -173,7 +182,7 @@ AFTER=
 SRC_DIR=
 TRACEFILE_DIR=
 HTML_DIR=
-BUIILD_DIR=
+BUILD_DIR=
 
 if [ "$#" = "0" ] ; then
 usage
@@ -208,8 +217,6 @@ while getopts ":s:t:w:C:abc" opt ; do
 esac
 done
 
-echo "foo"
-
 init
 
 if [ "${BEFORE?}" = "TRUE" ] ; then
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025
Bug 75025 depends on bug 80939, which changed state.

Bug 80939 Summary: Mac OS X: LibreOffice windows are pixelated on Retina 
displays
https://bugs.freedesktop.org/show_bug.cgi?id=80939

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: FDO - New Milestone

2014-11-16 Thread julien2412
Hi Joel,

Great news indeed.
But is there a milestone for :
- oldest bugs, there are more than 500 bugs older than 2011-06 (3 years
ago!)
- bug marked as regression (didn't play with search options to know the
number)
?
I mean, why to focus only about unconfirmed ones even if they're important
of course?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/FDO-New-Milestone-tp4129219p4129222.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


FDO - New Milestone

2014-11-16 Thread Joel Madero

Hi All,

A *huge* thank you for all of your tremendous efforts in managing the 
chaos which is FDO :) Due to all of your great work we have hit a new 
milestone._*599*_! We're under 600 for the first time in years.


175 of these are marked as enhancements. Remember the bar for an 
enhancement is quite low (if it sounds at all reasonable, mark as NEW) 
and give a comment explaining that we don't guarantee enhancements will 
be implemented and that a volunteer would have to find it worth their 
time to do. For any enhancements that UX should know about, set 
component to ux-advice (you can still mark as new, just ux should be 
aware of them).


https://bugs.freedesktop.org/buglist.cgi?bug_severity=enhancement&bug_status=UNCONFIRMED&list_id=494343&product=LibreOffice&query_format=advanced


If we tackle those 175 - we could easily be down to 400 by the end of 
the year :-b



Thanks again everyone!



Warm Regards,
Joel
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025

--- Comment #79 from Joel Madero  ---
Added bug 86305 - array formulas are being changed without user intending them
to change. This is a regression that has been bibisected.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Bug 75025] LibreOffice 4.3 most annoying bugs

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75025

Joel Madero  changed:

   What|Removed |Added

 Depends on||86305

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: 5 commits - include/vcl sd/source svl/source sw/source vcl/unx

2014-11-16 Thread Caolán McNamara
 include/vcl/opengl/OpenGLContext.hxx |1 +
 sd/source/ui/view/drviewse.cxx   |5 -
 svl/source/items/macitem.cxx |7 ++-
 sw/source/uibase/docvw/edtwin.cxx|   29 -
 vcl/unx/generic/gdi/salgdi.cxx   |3 ++-
 5 files changed, 29 insertions(+), 16 deletions(-)

New commits:
commit 8a68c3fecde9f688e07784e79ae661f821654453
Author: Caolán McNamara 
Date:   Sun Nov 16 20:22:09 2014 +

coverity#1242630 reorganize to help coverity out

Change-Id: I18124cd8d7aadbab22114fa9d38607b43862f9ea

diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx
index 24c4cc7..29d27403 100644
--- a/svl/source/items/macitem.cxx
+++ b/svl/source/items/macitem.cxx
@@ -103,6 +103,11 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, 
sal_uInt16 nVersion )
 
 short nMacro(0);
 rStrm.ReadInt16(nMacro);
+if (nMacro < 0)
+{
+SAL_WARN("editeng", "Parsing error: negative value " << nMacro);
+return rStrm;
+}
 
 const size_t nMinStringSize = rStrm.GetStreamCharSet() == 
RTL_TEXTENCODING_UNICODE ? 4 : 2;
 size_t nMinRecordSize = 2 + 2*nMinStringSize;
@@ -110,7 +115,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, 
sal_uInt16 nVersion )
 nMinRecordSize+=2;
 
 const size_t nMaxRecords = rStrm.remainingSize() / nMinRecordSize;
-if (nMacro > 0 && static_cast(nMacro) > nMaxRecords)
+if (static_cast(nMacro) > nMaxRecords)
 {
 SAL_WARN("editeng", "Parsing error: " << nMaxRecords <<
  " max possible entries, but " << nMacro<< " claimed, 
truncating");
commit 8877a2fbf5b71c45fd8af308884f9f52e34d7e9f
Author: Caolán McNamara 
Date:   Sun Nov 16 20:14:37 2014 +

coverity#982483 Dereference after null check

Change-Id: I6098e597cb00fccff4cf4611a8ac82badf1bdf02

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 329944b..d10edec 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -4064,21 +4064,24 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
 bool bIsSelectionGfx = rSh.GetSelectionType() & 
nsSelectionType::SEL_GRF;
 bool bisResize = eSdrMoveHdl != HDL_MOVE;
 
-if ( rMEvt.IsShift() )
-{
-pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx);
-if (bisResize)
-pSdrView->SetOrtho(!bIsSelectionGfx);
-else
-pSdrView->SetOrtho(true);
-}
-else
+if (pSdrView)
 {
-pSdrView->SetAngleSnapEnabled(bIsSelectionGfx);
-if (bisResize)
-pSdrView->SetOrtho(bIsSelectionGfx);
+if (rMEvt.IsShift())
+{
+pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx);
+if (bisResize)
+pSdrView->SetOrtho(!bIsSelectionGfx);
+else
+pSdrView->SetOrtho(true);
+}
 else
-pSdrView->SetOrtho(false);
+{
+pSdrView->SetAngleSnapEnabled(bIsSelectionGfx);
+if (bisResize)
+pSdrView->SetOrtho(bIsSelectionGfx);
+else
+pSdrView->SetOrtho(false);
+}
 }
 
 rSh.Drag( &aDocPt, rMEvt.IsShift() );
commit d7df2dbc6528cd91bb9628f9659605d4516f8d28
Author: Caolán McNamara 
Date:   Sun Nov 16 20:12:16 2014 +

coverity#708662 Uninitialized scalar field

Change-Id: I6b694659077abce4ca7c67cf0298c9b882a2b964

diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index fc2ca50..b425cd7 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -80,7 +80,8 @@ X11SalGraphics::X11SalGraphics():
 hBrush_(None),
 bWindow_(false),
 bPrinter_(false),
-bVirDev_(false)
+bVirDev_(false),
+bFontGC_(false)
 {
 if (OpenGLHelper::isVCLOpenGLEnabled())
 {
commit 137a64367b2e232c9a159ce8fbad1ab2651c74bf
Author: Caolán McNamara 
Date:   Sun Nov 16 20:11:05 2014 +

coverity#1187864 Uninitialized scalar field

Change-Id: I80df95f70de515a0247827a89297cdfdf0399989

diff --git a/include/vcl/opengl/OpenGLContext.hxx 
b/include/vcl/opengl/OpenGLContext.hxx
index 5ca9602..215f5fe 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -132,6 +132,7 @@ struct GLWindow
 dpy(NULL),
 screen(0),
 win(0),
+pix(0),
 #if define

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - svx/source sw/CppunitTest_sw_odfexport.mk sw/qa sw/source

2014-11-16 Thread Zolnai Tamás
 svx/source/svdraw/svdograf.cxx|
2 
 sw/CppunitTest_sw_odfexport.mk|
4 
 sw/qa/extras/odfexport/data/document_with_two_images_with_special_IDs.odt 
|binary
 sw/qa/extras/odfexport/odfexport.cxx  |   
50 ++
 sw/source/core/graphic/ndgrf.cxx  |
4 
 5 files changed, 59 insertions(+), 1 deletion(-)

New commits:
commit 2080fad9ed431b9d78f292fa14d31fef2c244287
Author: Zolnai Tamás 
Date:   Sun Nov 16 21:33:56 2014 +0100

Related fdo#82953: Forget package URL of image after it is loaded

It causes problems if we handle those imported images differently which
are identified by a package URL, so after the first load remove
this URL and handle images on the same way as inserted images.

Some related bugs:
* #i44367#
* #i124946#
* #i114361#
* fdo#73270

The image in the test document has a special ID which is different
from that one which is generated by LO internally so after ODF export
the new generated image URL is different from the imported one.

(cherry picked from commit 286e2f5c6ec829bc0987b1be7016699f7ef03e5e)

Change-Id: I4e7d3490674c5f86bec5c7c6e1c975dcafd7c265

diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 0446977..cb31fc2 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1411,7 +1411,7 @@ IMPL_LINK( SdrGrafObj, ImpSwapHdl, GraphicObject*, pO )
 const OUString aNewUserData( pGraphic->GetUserData() );
 
 pGraphic->SetGraphic( aGraphic );
-pGraphic->SetUserData( aNewUserData );
+pGraphic->SetUserData();
 
 // Graphic successfully swapped in.
 pRet = GRFMGR_AUTOSWAPSTREAM_LOADED;
diff --git a/sw/CppunitTest_sw_odfexport.mk b/sw/CppunitTest_sw_odfexport.mk
index 8c0842e..1a08488 100644
--- a/sw/CppunitTest_sw_odfexport.mk
+++ b/sw/CppunitTest_sw_odfexport.mk
@@ -79,6 +79,10 @@ $(eval $(call gb_CppunitTest_use_components,sw_odfexport,\
 xmloff/util/xo \
 ))
 
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_odfexport,\
+officecfg/registry \
+))
+
 $(eval $(call gb_CppunitTest_use_configuration,sw_odfexport))
 
 $(eval $(call gb_CppunitTest_use_unittest_configuration,sw_odfexport))
diff --git 
a/sw/qa/extras/odfexport/data/document_with_two_images_with_special_IDs.odt 
b/sw/qa/extras/odfexport/data/document_with_two_images_with_special_IDs.odt
new file mode 100644
index 000..867c075
Binary files /dev/null and 
b/sw/qa/extras/odfexport/data/document_with_two_images_with_special_IDs.odt 
differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx 
b/sw/qa/extras/odfexport/odfexport.cxx
index 5ef7ca4..a0ddfe5 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -13,6 +13,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 class Test : public SwModelTestBase
 {
@@ -310,6 +313,53 @@ DECLARE_ODFEXPORT_TEST(testTextframeTransparentShadow, 
"textframe-transparent-sh
 CPPUNIT_ASSERT_EQUAL(sal_Int32(25), getProperty(xPicture, 
"ShadowTransparence"));
 }
 
+DECLARE_ODFEXPORT_TEST(testImageWithSpecialID, 
"document_with_two_images_with_special_IDs.odt")
+{
+// Here the problem was that LO did not handle well those image URLs in 
the ODT file which are
+// not match with that one which is generated by LO internaly (based on 
the image's size, type and so on)
+
+// Trigger swap out mechanism to test swapped state factor too.
+boost::shared_ptr< comphelper::ConfigurationChanges > 
batch(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(sal_Int32(1),
 batch);
+batch->commit();
+
+uno::Reference xImage = getShape(1);
+uno::Reference< beans::XPropertySet > XPropSet( xImage, 
uno::UNO_QUERY_THROW );
+// Check URL
+{
+OUString sURL;
+XPropSet->getPropertyValue("GraphicURL") >>= sURL;
+CPPUNIT_ASSERT(sURL != 
OUString("vnd.sun.star.GraphicObject:"));
+}
+// Check size
+{
+uno::Reference xGraphic;
+XPropSet->getPropertyValue("Graphic") >>= xGraphic;
+uno::Reference xBitmap(xGraphic, uno::UNO_QUERY);
+CPPUNIT_ASSERT(xBitmap.is());
+CPPUNIT_ASSERT_EQUAL(static_cast(610), 
xBitmap->getSize().Width );
+CPPUNIT_ASSERT_EQUAL(static_cast(381), 
xBitmap->getSize().Height );
+}
+// Second Image
+xImage = getShape(2);
+XPropSet.set( xImage, uno::UNO_QUERY_THROW );
+// Check URL
+{
+OUString sURL;
+XPropSet->getPropertyValue("GraphicURL") >>= sURL;
+CPPUNIT_ASSERT(sURL != 
OUString("vnd.sun.star.GraphicObject:

[Bug 70998] Termchange: Graphic/Picture -> Image

2014-11-16 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=70998

--- Comment #30 from Jay Philips  ---
(In reply to Stanislav Horacek from comment #29)
> It appears when you click the "Filter" icon on the Image bar and undock the
> toolbar which pops up.

Yep that should be changed and likely to 'Image Filters'.

I also noticed that 'Graphic' is a section name in the sidebar and this should
be changed. The frame style 'Graphics' could be changed to 'Images' if this
wont effect already created documents.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-11-16 Thread Zolnai Tamás
 include/xmloff/txtparae.hxx   |4 --
 svx/source/svdraw/svdograf.cxx|   20 +
 sw/inc/ndgrf.hxx  |6 
 sw/source/core/graphic/ndgrf.cxx  |   57 +-
 sw/source/filter/xml/xmltexte.cxx |   22 --
 sw/source/filter/xml/xmltexte.hxx |5 ---
 xmloff/source/text/txtparae.cxx   |7 
 7 files changed, 5 insertions(+), 116 deletions(-)

New commits:
commit aea2dbc319e1e1069d3af4bbc828eb0001cd6ece
Author: Zolnai Tamás 
Date:   Sun Nov 16 20:48:19 2014 +0100

Remove now useless setTextEmbeddedGraphicURL()

Since this commit:
286e2f5c6ec829bc0987b1be7016699f7ef03e5e
it's not necessary to update the package URL.

Change-Id: I25c829e9bc0c666838baf19cd60f19938ebb430c

diff --git a/include/xmloff/txtparae.hxx b/include/xmloff/txtparae.hxx
index 37ec27b..a7369ea 100644
--- a/include/xmloff/txtparae.hxx
+++ b/include/xmloff/txtparae.hxx
@@ -380,10 +380,6 @@ protected:
 bool bAutoStyles,
 const ::com::sun::star::uno::Reference <
 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0  );
-virtual void setTextEmbeddedGraphicURL(
-const ::com::sun::star::uno::Reference <
-::com::sun::star::beans::XPropertySet >& rPropSet,
-OUString& rStreamName ) const;
 
 /// export a footnote and styles
 void exportTextFootnote(
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index 3eaa75a..b40da0c 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -177,11 +177,7 @@ private:
 
 public:
 bool HasEmbeddedStreamName() const { return maGrfObj.HasUserData(); }
-/// applying new stream name for embedded graphic - needed as saving the 
document might change this stream name
-void ApplyNewEmbeddedStreamName(const OUString& r)
-{
-maGrfObj.SetUserData(r);
-}
+
 /// Is this node selected by any shell?
 bool IsSelected() const;
 
diff --git a/sw/source/filter/xml/xmltexte.cxx 
b/sw/source/filter/xml/xmltexte.cxx
index c830e1d..79ea895 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -188,28 +188,6 @@ SwXMLTextParagraphExport::~SwXMLTextParagraphExport()
 {
 }
 
-void SwXMLTextParagraphExport::setTextEmbeddedGraphicURL(
-const Reference < XPropertySet >& rPropSet,
-OUString& rURL) const
-{
-if( rURL.isEmpty() )
-return;
-
-SwGrfNode *pGrfNd = GetNoTxtNode( rPropSet )->GetGrfNode();
-if (pGrfNd && !pGrfNd->IsGrfLink())
-{
-// Apply new embedded stream name, only if graphic node already has 
one.
-// - The saving of recovery information triggers this method, but for 
a newly created
-//   document the new embedded stream name shall not be applied.
-// - The saving of a newly created document to own format (ODF) 
triggers this method,
-//   but the embedded stream name is not needed as its original 
inserted data is still in use.
-if (pGrfNd->HasEmbeddedStreamName())
-{
-pGrfNd->ApplyNewEmbeddedStreamName("vnd.sun.star.Package:" + rURL);
-}
-}
-}
-
 static void lcl_addURL ( SvXMLExport &rExport, const OUString &rURL,
  bool bToRel = true )
 {
diff --git a/sw/source/filter/xml/xmltexte.hxx 
b/sw/source/filter/xml/xmltexte.hxx
index cb00746..17f45d9 100644
--- a/sw/source/filter/xml/xmltexte.hxx
+++ b/sw/source/filter/xml/xmltexte.hxx
@@ -69,11 +69,6 @@ public:
 SwXMLExport& rExp,
  SvXMLAutoStylePoolP& rAutoStylePool );
 virtual ~SwXMLTextParagraphExport();
-
-virtual void setTextEmbeddedGraphicURL(
-const ::com::sun::star::uno::Reference <
-::com::sun::star::beans::XPropertySet >& rPropSet,
-OUString& rStreamName ) const SAL_OVERRIDE;
 };
 
 #endif // INCLUDED_SW_SOURCE_FILTER_XML_XMLTEXTE_HXX
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 07b2ab4..4d43b3c 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -3084,7 +3084,6 @@ void XMLTextParagraphExport::_exportTextGraphic(
 OUString sOrigURL;
 rPropSet->getPropertyValue( sGraphicURL ) >>= sOrigURL;
 OUString sURL(GetExport().AddEmbeddedGraphicObject( sOrigURL ));
-setTextEmbeddedGraphicURL( rPropSet, sURL );
 
 // If there still is no url, then then graphic is empty
 if( !sURL.isEmpty() )
@@ -3205,12 +3204,6 @@ void XMLTextParagraphExport::exportTitleAndDescription(
 }
 }
 
-void XMLTextParagraphExport::setTextEmbeddedGraphicURL(
-const Reference < XPropertySet >&,
-OUString& /*rStreamName*/ ) const
-{
-}
-
 bool XMLTextParagraphExport::addHyperlinkAttributes(
 const Reference< XPropertySet > & rPropSet,
 const Reference< XPropertyState > & rPropState,
commit db686e8ae12e4c554e24d0c262915fb1bf45525b
Author: Zolnai Tamás 
Date:   Sun Nov 16 20:35:30 2014 +0100

Logically dead code related to embedded stream name in

[Libreoffice-commits] buildbot.git: lcov-report/lcov-report.sh lcov-report/README

2014-11-16 Thread Maarten Hoes
 lcov-report/README |   93 +-
 lcov-report/lcov-report.sh |  386 +++--
 2 files changed, 249 insertions(+), 230 deletions(-)

New commits:
commit 2082cf5aacd8171b9d9369b2edcf7c40cc5fab31
Author: Maarten Hoes 
Date:   Sun Nov 16 14:01:52 2014 +0100

Allow for separate src and build dirs, updated README.

Change-Id: I334f967bae349abaf1c40907138d005a37344729
Reviewed-on: https://gerrit.libreoffice.org/12475
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/lcov-report/README b/lcov-report/README
index 542d718..200ff9e 100644
--- a/lcov-report/README
+++ b/lcov-report/README
@@ -1,12 +1,16 @@
+NAME
+lcov-report.sh
 
-lcov-report.sh
 
-   A small script to create gcov/lcov code coverage reports of tests run
-   on the libreoffice source code.
+DESCRIPTION
 
+A small script to create gcov/lcov code coverage reports of tests run
+on the libreoffice source code.
 
-Usage: lcov-report.sh [-a|-b|-c] -s [DIRECTORY] -t [DIRECTORY] -w [DIRECTORY]
 
+SYNOPSIS
+
+lcov-report.sh [-a|-b|-c] -s [DIRECTORY] -t [DIRECTORY] -w [DIRECTORY]
 
 -b
 Run lcov commands before you run your tests. This creates a
@@ -15,27 +19,98 @@ Usage: lcov-report.sh [-a|-b|-c] -s [DIRECTORY] -t 
[DIRECTORY] -w [DIRECTORY]
 
 -a
 Run lcov commands after you run your tests. This creates a
-tracefile that contains the resukts of your tests, and combines
+tracefile that contains the results of your tests, and combines
 it with the baseline. You can only supply one of '-a', '-b' or
 '-c' simultaneously.
 
 -c
-Specifies to build the libreoffice sources in the location
+Specifies to compile the libreoffice sources in the location
 specified by the '-s' flag. This flag is optional. If you
 choose to omit it, you must make sure the libreoffice source
 code is built using the appropriate FLAGS ('-fprofile-arcs
 -ftest-coverage'). You can only supply one of '-a', '-b' or
 '-c' simultaneously.
 
+-C
+Specifies the location the sourcecode gets compiled in.
+
 -s
 Specify the location where the libreoffice source code is
-located. This flag is mandatory.
+located. This flag is mandatory when you run '-c' or '-a'.
 
 -t
 Specifies the directory in which to contain the lcov
-tracefile's. This flag is mandatory.
+tracefile's. This flag is mandatory when you run '-a' or '-b'.
 
 -w
 Specifies the directory in which to contain the generated HTML
-report files. This flag is mandatory.
+report files. This flag is mandatory when you run '-b'.
+
+
+EXAMPLE
+
+Summary.
+
+In essence, you run the following commands:
+
+1.) Compile LibreOffice.
+2.) Run 'lcov-report.sh' before you run your tests.
+3.) Run your tests.
+4.) Run 'lcov-report.sh' after your tests.
+
+That's it.
+
+
+1.) Compile LibreOffice.
+
+The first step is to compile the libreoffice code using
+the appropriate FLAGS and options to autogen.sh and/or
+./configure.  You can do this with lcov-report.sh in
+the following way:
+
+lcov-report.sh -c -C /home/user/build -s \
+/home/user/src/libreoffice
+
+'-c' specifies that you want to compile the code.
+
+If you choose to build libreoffice yourself instead, make
+sure to set these FLAGS: LDFLAGS+='-fprofile-arcs'
+CFLAGS+='-fprofile-arcs -ftest-coverage'
+CXXFLAGS+='-fprofile-arcs -ftest-coverage'
+CPPFLAGS+='-fprofile-arcs -ftest-coverage'. Also, you
+need to supply --disable-online-update to autogen.sh
+and/or configure.
+
+
+2.) Run 'lcov-report.sh -b'.
+
+The next step is to create a gcov/lcov baseline. You
+run this command ('-b') before you run your tests.
+
+lcov-report.sh -b -C /home/user/build -t \
+/home/user/traces
+
+
+3.) Run tests.
+
+Now you can run the tests for which you want to report
+code coverage. This could be as simple as 'make check'
+in the build directory.
+
+
+4.) Run 'lcov-report.sh -a'.
+
+The last step is to create a lcov/gcov tracefile that
+contains the data about the tests that were run, and
+to create the html report. You run this command ('-a')
+after you have completed running your tests.
+
+lcov-report.sh -a -C /home/user/build \
+-s /home/user/src/libreoffice -t \
+/home/user/traces -w /home/user/html
+
+Make sure

[Libreoffice-commits] core.git: 4 commits - svtools/CppunitTest_svtools_graphic.mk svtools/qa svx/source sw/CppunitTest_sw_odfexport.mk sw/qa sw/source

2014-11-16 Thread Zolnai Tamás
 svtools/CppunitTest_svtools_graphic.mk|   
40 +++
 svtools/qa/unit/GraphicObjectTest.cxx |  
108 +-
 svtools/qa/unit/data/document_with_two_images.odt 
|binary
 svx/source/svdraw/svdograf.cxx|
2 
 sw/CppunitTest_sw_odfexport.mk|
4 
 sw/qa/extras/odfexport/data/document_with_two_images_with_special_IDs.odt 
|binary
 sw/qa/extras/odfexport/odfexport.cxx  |   
50 
 sw/source/core/graphic/ndgrf.cxx  |   
49 
 8 files changed, 207 insertions(+), 46 deletions(-)

New commits:
commit b0c97aecb22cfa8d845cdc7d2764a4320b53baf6
Author: Zolnai Tamás 
Date:   Sun Nov 16 15:23:54 2014 +0100

Set back these lines, later it can be useful

Removed in:
9dc3b49c891fb9fe45c24de4b7e1e88fe400afe0

Change-Id: Id8cee4e17d214ca0eaa5cd11dc25849e5f68851e

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 682546e..ff601f5 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -663,6 +663,10 @@ bool SwGrfNode::SavePersistentData()
 return true;
 }
 
+// swap in first if in storage
+if( HasEmbeddedStreamName() && !SwapIn() )
+return false;
+
 // #i44367#
 // Do not delete graphic file in storage, because the graphic file could
 // be referenced by other graphic nodes.
commit a6e2e54c7e9ec5b852db3b3be578d79fda01
Author: Zolnai Tamás 
Date:   Sun Nov 16 15:17:43 2014 +0100

Avoid DelStreamName because it can lead to image loss.

See also:
f811e628411bda29a76ebb1f72eb107ce67d27f0

The problem is that more images can have the same stream name
so we can't decide here when to remove one stream name. Better
to leak in the storage as to loose images (actually we already
leak here, so)

Change-Id: I2c2afe87e024c2521fe22d62126b567931604101

diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index c6013af..682546e 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -223,20 +223,12 @@ bool SwGrfNode::ReRead(
 }
 else if( pGraphic && rGrfName.isEmpty() )
 {
-// Old stream must be deleted before the new one is set.
-if( HasEmbeddedStreamName() )
-DelStreamName();
-
 maGrfObj.SetGraphic( *pGraphic );
 onGraphicChanged();
 bReadGrf = true;
 }
 else if( pGrfObj && rGrfName.isEmpty() )
 {
-// Old stream must be deleted before the new one is set.
-if( HasEmbeddedStreamName() )
-DelStreamName();
-
 maGrfObj = *pGrfObj;
 onGraphicChanged();
 bReadGrf = true;
@@ -246,9 +238,6 @@ bool SwGrfNode::ReRead(
 return true;
 else
 {
-if( HasEmbeddedStreamName() )
-DelStreamName();
-
 // create new link for the graphic object
 InsertLink( rGrfName, rFltName );
 
@@ -859,36 +848,6 @@ void SwGrfNode::ScaleImageMap()
 }
 }
 
-void SwGrfNode::DelStreamName()
-{
-if( HasEmbeddedStreamName() )
-{
-// then remove graphic from storage
-uno::Reference < embed::XStorage > xDocStg = GetDoc()->GetDocStorage();
-if( xDocStg.is() )
-{
-try
-{
-const StreamAndStorageNames aNames = 
lcl_GetStreamStorageNames( maGrfObj.GetUserData() );
-uno::Reference < embed::XStorage > refPics = xDocStg;
-if ( !aNames.sStorage.isEmpty() )
-refPics = xDocStg->openStorageElement( aNames.sStorage, 
embed::ElementModes::READWRITE );
-refPics->removeElement( aNames.sStream );
-uno::Reference < embed::XTransactedObject > xTrans( refPics, 
uno::UNO_QUERY );
-if ( xTrans.is() )
-xTrans->commit();
-}
-catch (const uno::Exception&)
-{
-// #i48434#
-OSL_FAIL( " - unhandled 
exception!" );
-}
-}
-
-maGrfObj.SetUserData();
-}
-}
-
 /** helper method to get a substorage of the document storage for readonly 
access.
 
 OD, MAV 2005-08-17 #i53025#
commit 286e2f5c6ec829bc0987b1be7016699f7ef03e5e
Author: Zolnai Tamás 
Date:   Sun Nov 16 15:12:54 2014 +0100

Related fdo#82953: Forget package URL of image after it is loaded

It causes problems if we handle those imported images differently which
are identified by a package URL, so after the first load remove
this URL and handle images on the same way as inserted images.

Some related bugs:
* #i44367#
* #i124946#
* #i114361#
* fdo#73270

The image in the test document has a special ID which is different
from 

SfxFilterMatcher::GuessFilter called with sal_False instead of SfxFilterGlags

2014-11-16 Thread Matteo Casalin

Hi all,
I found some call sites [1] for SfxFilterMatcher::GuessFilter which 
pass a sal_False value instead of a SfxFilterFlags, and among the 
defined flags I just see SFX_FILTER_VERSION_NONE (which is never used in 
the code, anyway) with a 0 value. These calls seems to be like this from 
the beginning and I really haven't got a clue if sal_False should be 
changed to 0 (or SFX_FILTER_VERSION_NONE), to something else, just 
deleted, or whatever.

Any idea?

Thanks
Matteo

[1]
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/dochdl/gloshdl.cxx#732
http://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unocrsrhelper.cxx#1020
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/uiview/view2.cxx#2135
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


SfxFilterMatcher::GuessFilter called with sal_False instead of SfxFilterFlags

2014-11-16 Thread Matteo Casalin

Hi all,
I found some call sites [1] to SfxFilterMatcher::GuessFilter which 
pass a sal_False value instead of a SfxFilterFlags, and among the 
defined flags I just see SFX_FILTER_VERSION_NONE (which is never used in 
the code, anyway) with a 0 value. These calls seems to be like this from 
the beginning and I really haven't got a clue if sal_False should be 
changed to 0 (or SFX_FILTER_VERSION_NONE), to something else, just 
deleted, or whatever.

Any idea?

Thanks
Matteo

[1]
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/dochdl/gloshdl.cxx#732
http://opengrok.libreoffice.org/xref/core/sw/source/core/unocore/unocrsrhelper.cxx#1020
http://opengrok.libreoffice.org/xref/core/sw/source/uibase/uiview/view2.cxx#2135
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Could not merge msm file into database

2014-11-16 Thread Andras Timar
Hi,

We are getting "Could not merge msm file into database" error messages
from Windows tinderboxes since 12th of November.

I did not see anything suspicious in recent commits. I tried to build
one of the last known good tinderbox builds, it was
b021b5983c62e266b82d9f0c5c6d8d8900553827 and it gave me the same error
message. Then I tried to build 4.4 aplpha2 and alpha1, both of them
gave the same error message. So it seems that the problem is not in
LibreOffice source code. But where is it? Maybe in a Windows update?

Can someone try my experiment, too, i.e. to build from a known good
hash on Windows? If you use VS 2013, you need
ef7e29998c5e86c4174e9dbe16c157705f9dc129, otherwise msm file merge
will not be attempted.

Thanks,
Andras
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/salbmp.cxx   |7 +--
 vcl/source/opengl/OpenGLContext.cxx |4 +---
 vcl/unx/generic/app/saldisp.cxx |2 +-
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit f3ff1195cfab0199ebbfda1b1b4f72a78f3093b8
Author: Markus Mohrhard 
Date:   Sun Nov 16 13:40:45 2014 +0100

remove some useless SAL_WARNs

Change-Id: I26ae7aaab0e2d1685fd9c961aba027e1399b6911

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index ad43ef8..4b5287e 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -200,8 +200,7 @@ bool OpenGLSalBitmap::AllocateUserData()
 }
 if (!alloc)
 {
-SAL_WARN(
-"vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << mnHeight);
+SAL_WARN("vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << 
mnHeight);
 maUserBuffer.reset( static_cast(NULL) );
 mnBytesPerRow = 0;
 }
@@ -239,8 +238,6 @@ public:
 ImplPixelFormat8( const BitmapPalette& rPalette )
 : mrPalette( rPalette )
 {
-if ( mrPalette.GetEntryCount() < 256 )
-SAL_WARN( "vcl.opengl", "Bad sign, if we get an OOB pixel we die" 
);
 }
 virtual const BitmapColor& ReadPixel() SAL_OVERRIDE
 {
@@ -262,8 +259,6 @@ public:
 , mnX(0)
 , mnShift(4)
 {
-if ( mrPalette.GetEntryCount() < 16 )
-SAL_WARN( "vcl.opengl", "Bad sign, if we get an OOB pixel we die" 
);
 }
 virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE
 {
commit 54189d62363c577b57a7af77f5fadf42fc2ca0b8
Author: Markus Mohrhard 
Date:   Sun Nov 16 12:33:55 2014 +0100

use correct flag to enable ARB debug version

Change-Id: I933aea4f9cb1ccd58f9a07e7d32ff28077f8bb33

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 15d551a..0659ce5 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -865,7 +865,7 @@ bool OpenGLContext::InitGLEW()
 {
 if (glDebugMessageCallbackARB)
 {
-glEnable(GL_DEBUG_OUTPUT);
+glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
 glDebugMessageCallbackARB(&debug_callback, NULL);
 }
 else if ( glDebugMessageCallback )
commit b4b1bea816d3d0ee96153c26ad5b5fcc2dfe5972
Author: Markus Mohrhard 
Date:   Sun Nov 16 11:43:38 2014 +0100

Revert "make something visible on the screen again"

This reverts commit 6661fdab95b981843f6d8392769f32e7377eaaeb.

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index f8935b7..8532ba0 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1502,7 +1502,7 @@ void OpenGLSalGraphicsImpl::endPaint()
 if( mnPainting == 0 )
 {
 maContext.makeCurrent();
-maContext.swapBuffers();
+glFlush();
 }
 }
 
commit 5d5ee7f226d64fb25dbdb817389edc01db86b5eb
Author: Markus Mohrhard 
Date:   Sun Nov 16 11:43:07 2014 +0100

use the OpenGLHelper version to check for OpenGL support

Change-Id: Ib101d2605e5e739bb1d063fa7019e4e5930462a0

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index ffd12d7..779453e 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -193,7 +193,7 @@ bool SalDisplay::BestVisual( Display *pDisplay,
 return rVI.visualid == nDefVID;
 
 try {
-bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
+bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled();
 if( bUseOpenGL && OpenGLHelper::GetVisualInfo( pDisplay, nScreen, rVI 
) )
 return rVI.visualid == nDefVID;
 }
commit 687ecd9497406617540edbe08efa0f846c94f842
Author: Markus Mohrhard 
Date:   Sat Nov 15 17:29:33 2014 +0100

make something visible on the screen again

Why do we still use a double buffered FBC? It apparently works in the
feature/opengl-vcl branch.

Change-Id: I48b6879b9a9f7fec67f4da25cade46a32d8ad6fa

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 8532ba0..f8935b7 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1502,7 +1502,7 @@ void OpenGLSalGraphicsImpl::endPaint()
 if( mnPainting == 0 )
 {
 maContext.makeCurrent();
-glFlush();
+maContext.swapBuffers();
 }
 }
 
commit 6cc2730effeaca3f482e97f8e209a5101f6c9287
Author: Markus Mohrhard 
Date:   Sat Nov 15 16:48:49 2014 +0100

remove unnecessary whitespace

Change-Id: I0dda7886718b0e3ff81a0d6d43cca2887877ea9d

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 4f6d130..15d551a 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -670,8 +670,6 @@ bool OpenGLContext::ImplInit()
 GL_TRUE);
 }
 
-
-
 if( m_aGLWin.ctx )
 {
 vShareList.push_back( m_aGLWin.ctx );
___
Libreof

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

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/x11/gdiimpl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c484e4c030f7e4508f7d96ffdac87ed91d25bf0f
Author: Markus Mohrhard 
Date:   Sun Nov 16 16:59:20 2014 +0100

vcl: Invert OpenGL Native Widget rendering in Y.

Change-Id: I65a0bef7e817c82285a0e053846798f02e8d7fc8

diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index 26355cb..5292038 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -153,7 +153,7 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( 
X11Pixmap* pPixmap, int nX,
 //TODO: lfrb: glXGetProc to get the functions
 glXBindTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT, NULL );
 
-DrawTexture( aTexture, aPosAry, !bInverted );
+DrawTexture( aTexture, aPosAry, bInverted );
 
 glXReleaseTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT );
 glXDestroyPixmap( pDisplay, pGlxPixmap );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/opengl

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/x11/gdiimpl.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d82d9467ef8b78864b717a468e313eae0c857e94
Author: Markus Mohrhard 
Date:   Sun Nov 16 17:07:15 2014 +0100

Invert Native Widget rendering in Y.

Change-Id: I65a0bef7e817c82285a0e053846798f02e8d7fc8

diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index 46a22ce..5292038 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -133,9 +133,9 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( 
X11Pixmap* pPixmap, int nX,
 SAL_INFO( "vcl.opengl", "RenderPixmapToScreen (" << nX << " " << nY << ")" 
);
 
 aPosAry.mnSrcX = 0;
-aPosAry.mnSrcY = nY;
+aPosAry.mnSrcY = 0;
 aPosAry.mnDestX = nX;
-aPosAry.mnDestY = 0;
+aPosAry.mnDestY = nY;
 aPosAry.mnSrcWidth = aPosAry.mnDestWidth = pPixmap->GetWidth();
 aPosAry.mnSrcHeight = aPosAry.mnDestHeight = pPixmap->GetHeight();
 
@@ -153,7 +153,7 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( 
X11Pixmap* pPixmap, int nX,
 //TODO: lfrb: glXGetProc to get the functions
 glXBindTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT, NULL );
 
-DrawTexture( aTexture, aPosAry, !bInverted );
+DrawTexture( aTexture, aPosAry, bInverted );
 
 glXReleaseTexImageEXT( pDisplay, pGlxPixmap, GLX_FRONT_LEFT_EXT );
 glXDestroyPixmap( pDisplay, pGlxPixmap );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Brij Mohan Lal Srivastava
 sw/source/ui/misc/bookmark.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 82d6ee7ce7576be6e7ef04b5011fda35f5378272
Author: Brij Mohan Lal Srivastava 
Date:   Sun Nov 16 03:21:06 2014 +0530

fdo#56116 : Names of bookmarks should allow all characters which
 are valid in HTML anchor names (missing: ':' and '.')

Change-Id: I44f1d1135067103fdcc7482793371c5b95c14cec
Reviewed-on: https://gerrit.libreoffice.org/12466
Reviewed-by: Björn Michaelsen 
Tested-by: Björn Michaelsen 

diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index b1b33a0..3fff8c9 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -30,7 +30,7 @@
 #include "IMark.hxx"
 #include "globals.hrc"
 
-const OUString BookmarkCombo::aForbiddenChars("/\\@:*?\";,.#");
+const OUString BookmarkCombo::aForbiddenChars("/\\@*?\";,#");
 
 IMPL_LINK( SwInsertBookmarkDlg, ModifyHdl, BookmarkCombo *, pBox )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/opengl

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/x11/gdiimpl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 5633fdbf3507ce6480078f1d0230c740946ff59d
Author: Markus Mohrhard 
Date:   Sun Nov 16 16:59:20 2014 +0100

blind fix for native control on X11

Change-Id: I97b3faeda70e4f6481f7ac619f26dea7da83b958

diff --git a/vcl/opengl/x11/gdiimpl.cxx b/vcl/opengl/x11/gdiimpl.cxx
index 26355cb..46a22ce 100644
--- a/vcl/opengl/x11/gdiimpl.cxx
+++ b/vcl/opengl/x11/gdiimpl.cxx
@@ -133,9 +133,9 @@ bool X11OpenGLSalGraphicsImpl::RenderPixmapToScreen( 
X11Pixmap* pPixmap, int nX,
 SAL_INFO( "vcl.opengl", "RenderPixmapToScreen (" << nX << " " << nY << ")" 
);
 
 aPosAry.mnSrcX = 0;
-aPosAry.mnSrcY = 0;
+aPosAry.mnSrcY = nY;
 aPosAry.mnDestX = nX;
-aPosAry.mnDestY = nY;
+aPosAry.mnDestY = 0;
 aPosAry.mnSrcWidth = aPosAry.mnDestWidth = pPixmap->GetWidth();
 aPosAry.mnSrcHeight = aPosAry.mnDestHeight = pPixmap->GetHeight();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Michael Meeks
 vcl/source/opengl/OpenGLHelper.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 8ecfdf9c23b79ffd50752defc78889736263451d
Author: Michael Meeks 
Date:   Sun Nov 16 16:59:04 2014 +0100

vcl: disable OpenGL usage during build.

Change-Id: I3a534578df727f2aaab6e36839f0e62e6fc8f208

diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 3dd5df8..fda89c3 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -382,7 +382,16 @@ bool OpenGLHelper::isVCLOpenGLEnabled()
 return false;
 
 static bool bEnableGLEnv = !!getenv("SAL_ENABLEGL");
-bool bEnable = bEnableGLEnv || 
officecfg::Office::Common::VCL::UseOpenGL::get();
+
+bool bEnable = bEnableGLEnv;
+
+static bool bDuringBuild = getenv("VCL_HIDE_WINDOWS");
+if (bDuringBuild && !bEnable /* env. enable overrides */)
+bEnable = false;
+
+else if (officecfg::Office::Common::VCL::UseOpenGL::get())
+bEnable = true;
+
 return bEnable;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Michael Meeks
 vcl/source/opengl/OpenGLHelper.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 9cb55efb76e03ba821840ac86bba6f4f9fcb6586
Author: Michael Meeks 
Date:   Sun Nov 16 16:59:04 2014 +0100

vcl: disable OpenGL usage during build.

Change-Id: I3a534578df727f2aaab6e36839f0e62e6fc8f208

diff --git a/vcl/source/opengl/OpenGLHelper.cxx 
b/vcl/source/opengl/OpenGLHelper.cxx
index 3dd5df8..fda89c3 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -382,7 +382,16 @@ bool OpenGLHelper::isVCLOpenGLEnabled()
 return false;
 
 static bool bEnableGLEnv = !!getenv("SAL_ENABLEGL");
-bool bEnable = bEnableGLEnv || 
officecfg::Office::Common::VCL::UseOpenGL::get();
+
+bool bEnable = bEnableGLEnv;
+
+static bool bDuringBuild = getenv("VCL_HIDE_WINDOWS");
+if (bDuringBuild && !bEnable /* env. enable overrides */)
+bEnable = false;
+
+else if (officecfg::Office::Common::VCL::UseOpenGL::get())
+bEnable = true;
+
 return bEnable;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Matteo Casalin
 sw/inc/IDocumentContentOperations.hxx   |2 
 sw/inc/IDocumentFieldsAccess.hxx|8 -
 sw/inc/crsrsh.hxx   |   38 ++---
 sw/inc/dcontact.hxx |2 
 sw/inc/doc.hxx  |   24 +--
 sw/inc/docstyle.hxx |2 
 sw/inc/docufld.hxx  |2 
 sw/inc/editsh.hxx   |4 
 sw/inc/flddropdown.hxx  |4 
 sw/inc/fmtcol.hxx   |   22 ---
 sw/inc/modcfg.hxx   |2 
 sw/inc/ndnotxt.hxx  |2 
 sw/inc/node.hxx |   24 +--
 sw/inc/pagedesc.hxx |4 
 sw/inc/poolfmt.hxx  |4 
 sw/inc/redline.hxx  |2 
 sw/inc/shellio.hxx  |2 
 sw/inc/swatrset.hxx |2 
 sw/inc/swtable.hxx  |4 
 sw/inc/tabcol.hxx   |2 
 sw/inc/tox.hxx  |2 
 sw/inc/viewopt.hxx  |  106 +++-
 sw/inc/viewsh.hxx   |   14 +-
 sw/source/core/access/acccontext.cxx|6 
 sw/source/core/access/accdoc.cxx|4 
 sw/source/core/access/accmap.cxx|2 
 sw/source/core/access/accselectionhelper.cxx|1 
 sw/source/core/access/acctable.cxx  |8 -
 sw/source/core/bastyp/calc.cxx  |2 
 sw/source/core/bastyp/swregion.cxx  |2 
 sw/source/core/crsr/crsrsh.cxx  |   10 -
 sw/source/core/crsr/crstrvl.cxx |2 
 sw/source/core/crsr/findattr.cxx|   48 +++
 sw/source/core/crsr/swcrsr.cxx  |6 
 sw/source/core/doc/DocumentContentOperationsManager.cxx |4 
 sw/source/core/doc/docedt.cxx   |2 
 sw/source/core/doc/docfly.cxx   |2 
 sw/source/core/doc/docfmt.cxx   |   10 -
 sw/source/core/doc/docftn.cxx   |4 
 sw/source/core/doc/docnum.cxx   |2 
 sw/source/core/doc/docruby.cxx  |4 
 sw/source/core/doc/notxtfrm.cxx |2 
 sw/source/core/doc/tblafmt.cxx  |2 
 sw/source/core/doc/tblcpy.cxx   |2 
 sw/source/core/docnode/ndsect.cxx   |   10 -
 sw/source/core/docnode/ndtbl1.cxx   |6 
 sw/source/core/docnode/node.cxx |8 -
 sw/source/core/docnode/node2lay.cxx |2 
 sw/source/core/draw/dcontact.cxx|4 
 sw/source/core/draw/dflyobj.cxx |2 
 sw/source/core/edit/autofmt.cxx |2 
 sw/source/core/edit/edglss.cxx  |2 
 sw/source/core/edit/edlingu.cxx |   11 -
 sw/source/core/edit/ednumber.cxx|5 
 sw/source/core/fields/ddefld.cxx|4 
 sw/source/core/frmedt/fefly1.cxx|2 
 sw/source/core/frmedt/feshview.cxx  |2 
 sw/source/core/frmedt/fetab.cxx |2 
 sw/source/core/frmedt/fews.cxx  |4 
 sw/source/core/frmedt/tblsel.cxx|   16 +-
 sw/source/core/inc/DocumentRedlineManager.hxx   |4 
 sw/source/core/inc/DocumentSettingManager.hxx   |   64 -
 sw/source/core/inc/acorrect.hxx |4 
 sw/source/core/inc/flowfrm.hxx  |4 
 sw/source/core/inc/flyfrm.hxx   |   12 -
 sw/source/core/inc/frame.hxx|8 -
 sw/source/core/inc/swfont.hxx   |2 
 sw/source/core/layout/atrfrm.cxx|   35 ++---
 sw/source/core/layout/calcmove.cxx  |8 -
 sw/source/core/layout/colfrm.cxx|4 
 sw/source/core/layout/findfrm.cxx   |4 
 sw/source/core/layout/flowfrm.cxx   |   27 +---
 sw/source/core/layout/fly.cxx   |8 -
 sw/source/core/layout/flycnt.cxx|6 
 sw/source/core/layout/flyincnt.cxx  |2 
 sw/source/core/layout/flylay.cxx 

[Libreoffice-commits] core.git: include/vcl sc/inc sc/source unusedcode.easy vcl/source

2014-11-16 Thread Caolán McNamara
 include/vcl/mapmod.hxx  |1 -
 sc/inc/compiler.hxx |1 -
 sc/source/core/tool/token.cxx   |9 -
 sc/source/filter/inc/drawingmanager.hxx |   25 -
 sc/source/filter/oox/drawingmanager.cxx |   18 --
 unusedcode.easy |2 --
 vcl/source/gdi/mapmod.cxx   |5 -
 7 files changed, 61 deletions(-)

New commits:
commit 2ab73c3817dbd08f65db458e46fe80064df2f9a0
Author: Caolán McNamara 
Date:   Sun Nov 16 11:32:39 2014 +

callcatcher: update unused code

pleasing cleanup of whacky ScRawToken::sbyteOffset, etc.

Change-Id: I5ad97f8dab7c5dc9d5f0286bf606b619126c22c9

diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx
index 266e38f..2edd16f 100644
--- a/include/vcl/mapmod.hxx
+++ b/include/vcl/mapmod.hxx
@@ -69,7 +69,6 @@ public:
 booloperator!=( const MapMode& rMapMode ) const
 { return !(MapMode::operator==( rMapMode )); }
 boolIsDefault() const;
-boolIsSameInstance( const MapMode& rMapMode ) const;
 
 friend VCL_DLLPUBLIC SvStream& ReadMapMode( SvStream& rIStm, MapMode& 
rMapMode );
 friend VCL_DLLPUBLIC SvStream& WriteMapMode( SvStream& rOStm, const 
MapMode& rMapMode );
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 93246cd..8ae1a8e 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -115,7 +115,6 @@ struct ScRawToken: private ScRawTokenBase
 // Friends that use a temporary ScRawToken on the stack (and therefore need
 // the private dtor) and know what they're doing..
 friend class ScTokenArray;
-static sal_uInt16 sbyteOffset();
 public:
 union {
 double   nValue;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 28bb7a1..f0030f6 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -291,15 +291,6 @@ bool ScRawToken::IsValidReference() const
 return false;
 }
 
-sal_uInt16 ScRawToken::sbyteOffset()
-{
-// offset of sbyte in ScRawToken
-// offsetof(ScRawToken, sbyte) gives a warning with gcc, because 
ScRawToken is no POD
-
-ScRawToken aToken;
-return static_cast( reinterpret_cast(&aToken.sbyte) - 
reinterpret_cast(&aToken) );
-}
-
 FormulaToken* ScRawToken::CreateToken() const
 {
 #if OSL_DEBUG_LEVEL > 1
diff --git a/sc/source/filter/inc/drawingmanager.hxx 
b/sc/source/filter/inc/drawingmanager.hxx
index c9a50fa..021127a 100644
--- a/sc/source/filter/inc/drawingmanager.hxx
+++ b/sc/source/filter/inc/drawingmanager.hxx
@@ -35,32 +35,7 @@ namespace xls {
 
 const sal_uInt16 BIFF_OBJ_INVALID_ID= 0;
 
-// Model structures for BIFF OBJ record data
-
-/** This structure contains line formatting attributes from an OBJ record. */
-struct BiffObjLineModel
-{
-sal_uInt8   mnColorIdx; /// Index into color palette.
-sal_uInt8   mnStyle;/// Line dash style.
-sal_uInt8   mnWidth;/// Line width.
-boolmbAuto; /// True = automatic line format.
-
-explicitBiffObjLineModel();
-};
-
-/** This structure contains fill formatting attributes from an OBJ record. */
-struct BiffObjFillModel
-{
-sal_uInt8   mnBackColorIdx; /// Index to color palette for 
background color.
-sal_uInt8   mnPattColorIdx; /// Index to color palette for 
pattern foreground color.
-sal_uInt8   mnPattern;  /// Fill pattern.
-boolmbAuto; /// True = automatic fill format.
-
-explicitBiffObjFillModel();
-};
-
 // BIFF drawing objects
-
 class BiffDrawingBase;
 
 // BIFF drawing page
diff --git a/sc/source/filter/oox/drawingmanager.cxx 
b/sc/source/filter/oox/drawingmanager.cxx
index bf9c9a8..17f1b55 100644
--- a/sc/source/filter/oox/drawingmanager.cxx
+++ b/sc/source/filter/oox/drawingmanager.cxx
@@ -64,24 +64,6 @@ const sal_uInt8 BIFF_OBJ_PATT_SOLID = 1;
 
 } // namespace
 
-// Model structures for BIFF OBJ record data
-
-BiffObjLineModel::BiffObjLineModel() :
-mnColorIdx( BIFF_OBJ_LINE_AUTOCOLOR ),
-mnStyle( BIFF_OBJ_LINE_SOLID ),
-mnWidth( BIFF_OBJ_LINE_HAIR ),
-mbAuto( true )
-{
-}
-
-BiffObjFillModel::BiffObjFillModel() :
-mnBackColorIdx( BIFF_OBJ_LINE_AUTOCOLOR ),
-mnPattColorIdx( BIFF_OBJ_FILL_AUTOCOLOR ),
-mnPattern( BIFF_OBJ_PATT_SOLID ),
-mbAuto( true )
-{
-}
-
 // BIFF drawing page
 BiffDrawingBase::BiffDrawingBase( const WorksheetHelper& rHelper, const 
Reference< XDrawPage >& rxDrawPage ) :
 WorksheetHelper( rHelper ),
diff --git a/unusedcode.easy b/unusedcode.easy
index 7bd225a..6c9ec97 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -10,8 +10,6 @@ OpenGLContext::renderToFile()
 OpenGLContext::requestSingleBufferedRendering()
 OpenGLContext::requestVirtualDevice()
 OpenGLRender::CreateTextTexture(rt

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

2014-11-16 Thread Mark Hung
 sw/qa/extras/rtfimport/data/cp950listleveltext1.rtf |  196 
 sw/qa/extras/rtfimport/data/cp950listleveltext2.rtf |  177 ++
 sw/qa/extras/rtfimport/data/cp950listleveltext3.rtf |  177 ++
 sw/qa/extras/rtfimport/rtfimport.cxx|   77 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |7 
 5 files changed, 630 insertions(+), 4 deletions(-)

New commits:
commit 93b9a2381f2fc93f47a5b36c181741cc5f88e6fc
Author: Mark Hung 
Date:   Fri Nov 14 18:03:20 2014 -0800

Improve rtf import filter to handle Chinese suffixes of numbered lists.

Currently rtftok doesn't handle multibyte string as destination
text very well. For example, RTF files created by MSO 2010 Traditional
Chinese version use CP950 (aka BIG5) for unicode to ansi conversion.
When a Chinsese numbered list was picked, the Chinese dot ( unicode
0x3001, big5 0xa142 ), was used by default as a list number suffix.
However when it is imported , only a single B (0x42) were left.
The theory of the patch is to collect both hex string and normal
character with m_aHexBuffer, and convert it into OUString as late
as possible. It allows prefixes and suffixes to be imported from
RTF files created by MSO 2010 TC correctly.

Reviewed on:
https://gerrit.libreoffice.org/12435

Conflicts:
sw/qa/extras/rtfimport/rtfimport.cxx

Change-Id: I63062da39bf36ea27ec11e5d0eb1d1abf5018d96

diff --git a/sw/qa/extras/rtfimport/data/cp950listleveltext1.rtf 
b/sw/qa/extras/rtfimport/data/cp950listleveltext1.rtf
new file mode 100644
index 000..28a291c
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/cp950listleveltext1.rtf
@@ -0,0 +1,196 @@
+{\rtf1\adeflang1025\ansi\ansicpg950\uc2\adeff0\deff0\stshfdbch31505\stshfloch31506\stshfhich31506\stshfbi0\deflang1033\deflangfe1028\themelang1033\themelangfe1028\themelangcs0{\fonttbl{\f0\fbidi
 \froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\f14\fbidi \froman\fcharset136\fprq2{\*\panose 
02020500}\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9{\*\falt 
PMingLiU};}{\f14\fbidi \froman\fcharset136\fprq2{\*\panose 
02020500}\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9{\*\falt PMingLiU};}
+{\f37\fbidi \fswiss\fcharset0\fprq2{\*\panose 
020f0502020204030204}Calibri;}{\f38\fbidi \froman\fcharset136\fprq2{\*\panose 
}@\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9;}
+{\flomajor\f31500\fbidi \froman\fcharset0\fprq2{\*\panose 
02020603050405020304}Times New Roman;}{\fdbmajor\f31501\fbidi 
\froman\fcharset136\fprq2{\*\panose 
02020500}\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9{\*\falt PMingLiU};}
+{\fhimajor\f31502\fbidi \froman\fcharset0\fprq2{\*\panose 
02040503050406030204}Cambria;}{\fbimajor\f31503\fbidi 
\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}
+{\flominor\f31504\fbidi \froman\fcharset0\fprq2{\*\panose 
02020603050405020304}Times New Roman;}{\fdbminor\f31505\fbidi 
\froman\fcharset136\fprq2{\*\panose 
02020500}\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9{\*\falt PMingLiU};}
+{\fhiminor\f31506\fbidi \fswiss\fcharset0\fprq2{\*\panose 
020f0502020204030204}Calibri;}{\fbiminor\f31507\fbidi 
\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New 
Roman;}{\f40\fbidi \froman\fcharset238\fprq2 Times New Roman CE;}
+{\f41\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}{\f43\fbidi 
\froman\fcharset161\fprq2 Times New Roman Greek;}{\f44\fbidi 
\froman\fcharset162\fprq2 Times New Roman Tur;}{\f45\fbidi 
\froman\fcharset177\fprq2 Times New Roman (Hebrew);}
+{\f46\fbidi \froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f47\fbidi 
\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f48\fbidi 
\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
+{\f182\fbidi \froman\fcharset0\fprq2 PMingLiU Western{\*\falt 
PMingLiU};}{\f182\fbidi \froman\fcharset0\fprq2 PMingLiU Western{\*\falt 
PMingLiU};}{\f410\fbidi \fswiss\fcharset238\fprq2 Calibri CE;}{\f411\fbidi 
\fswiss\fcharset204\fprq2 Calibri Cyr;}
+{\f413\fbidi \fswiss\fcharset161\fprq2 Calibri Greek;}{\f414\fbidi 
\fswiss\fcharset162\fprq2 Calibri Tur;}{\f417\fbidi \fswiss\fcharset186\fprq2 
Calibri Baltic;}{\f418\fbidi \fswiss\fcharset163\fprq2 Calibri (Vietnamese);}
+{\f422\fbidi \froman\fcharset0\fprq2 @\'b7\'73\'b2\'d3\'a9\'fa\'c5\'e9 
Western;}{\flomajor\f31508\fbidi \froman\fcharset238\fprq2 Times New Roman 
CE;}{\flomajor\f31509\fbidi \froman\fcharset204\fprq2 Times New Roman Cyr;}
+{\flomajor\f31511\fbidi \froman\fcharset161\fprq2 Times New Roman 
Greek;}{\flomajor\f31512\fbidi \froman\fcharset162\fprq2 Times New Roman 
Tur;}{\flomajor\f31513\fbidi \froman\fcharset177\fprq2 Times New Roman 
(Hebrew);}
+{\flomajor\f31514\fbidi \froman\fcharset178\fprq2 Times New Roman 
(Arabic);}{\flomajor\f31515\fbidi \froman\fcharset186\fprq2 Times New Roman 
Baltic;}{\flomajor\f31516\fbidi \froman\fcharset163\fprq2 Times New Roman 
(Vietnamese);}
+{\fdbmajor\f31520\fbidi \fro

[Libreoffice-commits] core.git: cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/qa

2014-11-16 Thread Michael Meeks
 cppcanvas/CppunitTest_cppcanvas_emfplus.mk |1 +
 cppcanvas/qa/extras/emfplus/emfplus.cxx|   19 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit 19866932ccda9b143c1c4cd66cf3dbaac7e607ad
Author: Michael Meeks 
Date:   Sun Nov 16 14:26:36 2014 +0100

emfplus: re-work and cleanup unit test

Change-Id: I484331c4dd5feedf8587530912bb65556c1689c0

diff --git a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk 
b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
index 6853cd4..32b712f 100644
--- a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
+++ b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,cppcanvas_emfplus, 
\
cppuhelper \
sal \
sfx \
+   subsequenttest \
test \
tl \
unotest \
diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx 
b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index ac4a6f2..96bde56 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -15,18 +15,17 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 
 using namespace com::sun::star;
 
-class Test : public test::BootstrapFixture, public unotest::MacrosTest
+class Test : public UnoApiTest
 {
 public:
-Test()
-: mpTestDocumentPath("/cppcanvas/qa/extras/emfplus/data/")
+Test() : UnoApiTest("/cppcanvas/qa/extras/emfplus/data/")
 {
 }
 
@@ -36,20 +35,25 @@ public:
 
 virtual void setUp() SAL_OVERRIDE
 {
-test::BootstrapFixture::setUp();
+UnoApiTest::setUp();
 
mxDesktop.set(frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
 };
 
 virtual void tearDown() SAL_OVERRIDE
 {
 if (mxComponent.is())
+{
+closeDocument(mxComponent);
 mxComponent->dispose();
-test::BootstrapFixture::tearDown();
+}
+UnoApiTest::tearDown();
 };
 
 Bitmap load(const char* pName)
 {
-mxComponent = loadFromDesktop(getURLFromSrc(mpTestDocumentPath) + 
OUString::createFromAscii(pName), "com.sun.star.drawing.DrawingDocument");
+OUString aFileURL;
+createFileURL(OUString::createFromAscii(pName), aFileURL);
+mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.drawing.DrawingDocument");
 SfxBaseModel* pModel = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pModel);
 SfxObjectShell* pShell = pModel->GetObjectShell();
@@ -75,7 +79,6 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 uno::Reference mxComponent;
-const char* mpTestDocumentPath;
 };
 
 void Test::testFdo77229()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/qa

2014-11-16 Thread Michael Meeks
 cppcanvas/CppunitTest_cppcanvas_emfplus.mk |1 +
 cppcanvas/qa/extras/emfplus/emfplus.cxx|   19 +++
 2 files changed, 12 insertions(+), 8 deletions(-)

New commits:
commit ddf15dc9b86298dd8e06d0f91b609fa4725ececb
Author: Michael Meeks 
Date:   Sun Nov 16 14:26:36 2014 +0100

emfplus: re-work and cleanup unit test

Change-Id: I484331c4dd5feedf8587530912bb65556c1689c0

diff --git a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk 
b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
index 6853cd4..32b712f 100644
--- a/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
+++ b/cppcanvas/CppunitTest_cppcanvas_emfplus.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,cppcanvas_emfplus, 
\
cppuhelper \
sal \
sfx \
+   subsequenttest \
test \
tl \
unotest \
diff --git a/cppcanvas/qa/extras/emfplus/emfplus.cxx 
b/cppcanvas/qa/extras/emfplus/emfplus.cxx
index ac4a6f2..96bde56 100644
--- a/cppcanvas/qa/extras/emfplus/emfplus.cxx
+++ b/cppcanvas/qa/extras/emfplus/emfplus.cxx
@@ -15,18 +15,17 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
 
 using namespace com::sun::star;
 
-class Test : public test::BootstrapFixture, public unotest::MacrosTest
+class Test : public UnoApiTest
 {
 public:
-Test()
-: mpTestDocumentPath("/cppcanvas/qa/extras/emfplus/data/")
+Test() : UnoApiTest("/cppcanvas/qa/extras/emfplus/data/")
 {
 }
 
@@ -36,20 +35,25 @@ public:
 
 virtual void setUp() SAL_OVERRIDE
 {
-test::BootstrapFixture::setUp();
+UnoApiTest::setUp();
 
mxDesktop.set(frame::Desktop::create(comphelper::getComponentContext(getMultiServiceFactory(;
 };
 
 virtual void tearDown() SAL_OVERRIDE
 {
 if (mxComponent.is())
+{
+closeDocument(mxComponent);
 mxComponent->dispose();
-test::BootstrapFixture::tearDown();
+}
+UnoApiTest::tearDown();
 };
 
 Bitmap load(const char* pName)
 {
-mxComponent = loadFromDesktop(getURLFromSrc(mpTestDocumentPath) + 
OUString::createFromAscii(pName), "com.sun.star.drawing.DrawingDocument");
+OUString aFileURL;
+createFileURL(OUString::createFromAscii(pName), aFileURL);
+mxComponent = loadFromDesktop(aFileURL, 
"com.sun.star.drawing.DrawingDocument");
 SfxBaseModel* pModel = dynamic_cast(mxComponent.get());
 CPPUNIT_ASSERT(pModel);
 SfxObjectShell* pShell = pModel->GetObjectShell();
@@ -75,7 +79,6 @@ public:
 CPPUNIT_TEST_SUITE_END();
 
 uno::Reference mxComponent;
-const char* mpTestDocumentPath;
 };
 
 void Test::testFdo77229()
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 2 commits - vcl/opengl vcl/source

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/salbmp.cxx   |7 +--
 vcl/source/opengl/OpenGLContext.cxx |2 +-
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit f04e5ce57e9c31e187f4db193923fe5ac9ab42c1
Author: Markus Mohrhard 
Date:   Sun Nov 16 13:40:45 2014 +0100

remove some useless SAL_WARNs

Change-Id: I26ae7aaab0e2d1685fd9c961aba027e1399b6911

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index ad43ef8..4b5287e 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -200,8 +200,7 @@ bool OpenGLSalBitmap::AllocateUserData()
 }
 if (!alloc)
 {
-SAL_WARN(
-"vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << mnHeight);
+SAL_WARN("vcl.opengl", "bad alloc " << mnBytesPerRow << "x" << 
mnHeight);
 maUserBuffer.reset( static_cast(NULL) );
 mnBytesPerRow = 0;
 }
@@ -239,8 +238,6 @@ public:
 ImplPixelFormat8( const BitmapPalette& rPalette )
 : mrPalette( rPalette )
 {
-if ( mrPalette.GetEntryCount() < 256 )
-SAL_WARN( "vcl.opengl", "Bad sign, if we get an OOB pixel we die" 
);
 }
 virtual const BitmapColor& ReadPixel() SAL_OVERRIDE
 {
@@ -262,8 +259,6 @@ public:
 , mnX(0)
 , mnShift(4)
 {
-if ( mrPalette.GetEntryCount() < 16 )
-SAL_WARN( "vcl.opengl", "Bad sign, if we get an OOB pixel we die" 
);
 }
 virtual void StartLine( sal_uInt8* pLine ) SAL_OVERRIDE
 {
commit 98a0ff7183c06e12cadba5412d26d203723b137a
Author: Markus Mohrhard 
Date:   Sun Nov 16 12:33:55 2014 +0100

use correct flag to enable ARB debug version

Change-Id: I933aea4f9cb1ccd58f9a07e7d32ff28077f8bb33

diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 15d551a..0659ce5 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -865,7 +865,7 @@ bool OpenGLContext::InitGLEW()
 {
 if (glDebugMessageCallbackARB)
 {
-glEnable(GL_DEBUG_OUTPUT);
+glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
 glDebugMessageCallbackARB(&debug_callback, NULL);
 }
 else if ( glDebugMessageCallback )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - chart2/source cui/source dbaccess/source include/sfx2 include/svtools include/svx include/vcl sc/source sfx2/source svtools/source svx/source sw/qa sw/sourc

2014-11-16 Thread Miklos Vajna
 chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx   |4 ++--
 cui/source/dialogs/cuigrfflt.cxx   |2 +-
 cui/source/dialogs/iconcdlg.cxx|2 +-
 cui/source/dialogs/insdlg.cxx  |2 +-
 cui/source/inc/cuigrfflt.hxx   |2 +-
 cui/source/inc/iconcdlg.hxx|2 +-
 cui/source/inc/insdlg.hxx  |2 +-
 dbaccess/source/ui/dlg/dlgsize.cxx |2 +-
 include/sfx2/basedlgs.hxx  |8 
 include/svtools/wizdlg.hxx |2 +-
 include/svx/stddlg.hxx |2 +-
 include/vcl/dialog.hxx |4 ++--
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx   |2 +-
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |2 +-
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |2 +-
 sc/source/ui/inc/MatrixComparisonGenerator.hxx |2 +-
 sc/source/ui/inc/StatisticsInputOutputDialog.hxx   |2 +-
 sc/source/ui/inc/StatisticsTwoVariableDialog.hxx   |2 +-
 sc/source/ui/inc/anyrefdg.hxx  |8 
 sc/source/ui/miscdlgs/anyrefdg.cxx |4 ++--
 sc/source/ui/miscdlgs/groupdlg.cxx |4 ++--
 sc/source/ui/miscdlgs/mtrindlg.cxx |2 +-
 sfx2/source/dialog/basedlgs.cxx|8 
 svtools/source/dialogs/wizdlg.cxx  |2 +-
 svx/source/dialog/stddlg.cxx   |2 +-
 sw/qa/extras/rtfimport/data/fdo83204.rtf   |9 +
 sw/qa/extras/rtfimport/rtfimport.cxx   |6 ++
 sw/source/ui/dbui/customizeaddresslistdialog.cxx   |2 +-
 sw/source/ui/dbui/customizeaddresslistdialog.hxx   |2 +-
 sw/source/ui/dbui/mmoutputpage.cxx |4 ++--
 sw/source/ui/dialog/swmessdialog.cxx   |2 +-
 sw/source/uibase/dbui/dbui.cxx |2 +-
 sw/source/uibase/inc/dbui.hxx  |2 +-
 sw/source/uibase/inc/swmessdialog.hxx  |2 +-
 vcl/source/window/dialog.cxx   |8 
 writerfilter/source/dmapper/BorderHandler.cxx  |2 +-
 writerfilter/source/dmapper/CellColorHandler.cxx   |7 +++
 writerfilter/source/dmapper/DomainMapper.cxx   |2 +-
 writerfilter/source/dmapper/TDefTableHandler.cxx   |2 +-
 writerfilter/source/rtftok/rtfdocumentimpl.cxx |2 ++
 writerfilter/source/rtftok/rtfsdrimport.cxx|6 +++---
 41 files changed, 76 insertions(+), 60 deletions(-)

New commits:
commit 133c295bbe6f746d4c2fd2fe7560206b890cdf1f
Author: Miklos Vajna 
Date:   Sun Nov 16 12:13:19 2014 +0100

vcl: let the ModalDialog ctor take an OUString

Change-Id: I839435338f4acf80c40896b6c86f7ef122f5449d

diff --git a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx 
b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
index 50fbc2f..2af1b5f 100644
--- a/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertAxis_Grid.cxx
@@ -46,8 +46,8 @@ SchAxisDlg::SchAxisDlg(vcl::Window* pWindow,
 const InsertAxisOrGridDialogData& rInput, bool bAxisDlg)
 : ModalDialog(pWindow,
   bAxisDlg ?
-  OString("InsertAxisDialog") :
-  OString("InsertGridDialog"),
+  OUString("InsertAxisDialog") :
+  OUString("InsertGridDialog"),
   bAxisDlg ?
   OUString("modules/schart/ui/insertaxisdlg.ui") :
   OUString("modules/schart/ui/insertgriddlg.ui"))
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index 57a853c..9eb4749 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -137,7 +137,7 @@ void GraphicPreviewWindow::Resize()
 }
 
 GraphicFilterDialog::GraphicFilterDialog(vcl::Window* pParent,
-const OString& rID, const OUString& rUIXMLDescription,
+const OUString& rID, const OUString& rUIXMLDescription,
 const Graphic& rGraphic)
 : ModalDialog(pParent, rID, rUIXMLDescription)
 , maModifyHdl(LINK( this, GraphicFilterDialog, ImplModifyHdl))
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 835829d..5d558c0 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -173,7 +173,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Win

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

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |  188 +++-
 1 file changed, 125 insertions(+), 63 deletions(-)

New commits:
commit 7cf996cf6e8d7982b42ab8dcb2b5f035aa5d6c34
Author: Michael Meeks 
Date:   Sun Nov 16 12:01:41 2014 +0100

vcldemo: create multiple windows sharing the same renderer.

Change-Id: Iac813b78c476b69dc6aa78d48c025f5fda76db1a

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 665abd5..1e2c9b2 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -28,31 +28,20 @@
 #include 
 #include 
 
-#if 0
-#  define FIXME_SELF_INTERSECTING_WORKING
-#endif
+#define FIXME_SELF_INTERSECTING_WORKING 0
+#define FIXME_BOUNCE_BUTTON 0
 
 // debugging hook just for us
 SAL_DLLPUBLIC css::uno::Sequence< OUString > ImageTree_getAllImageNames();
 
 using namespace css;
 
-class DemoBase :
-public WorkWindow // hide OutputDevice if necessary
-{
-public:
-DemoBase() : WorkWindow(NULL, WB_APP | WB_STDWORK)
-{
-}
-OutputDevice &getOutDev() { return *this; }
-};
-
 enum RenderStyle {
 RENDER_THUMB,// small view  to a page
 RENDER_EXPANDED, // expanded view of this renderer
 };
 
-class DemoWin : public DemoBase
+class DemoRenderer
 {
 Bitmap   maIntroBW;
 BitmapEx maIntro;
@@ -61,9 +50,9 @@ class DemoWin : public DemoBase
 int mnSegmentsY;
 
 struct RenderContext {
-RenderStyle meStyle;
-boolmbVDev;
-DemoWin*mpDemoWin;
+RenderStyle   meStyle;
+bool  mbVDev;
+DemoRenderer *mpDemoRenderer;
 };
 struct RegionRenderer {
 public:
@@ -85,14 +74,15 @@ class DemoWin : public DemoBase
 void InitRenderers();
 
 public:
-DemoWin() : DemoBase()
-  , mnSegmentsX(4)
-  , mnSegmentsY(3)
-  , mnSelectedRenderer(-1)
-  , mpButton(NULL)
-  , mpButtonWin(NULL)
-  , mnBounceX(1)
-  , mnBounceY(1)
+DemoRenderer() : mnSegmentsX(4)
+   , mnSegmentsY(3)
+   , mnSelectedRenderer(-1)
+#if FIXME_BOUNCE_BUTTON
+   , mpButton(NULL)
+   , mpButtonWin(NULL)
+   , mnBounceX(1)
+   , mnBounceY(1)
+#endif
 {
 if (!Application::LoadBrandBitmap("intro", maIntro))
 Application::Abort("Failed to load intro image");
@@ -106,29 +96,36 @@ public:
 OUString getRendererList();
 void selectRenderer(const OUString &rName);
 
+Size maSize;
+void SetSizePixel(const Size &rSize) { maSize = rSize; }
+Size GetSizePixel() const{ return maSize;  }
+
+
+// more of a 'Window' concept - push upwards ?
+#if FIXME_BOUNCE_BUTTON
 // Bouncing windows on click ...
 PushButton *mpButton;
 FloatingWindow *mpButtonWin;
 AutoTimer   maBounce;
 int mnBounceX, mnBounceY;
 DECL_LINK(BounceTimerCb, void *);
+#endif
 
-virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
-virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
+bool MouseButtonDown(const MouseEvent& rMEvt);
+void KeyInput(const KeyEvent& rKEvt);
 
-virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE
+static std::vector partition(const RenderContext &rCtx, int nX, 
int nY)
 {
-fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), 
rRect.getY(), rRect.getWidth(), rRect.getHeight());
-drawToDevice(getOutDev(), false);
+return rCtx.mpDemoRenderer->partition(nX, nY);
 }
 
-static std::vector partition(OutputDevice &rDev, int nX, int nY)
+std::vector partition(int nX, int nY)
 {
 Rectangle r;
 std::vector aRegions;
 
 // Make small cleared area for these guys
-Size aSize(rDev.GetOutputSizePixel());
+Size aSize(GetSizePixel());
 long nBorderSize = aSize.Width() / 32;
 long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
 long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
@@ -183,8 +180,8 @@ public:
 sal_uInt16 nOldAA = rDev.GetAntialiasing();
 rDev.SetAntialiasing(ANTIALIASING_ENABLE_B2DDRAW);
 
-std::vector aRegions(DemoWin::partition(rDev, 4, 
4));
-DemoWin::clearRects(rDev, aRegions);
+std::vector aRegions(DemoRenderer::partition(rCtx, 
4, 4));
+DemoRenderer::clearRects(rDev, aRegions);
 
 #if 0 // FIXME: get this through to the backend ...
 double nTransparency[] = {
@@ -280,7 +277,7 @@ public:
 {
 if (rCtx.meStyle == RENDER_EXPANDED)
 {
-std::vector aRegions(DemoWin::partition(rDev, 2, 
2));
+std::vector aRegions(DemoRenderer::partition(rCtx, 
2, 2));
 for (size_t i = 0; i < aRegions.size(); i++)
 {
 vcl::Region aRegi

[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/workben/vcldemo.cxx |  188 +++-
 1 file changed, 125 insertions(+), 63 deletions(-)

New commits:
commit 86bc8fe74fd317943828cfd5b42335a74e0a50e5
Author: Michael Meeks 
Date:   Sun Nov 16 12:01:41 2014 +0100

vcldemo: create multiple windows sharing the same renderer.

Change-Id: Iac813b78c476b69dc6aa78d48c025f5fda76db1a

diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index a41d61d..346edda 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -28,31 +28,20 @@
 #include 
 #include 
 
-#if 0
-#  define FIXME_SELF_INTERSECTING_WORKING
-#endif
+#define FIXME_SELF_INTERSECTING_WORKING 0
+#define FIXME_BOUNCE_BUTTON 0
 
 // debugging hook just for us
 SAL_DLLPUBLIC css::uno::Sequence< OUString > ImageTree_getAllImageNames();
 
 using namespace css;
 
-class DemoBase :
-public WorkWindow // hide OutputDevice if necessary
-{
-public:
-DemoBase() : WorkWindow(NULL, WB_APP | WB_STDWORK)
-{
-}
-OutputDevice &getOutDev() { return *this; }
-};
-
 enum RenderStyle {
 RENDER_THUMB,// small view  to a page
 RENDER_EXPANDED, // expanded view of this renderer
 };
 
-class DemoWin : public DemoBase
+class DemoRenderer
 {
 Bitmap   maIntroBW;
 BitmapEx maIntro;
@@ -61,9 +50,9 @@ class DemoWin : public DemoBase
 int mnSegmentsY;
 
 struct RenderContext {
-RenderStyle meStyle;
-boolmbVDev;
-DemoWin*mpDemoWin;
+RenderStyle   meStyle;
+bool  mbVDev;
+DemoRenderer *mpDemoRenderer;
 };
 struct RegionRenderer {
 public:
@@ -85,14 +74,15 @@ class DemoWin : public DemoBase
 void InitRenderers();
 
 public:
-DemoWin() : DemoBase()
-  , mnSegmentsX(4)
-  , mnSegmentsY(3)
-  , mnSelectedRenderer(-1)
-  , mpButton(NULL)
-  , mpButtonWin(NULL)
-  , mnBounceX(1)
-  , mnBounceY(1)
+DemoRenderer() : mnSegmentsX(4)
+   , mnSegmentsY(3)
+   , mnSelectedRenderer(-1)
+#if FIXME_BOUNCE_BUTTON
+   , mpButton(NULL)
+   , mpButtonWin(NULL)
+   , mnBounceX(1)
+   , mnBounceY(1)
+#endif
 {
 if (!Application::LoadBrandBitmap("intro", maIntro))
 Application::Abort("Failed to load intro image");
@@ -106,29 +96,36 @@ public:
 OUString getRendererList();
 void selectRenderer(const OUString &rName);
 
+Size maSize;
+void SetSizePixel(const Size &rSize) { maSize = rSize; }
+Size GetSizePixel() const{ return maSize;  }
+
+
+// more of a 'Window' concept - push upwards ?
+#if FIXME_BOUNCE_BUTTON
 // Bouncing windows on click ...
 PushButton *mpButton;
 FloatingWindow *mpButtonWin;
 AutoTimer   maBounce;
 int mnBounceX, mnBounceY;
 DECL_LINK(BounceTimerCb, void *);
+#endif
 
-virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
-virtual void KeyInput( const KeyEvent& rKEvt ) SAL_OVERRIDE;
+bool MouseButtonDown(const MouseEvent& rMEvt);
+void KeyInput(const KeyEvent& rKEvt);
 
-virtual void Paint(const Rectangle& rRect) SAL_OVERRIDE
+static std::vector partition(const RenderContext &rCtx, int nX, 
int nY)
 {
-fprintf(stderr, "DemoWin::Paint(%ld,%ld,%ld,%ld)\n", rRect.getX(), 
rRect.getY(), rRect.getWidth(), rRect.getHeight());
-drawToDevice(getOutDev(), false);
+return rCtx.mpDemoRenderer->partition(nX, nY);
 }
 
-static std::vector partition(OutputDevice &rDev, int nX, int nY)
+std::vector partition(int nX, int nY)
 {
 Rectangle r;
 std::vector aRegions;
 
 // Make small cleared area for these guys
-Size aSize(rDev.GetOutputSizePixel());
+Size aSize(GetSizePixel());
 long nBorderSize = aSize.Width() / 32;
 long nBoxWidth = (aSize.Width() - nBorderSize*(nX+1)) / nX;
 long nBoxHeight = (aSize.Height() - nBorderSize*(nY+1)) / nY;
@@ -184,8 +181,8 @@ public:
 sal_uInt16 nOldAA = rDev.GetAntialiasing();
 rDev.SetAntialiasing(ANTIALIASING_ENABLE_B2DDRAW);
 
-std::vector aRegions(DemoWin::partition(rDev, 4, 
4));
-DemoWin::clearRects(rDev, aRegions);
+std::vector aRegions(DemoRenderer::partition(rCtx, 
4, 4));
+DemoRenderer::clearRects(rDev, aRegions);
 
 #if 0 // FIXME: get this through to the backend ...
 double nTransparency[] = {
@@ -281,7 +278,7 @@ public:
 {
 if (rCtx.meStyle == RENDER_EXPANDED)
 {
-std::vector aRegions(DemoWin::partition(rDev, 2, 
2));
+std::vector aRegions(DemoRenderer::partition(rCtx, 
2, 2));
 for (size_t i = 0; i < aRegions.size(); i++)
 {
 vcl::Region aRegi

[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - 2 commits - vcl/opengl vcl/unx

2014-11-16 Thread Markus Mohrhard
 vcl/opengl/gdiimpl.cxx  |2 +-
 vcl/unx/generic/app/saldisp.cxx |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a68947bea8a93448cf5fcb0c866a6cfb429263f3
Author: Markus Mohrhard 
Date:   Sun Nov 16 11:43:38 2014 +0100

Revert "make something visible on the screen again"

This reverts commit 6661fdab95b981843f6d8392769f32e7377eaaeb.

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 9485088..5c5eae3 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1508,7 +1508,7 @@ void OpenGLSalGraphicsImpl::endPaint()
 if( mnPainting == 0 )
 {
 maContext.makeCurrent();
-maContext.swapBuffers();
+glFlush();
 }
 }
 
commit a7be267dea2c8503fc73f6ddd4a9f47a81af9744
Author: Markus Mohrhard 
Date:   Sun Nov 16 11:43:07 2014 +0100

use the OpenGLHelper version to check for OpenGL support

Change-Id: Ib101d2605e5e739bb1d063fa7019e4e5930462a0

diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx
index ffd12d7..779453e 100644
--- a/vcl/unx/generic/app/saldisp.cxx
+++ b/vcl/unx/generic/app/saldisp.cxx
@@ -193,7 +193,7 @@ bool SalDisplay::BestVisual( Display *pDisplay,
 return rVI.visualid == nDefVID;
 
 try {
-bool bUseOpenGL = officecfg::Office::Common::VCL::UseOpenGL::get();
+bool bUseOpenGL = OpenGLHelper::isVCLOpenGLEnabled();
 if( bUseOpenGL && OpenGLHelper::GetVisualInfo( pDisplay, nScreen, rVI 
) )
 return rVI.visualid == nDefVID;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/opengl vcl/workben

2014-11-16 Thread Michael Meeks
 vcl/opengl/gdiimpl.cxx  |5 +
 vcl/workben/vcldemo.cxx |1 +
 2 files changed, 6 insertions(+)

New commits:
commit 139b0e6cd5ba1191ff7cdef04c982ba2b6331068
Author: Michael Meeks 
Date:   Sat Nov 15 17:33:36 2014 +0100

vcldemo: disable broken gradient stencil use.

Change-Id: Ifce85b1a7fa8e8b6fc57802a5fb559d2db50ba2a

diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index edffab9..9485088 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1447,6 +1447,8 @@ bool OpenGLSalGraphicsImpl::drawGradient(const 
tools::PolyPolygon& rPolyPoly,
 
 PreDraw();
 
+#define FIXME_BROKEN_STENCIL_FOR_GRADIENTS 0
+#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS
 ImplSetClipBit( vcl::Region( rPolyPoly ), 0x02 );
 if( mbUseStencil )
 {
@@ -1458,6 +1460,7 @@ bool OpenGLSalGraphicsImpl::drawGradient(const 
tools::PolyPolygon& rPolyPoly,
 glEnable( GL_STENCIL_TEST );
 glStencilFunc( GL_EQUAL, 2, 0xFF );
 }
+#endif
 
 // if border >= 100%, draw solid rectangle with start color
 if( rGradient.GetBorder() >= 100.0 )
@@ -1482,8 +1485,10 @@ bool OpenGLSalGraphicsImpl::drawGradient(const 
tools::PolyPolygon& rPolyPoly,
 DrawRadialGradient( rGradient, aBoundRect );
 }
 
+#if FIXME_BROKEN_STENCIL_FOR_GRADIENTS
 if( !mbUseStencil )
 glDisable( GL_STENCIL_TEST );
+#endif
 PostDraw();
 
 CHECK_GL_ERROR();
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index 665abd5..a41d61d 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -165,6 +165,7 @@ public:
 
 void drawBackground(OutputDevice &rDev, Rectangle r)
 {
+rDev.Erase();
 Gradient aGradient;
 aGradient.SetStartColor(COL_BLUE);
 aGradient.SetEndColor(COL_GREEN);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] buildbot.git: lcov-report/lcov-report.cmds.example lcov-report/lcov-report.sh lcov-report/README

2014-11-16 Thread Maarten Hoes
 lcov-report/README   |   34 +---
 lcov-report/lcov-report.cmds.example |8 -
 lcov-report/lcov-report.sh   |  146 +++
 3 files changed, 118 insertions(+), 70 deletions(-)

New commits:
commit ca5fa90a3cbdbdafa231c22fe6bb7f8a9e686a2d
Author: Maarten Hoes 
Date:   Thu Nov 13 21:51:45 2014 +0100

Removed concept of 'commandfile', allow for seperate runs of [-b|-a|-c].

Change-Id: I82721911ac808baaacbaa773a9b63e832de08c72
Reviewed-on: https://gerrit.libreoffice.org/12413
Reviewed-by: Norbert Thiebaud 
Tested-by: Norbert Thiebaud 

diff --git a/lcov-report/README b/lcov-report/README
index e73f51a..542d718 100644
--- a/lcov-report/README
+++ b/lcov-report/README
@@ -1,27 +1,35 @@
 
-A small script to create gcov/lcov code coverage reports of tests run
-on the libreoffice source code.
+lcov-report.sh
 
+   A small script to create gcov/lcov code coverage reports of tests run
+   on the libreoffice source code.
 
-Usage: lcov-report.sh [-b] -c [FILE] -s [DIRECTORY] -t [DIRECTORY] -w 
[DIRECTORY]
 
+Usage: lcov-report.sh [-a|-b|-c] -s [DIRECTORY] -t [DIRECTORY] -w [DIRECTORY]
 
--s
-Specify the location where the libreoffice source code is
-located. This flag is mandatory.
-
--c
-Specify the file containing the libreoffice test commands to run.
-In it's simplest form, this file could contain a single line
-reading something like 'cd $SRCDIR && make check'. This flag
-is mandatory.
 
 -b
+Run lcov commands before you run your tests. This creates a
+baseline lcov tracefile. You can only supply one of '-a', '-b'
+or '-c' simultaneously.
+
+-a
+Run lcov commands after you run your tests. This creates a
+tracefile that contains the resukts of your tests, and combines
+it with the baseline. You can only supply one of '-a', '-b' or
+'-c' simultaneously.
+
+-c
 Specifies to build the libreoffice sources in the location
 specified by the '-s' flag. This flag is optional. If you
 choose to omit it, you must make sure the libreoffice source
 code is built using the appropriate FLAGS ('-fprofile-arcs
--ftest-coverage').
+-ftest-coverage'). You can only supply one of '-a', '-b' or
+'-c' simultaneously.
+
+-s
+Specify the location where the libreoffice source code is
+located. This flag is mandatory.
 
 -t
 Specifies the directory in which to contain the lcov
diff --git a/lcov-report/lcov-report.cmds.example 
b/lcov-report/lcov-report.cmds.example
deleted file mode 100644
index a577fde..000
--- a/lcov-report/lcov-report.cmds.example
+++ /dev/null
@@ -1,8 +0,0 @@
-cd "$SRC_DIR"
-make check
-MY_EXITCODE=$?
-if [ "$MY_EXITCODE" != "0" ]
-then
-   echo "ERROR: make check failed with exitcode $MY_EXITCODE" >&2
-   exit "$MY_EXITCODE"
-fi
diff --git a/lcov-report/lcov-report.sh b/lcov-report/lcov-report.sh
index 607405e..c3f6420 100755
--- a/lcov-report/lcov-report.sh
+++ b/lcov-report/lcov-report.sh
@@ -15,39 +15,99 @@
 
 init()
 { 
-if [ "$SRC_DIR" = "/" -o "$TRACEFILE_DIR" = "/" -o "$HTML_DIR" = "/" ]
+if [ -n "$SOURCE_COMPILE" -a -n "$BEFORE" -o -n "$SOURCE_COMPILE" -a -n 
"$AFTER" -o -n "$BEFORE" -a -n "$AFTER" ]
 then
-   echo "ERROR: Dont use the root '/' directory for storage." >&2
+   echo "ERROR: You can only supply one of '-a', '-b' or '-c' 
simultaneously." >&2
exit 1
 fi
 
-if [ ! -d "$SRC_DIR" ]
+if [ -n "$AFTER" -a -z "$HTML_DIR" ]
+then
+   echo "ERROR: When specifying '-a', you also need to specify '-w'." >&2
+   exit 1
+fi
+
+if [ -n "$AFTER" -a -z "$SRC_DIR" ]
 then
-   echo "ERROR: Failed to locate directory $SRC_DIR." >&2
+   echo "ERROR: When specifying '-a', you also need to specify '-s'." >&2
exit 1
 fi
 
-rm -rf "$TRACEFILE_DIR" "$HTML_DIR"
+if [ -n "$BEFORE" -a -z "$SRC_DIR" ]
+then
+   echo "ERROR: When specifying '-b', you also need to specify '-s'." >&2
+   exit 1
+fi
 
-mkdir "$TRACEFILE_DIR"
-if [ "$?" != "0" ]
+if [ -n "$BEFORE" -o -n "$AFTER" ]
+then
+   if [ -z "$TRACEFILE_DIR" ]
+   then
+   echo "ERROR: When specifying '-a' or '-b', you also need to 
specify '-t'." >&2
+   exit 1
+   fi
+fi
+
+if [ "$SRC_DIR" = "/" -o "$TRACEFILE_DIR" = "/" -o "$HTML_DIR" = "/" ]
 then
-   echo "ERROR: Failed to create directory $TRACEFILE_DIR." >&2
+   echo "ERROR: Dont use the root '/' directory for storage." >&2
exit 1
 fi
 
-mkdir "$HTML_DIR"
-if [ "$?" != "0" ]
+if [ ! -d "$SRC_DIR" ]
 then
-   echo "ERROR: Failed to create directory $HTML_DIR." >&2
+   echo "ERROR: Failed to locate source code directory $SRC_DIR." >&2
exit 1
 fi
 
-if [ ! -f "$TEST_CMDS_FILE" ]
+if [ ! -d "$SRC_DIR"/.git ]
 then
-   echo "ERROR: Failed to find test command file $TEST_CMDS_FILE." >&2
+   echo "ERROR: $SRC_DIR is not a 

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

2014-11-16 Thread Takeshi Abe
 starmath/source/cfgitem.hxx |   14 +++---
 1 file changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 1bbda773e98cf1c651311b03c1684393b73c7f50
Author: Takeshi Abe 
Date:   Sun Nov 16 11:18:20 2014 +0900

Mark as noncopyable

Change-Id: Ibbec7a5d9b6726865da14c9bdfad8b8118f85e5b

diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 1e4d90e..680c414 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -37,6 +37,7 @@
 
 #include 
 #include 
+#include 
 
 class SmSym;
 class SmFormat;
@@ -67,15 +68,11 @@ struct SmFntFmtListEntry
 SmFntFmtListEntry( const OUString &rId, const SmFontFormat &rFntFmt );
 };
 
-class SmFontFormatList
+class SmFontFormatList : private boost::noncopyable
 {
 std::deque aEntries;
 boolbModified;
 
-// disallow copy-constructor and assignment-operator for now
-SmFontFormatList( const SmFontFormatList & );
-SmFontFormatList & operator = ( const SmFontFormatList & );
-
 public:
 SmFontFormatList();
 
@@ -95,7 +92,7 @@ public:
 voidSetModified( bool bVal ){ bModified = bVal; }
 };
 
-class SmMathConfig : public utl::ConfigItem
+class SmMathConfig : public utl::ConfigItem, private boost::noncopyable
 {
 SmFormat *  pFormat;
 SmCfgOther *pOther;
@@ -104,11 +101,6 @@ class SmMathConfig : public utl::ConfigItem
 boolbIsOtherModified;
 boolbIsFormatModified;
 
-// disallow copy-constructor and assignment-operator for now
-SmMathConfig( const SmMathConfig & );
-SmMathConfig & operator = ( const SmMathConfig & );
-
-
 voidStripFontFormatList( const std::vector< SmSym > &rSymbols );
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Chris Sherlock
 vcl/unx/generic/app/wmadaptor.cxx |   35 ---
 1 file changed, 35 deletions(-)

New commits:
commit 29dd297739405eb1e2c6217795ca1bce3ac4f952
Author: Chris Sherlock 
Date:   Sun Nov 16 20:29:58 2014 +1100

vcl: fdo#86307 removed Solaris workaround from #i64273#

Basically, they were working around issues with XmbTextListToTextProperty
returning garbage characters, which showed on window titles.

The comment in the code is far more informative than the bug report:

 /* #i64273# there are some weird cases when using IIIMP on Solaris
where for unknown reasons XmbTextListToTextProperty results in
garbage. Test one string once to ensure safety.

FIXME: This must be a bug in xiiimp.so.2 somewhere. However
it was not possible to recreate this in a small sample program.
This reeks of memory corruption somehow.
 */

Now I did a bit of research (aka "Google search") and discovered #i6759#
which was logged in 2002. This shows that the codebase was using __XOpenIM
in xiimp.so.2, which probably caused this issue. From the bug:

I've tried to look into this problem and have found out, that
apparently the
use of the '__XOpenIM' subroutine from the
/usr/openwin/lib/locale/common/xiiimp.so.2
shared library causes this problem.  When running on Solaris, OO tries 
to
dlopen() the above mentioned shared library, looks up the  '__XOpenIM'
symbol in it and calls this function ( function XvaOpenIM() in file
vcl/unx/source/app/i18n_wrp.cxx ).

There's alternate code in OO that just calls the X11 documented function
'XOpenIM()' instead.  This is enabled by running OO 1.0.x with the
environment variable USE_XOPENIM defined to some value.  When running
OO with

  env USE_XOPENIM=1 ~/OpenOffice.org1.0.1/soffice

the problem does *not* occur any more and xprop for the same two windows
mentioned in the initial bug report shows:

% xprop |egrep '_NAME|_LOCALE'
WM_LOCALE_NAME(STRING) = "de_DE..ISO8859-15"
WM_ICON_NAME(STRING) = "unbenannt1 - OpenOffice.org 1.0.1 "
WM_NAME(STRING) = "unbenannt1 - OpenOffice.org 1.0.1 "

% xprop | egrep '_NAME|_LOCALE'
WM_LOCALE_NAME(STRING) = "de_DE..ISO8859-15"
WM_ICON_NAME(STRING) = "Umbruch einfÿ7774gen"
WM_NAME(STRING) = "Umbruch einfÿ7774gen"

As far as I can tell, the use of '__XOpenIM' frees some memory inside 
the
Solaris X11 shared library that is still in use by the X11 character set
conversion routines. Or in other words: the X11 character set conversion
routines operate on freed memory, after __XOpenIM was called.

These character set conversion routines are used by
XmbTextListToTextProperty
( in WMAdaptor::setWMName() in file vcl/unx/source/app/wmadaptor.cxx ) 
and
it seems they still access memory that was freed by the use of
'__XOpenIM'.

Now later on, Caolan removed XvaOpenIM() in commit
4d6dab2cde759551ceee7e6aaec89fa5235b1ecc and then later committed a patch 
that
removed the ability to use the environment variable USE_XOPENIM as it wasn't
necessary anymore (commit: 8b0287543d87659fd4bfde5edb6725ee5da5f80e). I'd 
say
that this was probably fixed in one of these changes.

Change-Id: I20effd77e0cdcde26d1be756cc6231f30f35118e

diff --git a/vcl/unx/generic/app/wmadaptor.cxx 
b/vcl/unx/generic/app/wmadaptor.cxx
index 20bb31e..eeaabb9 100644
--- a/vcl/unx/generic/app/wmadaptor.cxx
+++ b/vcl/unx/generic/app/wmadaptor.cxx
@@ -997,41 +997,6 @@ void WMAdaptor::setWMName( X11SalFrame* pFrame, const 
OUString& rWMName ) const
 }
 
 static bool bTrustXmb = true;
-#ifdef SOLARIS
-/* #i64273# there are some weird cases when using IIIMP on Solaris
-*  where for unknown reasons XmbTextListToTextProperty results in
-*  garbage. Test one string once to ensure safety.
-*
-*  FIXME: This must be a bug in xiiimp.so.2 somewhere. However
-*  it was not possible to recreate this in a small sample program.
-*  This reeks of memory corruption somehow.
-*/
-static bool bOnce = true;
-if( bOnce )
-{
-bOnce = false;
-XTextProperty aTestProp = { NULL, None, 0, 0 };
-const char *pText = "trustme";
-char* pT = const_cast(pText);
-XmbTextListToTextProperty( m_pDisplay,
-   &pT,
-   1,
-   XStdICCTextStyle,
-   &aTestProp );
-bTrustXmb = (aTestProp.nitems == 7) &&
-(aTestProp.value != NULL )  &&
-(strncmp( (char*)aTestProp.value, pText, 7 ) == 0) &&
-(

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

2014-11-16 Thread Chris Sherlock
 vcl/source/gdi/salgdilayout.cxx |   36 ++--
 1 file changed, 6 insertions(+), 30 deletions(-)

New commits:
commit 28effca640fff262866d1d3ada6e51a3821a6725
Author: Chris Sherlock 
Date:   Sat Nov 15 17:05:11 2014 +1100

vcl: SalGraphics::mirror() - always use GetGraphicsWidth()

There's never a case where we need to get the width from VirtualDevice,
we really should only get it from the SalGraphics instance. This vastly
simplifies matters.

Change-Id: I8bae9c163fcb0ce5d064d802c2783437124ebcb2
Reviewed-on: https://gerrit.libreoffice.org/12473
Reviewed-by: Chris Sherlock 
Tested-by: Chris Sherlock 

diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index 599500b..e9bed70 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -88,11 +88,7 @@ bool SalGraphics::drawTransformedBitmap(
 
 void SalGraphics::mirror( long& x, const OutputDevice *pOutDev, bool bBack ) 
const
 {
-long w;
-if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 if( w )
 {
@@ -124,11 +120,7 @@ void SalGraphics::mirror( long& x, const OutputDevice 
*pOutDev, bool bBack ) con
 
 void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, 
bool bBack ) const
 {
-long w;
-if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 if( w )
 {
@@ -161,11 +153,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const 
OutputDevice *pOutDev, bo
 
 bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint 
*pPtAry2, const OutputDevice *pOutDev, bool bBack ) const
 {
-long w;
-if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 if( w )
 {
@@ -287,11 +275,7 @@ void SalGraphics::mirror( Rectangle& rRect, const 
OutputDevice *pOutDev, bool bB
 
 basegfx::B2DPoint SalGraphics::mirror( const basegfx::B2DPoint& i_rPoint, 
const OutputDevice *i_pOutDev, bool i_bBack ) const
 {
-long w;
-if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = i_pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 DBG_ASSERT( w, "missing graphics width" );
 
@@ -316,11 +300,7 @@ basegfx::B2DPoint SalGraphics::mirror( const 
basegfx::B2DPoint& i_rPoint, const
 
 basegfx::B2DPolygon SalGraphics::mirror( const basegfx::B2DPolygon& i_rPoly, 
const OutputDevice *i_pOutDev, bool i_bBack ) const
 {
-long w;
-if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = i_pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 DBG_ASSERT( w, "missing graphics width" );
 
@@ -346,11 +326,7 @@ basegfx::B2DPolygon SalGraphics::mirror( const 
basegfx::B2DPolygon& i_rPoly, con
 
 basegfx::B2DPolyPolygon SalGraphics::mirror( const basegfx::B2DPolyPolygon& 
i_rPoly, const OutputDevice *i_pOutDev, bool i_bBack ) const
 {
-long w;
-if( i_pOutDev && i_pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
-w = i_pOutDev->GetOutputWidthPixel();
-else
-w = GetGraphicsWidth();
+long w = GetGraphicsWidth();
 
 DBG_ASSERT( w, "missing graphics width" );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-11-16 Thread Brij Mohan Lal Srivastava
 cui/source/dialogs/about.cxx   |   29 +
 cui/source/inc/about.hxx   |2 ++
 cui/uiconfig/ui/aboutdialog.ui |   13 +
 3 files changed, 44 insertions(+)

New commits:
commit c5092a8d0edeada83118c595b61ee80486e84659
Author: Brij Mohan Lal Srivastava 
Date:   Sun Nov 16 01:58:54 2014 +0530

fdo#85432 : Add locale details to help->about
Added locale text to About dialog

Change-Id: Ic26219e8fe845b4c5027b65d5f5edba9279b1b11
Reviewed-on: https://gerrit.libreoffice.org/12464
Reviewed-by: Adolfo Jayme Barrientos 
Reviewed-by: Michael Meeks 
Tested-by: Michael Meeks 

diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 0846bd3..b9e3306 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -77,6 +77,7 @@ AboutDialog::AboutDialog(vcl::Window* pParent)
 m_aVersionTextStr = m_pVersion->GetText();
 m_aBasedTextStr = get("libreoffice")->GetText();
 m_aBasedDerivedTextStr = get("derived")->GetText();
+m_pLocaleStr = get("locale")->GetText();;
 
 m_pVersion->SetText(GetVersionString());
 
@@ -232,12 +233,29 @@ OUString AboutDialog::GetBuildId()
 return sBuildId;
 }
 
+OUString AboutDialog::GetLocaleString()
+{
+OUString pLocaleStr;
+rtl_Locale * pLocale;
+
+osl_getProcessLocale( &pLocale );
+
+if ( pLocale && pLocale->Language && pLocale->Country )
+{
+pLocaleStr = OUString(pLocale->Language) + "_" + 
OUString(pLocale->Country);
+}
+
+return pLocaleStr;
+}
+
 OUString AboutDialog::GetVersionString()
 {
 OUString sVersion = m_aVersionTextStr;
 
 OUString sBuildId = GetBuildId();
 
+OUString pLocaleStr = GetLocaleString();
+
 if (!sBuildId.trim().isEmpty())
 {
 sVersion += "\n";
@@ -255,6 +273,17 @@ OUString AboutDialog::GetVersionString()
 sVersion += EXTRA_BUILDID;
 }
 
+if (!pLocaleStr.trim().isEmpty())
+{
+sVersion += "\n";
+if (m_pLocaleStr.indexOf("$LOCALE") == -1)
+{
+SAL_WARN( "cui.dialogs", "translated locale string in translations 
doesn't contain $LOCALE placeholder" );
+m_pLocaleStr += " $LOCALE";
+}
+sVersion += m_pLocaleStr.replaceAll("$LOCALE", pLocaleStr);
+}
+
 return sVersion;
 }
 
diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx
index 60f2657..132ab54 100644
--- a/cui/source/inc/about.hxx
+++ b/cui/source/inc/about.hxx
@@ -49,6 +49,7 @@ private:
 OUString m_aBasedDerivedTextStr;
 OUString m_aCreditsLinkStr;
 OUString m_sBuildStr;
+OUString m_pLocaleStr;
 
 void StyleControls();
 void SetLogo();
@@ -56,6 +57,7 @@ private:
 OUString GetBuildId();
 OUString GetVersionString();
 OUString GetCopyrightString();
+OUString GetLocaleString();
 
 protected:
 virtual bool Close() SAL_OVERRIDE;
diff --git a/cui/uiconfig/ui/aboutdialog.ui b/cui/uiconfig/ui/aboutdialog.ui
index 7449b62..1565d09 100644
--- a/cui/uiconfig/ui/aboutdialog.ui
+++ b/cui/uiconfig/ui/aboutdialog.ui
@@ -134,6 +134,19 @@
   
 
 
+  
+False
+True
+True
+Locale: 
$LOCALE
+center
+  
+  
+0
+1
+  
+
+
   
 True
 True
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/opengl-vcl2' - vcl/unx

2014-11-16 Thread Michael Meeks
 vcl/unx/generic/window/salframe.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d1c2076453bd415a57da3589046938994d07649a
Author: Michael Meeks 
Date:   Sat Nov 15 16:09:03 2014 +0100

vcl: avoid crash with 'gen' backend around window icons.

Change-Id: I4b2bedb9ac641fcb96d09afb2e60fa2c6186fd6b

diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 10310c0..ee94a19 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -276,9 +276,12 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, 
SalX11Screen nXScreen
 aRect.mnDestX = 0; aRect.mnDestY = 0;
 aRect.mnDestWidth = iconSize; aRect.mnDestHeight = iconSize;
 
-X11SalBitmap *pBitmap = static_cast < X11SalBitmap * >
+X11SalBitmap *pBitmap = dynamic_cast < X11SalBitmap * >
 (aIcon.ImplGetBitmapImpBitmap()->ImplGetSalBitmap());
 
+if (!pBitmap) // FIXME: opengl
+return false;
+
 icon_pixmap = XCreatePixmap( pDisplay->GetDisplay(),
  pDisplay->GetRootWindow( nXScreen ),
  iconSize, iconSize,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits