[Libreoffice-commits] core.git: cui/source include/sfx2 include/svtools include/tools include/vcl rsc/inc rsc/source sdext/source svtools/source vcl/source

2016-11-04 Thread Noel Grandin
 cui/source/options/optopencl.cxx  |6 --
 cui/source/options/optopencl.hxx  |2 
 include/sfx2/styfitem.hxx |1 
 include/svtools/framestatuslistener.hxx   |1 
 include/tools/rc.hxx  |4 -
 include/vcl/event.hxx |   54 --
 include/vcl/window.hxx|3 -
 rsc/inc/rscclass.hxx  |2 
 rsc/inc/rscdb.hxx |6 --
 rsc/source/parser/rscdb.cxx   |   38 ---
 rsc/source/res/rscclass.cxx   |   24 -
 sdext/source/presenter/PresenterSlideShowView.hxx |8 ---
 svtools/source/uno/framestatuslistener.cxx|   36 --
 vcl/source/outdev/map.cxx |   54 --
 vcl/source/window/mouseevent.cxx  |   30 
 vcl/source/window/winproc.cxx |   12 ++--
 16 files changed, 7 insertions(+), 274 deletions(-)

New commits:
commit 7abd369964a0c7f9f80cdbc9e47c7dc120fe8257
Author: Noel Grandin 
Date:   Thu Nov 3 14:00:28 2016 +0200

loplugin:unusedmethods

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

diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index ec4f5b3..ecdce1d 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -121,11 +121,5 @@ void SvxOpenCLTabPage::Reset( const SfxItemSet* )
 mpUseOpenCL->SaveValue();
 }
 
-void SvxOpenCLTabPage::EnableOpenCLHdl(VclFrame* pFrame, bool aEnable)
-{
-
-pFrame->Enable(aEnable);
-}
-
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optopencl.hxx b/cui/source/options/optopencl.hxx
index 5680d91..4609b1b 100644
--- a/cui/source/options/optopencl.hxx
+++ b/cui/source/options/optopencl.hxx
@@ -37,8 +37,6 @@ private:
 VclPtr mpOclUsed;
 VclPtr mpOclNotUsed;
 
-static void EnableOpenCLHdl(VclFrame* pFrame, bool aEnable);
-
 public:
 SvxOpenCLTabPage( vcl::Window* pParent, const SfxItemSet& rSet );
 virtual ~SvxOpenCLTabPage() override;
diff --git a/include/sfx2/styfitem.hxx b/include/sfx2/styfitem.hxx
index b1dd71b..c0fd3cb 100644
--- a/include/sfx2/styfitem.hxx
+++ b/include/sfx2/styfitem.hxx
@@ -50,7 +50,6 @@ public:
 SfxStyleFamily  GetFamily() const { return nFamily; }
 const SfxStyleFilter& GetFilterList() const { return aFilterList; }
 const Image&GetImage() const { return aImage; }
-voidSetImage( const Image& _rImg ) { aImage = _rImg; }
 };
 
 using SfxStyleFamilies = std::vector;
diff --git a/include/svtools/framestatuslistener.hxx 
b/include/svtools/framestatuslistener.hxx
index 0389f7a..e64b1e9 100644
--- a/include/svtools/framestatuslistener.hxx
+++ b/include/svtools/framestatuslistener.hxx
@@ -50,7 +50,6 @@ class SVT_DLLPUBLIC FrameStatusListener : public 
css::frame::XStatusListener,
 // methods to support status forwarder, known by the old sfx2 toolbox 
controller implementation
 void addStatusListener( const OUString& aCommandURL );
 void bindListener();
-void unbindListener();
 
 // XInterface
 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& 
aType ) throw (css::uno::RuntimeException, std::exception) override;
diff --git a/include/tools/rc.hxx b/include/tools/rc.hxx
index edb82ae..ebf946a 100644
--- a/include/tools/rc.hxx
+++ b/include/tools/rc.hxx
@@ -51,10 +51,6 @@ protected:
 static sal_uInt32   GetObjSizeRes( RSHEADER_TYPE * pHT )
 { return ResMgr::GetObjSize( pHT ); }
 
-// get a 32bit value from Resource data
-static sal_Int32GetLongRes( void const * pLong )
-{ return ResMgr::GetLong( pLong ); }
-
 // read a 32bit value from resource data and increment pointer
 sal_Int32 ReadLongRes()
 { return m_pResMgr->ReadLong(); }
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx
index a7c9b44..9737bac 100644
--- a/include/vcl/event.hxx
+++ b/include/vcl/event.hxx
@@ -125,8 +125,6 @@ public:
 
 const Point&GetPosPixel() const { return maPos; }
 MouseEventModifiers GetMode() const { return mnMode; }
-/** inits this vcl KeyEvent with all settings from the 
given awt event **/
-MouseEvent( const css::awt::MouseEvent& rEvent );
 
 sal_uInt16  GetClicks() const   { return mnClicks; }
 
@@ -179,62 +177,14 @@ inline MouseEvent::MouseEvent( const Point& rPos, 
sal_uInt16 nClicks,
 
 class VCL_DLLPUBLIC ZoomEvent
 {
-private:
-Point   maCenter;
-float   mfScale;
-
 public:
-ZoomEvent() :
-mfScale( 1 )
-{
-}
-
-ZoomEvent( const Point& rCenter,
-   float f

[Libreoffice-commits] core.git: compilerplugins/clang include/xmloff writerfilter/source xmloff/inc xmloff/source xmlsecurity/source

2016-11-04 Thread Noel Grandin
 compilerplugins/clang/unnecessaryvirtual.cxx |  136 ++-
 compilerplugins/clang/unnecessaryvirtual.py  |   80 +---
 compilerplugins/clang/unusedenumvalues.py|6 
 include/xmloff/xmlnume.hxx   |4 
 include/xmloff/xmlnumfe.hxx  |4 
 include/xmloff/xmltabe.hxx   |4 
 include/xmloff/xmluconv.hxx  |4 
 writerfilter/source/dmapper/DomainMapperTableHandler.hxx |4 
 writerfilter/source/dmapper/DomainMapper_Impl.hxx|4 
 writerfilter/source/dmapper/LoggedResources.hxx  |4 
 writerfilter/source/dmapper/NumberingManager.hxx |4 
 writerfilter/source/dmapper/SdtHelper.hxx|4 
 writerfilter/source/dmapper/TableData.hxx|8 
 writerfilter/source/dmapper/TableManager.hxx |6 
 writerfilter/source/dmapper/TablePropertiesHandler.hxx   |4 
 writerfilter/source/dmapper/WrapPolygonHandler.hxx   |4 
 writerfilter/source/ooxml/OOXMLParserState.hxx   |4 
 writerfilter/source/rtftok/rtfsdrimport.hxx  |4 
 writerfilter/source/rtftok/rtfskipdestination.hxx|4 
 writerfilter/source/rtftok/rtftokenizer.hxx  |4 
 xmloff/inc/txtflde.hxx   |4 
 xmloff/inc/txtvfldi.hxx  |4 
 xmloff/source/chart/SchXMLExport.cxx |2 
 xmloff/source/draw/animationexport.cxx   |2 
 xmloff/source/forms/formattributes.hxx   |4 
 xmlsecurity/source/framework/buffernode.hxx  |3 
 xmlsecurity/source/xmlsec/saxhelper.hxx  |4 
 27 files changed, 151 insertions(+), 168 deletions(-)

New commits:
commit 5f77e6e9309cab4633fa8211f9788af9a9a793c9
Author: Noel Grandin 
Date:   Thu Nov 3 15:12:56 2016 +0200

update loplugin:unnnecessaryvirtual to handler destructors

and update modules writerfilter..xmloff with the resulting changes

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

diff --git a/compilerplugins/clang/unnecessaryvirtual.cxx 
b/compilerplugins/clang/unnecessaryvirtual.cxx
index 1ecc471..82f91c7 100644
--- a/compilerplugins/clang/unnecessaryvirtual.cxx
+++ b/compilerplugins/clang/unnecessaryvirtual.cxx
@@ -34,8 +34,19 @@ TODO does not find destructors that don't need to be virtual
 
 namespace {
 
+struct MyFuncInfo
+{
+std::string name;
+std::string sourceLocation;
+
+};
+bool operator < (const MyFuncInfo &lhs, const MyFuncInfo &rhs)
+{
+return lhs.name < rhs.name;
+}
+
 // try to limit the voluminous output a little
-static std::set definitionSet;
+static std::set definitionSet;
 static std::set overridingSet;
 
 class UnnecessaryVirtual:
@@ -51,8 +62,8 @@ public:
 // dump all our output in one write call - this is to try and limit IO 
"crosstalk" between multiple processes
 // writing to the same logfile
 std::string output;
-for (const std::string & s : definitionSet)
-output += "definition:\t" + s + "\n";
+for (const MyFuncInfo & s : definitionSet)
+output += "definition:\t" + s.name + "\t" + s.sourceLocation + 
"\n";
 for (const std::string & s : overridingSet)
 output += "overriding:\t" + s + "\n";
 ofstream myfile;
@@ -61,11 +72,12 @@ public:
 myfile.close();
 }
 bool shouldVisitTemplateInstantiations () const { return true; }
+bool shouldVisitImplicitCode() const { return true; }
 
 bool VisitCXXMethodDecl( const CXXMethodDecl* decl );
-bool VisitCallExpr(CallExpr* );
 private:
 std::string fullyQualifiedName(const FunctionDecl* functionDecl);
+std::string toString(SourceLocation loc);
 };
 
 std::string niceName(const CXXMethodDecl* functionDecl)
@@ -87,6 +99,16 @@ std::string niceName(const CXXMethodDecl* functionDecl)
 
 std::string UnnecessaryVirtual::fullyQualifiedName(const FunctionDecl* 
functionDecl)
 {
+if (functionDecl->getInstantiatedFromMemberFunction())
+functionDecl = functionDecl->getInstantiatedFromMemberFunction();
+else if (functionDecl->getClassScopeSpecializationPattern())
+functionDecl = functionDecl->getClassScopeSpecializationPattern();
+// workaround clang-3.5 issue
+#if CLANG_VERSION >= 30600
+else if (functionDecl->getTemplateInstantiationPattern())
+functionDecl = functionDecl->getTemplateInstantiationPattern();
+#endif
+
 std::string ret = 
compat::getReturnType(*functionDecl).getCanonicalType().getAsString();
 ret += " ";
 if (isa(functionDecl)) {
@@ -113,110 +135,68 @@ std::string UnnecessaryVirtual::fullyQualifiedName(const 
FunctionDecl* functionD
 
 bool UnnecessaryVirtual::VisitCXXMethodDecl( co

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

2016-11-04 Thread Noel Grandin
 include/vcl/CommandImageResolver.hxx |4 ++--
 include/vcl/GraphicNativeMetadata.hxx|4 ++--
 include/vcl/GraphicNativeTransform.hxx   |4 ++--
 include/vcl/dockwin.hxx  |4 ++--
 include/vcl/gdimtf.hxx   |4 ++--
 include/vcl/graphicfilter.hxx|4 ++--
 include/vcl/rendersettings.hxx   |5 +
 vcl/inc/BitmapSymmetryCheck.hxx  |4 ++--
 vcl/inc/PhysicalFontCollection.hxx   |4 ++--
 vcl/inc/fontsubset.hxx   |4 ++--
 vcl/inc/impgraph.hxx |4 ++--
 vcl/inc/opengl/framebuffer.hxx   |4 ++--
 vcl/inc/opengl/texture.hxx   |4 ++--
 vcl/inc/textlayout.hxx   |4 ++--
 vcl/inc/unx/glyphcache.hxx   |4 ++--
 vcl/source/filter/jpeg/Exif.hxx  |4 ++--
 vcl/source/filter/jpeg/JpegTransform.hxx |4 ++--
 vcl/source/filter/jpeg/JpegWriter.hxx|4 +---
 vcl/source/filter/wmf/winmtf.hxx |4 ++--
 19 files changed, 36 insertions(+), 41 deletions(-)

New commits:
commit fc8f32adc2c940f4e35f7bd2acae5e5ff5f71971
Author: Noel Grandin 
Date:   Thu Nov 3 15:53:19 2016 +0200

loplugin:unnnecessaryvirtual in vcl

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

diff --git a/include/vcl/CommandImageResolver.hxx 
b/include/vcl/CommandImageResolver.hxx
index f57e79e..78af7b2 100644
--- a/include/vcl/CommandImageResolver.hxx
+++ b/include/vcl/CommandImageResolver.hxx
@@ -31,7 +31,7 @@ enum class ImageType
 LAST = Size32,
 };
 
-class VCL_DLLPUBLIC CommandImageResolver
+class VCL_DLLPUBLIC CommandImageResolver final
 {
 private:
 typedef std::unordered_map 
CommandToImageNameMap;
@@ -47,7 +47,7 @@ private:
 
 public:
 CommandImageResolver();
-virtual ~CommandImageResolver();
+~CommandImageResolver();
 
 bool registerCommands(css::uno::Sequence& aCommandSequence);
 Image getImageFromCommandURL(ImageType nImageType, const OUString& 
rCommandURL);
diff --git a/include/vcl/GraphicNativeMetadata.hxx 
b/include/vcl/GraphicNativeMetadata.hxx
index bc9f871..7f249bcc 100644
--- a/include/vcl/GraphicNativeMetadata.hxx
+++ b/include/vcl/GraphicNativeMetadata.hxx
@@ -22,13 +22,13 @@
 
 #include 
 
-class VCL_DLLPUBLIC GraphicNativeMetadata
+class VCL_DLLPUBLIC GraphicNativeMetadata final
 {
 sal_uInt16 mRotation;
 
 public:
 GraphicNativeMetadata();
-virtual ~GraphicNativeMetadata();
+~GraphicNativeMetadata();
 
 bool read(Graphic& rGraphic);
 sal_uInt16 getRotation() { return mRotation;}
diff --git a/include/vcl/GraphicNativeTransform.hxx 
b/include/vcl/GraphicNativeTransform.hxx
index b6b66fc..08053d4 100644
--- a/include/vcl/GraphicNativeTransform.hxx
+++ b/include/vcl/GraphicNativeTransform.hxx
@@ -22,7 +22,7 @@
 
 #include 
 
-class VCL_DLLPUBLIC GraphicNativeTransform
+class VCL_DLLPUBLIC GraphicNativeTransform final
 {
 Graphic& mrGraphic;
 
@@ -32,7 +32,7 @@ class VCL_DLLPUBLIC GraphicNativeTransform
 
 public:
 GraphicNativeTransform(Graphic& rGraphic);
-virtual ~GraphicNativeTransform();
+~GraphicNativeTransform();
 
 bool canBeRotated();
 bool rotate(sal_uInt16 aRotation);
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 041ade5..689c0f1 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -66,7 +66,7 @@ struct EndPopupModeData
  *  All DockingWindows should be converted the new class.
  */
 
-class ImplDockingWindowWrapper
+class ImplDockingWindowWrapper final
 {
 friend class ::vcl::Window;
 friend class DockingManager;
@@ -115,7 +115,7 @@ private:
 
 public:
 ImplDockingWindowWrapper( const vcl::Window *pWindow );
-virtual ~ImplDockingWindowWrapper();
+~ImplDockingWindowWrapper();
 
 vcl::Window* GetWindow() { return mpDockingWindow; }
 boolImplStartDocking( const Point& rPos );
diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx
index f0ac2ac..fec0cdd 100644
--- a/include/vcl/gdimtf.hxx
+++ b/include/vcl/gdimtf.hxx
@@ -54,7 +54,7 @@ enum class MtfConversion
 typedef Color (*ColorExchangeFnc)( const Color& rColor, const void* pColParam 
);
 typedef BitmapEx (*BmpExchangeFnc)( const BitmapEx& rBmpEx, const void* 
pBmpParam );
 
-class VCL_DLLPUBLIC GDIMetaFile
+class VCL_DLLPUBLIC GDIMetaFile final
 {
 private:
 ::std::vector< MetaAction* > m_aList;
@@ -105,7 +105,7 @@ protected:
 public:
 GDIMetaFile();
 GDIMetaFile( const GDIMetaFile& rMtf );
-virtual ~GDIMetaFile();
+~GDIMetaFile();
 
 GDIMetaFile&operator=( const GDIMetaFile& rMtf );
 booloperator==( const GDIMetaFile& rMtf ) const;
diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx
index 2623498..e5f9743 100644
--- a/include/vcl/gra

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

2016-11-04 Thread melikeyurtoglu
 extensions/source/propctrlr/taborder.cxx   |9 +
 extensions/source/scanner/sanedlg.cxx  |9 +
 sc/source/ui/condformat/condformatdlg.cxx  |   11 +--
 sd/source/filter/html/htmlattr.cxx |   11 +--
 sd/source/ui/dlg/RemoteDialogClientBox.cxx |9 +
 sd/source/ui/dlg/docprev.cxx   |   11 +--
 sd/source/ui/dlg/sdtreelb.cxx  |9 +
 sd/source/ui/table/TableDesignPane.cxx |9 +
 8 files changed, 8 insertions(+), 70 deletions(-)

New commits:
commit 02eaf40ba04e970d88e37ef15963a409e375a7ad
Author: melikeyurtoglu 
Date:   Fri Nov 4 00:37:54 2016 +0200

tdf#91222 VclBuilder constructor cleanup

Change-Id: I619cb50c3475519921ffd318b32875ae4ff2c0b8
Signed-off-by: melikeyurtoglu 
Reviewed-on: https://gerrit.libreoffice.org/30545
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/extensions/source/propctrlr/taborder.cxx 
b/extensions/source/propctrlr/taborder.cxx
index 225c746..09f3a68 100644
--- a/extensions/source/propctrlr/taborder.cxx
+++ b/extensions/source/propctrlr/taborder.cxx
@@ -300,14 +300,7 @@ namespace pcr
 SetSelectionMode( SelectionMode::Multiple );
 }
 
-VCL_BUILDER_DECL_FACTORY(TabOrderListBox)
-{
- WinBits nWinStyle = WB_TABSTOP;
- OString sBorder = VclBuilder::extractCustomProperty(rMap);
- if (!sBorder.isEmpty())
- nWinStyle |= WB_BORDER;
- rRet = VclPtr::Create(pParent, nWinStyle);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(TabOrderListBox, WB_TABSTOP)
 
 TabOrderListBox::~TabOrderListBox()
 {
diff --git a/extensions/source/scanner/sanedlg.cxx 
b/extensions/source/scanner/sanedlg.cxx
index 386bd3e..1bf9ffa 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -199,14 +199,7 @@ public:
 }
 };
 
-VCL_BUILDER_DECL_FACTORY(ScanPreview)
-{
-WinBits nWinStyle = 0;
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-nWinStyle |= WB_BORDER;
-rRet = VclPtr::Create(pParent, nWinStyle);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(ScanPreview, 0)
 
 SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) :
 ModalDialog(pParent, "SaneDialog", "modules/scanner/ui/sanedialog.ui"),
diff --git a/sc/source/ui/condformat/condformatdlg.cxx 
b/sc/source/ui/condformat/condformatdlg.cxx
index 4d03fcf..22bd55a 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -144,16 +144,7 @@ void ScCondFormatList::init(ScDocument* pDoc, 
ScCondFormatDlg* pDialogParent,
 RecalcAll();
 }
 
-VCL_BUILDER_DECL_FACTORY(ScCondFormatList)
-{
-WinBits nWinBits = 0;
-
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-   nWinBits |= WB_BORDER;
-
-rRet = VclPtr::Create(pParent, nWinBits);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(ScCondFormatList, 0)
 
 Size ScCondFormatList::GetOptimalSize() const
 {
diff --git a/sd/source/filter/html/htmlattr.cxx 
b/sd/source/filter/html/htmlattr.cxx
index fe709ff..13e5f49 100644
--- a/sd/source/filter/html/htmlattr.cxx
+++ b/sd/source/filter/html/htmlattr.cxx
@@ -27,16 +27,7 @@ SdHtmlAttrPreview::SdHtmlAttrPreview(vcl::Window* pParent, 
WinBits nStyle)
 {
 }
 
-VCL_BUILDER_DECL_FACTORY(SdHtmlAttrPreview)
-{
-WinBits nWinStyle = 0;
-
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-nWinStyle |= WB_BORDER;
-
-rRet = VclPtr::Create(pParent, nWinStyle);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(SdHtmlAttrPreview, 0)
 
 SdHtmlAttrPreview::~SdHtmlAttrPreview()
 {
diff --git a/sd/source/ui/dlg/RemoteDialogClientBox.cxx 
b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
index b1c466f..cd67fbd 100644
--- a/sd/source/ui/dlg/RemoteDialogClientBox.cxx
+++ b/sd/source/ui/dlg/RemoteDialogClientBox.cxx
@@ -108,14 +108,7 @@ ClientBox::ClientBox( vcl::Window* pParent, WinBits nStyle 
) :
 Show();
 }
 
-VCL_BUILDER_DECL_FACTORY(ClientBox)
-{
-WinBits nWinStyle = WB_TABSTOP;
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-nWinStyle |= WB_BORDER;
-rRet = VclPtr::Create(pParent, nWinStyle);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(ClientBox, WB_TABSTOP)
 
 Size ClientBox::GetOptimalSize() const
 {
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 640dec1..4d8e4bb 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -50,16 +50,7 @@ using namespace ::com::sun::star::uno;
 
 const int SdDocPreviewWin::FRAME = 4;
 
-VCL_BUILDER_DECL_FACTORY(SdDocPreviewWin)
-{
-WinBits nWinStyle = 0;
-
-OString sBorder = VclBuilder::extractCustomProperty(rMap);
-if (!sBorder.isEmpty())
-nWinStyle |= WB_BORDER;
-
-rRet = VclPtr::Create(pParent, nWinStyle);
-}
+VCL_BUILDER_FACTORY_CONSTRUCTOR(SdDocPreviewWin, 0)
 

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

2016-11-04 Thread Julien Nabet
 sc/source/core/data/markdata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit dc04de04814a6318144361b62d43711a03ae7fa6
Author: Julien Nabet 
Date:   Fri Nov 4 07:19:08 2016 +0100

loplugin:defaultparams

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

diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index 40e6ff4..9a49013 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -437,7 +437,7 @@ void ScMarkData::ExtendRangeListTables( ScRangeList* pList 
) const
 ScRangeList ScMarkData::GetMarkedRanges() const
 {
 ScRangeList aRet;
-FillRangeListWithMarks(&aRet, false, -1);
+FillRangeListWithMarks(&aRet, false);
 return aRet;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Miklos Vajna
 download.lst |2 
 external/libxmlsec/UnpackedTarball_xmlsec.mk |2 
 external/libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch.1   |2 
 external/libxmlsec/xmlsec1-configure.patch.1 |   28 ++--
 external/libxmlsec/xmlsec1-customkeymanage.patch.1   |  104 ++-
 external/libxmlsec/xmlsec1-mingw-keymgr-mscrypto.patch.1 |   10 -
 external/libxmlsec/xmlsec1-noverify.patch.1  |2 
 external/libxmlsec/xmlsec1-nssdisablecallbacks.patch.1   |2 
 external/libxmlsec/xmlsec1-nssmangleciphers.patch.1  |2 
 external/libxmlsec/xmlsec1-vc.patch.1|8 -
 external/libxmlsec/xmlsec1-win32-fix-undeclared.patch.1  |   31 
 11 files changed, 76 insertions(+), 117 deletions(-)

New commits:
commit f0167eced77657190226d24a19005a66ff7e739e
Author: Miklos Vajna 
Date:   Thu Nov 3 18:18:09 2016 +0100

Upgrade libxmlsec to 1.2.23

Obsoletes xmlsec1-win32-fix-undeclared.patch.1.

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

diff --git a/download.lst b/download.lst
index 6a6bace..71cd479 100644
--- a/download.lst
+++ b/download.lst
@@ -94,7 +94,7 @@ export LIBLANGTAG_MD5SUM := 284f120247323a35122ab32b4b359c45
 export LIBLANGTAG_TARBALL := liblangtag-0.6.2.tar.bz2
 export LIBTOMMATH_MD5SUM := da283d2e3e72137d0c600ac36b991c9d
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
-export LIBXMLSEC_TARBALL := 
0fb1bb06d60d7708abc4797008209bcc-xmlsec1-1.2.22.tar.gz
+export LIBXMLSEC_TARBALL := 
86b1daaa438f5a7bea9a52d7b9799ac0-xmlsec1-1.2.23.tar.gz
 export LIBXML_TARBALL := ae249165c173b1ff386ee8ad676815f5-libxml2-2.9.4.tar.gz
 export LIBXSLT_TARBALL := 
a129d3c44c022de3b9dcf6d6f288d72e-libxslt-1.1.29.tar.gz
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
diff --git a/external/libxmlsec/UnpackedTarball_xmlsec.mk 
b/external/libxmlsec/UnpackedTarball_xmlsec.mk
index badd5c3..3a0469c 100644
--- a/external/libxmlsec/UnpackedTarball_xmlsec.mk
+++ b/external/libxmlsec/UnpackedTarball_xmlsec.mk
@@ -13,8 +13,6 @@ xmlsec_patches += xmlsec1-nssdisablecallbacks.patch.1
 xmlsec_patches += xmlsec1-nssmangleciphers.patch.1
 xmlsec_patches += xmlsec1-noverify.patch.1
 xmlsec_patches += xmlsec1-mingw-keymgr-mscrypto.patch.1
-# Upstreamed as .
-xmlsec_patches += xmlsec1-win32-fix-undeclared.patch.1
 xmlsec_patches += xmlsec1-vc.patch.1
 xmlsec_patches += xmlsec1-1.2.14_fix_extern_c.patch.1
 xmlsec_patches += xmlsec1-customkeymanage.patch.1
diff --git a/external/libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch.1 
b/external/libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch.1
index 0ae592b..9ead19c 100644
--- a/external/libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch.1
+++ b/external/libxmlsec/xmlsec1-1.2.14_fix_extern_c.patch.1
@@ -1,4 +1,4 @@
-From 145ae5235f79fec807f360cc34a0bf16cd6b6d75 Mon Sep 17 00:00:00 2001
+From b4cb46f2737f7e3a4073b747ed4a0dfb99d48fdd Mon Sep 17 00:00:00 2001
 From: Miklos Vajna 
 Date: Fri, 4 Mar 2016 16:12:48 +0100
 Subject: [PATCH] xmlsec1-1.2.14_fix_extern_c.patch
diff --git a/external/libxmlsec/xmlsec1-configure.patch.1 
b/external/libxmlsec/xmlsec1-configure.patch.1
index b82ee08..2b496d7 100644
--- a/external/libxmlsec/xmlsec1-configure.patch.1
+++ b/external/libxmlsec/xmlsec1-configure.patch.1
@@ -1,4 +1,4 @@
-From 3a8aaa9a5baf91ef6bf9c24b4080896fb8615b0c Mon Sep 17 00:00:00 2001
+From 70139f4422c78f21ed9a7435267e37d15c4c8fa6 Mon Sep 17 00:00:00 2001
 From: Miklos Vajna 
 Date: Fri, 4 Mar 2016 16:06:19 +0100
 Subject: [PATCH] xmlsec1-configure.patch
@@ -15,7 +15,7 @@ Conflicts:
  4 files changed, 42 insertions(+), 14 deletions(-)
 
 diff --git a/Makefile.am b/Makefile.am
-index 3453c01..da71139 100644
+index 3453c01..2c5effb 100644
 --- a/Makefile.am
 +++ b/Makefile.am
 @@ -1,7 +1,7 @@
@@ -28,10 +28,10 @@ index 3453c01..da71139 100644
  DEFAULT_CRYPTO= @XMLSEC_DEFAULT_CRYPTO@
  
 diff --git a/Makefile.in b/Makefile.in
-index 6b23543..759b33e 100644
+index f35b430..f3ca4ed 100644
 --- a/Makefile.in
 +++ b/Makefile.in
-@@ -469,7 +469,7 @@ top_builddir = @top_builddir@
+@@ -468,7 +468,7 @@ top_builddir = @top_builddir@
  top_srcdir = @top_srcdir@
  NULL = 
  SAFE_VERSION = @XMLSEC_VERSION_SAFE@
@@ -41,10 +41,10 @@ index 6b23543..759b33e 100644
  DEFAULT_CRYPTO = @XMLSEC_DEFAULT_CRYPTO@
  bin_SCRIPTS = xmlsec1-config
 diff --git a/configure.ac b/configure.ac
-index 8fb8740..67905b5 100644
+index b8770ad..721e4ca 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -230,8 +230,8 @@ dnl find libxml
+@@ -227,8 +227,8 @@ dnl find libxml
  dnl ==
  LIBXML_MIN_VERSION="2.7.4"
  LIBXML_CONFIG="xml2-config"
@@ -55,7 +55,7 @@ index 8fb8740..67905b5 100644
  LIBXML_FOUND="no"
  AC_ARG_WITH(libxml, 
  [  --with-libxml=[PFX]   libxml2

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

2016-11-04 Thread Miklos Vajna
 include/vcl/pdfwriter.hxx |3 
 vcl/source/gdi/pdfwriter_impl.cxx |   85 +-
 vcl/source/gdi/pdfwriter_impl.hxx |2 
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |   12 +++
 xmlsecurity/source/pdfio/pdfdocument.cxx  |6 +
 5 files changed, 77 insertions(+), 31 deletions(-)

New commits:
commit 3e610f8496a0b6ef126426b807e0af366a98b8f3
Author: Miklos Vajna 
Date:   Fri Nov 4 09:13:02 2016 +0100

vcl: extract PDFWriter::GetDateTime() from PDFWriterImpl

And use it in xmlsecurity when signing an existing PDF. This is
especially important on Windows, where the PKCS#7 blob doesn't have an
(unsigned) timestamp.

Change-Id: I4051dc19a43f8f8114d9f4d02309f28d6754e9ae

diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index 79ac5db..0e059a6 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -1270,6 +1270,9 @@ The following structure describes the permissions used in 
PDF security
 
 /// Write rString as a PDF hex string into rBuffer.
 static void AppendUnicodeTextString(const OUString& rString, 
OStringBuffer& rBuffer);
+
+/// Get current date/time in PDF D:MMDDHHMMSS form.
+static OString GetDateTime();
 };
 
 }
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index 94c730e..80cb0a0 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -1855,14 +1855,67 @@ PDFWriterImpl::~PDFWriterImpl()
 void PDFWriterImpl::setupDocInfo()
 {
 std::vector< sal_uInt8 > aId;
+m_aCreationDateString = PDFWriter::GetDateTime();
 computeDocumentIdentifier( aId, m_aContext.DocumentInfo, 
m_aCreationDateString, m_aCreationMetaDateString );
 if( m_aContext.Encryption.DocumentIdentifier.empty() )
 m_aContext.Encryption.DocumentIdentifier = aId;
 }
 
+OString PDFWriter::GetDateTime()
+{
+OStringBuffer aRet;
+
+TimeValue aTVal, aGMT;
+oslDateTime aDT;
+osl_getSystemTime(&aGMT);
+osl_getLocalTimeFromSystemTime(&aGMT, &aTVal);
+osl_getDateTimeFromTimeValue(&aTVal, &aDT);
+aRet.append("D:");
+aRet.append((sal_Char)('0' + ((aDT.Year / 1000) % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Year / 100) % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Year / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Year % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Month / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Month % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Day / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Day % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Hours / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Hours % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Minutes / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Minutes % 10)));
+aRet.append((sal_Char)('0' + ((aDT.Seconds / 10) % 10)));
+aRet.append((sal_Char)('0' + (aDT.Seconds % 10)));
+
+sal_uInt32 nDelta = 0;
+if (aGMT.Seconds > aTVal.Seconds)
+{
+aRet.append("-");
+nDelta = aGMT.Seconds-aTVal.Seconds;
+}
+else if (aGMT.Seconds < aTVal.Seconds)
+{
+aRet.append("+");
+nDelta = aTVal.Seconds-aGMT.Seconds;
+}
+else
+aRet.append("Z");
+
+if (nDelta)
+{
+aRet.append((sal_Char)('0' + ((nDelta / 36000) % 10)));
+aRet.append((sal_Char)('0' + ((nDelta / 3600) % 10)));
+aRet.append("'");
+aRet.append((sal_Char)('0' + ((nDelta / 600) % 6)));
+aRet.append((sal_Char)('0' + ((nDelta / 60) % 10)));
+}
+aRet.append( "'" );
+
+return aRet.makeStringAndClear();
+}
+
 void PDFWriterImpl::computeDocumentIdentifier( std::vector< sal_uInt8 >& 
o_rIdentifier,
const 
vcl::PDFWriter::PDFDocInfo& i_rDocInfo,
-   OString& o_rCString1,
+   const OString& i_rCString1,
OString& o_rCString2
)
 {
@@ -1889,22 +1942,7 @@ void PDFWriterImpl::computeDocumentIdentifier( 
std::vector< sal_uInt8 >& o_rIden
 osl_getSystemTime( &aGMT );
 osl_getLocalTimeFromSystemTime( &aGMT, &aTVal );
 osl_getDateTimeFromTimeValue( &aTVal, &aDT );
-OStringBuffer aCreationDateString(64), aCreationMetaDateString(64);
-aCreationDateString.append( "D:" );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Year/1000)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Year/100)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Year/10)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Year)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Month/10)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((aDT.Month)%10)) );
-aCreationDateString.append( (sal_Char)('0' + ((

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

2016-11-04 Thread Tomaž Vajngerl
 include/vcl/image.hxx  |5 +-
 vcl/source/image/Image.cxx |   83 +
 vcl/source/image/ImageList.cxx |   48 ---
 3 files changed, 40 insertions(+), 96 deletions(-)

New commits:
commit f4637c07c9ac87c2ad4b687263dfea50b5d4e0ef
Author: Tomaž Vajngerl 
Date:   Thu Nov 3 22:46:59 2016 +0100

convert Image manual refcounting with std::shader_ptr

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

diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index f9f32f9..0ad2f0c 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -29,6 +29,7 @@
 
 #include 
 
+#include 
 #include 
 
 struct ImplImage;
@@ -69,7 +70,7 @@ public:
 
 private:
 
-ImplImage* mpImplData;
+std::shared_ptr mpImplData;
 
 SAL_DLLPRIVATE voidImplInit( const BitmapEx& rBmpEx );
 };
@@ -122,7 +123,7 @@ public:
 
 private:
 
-ImplImageList*  mpImplData;
+std::shared_ptr mpImplData;
 
 SAL_DLLPRIVATE voidImplInit( sal_uInt16 nItems, const Size &rSize );
 SAL_DLLPRIVATE sal_uInt16  ImplGetImageId( const OUString& rImageName ) 
const;
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index 2aab6a8..bc767ce 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -40,15 +40,12 @@
 #include 
 #endif
 
-Image::Image() :
-mpImplData( nullptr )
+Image::Image()
 {
 }
 
-Image::Image( const ResId& rResId ) :
-mpImplData( nullptr )
+Image::Image( const ResId& rResId )
 {
-
 rResId.SetRT( RSC_IMAGE );
 
 ResMgr* pResMgr = rResId.GetResMgr();
@@ -70,78 +67,60 @@ Image::Image( const ResId& rResId ) :
 }
 }
 
-Image::Image( const Image& rImage ) :
-mpImplData( rImage.mpImplData )
+Image::Image(const Image& rImage)
+: mpImplData(rImage.mpImplData)
 {
-
-if( mpImplData )
-++mpImplData->mnRefCount;
 }
 
-Image::Image( const BitmapEx& rBitmapEx ) :
-mpImplData( nullptr )
+Image::Image(const BitmapEx& rBitmapEx)
 {
-
-ImplInit( rBitmapEx );
+ImplInit(rBitmapEx);
 }
 
-Image::Image( const Bitmap& rBitmap ) :
-mpImplData( nullptr )
+Image::Image(const Bitmap& rBitmap)
 {
-
-ImplInit( rBitmap );
+ImplInit(rBitmap);
 }
 
-Image::Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap ) :
-mpImplData( nullptr )
+Image::Image(const Bitmap& rBitmap, const Bitmap& rMaskBitmap)
 {
-
-const BitmapEx aBmpEx( rBitmap, rMaskBitmap );
-
-ImplInit( aBmpEx );
+const BitmapEx aBitmapEx(rBitmap, rMaskBitmap);
+ImplInit(aBitmapEx);
 }
 
-Image::Image( const Bitmap& rBitmap, const Color& rColor ) :
-mpImplData( nullptr )
+Image::Image(const Bitmap& rBitmap, const Color& rColor)
 {
-
-const BitmapEx aBmpEx( rBitmap, rColor );
-
-ImplInit( aBmpEx );
+const BitmapEx aBitmapEx(rBitmap, rColor);
+ImplInit(aBitmapEx);
 }
 
-Image::Image( const css::uno::Reference< css::graphic::XGraphic >& rxGraphic ) 
:
-mpImplData( nullptr )
+Image::Image(const css::uno::Reference< css::graphic::XGraphic >& rxGraphic)
 {
-
-const Graphic aGraphic( rxGraphic );
-ImplInit( aGraphic.GetBitmapEx() );
+const Graphic aGraphic(rxGraphic);
+ImplInit(aGraphic.GetBitmapEx());
 }
 
-Image::Image( const OUString &rFileUrl ) :
-mpImplData( nullptr )
+Image::Image(const OUString & rFileUrl)
 {
-OUString aTmp;
-osl::FileBase::getSystemPathFromFileURL( rFileUrl, aTmp );
+OUString aPath;
+osl::FileBase::getSystemPathFromFileURL(rFileUrl, aPath);
 Graphic aGraphic;
-const OUString aFilterName( IMP_PNG );
-if( GRFILTER_OK == GraphicFilter::LoadGraphic( aTmp, aFilterName, aGraphic 
) )
+const OUString aFilterName(IMP_PNG);
+if (GRFILTER_OK == GraphicFilter::LoadGraphic(aPath, aFilterName, 
aGraphic))
 {
-ImplInit( aGraphic.GetBitmapEx() );
+ImplInit(aGraphic.GetBitmapEx());
 }
 }
 
 Image::~Image()
 {
-if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
-delete mpImplData;
 }
 
 void Image::ImplInit(const BitmapEx& rBitmapEx)
 {
 if (!rBitmapEx.IsEmpty())
 {
-mpImplData = new ImplImage;
+mpImplData.reset(new ImplImage);
 mpImplData->mpBitmapEx.reset(new BitmapEx(rBitmapEx));
 }
 }
@@ -177,21 +156,13 @@ css::uno::Reference< css::graphic::XGraphic > 
Image::GetXGraphic() const
 return aGraphic.GetXGraphic();
 }
 
-Image& Image::operator=( const Image& rImage )
+Image& Image::operator=(const Image& rImage)
 {
-
-if( rImage.mpImplData )
-++rImage.mpImplData->mnRefCount;
-
-if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
-delete mpImplData;
-
 mpImplData = rImage.mpImplData;
-
 return *this;
 }
 
-Image& Image::operator=( Image&& rImage )
+Image& Image::operator=(Image&& rImage)
 {
 std::swap(mpImplData, rImage.mpImplData);
 return *this;
@@

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

2016-11-04 Thread Jochen Nitschke
 svl/source/filerec/filerec.cxx |3 +--
 svl/source/items/itemset.cxx   |   20 ++--
 svl/source/items/poolio.cxx|3 +--
 3 files changed, 8 insertions(+), 18 deletions(-)

New commits:
commit bb3e19624bf4a400e9012b9b4451dc9542261fd8
Author: Jochen Nitschke 
Date:   Thu Nov 3 09:31:30 2016 +0100

use aggregate initialisation instead of memset for arrays

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

diff --git a/svl/source/filerec/filerec.cxx b/svl/source/filerec/filerec.cxx
index b52a935..2086d28 100644
--- a/svl/source/filerec/filerec.cxx
+++ b/svl/source/filerec/filerec.cxx
@@ -497,8 +497,7 @@ bool SfxMultiRecordReader::ReadHeader_Impl()
  _nContentCount << " claimed, truncating");
 _nContentCount = nMaxRecords;
 }
-_pContentOfs = new sal_uInt32[_nContentCount];
-memset(_pContentOfs, 0, _nContentCount*sizeof(sal_uInt32));
+_pContentOfs = new sal_uInt32[_nContentCount]{};
 #if defined(OSL_LITENDIAN)
 _pStream->ReadBytes( _pContentOfs, sizeof(sal_uInt32)*_nContentCount );
 #else
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index d2388c3..524752c 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -141,8 +141,7 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool)
 m_pPool->FillItemIdRanges_Impl( m_pWhichRanges );
 
 const sal_uInt16 nSize = TotalCount();
-m_pItems = new const SfxPoolItem* [ nSize ];
-memset(static_cast(m_pItems), 0, nSize * sizeof(SfxPoolItem*));
+m_pItems = new const SfxPoolItem*[nSize]{};
 }
 
 SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 
nWhich2)
@@ -157,20 +156,15 @@ SfxItemSet::SfxItemSet(SfxItemPool& rPool, sal_uInt16 
nWhich1, sal_uInt16 nWhich
 
 void SfxItemSet::InitRanges_Impl(sal_uInt16 nWh1, sal_uInt16 nWh2)
 {
-m_pWhichRanges = new sal_uInt16[ 3 ];
-*(m_pWhichRanges+0) = nWh1;
-*(m_pWhichRanges+1) = nWh2;
-*(m_pWhichRanges+2) = 0;
+m_pWhichRanges = new sal_uInt16[3]{nWh1, nWh2, 0};
 const sal_uInt16 nRg = nWh2 - nWh1 + 1;
-m_pItems = new const SfxPoolItem* [ nRg ];
-memset(static_cast(m_pItems), 0, nRg * sizeof(SfxPoolItem*));
+m_pItems = new const SfxPoolItem*[nRg]{};
 }
 
 void SfxItemSet::InitRanges_Impl(va_list pArgs, sal_uInt16 nWh1, sal_uInt16 
nWh2, sal_uInt16 nNull)
 {
 sal_uInt16 nSize = InitializeRanges_Impl(m_pWhichRanges, pArgs, nWh1, 
nWh2, nNull);
-m_pItems = new const SfxPoolItem* [ nSize ];
-memset(static_cast(m_pItems), 0, sizeof(SfxPoolItem*) * nSize);
+m_pItems = new const SfxPoolItem*[nSize]{};
 }
 
 SfxItemSet::SfxItemSet(SfxItemPool& rPool, int nWh1, int nWh2, int nNull, ...)
@@ -206,8 +200,7 @@ void SfxItemSet::InitRanges_Impl(const sal_uInt16 
*pWhichPairTable)
 pPtr += 2;
 }
 
-m_pItems = new const SfxPoolItem* [ nCnt ];
-memset(static_cast(m_pItems), 0, sizeof(SfxPoolItem*) * nCnt);
+m_pItems = new const SfxPoolItem*[nCnt]{};
 
 std::ptrdiff_t cnt = pPtr - pWhichPairTable +1;
 m_pWhichRanges = new sal_uInt16[ cnt ];
@@ -1659,8 +1652,7 @@ SfxAllItemSet::SfxAllItemSet( SfxItemPool &rPool )
 m_pItems = nullptr;
 
 // Allocate nInitCount pairs at USHORTs for Ranges
-m_pWhichRanges = new sal_uInt16[ nInitCount + 1 ];
-memset( m_pWhichRanges, 0, (nInitCount + 1) * sizeof(sal_uInt16) );
+m_pWhichRanges = new sal_uInt16[nInitCount + 1]{};
 }
 
 SfxAllItemSet::SfxAllItemSet(const SfxItemSet &rCopy)
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 4f474ec..d92fc18 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -633,8 +633,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
  " max possible entries, but " << nCount << " 
claimed, truncating");
 nCount = nMaxRecords;
 }
-sal_uInt16 *pMap = new sal_uInt16[nCount];
-memset(pMap, 0, nCount * sizeof(sal_uInt16));
+sal_uInt16 *pMap = new sal_uInt16[nCount]{};
 for ( sal_uInt16 n = 0; n < nCount; ++n )
 rStream.ReadUInt16( pMap[n] );
 SetVersionMap( nVersion, nHStart, nHEnd, pMap );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: compilerplugins/clang

2016-11-04 Thread Stephan Bergmann
 compilerplugins/clang/unnecessaryvirtual.cxx |   37 ---
 1 file changed, 37 deletions(-)

New commits:
commit cbb7b10b6b2748db088ae2f78b54711639a7eb2d
Author: Stephan Bergmann 
Date:   Fri Nov 4 09:20:49 2016 +0100

-Werror=unused-function

Change-Id: I33790862cfe40693921d07182ccf4645c3ef28a3

diff --git a/compilerplugins/clang/unnecessaryvirtual.cxx 
b/compilerplugins/clang/unnecessaryvirtual.cxx
index 82f91c7..ee3d8ec 100644
--- a/compilerplugins/clang/unnecessaryvirtual.cxx
+++ b/compilerplugins/clang/unnecessaryvirtual.cxx
@@ -76,7 +76,6 @@ public:
 
 bool VisitCXXMethodDecl( const CXXMethodDecl* decl );
 private:
-std::string fullyQualifiedName(const FunctionDecl* functionDecl);
 std::string toString(SourceLocation loc);
 };
 
@@ -97,42 +96,6 @@ std::string niceName(const CXXMethodDecl* functionDecl)
 return s;
 }
 
-std::string UnnecessaryVirtual::fullyQualifiedName(const FunctionDecl* 
functionDecl)
-{
-if (functionDecl->getInstantiatedFromMemberFunction())
-functionDecl = functionDecl->getInstantiatedFromMemberFunction();
-else if (functionDecl->getClassScopeSpecializationPattern())
-functionDecl = functionDecl->getClassScopeSpecializationPattern();
-// workaround clang-3.5 issue
-#if CLANG_VERSION >= 30600
-else if (functionDecl->getTemplateInstantiationPattern())
-functionDecl = functionDecl->getTemplateInstantiationPattern();
-#endif
-
-std::string ret = 
compat::getReturnType(*functionDecl).getCanonicalType().getAsString();
-ret += " ";
-if (isa(functionDecl)) {
-const CXXRecordDecl* recordDecl = 
dyn_cast(functionDecl)->getParent();
-ret += recordDecl->getQualifiedNameAsString();
-ret += "::";
-}
-ret += functionDecl->getNameAsString() + "(";
-bool bFirst = true;
-for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) {
-if (bFirst)
-bFirst = false;
-else
-ret += ",";
-ret += pParmVarDecl->getType().getCanonicalType().getAsString();
-}
-ret += ")";
-if (isa(functionDecl) && 
dyn_cast(functionDecl)->isConst()) {
-ret += " const";
-}
-
-return ret;
-}
-
 bool UnnecessaryVirtual::VisitCXXMethodDecl( const CXXMethodDecl* methodDecl )
 {
 if (ignoreLocation(methodDecl)) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Jan-Marek Glogowski
 vcl/unx/generic/window/salframe.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 36888dc9607b6ce1f98a0a7fcd1069ded091aec1
Author: Jan-Marek Glogowski 
Date:   Wed Nov 2 12:33:51 2016 +0100

tdf#103626 Workaround for AppIcon recursion

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

diff --git a/vcl/unx/generic/window/salframe.cxx 
b/vcl/unx/generic/window/salframe.cxx
index 3f4b5e8..ab8ad79 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -250,6 +250,7 @@ static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, 
SalX11Screen nXScreen
  sal_uInt16 nIcon, sal_uInt16 iconSize,
  Pixmap& icon_pixmap, Pixmap& 
icon_mask, NetWmIconData& netwm_icon)
 {
+return true;
 if( ! ImplGetResMgr() )
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Kevin Hufnagle license statement

2016-11-04 Thread Jan Iversen
WELCOME
Thanks for your license statement.

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

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

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

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

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


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

2016-11-04 Thread Miklos Vajna
 sw/inc/hhcwrp.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit c1ea561f6a01044357052789bbc6c8ec52061d41
Author: Miklos Vajna 
Date:   Fri Nov 4 09:45:52 2016 +0100

sw: remove documentation for removed HasOtherCnt_impl()

Change-Id: Ib3a5c7116b1a877cfa33ca248b5a9b857f0a2999

diff --git a/sw/inc/hhcwrp.hxx b/sw/inc/hhcwrp.hxx
index c4b86a5..ca9c9d6 100644
--- a/sw/inc/hhcwrp.hxx
+++ b/sw/inc/hhcwrp.hxx
@@ -55,7 +55,6 @@ class SW_DLLPUBLIC SwHHCWrapper : public 
editeng::HangulHanjaConversion
 boolConvNext_impl();///< former SpellNext
 boolFindConvText_impl();///< former FindSpellError
 
-/// from SwSpellWrapper copied and modified
 voidConvStart_impl( SwConversionArgs *pConvArgs, SvxSpellArea 
eSpell );   ///< former SpellStart
 voidConvEnd_impl( SwConversionArgs *pConvArgs );   
   ///< former SpellEnd
 boolConvContinue_impl( SwConversionArgs *pConvArgs );  
   ///< former SpellContinue
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Justin Luth
 sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt |binary
 sw/qa/extras/odfimport/odfimport.cxx   |6 ++
 sw/source/core/layout/frmtool.cxx  |8 +---
 3 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 9130627e21dd7c52c5eee1acc4b71f86eb9f3118
Author: Justin Luth 
Date:   Mon Oct 31 11:59:09 2016 +0300

tdf#41542 globally allow padding without borders: layout

Styles with borders do not have a requirement for visible borders
in order to apply padding in the ODF specs. This was only an
implementation design, so remove that layout restriction.
So, padding will be allowed now for any border (not just textframes/cells)
and it will be allowed for any format (not only those marked
with the compatibility setting AllowPaddingWithoutBorders - which
is now redefined to indicate whether the UI allows
creating borderless padding).

The global UI implementation to allow creating these types of documents
will come in 5.4.  Allow the layout already in 5.3 to enhance
compatibility between supported versions.

Change-Id: I75bab7cbfff23bf70406123f8531e2fea352ddda
Reviewed-on: https://gerrit.libreoffice.org/30434
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Reviewed-by: Miklos Vajna 

diff --git a/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt 
b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt
new file mode 100755
index 000..9585041
Binary files /dev/null and 
b/sw/qa/extras/odfimport/data/tdf41542_borderlessPadding.odt differ
diff --git a/sw/qa/extras/odfimport/odfimport.cxx 
b/sw/qa/extras/odfimport/odfimport.cxx
index 90f1da1..9c21cad 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -242,6 +242,12 @@ DECLARE_ODFIMPORT_TEST(testOdtBorders, "borders_ooo33.odt")
 } while(xParaEnum->hasMoreElements());
 }
 
+DECLARE_ODFIMPORT_TEST(testTdf41542_borderlessPadding, 
"tdf41542_borderlessPadding.odt")
+{
+// the page style's borderless padding should force this to 3 pages, not 1
+CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
 DECLARE_ODFIMPORT_TEST(testPageStyleLayoutDefault, "hello.odt")
 {
 uno::Reference 
xPropertySet(getStyles("PageStyles")->getByName("Default Style"), 
uno::UNO_QUERY);
diff --git a/sw/source/core/layout/frmtool.cxx 
b/sw/source/core/layout/frmtool.cxx
index 5149cb6..6aa488a 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1829,13 +1829,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const 
SwFrame *pConstructor)
 m_bCachedJoinedWithPrev = false;
 m_bCachedJoinedWithNext = false;
 
-bool bAllowPaddingWithoutBorders = false;
-if( (pConstructor->GetType() & SwFrameType::Fly)
-&& pConstructor->IsLayoutFrame()
-&& pConstructor->GetLower() && pConstructor->GetLower()->IsTextFrame() 
)
-{
-bAllowPaddingWithoutBorders = 
pConstructor->getRootFrame()->GetFormat()->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS);
-}
+bool bAllowPaddingWithoutBorders = true;
 m_bBorderDist = bool(pConstructor->GetType() & SwFrameType::Cell) || 
bAllowPaddingWithoutBorders;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - external/harfbuzz

2016-11-04 Thread Stephan Bergmann
 external/harfbuzz/ubsan.patch |   22 ++
 1 file changed, 22 insertions(+)

New commits:
commit 99f7aacd5b39a0f79351d8d7568b2e43d39878cb
Author: Stephan Bergmann 
Date:   Fri Nov 4 10:23:47 2016 +0100

external/harfbuzz: -fsanitize=function

Change-Id: Ie72eec98f1337e895b81c4ebebeefa4861a5a6a1

diff --git a/external/harfbuzz/ubsan.patch b/external/harfbuzz/ubsan.patch
index 8fa6abe..5f8f008 100644
--- a/external/harfbuzz/ubsan.patch
+++ b/external/harfbuzz/ubsan.patch
@@ -9,6 +9,17 @@
}
  };
  
+@@ -394,8 +394,9 @@
+ }
+ 
+ static void
+-_hb_ot_font_destroy (hb_ot_font_t *ot_font)
++_hb_ot_font_destroy (void *ot_font_)
+ {
++  hb_ot_font_t *ot_font = static_cast(ot_font_);
+   ot_font->cmap.fini ();
+   ot_font->h_metrics.fini ();
+   ot_font->v_metrics.fini ();
 --- src/hb-ot-map-private.hh
 +++ src/hb-ot-map-private.hh
 @@ -52,8 +52,11 @@
commit 6694ce6b542367074667e4445a6b7f50568a2729
Author: Stephan Bergmann 
Date:   Fri Nov 4 10:05:31 2016 +0100

external/harfbuzz: Work around ASan out of bounds warning

CppunitTest_sccomp_lpsolver failed with the below error.  struct _mtx
(hb-ot-hmtx-table.hh) has two "variable-sized" array members (each of size
VAR=1) longMetric and leadingBearingX, where the latter isn't used anywhere 
in
the code; so removing it would make ASan's variable-sized array member 
heuristic
kick in here and suppress the warning, but who knows whether there's some
requirement on the exact sizeof(_mtx).

> hb-ot-font.cc:128:12: runtime error: index 3 out of bounds for type 
'OT::LongMetric const[1]'
>  hb_ot_face_metrics_accelerator_t::get_advance(unsigned int) const 
workdir/UnpackedTarball/harfbuzz/src/hb-ot-font.cc:128:43
>  hb_ot_get_glyph_h_advance(hb_font_t*, void*, unsigned int, void*) 
workdir/UnpackedTarball/harfbuzz/src/hb-ot-font.cc:439:47
>  hb_font_t::get_glyph_h_advance(unsigned int) 
workdir/UnpackedTarball/harfbuzz/src/./hb-font-private.hh:207:12
>  hb_ot_position_default(hb_ot_shape_context_t*) 
workdir/UnpackedTarball/harfbuzz/src/hb-ot-shape.cc:613:35
>  hb_ot_position(hb_ot_shape_context_t*) 
workdir/UnpackedTarball/harfbuzz/src/hb-ot-shape.cc:719:3
>  hb_ot_shape_internal(hb_ot_shape_context_t*) 
workdir/UnpackedTarball/harfbuzz/src/hb-ot-shape.cc:768:3
>  _hb_ot_shape workdir/UnpackedTarball/harfbuzz/src/hb-ot-shape.cc:792:3
>  hb_shape_plan_execute 
workdir/UnpackedTarball/harfbuzz/src/./hb-shaper-list.hh:43:1
>  CommonSalLayout::LayoutText(ImplLayoutArgs&) 
vcl/source/gdi/CommonSalLayout.cxx:485:23
>  OutputDevice::ImplLayout(rtl::OUString const&, int, int, Point const&, 
long, long const*, SalLayoutFlags, vcl::TextLayoutCache const*) const 
vcl/source/outdev/text.cxx:1400:36
>  OutputDevice::GetTextArray(rtl::OUString const&, long*, int, int, 
vcl::TextLayoutCache const*) const vcl/source/outdev/text.cxx:999:35
>  OutputDevice::GetTextWidth(rtl::OUString const&, int, int, 
vcl::TextLayoutCache const*) const vcl/source/outdev/text.cxx:915:19
>  ImplFontMetricData::ImplInitTextLineSize(OutputDevice const*) 
vcl/source/font/fontmetric.cxx:372:30
>  OutputDevice::ImplNewFont() const vcl/source/outdev/font.cxx:1100:42
>  OutputDevice::GetTextHeight() const vcl/source/outdev/text.cxx:924:14
>  vcl::Window::ImplInitAppFontData(vcl::Window*) 
vcl/source/window/window.cxx:1177:33
>  vcl::Window::ImplInit(vcl::Window*, long, SystemParentData*) 
vcl/source/window/window.cxx:1168:9
>  ImplBorderWindow::ImplInit(vcl::Window*, long, BorderWindowStyle, 
SystemParentData*) vcl/source/window/brdwin.cxx:1758:13
>  ImplBorderWindow::ImplBorderWindow(vcl::Window*, SystemParentData*, 
long, BorderWindowStyle) vcl/source/window/brdwin.cxx:1790:5
>  VclPtrInstance::VclPtrInstance(vcl::Window*&, 
SystemParentData*&, long&, BorderWindowStyle&) include/vcl/vclptr.hxx:281:39
>  WorkWindow::ImplInit(vcl::Window*, long, SystemParentData*) 
vcl/source/window/wrkwin.cxx:52:38
>  WorkWindow::WorkWindow(vcl::Window*, long) 
vcl/source/window/wrkwin.cxx:95:5
>  VclPtr VclPtr::Create(vcl::Window*&, long&) include/vcl/vclptr.hxx:131:46
>  (anonymous namespace)::VCLXToolkit::ImplCreateWindow(VCLXWindow**, 
com::sun::star::awt::WindowDescriptor const&, vcl::Window*, long) 
toolkit/source/awt/vclxtoolkit.cxx:1195:42
>  (anonymous 
namespace)::VCLXToolkit::ImplCreateWindow(com::sun::star::awt::WindowDescriptor 
const&, long) toolkit/source/awt/vclxtoolkit.cxx:1306:22
>  (anonymous 
namespace)::VCLXToolkit::createWindow(com::sun::star::awt::WindowDescriptor 
const&) toolkit/source/awt/vclxtoolkit.cxx:799:12
>  non-virtual thunk to (anonymous 
namespace)::VCLXToolkit::createWindow(com::sun::star::awt::WindowDescriptor 
const&) toolkit/source/awt/vclxtoolkit.cxx:797:59
>  (anonymous 
namespace)::TaskCreatorService::implts_createContainerWindow(com::sun::star::uno::Reference
 const&, com::sun::star::awt::Rectangle const&, 

Re: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine

2016-11-04 Thread Stephan Bergmann

On 11/03/2016 06:23 PM, Khaled Hosny wrote:

commit 6324efd70dfa8c6be84cba1fa29658e3373cbbe3
Author: Khaled Hosny 
Date:   Thu Nov 3 19:21:01 2016 +0200

tdf#89870: Add config option for layout engine

The env variable takes precedence.


Do we really need this?  I've read through 
 and 
following, but I'm not too convinced.


* How long will we keep supporting the old code?  "Forever", or do we 
have a clear idea when to drop it?


* Who exactly is the perceived audience of setting that configuration 
option, vs. setting the environment variable?


We shouldn't light-heartedly fill the configuration with unnecessary 
entries.


And the use of a string ("new" vs. "old", instead of a bool or an 
integer enumeration), presumably intended to make manually editing it in 
the advanced configuration options pane easier, solves that usability 
issue in the wrong way IMO.



Change-Id: I273ec867725dd012b005d49fbfaa1dc27203c021

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index e8a9fae..0e645ad 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -851,6 +851,13 @@
   
 Contains settings for VCL.
   
+  
+
+  Specifies which text layout engine should be use. Possible
+values are ("old", "new").
+
+new
+  
   
 
Specifies if OpenGL rendering should be used in VCL backends
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 2e09aaf..ef9bbc0 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -34,6 +34,8 @@

 #include 

+#include 
+
 #include 
 #include 

@@ -770,7 +772,8 @@ bool SalLayout::IsSpacingGlyph( sal_GlyphId nGlyph )

 bool SalLayout::UseCommonLayout()
 {
-static bool bUse = getenv("SAL_NO_COMMON_LAYOUT") == nullptr;
+static bool bUse = (getenv("SAL_NO_COMMON_LAYOUT") == nullptr) &&
+   (officecfg::Office::Common::VCL::TextLayoutEngine::get() == 
"new");
 return bUse;
 }



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


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

2016-11-04 Thread Samuel Mehrbrodt
 svx/uiconfig/ui/profileexporteddialog.ui |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6375c367021bdf6e6dcce266fc6d84e2f74222e2
Author: Samuel Mehrbrodt 
Date:   Fri Nov 4 10:05:24 2016 +

Fix dialog name and title

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

diff --git a/svx/uiconfig/ui/profileexporteddialog.ui 
b/svx/uiconfig/ui/profileexporteddialog.ui
index 3897bd5..93ac9de 100644
--- a/svx/uiconfig/ui/profileexporteddialog.ui
+++ b/svx/uiconfig/ui/profileexporteddialog.ui
@@ -2,10 +2,10 @@
 
 
   
-  
+  
 False
 6
-Enter Safe Mode
+Profile exported
 False
 dialog
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine

2016-11-04 Thread Tor Lillqvist
> We shouldn't light-heartedly fill the configuration with unnecessary
> entries.


Agree. Or, as they would say in that other project, +1.

Also, would going through officecfg and looking for deprecated and actually
no-op configuration thingies be a good Easy Hack?

For instance, some days ago I came across some stuff marked with "//
xmlsec05 deprecated" which also related to some configuration thingies, and
I did not have time to investigate whether they even affect any behaviour
of the code at all. But this is not related to this thread, sorry.

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


Cleaning up configuration (was: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine)

2016-11-04 Thread Stephan Bergmann

On 11/04/2016 11:20 AM, Tor Lillqvist wrote:

Also, would going through officecfg and looking for deprecated and
actually no-op configuration thingies be a good Easy Hack?


At least in principle, the tree of available configuration items is part 
of the stable interface, accessible from 3rd party code.  So at least 
some removals could be delicate.

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


[Libreoffice-commits] core.git: compilerplugins/clang

2016-11-04 Thread Eike Rathke
 compilerplugins/clang/defaultparams.cxx   |  128 --
 compilerplugins/clang/store/defaultparams.cxx |  128 ++
 2 files changed, 128 insertions(+), 128 deletions(-)

New commits:
commit 8e38964c32b124be7a2acfbdeeb6dba96e77b9e8
Author: Eike Rathke 
Date:   Fri Nov 4 12:27:18 2016 +0100

move loplugin:defaultparams to store/

As per IRC 2016-11-04 12:21

Change-Id: Ic4cc7f67fb31be80a966c652cb30bb859f874a8b

diff --git a/compilerplugins/clang/defaultparams.cxx 
b/compilerplugins/clang/store/defaultparams.cxx
similarity index 100%
rename from compilerplugins/clang/defaultparams.cxx
rename to compilerplugins/clang/store/defaultparams.cxx
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Miklos Vajna
 xmlsecurity/inc/pdfio/pdfdocument.hxx  |7 +++
 xmlsecurity/qa/unit/pdfsigning/data/pdf14lowin.pdf |binary
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx  |   12 
 xmlsecurity/source/pdfio/pdfdocument.cxx   |   17 +++--
 4 files changed, 34 insertions(+), 2 deletions(-)

New commits:
commit d0edff60c786c4975b433890d277397673871418
Author: Miklos Vajna 
Date:   Fri Nov 4 10:18:08 2016 +0100

xmlsecurity PDF NSS verify: handle SHA1_WITH_RSA

SHA1_WITH_RSA is a signing algorithm, not a digest one, but let's
accept it, so LO on Linux can verify a signature generated by LO on
Windows.

It's annoying that equivalent mapping in NSS is not part of their public
API.

Change-Id: I97186fcc1d118f922e5ee3cb472aa5b52bc4b5ca

diff --git a/xmlsecurity/inc/pdfio/pdfdocument.hxx 
b/xmlsecurity/inc/pdfio/pdfdocument.hxx
index 37457c0..ca70c94 100644
--- a/xmlsecurity/inc/pdfio/pdfdocument.hxx
+++ b/xmlsecurity/inc/pdfio/pdfdocument.hxx
@@ -116,6 +116,8 @@ public:
 PDFDocument();
 PDFDocument& operator=(const PDFDocument&) = delete;
 PDFDocument(const PDFDocument&) = delete;
+/// @name Low-level functions, to be used by PDFElement subclasses.
+//@{
 static OString ReadKeyword(SvStream& rStream);
 static size_t FindStartXRef(SvStream& rStream);
 void ReadXRef(SvStream& rStream);
@@ -136,13 +138,17 @@ public:
 bool Tokenize(SvStream& rStream, TokenizeMode eMode, std::vector< 
std::unique_ptr >& rElements, PDFObjectElement* pObject);
 /// Register an object (owned directly or indirectly by m_aElements) as a 
provder for a given ID.
 void SetIDObject(size_t nID, PDFObjectElement* pObject);
+//@}
 
+/// @name High-level functions, to be used by others.
+//@{
 /// Read elements from the start of the stream till its end.
 bool Read(SvStream& rStream);
 /// Sign the read document with xCertificate in the edit buffer.
 bool Sign(const css::uno::Reference& 
xCertificate, const OUString& rDescription);
 /// Serializes the contents of the edit buffer.
 bool Write(SvStream& rStream);
+/// Get a list of signatures embedded into this document.
 std::vector GetSignatureWidgets();
 /**
  * @param rInformation The actual result.
@@ -152,6 +158,7 @@ public:
 static bool ValidateSignature(SvStream& rStream, PDFObjectElement* 
pSignature, SignatureInformation& rInformation, bool bLast);
 /// Remove the nth signature from read document in the edit buffer.
 bool RemoveSignature(size_t nPosition);
+//@}
 };
 
 } // namespace pdfio
diff --git a/xmlsecurity/qa/unit/pdfsigning/data/pdf14lowin.pdf 
b/xmlsecurity/qa/unit/pdfsigning/data/pdf14lowin.pdf
new file mode 100644
index 000..5270151
Binary files /dev/null and b/xmlsecurity/qa/unit/pdfsigning/data/pdf14lowin.pdf 
differ
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 5a95586..a6c764d 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -58,6 +58,8 @@ public:
 void testPDF14Adobe();
 /// Test a PDF 1.6 document, signed by Adobe.
 void testPDF16Adobe();
+/// Test a PDF 1.4 document, signed by LO on Windows.
+void testPDF14LOWin();
 
 CPPUNIT_TEST_SUITE(PDFSigningTest);
 CPPUNIT_TEST(testPDFAdd);
@@ -66,6 +68,7 @@ public:
 CPPUNIT_TEST(testPDFRemoveAll);
 CPPUNIT_TEST(testPDF14Adobe);
 CPPUNIT_TEST(testPDF16Adobe);
+CPPUNIT_TEST(testPDF14LOWin);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -267,6 +270,15 @@ void PDFSigningTest::testPDF16Adobe()
 verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf16adobe.pdf", 1);
 }
 
+void PDFSigningTest::testPDF14LOWin()
+{
+// mscrypto used SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION as a digest
+// algorithm when it meant SEC_OID_SHA1, make sure we tolerate that on all
+// platforms.
+// This failed, as NSS HASH_Create() didn't handle the sign algorithm.
+verify(m_directories.getURLFromSrc(DATA_DIRECTORY) + "pdf14lowin.pdf", 1);
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(PDFSigningTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/xmlsecurity/source/pdfio/pdfdocument.cxx 
b/xmlsecurity/source/pdfio/pdfdocument.cxx
index 6822e14..bfd66d2 100644
--- a/xmlsecurity/source/pdfio/pdfdocument.cxx
+++ b/xmlsecurity/source/pdfio/pdfdocument.cxx
@@ -1760,7 +1760,20 @@ bool PDFDocument::ValidateSignature(SvStream& rStream, 
PDFObjectElement* pSignat
 }
 
 SECItem aAlgorithm = 
NSS_CMSSignedData_GetDigestAlgs(pCMSSignedData)[0]->algorithm;
-HASH_HashType eHashType = 
HASH_GetHashTypeByOidTag(SECOID_FindOIDTag(&aAlgorithm));
+SECOidTag eOidTag = SECOID_FindOIDTag(&aAlgorithm);
+
+// Map a sign algorithm to a digest algorithm.
+// See NSS_CMSUtil_MapSignAlgs(), which is private to us.
+switch (eOidTag)
+{
+case SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION:

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

2016-11-04 Thread Aron Budea
 sc/source/core/data/dpcache.cxx   |5 +++--
 sc/source/core/tool/cellkeytranslator.cxx |6 --
 sc/source/core/tool/compare.cxx   |5 +++--
 3 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit a29d53509b48657d53f5496d2295d30343f25ab6
Author: Aron Budea 
Date:   Tue Oct 25 01:01:01 2016 +0200

tdf#79892: Pass resolved locale to transliterate calls in Calc

Instead of ScGlobal::eLnge, use
ScGlobal::pSysLocale->GetLanguageTag().getLanguageType().

Change-Id: Ie0aa90098860ac2b6cee195180dbc213eaf3b5f8
Reviewed-on: https://gerrit.libreoffice.org/30240
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 8175e30b732e3f6f4f1058934e7fe8a1189f40cf)
Reviewed-on: https://gerrit.libreoffice.org/30559
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index 661944e..040564d 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -576,10 +576,11 @@ bool ScDPCache::ValidQuery( SCROW nRow, const 
ScQueryParam &rParam) const
 {
 OUString aQueryStr = 
rEntry.GetQueryItem().maString.getString();
 css::uno::Sequence< sal_Int32 > xOff;
+const LanguageType nLang = 
ScGlobal::pSysLocale->GetLanguageTag().getLanguageType();
 OUString aCell = pTransliteration->transliterate(
-aCellStr, ScGlobal::eLnge, 0, 
aCellStr.getLength(), &xOff);
+aCellStr, nLang, 0, aCellStr.getLength(), &xOff);
 OUString aQuer = pTransliteration->transliterate(
-aQueryStr, ScGlobal::eLnge, 0, 
aQueryStr.getLength(), &xOff);
+aQueryStr, nLang, 0, aQueryStr.getLength(), &xOff);
 bOk = (aCell.indexOf( aQuer ) != -1);
 }
 if (rEntry.eOp == SC_NOT_EQUAL)
diff --git a/sc/source/core/tool/cellkeytranslator.cxx 
b/sc/source/core/tool/cellkeytranslator.cxx
index 16ce164..1e764d5 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -22,6 +22,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -161,9 +162,10 @@ void ScCellKeywordTranslator::transKeyword(OUString& 
rName, const lang::Locale*
 if ( !spInstance.get() )
 spInstance.reset( new ScCellKeywordTranslator );
 
-LanguageType eLang = pLocale ? 
LanguageTag(*pLocale).makeFallback().getLanguageType() : LANGUAGE_SYSTEM;
+LanguageType nLang = pLocale ?
+LanguageTag(*pLocale).makeFallback().getLanguageType() : 
ScGlobal::pSysLocale->GetLanguageTag().getLanguageType();
 Sequence aOffsets;
-rName = spInstance->maTransWrapper.transliterate(rName, eLang, 0, 
rName.getLength(), &aOffsets);
+rName = spInstance->maTransWrapper.transliterate(rName, nLang, 0, 
rName.getLength(), &aOffsets);
 lclMatchKeyword(rName, spInstance->maStringNameMap, eOpCode, pLocale);
 }
 
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index a1dd602..4135953 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -161,11 +161,12 @@ double CompareFunc( const Compare& rComp, CompareOptions* 
pOptions )
 }
 else
 {
+const LanguageType nLang = 
ScGlobal::pSysLocale->GetLanguageTag().getLanguageType();
 OUString aCell( pTransliteration->transliterate(
-rCell1.maStr.getString(), ScGlobal::eLnge, 0,
+rCell1.maStr.getString(), nLang, 0,
 rCell1.maStr.getLength(), nullptr));
 OUString aQuer( pTransliteration->transliterate(
-rCell2.maStr.getString(), ScGlobal::eLnge, 0,
+rCell2.maStr.getString(), nLang, 0,
 rCell2.maStr.getLength(), nullptr));
 bMatch = (aCell.indexOf( aQuer ) != -1);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Aron Budea
 sc/source/core/data/table3.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 610be3d128fe19b2d8458a479005314045eab830
Author: Aron Budea 
Date:   Fri Oct 14 15:37:48 2016 +0200

tdf#79892: Improve performance of transliteration

Pass resolved language to transliterate call, so it doesn't
have to be resolved each time inside.

Change-Id: Ibcad3b8517cb92c3462e14207c0a79ca2c76d73b
Reviewed-on: https://gerrit.libreoffice.org/29829
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 2ed5057993fa8d0f57531303e6c9fafc37138737)
Reviewed-on: https://gerrit.libreoffice.org/30558
Reviewed-by: jan iversen 
Tested-by: jan iversen 

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 7edc9a8..d0f4e09 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -2499,11 +2499,12 @@ public:
 else
 {
 OUString aQueryStr = rItem.maString.getString();
+const LanguageType nLang = 
ScGlobal::pSysLocale->GetLanguageTag().getLanguageType();
 OUString aCell( mpTransliteration->transliterate(
-aCellStr.getString(), ScGlobal::eLnge, 0, 
aCellStr.getLength(),
+aCellStr.getString(), nLang, 0, aCellStr.getLength(),
 nullptr ) );
 OUString aQuer( mpTransliteration->transliterate(
-aQueryStr, ScGlobal::eLnge, 0, aQueryStr.getLength(),
+aQueryStr, nLang, 0, aQueryStr.getLength(),
 nullptr ) );
 sal_Int32 nIndex = (rEntry.eOp == SC_ENDS_WITH || 
rEntry.eOp == SC_DOES_NOT_END_WITH) ?
 (aCell.getLength() - aQuer.getLength()) : 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Caolán McNamara
 cui/source/customize/acccfg.cxx |   11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 859204a52351c4d5d146e8b22d14bd4a44f294e9
Author: Caolán McNamara 
Date:   Fri Nov 4 11:40:25 2016 +

customize dialog crashes, since...

commit 164d8e3b1aa660d65c1af9570e67b66520bd953a
Date:   Thu Nov 3 02:35:00 2016 +0200

tdf#91222 VclBuilder constructor cleanup

so revert problematic bit of that.

The impl is called SfxAccCfgTabListBox_Impl, but the
widget name is SfxAccCfgTabListBox

Change-Id: I8e800b376afa48090fde1074350c1c8ce39a27bf

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 1c98ae8..ae7d1cc 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -664,7 +664,16 @@ void SfxAccCfgLBoxString_Impl::Paint(const Point& aPos, 
SvTreeListBox& /*rDevice
 
 }
 
-VCL_BUILDER_FACTORY_CONSTRUCTOR(SfxAccCfgTabListBox_Impl, WB_TABSTOP)
+VCL_BUILDER_DECL_FACTORY(SfxAccCfgTabListBox)
+{
+WinBits nWinBits = WB_TABSTOP;
+
+OString sBorder = VclBuilder::extractCustomProperty(rMap);
+if (!sBorder.isEmpty())
+   nWinBits |= WB_BORDER;
+
+rRet = VclPtr::Create(pParent, nWinBits);
+}
 
 SfxAccCfgTabListBox_Impl::~SfxAccCfgTabListBox_Impl()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine

2016-11-04 Thread Khaled Hosny
On Fri, Nov 04, 2016 at 11:12:59AM +0100, Stephan Bergmann wrote:
> On 11/03/2016 06:23 PM, Khaled Hosny wrote:
> > commit 6324efd70dfa8c6be84cba1fa29658e3373cbbe3
> > Author: Khaled Hosny 
> > Date:   Thu Nov 3 19:21:01 2016 +0200
> > 
> > tdf#89870: Add config option for layout engine
> > 
> > The env variable takes precedence.
> 
> Do we really need this?  I've read through
>  and
> following, but I'm not too convinced.
> 
> * How long will we keep supporting the old code?  "Forever", or do we have a
> clear idea when to drop it?

It should go away sometime after 5.3 is released. Would it be an issue
to just drop the configuration option then as well?

> * Who exactly is the perceived audience of setting that configuration
> option, vs. setting the environment variable?

Mainly end users who might have a serious bug with the new layout
engine and can’t easily set env variables, since setting env variables
on Windows and Mac can be tricky. 

I guess I’m just being extra cautious. I have no strong preference for
the configuration option and I’d rather have everyone use the new code,
but since the old code is there already why not make it slightly easier
for people to use it if they need to?

> And the use of a string ("new" vs. "old", instead of a bool or an integer
> enumeration), presumably intended to make manually editing it in the
> advanced configuration options pane easier, solves that usability issue in
> the wrong way IMO.

I was going to use a boolean, but now I don’t actually remember why a
string seemed like a better idea.

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


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

2016-11-04 Thread Miklos Vajna
 loolwsd/ChildSession.cpp |1 -
 loolwsd/Common.hpp   |2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 40340063389fe9558c3bdf15258950d9acfb5820
Author: Miklos Vajna 
Date:   Fri Nov 4 14:09:09 2016 +0100

getNewChild: avoid multiplication at int precision, then compare with long

Change-Id: I23c26ef9014150fda7e400e19526244ddaa411cf

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 6603433..7cfb7ee 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -25,7 +25,6 @@
 
 using Poco::JSON::Object;
 using Poco::JSON::Parser;
-using Poco::Net::WebSocket;
 using Poco::StringTokenizer;
 using Poco::Timestamp;
 using Poco::URI;
diff --git a/loolwsd/Common.hpp b/loolwsd/Common.hpp
index 13028b7..cfe0e2d 100644
--- a/loolwsd/Common.hpp
+++ b/loolwsd/Common.hpp
@@ -18,7 +18,7 @@ constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980;
 constexpr int DEFAULT_MASTER_PORT_NUMBER = 9981;
 
 constexpr int COMMAND_TIMEOUT_MS = 5000;
-constexpr int CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS;
+constexpr long CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS;
 constexpr int CHILD_REBALANCE_INTERVAL_MS = CHILD_TIMEOUT_MS / 10;
 constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 10;
 constexpr int WS_SEND_TIMEOUT_MS = 1000;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - dbaccess/source desktop/source editeng/source extensions/source filter/source

2016-11-04 Thread Noel Grandin
 dbaccess/source/core/api/CacheSet.cxx   |9 -
 dbaccess/source/core/api/KeySet.cxx |9 -
 dbaccess/source/core/api/OptimisticSet.cxx  |   16 +--
 dbaccess/source/core/api/View.cxx   |3 
 dbaccess/source/core/dataaccess/documentcontainer.cxx   |4 
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |3 
 dbaccess/source/core/misc/dsntypes.cxx  |3 
 dbaccess/source/ui/control/FieldDescControl.cxx |3 
 dbaccess/source/ui/dlg/indexdialog.cxx  |   16 +--
 dbaccess/source/ui/dlg/queryfilter.cxx  |3 
 dbaccess/source/ui/dlg/queryorder.cxx   |6 -
 dbaccess/source/ui/dlg/tablespage.cxx   |3 
 dbaccess/source/ui/misc/TokenWriter.cxx |   22 +---
 dbaccess/source/ui/misc/UITools.cxx |6 -
 dbaccess/source/ui/misc/indexcollection.cxx |   19 +---
 dbaccess/source/ui/querydesign/QueryDesignView.cxx  |7 -
 dbaccess/source/ui/querydesign/querycontroller.cxx  |3 
 desktop/source/app/app.cxx  |3 
 desktop/source/deployment/registry/dp_backend.cxx   |4 
 desktop/source/migration/services/wordbookmigration.cxx |   10 --
 editeng/source/misc/svxacorr.cxx|5 -
 editeng/source/uno/unonrule.cxx |5 -
 extensions/source/dbpilots/controlwizard.cxx|3 
 extensions/source/dbpilots/gridwizard.cxx   |9 -
 extensions/source/propctrlr/formcomponenthandler.cxx|9 -
 filter/source/msfilter/escherex.cxx |   33 +--
 filter/source/msfilter/mstoolbar.cxx|6 -
 filter/source/msfilter/msvbahelper.cxx  |   19 +---
 filter/source/msfilter/svdfppt.cxx  |   60 -
 filter/source/svg/svgexport.cxx |   44 ++---
 filter/source/svg/svgreader.cxx |9 -
 filter/source/svg/svgwriter.cxx |   73 
 32 files changed, 133 insertions(+), 294 deletions(-)

New commits:
commit c1805c48ae6057d370a35f2e059f3ee82396c407
Author: Noel Grandin 
Date:   Fri Nov 4 12:29:35 2016 +0200

loplugin:oncevar in dbaccess

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

diff --git a/dbaccess/source/core/api/CacheSet.cxx 
b/dbaccess/source/core/api/CacheSet.cxx
index 7f492b4..723e292 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -157,16 +157,14 @@ void SAL_CALL OCacheSet::insertRow( const ORowSetRow& 
_rInsertRow,const connecti
 
 // set values and column names
 OUStringBuffer aValues(" VALUES ( ");
-static const char aPara[] = "?,";
 OUString aQuote = getIdentifierQuoteString();
-static const char aComma[] = ",";
 sal_Int32 i = 1;
 ORowVector< ORowSetValue >::Vector::const_iterator aIter = 
_rInsertRow->get().begin()+1;
 connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = 
_rInsertRow->get().end();
 for(; aIter != aEnd;++aIter)
 {
-aSql.append(::dbtools::quoteName( 
aQuote,m_xSetMetaData->getColumnName(i++)) + aComma);
-aValues.append(aPara);
+aSql.append(::dbtools::quoteName( 
aQuote,m_xSetMetaData->getColumnName(i++)) + ",");
+aValues.append("?,");
 }
 
 aSql[aSql.getLength() - 1] = ')';
@@ -227,7 +225,6 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
 
 OUString aColumnName;
 
-static const char aPara[] = "?,";
 static const char aAnd[] = " AND ";
 
 OUString aQuote  = getIdentifierQuoteString();
@@ -271,7 +268,7 @@ void OCacheSet::fillParameters( const ORowSetRow& _rRow
 }
 if(aIter->isModified())
 {
-_sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + 
aPara);
+_sParameter.append(::dbtools::quoteName( aQuote,aColumnName) + 
"?,");
 }
 }
 }
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index a42d273..18724f6 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -221,12 +221,11 @@ namespace
 {
 void appendOneKeyColumnClause( const OUString &tblName, const OUString 
&colName, const connectivity::ORowSetValue &_rValue, OUStringBuffer &o_buf )
 {
-static const char s_sDot[] = ".";
 OUString fullName;
 if (tblName.isEmpty())
 fullName = colName;
 else
-fullName = tblName + s_sDot + colName;
+fullName = tblName + "." + colName;
 if ( _rValue.isNull() )
 {
 o_buf.append(fullName + " IS NULL ");
@@ -627,9 +626,7 @@ void SAL_CALL OKeySet::insertRow( const ORowSetRo

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

2016-11-04 Thread Eike Rathke
 sc/source/core/data/table3.cxx |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 2ba62a78151c3cd8a104b763f29432bb49de5e26
Author: Eike Rathke 
Date:   Fri Nov 4 14:20:23 2016 +0100

sc-perf: eliminate unnecessary loops in ScTable::UpdateSelectionFunction()

That looped unconditionally over all columns of a sheet just to let
ScColumn::UpdateSelectionFunction() costly (by creating empty spans) decide
that it doesn't have to do anything. This for *every* cell cursor movement 
or
switching sheets et al. Instead, use the ScMarkData area to narrow down the
range beforehand, which when travelling with the cell cursor is just one
column.

Change-Id: Ic60928d07bc6cec4f6d8491ab30b99d7b20b8490

diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx
index 311ac02..1336e04 100644
--- a/sc/source/core/data/table3.cxx
+++ b/sc/source/core/data/table3.cxx
@@ -3404,7 +3404,20 @@ sal_Int32 ScTable::GetMaxNumberStringLen(
 void ScTable::UpdateSelectionFunction( ScFunctionData& rData, const 
ScMarkData& rMark )
 {
 ScRangeList aRanges = rMark.GetMarkedRangesForTab( nTab );
-for (SCCOL nCol = 0; nCol <= MAXCOL && !rData.bError; ++nCol)
+ScRange aMarkArea( ScAddress::UNINITIALIZED );
+if (rMark.IsMultiMarked())
+rMark.GetMultiMarkArea( aMarkArea );
+else if (rMark.IsMarked())
+rMark.GetMarkArea( aMarkArea );
+else
+{
+assert(!"ScTable::UpdateSelectionFunction - called without anything 
marked");
+aMarkArea.aStart.SetCol(0);
+aMarkArea.aEnd.SetCol(MAXCOL);
+}
+const SCCOL nStartCol = aMarkArea.aStart.Col();
+const SCCOL nEndCol = aMarkArea.aEnd.Col();
+for (SCCOL nCol = nStartCol; nCol <= nEndCol && !rData.bError; ++nCol)
 {
 if (pColFlags && ColHidden(nCol))
 continue;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-11-04 Thread Michael Meeks
 sc/source/core/data/table6.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 5946cc2f7056fc580fefe1b90795e3921bdb3969
Author: Michael Meeks 
Date:   Fri Nov 4 09:46:29 2016 +

tdf#91260 - ReplaceAll should use a columnar direction.

MDDS is columnular, so this shrinks the working set very
significantly, and should improve performance.

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

diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx
index d983a55..636ca56 100644
--- a/sc/source/core/data/table6.cxx
+++ b/sc/source/core/data/table6.cxx
@@ -571,10 +571,14 @@ bool ScTable::ReplaceAll(
 else
 GetLastDataPos(nLastCol, nLastRow);
 
+// tdf#92160 - columnular replace is faster, and more memory efficient.
+SvxSearchItem aCopyItem(rSearchItem);
+aCopyItem.SetRowDirection(false);
+
 bool bEverFound = false;
 while (true)
 {
-bool bFound = Search(rSearchItem, nCol, nRow, nLastCol, nLastRow, 
rMark, rUndoStr, pUndoDoc);
+bool bFound = Search(aCopyItem, nCol, nRow, nLastCol, nLastRow, rMark, 
rUndoStr, pUndoDoc);
 
 if (bFound)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-11-04 Thread Katarina Behrens
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cae6864374975dabe93b95fad9161bab84454b99
Author: Katarina Behrens 
Date:   Tue Aug 30 15:53:18 2016 +0200

Updated core
Project: help  98d298e4ef2bc9ad9f4e2d2bb83c3183e3ee0977

Create a new image list for 'make postprocess'

with screenshot images

corrected path as indicated

Change-Id: I3d81c88a4ae002f12247ec4a5587e50f9927a005
Reviewed-on: https://gerrit.libreoffice.org/28499
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index be1c45a..98d298e 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit be1c45a0094513b93bbe9747398be1cab6a0abe0
+Subproject commit 98d298e4ef2bc9ad9f4e2d2bb83c3183e3ee0977
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: CustomTarget_imagelist.mk helpers/create_ilst.pl

2016-11-04 Thread Katarina Behrens
 CustomTarget_imagelist.mk |9 +
 helpers/create_ilst.pl|3 ++-
 2 files changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 98d298e4ef2bc9ad9f4e2d2bb83c3183e3ee0977
Author: Katarina Behrens 
Date:   Tue Aug 30 15:53:18 2016 +0200

Create a new image list for 'make postprocess'

with screenshot images

corrected path as indicated

Change-Id: I3d81c88a4ae002f12247ec4a5587e50f9927a005
Reviewed-on: https://gerrit.libreoffice.org/28499
Reviewed-by: Olivier Hallot 
Tested-by: Olivier Hallot 

diff --git a/CustomTarget_imagelist.mk b/CustomTarget_imagelist.mk
index 027cf2c..ee42949 100644
--- a/CustomTarget_imagelist.mk
+++ b/CustomTarget_imagelist.mk
@@ -11,6 +11,7 @@ $(eval $(call 
gb_CustomTarget_CustomTarget,helpcontent2/source/auxiliary))
 
 $(eval $(call gb_CustomTarget_register_targets,helpcontent2/source/auxiliary,\
helpimg.ilst \
+   screenshotimg.ilst \
 ))
 
 $(call gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/helpimg.ilst 
: \
@@ -21,4 +22,12 @@ $(call 
gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/helpimg.ilst :
mv $@.out $@ \
)
 
+$(call 
gb_CustomTarget_get_workdir,helpcontent2/source/auxiliary)/screenshotimg.ilst : 
\
+   $(SRCDIR)/helpcontent2/helpers/create_ilst.pl
+   $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,1)
+   $(call gb_Helper_abbreviate_dirs,\
+   $(PERL) $< -dir=$(SRCDIR)/helpcontent2/source/media/screenshots 
-pre=media/screenshots > $@.out && \
+   mv $@.out $@ \
+   )
+
 # vim: set noet sw=4 ts=4:
diff --git a/helpers/create_ilst.pl b/helpers/create_ilst.pl
index b49a075..c6b9789 100644
--- a/helpers/create_ilst.pl
+++ b/helpers/create_ilst.pl
@@ -35,7 +35,8 @@ if ( -d $startdir ) {
 find(sub{push @files, $File::Find::name if 
(($File::Find::name=~/\.png$/));},$startdir);
 foreach ( @files ) { s#.*$startdir_regexp[\\/]##; };
 for (sort(@files)) {
-print "%GLOBALRES%/$pre/$_\n";
+($pre eq "helpimg") ? ($prefix = "%GLOBALRES%/") : ($prefix = 
"%HELPCONTENT%/");
+print "$prefix" . "$pre/$_\n";
 }
 } else {
 &terminate("Cannot find $startdir.");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: postprocess/CustomTarget_images.mk solenv/bin

2016-11-04 Thread Katarina Behrens
 postprocess/CustomTarget_images.mk |2 ++
 solenv/bin/packimages.pl   |   30 --
 2 files changed, 26 insertions(+), 6 deletions(-)

New commits:
commit d082936c7a2c3fd6a8784fa5a626f545ec904b42
Author: Katarina Behrens 
Date:   Tue Aug 30 22:31:08 2016 +0200

Allow including/packaging help-specific images

from other than icon-themes folder

Change-Id: Iba1808e642fde8d0370b59550c7bdac1a3e4ac79
Reviewed-on: https://gerrit.libreoffice.org/28513
Reviewed-by: jan iversen 
Tested-by: jan iversen 
Reviewed-by: Olivier Hallot 

diff --git a/postprocess/CustomTarget_images.mk 
b/postprocess/CustomTarget_images.mk
index ecfbe96..def511b 100644
--- a/postprocess/CustomTarget_images.mk
+++ b/postprocess/CustomTarget_images.mk
@@ -30,6 +30,7 @@ $(packimages_DIR)/%.zip : \
$(SRCDIR)/sfx2/source/sidebar/sidebar.ilst \
$(SRCDIR)/vcl/source/control/throbber.ilst \
$(call gb_Helper_optional,HELP,$(helpimages_DIR)/helpimg.ilst) \
+   $(call 
gb_Helper_optional,HELP,$(helpimages_DIR)/screenshotimg.ilst) \
$(call gb_Helper_optional,DBCONNECTIVITY,$(if 
$(ENABLE_JAVA),$(SRCDIR)/connectivity/source/drivers/hsqldb/hsqlui.ilst)) \
$(call gb_Helper_get_imagelists)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),PRL,2)
@@ -41,6 +42,7 @@ $(packimages_DIR)/%.zip : \
-g $(SRCDIR)/icon-themes/$(subst images_,,$*) 
-m $(SRCDIR)/icon-themes/$(subst images_,,$*) -c $(SRCDIR)/icon-themes/$(subst 
images_,,$*) \
) \
$(INDUSTRIAL_FALLBACK) \
+   $(call gb_Helper_optional,HELP,-e 
$(SRCDIR)/helpcontent2/source) \
-l $${ILSTFILE} \
-s $< -o $@ \
$(if $(findstring s,$(MAKEFLAGS)),> /dev/null) && \
diff --git a/solenv/bin/packimages.pl b/solenv/bin/packimages.pl
old mode 100644
new mode 100755
index a768ebb..fb141c0
--- a/solenv/bin/packimages.pl
+++ b/solenv/bin/packimages.pl
@@ -36,11 +36,13 @@ use File::Temp qw(tempdir);
 
 my $img_global = '%GLOBALRES%';  # 'global' image prefix
 my $img_module = '%MODULE%';  # 'module' image prefix
+my $img_help = '%HELPCONTENT%';  # 'help' image prefix
 
 my $out_file;# path to output archive
 my $tmp_out_file;# path to temporary output file
 my $global_path; # path to global images directory
 my $module_path; # path to module images directory
+my $helpimg_path;# path to help images directory
 my $sort_file;   # path to file containing sorting data
 my @custom_path; # path to custom images directory
 my $imagelist_file;  # file containing list of image list files
@@ -64,7 +66,7 @@ foreach ( @{$image_lists_ref} ) {
 $image_lists_hash{$_}="";
 }
 $do_rebuild = is_file_newer(\%image_lists_hash) if $do_rebuild == 0;
-my ($global_hash_ref, $module_hash_ref, $custom_hash_ref) = 
iterate_image_lists($image_lists_ref);
+my ($global_hash_ref, $module_hash_ref, $custom_hash_ref, $help_hash_ref) = 
iterate_image_lists($image_lists_ref);
 # custom_hash filled from filesystem lookup
 find_custom($custom_hash_ref);
 
@@ -87,7 +89,8 @@ for my $path (@custom_path) {
 }
 }
 
-my $zip_hash_ref = create_zip_list($global_hash_ref, $module_hash_ref, 
$custom_hash_ref);
+my $zip_hash_ref = create_zip_list($global_hash_ref, $module_hash_ref, 
$custom_hash_ref, $help_hash_ref);
+
 remove_links_from_zip_list($zip_hash_ref, \%links);
 
 $do_rebuild = is_file_newer($zip_hash_ref) if $do_rebuild == 0;
@@ -115,6 +118,7 @@ sub parse_options
  '-g=s' => \$global_path,
  '-s=s' => \$sort_file,
  '-m=s' => \$module_path,
+ '-e=s' => \$helpimg_path,
  '-c=s' => \@custom_path_list,
  '-l=s' => \$imagelist_file,
  '-v'   => \$verbose,
@@ -135,7 +139,11 @@ sub parse_options
 
 # Check paths.
 print_error("no such file '$_'", 2) if ! -f $imagelist_file;
-foreach ($out_dir, $global_path, $module_path) {
+
+my @check_directories = ($out_dir, $global_path, $module_path);
+push @check_directories, $helpimg_path if ($helpimg_path ne '');
+
+foreach (@check_directories) {
 print_error("no such directory: '$_'", 2) if ! -d $_;
 print_error("can't search directory: '$_'", 2) if ! -x $_;
 }
@@ -179,12 +187,13 @@ sub iterate_image_lists
 my %global_hash;
 my %module_hash;
 my %custom_hash;
+my %help_hash;
 
 foreach my $i ( @{$image_lists_ref} ) {
-parse_image_list($i, \%global_hash, \%module_hash, \%custom_hash);
+parse_image_list($i, \%global_hash, \%module_hash, \%custom_hash, 
\%help_hash);
 }
 
-return (\%global_hash, \%module_h

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

2016-11-04 Thread Eike Rathke
 sc/source/core/data/columnspanset.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 334a03d801f750c6c97e02ced4cc66e680888196
Author: Eike Rathke 
Date:   Fri Nov 4 14:54:30 2016 +0100

use ScMarkData::GetMarkedRangesForTab(nTab) in SingleColumnSpanSet::scan()

That always worked only by chance only on the first selected sheet, luckily
with ScMarkData it seems to be used only in ScColumn::GetOptimalColWidth()
which usually operates on the visible sheet.

So now setting optimal column width actually works on all selected sheets 
for
the selected columns.

Change-Id: I5944b943824a67d77b549b6cdfc0b2550b8d77b8

diff --git a/sc/source/core/data/columnspanset.cxx 
b/sc/source/core/data/columnspanset.cxx
index d5d4403..f5a224f 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -329,7 +329,7 @@ void SingleColumnSpanSet::scan(const ScMarkData& rMark, 
SCTAB nTab, SCCOL nCol)
 // This table is not selected. Nothing to scan.
 return;
 
-ScRangeList aRanges = rMark.GetMarkedRanges();
+ScRangeList aRanges = rMark.GetMarkedRangesForTab(nTab);
 scan(aRanges, nTab, nCol);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine

2016-11-04 Thread Stephan Bergmann

On 11/04/2016 01:11 PM, Khaled Hosny wrote:

On Fri, Nov 04, 2016 at 11:12:59AM +0100, Stephan Bergmann wrote:

* How long will we keep supporting the old code?  "Forever", or do we have a
clear idea when to drop it?


It should go away sometime after 5.3 is released. Would it be an issue
to just drop the configuration option then as well?


See my "In principle..." reply to Tor's mail in this thread.  So if you 
want to keep this configuration property in for now, just make sure to 
remove it again as quickly as possibly, I'd say.

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


Re: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine

2016-11-04 Thread Khaled Hosny
On Fri, Nov 04, 2016 at 02:51:26PM +0100, Stephan Bergmann wrote:
> On 11/04/2016 01:11 PM, Khaled Hosny wrote:
> > On Fri, Nov 04, 2016 at 11:12:59AM +0100, Stephan Bergmann wrote:
> > > * How long will we keep supporting the old code?  "Forever", or do we 
> > > have a
> > > clear idea when to drop it?
> > 
> > It should go away sometime after 5.3 is released. Would it be an issue
> > to just drop the configuration option then as well?
> 
> See my "In principle..." reply to Tor's mail in this thread.  So if you want
> to keep this configuration property in for now, just make sure to remove it
> again as quickly as possibly, I'd say.

It can be dropped just after 5.3 is branched off.

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


Re: Cleaning up configuration (was: [Libreoffice-commits] core.git: tdf#89870: Add config option for layout engine)

2016-11-04 Thread Khaled Hosny
On Fri, Nov 04, 2016 at 12:12:21PM +0100, Stephan Bergmann wrote:
> On 11/04/2016 11:20 AM, Tor Lillqvist wrote:
> > Also, would going through officecfg and looking for deprecated and
> > actually no-op configuration thingies be a good Easy Hack?
> 
> At least in principle, the tree of available configuration items is part of
> the stable interface, accessible from 3rd party code.  So at least some
> removals could be delicate.

I guess we then need some kind of feature flag that is internal to
LibreOffice, akin to what major web browsers now do for experimental
features.

For example I hate the experimental features flag, it puts a bunch of
totally unrelated features under the same room, and too coarse in
general. I was thinking we should kill it and have individual options
for each experimental feature, but configuration options being a part
of stable interface kills the whole idea.

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


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

2016-11-04 Thread Eike Rathke
 sc/qa/unit/ucalc.cxx |   30 ++
 1 file changed, 30 insertions(+)

New commits:
commit 029bd007b9886479ad1282bac733da4f358881ed
Author: Eike Rathke 
Date:   Fri Nov 4 15:42:54 2016 +0100

unit test for tdf#103684, calculate status bar function across sheets

Change-Id: I8205cf56628b6b4d4b5d655386df994a9c02a1ad

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 24e0e45..65d5892 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -676,6 +676,36 @@ void Test::testSelectionFunction()
 }
 }
 
+// Calculate function across selected sheets.
+clearSheet(m_pDoc, 0);
+m_pDoc->InsertTab(1, "Test2");
+m_pDoc->InsertTab(2, "Test3");
+
+// Set values at B2 and C3 on each sheet.
+m_pDoc->SetValue(ScAddress(1,1,0), 1.0);
+m_pDoc->SetValue(ScAddress(2,2,0), 2.0);
+m_pDoc->SetValue(ScAddress(1,1,1), 4.0);
+m_pDoc->SetValue(ScAddress(2,2,1), 8.0);
+m_pDoc->SetValue(ScAddress(1,1,2), 16.0);
+m_pDoc->SetValue(ScAddress(2,2,2), 32.0);
+
+// Mark B2 and C3 on first sheet.
+aRanges.RemoveAll();
+aRanges.Append(ScRange(1,1,0)); // B2
+aRanges.Append(ScRange(2,2,0)); // C3
+aMark.MarkFromRangeList(aRanges, true);
+// Additionally select third sheet.
+aMark.SelectTable(2, true);
+
+{
+double fRes = 0.0;
+bool bRes = m_pDoc->GetSelectionFunction( SUBTOTAL_FUNC_SUM, 
ScAddress(), aMark, fRes);
+CPPUNIT_ASSERT_MESSAGE("Failed to fetch selection function result.", 
bRes);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("1+2+16+32=", 51.0, fRes);
+}
+
+m_pDoc->DeleteTab(2);
+m_pDoc->DeleteTab(1);
 m_pDoc->DeleteTab(0);
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Cleaning up configuration

2016-11-04 Thread Stephan Bergmann

On 11/04/2016 03:13 PM, Khaled Hosny wrote:

On Fri, Nov 04, 2016 at 12:12:21PM +0100, Stephan Bergmann wrote:

On 11/04/2016 11:20 AM, Tor Lillqvist wrote:

Also, would going through officecfg and looking for deprecated and
actually no-op configuration thingies be a good Easy Hack?


At least in principle, the tree of available configuration items is part of
the stable interface, accessible from 3rd party code.  So at least some
removals could be delicate.


I guess we then need some kind of feature flag that is internal to
LibreOffice, akin to what major web browsers now do for experimental
features.

For example I hate the experimental features flag, it puts a bunch of
totally unrelated features under the same room, and too coarse in
general. I was thinking we should kill it and have individual options
for each experimental feature, but configuration options being a part
of stable interface kills the whole idea.


Removal of configuration items isn't something that never happens.  And 
configmgr handles unknown items gracefully when reading stale .xcu/.xcd 
files, and 3rd party code programmatically accessing such items can be 
made robust too, by catching the relevant exceptions.  So removing 
configuration items isn't a stubborn no-no.  I wrote the original mail 
mainly to raise awareness (if necessary) that configuration items 
shouldn't come and go too arbitrarily.


(For experimental features, another option would be to use a single 
configuration property of type string-list, and each experimental 
feature is assigned a unique string token.)


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


Minutes of the Design Hangout: 2016-Nov-04

2016-11-04 Thread Heiko Tietze
PLEASE DOODLE FOR NEW HANGOUT TIME: http://doodle.com/poll/3f227x7ty989wbwc

2016-Nov-11
+ Present: Cor, (Mark,) Tomaz, Stuart, Jay, Heiko, Gökhan

 * Bad time for the hangout (Jay)
   Given that we still do it on Friday what would be the best time for you?
   => http://doodle.com/poll/3f227x7ty989wbwc
   (Comments with different times and days are welcome.)

 * Comments on the new whiteboard?
   https://wiki.documentfoundation.org/Design/Whiteboards
   => rename/move to "Tasks", "EasyHacks" or the like (Jay)
   - wiki is still an option but not the preferred anymore

 * Remove from GSoC?
   https://wiki.documentfoundation.org/Development/GSoC/Ideas#User_Interface
   + Table styles
   + Review of the sidebar & its functionality
   + Integration of the Templates Repository
   => Mentors, please check if tasks can be removed from the gsoc page

Tickets

 * Inconsistent behavior of clone formatting 
   + Issue was communicated per email (not all formatting properties are cloned)
   + Weird toggle on/off function 
https://bugs.documentfoundation.org/show_bug.cgi?id=59029
   - Benjamin would want to clone all direct formatting properties, Eve rather 
paragraph or character styles (Jay)
   - Split button is a good solution (Cor)
   - All properties should be cloned (Cor)
   => File tickets and discuss on Bugzilla (AI: Heiko)

 * Inserting shapes in Draw shouldnt require multiple clicks (Jay)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=90748
   + https://bugs.documentfoundation.org/show_bug.cgi?id=39268
   - Double click is the LibO way to do things repeatedly (Stuart, Cor, Heiko)
 - not really accurate across all apps
   - Hard to find out for new users (Jay)
   - Workflow is different and in Writer usually more than one object is added 
 where Draw rather is to manipulate what has been added (Stuart)
   - better to teach users about our good solution (single click = single 
action, double click = sticky) (Heiko)
   => create proposals with pro/cons for the next meeting so a simple decision 
yay/nay is possible

 * Merge cell in dialog (rediscuss)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=101835
   - put the option into format dialog: jay
   - do not: heiko, stuart
   - don't care: cor
   => undecided and half-postponed

 * Open sidebar navigator with F5 (Jay)
   + https://bugs.documentfoundation.org/show_bug.cgi?id=99618
   - long-term vision is to have decks that can be detached from the sidebar,
   - intermediate solution to harmonize behavior is to make F5 showing the 
Navigator in the sidebar (Cor, Jay)
   - have a temporary .uno: command to show the floating navigator
   => thumbs up

 * Dock navigator window by default (Jay, Cor)
  + https://bugs.documentfoundation.org/show_bug.cgi?id=81902
  + https://bugs.documentfoundation.org/show_bug.cgi?id=103579
  - Reopen and fix (Cor, Jay)
  - Docked or undocked, both needs to be known how to switch
  - Docked panel makes the UI jump as it shrinks down the width, 
floating is more functional (Stuart)
  - Jumping UI is less distracting because it's done on purpose (Cor)
  => thumbs up





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


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

2016-11-04 Thread David Tardon
 sc/qa/unit/bugfix-test.cxx  |   14 ++
 sc/qa/unit/data/xml/rhbz1390776.xml |   73 
 2 files changed, 87 insertions(+)

New commits:
commit c52d1403c3b9874bd1454093e0379e8766679609
Author: David Tardon 
Date:   Fri Nov 4 16:06:31 2016 +0100

add test case for rhbz#1390776

Disabled, because the file fails to load for some reason...

Change-Id: Ida79b9de4ff53d76fed86e0495f9479addc228f8

diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index 2cf5b12..aedcea6 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -89,6 +89,7 @@ public:
 void testTdf98657();
 void testTdf88821();
 void testTdf88821_2();
+// void testRhbz1390776();
 
 CPPUNIT_TEST_SUITE(ScFiltersTest);
 CPPUNIT_TEST(testTdf64229);
@@ -100,6 +101,7 @@ public:
 CPPUNIT_TEST(testTdf98657);
 CPPUNIT_TEST(testTdf88821);
 CPPUNIT_TEST(testTdf88821_2);
+// CPPUNIT_TEST(testRhbz1390776);
 CPPUNIT_TEST_SUITE_END();
 private:
 uno::Reference m_xCalcComponent;
@@ -269,6 +271,18 @@ void ScFiltersTest::testTdf88821_2()
 xDocSh->DoClose();
 }
 
+#if 0
+void ScFiltersTest::testRhbz1390776()
+{
+ScDocShellRef xDocSh = loadDoc("rhbz1390776.", FORMAT_XLS_XML);
+ScDocument& rDoc = xDocSh->GetDocument();
+
+ASSERT_FORMULA_EQUAL(rDoc, ScAddress(0, 27, 0), "SUM(A18:A23)", "Wrong 
range");
+
+xDocSh->DoClose();
+}
+#endif
+
 ScFiltersTest::ScFiltersTest()
   : ScBootstrapFixture( "/sc/qa/unit/data" )
 {
diff --git a/sc/qa/unit/data/xml/rhbz1390776.xml 
b/sc/qa/unit/data/xml/rhbz1390776.xml
new file mode 100644
index 000..1418056
--- /dev/null
+++ b/sc/qa/unit/data/xml/rhbz1390776.xml
@@ -0,0 +1,73 @@
+
+
+http://www.w3.org/TR/REC-html40";>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+
+10
+
+
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 4 commits - external/cairo external/postgresql external/python3 RepositoryExternal.mk

 RepositoryExternal.mk |4 ++-
 external/cairo/ExternalProject_cairo.mk   |7 -
 external/postgresql/ExternalProject_postgresql.mk |4 +++
 external/postgresql/UnpackedTarball_postgresql.mk |6 
 external/postgresql/internal-zlib.patch.1 |   29 ++
 external/python3/ExternalProject_python3.mk   |1 
 external/python3/internal-zlib.patch.0|9 ++
 7 files changed, 58 insertions(+), 2 deletions(-)

New commits:
commit 6287b17ce78424ce2cc364761c7605e35f3cc80a
Author: David Tardon 
Date:   Thu Nov 3 17:38:23 2016 +0100

fix build of postgresql with bundled zlib

Change-Id: I8a1a8b8e1437d79d4c262cb8521a1239c250699e

diff --git a/external/postgresql/ExternalProject_postgresql.mk 
b/external/postgresql/ExternalProject_postgresql.mk
index 42fa12f..1148111 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -31,6 +31,10 @@ else
 postgresql_CPPFLAGS := $(ZLIB_CFLAGS)
 postgresql_LDFLAGS  :=
 
+ifeq ($(SYSTEM_ZLIB),)
+postgresql_LDFLAGS += $(ZLIB_LIBS)
+endif
+
 ifeq ($(DISABLE_OPENSSL),)
 ifeq ($(SYSTEM_OPENSSL),)
 postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
diff --git a/external/postgresql/UnpackedTarball_postgresql.mk 
b/external/postgresql/UnpackedTarball_postgresql.mk
index 3d0fe6c..2e41bf6 100644
--- a/external/postgresql/UnpackedTarball_postgresql.mk
+++ b/external/postgresql/UnpackedTarball_postgresql.mk
@@ -19,4 +19,10 @@ $(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
external/postgresql/postgresql-9.2.1-libreoffice.patch \
 ))
 
+ifeq ($(SYSTEM_ZLIB),)
+$(eval $(call gb_UnpackedTarball_add_patches,postgresql, \
+   external/postgresql/internal-zlib.patch.1 \
+))
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/external/postgresql/internal-zlib.patch.1 
b/external/postgresql/internal-zlib.patch.1
new file mode 100644
index 000..ac2b728
--- /dev/null
+++ b/external/postgresql/internal-zlib.patch.1
@@ -0,0 +1,29 @@
+diff -up postgresql/configure.dt postgresql/configure
+--- postgresql/configure.dt2016-11-03 17:34:17.282388226 +0100
 postgresql/configure   2016-11-03 17:34:35.004202484 +0100
+@@ -8566,13 +8566,13 @@ fi
+ 
+ if test "$with_zlib" = yes; then
+ 
+-{ $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
+-$as_echo_n "checking for inflate in -lz... " >&6; }
++{ $as_echo "$as_me:$LINENO: checking for inflate in -lzlib" >&5
++$as_echo_n "checking for inflate in -lzlib... " >&6; }
+ if test "${ac_cv_lib_z_inflate+set}" = set; then
+   $as_echo_n "(cached) " >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+-LIBS="-lz  $LIBS"
++LIBS="-lzlib  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+ _ACEOF
+@@ -8636,7 +8636,7 @@ if test "x$ac_cv_lib_z_inflate" = x""yes
+ #define HAVE_LIBZ 1
+ _ACEOF
+ 
+-  LIBS="-lz $LIBS"
++  LIBS="-lzlib $LIBS"
+ 
+ else
+   { { $as_echo "$as_me:$LINENO: error: zlib library not found
commit b5c566fd1028cf804522e90d2674acf140f52933
Author: David Tardon 
Date:   Thu Nov 3 17:23:56 2016 +0100

fix external def for graphite

Change-Id: I474a7852647fc17597ec3d5a44e1e8dfdc78c0c3

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index e4f592d..b52927a 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1396,7 +1396,9 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
 endef
 
 define gb_ExternalProject__use_graphite
-$(call gb_ExternalProject_use_external_project,$(1),graphite)
+$(call gb_ExternalProject_use_static_libraries,$(1),\
+   graphite \
+)
 
 endef
 endif # SYSTEM_GRAPHITE
commit b2c16b3563a4a8e4b54f6fc0cb1be597e7c5b27d
Author: David Tardon 
Date:   Thu Nov 3 17:16:29 2016 +0100

fix build of bundled python3 with bundled zlib

Change-Id: I383a04ea926187263b1d7e11c548817fa9ca3fb6

diff --git a/external/python3/ExternalProject_python3.mk 
b/external/python3/ExternalProject_python3.mk
index ef9246e..fefdd1a 100644
--- a/external/python3/ExternalProject_python3.mk
+++ b/external/python3/ExternalProject_python3.mk
@@ -99,6 +99,7 @@ $(call gb_ExternalProject_get_state_target,python3,build) :
)" \
&& MAKEFLAGS= $(MAKE) \
$(if $(filter 
MACOSX,$(OS)),DESTDIR=$(EXTERNAL_WORKDIR)/python-inst install) \
+   $(if 
$(SYSTEM_ZLIB),,ZLIB_INCDIR=$(WORKDIR)/UnpackedTarball/zlib) \
&& ln -s build/lib.* LO_lib \
)
 
diff --git a/external/python3/internal-zlib.patch.0 
b/external/python3/internal-zlib.patch.0
index d045f46..abe2630 100644
--- a/external/python3/internal-zlib.patch.0
+++ b/external/python3/internal-zlib.patch.0
@@ -19,6 +19,15 @@
  
 --- setup.py
 +++ setup.py
+@@ -1362,7 +1362,7 @@
+ #
+ # You can upgrade zlib to version 1.1.4 yourself by going to
+ # http://www.gzip.org/zlib/
+-zlib_inc = find_file('zlib.h', [], in

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

 vcl/opengl/salbmp.cxx   |   40 
 vcl/win/gdi/salgdi2.cxx |   67 +---
 2 files changed, 64 insertions(+), 43 deletions(-)

New commits:
commit 6b571ae4608ac15256eb7582f442ce69975370f3
Author: Tomaž Vajngerl 
Date:   Thu Nov 3 23:05:25 2016 +0100

opengl: change from BGRA to  RGBA color arrangement on Windows

BGRA is native color arrangement on Windows however some intel
drivers have problems with large textures if they read from a
BGRA buffer. So with this commit we switch to RGBA color
arrangement. This shouldn't cause much performance differences,
but we need to convert from RGBA to BGRA when printing.

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

diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx
index fde9f19..bce9fb7 100644
--- a/vcl/opengl/salbmp.cxx
+++ b/vcl/opengl/salbmp.cxx
@@ -55,28 +55,16 @@ inline bool determineTextureFormat(sal_uInt16 nBits, 
GLenum& nFormat, GLenum& nT
 nType = GL_UNSIGNED_BYTE;
 return true;
 case 16:
-#ifdef _WIN32
-nFormat = GL_BGR;
-#else
 nFormat = GL_RGB;
-#endif
 nType = GL_UNSIGNED_SHORT_5_6_5;
 return true;
 case 24:
-#ifdef _WIN32
-nFormat = GL_BGR;
-#else
 nFormat = GL_RGB;
-#endif
 nType = GL_UNSIGNED_BYTE;
 return true;
 case 32:
-#ifdef _WIN32
-nFormat = GL_BGRA;
-#else
 nFormat = GL_RGBA;
-#endif
-nType = GL_UNSIGNED_BYTE;
+nType = GL_UNSIGNED_INT_8_8_8_8;
 return true;
 default:
 break;
@@ -783,16 +771,6 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( 
BitmapAccessMode nMode )
 break;
 case 16:
 {
-#ifdef _WIN32
-pBuffer->mnFormat = ScanlineFormat::N16BitTcLsbMask;
-ColorMaskElement aRedMask(0x7c00);
-aRedMask.CalcMaskShift();
-ColorMaskElement aGreenMask(0x03e0);
-aGreenMask.CalcMaskShift();
-ColorMaskElement aBlueMask(0x001f);
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-#else
 pBuffer->mnFormat = ScanlineFormat::N16BitTcMsbMask;
 ColorMaskElement aRedMask(0xf800);
 aRedMask.CalcMaskShift();
@@ -801,30 +779,15 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( 
BitmapAccessMode nMode )
 ColorMaskElement aBlueMask(0x001f);
 aBlueMask.CalcMaskShift();
 pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
-#endif
 break;
 }
 case 24:
 {
-#ifdef _WIN32
-pBuffer->mnFormat = ScanlineFormat::N24BitTcBgr;
-#else
 pBuffer->mnFormat = ScanlineFormat::N24BitTcRgb;
-#endif
 break;
 }
 case 32:
 {
-#ifdef _WIN32
-pBuffer->mnFormat = ScanlineFormat::N32BitTcBgra;
-ColorMaskElement aRedMask(0x00ff);
-aRedMask.CalcMaskShift();
-ColorMaskElement aGreenMask(0xff00);
-aGreenMask.CalcMaskShift();
-ColorMaskElement aBlueMask(0x00ff);
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, aBlueMask);
-#else
 pBuffer->mnFormat = ScanlineFormat::N32BitTcRgba;
 ColorMaskElement aRedMask(0xff00);
 aRedMask.CalcMaskShift();
@@ -833,7 +796,6 @@ BitmapBuffer* OpenGLSalBitmap::AcquireBuffer( 
BitmapAccessMode nMode )
 ColorMaskElement aBlueMask(0xff00);
 aBlueMask.CalcMaskShift();
 pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
-#endif
 break;
 }
 }
diff --git a/vcl/win/gdi/salgdi2.cxx b/vcl/win/gdi/salgdi2.cxx
index 3a49ac5..000746b 100644
--- a/vcl/win/gdi/salgdi2.cxx
+++ b/vcl/win/gdi/salgdi2.cxx
@@ -73,6 +73,45 @@ void WinSalGraphics::copyArea( long nDestX, long nDestY,
 namespace
 {
 
+class ColorScanlineConverter
+{
+public:
+ScanlineFormat meSourceFormat;
+ScanlineFormat meDestinationFormat;
+
+int mnComponentSize;
+int mnComponentExchangeIndex;
+
+long mnScanlineSize;
+
+ColorScanlineConverter(ScanlineFormat eSourceFormat, ScanlineFormat 
eDestinationFormat, int nComponentSize, long nScanlineSize)
+: meSourceFormat(eSourceFormat)
+, meDestinationFormat(eDestinationFormat)
+, mnComponentSize(nComponentSize)
+, mnComponentExchangeIndex(0)
+, mnScanlineSize(nScanlineSize)
+{
+if (meSourceFormat == ScanlineFormat::N32BitTcAbgr ||
+meSourceFormat == ScanlineFormat::N32BitTcArgb)
+{
+mnComponentExchangeIndex = 1;
+}
+}
+
+void convertScanline(sal_uInt8* pSourc

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

 vcl/Package_opengl.mk  |   50 ++---
 vcl/opengl/areaHashCRC64TFragmentShader.glsl   |   87 -
 vcl/opengl/areaScaleFastFragmentShader.glsl|   59 --
 vcl/opengl/areaScaleFragmentShader.glsl|  151 -
 vcl/opengl/blendedTextureFragmentShader.glsl   |   33 ---
 vcl/opengl/blendedTextureVertexShader.glsl |   28 ---
 vcl/opengl/combinedFragmentShader.glsl |   44 
 vcl/opengl/combinedTextureFragmentShader.glsl  |   73 
 vcl/opengl/combinedTextureVertexShader.glsl|   43 
 vcl/opengl/combinedVertexShader.glsl   |   76 
 vcl/opengl/convolutionFragmentShader.glsl  |   30 ---
 vcl/opengl/diffTextureFragmentShader.glsl  |   30 ---
 vcl/opengl/dumbVertexShader.glsl   |   20 --
 vcl/opengl/greyscaleFragmentShader.glsl|   20 --
 vcl/opengl/invert50FragmentShader.glsl |   25 --
 vcl/opengl/lineFragmentShader.glsl |   38 
 vcl/opengl/lineVertexShader.glsl   |   37 
 vcl/opengl/linearGradientFragmentShader.glsl   |   23 --
 vcl/opengl/maskFragmentShader.glsl |   23 --
 vcl/opengl/maskedTextureFragmentShader.glsl|   27 ---
 vcl/opengl/maskedTextureVertexShader.glsl  |   26 --
 vcl/opengl/radialGradientFragmentShader.glsl   |   23 --
 vcl/opengl/replaceColorFragmentShader.glsl |   25 --
 vcl/opengl/shaders/areaHashCRC64TFragmentShader.glsl   |   87 +
 vcl/opengl/shaders/areaScaleFastFragmentShader.glsl|   59 ++
 vcl/opengl/shaders/areaScaleFragmentShader.glsl|  151 +
 vcl/opengl/shaders/blendedTextureFragmentShader.glsl   |   33 +++
 vcl/opengl/shaders/blendedTextureVertexShader.glsl |   28 +++
 vcl/opengl/shaders/combinedFragmentShader.glsl |   44 
 vcl/opengl/shaders/combinedTextureFragmentShader.glsl  |   73 
 vcl/opengl/shaders/combinedTextureVertexShader.glsl|   43 
 vcl/opengl/shaders/combinedVertexShader.glsl   |   76 
 vcl/opengl/shaders/convolutionFragmentShader.glsl  |   30 +++
 vcl/opengl/shaders/diffTextureFragmentShader.glsl  |   30 +++
 vcl/opengl/shaders/dumbVertexShader.glsl   |   20 ++
 vcl/opengl/shaders/greyscaleFragmentShader.glsl|   20 ++
 vcl/opengl/shaders/invert50FragmentShader.glsl |   25 ++
 vcl/opengl/shaders/lineFragmentShader.glsl |   38 
 vcl/opengl/shaders/lineVertexShader.glsl   |   37 
 vcl/opengl/shaders/linearGradientFragmentShader.glsl   |   23 ++
 vcl/opengl/shaders/maskFragmentShader.glsl |   23 ++
 vcl/opengl/shaders/maskedTextureFragmentShader.glsl|   27 +++
 vcl/opengl/shaders/maskedTextureVertexShader.glsl  |   26 ++
 vcl/opengl/shaders/radialGradientFragmentShader.glsl   |   23 ++
 vcl/opengl/shaders/replaceColorFragmentShader.glsl |   25 ++
 vcl/opengl/shaders/solidFragmentShader.glsl|   19 ++
 vcl/opengl/shaders/textureFragmentShader.glsl  |   20 ++
 vcl/opengl/shaders/textureVertexShader.glsl|   22 ++
 vcl/opengl/shaders/transformedTextureVertexShader.glsl |   28 +++
 vcl/opengl/solidFragmentShader.glsl|   19 --
 vcl/opengl/textureFragmentShader.glsl  |   20 --
 vcl/opengl/textureVertexShader.glsl|   22 --
 vcl/opengl/transformedTextureVertexShader.glsl |   28 ---
 53 files changed, 1055 insertions(+), 1055 deletions(-)

New commits:
commit dec5931ede57e1910d3f0ec62f575b027208320f
Author: Tomaž Vajngerl 
Date:   Thu Oct 20 13:05:18 2016 +0200

opengl: move shaders to its own directory

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

diff --git a/vcl/Package_opengl.mk b/vcl/Package_opengl.mk
index 2fa917e..15e3bee 100644
--- a/vcl/Package_opengl.mk
+++ b/vcl/Package_opengl.mk
@@ -7,35 +7,35 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_Package_Package,vcl_opengl_shader,$(SRCDIR)/vcl/opengl))
+$(eval $(call 
gb_Package_Package,vcl_opengl_shader,$(SRCDIR)/vcl/opengl/shaders))
 
 $(eval $(call 
gb_Package_add_files,vcl_opengl_shader,$(LIBO_ETC_FOLDER)/opengl,\
 areaHashCRC64TFragmentShader.glsl \
-   areaScaleFastFragmentShader.glsl \
-   areaScaleFragmentShader.glsl \
-   blendedTextureFragmentShader.glsl \
-   blendedTextureVertexShader.glsl \
-   dumbVertexShader.glsl \
-   diffTextureFragmentShader.glsl \
-   greyscaleFragmentShader.glsl \
+areaScaleFastFragmentShader.glsl \
+areaScaleFragmentShader.glsl \
+blendedTextureFragmentShader.glsl \
+blendedTextureVertexShader.glsl \
+dumbVertexShader.glsl \
+  

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

 include/vcl/image.hxx  |9 -
 vcl/source/image/Image.cxx |   21 -
 vcl/source/image/ImageList.cxx |   28 
 3 files changed, 58 deletions(-)

New commits:
commit 54dc3dd96bf720a81eef81864848e58c5db860f8
Author: Caolán McNamara 
Date:   Fri Nov 4 11:38:06 2016 +

use default copy and assignment operators

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

diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx
index 0ad2f0c..7c4bd09 100644
--- a/include/vcl/image.hxx
+++ b/include/vcl/image.hxx
@@ -46,14 +46,12 @@ class VCL_DLLPUBLIC Image
 public:
 Image();
 explicit Image( const ResId& rResId );
-Image( const Image& rImage );
 explicit Image( const BitmapEx& rBitmapEx );
 explicit Image( const Bitmap& rBitmap );
 Image( const Bitmap& rBitmap, const Bitmap& rMaskBitmap );
 Image( const Bitmap& rBitmap, const Color& rColor );
 explicit Image( const css::uno::Reference< 
css::graphic::XGraphic >& rxGraphic );
 explicit Image( const OUString &rPNGFileUrl );
-~Image();
 
 SizeGetSizePixel() const;
 
@@ -61,8 +59,6 @@ public:
 css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const;
 
 booloperator!() const { return !mpImplData; }
-Image&  operator=( const Image& rImage );
-Image&  operator=( Image&& rImage );
 booloperator==( const Image& rImage ) const;
 booloperator!=( const Image& rImage ) const { return 
!(Image::operator==( rImage )); }
 
@@ -82,9 +78,6 @@ public:
 explicit ImageList( const ResId& rResId );
 ImageList( const std::vector& rNameVector,
const OUString& rPrefix);
-ImageList( const ImageList& rImageList );
-ImageList( ImageList&& rImageList );
-~ImageList();
 
 voidInsertFromHorizontalStrip( const BitmapEx 
&rBitmapEx,
const std::vector< OUString > &rNameVector 
);
@@ -116,8 +109,6 @@ public:
 OUStringGetImageName( sal_uInt16 nPos ) const;
 voidGetImageNames( ::std::vector< OUString >& rNames ) const;
 
-ImageList&  operator=( const ImageList& rImageList );
-ImageList&  operator=( ImageList&& rImageList );
 booloperator==( const ImageList& rImageList ) const;
 booloperator!=( const ImageList& rImageList ) const { return 
!(ImageList::operator==( rImageList )); }
 
diff --git a/vcl/source/image/Image.cxx b/vcl/source/image/Image.cxx
index bc767ce..22b6fbc 100644
--- a/vcl/source/image/Image.cxx
+++ b/vcl/source/image/Image.cxx
@@ -67,11 +67,6 @@ Image::Image( const ResId& rResId )
 }
 }
 
-Image::Image(const Image& rImage)
-: mpImplData(rImage.mpImplData)
-{
-}
-
 Image::Image(const BitmapEx& rBitmapEx)
 {
 ImplInit(rBitmapEx);
@@ -112,10 +107,6 @@ Image::Image(const OUString & rFileUrl)
 }
 }
 
-Image::~Image()
-{
-}
-
 void Image::ImplInit(const BitmapEx& rBitmapEx)
 {
 if (!rBitmapEx.IsEmpty())
@@ -156,18 +147,6 @@ css::uno::Reference< css::graphic::XGraphic > 
Image::GetXGraphic() const
 return aGraphic.GetXGraphic();
 }
 
-Image& Image::operator=(const Image& rImage)
-{
-mpImplData = rImage.mpImplData;
-return *this;
-}
-
-Image& Image::operator=(Image&& rImage)
-{
-std::swap(mpImplData, rImage.mpImplData);
-return *this;
-}
-
 bool Image::operator==(const Image& rImage) const
 {
 bool bRet = false;
diff --git a/vcl/source/image/ImageList.cxx b/vcl/source/image/ImageList.cxx
index 42def4e..29bdbc0 100644
--- a/vcl/source/image/ImageList.cxx
+++ b/vcl/source/image/ImageList.cxx
@@ -88,21 +88,6 @@ ImageList::ImageList(const std::vector< OUString >& 
rNameVector,
 }
 }
 
-ImageList::ImageList( const ImageList& rImageList )
-: mpImplData(rImageList.mpImplData)
-{
-}
-
-ImageList::ImageList( ImageList&& rImageList )
-: mpImplData(rImageList.mpImplData)
-{
-rImageList.mpImplData.reset();
-}
-
-ImageList::~ImageList()
-{
-}
-
 void ImageList::ImplInit( sal_uInt16 nItems, const Size &rSize )
 {
 mpImplData.reset(new ImplImageList);
@@ -373,19 +358,6 @@ Size ImageList::GetImageSize() const
 return aRet;
 }
 
-ImageList& ImageList::operator=( const ImageList& rImageList )
-{
-mpImplData = rImageList.mpImplData;
-return *this;
-}
-
-ImageList& ImageList::operator=( ImageList&& rImageList )
-{
-mpImplData = rImageList.mpImplData;
-rImageList.mpImplData = nullptr;
-return *this;
-}
-
 bool ImageList::operator==( const Ima

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

 sc/inc/columnspanset.hxx  |3 +++
 sc/source/core/data/column2.cxx   |3 +++
 sc/source/core/data/columnspanset.cxx |7 +++
 3 files changed, 13 insertions(+)

New commits:
commit 44523738f094ff3987e85ea0c47b8c636bbe5786
Author: Eike Rathke 
Date:   Fri Nov 4 17:44:52 2016 +0100

bail out early in ScColumn::UpdateSelectionFunction() if nothing is marked

... which happens if there are multi-marks in non-adjacent columns.

Change-Id: Ic8cf0fb0071f793fa91c506a56b01f2833fe5cec

diff --git a/sc/inc/columnspanset.hxx b/sc/inc/columnspanset.hxx
index 7b42979..fc6f5d4 100644
--- a/sc/inc/columnspanset.hxx
+++ b/sc/inc/columnspanset.hxx
@@ -149,6 +149,9 @@ public:
 
 void swap( SingleColumnSpanSet& r );
 
+/** Whether there isn't any row tagged. */
+bool empty() const;
+
 private:
 ColumnSpansType maSpans;
 };
diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 5567133..f86d23e 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -3212,6 +3212,9 @@ void ScColumn::UpdateSelectionFunction(
 sc::SingleColumnSpanSet aSpanSet;
 aSpanSet.scan(rRanges, nTab, nCol); // mark all selected rows.
 
+if (aSpanSet.empty())
+return; // nothing to do, bail out
+
 // Exclude all hidden rows.
 ScFlatBoolRowSegments::RangeData aRange;
 SCROW nRow = 0;
diff --git a/sc/source/core/data/columnspanset.cxx 
b/sc/source/core/data/columnspanset.cxx
index f5a224f..255c6fa 100644
--- a/sc/source/core/data/columnspanset.cxx
+++ b/sc/source/core/data/columnspanset.cxx
@@ -381,6 +381,13 @@ void SingleColumnSpanSet::swap( SingleColumnSpanSet& r )
 maSpans.swap(r.maSpans);
 }
 
+bool SingleColumnSpanSet::empty() const
+{
+// Empty if there's only the 0..MAXROW span with false.
+ColumnSpansType::const_iterator it = maSpans.begin();
+return (it->first == 0) && (it->second == false) && (++it != 
maSpans.end()) && (it->first == MAXROWCOUNT);
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 12 commits - chart2/source chart2/uiconfig cui/source cui/uiconfig extensions/source extras/source include/sfx2 include/svtools include/svx reportdesign/inc reportdesig

 chart2/source/controller/dialogs/dlg_View3D.cxx  |4 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |   30 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.hxx |   11 
 chart2/source/controller/inc/dlg_View3D.hxx  |3 
 chart2/source/controller/main/ChartController_Properties.cxx |2 
 chart2/source/controller/sidebar/ChartColorWrapper.cxx   |4 
 chart2/source/controller/sidebar/ChartColorWrapper.hxx   |3 
 chart2/uiconfig/ui/tp_3D_SceneIllumination.ui|4 
 cui/source/inc/border.hxx|7 
 cui/source/inc/chardlg.hxx   |   11 
 cui/source/inc/cuires.hrc|1 
 cui/source/inc/cuitabarea.hxx|   24 
 cui/source/inc/cuitabline.hxx|5 
 cui/source/inc/numpages.hxx  |6 
 cui/source/options/optchart.cxx  |  107 ++
 cui/source/options/optchart.hxx  |   15 
 cui/source/options/optcolor.cxx  |   93 --
 cui/source/tabpages/backgrnd.cxx |2 
 cui/source/tabpages/border.cxx   |   58 -
 cui/source/tabpages/borderconn.cxx   |   13 
 cui/source/tabpages/borderconn.hxx   |4 
 cui/source/tabpages/chardlg.cxx  |  166 
 cui/source/tabpages/numpages.cxx |   32 
 cui/source/tabpages/strings.src  |4 
 cui/source/tabpages/tpgradnt.cxx |   56 -
 cui/source/tabpages/tphatch.cxx  |   55 -
 cui/source/tabpages/tpline.cxx   |   30 
 cui/source/tabpages/tppattern.cxx|   58 -
 cui/source/tabpages/tpshadow.cxx |   35 
 cui/uiconfig/ui/borderpage.ui|4 
 cui/uiconfig/ui/colorconfigwin.ui|   92 +-
 cui/uiconfig/ui/effectspage.ui   |6 
 cui/uiconfig/ui/gradientpage.ui  |4 
 cui/uiconfig/ui/hatchpage.ui |4 
 cui/uiconfig/ui/linetabpage.ui   |2 
 cui/uiconfig/ui/numberingoptionspage.ui  |2 
 cui/uiconfig/ui/optchartcolorspage.ui|3 
 cui/uiconfig/ui/patterntabpage.ui|4 
 cui/uiconfig/ui/shadowtabpage.ui |2 
 extensions/source/propctrlr/commoncontrol.cxx|5 
 extensions/source/propctrlr/commoncontrol.hxx|   19 
 extensions/source/propctrlr/standardcontrol.cxx  |  109 --
 extensions/source/propctrlr/standardcontrol.hxx  |   24 
 extras/source/glade/libreoffice-catalog.xml.in   |   22 
 include/sfx2/controlwrapper.hxx  |   22 
 include/svtools/ctrlbox.hxx  |   82 --
 include/svtools/svtools.hrc  |2 
 include/svx/PaletteManager.hxx   |   11 
 include/svx/bmpmask.hxx  |   15 
 include/svx/colorbox.hxx |   94 ++
 include/svx/colorwindow.hxx  |   48 -
 include/svx/dialogs.hrc  |7 
 include/svx/dlgctrl.hxx  |   16 
 include/svx/float3d.hxx  |   34 
 include/svx/fontwork.hxx |9 
 include/svx/sidebar/AreaPropertyPanelBase.hxx|6 
 include/svx/svxids.hrc   |6 
 include/svx/tbcontrl.hxx |   16 
 reportdesign/inc/RptResId.hrc|4 
 reportdesign/inc/helpids.hrc |1 
 reportdesign/source/ui/dlg/CondFormat.src|   16 
 reportdesign/source/ui/dlg/Condition.cxx |  174 
 reportdesign/source/ui/dlg/Condition.hxx |   18 
 sc/inc/sc.hrc|2 
 sc/source/ui/condformat/colorformat.cxx  |   57 -
 sc/source/ui/condformat/condformatdlgentry.cxx   |   79 --
 sc/source/ui/dbgui/scendlg.cxx   |   22 
 sc/source/ui/drawfunc/drawsh4.cxx|   25 
 sc/source/ui/drawfunc/drtxtob2.cxx   |   25 
 sc/source/ui/inc/colorformat.hxx |8 
 sc/source/ui/inc/condformatdlgentry.hxx  |   11 
 

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

 cui/source/tabpages/tabarea.cxx  |1 -
 cui/source/tabpages/tabline.cxx  |1 -
 cui/source/tabpages/tpshadow.cxx |1 -
 3 files changed, 3 deletions(-)

New commits:
commit f9a2c1c12ecad833c63b894c89d6008907477eb5
Author: Caolán McNamara 
Date:   Fri Nov 4 17:23:49 2016 +

SvxShadowTabPage::Construct was removed

Change-Id: Iaaa303dac79556d43cda78363abbcdd03e977e8a

diff --git a/cui/source/tabpages/tabarea.cxx b/cui/source/tabpages/tabarea.cxx
index 6acbf08..72538f0 100644
--- a/cui/source/tabpages/tabarea.cxx
+++ b/cui/source/tabpages/tabarea.cxx
@@ -266,7 +266,6 @@ void SvxAreaTabDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 {
 static_cast(rPage).SetColorList( mpColorList );
 static_cast(rPage).SetColorChgd( 
&mnColorListState );
-static_cast(rPage).Construct();
 }
 else if (nId == m_nTransparenceTabPage)
 {
diff --git a/cui/source/tabpages/tabline.cxx b/cui/source/tabpages/tabline.cxx
index b9efb53..e8d080e 100644
--- a/cui/source/tabpages/tabline.cxx
+++ b/cui/source/tabpages/tabline.cxx
@@ -235,7 +235,6 @@ void SvxLineTabDialog::PageCreated( sal_uInt16 nId, 
SfxTabPage &rPage )
 static_cast(rPage).SetDlgType( 0 );
 static_cast(rPage).SetAreaTP( &mbAreaTP );
 static_cast(rPage).SetColorChgd( &mnColorListState 
);
-static_cast(rPage).Construct();
 }
 }
 
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index fa46ea2..84179d2 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -526,7 +526,6 @@ void SvxShadowTabPage::PageCreated(const SfxAllItemSet& 
aSet)
 SetPageType((PageType) pPageTypeItem->GetValue());
 if (pDlgTypeItem)
 SetDlgType(pDlgTypeItem->GetValue());
-Construct();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: 32-bit Clang Release Builds failing ww8export Unit Tests

It turns out this was a compiler bug that's also affecting FreeBSD. The LLVM 
developers are asking for help with a reproducer.  If you have any suggestions, 
the bug report is here:

https://llvm.org/bugs/show_bug.cgi?id=30904

I bisected the regression in clang and it turns out this was an optimization 
issue.  So it looks like there is a bug with '--enable-symbols' disabling 
optimizations, at least with clang.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: A proposal for standardizing TSV files

Thank you. I read the W3C recommendation, as well as the referenced
documents. I drafted a comparison here:
  https://github.com/pmitros/tsvx/blob/master/doc_source/related_formats.md

I think the standards are trying to do something a bit different, and are
actually pretty complementary. tsvx is designed to facilitate compatibility
between applications for internal data analysis and BI work. It is a
prescriptive standard. It says how files ought to be escaped and formatted.
The W3C CSV for the Web group appears to be doing exactly what name implies
-- provide descriptive metadata for public redistribution of datasets on
the web, especially for use on the semantic web. It is a descriptive
standard designed to work with all essentially all tabular data files. A
tsvx file could certainly be described with the W3C metadata if the
intention were external distribution.

Just to give the types of use cases I have internally:

   - I have pipelines where I might have a dozen TSV files generated by
   scripts working on data from MySQL, Vertica, and spreadsheets, all feeding
   back to create reports. Before I switched to tsvx, scripts were brittle to
   fairly modest format changes (e.g. adding a column), and had a bunch of
   unnecessary logic parsing data types.
   - Each time I import something into a tool I didn't create, I need to
   click through a dialog letting it know what the delimiter is, and in
   LibreOffice, reformat column types.

Adding W3C metadata files would add overhead for this type of work, rather
than reducing it, and would only provide benefit at the stage of the final
results.

Piotr

On Thu, Nov 3, 2016 at 10:35 AM, Eike Rathke  wrote:

> Hi Piotr,
>
> On Thursday, 2016-11-03 08:08:23 -0400, Piotr Mitros wrote:
>
> > I do a fair bit of work where I move data between LibreOffice, MySQL,
> > Vertica, Google Docs, Hadoop, Python, and a few other systems. The
> > formatting of TSV files is ad-hoc. Each system has little differences in
> > how strings are escaped, and similar. In addition, there is no way to
> > preserve metadata.
> >
> > I drafted a modest proposed spec for standardizing TSV files by
> > standardizing types, and adding metadata, and was hoping to solicit
> > feedback on that proposal:
> >
> > http://www.tsvx.org/
>
> It seems to me you're attempting to reinvent a wheel. I suggest you take
> a look at https://www.w3.org/standards/techs/csv and maybe
> https://www.w3.org/community/csvw/
>
>   Eike
>
> --
> LibreOffice Calc developer. Number formatter stricken i18n
> transpositionizer.
> GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563
> 2D3A
> Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
> Care about Free Software, support the FSFE https://fsfe.org/support/?erack
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

 vcl/source/gdi/CommonSalLayout.cxx |   11 +--
 1 file changed, 1 insertion(+), 10 deletions(-)

New commits:
commit 4e59168ef004e7520ea7d78237a18208216a757c
Author: Khaled Hosny 
Date:   Fri Nov 4 23:39:38 2016 +0200

tdf#103710: rotate all glyphs in vertical runs

So that we base the rotation or not based on the resolved script,
instead of using the outdated and hard-coded ranges in GetVerticalFlags.

Change-Id: I52ee38c4151f30d98287e64f852b4d2df143c719

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index bcd8c78..a6cf739 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -545,16 +545,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
 DeviceCoordinate nAdvance, nXOffset, nYOffset;
 if (bVertical)
 {
-int nVertFlag;
-#if 0   /* XXX: does not work as expected for Common script */
-UErrorCode error = U_ZERO_ERROR;
-nVertFlag = 
GetVerticalFlagsForScript(uscript_getScript(aChar, &error));
-#else
-nVertFlag = GetVerticalFlags(aChar);
-if (nVertFlag == GF_ROTR)
-nVertFlag = GF_ROTL;
-#endif
-nGlyphIndex |= nVertFlag;
+nGlyphIndex |= GF_ROTL;
 nAdvance = -pHbPositions[i].y_advance * nYScale;
 nXOffset =  pHbPositions[i].y_offset * nYScale;
 nYOffset = -pHbPositions[i].x_offset * nXScale;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 vcl/source/gdi/CommonSalLayout.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5b389c32eb3928c59387c2d6d48667632d7e9206
Author: Khaled Hosny 
Date:   Fri Nov 4 23:46:22 2016 +0200

tdf#100936: Add Tangut to vertical scripts

Change-Id: I0ac8be9f129636fae2be03f60a4e9b8a65a195e9

diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index a6cf739..cb82bfa 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -340,6 +340,7 @@ static int GetVerticalFlagsForScript(UScriptCode aScript)
 case USCRIPT_KATAKANA:
 case USCRIPT_MEROITIC_CURSIVE:
 case USCRIPT_MEROITIC_HIEROGLYPHS:
+case USCRIPT_TANGUT:
 case USCRIPT_YI:
 nFlag = GF_ROTL;
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 sw/source/uibase/sidebar/PageMarginControl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 19fa8aae970f66a808a3757b0de34fa9caee2ec4
Author: Szymon Kłos 
Date:   Fri Nov 4 14:26:02 2016 +0100

tdf#93520 : Mirrored page margin tooltip

Change-Id: I5cf0c7eeba204d4493ae1f4229718faf870a5528
Reviewed-on: https://gerrit.libreoffice.org/30570
Reviewed-by: Szymon Kłos 
Tested-by: Szymon Kłos 

diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx 
b/sw/source/uibase/sidebar/PageMarginControl.cxx
index 90d7e67..fca7784 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -334,7 +334,7 @@ void PageMarginControl::FillHelpText( const bool 
bUserCustomValuesAvailable )
 aHelpText = aInner;
 aHelpText += aWide3ValText;
 aHelpText += aOuter;
-aHelpText += aWide3ValText;
+aHelpText += aWide1ValText;
 aHelpText += aTop;
 aHelpText += aWide1ValText;
 aHelpText += aBottom;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 include/comphelper/package/ZipPackageHelper.hxx |   57 
 1 file changed, 57 deletions(-)

New commits:
commit 32bdc5097013e7efd9c85e1b8df697880e66e925
Author: Jan Holesovsky 
Date:   Fri Nov 4 19:52:14 2016 +0100

We have exactly the same file as include/unotools/ZipPackageHelper.hxx.

Change-Id: I2cc545c50a8ae936e73ff23a200f350809ab8335

diff --git a/include/comphelper/package/ZipPackageHelper.hxx 
b/include/comphelper/package/ZipPackageHelper.hxx
deleted file mode 100644
index 2cdd5db..000
--- a/include/comphelper/package/ZipPackageHelper.hxx
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_COMPHELPER_PACKAGE_ZIPPACKAGEHELPER_HXX
-#define INCLUDED_COMPHELPER_PACKAGE_ZIPPACKAGEHELPER_HXX
-
-#include 
-#include 
-#include 
-#include 
-#include 
-
-
-class ZipPackageHelper
-{
-public:
-ZipPackageHelper( const css::uno::Reference< css::uno::XComponentContext 
>& rxContext,
-const OUString& sPackageURL);
-
-void savePackage();
-
-void addFile( const OUString& rSourceFile )
-throw( css::uno::Exception, std::exception );
-
-void addStream( css::uno::Reference< css::io::XInputStream > const & 
xInput,
-const OUString& aName ) throw( css::uno::Exception );
-
-css::uno::Reference< css::uno::XInterface > addFolder( const OUString& 
rName )
-throw( css::uno::Exception, std::exception );
-
-void addFolderWithContent( const OUString& rDirURL );
-
-private:
-css::uno::Reference< css::uno::XComponentContext > mxContext;
-css::uno::Reference< css::container::XHierarchicalNameAccess > 
mxHNameAccess;
-css::uno::Reference< css::lang::XSingleServiceFactory > mxFactory;
-css::uno::Reference< css::uno::XInterface > mxRootFolder;
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 starmath/source/commands.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 239b662753bee4148cac51268cb203c7527036be
Author: Takeshi Abe 
Date:   Fri Nov 4 12:15:06 2016 +0900

tdf#102007 Surround widebslash's placeholders with braces

like wideslash's.

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

diff --git a/starmath/source/commands.src b/starmath/source/commands.src
index 6fb8ba5..f28d067 100644
--- a/starmath/source/commands.src
+++ b/starmath/source/commands.src
@@ -1063,7 +1063,7 @@ String RID_XWIDESLASHY_HELP
 {
 Text [ en-US ] = "Division (wideslash)" ;
 };
-String RID_XWIDEBSLASHY { Text = " widebslash  " ; };
+String RID_XWIDEBSLASHY { Text = "{} widebslash {} " ; };
 String RID_XWIDEBSLASHY_HELP
 {
 Text [ en-US ] = "Division (counter wideslash)" ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 starmath/source/commands.src |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6984fd5a756f1e01e94da14f01df5a0e20791630
Author: Takeshi Abe 
Date:   Fri Nov 4 12:21:04 2016 +0900

tdf#102008 Drop whitespace between "fact" and brace

for consistency with "abs{}", "sqrt{}", etc.

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

diff --git a/starmath/source/commands.src b/starmath/source/commands.src
index f28d067..0df9c4e 100644
--- a/starmath/source/commands.src
+++ b/starmath/source/commands.src
@@ -277,7 +277,7 @@ String RID_ABSX_HELP
 {
 Text [ en-US ] = "Absolute Value" ;
 };
-String RID_FACTX{ Text = "fact {} " ; };
+String RID_FACTX{ Text = "fact{} " ; };
 String RID_FACTX_HELP
 {
 Text [ en-US ] = "Factorial" ;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 vcl/inc/sallayout.hxx  |1 +
 vcl/source/gdi/CommonSalLayout.cxx |5 +
 vcl/source/gdi/sallayout.cxx   |   23 +++
 3 files changed, 29 insertions(+)

New commits:
commit d9ea614a1e7c29bb6831822dc6fc29657d40bdd9
Author: Khaled Hosny 
Date:   Sat Nov 5 05:19:31 2016 +0200

Validate Kashida positions with font fallback

MultiSalLayout did not implement IsKashidaPosValid() which meant that
whenever there is a font fallback no Kashida validation was performed.

Change-Id: I30e498c356c49b0c06dd6b45187105f6bd758a24

diff --git a/vcl/inc/sallayout.hxx b/vcl/inc/sallayout.hxx
index 364bd48..2a76e11 100644
--- a/vcl/inc/sallayout.hxx
+++ b/vcl/inc/sallayout.hxx
@@ -243,6 +243,7 @@ public:
int&, DeviceCoordinate* pGlyphAdvAry = 
nullptr, int* pCharPosAry = nullptr,
const PhysicalFontFace** pFallbackFonts = 
nullptr ) const override;
 virtual boolGetOutline( SalGraphics&, basegfx::B2DPolyPolygonVector& ) 
const override;
+virtual boolIsKashidaPosValid(int nCharPos) const override;
 
 // used only by OutputDevice::ImplLayout, TODO: make friend
 explicitMultiSalLayout( SalLayout& rBaseLayout );
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index cb82bfa..e7ed549 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -751,6 +751,11 @@ bool CommonSalLayout::IsKashidaPosValid(int nCharPos) const
 {
 if (pIter->mnCharPos == nCharPos)
 {
+// If the character was not supported by this layout, return false
+// so that fallback layouts would be checked for it.
+if (pIter->maGlyphId == 0)
+break;
+
 // Search backwards for previous glyph belonging to a different
 // character. We are looking backwards because we are dealing with
 // RTL glyphs, which will be in visual order.
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index ef9bbc0..0034bca 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -2027,6 +2027,29 @@ bool MultiSalLayout::GetOutline( SalGraphics& rGraphics,
 return bRet;
 }
 
+bool MultiSalLayout::IsKashidaPosValid(int nCharPos) const
+{
+// Check the base layout
+bool bValid = mpLayouts[0]->IsKashidaPosValid(nCharPos);
+
+// If base layout returned false, it might be because the character was not
+// supported there, so we check fallback layouts.
+if (!bValid)
+{
+for (int i = 1; i < mnLevel; ++i)
+{
+// - 1 because there is no fallback run for the base layout, IIUC.
+if (maFallbackRuns[i - 1].PosIsInAnyRun(nCharPos))
+{
+bValid = mpLayouts[i]->IsKashidaPosValid(nCharPos);
+break;
+}
+}
+}
+
+return bValid;
+}
+
 std::shared_ptr SalLayout::CreateTextLayoutCache(
 OUString const&) const
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |3 ---
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx |4 
 sw/qa/extras/ooxmlexport/ooxmlexport4.cxx |4 
 sw/qa/extras/ooxmlexport/ooxmlexport5.cxx |4 
 sw/qa/extras/ooxmlexport/ooxmlexport7.cxx |1 -
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |1 -
 6 files changed, 17 deletions(-)

New commits:
commit 570e8488b5cee5cc4c931c3468490acd6cab27cf
Author: Justin Luth 
Date:   Fri Nov 4 17:07:03 2016 +0300

ooxmlexport*: cleanup - remove unnecessary "crop" lines

Change-Id: I2bf5b6c0d68ea8fbe57d9d1240564631e4a2da12
Reviewed-on: https://gerrit.libreoffice.org/30577
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index a6cf96f..b05770b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -35,9 +35,6 @@ protected:
 const char* aBlacklist[] = {
 "math-escape.docx",
 "math-mso2k7.docx",
-"ImageCrop.docx",
-"test_GIF_ImageCrop.docx",
-"test_PNG_ImageCrop.docx"
 };
 std::vector vBlacklist(aBlacklist, aBlacklist + 
SAL_N_ELEMENTS(aBlacklist));
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index 85266bf..80b5bba 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -68,9 +67,6 @@ protected:
 const char* aBlacklist[] = {
 "math-escape.docx",
 "math-mso2k7.docx",
-"ImageCrop.docx",
-"test_GIF_ImageCrop.docx",
-"test_PNG_ImageCrop.docx"
 };
 std::vector vBlacklist(aBlacklist, aBlacklist + 
SAL_N_ELEMENTS(aBlacklist));
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index d08d751..d777cd5 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -33,7 +33,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -66,9 +65,6 @@ protected:
 const char* aBlacklist[] = {
 "math-escape.docx",
 "math-mso2k7.docx",
-"ImageCrop.docx",
-"test_GIF_ImageCrop.docx",
-"test_PNG_ImageCrop.docx"
 };
 std::vector vBlacklist(aBlacklist, aBlacklist + 
SAL_N_ELEMENTS(aBlacklist));
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index d4c9976..8e6714e 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -32,7 +32,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -68,9 +67,6 @@ protected:
 const char* aBlacklist[] = {
 "math-escape.docx",
 "math-mso2k7.docx",
-"ImageCrop.docx",
-"test_GIF_ImageCrop.docx",
-"test_PNG_ImageCrop.docx"
 };
 std::vector vBlacklist(aBlacklist, aBlacklist + 
SAL_N_ELEMENTS(aBlacklist));
 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
index a7ad465..b538e9f 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index a7cfd8d..eff96c7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -59,7 +59,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

 sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt |binary
 sw/qa/extras/ooxmlexport/ooxmlexport9.cxx|6 ++
 sw/qa/extras/ww8export/data/tdf41542_borderlessPadding.odt   |binary
 sw/qa/extras/ww8export/ww8export2.cxx|6 ++
 sw/source/filter/ww8/docxattributeoutput.cxx |4 ++--
 sw/source/filter/ww8/writerwordglue.cxx  |4 ++--
 sw/source/filter/ww8/ww8atr.cxx  |4 ++--
 7 files changed, 18 insertions(+), 6 deletions(-)

New commits:
commit 67e385ac8dfd804015c8b6199865b71ab6e927b4
Author: Justin Luth 
Date:   Wed Nov 2 10:13:49 2016 +0300

tdf#41542 MSWordExport: accommodate page's borderless padding

Honor the padding value even if the border is not visible. This is
needed both for ODT->DOC(X) (starting in LO5.4), authoring documents
DOC(X) files from within LO (starting in LO5.3), or round-tripping
current documents created in some other WordProcessor that produces
valid ODT documents with borderless padding.

Change-Id: I2d653f2c8d3ad22f86384ad17d3a0b8c89738f60
Reviewed-on: https://gerrit.libreoffice.org/30512
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 

diff --git a/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt 
b/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt
new file mode 100644
index 000..9585041
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf41542_borderlessPadding.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
index a580bc9..48bd118 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx
@@ -55,6 +55,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89377, 
"tdf89377_tableWithBreakBeforeParaStyle.d
 CPPUNIT_ASSERT_EQUAL( 3, getPages() );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf41542_borderlessPadding, 
"tdf41542_borderlessPadding.odt")
+{
+// the page style's borderless padding should force this to 3 pages, not 1
+CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf103389, "tdf103389.docx")
 {
 xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/qa/extras/ww8export/data/tdf41542_borderlessPadding.odt 
b/sw/qa/extras/ww8export/data/tdf41542_borderlessPadding.odt
new file mode 100644
index 000..9585041
Binary files /dev/null and 
b/sw/qa/extras/ww8export/data/tdf41542_borderlessPadding.odt differ
diff --git a/sw/qa/extras/ww8export/ww8export2.cxx 
b/sw/qa/extras/ww8export/ww8export2.cxx
index 50aad0f..9e12ee9 100644
--- a/sw/qa/extras/ww8export/ww8export2.cxx
+++ b/sw/qa/extras/ww8export/ww8export2.cxx
@@ -27,6 +27,12 @@ public:
 }
 
 };
+DECLARE_WW8EXPORT_TEST(testTdf41542_borderlessPadding, 
"tdf41542_borderlessPadding.odt")
+{
+// the page style's borderless padding should force this to 3 pages, not 1
+CPPUNIT_ASSERT_EQUAL( 3, getPages() );
+}
+
 
 DECLARE_WW8EXPORT_TEST(testTdf89377, 
"tdf89377_tableWithBreakBeforeParaStyle.doc")
 {
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 1d90898..09e1172 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7307,8 +7307,8 @@ void DocxAttributeOutput::FormatLRSpace( const 
SvxLRSpaceItem& rLRSpace )
 const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
 if ( pItem )
 {
-m_pageMargins.nPageMarginRight = static_cast(pItem)->CalcLineSpace( SvxBoxItemLine::LEFT );
-m_pageMargins.nPageMarginLeft = static_cast(pItem)->CalcLineSpace( SvxBoxItemLine::RIGHT );
+m_pageMargins.nPageMarginRight = static_cast(pItem)->CalcLineSpace( SvxBoxItemLine::LEFT, /*bEvenIfNoLine*/true 
);
+m_pageMargins.nPageMarginLeft = static_cast(pItem)->CalcLineSpace( SvxBoxItemLine::RIGHT, 
/*bEvenIfNoLine*/true );
 }
 else
 m_pageMargins.nPageMarginLeft = m_pageMargins.nPageMarginRight = 0;
diff --git a/sw/source/filter/ww8/writerwordglue.cxx 
b/sw/source/filter/ww8/writerwordglue.cxx
index 773e167..7e64c7f 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -394,8 +394,8 @@ namespace sw
 {
 if (const SvxBoxItem *pBox = rPage.GetItem(RES_BOX))
 {
-dyaHdrTop = pBox->CalcLineSpace(SvxBoxItemLine::TOP);
-dyaHdrBottom = pBox->CalcLineSpace(SvxBoxItemLine::BOTTOM);
+dyaHdrTop = pBox->CalcLineSpace( SvxBoxItemLine::TOP, 
/*bEvenIfNoLine*/true );
+dyaHdrBottom = pBox->CalcLineSpace( SvxBoxItemLine::BOTTOM, 
/*bEvenIfNoLine*/true );
 }
 else
 {
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 0f6b04d..4ff302d 100644
--- a/sw/source/filter/ww8/ww8atr.c