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

2016-05-30 Thread Noel Grandin
 compilerplugins/clang/unusedmethods.py |1 +
 include/vcl/salnativewidgets.hxx   |1 +
 2 files changed, 2 insertions(+)

New commits:
commit e48a13af9f48155cd35e3081a8afd53c1f5e6398
Author: Noel Grandin 
Date:   Tue May 31 08:47:19 2016 +0200

fix KDE4 build

after 3d7325898547c94826cfdd "loplugin:unusedmethods"

Change-Id: I32303948c5046b2880cd4e64cada32ea776a0861

diff --git a/compilerplugins/clang/unusedmethods.py 
b/compilerplugins/clang/unusedmethods.py
index a4717c9..64b8298 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -49,6 +49,7 @@ unusedMethodsExclusionSet = set([
 "void OpenGLContext::requestSingleBufferedRendering()",
"_Bool TabitemValue::isBothAligned() const",
"_Bool TabitemValue::isNotAligned() const",
+   "void TabitemValue::isLast() const",
"void StyleSettings::SetSpinSize(long)",
"void StyleSettings::SetFloatTitleHeight(long)",
 "void StyleSettings::SetTitleHeight(long)",
diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 80aac4e..88f1ae0 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -448,6 +448,7 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue
 bool isBothAligned() const  { return isLeftAligned() && 
isRightAligned(); }
 bool isNotAligned() const   { return !(mnAlignment & 
(TabitemFlags::LeftAligned | TabitemFlags::RightAligned)); }
 bool isFirst() const{ return bool(mnAlignment & 
TabitemFlags::FirstInGroup); }
+bool isLast() const { return bool(mnAlignment & 
TabitemFlags::LastInGroup); }
 const Rectangle& getContentRect() const { return maContentRect; }
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 include/comphelper/extract.hxx |   29 +
 sd/source/ui/unoidl/unoobj.cxx |2 +-
 2 files changed, 10 insertions(+), 21 deletions(-)

New commits:
commit 6cf436799cb145c61f8324c074541950ee1a23e8
Author: Stephan Bergmann 
Date:   Tue May 31 08:47:05 2016 +0200

More comphelper/extract.hxx clean up

Change-Id: I36c1ebea58bcd32b65a48d3447c106aeecdac230

diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx
index 2b5ae0a..36597f8 100644
--- a/include/comphelper/extract.hxx
+++ b/include/comphelper/extract.hxx
@@ -53,11 +53,11 @@ inline css::uno::Any SAL_CALL int2enum(
  * @param rAny  enum or int
  * @param sal_True if enum or int value was set else sal_False.
  */
-inline bool SAL_CALL enum2int( sal_Int32 & rnEnum, const css::uno::Any & rAny )
+inline bool enum2int( sal_Int32 & rnEnum, const css::uno::Any & rAny )
 {
 if (rAny.getValueTypeClass() == css::uno::TypeClass_ENUM)
 {
-rnEnum = * static_cast< const int * >( rAny.getValue() );
+rnEnum = * static_cast< const sal_Int32 * >( rAny.getValue() );
 return true;
 }
 
@@ -72,7 +72,7 @@ inline bool SAL_CALL enum2int( sal_Int32 & rnEnum, const 
css::uno::Any & rAny )
  *  a css::lang::IllegalArgumentException is thrown
  */
 template< typename E >
-inline void SAL_CALL any2enum( E & eRet, const css::uno::Any & rAny )
+inline void any2enum( E & eRet, const css::uno::Any & rAny )
 throw( css::lang::IllegalArgumentException )
 {
 // check for typesafe enum
@@ -88,29 +88,18 @@ inline void SAL_CALL any2enum( E & eRet, const 
css::uno::Any & rAny )
 }
 
 /**
- * Template function to create an uno::Any from an enum
- *
- * @DEPRECATED : use makeAny< E >()
- *
- */
-template< typename E >
-inline css::uno::Any SAL_CALL enum2any( E eEnum )
-{
-return css::uno::Any( &eEnum, ::cppu::UnoType< E >::get() );
-}
-
-/**
- * extracts a boolean either as a sal_Bool or an integer from
- * an any. If there is no sal_Bool or integer inside the any
+ * extracts a boolean either as a bool or an integer from
+ * an any. If there is no bool or integer inside the any
  * a css::lang::IllegalArgumentException is thrown
  *
  */
-inline bool SAL_CALL any2bool( const css::uno::Any & rAny )
+inline bool any2bool( const css::uno::Any & rAny )
 throw( css::lang::IllegalArgumentException )
 {
-if (rAny.getValueTypeClass() == css::uno::TypeClass_BOOLEAN)
+bool b;
+if (rAny >>= b)
 {
-return *static_cast(rAny.getValue());
+return b;
 }
 else
 {
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx
index 21657ec..4051fa4 100644
--- a/sd/source/ui/unoidl/unoobj.cxx
+++ b/sd/source/ui/unoidl/unoobj.cxx
@@ -765,7 +765,7 @@ css::uno::Any SAL_CALL SdXShape::getPropertyValue( const 
OUString& PropertyName
 break;
 }
 case WID_CLICKACTION:
-aRet = ::cppu::enum2any< presentation::ClickAction >( 
pInfo?pInfo->meClickAction:presentation::ClickAction_NONE );
+aRet <<= ( 
pInfo?pInfo->meClickAction:presentation::ClickAction_NONE );
 break;
 case WID_PLAYFULL:
 aRet <<= ( pInfo && pInfo->mbPlayFull );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Noel Grandin
 include/vcl/toolbox.hxx   |6 +++---
 sc/source/ui/app/inputwin.cxx |4 ++--
 vcl/source/window/toolbox.cxx |8 
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 5ca16c7b3153395d9107f84d366c796a22930756
Author: Noel Grandin 
Date:   Mon May 30 17:00:28 2016 +0200

Convert ToolBoxLayoutMode to scoped enum

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

diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 95cc60b..f87e8ef 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -62,11 +62,11 @@ namespace o3tl
 // dontcare will let the toolbox decide about its size
 enum ToolBoxButtonSize { TOOLBOX_BUTTONSIZE_DONTCARE, 
TOOLBOX_BUTTONSIZE_SMALL, TOOLBOX_BUTTONSIZE_LARGE };
 
-// TBX_LAYOUT_NORMAL   - traditional layout, items are centered in the toolbar
-// TBX_LAYOUT_LOCKVERT - special mode (currently used for calc input/formula
+// ToolBoxLayoutMode::Normal   - traditional layout, items are centered in the 
toolbar
+// ToolBoxLayoutMode::LockVert - special mode (currently used for calc 
input/formula
 //   bar) where item's vertical position is locked, e.g.
 //   toolbox is prevented from centering the items
-enum ToolBoxLayoutMode { TBX_LAYOUT_NORMAL, TBX_LAYOUT_LOCKVERT };
+enum class ToolBoxLayoutMode { Normal, LockVert };
 
 struct ImplToolSize
 {
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 882dfdd..dc46535 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1086,9 +1086,9 @@ void ScInputBarGroup::TriggerToolboxLayout()
 if ( xLayoutManager.is() )
 {
 if ( maTextWnd->GetNumLines() > 1)
-rParent.SetToolbarLayoutMode( TBX_LAYOUT_LOCKVERT );
+rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::LockVert );
 else
-rParent.SetToolbarLayoutMode( TBX_LAYOUT_NORMAL );
+rParent.SetToolbarLayoutMode( ToolBoxLayoutMode::Normal );
 xLayoutManager->lock();
 DataChangedEvent aFakeUpdate( DataChangedEventType::SETTINGS, 
nullptr,  AllSettingsFlags::STYLE );
 
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 7327a5e..f75a03a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -1382,7 +1382,7 @@ void ToolBox::ImplInitToolBoxData()
 meDockAlign   = WindowAlign::Top;
 meLastStyle   = PointerStyle::Arrow;
 mnWinStyle= 0;
-meLayoutMode  = TBX_LAYOUT_NORMAL;
+meLayoutMode  = ToolBoxLayoutMode::Normal;
 mnLastFocusItemId = 0;
 mnKeyModifier = 0;
 mnActivateCount   = 0;
@@ -2545,13 +2545,13 @@ void ToolBox::ImplFormat( bool bResize )
 if ( mbHorz )
 {
 it->maCalcRect.Left() = nX;
-// if special TBX_LAYOUT_LOCKVERT lock vertical 
position
+// if special ToolBoxLayoutMode::LockVert lock 
vertical position
 // don't recalculate the vertical position of the item
-if ( meLayoutMode == TBX_LAYOUT_LOCKVERT && mnLines == 
1 )
+if ( meLayoutMode == ToolBoxLayoutMode::LockVert && 
mnLines == 1 )
 {
 // Somewhat of a hack here, calc deletes and 
re-adds
 // the sum/assign & ok/cancel items dynamically.
-// Because TBX_LAYOUT_LOCKVERT effectively prevents
+// Because ToolBoxLayoutMode::LockVert effectively 
prevents
 // recalculation of the vertical pos of an item the
 // it->maRect.Top() for those newly added items is
 // 0. The hack here is that we want to effectively
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Noel Grandin
 include/tools/rc.h |   26 ++
 rsc/inc/rscdb.hxx  |4 +---
 rsc/source/parser/rscicpx.cxx  |   34 ++
 rsc/source/parser/rscinit.cxx  |3 +--
 vcl/source/window/toolbox2.cxx |   33 +++--
 5 files changed, 37 insertions(+), 63 deletions(-)

New commits:
commit 59dbfecedb76ecf2ff8d464c144a0adf85eb3766
Author: Noel Grandin 
Date:   Mon May 30 20:15:05 2016 +0200

Convert RSC_TOOLBOXITEM to scoped enum

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

diff --git a/include/tools/rc.h b/include/tools/rc.h
index 90e593a..4566203 100644
--- a/include/tools/rc.h
+++ b/include/tools/rc.h
@@ -118,18 +118,20 @@ namespace o3tl {
 }
 
 // For "ToolBoxItem" resources:
-#define RSC_TOOLBOXITEM_ID  0x0001
-#define RSC_TOOLBOXITEM_TYPE0x0002
-#define RSC_TOOLBOXITEM_STATUS  0x0004
-#define RSC_TOOLBOXITEM_HELPID  0x0008
-#define RSC_TOOLBOXITEM_TEXT0x0010
-#define RSC_TOOLBOXITEM_HELPTEXT0x0020
-#define RSC_TOOLBOXITEM_BITMAP  0x0040
-#define RSC_TOOLBOXITEM_IMAGE   0x0080
-#define RSC_TOOLBOXITEM_DISABLE 0x0100
-#define RSC_TOOLBOXITEM_STATE   0x0200
-#define RSC_TOOLBOXITEM_HIDE0x0400
-#define RSC_TOOLBOXITEM_COMMAND 0x0800
+enum class RscToolboxItemFlags {
+Id  = 0x0001,
+Type= 0x0002,
+Status  = 0x0004,
+HelpId  = 0x0008,
+Text= 0x0010,
+Bitmap  = 0x0040,
+Disable = 0x0100,
+Hide= 0x0400,
+Command = 0x0800
+};
+namespace o3tl {
+template<> struct typed_flags : 
is_typed_flags {};
+}
 
 // For "ToolBox" resources:
 enum class RscToolboxFlags {
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index 58a1b56..99f7501 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -206,9 +206,7 @@ class RscTypCont
 
 RscTop *InitClassDockingWindow( RscTop * pSuper,
 RscEnum * pMapUnit );
-RscTop *InitClassToolBoxItem( RscTop * pSuper, RscTop * pClassBitmap,
-  RscTop * pClassImage,
-  RscEnum * pTriState );
+RscTop *InitClassToolBoxItem( RscTop * pSuper, RscTop * pClassBitmap );
 RscTop *InitClassToolBox( RscTop * pSuper, RscTop * pClassToolBoxItem 
);
 RscTop *InitClassSfxStyleFamilyItem( RscTop * pSuper,
  RscTop * pClassBitmap,
diff --git a/rsc/source/parser/rscicpx.cxx b/rsc/source/parser/rscicpx.cxx
index a23761d..7182b34 100644
--- a/rsc/source/parser/rscicpx.cxx
+++ b/rsc/source/parser/rscicpx.cxx
@@ -933,9 +933,7 @@ RscTop * RscTypCont::InitClassDockingWindow( RscTop * 
pSuper,
 }
 
 RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
-   RscTop * pClassBitmap,
-   RscTop * pClassImage,
-   RscEnum * pTriState )
+   RscTop * pClassBitmap )
 {
 AtomnId;
 RscTop *pClassToolBoxItem;
@@ -948,7 +946,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
 // initialize variables
 nId = aNmTb.Put( "Identifier", VARNAME );
 pClassToolBoxItem->SetVariable( nId, &aIdNoZeroUShort, nullptr, 0,
-RSC_TOOLBOXITEM_ID );
+(sal_uInt32)RscToolboxItemFlags::Id );
 {
 RscEnum   * pEnum;
 
@@ -961,7 +959,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
 // add variable
 nId = aNmTb.Put( "Type", VARNAME );
 pClassToolBoxItem->SetVariable( nId, pEnum, nullptr, 0,
-  RSC_TOOLBOXITEM_TYPE  );
+  (sal_uInt32)RscToolboxItemFlags::Type  );
 }
 {
 RscFlag *   pFlag;
@@ -988,7 +986,7 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * pSuper,
 l_nVarId = aNmTb.Put( "_ToolBoxItemFlags", VARNAME );
 pClassToolBoxItem->SetVariable( l_nVarId, pFlag, nullptr,
  VAR_HIDDEN | VAR_NOENUM,
- RSC_TOOLBOXITEM_STATUS );
+ (sal_uInt32)RscToolboxItemFlags::Status );
 
 // add client variables
 aBaseLst.push_back(
@@ -1029,35 +1027,23 @@ RscTop * RscTypCont::InitClassToolBoxItem( RscTop * 
pSuper,
 }
 nId = aNmTb.Put( "HelpID", VARNAME );
 pClassToolBoxItem->SetVariable( nId, &aStringLiteral, nullptr, 0,
-RSC_TOOLBOXITEM_HELPID  );
+(sal_uInt32)RscToolboxItemFlags::HelpId  );

[Libreoffice-commits] core.git: compilerplugins/clang include/sfx2 include/svl include/svtools include/vcl rsc/inc sc/source sfx2/source svl/source svtools/Library_svt.mk svtools/source sw/source vcl/

2016-05-30 Thread Noel Grandin
 compilerplugins/clang/unusedmethods.py |2 +
 include/sfx2/sfxsids.hrc   |1 
 include/svl/undo.hxx   |2 -
 include/svtools/xwindowitem.hxx|   53 
 include/vcl/accel.hxx  |1 
 include/vcl/bitmapaccess.hxx   |   14 +--
 include/vcl/dockwin.hxx|1 
 include/vcl/keycod.hxx |1 
 include/vcl/menu.hxx   |1 
 include/vcl/salnativewidgets.hxx   |1 
 include/vcl/toolbox.hxx|2 -
 rsc/inc/rscdb.hxx  |1 
 sc/source/ui/docshell/docsh4.cxx   |   16 +---
 sfx2/source/dialog/securitypage.cxx|1 
 svl/source/undo/undo.cxx   |7 ---
 svtools/Library_svt.mk |1 
 svtools/source/misc/xwindowitem.cxx|   62 -
 sw/source/uibase/uiview/view2.cxx  |   15 +--
 vcl/source/window/accel.cxx|   29 ---
 vcl/source/window/dockwin.cxx  |   13 --
 vcl/source/window/keycod.cxx   |   26 -
 vcl/source/window/menu.cxx |   12 --
 22 files changed, 8 insertions(+), 254 deletions(-)

New commits:
commit 3d7325898547c94826cfddc6852d400e84e2dda1
Author: Noel Grandin 
Date:   Mon May 30 15:37:25 2016 +0200

loplugin:unusedmethods

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

diff --git a/compilerplugins/clang/unusedmethods.py 
b/compilerplugins/clang/unusedmethods.py
index a151079..a4717c9 100755
--- a/compilerplugins/clang/unusedmethods.py
+++ b/compilerplugins/clang/unusedmethods.py
@@ -270,6 +270,8 @@ for d in definitionSet:
 # ignore the SfxPoolItem CreateDefault methods for now
 if d[1].endswith("::CreateDefault()"):
 continue
+if "::operator" in d[1]:
+continue
 
 unusedSet.add(d) # used by the "unused return types" analysis
 tmp1set.add((method, definitionToSourceLocationMap[d]))
diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index c722c51..f5bbec7 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -127,7 +127,6 @@
 #define SID_PRINTDOCDIRECT  (SID_SFX_START + 509)
 #define SID_PICKLIST(SID_SFX_START + 510)
 #define SID_DOC_SERVICE (SID_SFX_START + 511)
-#define SID_ATTR_XWINDOW(SID_SFX_START + 777)
 #define SID_PLUGIN_MODE (SID_SFX_START + 827)
 #define SID_EXPORTDOC   (SID_SFX_START + 829)
 #define SID_EXPORTDOCASPDF  (SID_SFX_START + 1673)
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx
index 8c54c08..59adae4 100644
--- a/include/svl/undo.hxx
+++ b/include/svl/undo.hxx
@@ -181,7 +181,6 @@ namespace svl
 virtual ~IUndoManager() { };
 
 virtual voidSetMaxUndoActionCount( size_t 
nMaxUndoActionCount ) = 0;
-virtual size_t  GetMaxUndoActionCount() const = 0;
 
 virtual voidAddUndoAction( SfxUndoAction *pAction, bool 
bTryMerg=false ) = 0;
 
@@ -300,7 +299,6 @@ public:
 
 // IUndoManager overridables
 virtual voidSetMaxUndoActionCount( size_t nMaxUndoActionCount 
) override;
-virtual size_t  GetMaxUndoActionCount() const override;
 virtual voidAddUndoAction( SfxUndoAction *pAction, bool 
bTryMerg=false ) override;
 virtual size_t  GetUndoActionCount( bool const i_currentLevel = 
CurrentLevel ) const override;
 virtual sal_uInt16  GetUndoActionId() const override;
diff --git a/include/svtools/xwindowitem.hxx b/include/svtools/xwindowitem.hxx
deleted file mode 100644
index cbb1ee2..000
--- a/include/svtools/xwindowitem.hxx
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_SVTOOLS_XWINDOWITEM_HXX
-#define INCLUDED_SVTOOLS_XWINDOWITEM_HXX
-
-
-#include 
-
-#include 
-#include 
-
-#inc

[Libreoffice-commits] core.git: cui/source include/vcl sfx2/source svtools/source sw/source vcl/source vcl/unx

2016-05-30 Thread Noel Grandin
 cui/source/tabpages/page.cxx  |2 +-
 include/vcl/print.hxx |   10 +-
 sfx2/source/doc/printhelper.cxx   |6 +++---
 svtools/source/dialogs/prnsetup.cxx   |4 ++--
 sw/source/ui/dbui/mmresultdialogs.cxx |2 +-
 vcl/source/gdi/print.cxx  |   20 ++--
 vcl/source/window/printdlg.cxx|2 +-
 vcl/unx/generic/print/genprnpsp.cxx   |2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit fafb2cf4de2eb2de46afab0738b7fd95663c0164
Author: Noel Grandin 
Date:   Mon May 30 10:55:13 2016 +0200

Convert PrinterSupport to scoped enum

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

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 0fa0782..1b72b7e 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -527,7 +527,7 @@ void SvxPageDescPage::Reset( const SfxItemSet* rSet )
 aPaperSize = static_cast(pItem)->GetSize();
 
 bool bOrientationSupport =
-mpDefPrinter->HasSupport( SUPPORT_SET_ORIENTATION );
+mpDefPrinter->HasSupport( PrinterSupport::SetOrientation );
 
 if ( !bOrientationSupport &&
  aPaperSize.Width() > aPaperSize.Height() )
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index e38372d..fcb11bc 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -50,12 +50,12 @@ namespace vcl {
 }
 
 
-enum PrinterSupport
+enum class PrinterSupport
 {
-SUPPORT_SET_ORIENTATION, SUPPORT_SET_PAPERBIN,
-SUPPORT_SET_PAPERSIZE, SUPPORT_SET_PAPER,
-SUPPORT_COPY, SUPPORT_COLLATECOPY,
-SUPPORT_SETUPDIALOG, SUPPORT_FAX, SUPPORT_PDF
+SetOrientation, SetPaperBin,
+SetPaperSize, SetPaper,
+Copy, CollateCopy,
+SetupDialog, Fax, Pdf
 };
 
 
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx
index fa13268..5c3b4b8 100644
--- a/sfx2/source/doc/printhelper.cxx
+++ b/sfx2/source/doc/printhelper.cxx
@@ -278,13 +278,13 @@ uno::Sequence< beans::PropertyValue > SAL_CALL 
SfxPrintHelper::getPrinter() thro
 uno::Sequence< beans::PropertyValue > aPrinter(8);
 
 aPrinter.getArray()[7].Name = "CanSetPaperSize";
-aPrinter.getArray()[7].Value <<= ( pPrinter->HasSupport( 
SUPPORT_SET_PAPERSIZE ) );
+aPrinter.getArray()[7].Value <<= ( pPrinter->HasSupport( 
PrinterSupport::SetPaperSize ) );
 
 aPrinter.getArray()[6].Name = "CanSetPaperFormat";
-aPrinter.getArray()[6].Value <<= ( pPrinter->HasSupport( SUPPORT_SET_PAPER 
) );
+aPrinter.getArray()[6].Value <<= ( pPrinter->HasSupport( 
PrinterSupport::SetPaper ) );
 
 aPrinter.getArray()[5].Name = "CanSetPaperOrientation";
-aPrinter.getArray()[5].Value <<= ( pPrinter->HasSupport( 
SUPPORT_SET_ORIENTATION ) );
+aPrinter.getArray()[5].Value <<= ( pPrinter->HasSupport( 
PrinterSupport::SetOrientation ) );
 
 aPrinter.getArray()[4].Name = "IsBusy";
 aPrinter.getArray()[4].Value <<= ( pPrinter->IsPrinting() );
diff --git a/svtools/source/dialogs/prnsetup.cxx 
b/svtools/source/dialogs/prnsetup.cxx
index 8663722..2608486 100644
--- a/svtools/source/dialogs/prnsetup.cxx
+++ b/svtools/source/dialogs/prnsetup.cxx
@@ -38,7 +38,7 @@ void ImplFillPrnDlgListBox( const Printer* pPrinter,
 }
 
 pBox->Enable( nCount != 0 );
-pPropBtn->Show( pPrinter->HasSupport( SUPPORT_SETUPDIALOG ) );
+pPropBtn->Show( pPrinter->HasSupport( PrinterSupport::SetupDialog ) );
 }
 
 
@@ -76,7 +76,7 @@ Printer* ImplPrnDlgListBoxSelect( ListBox* pBox, PushButton* 
pPropBtn,
 }
 }
 
-pPropBtn->Enable( pTempPrinter->HasSupport( SUPPORT_SETUPDIALOG ) 
);
+pPropBtn->Enable( pTempPrinter->HasSupport( 
PrinterSupport::SetupDialog ) );
 }
 else
 pPropBtn->Disable();
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx 
b/sw/source/ui/dbui/mmresultdialogs.cxx
index 1c6218a..ded7030 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -786,7 +786,7 @@ IMPL_LINK_TYPED(SwMMResultPrintDialog, 
PrinterChangeHdl_Impl, ListBox&, rBox, vo
 else if( ! m_pTempPrinter )
 m_pTempPrinter = VclPtr::Create();
 
-m_pPrinterSettingsPB->Enable( m_pTempPrinter->HasSupport( 
SUPPORT_SETUPDIALOG ) );
+m_pPrinterSettingsPB->Enable( m_pTempPrinter->HasSupport( 
PrinterSupport::SetupDialog ) );
 }
 else
 m_pPrinterSettingsPB->Disable();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 8c267db..c0cfdf59 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -1031,23 +1031,23 @@ bool Printer::HasSupport( PrinterSupport eFeature ) 
const
 {
 switch ( eFeature )
 {
-case SUPPORT_SET_ORIENTATION:
+case PrinterSupport::SetOrientation:
 return GetCapabilities( PrinterCapTy

[Libreoffice-commits] core.git: filter/source include/vcl oox/source svtools/source svx/source sw/source vcl/source

2016-05-30 Thread Noel Grandin
 filter/source/graphicfilter/ieps/ieps.cxx|2 -
 filter/source/msfilter/escherex.cxx  |8 +++---
 include/vcl/gfxlink.hxx  |   31 +--
 oox/source/export/drawingml.cxx  |   18 +++
 svtools/source/graphic/descriptor.cxx|   16 ++---
 svtools/source/graphic/grfcache.cxx  |4 +--
 svx/source/core/graphichelper.cxx|   16 ++---
 svx/source/dialog/compressgraphicdialog.cxx  |   18 +++
 svx/source/gallery2/galtheme.cxx |   22 +--
 svx/source/unodraw/unoshap4.cxx  |2 -
 svx/source/unodraw/unoshape.cxx  |2 -
 svx/source/xml/xmlgrhlp.cxx  |   20 -
 svx/source/xoutdev/_xoutbmp.cxx  |   16 ++---
 sw/source/core/doc/notxtfrm.cxx  |2 -
 sw/source/filter/ww8/rtfattributeoutput.cxx  |   12 +-
 vcl/source/filter/GraphicNativeMetadata.cxx  |2 -
 vcl/source/filter/GraphicNativeTransform.cxx |   16 ++---
 vcl/source/filter/graphicfilter.cxx  |   28 
 vcl/source/gdi/gfxlink.cxx   |   22 +--
 vcl/source/gdi/pdfextoutdevdata.cxx  |8 +++---
 vcl/source/gdi/pdfwriter_impl2.cxx   |4 +--
 21 files changed, 134 insertions(+), 135 deletions(-)

New commits:
commit fe6ac2d11a6f870094bd630759f998d8ed9272e3
Author: Noel Grandin 
Date:   Mon May 30 10:24:32 2016 +0200

Convert GfxLinkType to scoped enum

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

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx 
b/filter/source/graphicfilter/ieps/ieps.cxx
index ef132bb..82d397e 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -730,7 +730,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, 
FilterConfigItem* )
 aGraphic);
 }
 
-GfxLink aGfxLink( pBuf.get(), nPSSize, 
GFX_LINK_TYPE_EPS_BUFFER ) ;
+GfxLink aGfxLink( pBuf.get(), nPSSize, 
GfxLinkType::EpsBuffer ) ;
 pBuf.release();
 aMtf.AddAction( static_cast( new 
MetaEPSAction( Point(), Size( nWidth, nHeight ),
   
aGfxLink, aGraphic.GetGDIMetaFile() ) ) );
diff --git a/filter/source/msfilter/escherex.cxx 
b/filter/source/msfilter/escherex.cxx
index 00f3447..8362b21 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4251,8 +4251,8 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& 
rPicOutStrm, const OStrin
 {
 switch ( aGraphicLink.GetType() )
 {
-case GFX_LINK_TYPE_NATIVE_JPG : 
p_EscherBlibEntry->meBlibType = PEG; break;
-case GFX_LINK_TYPE_NATIVE_PNG : 
p_EscherBlibEntry->meBlibType = PNG; break;
+case GfxLinkType::NativeJpg : 
p_EscherBlibEntry->meBlibType = PEG; break;
+case GfxLinkType::NativePng : 
p_EscherBlibEntry->meBlibType = PNG; break;
 
 // #i15508# added BMP type for better exports; need to 
check this
 // checked - does not work that way, so keep out for now. 
It may
@@ -4260,9 +4260,9 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& 
rPicOutStrm, const OStrin
 // carefully
 // for more comments please check 
RtfAttributeOutput::FlyFrameGraphic
 //
-// case GFX_LINK_TYPE_NATIVE_BMP : 
p_EscherBlibEntry->meBlibType = DIB; break;
+// case GfxLinkType::NativeBmp : 
p_EscherBlibEntry->meBlibType = DIB; break;
 
-case GFX_LINK_TYPE_NATIVE_WMF :
+case GfxLinkType::NativeWmf :
 {
 if ( pGraphicAry && ( p_EscherBlibEntry->mnSize > 0x2c 
) )
 {
diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx
index 3bdb4b7..864d1d6 100644
--- a/include/vcl/gfxlink.hxx
+++ b/include/vcl/gfxlink.hxx
@@ -75,26 +75,25 @@ struct ImpGfxLink
 //#endif // __PRIVATE
 
 
-enum GfxLinkType
+enum class GfxLinkType
 {
-GFX_LINK_TYPE_NONE  = 0,
-GFX_LINK_TYPE_EPS_BUFFER= 1,
-GFX_LINK_TYPE_NATIVE_GIF= 2,// Don't forget to update the 
following defines
-GFX_LINK_TYPE_NATIVE_JPG= 3,// Don't forget to update the 
following defines
-GFX_LINK_TYPE_NATIVE_PNG= 4,// Don't forget to update the 
following defines
-GFX_LINK_TYPE_NATIVE_TIF= 5,// Don't forget to update the 
following defines
-GFX_LINK_TYPE_NATIVE_WMF= 6,// Don't forget to update the 

[Libreoffice-commits] core.git: basic/source comphelper/source compilerplugins/clang cppu/qa cui/source dbaccess/source desktop/source drawinglayer/source editeng/qa editeng/source extensions/source f

2016-05-30 Thread Noel Grandin
 UnoControls/source/inc/framecontrol.hxx   |3 
 basic/source/inc/namecont.hxx |5 
 comphelper/source/misc/documentiologring.cxx  |2 
 compilerplugins/clang/refcounting.cxx |  109 
+++---
 cppu/qa/test_reference.cxx|   11 -
 cui/source/inc/cuigaldlg.hxx  |2 
 cui/source/inc/optpath.hxx|2 
 cui/source/options/optjava.hxx|2 
 dbaccess/source/core/dataaccess/ComponentDefinition.hxx   |2 
 dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx  |3 
 dbaccess/source/core/dataaccess/datasource.hxx|2 
 dbaccess/source/ext/macromigration/migrationengine.cxx|2 
 dbaccess/source/ui/app/AppController.cxx  |4 
 dbaccess/source/ui/misc/singledoccontroller.cxx   |2 
 desktop/source/deployment/gui/dp_gui_extlistbox.cxx   |8 
 desktop/source/deployment/gui/dp_gui_extlistbox.hxx   |2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx|   14 -
 editeng/qa/unit/core-test.cxx |   28 +-
 editeng/source/accessibility/AccessibleEditableTextPara.cxx   |   10 
 editeng/source/misc/svxacorr.cxx  |4 
 editeng/source/xml/xmltxtexp.cxx  |2 
 extensions/source/scanner/sanedlg.cxx |2 
 extensions/source/update/feed/updatefeed.cxx  |4 
 filter/source/svg/svgwriter.cxx   |2 
 i18npool/inc/calendar_gregorian.hxx   |3 
 i18npool/source/characterclassification/cclass_unicode.cxx|3 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |3 
 i18npool/source/indexentry/indexentrysupplier.cxx |3 
 i18npool/source/transliteration/ignoreKana.cxx|9 
 i18npool/source/transliteration/ignoreSize_ja_JP.cxx  |9 
 i18npool/source/transliteration/ignoreWidth.cxx   |9 
 i18npool/source/transliteration/transliteration_body.cxx  |3 
 i18npool/source/transliteration/transliteration_caseignore.cxx|5 
 include/sfx2/filedlghelper.hxx|7 
 oox/source/core/xmlfilterbase.cxx |4 
 reportdesign/source/ui/dlg/GroupsSorting.cxx  |2 
 sax/qa/cppunit/attributes.cxx |3 
 sax/qa/cppunit/parser.cxx |4 
 sax/qa/cppunit/xmlimport.cxx  |4 
 sc/source/ui/unoobj/cellsuno.cxx  |2 
 sc/source/ui/unoobj/chart2uno.cxx |4 
 sc/source/ui/unoobj/docuno.cxx|2 
 sc/source/ui/unoobj/warnpassword.cxx  |2 
 sc/source/ui/vba/vbafont.cxx  |8 
 sc/source/ui/vba/vbawindow.cxx|6 
 sc/source/ui/vba/vbawindows.cxx   |2 
 sd/source/ui/dlg/RemoteDialogClientBox.hxx|2 
 sd/source/ui/inc/EventMultiplexer.hxx |6 
 sd/source/ui/view/drviews5.cxx|2 
 sdext/source/pdfimport/test/pdf2xml.cxx   |3 
 sdext/source/pdfimport/test/tests.cxx |8 
 svtools/source/edit/svmedit.cxx   |4 
 svx/source/sdr/contact/viewcontactofgraphic.cxx   |2 
 svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx  |3 
 svx/source/table/accessibletableshape.cxx |   20 -
 svx/source/xml/xmlxtexp.cxx   |2 
 sw/source/core/layout/paintfrm.cxx|   18 -
 sw/source/core/swg/SwXMLTextBlocks1.cxx   |4 
 sw/source/core/unocore/unorefmk.cxx   |2 
 sw/source/filter/ww8/docxattributeoutput.cxx  |   64 
++---
 sw/source/filter/ww8/docxattributeoutput.hxx  |   36 
+--
 sw/source/filter/ww8/docxsdrexport.cxx|   16 -
 sw/source/filter/ww8/docxsdrexport.hxx| 

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

2016-05-30 Thread Eike Rathke
 svl/source/numbers/zformat.cxx   |   22 --
 xmloff/source/style/xmlnumfe.cxx |5 +++--
 2 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit 7e8e2ef608c7fe2a1c6d6fa244534b85dc42362b
Author: Eike Rathke 
Date:   Tue May 31 00:02:38 2016 +0200

prevent out of bounds string access

Yet another reminiscence of String to OUString conversion..
where the terminating NULL-character was obtained and
SvNumberformat::InsertBlanks() effectively did nothing.

Could be triggered already by entering an '_' underscore character as
number format code, which is a place holder for blanks of the same width
as the following character, which there isn't then yet.

Change-Id: I0534e1417d4bd35e9e7ed4bd0170b9ea3b5fb575
(cherry picked from commit c75ce37560c05271ba56c9dd0d98c5001e83cc2f)
Reviewed-on: https://gerrit.libreoffice.org/25693
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 29402f8..90175f9 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1941,8 +1941,8 @@ bool SvNumberformat::GetOutputString(const OUString& 
sString,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sOutBuff, sOutBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sOutBuff, sOutBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_KEY_GENERAL :   // #77026# "General" is the same as "@"
 case NF_SYMBOLTYPE_DEL :
@@ -2272,8 +2272,8 @@ bool SvNumberformat::GetOutputString(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -2904,8 +2904,8 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3397,7 +3397,8 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3690,8 +3691,8 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -4337,7 +4338,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
+if (rInfo.sStrArray[j].getLength() >= 2)
+k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
 break;
 case NF_SYMBOLTYPE_THSEP:
 // Same as in ImpNumberFillWithThousands() above, do not insert
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 068ca83..5bbbdd3 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1295,7 +1295,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 {
 aEmbeddedStr = *pElemStr;
 }
-else
+else if (pElemStr->getLength() >= 2)
 {
 SvNumberformat::InsertBlanks( aEmbeddedStr, 0, 
(*pElemStr)[1] );
 }
@@ -1367,7 +1367,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt

[Libreoffice-commits] core.git: bin/find-german-comments

2016-05-30 Thread Phillip Sz
 bin/find-german-comments |   74 ---
 1 file changed, 38 insertions(+), 36 deletions(-)

New commits:
commit 88c03cd07a171e05c7fb4dcade8baa28e7c5a770
Author: Phillip Sz 
Date:   Sun May 29 13:49:39 2016 +0200

find-german-comments: clean up

Most of these syntax changes are found by pylint. Also:

 - Use argparse instead of optparse, which is deprecated
 - Fix a bug where we tried to multiply by float, which does not work

Change-Id: I7de5a29bd431755e6c28a8bc80b804c775a0c2cb
Reviewed-on: https://gerrit.libreoffice.org/25669
Tested-by: Jenkins 
Reviewed-by: jan iversen 

diff --git a/bin/find-german-comments b/bin/find-german-comments
index 0a9c0f0..40b4c9b 100755
--- a/bin/find-german-comments
+++ b/bin/find-german-comments
@@ -27,7 +27,12 @@
 
 
 
-import sys, re, subprocess, os, optparse, string
+import sys
+import re
+import subprocess
+import os
+import argparse
+import string
 
 class Parser:
 """
@@ -37,34 +42,28 @@ class Parser:
 def __init__(self):
 self.strip = string.punctuation + " \n"
 self.text_cat = self.start_text_cat()
-op = optparse.OptionParser()
-op.set_usage("%prog [options] \n\n" +
-"Searches for german comments in cxx/hxx source files inside a 
given root\n" +
-"directory recursively.")
-op.add_option("-f", "--filenames-only", action="store_true", 
dest="filenames_only", default=False,
+parser = argparse.ArgumentParser(description='Searches for german 
comments in cxx/hxx source files inside a given root directory recursively.')
+parser.add_argument("-f", "--filenames-only", action="store_true",
 help="Only print the filenames of files containing German 
comments")
-op.add_option("-v", "--verbose", action="store_true", dest="verbose", 
default=False,
+parser.add_argument("-v", "--verbose", action="store_true",
 help="Turn on verbose mode (print only positives progress to 
stderr)")
-op.add_option("-l", "--line-numbers", action="store_true", 
dest="line_numbers", default=False,
+parser.add_argument("-l", "--line-numbers", action="store_true",
 help="Prints the filenames and line numbers only.")
-op.add_option("-L", "--line-numbers-pos", action="store_true", 
dest="line_numbers_pos", default=False,
+parser.add_argument("-L", "--line-numbers-pos", action="store_true",
 help="Prints the filenames and line numbers only (if positive).")
-op.add_option("-t", "--threshold", action="store", dest="THRESHOLD", 
default=0,
+parser.add_argument("-t", "--threshold", action="store", default=0, 
type=int,
 help="When used with '--line-numbers', only bothers outputting 
comment info if there are more than X number of flagged comments. Useful for 
weeding out false positives.")
-self.options, args = op.parse_args()
-try:
-dir = args[0]
-except IndexError:
-dir = "."
-self.check_source_files(dir)
+parser.add_argument("directory", nargs='?', default='.', type=str, 
help='Give a directory to search in')
+self.args = parser.parse_args()
+self.check_source_files(self.args.directory)
 
 def get_comments(self, filename):
 """
 Extracts the source code comments.
 """
 linenum = 0
-if self.options.verbose:
-sys.stderr.write("processing file '%s'...\n" % filename)
+if self.args.verbose:
+print("processing file '%s'...\n" % filename)
 sock = open(filename)
 # add an empty line to trigger the output of collected oneliner
 # comment group
@@ -146,39 +145,39 @@ class Parser:
 s = s.replace('\n', ' ')
 if len(s) < 32 or len(s.split()) < 4:
 return False
-return b"german" == self.get_lang(s)
+return self.get_lang(s) == b"german"
 
 def check_file(self, path):
 """
 checks each comment in a file
 """
-def tab_calc (string):
+def tab_calc(path):
 START = 40 #Default of 10 tabs
-if len(string) >= START:
+if len(path) >= START:
 return 1
-diff = START - len(string)
+diff = START - len(path)
 if diff % 4 is not 0:
 padding = 1
 else:
 padding = 0
 return (diff/4)+padding
 
-if self.options.line_numbers or self.options.line_numbers_pos:
+if self.args.line_numbers or self.args.line_numbers_pos:
 TABS = "\t"*10
 path_linenums = []
 for linenum, s in self.get_comments(path):
 if self.is_german(s):
 path_linenums.append(linenum)
-valid = len(path_linenums) > in

[Libreoffice-commits] online.git: loolwsd/LOOLWSD.cpp loolwsd/Util.cpp

2016-05-30 Thread Ashod Nakashian
 loolwsd/LOOLWSD.cpp |7 ++-
 loolwsd/Util.cpp|   19 +--
 2 files changed, 23 insertions(+), 3 deletions(-)

New commits:
commit 886af28bc2f6d1d27bf78de09978f3858d2db705
Author: Ashod Nakashian 
Date:   Mon May 30 21:43:18 2016 -0400

loolwsd: improved random directory generator

Change-Id: Ic4ea88ba77549cc4ccba83c27fffdffcdeebb984
Reviewed-on: https://gerrit.libreoffice.org/25698
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index da2f72c..cd89457 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -420,7 +420,8 @@ private:
 if (!resultURL.getPath().empty())
 {
 const std::string mimeType = 
"application/octet-stream";
-response.sendFile(resultURL.getPath(), mimeType);
+URI::encode(resultURL.getPath(), "", encodedTo);
+response.sendFile(encodedTo, mimeType);
 sent = true;
 }
 
@@ -504,6 +505,10 @@ private:
 Util::removeFile(dirPath, true);
 return true;
 }
+else
+{
+Log::error("Download file [" + filePath + "] not found.");
+}
 }
 
 throw BadRequestException("Invalid or unknown request.");
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 4e11d38..78a90f0 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -81,13 +81,27 @@ namespace rng
 return v;
 }
 
-std::string getString(const size_t length)
+/// Generates a random string in Base64.
+/// Note: May contain '/' characters.
+std::string getB64String(const size_t length)
 {
 std::stringstream ss;
 Poco::Base64Encoder b64(ss);
 b64 << getBytes(length).data();
 return ss.str().substr(0, length);
 }
+
+/// Generates a random string suitable for
+/// file/directory names.
+std::string getFilename(const size_t length)
+{
+std::stringstream ss;
+Poco::Base64Encoder b64(ss);
+b64 << getBytes(length).data();
+std::string s = ss.str();
+std::replace(s.begin(), s.end(), '/', '_');
+return s.substr(0, length);
+}
 }
 }
 
@@ -109,10 +123,11 @@ namespace Util
 return id;
 }
 
+/// Create a secure, random directory path.
 std::string createRandomDir(const std::string& path)
 {
 Poco::File(path).createDirectories();
-const auto name = rng::getString(64);
+const auto name = rng::getFilename(64);
 Poco::File(Poco::Path(path, name)).createDirectories();
 return name;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/ChildProcessSession.cpp loolwsd/LOOLWSD.cpp loolwsd/Util.cpp

2016-05-30 Thread Ashod Nakashian
 loolwsd/ChildProcessSession.cpp |2 -
 loolwsd/LOOLWSD.cpp |7 +
 loolwsd/Util.cpp|   47 +++-
 3 files changed, 44 insertions(+), 12 deletions(-)

New commits:
commit 2db2da3bb2f7f066631fb28eb15a61e2d1d51464
Author: Ashod Nakashian 
Date:   Mon May 30 20:42:44 2016 -0400

loolwsd: more secure random directories

Util::createRandomDirectory now uses /dev/urandom
(and a complex pseudo-random generator where missing)
to generate 64-byte long, Base64-encoded, names.

This should provide ample security compared to 64-bit
pseudo-random numbers hex-encoded, as was the case.

Reviewed-on: https://gerrit.libreoffice.org/25696
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 
(cherry picked from commit 8f3dcbcfb68393e3768f570c13598c3edf575dc3)

Change-Id: I714810a9fb03b5dcdbad7a15305940bf7457149e
Reviewed-on: https://gerrit.libreoffice.org/25697
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildProcessSession.cpp b/loolwsd/ChildProcessSession.cpp
index bf3b11b..0d07b44 100644
--- a/loolwsd/ChildProcessSession.cpp
+++ b/loolwsd/ChildProcessSession.cpp
@@ -786,12 +786,12 @@ bool ChildProcessSession::downloadAs(const char* 
/*buffer*/, int /*length*/, Str
 }
 }
 
+// The file is removed upon downloading.
 const auto tmpDir = Util::createRandomDir(JAILED_DOCUMENT_ROOT);
 const auto url = JAILED_DOCUMENT_ROOT + tmpDir + "/" + name;
 
 std::unique_lock lock(Mutex);
 
-//TODO: Cleanup the file after downloading.
 _loKitDocument->pClass->saveAs(_loKitDocument, url.c_str(),
 format.size() == 0 ? nullptr :format.c_str(),
 filterOptions.size() == 0 ? nullptr : filterOptions.c_str());
diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp
index 404f576..65d5c3d 100644
--- a/loolwsd/LOOLWSD.cpp
+++ b/loolwsd/LOOLWSD.cpp
@@ -415,7 +415,8 @@ private:
 if (!resultURL.getPath().empty())
 {
 const std::string mimeType = 
"application/octet-stream";
-response.sendFile(resultURL.getPath(), mimeType);
+URI::encode(resultURL.getPath(), "", encodedTo);
+response.sendFile(encodedTo, mimeType);
 sent = true;
 }
 
@@ -495,6 +496,10 @@ private:
 Util::removeFile(dirPath, true);
 return true;
 }
+else
+{
+Log::error("Download file [" + filePath + "] not found.");
+}
 }
 
 throw BadRequestException("Invalid or unknown request.");
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index a814ae2..cad72a1 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -29,14 +29,16 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
-#include 
 #include 
 
 #include "Common.hpp"
@@ -72,6 +74,7 @@ namespace rng
 {
 static std::random_device _rd;
 static std::mutex _rngMutex;
+static Poco::RandomBuf _randBuf;
 
 // Create the prng with a random-device for seed.
 // If we don't have a hardware random-device, we will get the same seed.
@@ -93,6 +96,35 @@ namespace rng
 std::unique_lock lock(_rngMutex);
 return _rng();
 }
+
+std::vector getBytes(const size_t length)
+{
+std::vector v(length);
+_randBuf.readFromDevice(v.data(), v.size());
+return v;
+}
+
+/// Generates a random string in Base64.
+/// Note: May contain '/' characters.
+std::string getB64String(const size_t length)
+{
+std::stringstream ss;
+Poco::Base64Encoder b64(ss);
+b64 << getBytes(length).data();
+return ss.str().substr(0, length);
+}
+
+/// Generates a random string suitable for
+/// file/directory names.
+std::string getFilename(const size_t length)
+{
+std::stringstream ss;
+Poco::Base64Encoder b64(ss);
+b64 << getBytes(length).data();
+std::string s = ss.str();
+std::replace(s.begin(), s.end(), '/', '_');
+return s.substr(0, length);
+}
 }
 }
 
@@ -114,18 +146,13 @@ namespace Util
 return id;
 }
 
+/// Create a secure, random directory path.
 std::string createRandomDir(const std::string& path)
 {
 Poco::File(path).createDirectories();
-for (;;)
-{
-const auto name = Util::encodeId(rng::getNext());
-Poco::File dir(Poco::Path(path, name));
-if (dir.createDirectory())
-{
-return name;
-}
-}
+const auto name = rng::getFilename(64);
+Poco::File(Poco::Path(path, name)).createDirectories();
+return name;
 }
 
 std::string getTempFilePa

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

2016-05-30 Thread Takeshi Abe
 starmath/inc/document.hxx|   44 
 starmath/source/cursor.cxx   |4 
 starmath/source/document.cxx |  224 +--
 3 files changed, 136 insertions(+), 136 deletions(-)

New commits:
commit 27ae0020d7609973eaeb2d95ab1e2897c40685a8
Author: Takeshi Abe 
Date:   Mon May 30 14:22:15 2016 +0900

Prefix SmDocShell's members

as well as remaning aInterpreter to maParser.

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

diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index 499bd56..03fac87 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -87,19 +87,19 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, 
public SfxListener
 friend class SmPrinterAccess;
 friend class SmCursor;
 
-OUStringaText;
-SmFormataFormat;
-SmParseraInterpreter;
-OUStringaAccText;
-SmNode *pTree;
-SfxItemPool*pEditEngineItemPool;
-EditEngine *pEditEngine;
-VclPtr  pPrinter;   //q.v. comment to SmPrinter Access!
-VclPtr pTmpPrinter;//ditto
-sal_uInt16  nModifyCount;
-boolbIsFormulaArranged;
-std::unique_ptr pCursor;
-std::set< OUString >aUsedSymbols;   // to export used symbols only 
when saving
+OUStringmaText;
+SmFormatmaFormat;
+SmParsermaParser;
+OUStringmaAccText;
+SmNode *mpTree;
+SfxItemPool*mpEditEngineItemPool;
+EditEngine *mpEditEngine;
+VclPtr  mpPrinter;   //q.v. comment to SmPrinter Access!
+VclPtr mpTmpPrinter;//ditto
+sal_uInt16  mnModifyCount;
+boolmbFormulaArranged;
+std::unique_ptr mpCursor;
+std::set< OUString >maUsedSymbols;   // to export used symbols only 
when saving
 
 
 virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint) override;
@@ -130,7 +130,7 @@ class SM_DLLPUBLIC SmDocShell : public SfxObjectShell, 
public SfxListener
 Printer *GetPrt();
 OutputDevice*   GetRefDev();
 
-voidSetFormulaArranged(bool bVal) { bIsFormulaArranged = 
bVal; }
+voidSetFormulaArranged(bool bVal) { mbFormulaArranged = 
bVal; }
 
 virtual boolConvertFrom(SfxMedium &rMedium) override;
 
@@ -160,8 +160,8 @@ public:
 //Access for the View. This access is not for the OLE-case!
 //and for the communication with the SFX!
 //All internal printer uses should work with the SmPrinterAccess only
-boolHasPrinter(){ return pPrinter != nullptr; }
-SfxPrinter *GetPrinter(){ GetPrt(); return pPrinter; }
+boolHasPrinter(){ return mpPrinter != nullptr; }
+SfxPrinter *GetPrinter(){ GetPrt(); return mpPrinter; }
 voidSetPrinter( SfxPrinter * );
 
 const OUString GetComment() const;
@@ -171,16 +171,16 @@ public:
 
 voidUpdateText();
 voidSetText(const OUString& rBuffer);
-const OUString&  GetText() { return aText; }
+const OUString&  GetText() { return maText; }
 voidSetFormat(SmFormat& rFormat);
-const SmFormat&  GetFormat() { return aFormat; }
+const SmFormat&  GetFormat() { return maFormat; }
 
 voidParse();
-SmParser &  GetParser() { return aInterpreter; }
-const SmNode *  GetFormulaTree() const  { return pTree; }
-voidSetFormulaTree(SmNode *&rTree) { pTree = rTree; }
+SmParser &  GetParser() { return maParser; }
+const SmNode *  GetFormulaTree() const  { return mpTree; }
+voidSetFormulaTree(SmNode *&rTree) { mpTree = rTree; }
 
-const std::set< OUString > &GetUsedSymbols() const  { return 
aUsedSymbols; }
+const std::set< OUString > &GetUsedSymbols() const  { return 
maUsedSymbols; }
 
 OUStringGetAccessibleText();
 
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 36bc43d..de4439c 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -1413,7 +1413,7 @@ void SmCursor::EndEdit(){
 mpDocShell->SetModified(true);
 //I think SmDocShell uses this value when it sends an update graphics event
 //Anyway comments elsewhere suggests it need to be updated...
-mpDocShell->nModifyCount++;
+mpDocShell->mnModifyCount++;
 
 //TODO: Consider copying the update accessibility code from 
SmDocShell::SetText in here...
 //This somehow updates the size of SmGraphicView if it is running in 
embedded mode
@@ -1427,7 +1427,7 @@ void SmCursor::EndEdit(){
 OUString formula;
 SmNodeToTextVisitor(mpTree, formula);
 //mpTree->CreateTextFromNode(formula);
-mpDocShell->aText = formula;
+mpDocShell->maText = formula

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

2016-05-30 Thread Ashod Nakashian
 loolwsd/ChildSession.cpp |2 +-
 loolwsd/Util.cpp |   30 +-
 2 files changed, 22 insertions(+), 10 deletions(-)

New commits:
commit 8f3dcbcfb68393e3768f570c13598c3edf575dc3
Author: Ashod Nakashian 
Date:   Mon May 30 20:42:44 2016 -0400

loolwsd: more secure random directories

Util::createRandomDirectory now uses /dev/urandom
(and a complex pseudo-random generator where missing)
to generate 64-byte long, Base64-encoded, names.

This should provide ample security compared to 64-bit
pseudo-random numbers hex-encoded, as was the case.

Change-Id: I714810a9fb03b5dcdbad7a15305940bf7457149e
Reviewed-on: https://gerrit.libreoffice.org/25696
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/ChildSession.cpp b/loolwsd/ChildSession.cpp
index 59f96f7..e102405 100644
--- a/loolwsd/ChildSession.cpp
+++ b/loolwsd/ChildSession.cpp
@@ -787,12 +787,12 @@ bool ChildSession::downloadAs(const char* /*buffer*/, int 
/*length*/, StringToke
 }
 }
 
+// The file is removed upon downloading.
 const auto tmpDir = Util::createRandomDir(JAILED_DOCUMENT_ROOT);
 const auto url = JAILED_DOCUMENT_ROOT + tmpDir + "/" + name;
 
 std::unique_lock lock(Mutex);
 
-//TODO: Cleanup the file after downloading.
 _loKitDocument->saveAs(url.c_str(),
 format.size() == 0 ? nullptr :format.c_str(),
 filterOptions.size() == 0 ? nullptr : filterOptions.c_str());
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 5c5ffe9..4e11d38 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -28,11 +28,13 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -49,6 +51,7 @@ namespace rng
 {
 static std::random_device _rd;
 static std::mutex _rngMutex;
+static Poco::RandomBuf _randBuf;
 
 // Create the prng with a random-device for seed.
 // If we don't have a hardware random-device, we will get the same seed.
@@ -70,6 +73,21 @@ namespace rng
 std::unique_lock lock(_rngMutex);
 return _rng();
 }
+
+std::vector getBytes(const size_t length)
+{
+std::vector v(length);
+_randBuf.readFromDevice(v.data(), v.size());
+return v;
+}
+
+std::string getString(const size_t length)
+{
+std::stringstream ss;
+Poco::Base64Encoder b64(ss);
+b64 << getBytes(length).data();
+return ss.str().substr(0, length);
+}
 }
 }
 
@@ -94,15 +112,9 @@ namespace Util
 std::string createRandomDir(const std::string& path)
 {
 Poco::File(path).createDirectories();
-for (;;)
-{
-const auto name = Util::encodeId(rng::getNext());
-Poco::File dir(Poco::Path(path, name));
-if (dir.createDirectory())
-{
-return name;
-}
-}
+const auto name = rng::getString(64);
+Poco::File(Poco::Path(path, name)).createDirectories();
+return name;
 }
 
 std::string getTempFilePath(const std::string srcDir, const std::string& 
srcFilename)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/test

2016-05-30 Thread Henry Castro
 loolwsd/test/TileCacheTests.cpp |6 +-
 loolwsd/test/httpwstest.cpp |6 +-
 2 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 58580a45ce03f7c0105d3316381b73c9f4f6b325
Author: Henry Castro 
Date:   Mon May 30 20:26:40 2016 -0400

loolwsd: test: update unit test getPartHashCodes

diff --git a/loolwsd/test/TileCacheTests.cpp b/loolwsd/test/TileCacheTests.cpp
index bd2c307..95e46e9 100644
--- a/loolwsd/test/TileCacheTests.cpp
+++ b/loolwsd/test/TileCacheTests.cpp
@@ -563,8 +563,12 @@ void TileCacheTests::checkTiles(Poco::Net::WebSocket& 
socket, const std::string&
 getResponseMessage(socket, "status:", response, false);
 CPPUNIT_ASSERT_MESSAGE("did not receive a status: message as expected", 
!response.empty());
 {
+std::string line;
+std::istringstream istr(response);
+std::getline(istr, line);
+
 std::cout << "status: " << response << std::endl;
-Poco::StringTokenizer tokens(response, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
+Poco::StringTokenizer tokens(line, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
 CPPUNIT_ASSERT_EQUAL(static_cast(5), tokens.count());
 
 // Expected format is something like 'type= parts= current= width= 
height='.
diff --git a/loolwsd/test/httpwstest.cpp b/loolwsd/test/httpwstest.cpp
index ea6..0572fbb 100644
--- a/loolwsd/test/httpwstest.cpp
+++ b/loolwsd/test/httpwstest.cpp
@@ -1245,10 +1245,14 @@ void HTTPWSTest::testNoExtraLoolKitsLeft()
 void HTTPWSTest::getPartHashCodes(const std::string status,
   std::vector& parts)
 {
+std::string line;
+std::istringstream istr(status);
+std::getline(istr, line);
+
 std::cerr << "Reading parts from [" << status << "]." << std::endl;
 
 // Expected format is something like 'type= parts= current= width= 
height='.
-Poco::StringTokenizer tokens(status, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
+Poco::StringTokenizer tokens(line, " ", 
Poco::StringTokenizer::TOK_IGNORE_EMPTY | Poco::StringTokenizer::TOK_TRIM);
 CPPUNIT_ASSERT_EQUAL(static_cast(5), tokens.count());
 
 const auto type = tokens[0].substr(std::string("type=").size());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Henry Castro
 loleaflet/src/layer/tile/ImpressTileLayer.js |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 0fe4c89e5599bd5f1c2532bd687609df8b95ce17
Author: Henry Castro 
Date:   Mon May 30 20:23:54 2016 -0400

loleaflet: adjust partName and partHash

diff --git a/loleaflet/src/layer/tile/ImpressTileLayer.js 
b/loleaflet/src/layer/tile/ImpressTileLayer.js
index 3d2d58a..2d8e8c0 100644
--- a/loleaflet/src/layer/tile/ImpressTileLayer.js
+++ b/loleaflet/src/layer/tile/ImpressTileLayer.js
@@ -126,14 +126,15 @@ L.ImpressTileLayer = L.TileLayer.extend({
this._preFetchPart = this._selectedPart;
this._preFetchBorder = null;
}
-   var partNames = textMsg.match(/[^\r\n]+/g);
+   var partMatch = textMsg.match(/[^\r\n]+/g);
// only get the last matches
-   partNames = partNames.slice(partNames.length - 
this._parts);
+   var partHashes = partMatch.slice(partMatch.length - 
this._parts);
+   // var partNames = partMatch.slice(partMatch.length - 2 
* this._parts, partMatch.length - this._parts - 1);
this._map.fire('updateparts', {
selectedPart: this._selectedPart,
parts: this._parts,
docType: this._docType,
-   partNames: partNames
+   partNames: partHashes
});
}
}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOKitHelper.hpp

2016-05-30 Thread Henry Castro
 loolwsd/LOKitHelper.hpp |   16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 19acaecfc75a737a9d8048ddd39746beb09310cc
Author: Henry Castro 
Date:   Mon May 30 20:17:08 2016 -0400

loolwsd: bccu#1748, status: message send both ...

the partnames and hashes (for presentations)

diff --git a/loolwsd/LOKitHelper.hpp b/loolwsd/LOKitHelper.hpp
index 46d40b1..00e13b9 100644
--- a/loolwsd/LOKitHelper.hpp
+++ b/loolwsd/LOKitHelper.hpp
@@ -127,18 +127,20 @@ namespace LOKitHelper
 for (auto i = 0; i < parts; ++i)
 {
 oss << "\n";
-if (type == LOK_DOCTYPE_PRESENTATION)
+ptrValue = loKitDocument->pClass->getPartName(loKitDocument, 
i);
+oss << ptrValue;
+std::free(ptrValue);
+}
+
+if (type == LOK_DOCTYPE_PRESENTATION)
+{
+for (auto i = 0; i < parts; ++i)
 {
+oss << "\n";
 ptrValue = 
loKitDocument->pClass->getPartHash(loKitDocument, i);
 oss << ptrValue;
 std::free(ptrValue);
 }
-else
-{
-ptrValue = 
loKitDocument->pClass->getPartName(loKitDocument, i);
-oss << ptrValue;
-std::free(ptrValue);
-}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Laurent Balland-Poirier
 svl/qa/unit/svl.cxx |   26 ++
 1 file changed, 26 insertions(+)

New commits:
commit 93874236610dd50a46b6db229e022ae364af582a
Author: Laurent Balland-Poirier 
Date:   Sun May 29 08:07:41 2016 +0200

tdf#97835 tdf#61996 tdf#95339 Add qa unit test

tdf#97835: suppress decimal separator
tdf#61996: skip quoted text
tdf#95339: detect SSMM as seconds minutes

Change-Id: Iee3ff723b0c5d2a298d8c7ef03112d5e30d4e4df
Reviewed-on: https://gerrit.libreoffice.org/25597
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 7f4c1e8..ece214b 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -31,6 +31,8 @@
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -60,6 +62,7 @@ public:
 void testI116701();
 void testDateInput();
 void testIsNumberFormat();
+void testUserDefinedNumberFormats();
 
 CPPUNIT_TEST_SUITE(Test);
 CPPUNIT_TEST(testNumberFormat);
@@ -70,6 +73,7 @@ public:
 CPPUNIT_TEST(testI116701);
 CPPUNIT_TEST(testDateInput);
 CPPUNIT_TEST(testIsNumberFormat);
+CPPUNIT_TEST(testUserDefinedNumberFormats);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -1080,6 +1084,28 @@ void Test::testIsNumberFormat()
 }
 }
 
+void Test::testUserDefinedNumberFormats()
+{
+LanguageType eLang = LANGUAGE_ENGLISH_US;
+OUString sCode, sExpected;
+SvNumberFormatter aFormatter(m_xContext, eLang);
+{  // tdf#97835: suppress decimal separator
+sCode = "0.##\" m\"";
+sExpected = "12 m";
+checkPreviewString(aFormatter, sCode, 12.0, eLang, sExpected);
+}
+{  // tdf#61996: skip quoted text
+sCode = "0.00\" ;\"";
+sExpected = "-12.00 ;";
+checkPreviewString(aFormatter, sCode, -12.0, eLang, sExpected);
+}
+{  // tdf#995339: detect SSMM as second minute
+sCode = "SS:MM:HH DD/MM/YY";
+sExpected = "54:23:03 02/01/00";
+checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+}
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread László Németh
 0 files changed

New commits:
commit 1dca410695ab1b0db54da0605df4138b9382c331
Author: László Németh 
Date:   Tue May 31 00:49:31 2016 +0200

empty commit (retest)

Change-Id: I51cc82b153e978e9b1232cdf56f7d14936094bdb
commit 78b62ce7febb56d15295aa7d0bd681cd23540640
Author: László Németh 
Date:   Tue May 31 00:49:20 2016 +0200

empty commit (retest)

Change-Id: If93161ee38e8e22f5f188b6e688b2266008a960d
commit b508c3be71d35f1ed92cc210249228d6fa43194a
Author: László Németh 
Date:   Tue May 31 00:49:10 2016 +0200

empty commit (retest)

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


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

2016-05-30 Thread Laurent Balland-Poirier
 svl/source/numbers/zformat.cxx |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit a3471916370c53c6627ba4010489f539c174bdf9
Author: Laurent Balland-Poirier 
Date:   Sun May 29 16:48:38 2016 +0200

tdf#100122 Correctly treat fraction without integer part

If there is no integer part (with format such as ?/?):
- sStr should be skiped
- SFrac should be completed with the right number of ?,
  j==0 must also be treated in ImpNumberFill

Change-Id: I57448eb3b0c68e10779d7fa565379e2604f7f63b
Reviewed-on: https://gerrit.libreoffice.org/25612
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 172f8021..a80fc53 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2718,16 +2718,14 @@ bool SvNumberformat::ImpGetFractionOutput(double 
fNumber,
 else
 {
 bRes |= ImpNumberFill(sFrac, fNumber, k, j, nIx, 
NF_SYMBOLTYPE_FRACBLANK);
+bCont = false;  // there is no main number?
 if (rInfo.nTypeArray[j] == NF_SYMBOLTYPE_FRACBLANK)
 {
 sFrac.insert(0, rInfo.sStrArray[j]);
 if ( j )
 {
 j--;
-}
-else
-{
-bCont = false;
+bCont = true;  // Yes, there is a main number
 }
 }
 }
@@ -4318,6 +4316,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 short eSymbolType )// type of stop 
condition
 {
 bool bRes = false;
+bool bStop = false;
 const ImpSvNumberformatInfo& rInfo = NumFor[nIx].Info();
 // no normal thousands separators if number divided by thousands
 bool bDoThousands = (rInfo.nThousand == 0);
@@ -4325,7 +4324,7 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 
 k = sBuff.getLength(); // behind last digit
 
-while (j > 0 && (nType = rInfo.nTypeArray[j]) != eSymbolType ) // Backwards
+while (!bStop && (nType = rInfo.nTypeArray[j]) != eSymbolType ) // 
Backwards
 {
 switch ( nType )
 {
@@ -4400,7 +4399,10 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 sBuff.insert(k, rInfo.sStrArray[j]);
 break;
 } // of switch
-j--; // Next String
+if ( j )
+j--; // Next String
+else
+bStop = true;
 } // of while
 return bRes;
 }
___
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' - svl/source xmloff/source

2016-05-30 Thread Eike Rathke
 svl/source/numbers/zformat.cxx   |   22 --
 xmloff/source/style/xmlnumfe.cxx |5 +++--
 2 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit b20875755f9d5dd4e46acbb06b532d8522702651
Author: Eike Rathke 
Date:   Tue May 31 00:02:38 2016 +0200

prevent out of bounds string access

Yet another reminiscence of String to OUString conversion..
where the terminating NULL-character was obtained and
SvNumberformat::InsertBlanks() effectively did nothing.

Could be triggered already by entering an '_' underscore character as
number format code, which is a place holder for blanks of the same width
as the following character, which there isn't then yet.

Change-Id: I0534e1417d4bd35e9e7ed4bd0170b9ea3b5fb575
(cherry picked from commit c75ce37560c05271ba56c9dd0d98c5001e83cc2f)
Reviewed-on: https://gerrit.libreoffice.org/25692
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 0529f27..38efb37 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1926,8 +1926,8 @@ void SvNumberformat::GetOutputString(const OUString& 
sString,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sOutBuff, sOutBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sOutBuff, sOutBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_KEY_GENERAL :   // #77026# "General" is the same as "@"
 case NF_SYMBOLTYPE_DEL :
@@ -2243,8 +2243,8 @@ bool SvNumberformat::GetOutputString(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -2875,8 +2875,8 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3371,7 +3371,8 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3664,8 +3665,8 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -4311,7 +4312,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
+if (rInfo.sStrArray[j].getLength() >= 2)
+k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
 break;
 case NF_SYMBOLTYPE_THSEP:
 // Same as in ImpNumberFillWithThousands() above, do not insert
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 229237c..c717790 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1317,7 +1317,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 {
 aEmbeddedStr = *pElemStr;
 }
-else
+else if (pElemStr->getLength() >= 2)
 {
 SvNumberformat::InsertBlanks( aEmbeddedStr, 0, 
(*pElemStr)[1] );
 }
@@ -1389,7 +1389,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt

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

2016-05-30 Thread Laurent Balland-Poirier
 xmloff/source/style/xmlnumfe.cxx |   15 +++
 1 file changed, 11 insertions(+), 4 deletions(-)

New commits:
commit b07e0a11766f2d2878a0dc2681feddb0c381c68d
Author: Laurent Balland-Poirier 
Date:   Sat May 28 21:56:14 2016 +0200

Choose ODF version for fill-character

OASIS reference: https://issues.oasis-open.org/browse/OFFICE-3765

XML_TEXT in FinishTextElement_Impl follows a different logic
See 
https://cgit.freedesktop.org/libreoffice/core/commit?id=66c6d1ef204f3507e7663a1b8b1be05b9ec71092

Change-Id: Iac966f74c26c2b72ed54db26cf17a35717263007
Reviewed-on: https://gerrit.libreoffice.org/25590
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 121a381..dc785d07 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -521,10 +521,17 @@ void SvXMLNumFmtExport::WriteMinutesElement_Impl( bool 
bLong )
 
 void SvXMLNumFmtExport::WriteRepeatedElement_Impl( sal_Unicode nChar )
 {
-FinishTextElement_Impl(true);
-SvXMLElementExport aElem( rExport, XML_NAMESPACE_LO_EXT, 
XML_FILL_CHARACTER,
-  true, false );
-rExport.Characters( OUString( nChar ) );
+// Export only for 1.2 with extensions or 1.3 and later.
+SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+FinishTextElement_Impl(true);
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+SvXMLElementExport aElem( rExport,
+  ((eVersion < SvtSaveOptions::ODFSVER_013) ? 
XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+  XML_FILL_CHARACTER, true, false );
+rExport.Characters( OUString( nChar ) );
+}
 }
 
 void SvXMLNumFmtExport::WriteSecondsElement_Impl( bool bLong, sal_uInt16 
nDecimals )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Eike Rathke
 svl/source/numbers/zformat.cxx   |   22 --
 xmloff/source/style/xmlnumfe.cxx |5 +++--
 2 files changed, 15 insertions(+), 12 deletions(-)

New commits:
commit c75ce37560c05271ba56c9dd0d98c5001e83cc2f
Author: Eike Rathke 
Date:   Tue May 31 00:02:38 2016 +0200

prevent out of bounds string access

Yet another reminiscence of String to OUString conversion..
where the terminating NULL-character was obtained and
SvNumberformat::InsertBlanks() effectively did nothing.

Could be triggered already by entering an '_' underscore character as
number format code, which is a place holder for blanks of the same width
as the following character, which there isn't then yet.

Change-Id: I0534e1417d4bd35e9e7ed4bd0170b9ea3b5fb575

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 2f2d412..172f8021 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1926,8 +1926,8 @@ void SvNumberformat::GetOutputString(const OUString& 
sString,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sOutBuff, sOutBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sOutBuff, sOutBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_KEY_GENERAL :   // #77026# "General" is the same as "@"
 case NF_SYMBOLTYPE_DEL :
@@ -2267,8 +2267,8 @@ bool SvNumberformat::GetOutputString(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), 
rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -2899,8 +2899,8 @@ bool SvNumberformat::ImpGetTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks(sBuff, sBuff.getLength(),
- rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks(sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3395,7 +3395,8 @@ bool SvNumberformat::ImpGetDateOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -3688,8 +3689,8 @@ bool SvNumberformat::ImpGetDateTimeOutput(double fNumber,
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-InsertBlanks( sBuff, sBuff.getLength(),
-  rInfo.sStrArray[i][1] );
+if (rInfo.sStrArray[i].getLength() >= 2)
+InsertBlanks( sBuff, sBuff.getLength(), rInfo.sStrArray[i][1] 
);
 break;
 case NF_SYMBOLTYPE_STRING:
 case NF_SYMBOLTYPE_CURRENCY:
@@ -4335,7 +4336,8 @@ bool SvNumberformat::ImpNumberFill( OUStringBuffer& 
sBuff, // number string
 }
 break;
 case NF_SYMBOLTYPE_BLANK:
-k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
+if (rInfo.sStrArray[j].getLength() >= 2)
+k = InsertBlanks(sBuff, k, rInfo.sStrArray[j][1] );
 break;
 case NF_SYMBOLTYPE_THSEP:
 // Same as in ImpNumberFillWithThousands() above, do not insert
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 235920d..121a381 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -1347,7 +1347,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 {
 aEmbeddedStr = *pElemStr;
 }
-else
+else if (pElemStr->getLength() >= 2)
 {
 SvNumberformat::InsertBlanks( aEmbeddedStr, 0, 
(*pElemStr)[1] );
 }
@@ -1419,7 +1419,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const 
SvNumberformat& rFormat, sal_uInt
 //  (#i20396# the spaces may also be in embedded-text 
elements)
 
 OUString aBlanks;
-SvNumberformat::InsertBlanks( aBlanks, 0, 
(

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

2016-05-30 Thread Miklos Vajna
 include/xmloff/ProgressBarHelper.hxx |1 +
 xmloff/source/core/ProgressBarHelper.cxx |   11 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 0fac4acb32baf59558f46d42ce31751948f00da3
Author: Miklos Vajna 
Date:   Mon May 30 09:29:22 2016 +0200

tdf#100134 xmloff: only update the progressbar twice for every percent

This restores the state before commit
e1b78d36008d1fd188ca8dc154ad069d3476520c (#95181#; call the setValue
method of the XStatusIndicator as often as possible to enable
reschedule, 2001-11-26), which doesn't seem to be necessary anymore,
perhaps due to the current scheduler that has priorities.

Rather than a plain revert, still allow the progressbar to jump back, as
that seems to be used relatively frequently. So just filter out the
calls that would increment the value, but only with a small difference,
compared to the shown value.

(cherry picked from commit 20ad9893d5d3be13d8aa17764e483afaa083b5c0)

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

diff --git a/include/xmloff/ProgressBarHelper.hxx 
b/include/xmloff/ProgressBarHelper.hxx
index 7eeed4e..6af3603 100644
--- a/include/xmloff/ProgressBarHelper.hxx
+++ b/include/xmloff/ProgressBarHelper.hxx
@@ -36,6 +36,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper
 sal_Int32 nRange;
 sal_Int32 nReference;
 sal_Int32 nValue;
+doublefOldPercent;
 bool  bStrict;
 // #96469#; if the value goes over the Range the progressbar 
starts again
 bool  bRepeat;
diff --git a/xmloff/source/core/ProgressBarHelper.cxx 
b/xmloff/source/core/ProgressBarHelper.cxx
index 719ab80..2419ecf2 100644
--- a/xmloff/source/core/ProgressBarHelper.cxx
+++ b/xmloff/source/core/ProgressBarHelper.cxx
@@ -25,6 +25,7 @@
 using namespace ::com::sun::star;
 
 static const sal_Int32 nDefaultProgressBarRange = 100;
+static const float fProgressStep = 0.5;
 
 ProgressBarHelper::ProgressBarHelper(const ::com::sun::star::uno::Reference < 
::com::sun::star::task::XStatusIndicator>& xTempStatusIndicator,
 const bool bTempStrict)
@@ -32,6 +33,7 @@ ProgressBarHelper::ProgressBarHelper(const 
::com::sun::star::uno::Reference < ::
 , nRange(nDefaultProgressBarRange)
 , nReference(100)
 , nValue(0)
+, fOldPercent(0.0)
 , bStrict(bTempStrict)
 , bRepeat(true)
 #ifdef DBG_UTIL
@@ -87,9 +89,12 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue)
 double fValue(nValue);
 double fNewValue ((fValue * nRange) / nReference);
 
-xStatusIndicator->setValue((sal_Int32)fNewValue);
-
-// #95181# disabled, because we want to call setValue very often 
to enable a good reschedule
+double fPercent((fNewValue * 100) / nRange);
+if (fPercent >= (fOldPercent + fProgressStep) || fPercent < 
fOldPercent)
+{
+xStatusIndicator->setValue((sal_Int32)fNewValue);
+fOldPercent = fPercent;
+}
 }
 #ifdef DBG_UTIL
 else if (!bFailure)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Muhammet Kara
 cui/source/dialogs/zoom.cxx|5 --
 cui/uiconfig/ui/zoomdialog.ui  |   14 ++
 sw/source/ui/misc/docfnote.cxx |2 
 sw/source/ui/misc/srtdlg.cxx   |   17 
 sw/uiconfig/swriter/ui/footnotepage.ui |   68 ++---
 sw/uiconfig/swriter/ui/sortdialog.ui   |   29 +-
 6 files changed, 78 insertions(+), 57 deletions(-)

New commits:
commit d7834317c7c925e9096b464c5f5f3e7f76e3fda3
Author: Muhammet Kara 
Date:   Fri May 27 11:14:01 2016 +0300

Move accessibility relations to .ui files tdf#87026

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

diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 66b3e11..d79ed31 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -196,11 +196,6 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const 
SfxItemSet& rCoreSet )
 SetLimits(nMin, nMax);
 m_pUserEdit->SetValue(nValue);
 
-m_pUserEdit->SetAccessibleName(m_pUserBtn->GetText());
-m_pColumnsEdit->SetAccessibleName(m_pColumnsBtn->GetText());
-m_pColumnsEdit->SetAccessibleRelationMemberOf(m_pColumnsBtn);
-m_pBookModeChk->SetAccessibleRelationMemberOf(m_pColumnsBtn);
-
 const SfxPoolItem& rItem = 
mrSet.Get(mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM));
 
 if (nullptr != dynamic_cast( &rItem))
diff --git a/cui/uiconfig/ui/zoomdialog.ui b/cui/uiconfig/ui/zoomdialog.ui
index d822352..5d5df21 100644
--- a/cui/uiconfig/ui/zoomdialog.ui
+++ b/cui/uiconfig/ui/zoomdialog.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -199,6 +199,11 @@
 
   
 
+
+  
+Variable
+  
+
   
   
 False
@@ -320,7 +325,13 @@
 adjustment1
 
   
+  
 
+
+  
+Columns
+  
+
   
   
 False
@@ -350,6 +361,7 @@
 True
 
   
+  
 
   
 
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 8cea399..f457b98 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -102,8 +102,6 @@ SwEndNoteOptionPage::SwEndNoteOptionPage(vcl::Window 
*pParent, bool bEN,
 get(m_pPosChapterBox, "posdoccb");
 m_pPosChapterBox->SetClickHdl(LINK(this, SwEndNoteOptionPage, 
PosChapterHdl));
 get(m_pPosFT, "pos");
-m_pPosPageBox->SetAccessibleRelationMemberOf(m_pPosFT);
-m_pPosChapterBox->SetAccessibleRelationMemberOf(m_pPosFT);
 get(m_pContEdit, "conted");
 get(m_pContFromEdit, "contfromed");
 }
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index d6adf60..d5d1f87 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -154,12 +154,6 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell 
&rShell)
 m_pTypDLB1->SetAccessibleName(m_pTypLbl->GetText());
 m_pTypDLB2->SetAccessibleName(m_pTypLbl->GetText());
 m_pTypDLB3->SetAccessibleName(m_pTypLbl->GetText());
-m_pSortUp1RB->SetAccessibleRelationMemberOf(m_pKeyCB1);
-m_pSortDn1RB->SetAccessibleRelationMemberOf(m_pKeyCB1);
-m_pSortUp2RB->SetAccessibleRelationMemberOf(m_pKeyCB2);
-m_pSortDn2RB->SetAccessibleRelationMemberOf(m_pKeyCB2);
-m_pSortUp3RB->SetAccessibleRelationMemberOf(m_pKeyCB3);
-m_pSortDn3RB->SetAccessibleRelationMemberOf(m_pKeyCB3);
 
 m_pDelimEdt->SetMaxTextLen( 1 );
 if(rSh.GetSelectionType() &
@@ -237,17 +231,6 @@ SwSortDlg::SwSortDlg(vcl::Window* pParent, SwWrtShell 
&rShell)
 m_pColEdt2->SetMax(nMax);
 m_pColEdt3->SetMax(nMax);
 }
-
-m_pDelimPB->SetAccessibleRelationMemberOf(m_pDelimFreeRB);
-
-m_pColEdt1->SetAccessibleRelationMemberOf(m_pKeyCB1);
-m_pTypDLB1->SetAccessibleRelationMemberOf(m_pKeyCB1);
-
-m_pColEdt2->SetAccessibleRelationMemberOf(m_pKeyCB2);
-m_pTypDLB2->SetAccessibleRelationMemberOf(m_pKeyCB2);
-
-m_pColEdt3->SetAccessibleRelationMemberOf(m_pKeyCB3);
-m_pTypDLB3->SetAccessibleRelationMemberOf(m_pKeyCB3);
 }
 
 SwSor

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

2016-05-30 Thread Michael Stahl
 sw/inc/doc.hxx   |2 +-
 sw/inc/fesh.hxx  |3 ++-
 sw/source/core/docnode/ndtbl.cxx |7 ++-
 sw/source/core/frmedt/fetab.cxx  |   13 -
 sw/source/core/inc/UndoTable.hxx |1 +
 sw/source/core/undo/untbl.cxx|   13 ++---
 6 files changed, 28 insertions(+), 11 deletions(-)

New commits:
commit 7b042d2865c5bb2c2dde1dd47de124bc0df61ae8
Author: Michael Stahl 
Date:   Mon May 30 23:01:04 2016 +0200

tdf#98226: fix undo of table AutoFormat

The new call to SwTable::SetTableStyleName() was not recorded in
SwUndoTableAutoFormat and hence persisted even after Undo.

(regression from 73f4a06c0bce51c7c8b9ae9adfdc7ffac27d06b4)

Change-Id: Ia7f769dafa62f02ff8e4b0596b48266190c7a69b

diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index afed50a..e9b3be5 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1246,7 +1246,7 @@ public:
 
 /// AutoFormat for table/table selection.
 /// @param bResetDirect Reset direct formatting that might be applied to 
the cells.
-bool SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat& 
rNew, bool bResetDirect = false);
+bool SetTableAutoFormat(const SwSelBoxes& rBoxes, const SwTableAutoFormat& 
rNew, bool bResetDirect = false, bool isSetStyleName = false);
 
 // Query attributes.
 bool GetTableAutoFormat( const SwSelBoxes& rBoxes, SwTableAutoFormat& rGet 
);
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index edb6ff5..c66cb9a 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -727,7 +727,8 @@ public:
 /// Update the direct formatting according to the current table style.
 /// @param pTableNode Table node to update.  When nullptr, current cursor 
position is used.
 /// @param bResetDirect Reset direct formatting that might be applied to 
the cells.
-bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool 
bResetDirect = false);
+/// @param pStyleName new style to apply
+bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool 
bResetDirect = false, OUString const* pStyleName = nullptr);
 
 bool GetTableAutoFormat( SwTableAutoFormat& rGet );
 
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 2b92de2..01752de 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3742,7 +3742,7 @@ static bool lcl_SetAFormatBox(FndBox_ & rBox, 
SetAFormatTabPara *pSetPara, bool
 return true;
 }
 
-bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const 
SwTableAutoFormat& rNew, bool bResetDirect)
+bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, const 
SwTableAutoFormat& rNew, bool bResetDirect, bool const isSetStyleName)
 {
 OSL_ENSURE( !rBoxes.empty(), "No valid Box list" );
 SwTableNode* pTableNd = 
const_cast(rBoxes[0]->GetSttNd()->FindTableNode());
@@ -3781,6 +3781,11 @@ bool SwDoc::SetTableAutoFormat(const SwSelBoxes& rBoxes, 
const SwTableAutoFormat
 GetIDocumentUndoRedo().DoUndo(false);
 }
 
+if (isSetStyleName)
+{   // tdf#98226 do this here where undo can record it
+pTableNd->GetTable().SetTableStyleName(rNew.GetName());
+}
+
 rNew.RestoreTableProperties(table);
 
 SetAFormatTabPara aPara( rNew );
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index d0fd94d..fc6108b 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -1186,11 +1186,11 @@ bool SwFEShell::SetTableStyle(const SwTableAutoFormat& 
rStyle)
 return false;
 
 // set the name & update
-pTableNode->GetTable().SetTableStyleName(rStyle.GetName());
-return UpdateTableStyleFormatting(pTableNode);
+return UpdateTableStyleFormatting(pTableNode, false, &rStyle.GetName());
 }
 
-bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode, bool 
bResetDirect)
+bool SwFEShell::UpdateTableStyleFormatting(SwTableNode *pTableNode,
+bool bResetDirect, OUString const*const pStyleName)
 {
 if (!pTableNode)
 {
@@ -1199,7 +1199,9 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode 
*pTableNode, bool bResetD
 return false;
 }
 
-OUString aTableStyleName(pTableNode->GetTable().GetTableStyleName());
+OUString const aTableStyleName((pStyleName)
+? *pStyleName
+: pTableNode->GetTable().GetTableStyleName());
 SwTableAutoFormat* pTableStyle = 
GetDoc()->GetTableStyles().FindAutoFormat(aTableStyleName);
 if (!pTableStyle)
 return false;
@@ -1227,7 +1229,8 @@ bool SwFEShell::UpdateTableStyleFormatting(SwTableNode 
*pTableNode, bool bResetD
 {
 SET_CURR_SHELL( this );
 StartAllAction();
-bRet = GetDoc()->SetTableAutoFormat(aBoxes, *pTableStyle, 
bResetDirect);
+bRet = GetDoc()->SetTableAutoFormat(
+aBoxes, *pTableStyle, bResetDirect, pStyleName != nullptr);
 DELETEZ( pLastCols );
 DELETEZ

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

2016-05-30 Thread Olivier Hallot
 source/text/swriter/guide/section_insert.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit b1d1171b0dd1eda694c801478f183a0a15ae92ee
Author: Olivier Hallot 
Date:   Mon May 30 17:18:11 2016 -0300

Fix help page with new term

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

diff --git a/source/text/swriter/guide/section_insert.xhp 
b/source/text/swriter/guide/section_insert.xhp
index 57e9bca..0a84586 100644
--- a/source/text/swriter/guide/section_insert.xhp
+++ b/source/text/swriter/guide/section_insert.xhp
@@ -77,7 +77,7 @@
 
   
   
-Click the 
browse button (...) next to the File name box.
+Click the 
browse button (Browse...) next to the File name box.
   
   
 Locate the 
document containing the section that you want to link to, and then click 
Insert.
@@ -94,4 +94,4 @@
 
 
 
-
\ No newline at end of file
+
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2016-05-30 Thread Olivier Hallot
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ee8c883d8d65f77ec0dbd27948cbc49f30986cc6
Author: Olivier Hallot 
Date:   Mon May 30 17:18:11 2016 -0300

Updated core
Project: help  b1d1171b0dd1eda694c801478f183a0a15ae92ee

Fix help page with new term

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

diff --git a/helpcontent2 b/helpcontent2
index a9a0e86..b1d1171 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a9a0e8625655eabdf702cfc754412488a79c0513
+Subproject commit b1d1171b0dd1eda694c801478f183a0a15ae92ee
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Katarina Behrens
 include/vcl/window.hxx  |   10 ++
 sc/source/ui/dbgui/scuiimoptdlg.cxx |   10 --
 sc/source/ui/inc/scuiimoptdlg.hxx   |3 +++
 vcl/source/window/window2.cxx   |5 +
 4 files changed, 26 insertions(+), 2 deletions(-)

New commits:
commit 697eaa91bd008e992b325e05ce3f20853ad965f7
Author: Katarina Behrens 
Date:   Wed May 25 16:10:23 2016 +0200

tdf#100068: Initial implementation of ScreenshotId

it's the same as HelpId in default implementation and extended with
'=?config=foo' string otherwise, depending on different configurations
the dialog/tabpage can have (e.g. different widgets hidden/shown)

Change-Id: I01312a5a88ef7ba784bca315b336420cdb63c8dc
Reviewed-on: https://gerrit.libreoffice.org/25455
Reviewed-by: Katarina Behrens 
Tested-by: Katarina Behrens 

diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 62e8c64..e93870c 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -1180,6 +1180,16 @@ public:
 voidSetHelpId( const OString& );
 const OString&  GetHelpId() const;
 
+/** String ID of this window for the purpose of creating a screenshot
+
+In default implementation this ID is the same as HelpId. Override this 
method
+in windows (dialogs,tabpages) that need different IDs for different 
configurations
+they can be in
+
+@return screenshot ID of this window
+*/
+virtual OString GetScreenshotId() const;
+
 vcl::Window*FindWindow( const Point& rPos ) const;
 
 sal_uInt16  GetChildCount() const;
diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx 
b/sc/source/ui/dbgui/scuiimoptdlg.cxx
index 114ec3c..a32b361 100644
--- a/sc/source/ui/dbgui/scuiimoptdlg.cxx
+++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx
@@ -107,7 +107,8 @@ ScImportOptionsDlg::ScImportOptionsDlg(
 boolbOnlyDbtoolsEncodings,
 boolbImport )
 :   ModalDialog ( pParent, "ImOptDialog",
-"modules/scalc/ui/imoptdialog.ui" )
+"modules/scalc/ui/imoptdialog.ui" ),
+m_bIsAsciiImport( bAscii )
 {
 get(m_pFieldFrame, "fieldframe");
 get(m_pFtCharset, "charsetft");
@@ -291,7 +292,7 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const 
ComboBox& rEd ) const
 
 if ( aStr.isEmpty() )
 {
-nCode = 0;  // kein Trennzeichen
+nCode = 0;  // no separator
 }
 else
 {
@@ -304,6 +305,11 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const 
ComboBox& rEd ) const
 return nCode;
 }
 
+OString ScImportOptionsDlg::GetScreenshotId() const
+{
+return (m_bIsAsciiImport) ? GetHelpId() : GetHelpId() + 
"?config=NonTextImport";
+}
+
 IMPL_LINK_TYPED( ScImportOptionsDlg, FixedWidthHdl, Button*, pCheckBox, void )
 {
 if (pCheckBox == m_pCbFixed)
diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx 
b/sc/source/ui/inc/scuiimoptdlg.hxx
index 9848e33..f4a29ca 100644
--- a/sc/source/ui/inc/scuiimoptdlg.hxx
+++ b/sc/source/ui/inc/scuiimoptdlg.hxx
@@ -40,6 +40,7 @@ public:
 virtual void dispose() override;
 
 void GetImportOptions( ScImportOptions& rOptions ) const;
+virtual OString GetScreenshotId() const override;
 
 private:
 VclPtr   m_pFieldFrame;
@@ -60,6 +61,8 @@ private:
 ScDelimiterTable*   pFieldSepTab;
 ScDelimiterTable*   pTextSepTab;
 
+bool m_bIsAsciiImport;
+
 private:
 sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const;
 
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 00475f1..801943b 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -909,6 +909,11 @@ const OString& Window::GetHelpId() const
 return mpWindowImpl->maHelpId;
 }
 
+OString Window::GetScreenshotId() const
+{
+return GetHelpId();
+}
+
 // - old inline methods ---
 
 vcl::Window* Window::ImplGetWindow()
___
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' - filter/source

2016-05-30 Thread Caolán McNamara
 filter/source/xsltfilter/LibXSLTTransformer.cxx |   26 ++---
 filter/source/xsltfilter/LibXSLTTransformer.hxx |   69 +++-
 2 files changed, 53 insertions(+), 42 deletions(-)

New commits:
commit bce5cdcc7f59da19c063205c6c79fc30874cb5ee
Author: Caolán McNamara 
Date:   Mon May 30 17:47:06 2016 +0100

Resolves: tdf#100057 force libxslt to give up when we cancel a 
transformation

we're already using libxslt internals, so using XSLT_STATE_STOPPED isn't an
additional exposure

This probably isn't all that useful to the original reporter in terms of
importing useful data, but it does turn a hopeless situation into something
that can be cancelled.

Change-Id: I08e9a1dcd9ee78e1804faec500bbcca36a546988
(cherry picked from commit 2805adb0d3cf68d7def01a93bf07fb2e8121ec10)

diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx 
b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 3dbe7a4..55f1920 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -203,7 +203,8 @@ namespace XSLT
 
 Reader::Reader(LibXSLTTransformer* transformer) :
 Thread("LibXSLTTransformer"), m_transformer(transformer),
-m_readBuf(INPUT_BUFFER_SIZE), m_writeBuf(OUTPUT_BUFFER_SIZE)
+m_readBuf(INPUT_BUFFER_SIZE), m_writeBuf(OUTPUT_BUFFER_SIZE),
+m_tcontext(nullptr)
 {
 LIBXML_TEST_VERSION;
 }
@@ -288,7 +289,6 @@ namespace XSLT
 xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
 reinterpret_cast(m_transformer->getStyleSheetURL().getStr()));
 xmlDocPtr result = nullptr;
-xsltTransformContextPtr tcontext = nullptr;
 exsltRegisterAll();
 registerExtensionModule();
 #ifdef DEBUG_FILTER_LIBXSLTTRANSFORMER
@@ -298,11 +298,11 @@ namespace XSLT
 std::unique_ptr oh(new 
OleHandler(m_transformer->getComponentContext()));
 if (styleSheet)
 {
-tcontext = xsltNewTransformContext(styleSheet, doc);
-tcontext->_private = static_cast (oh.get());
-xsltQuoteUserParams(tcontext, ¶ms[0]);
+m_tcontext = xsltNewTransformContext(styleSheet, doc);
+m_tcontext->_private = static_cast (oh.get());
+xsltQuoteUserParams(m_tcontext, ¶ms[0]);
 result = xsltApplyStylesheetUser(styleSheet, doc, nullptr, 
nullptr, nullptr,
-tcontext);
+ m_tcontext);
 }
 
 if (result)
@@ -330,7 +330,8 @@ namespace XSLT
 closeOutput();
 oh.reset();
 xsltFreeStylesheet(styleSheet);
-xsltFreeTransformContext(tcontext);
+xsltFreeTransformContext(m_tcontext);
+m_tcontext = nullptr;
 xmlFreeDoc(doc);
 xmlFreeDoc(result);
 }
@@ -351,6 +352,16 @@ namespace XSLT
 
 }
 
+void Reader::forceStateStopped()
+{
+if (!m_tcontext)
+return;
+//tdf#100057 If we force a cancel, libxslt will of course just keep on 
going unless something
+//tells it to stop. Here we force the stopped state so that libxslt 
will stop processing
+//and so Reader::execute will complete and we can join cleanly
+m_tcontext->state = XSLT_STATE_STOPPED;
+}
+
 Reader::~Reader()
 {
 }
@@ -455,6 +466,7 @@ namespace XSLT
 if (m_Reader.is())
 {
 m_Reader->terminate();
+m_Reader->forceStateStopped();
 m_Reader->join();
 }
 m_Reader.clear();
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx 
b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index d276018..9c4485b 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -47,6 +47,36 @@ using ::std::map;
 namespace XSLT
 {
 
+class LibXSLTTransformer;
+
+/*
+ * Reader provides a worker thread to perform the actual transformation.
+ * It pipes the streams provided by a LibXSLTTransformer
+ * instance through libxslt.
+ */
+class Reader : public salhelper::Thread
+{
+public:
+Reader(LibXSLTTransformer* transformer);
+int SAL_CALL read(char * buffer, int len);
+int SAL_CALL write(const char * buffer, int len);
+void forceStateStopped();
+int SAL_CALL closeOutput();
+
+private:
+virtual ~Reader();
+
+static const sal_Int32 OUTPUT_BUFFER_SIZE;
+static const sal_Int32 INPUT_BUFFER_SIZE;
+LibXSLTTransformer* m_transformer;
+Sequence m_readBuf;
+Sequence m_writeBuf;
+xsltTransformContextPtr m_tcontext;
+
+virtual void execute() override;
+static void SAL_CALL registerExtensionModule();
+};
+
 /*
  * LibXSLTTransformer provides an transforming pipe service to XSLTFilter.
  *
@@ -85,13 

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

2016-05-30 Thread Eike Rathke
 sc/source/core/data/document10.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e19be2e175e146152a08982e411b01ba8f0c2bb1
Author: Eike Rathke 
Date:   Mon May 30 21:35:07 2016 +0200

we already have pClipDoc

Change-Id: I0485f15b6771d10d4b077f5034db77e4c13ef877
(cherry picked from commit f65b29ff13211449144455668014a80aa8b331a3)
Reviewed-on: https://gerrit.libreoffice.org/25687
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 6363265..0530566 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -82,7 +82,7 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
-if (rCxt.getClipDoc()->maTabs.size() > 1)
+if (pClipDoc->maTabs.size() > 1)
 // Copying from multiple source sheets is not handled here.
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Eike Rathke
 sc/source/core/data/document10.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f65b29ff13211449144455668014a80aa8b331a3
Author: Eike Rathke 
Date:   Mon May 30 21:35:07 2016 +0200

we already have pClipDoc

Change-Id: I0485f15b6771d10d4b077f5034db77e4c13ef877

diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 6363265..0530566 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -82,7 +82,7 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
-if (rCxt.getClipDoc()->maTabs.size() > 1)
+if (pClipDoc->maTabs.size() > 1)
 // Copying from multiple source sheets is not handled here.
 return false;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/fixes22' - 5 commits - vcl/source

2016-05-30 Thread Jan Holesovsky
 vcl/source/opengl/OpenGLContext.cxx |  188 +---
 1 file changed, 91 insertions(+), 97 deletions(-)

New commits:
commit 9d0e0ab8bd030b6560e97b245df4c0e94fb3ee7f
Author: Jan Holesovsky 
Date:   Mon May 30 17:57:10 2016 +0200

Switch deterministic scheduling on.

Change-Id: Ie735d6456086933eb84a6088782ee55f1c1ef185

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index efb65ca..3f7e0bf6 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -174,7 +174,7 @@ bool Scheduler::ProcessTaskScheduling( bool bTimerOnly )
 return false;
 }
 
-static bool g_bDeterministicMode = false;
+static bool g_bDeterministicMode = true;
 
 void Scheduler::SetDeterministicMode(bool bDeterministic)
 {
commit a6eced6fd6c866a3e94862e2665efe1282eb86ee
Author: Jan Holesovsky 
Date:   Mon May 30 17:36:37 2016 +0200

tdf#100092: Implement deterministic scheduling.

With this, two subsequent runs of LibreOffice trigger about the same amount 
of
events.

Change-Id: I92566ef4eee20e7d604cfd48f01c4df30c77e653

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 95303ee..ee83c1e 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -53,6 +53,7 @@ protected:
 // These should be constexpr static, when supported.
 static const sal_uInt64 ImmediateTimeoutMs = 1;
 static const sal_uInt64 MaximumTimeoutMs = 1000 * 60; // 1 minute
+static const sal_uInt64 InfiniteTimeoutMs = 1000 * 60 * 60 * 24; // 1 day
 
 static void ImplStartTimer(sal_uInt64 nMS, bool bForce = false);
 
@@ -90,7 +91,7 @@ public:
 Scheduler&  operator=( const Scheduler& rScheduler );
 static void ImplDeInitScheduler();
 
-// Process one pending Timer with highhest priority
+/// Process one pending Timer with highhest priority
 static void CallbackTaskScheduling( bool ignore );
 /// Calculate minimum timeout - and return its value.
 static sal_uInt64 CalculateMinimumTimeout( bool &bHasActiveIdles );
@@ -98,6 +99,12 @@ public:
 static bool   ProcessTaskScheduling( bool bTimerOnly );
 /// Process all events until we are idle
 static void   ProcessEventsToIdle();
+
+/// Control the deterministic mode.  In this mode, two subsequent runs of
+/// LibreOffice fire about the same amount idles.
+static void SetDeterministicMode(bool bDeterministic);
+/// Return the current state of deterministic mode.
+static bool GetDeterministicMode();
 };
 
 #endif // INCLUDED_VCL_SCHEDULER_HXX
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 123f37a..587e05f 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -44,7 +44,23 @@ Idle::Idle( const Idle& rIdle ) : Scheduler(rIdle)
 void Idle::Start()
 {
 Scheduler::Start();
-Scheduler::ImplStartTimer(Scheduler::ImmediateTimeoutMs);
+
+sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs;
+if (Scheduler::GetDeterministicMode())
+{
+switch (mePriority)
+{
+case SchedulerPriority::LOW:
+case SchedulerPriority::LOWER:
+case SchedulerPriority::LOWEST:
+nPeriod = Scheduler::InfiniteTimeoutMs;
+break;
+default:
+break;
+}
+}
+
+Scheduler::ImplStartTimer(nPeriod);
 }
 
 bool Idle::ReadyForSchedule( bool bTimerOnly, sal_uInt64 /* nTimeNow */ ) const
@@ -67,6 +83,15 @@ sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 nMinPeriod, 
sal_uInt64 /* nTime */
 case SchedulerPriority::REPAINT:
 nMinPeriod = ImmediateTimeoutMs; // don't wait.
 break;
+case SchedulerPriority::LOW:
+case SchedulerPriority::LOWER:
+case SchedulerPriority::LOWEST:
+if (Scheduler::GetDeterministicMode())
+{
+nMinPeriod = Scheduler::InfiniteTimeoutMs;
+break;
+}
+// fall-through intended
 default:
 // FIXME: tdf#92036 workaround, I should be 1 too - wait 5ms
 if (nMinPeriod > 5) // only shrink the min. period if nothing is 
quicker.
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 879ca42..efb65ca 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -174,6 +174,18 @@ bool Scheduler::ProcessTaskScheduling( bool bTimerOnly )
 return false;
 }
 
+static bool g_bDeterministicMode = false;
+
+void Scheduler::SetDeterministicMode(bool bDeterministic)
+{
+g_bDeterministicMode = bDeterministic;
+}
+
+bool Scheduler::GetDeterministicMode()
+{
+return g_bDeterministicMode;
+}
+
 sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
 {
 // process all pending Tasks
commit 610b501ebb0f4608baedd4363b26dfd401d9f757
Author: Tor Lillqvist 
Date:   Mon May 30 21:40:45 2016 +0300

On Windows, compile OpenGL shaders in advance and disable on failure

(Move wrongly placed code s

Re: /usr/lib/libnss3.so: version `NSS_3.19.1' not found

2016-05-30 Thread Anthonys Lists

On 30/05/2016 11:37, Lionel Elie Mamane wrote:

On Sun, May 29, 2016 at 10:21:56AM +0200, YuGiOhJCJ Mailing-List wrote:

On Sun, 29 May 2016 01:35:47 +0100
Wols Lists  wrote:

Which means my fstab contains the following line
tmp /tmptmpfs   size=10G,mode=0777  0 0
and you'll notice the size=10G parameter, giving me a 10Gb /tmp directory.

In my /etc/fstab file I got this line on Slackware 14.1:
$ grep "tmp" /etc/fstab
tmpfs/dev/shm tmpfs   defaults 0   0
It is a bit different than your line in /etc/fstab but I don't know
if that matters.

That is not the line for /tmp; if you haven't got any line for that,
possibly it is just on your root filesystem, which may or may not have
enough space on it. Try:

mount
cat /proc/mounts

to find the actual situation of /tmp


Oops !!! I should have picked that up.

If it is on root, and root is short of space, you could move /tmp to a 
tmpfs by inserting a line like mine. If you're after speed, this is a 
good solution, but you do really need to get extra ram if you can - 
these two will give you that speed.


Just remember, a reboot WILL clear out /tmp with this setup, so your 
build environment will not persist across reboots. Even without a tmpfs, 
the distro will probably clear out /tmp on boot or shutdown.


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


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

2016-05-30 Thread Eike Rathke
 sc/inc/document.hxx|2 +-
 sc/source/core/data/document.cxx   |2 +-
 sc/source/core/data/document10.cxx |7 +++
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit dd38581b787f357ee88da7dfabeb596a894b5afe
Author: Eike Rathke 
Date:   Mon May 30 20:04:25 2016 +0200

actually multiple destination sheets are handled, tdf#97158 follow-up

... so ScMarkData doesn't need to be passed. Which it wasn't anyway
because the destination sheet span is part of CopyFromClipContext.

Change-Id: I0addd370d96ab78b22ed957081a1212fc70419a1
(cherry picked from commit 9d07f557572bdeaeda8e923525c8895d79fc0d22)
Reviewed-on: https://gerrit.libreoffice.org/25685
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 01eadaf..5696f26 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1419,7 +1419,7 @@ public:
 sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, 
sc::ColumnSpanSet& rBroadcastSpans );
 
 bool CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, 
SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
+sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 );
 void CopyBlockFromClip(
 sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2,
 const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 224908d..f5ad18c 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2806,7 +2806,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, 
const ScMarkData& rMar
 else
 DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag, false, 
&aBroadcastSpans);
 
-if (CopyOneCellFromClip(aCxt, rMark, nCol1, nRow1, nCol2, nRow2))
+if (CopyOneCellFromClip(aCxt, nCol1, nRow1, nCol2, nRow2))
 continue;
 
 SCCOL nC1 = nCol1;
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index e99d0b4..6363265 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -65,7 +65,7 @@ void ScDocument::DeleteBeforeCopyFromClip(
 }
 
 bool ScDocument::CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2 )
+sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 )
 {
 ScDocument* pClipDoc = rCxt.getClipDoc();
 if (pClipDoc->GetClipParam().mbCutMode)
@@ -82,9 +82,8 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
-if (rCxt.getClipDoc()->maTabs.size() > 1 || rMark.GetSelectCount() > 1)
-// Copying from multiple source sheets or to multiple destination
-// sheets is not handled here.
+if (rCxt.getClipDoc()->maTabs.size() > 1)
+// Copying from multiple source sheets is not handled here.
 return false;
 
 ScAddress aSrcPos = aClipRange.aStart;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Eike Rathke
 sc/inc/document.hxx|2 +-
 sc/source/core/data/document.cxx   |2 +-
 sc/source/core/data/document10.cxx |7 +++
 3 files changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 9d07f557572bdeaeda8e923525c8895d79fc0d22
Author: Eike Rathke 
Date:   Mon May 30 20:04:25 2016 +0200

actually multiple destination sheets are handled, tdf#97158 follow-up

... so ScMarkData doesn't need to be passed. Which it wasn't anyway
because the destination sheet span is part of CopyFromClipContext.

Change-Id: I0addd370d96ab78b22ed957081a1212fc70419a1

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 01eadaf..5696f26 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1419,7 +1419,7 @@ public:
 sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, 
sc::ColumnSpanSet& rBroadcastSpans );
 
 bool CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, 
SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
+sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 );
 void CopyBlockFromClip(
 sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2,
 const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index af943d4..68b1f8f 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2806,7 +2806,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, 
const ScMarkData& rMar
 else
 DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag, false, 
&aBroadcastSpans);
 
-if (CopyOneCellFromClip(aCxt, rMark, nCol1, nRow1, nCol2, nRow2))
+if (CopyOneCellFromClip(aCxt, nCol1, nRow1, nCol2, nRow2))
 continue;
 
 SCCOL nC1 = nCol1;
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index e99d0b4..6363265 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -65,7 +65,7 @@ void ScDocument::DeleteBeforeCopyFromClip(
 }
 
 bool ScDocument::CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2 )
+sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 )
 {
 ScDocument* pClipDoc = rCxt.getClipDoc();
 if (pClipDoc->GetClipParam().mbCutMode)
@@ -82,9 +82,8 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
-if (rCxt.getClipDoc()->maTabs.size() > 1 || rMark.GetSelectCount() > 1)
-// Copying from multiple source sheets or to multiple destination
-// sheets is not handled here.
+if (rCxt.getClipDoc()->maTabs.size() > 1)
+// Copying from multiple source sheets is not handled here.
 return false;
 
 ScAddress aSrcPos = aClipRange.aStart;
___
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' - include/sfx2 sfx2/source

2016-05-30 Thread Akshay Deep
 include/sfx2/templatedefaultview.hxx|5 +
 sfx2/source/control/templatedefaultview.cxx |   36 ++
 sfx2/source/dialog/backingwindow.cxx|   93 ++--
 sfx2/source/dialog/backingwindow.hxx|8 --
 4 files changed, 91 insertions(+), 51 deletions(-)

New commits:
commit 130e4ceeca3aa8382984629c8a7bc639c118deaf
Author: Akshay Deep 
Date:   Wed May 25 22:22:28 2016 +0530

Context Menu for templates and other fixes in Start Center

Removed:
1: Save Mode Variable.
2. maSelTemplates and maSelFolders
3. OpenRegionHdl
4. cmpSelectionItems

Change-Id: I108da3a0ddfb4954a60fbb0df44eba0457326ca9
Reviewed-on: https://gerrit.libreoffice.org/25459
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Samuel Mehrbrodt 
(cherry picked from commit ea01963baf5cc9f5a11f85e04fa61c56bc8a37f0)
Reviewed-on: https://gerrit.libreoffice.org/25681
Reviewed-by: Akshay Deep 
Tested-by: Akshay Deep 

diff --git a/include/sfx2/templatedefaultview.hxx 
b/include/sfx2/templatedefaultview.hxx
index e0f10d4..24157a1 100644
--- a/include/sfx2/templatedefaultview.hxx
+++ b/include/sfx2/templatedefaultview.hxx
@@ -11,7 +11,6 @@
 #define INCLUDED_SFX2_TEMPLATEDEFAULTVIEW_HXX
 
 #include 
-#include 
 
 class SFX2_DLLPUBLIC TemplateDefaultView : public TemplateLocalView
 {
@@ -19,6 +18,10 @@ public:
 TemplateDefaultView(Window *pParent);
 
 virtual void reload() override;
+
+void createContextMenu();
+
+DECL_LINK_TYPED(ContextMenuSelectHdl, Menu*, void);
 protected:
 longmnItemMaxSize;
 longmnTextHeight;
diff --git a/sfx2/source/control/templatedefaultview.cxx 
b/sfx2/source/control/templatedefaultview.cxx
index 63c2e71..76e08ea 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -9,9 +9,16 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
+#include "../doc/doc.hrc"
+
+#define MNI_OPEN   1
+#define MNI_EDIT   2
+
 #include 
 
 VCL_BUILDER_FACTORY(TemplateDefaultView)
@@ -39,6 +46,35 @@ void TemplateDefaultView::reload()
 TemplateLocalView::reload();
 // Set preferred width
 set_width_request(mnTextHeight + mnItemMaxSize + 2*mnItemPadding);
+}
 
+void TemplateDefaultView::createContextMenu()
+{
+std::unique_ptr pItemMenu(new PopupMenu);
+pItemMenu->InsertItem(MNI_OPEN,SfxResId(STR_OPEN).toString());
+pItemMenu->InsertItem(MNI_EDIT,SfxResId(STR_EDIT_TEMPLATE).toString());
+deselectItems();
+maSelectedItem->setSelection(true);
+pItemMenu->SetSelectHdl(LINK(this, TemplateLocalView, 
ContextMenuSelectHdl));
+pItemMenu->Execute(this, Rectangle(maPosition,Size(1,1)), 
PopupMenuFlags::ExecuteDown);
+Invalidate();
 }
+
+IMPL_LINK_TYPED(TemplateDefaultView, ContextMenuSelectHdl, Menu*, pMenu, void)
+{
+sal_uInt16 nMenuId = pMenu->GetCurItemId();
+
+switch(nMenuId)
+{
+case MNI_OPEN:
+maOpenTemplateHdl.Call(maSelectedItem);
+break;
+case MNI_EDIT:
+maEditTemplateHdl.Call(maSelectedItem);
+break;
+default:
+break;
+}
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 06955c2..5c81eb8 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -66,29 +66,12 @@ const char SERVICENAME_CFGREADACCESS[] = 
"com.sun.star.configuration.Configurati
 // increase size of the text in the buttons on the left fMultiplier-times
 float fMultiplier = 1.4f;
 
-/***
- *
- * Order items in ascending order (useful for the selection sets and move/copy 
operations since the associated ids
- * change when processed by the SfxDocumentTemplates class so we want to 
process to ones with higher id first)
- *
- ***/
-
-static bool cmpSelectionItems (const ThumbnailViewItem *pItem1, const 
ThumbnailViewItem *pItem2)
-{
-return pItem1->mnId > pItem2->mnId;
-}
-
-
 BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 Window( i_pParent ),
 mbLocalViewInitialized(false),
 
maButtonsTextColor(officecfg::Office::Common::Help::StartCenter::StartCenterTextColor::get()),
-mbIsSaveMode( false ),
 mbInitControls( false ),
-mnHideExternalLinks( 0 ),
-maSelTemplates(cmpSelectionItems),
-maSelFolders(cmpSelectionItems)
-
+mnHideExternalLinks( 0 )
 {
 m_pUIBuilder = new VclBuilder(this, getUIRootDir(), 
"sfx/ui/startcenter.ui", "StartCenter" );
 
@@ -279,8 +262,9 @@ void BackingWindow::initControls()
 mpTemplateButton->SetMenuMode( MENUBUTTON_MENUMODE_TIMED );
 
 //set handlers
-mpLocalView->setOpenRegionHdl(LINK(this, BackingWindow, OpenRegionHdl));
-mpLocalView->setOpenTemplateHdl(LINK(this,BackingWindow,OpenTemplateHdl));
+mpLocalView->setRightClickHdl(LINK(this, BackingWindow, RightClickHdl));
+mpLocalView->setOpenTemplateHdl(LINK(this, Back

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

2016-05-30 Thread Akshay Deep
 sfx2/source/doc/saveastemplatedlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8ef56a27a00b6af3e37f5c5be8e3b46f8d68fb97
Author: Akshay Deep 
Date:   Sat May 28 20:52:34 2016 +0530

Resolves: Error when overwriting a template in Template Save As Dialog

After overwriting a template, overwritten template does not exist in the
template manager because SfxDocumentTemplates is not updated..

Change-Id: I7e8605091de71b921f8dbed5ab2022ac292fe4b2
Reviewed-on: https://gerrit.libreoffice.org/25584
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 395db598591edc123148770de42dac30bf505296)
Reviewed-on: https://gerrit.libreoffice.org/25680
Reviewed-by: Akshay Deep 
Tested-by: Akshay Deep 

diff --git a/sfx2/source/doc/saveastemplatedlg.cxx 
b/sfx2/source/doc/saveastemplatedlg.cxx
index 1d46197..beef6e6 100644
--- a/sfx2/source/doc/saveastemplatedlg.cxx
+++ b/sfx2/source/doc/saveastemplatedlg.cxx
@@ -162,6 +162,7 @@ bool SfxSaveAsTemplateDialog::SaveTemplate()
 if(!mpDocTemplates->InsertTemplate( mnRegionPos, nDocId, msTemplateName, 
sURL))
 return false;
 
+mpDocTemplates->Update();
 return true;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Akshay Deep
 include/sfx2/templatedlg.hxx  |1 
 include/sfx2/templatelocalview.hxx|2 +
 sfx2/source/control/templatelocalview.cxx |   13 +++
 sfx2/source/doc/doc.hrc   |1 
 sfx2/source/doc/doc.src   |4 ++
 sfx2/source/doc/templatedlg.cxx   |   53 --
 6 files changed, 71 insertions(+), 3 deletions(-)

New commits:
commit 9386b652f1cb0d5ab696ac81d1e9a01eafce96aa
Author: Akshay Deep 
Date:   Fri May 27 17:13:27 2016 +0530

Template Manager: Option to rename category

Change-Id: I7a9a0a42afbf5f8a293a130a0b84e72a54540579
Reviewed-on: https://gerrit.libreoffice.org/25539
Tested-by: Jenkins 
Reviewed-by: Samuel Mehrbrodt 
(cherry picked from commit 37b4163ce16a6171bd25653494e58bc03daedc2b)
Reviewed-on: https://gerrit.libreoffice.org/25544
Reviewed-by: Akshay Deep 
Tested-by: Akshay Deep 

diff --git a/include/sfx2/templatedlg.hxx b/include/sfx2/templatedlg.hxx
index bdae556..440c153 100644
--- a/include/sfx2/templatedlg.hxx
+++ b/include/sfx2/templatedlg.hxx
@@ -97,6 +97,7 @@ private:
 void OnTemplateState (const ThumbnailViewItem *pItem);
 
 void OnCategoryNew ();
+void OnCategoryRename();
 void OnCategoryDelete();
 
 void OnRegionState (const ThumbnailViewItem *pItem);
diff --git a/include/sfx2/templatelocalview.hxx 
b/include/sfx2/templatelocalview.hxx
index 1cfc8d8..304102e 100644
--- a/include/sfx2/templatelocalview.hxx
+++ b/include/sfx2/templatelocalview.hxx
@@ -70,6 +70,8 @@ public:
 
 virtual sal_uInt16 createRegion (const OUString &rName) override;
 
+bool renameRegion(const OUString &rTitle, const OUString &rNewTitle);
+
 bool removeRegion (const sal_uInt16 nItemId);
 
 bool removeTemplate (const sal_uInt16 nItemId, const sal_uInt16 
nSrcItemId);
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 2070a48..c28e665 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -342,6 +342,19 @@ sal_uInt16 TemplateLocalView::createRegion(const OUString 
&rName)
 return pItem->mnId;
 }
 
+bool TemplateLocalView::renameRegion(const OUString &rTitle, const OUString 
&rNewTitle)
+{
+sal_uInt16 nDocId = USHRT_MAX;
+TemplateContainerItem *pRegion = getRegion(rTitle);
+
+if(pRegion)
+{
+sal_uInt16 nRegionId = pRegion->mnRegionId;
+return mpDocTemplates->SetName( rNewTitle, nRegionId, nDocId );
+}
+return false;
+}
+
 bool TemplateLocalView::removeRegion(const sal_uInt16 nItemId)
 {
 sal_uInt16 nRegionId = USHRT_MAX;
diff --git a/sfx2/source/doc/doc.hrc b/sfx2/source/doc/doc.hrc
index a8abbe5..6d501ca 100644
--- a/sfx2/source/doc/doc.hrc
+++ b/sfx2/source/doc/doc.hrc
@@ -124,6 +124,7 @@
 #define STR_CATEGORY_DELETE (RID_SFX_DOC_START+101)
 #define STR_CREATE_ERROR(RID_SFX_DOC_START+103)
 #define STR_ERROR_SAVEAS(RID_SFX_DOC_START+105)
+#define STR_CATEGORY_RENAME (RID_SFX_DOC_START+109)
 
 // please update to the last id
 #define ACT_SFX_DOC_END IMG_ACTION_REFRESH
diff --git a/sfx2/source/doc/doc.src b/sfx2/source/doc/doc.src
index cab02ce..ed7f8db 100644
--- a/sfx2/source/doc/doc.src
+++ b/sfx2/source/doc/doc.src
@@ -68,6 +68,10 @@ String STR_RENAME
 {
 Text [ en-US ] = "Rename" ;
 };
+String STR_CATEGORY_RENAME
+{
+Text [ en-US ] = "Rename Category" ;
+};
 String STR_PROPERTIES
 {
 Text [ en-US ] = "Properties" ;
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index ee43d48..4d23086 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -71,9 +71,10 @@ const char VIEWBAR_REPOSITORY[] = "repository";
 const char ACTIONBAR_ACTION[] = "action_menu";
 
 #define MNI_ACTION_NEW_FOLDER 1
-#define MNI_ACTION_DELETE_FOLDER 2
-#define MNI_ACTION_REFRESH   3
-#define MNI_ACTION_DEFAULT   3
+#define MNI_ACTION_RENAME_FOLDER 2
+#define MNI_ACTION_DELETE_FOLDER 3
+#define MNI_ACTION_REFRESH   4
+#define MNI_ACTION_DEFAULT   5
 #define MNI_REPOSITORY_LOCAL 1
 #define MNI_REPOSITORY_NEW   2
 #define MNI_REPOSITORY_BASE  3
@@ -185,6 +186,8 @@ SfxTemplateManagerDlg::SfxTemplateManagerDlg(vcl::Window 
*parent)
 mpActionMenu->InsertItem(MNI_ACTION_NEW_FOLDER,
 SfxResId(STR_CATEGORY_NEW).toString(),
 Image(SfxResId(IMG_ACTION_REFRESH)));
+mpActionMenu->InsertItem(MNI_ACTION_RENAME_FOLDER,
+SfxResId(STR_CATEGORY_RENAME).toString());
 mpActionMenu->InsertItem(MNI_ACTION_DELETE_FOLDER,
 SfxResId(STR_CATEGORY_DELETE).toString());
 mpActionMenu->InsertSeparator();
@@ -567,6 +570,9 @@ IMPL_LINK_TYPED(SfxTemplateManagerDlg, MenuSelectHdl, 
Menu*, pMenu, bool)
 case MNI_ACTION_NEW_FOLDER:
 OnCategoryNew();
 break;
+case MNI_ACTION_RENAME_FOLDER:
+OnCategoryRename();
+break;
 case MNI_ACTION_DEL

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

2016-05-30 Thread Miklos Vajna
 sw/source/core/inc/txtfrm.hxx  |4 ++--
 sw/source/core/text/txtfrm.cxx |   10 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit aab59c3c17ce16882864fe41056ad6c1c850c953
Author: Miklos Vajna 
Date:   Mon May 30 09:13:39 2016 +0200

sw: prefix members of SwLayoutModeModifier

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

diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index bd32500..567bd19 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -793,8 +793,8 @@ public:
 
 class SwLayoutModeModifier
 {
-const OutputDevice& rOut;
-ComplexTextLayoutMode nOldLayoutMode;
+const OutputDevice& m_rOut;
+ComplexTextLayoutMode m_nOldLayoutMode;
 public:
 SwLayoutModeModifier( const OutputDevice& rOutp );
 ~SwLayoutModeModifier();
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 1250d4b..1200721 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -288,26 +288,26 @@ void SwTextFrame::SwitchLTRtoRTL( Point& rPoint ) const
 }
 
 SwLayoutModeModifier::SwLayoutModeModifier( const OutputDevice& rOutp ) :
-rOut( rOutp ), nOldLayoutMode( rOutp.GetLayoutMode() )
+m_rOut( rOutp ), m_nOldLayoutMode( rOutp.GetLayoutMode() )
 {
 }
 
 SwLayoutModeModifier::~SwLayoutModeModifier()
 {
-const_cast(rOut).SetLayoutMode( nOldLayoutMode );
+const_cast(m_rOut).SetLayoutMode( m_nOldLayoutMode );
 }
 
 void SwLayoutModeModifier::Modify( bool bChgToRTL )
 {
-const_cast(rOut).SetLayoutMode( bChgToRTL ?
+const_cast(m_rOut).SetLayoutMode( bChgToRTL ?
  TEXT_LAYOUT_BIDI_STRONG | 
TEXT_LAYOUT_BIDI_RTL :
  TEXT_LAYOUT_BIDI_STRONG );
 }
 
 void SwLayoutModeModifier::SetAuto()
 {
-const ComplexTextLayoutMode nNewLayoutMode = nOldLayoutMode & 
~TEXT_LAYOUT_BIDI_STRONG;
-const_cast(rOut).SetLayoutMode( nNewLayoutMode );
+const ComplexTextLayoutMode nNewLayoutMode = m_nOldLayoutMode & 
~TEXT_LAYOUT_BIDI_STRONG;
+const_cast(m_rOut).SetLayoutMode( nNewLayoutMode );
 }
 
 SwDigitModeModifier::SwDigitModeModifier( const OutputDevice& rOutp, 
LanguageType eCurLang ) :
___
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/inc sc/source

2016-05-30 Thread Eike Rathke
 sc/inc/document.hxx|2 +-
 sc/source/core/data/document.cxx   |2 +-
 sc/source/core/data/document10.cxx |7 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit 800920a7b0600b1677d231c514345fe9f6687d82
Author: Eike Rathke 
Date:   Mon May 30 18:30:48 2016 +0200

Resolves: tdf#97158 CopyOneCellFromClip() does not handle multiple sheets

... so check that and bail out to let the remainder of CopyFromClip()
handle it.

Change-Id: I9d139de905fd108ae41fed79a38860058525272c
(cherry picked from commit dc9eac5a5f4f247ba5efb67931ffde61f2c8d5b6)
Reviewed-on: https://gerrit.libreoffice.org/25678
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 5696f26..01eadaf 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1419,7 +1419,7 @@ public:
 sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, 
sc::ColumnSpanSet& rBroadcastSpans );
 
 bool CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 );
+sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, 
SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void CopyBlockFromClip(
 sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2,
 const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index f5ad18c..224908d 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2806,7 +2806,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, 
const ScMarkData& rMar
 else
 DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag, false, 
&aBroadcastSpans);
 
-if (CopyOneCellFromClip(aCxt, nCol1, nRow1, nCol2, nRow2))
+if (CopyOneCellFromClip(aCxt, rMark, nCol1, nRow1, nCol2, nRow2))
 continue;
 
 SCCOL nC1 = nCol1;
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 59aff13..e99d0b4 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -65,7 +65,7 @@ void ScDocument::DeleteBeforeCopyFromClip(
 }
 
 bool ScDocument::CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 )
+sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2 )
 {
 ScDocument* pClipDoc = rCxt.getClipDoc();
 if (pClipDoc->GetClipParam().mbCutMode)
@@ -82,6 +82,11 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
+if (rCxt.getClipDoc()->maTabs.size() > 1 || rMark.GetSelectCount() > 1)
+// Copying from multiple source sheets or to multiple destination
+// sheets is not handled here.
+return false;
+
 ScAddress aSrcPos = aClipRange.aStart;
 
 for (SCCOL nCol = aClipRange.aStart.Col(); nCol <= aClipRange.aEnd.Col(); 
++nCol)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Update to Firebird 3.0

2016-05-30 Thread Bunth Tamás
Hello,

I submitted my first changes, you can find it here:

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

It's not ready yet, but it builds successfully for me on Linux.

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


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

2016-05-30 Thread Caolán McNamara
 filter/source/xsltfilter/LibXSLTTransformer.cxx |   26 ++---
 filter/source/xsltfilter/LibXSLTTransformer.hxx |   69 +++-
 2 files changed, 53 insertions(+), 42 deletions(-)

New commits:
commit 2805adb0d3cf68d7def01a93bf07fb2e8121ec10
Author: Caolán McNamara 
Date:   Mon May 30 17:47:06 2016 +0100

Resolves: tdf#100057 force libxslt to give up when we cancel a 
transformation

we're already using libxslt internals, so using XSLT_STATE_STOPPED isn't an
additional exposure

This probably isn't all that useful to the original reporter in terms of
importing useful data, but it does turn a hopeless situation into something
that can be cancelled.

Change-Id: I08e9a1dcd9ee78e1804faec500bbcca36a546988

diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx 
b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 3dbe7a4..55f1920 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -203,7 +203,8 @@ namespace XSLT
 
 Reader::Reader(LibXSLTTransformer* transformer) :
 Thread("LibXSLTTransformer"), m_transformer(transformer),
-m_readBuf(INPUT_BUFFER_SIZE), m_writeBuf(OUTPUT_BUFFER_SIZE)
+m_readBuf(INPUT_BUFFER_SIZE), m_writeBuf(OUTPUT_BUFFER_SIZE),
+m_tcontext(nullptr)
 {
 LIBXML_TEST_VERSION;
 }
@@ -288,7 +289,6 @@ namespace XSLT
 xsltStylesheetPtr styleSheet = xsltParseStylesheetFile(
 reinterpret_cast(m_transformer->getStyleSheetURL().getStr()));
 xmlDocPtr result = nullptr;
-xsltTransformContextPtr tcontext = nullptr;
 exsltRegisterAll();
 registerExtensionModule();
 #ifdef DEBUG_FILTER_LIBXSLTTRANSFORMER
@@ -298,11 +298,11 @@ namespace XSLT
 std::unique_ptr oh(new 
OleHandler(m_transformer->getComponentContext()));
 if (styleSheet)
 {
-tcontext = xsltNewTransformContext(styleSheet, doc);
-tcontext->_private = static_cast (oh.get());
-xsltQuoteUserParams(tcontext, ¶ms[0]);
+m_tcontext = xsltNewTransformContext(styleSheet, doc);
+m_tcontext->_private = static_cast (oh.get());
+xsltQuoteUserParams(m_tcontext, ¶ms[0]);
 result = xsltApplyStylesheetUser(styleSheet, doc, nullptr, 
nullptr, nullptr,
-tcontext);
+ m_tcontext);
 }
 
 if (result)
@@ -330,7 +330,8 @@ namespace XSLT
 closeOutput();
 oh.reset();
 xsltFreeStylesheet(styleSheet);
-xsltFreeTransformContext(tcontext);
+xsltFreeTransformContext(m_tcontext);
+m_tcontext = nullptr;
 xmlFreeDoc(doc);
 xmlFreeDoc(result);
 }
@@ -351,6 +352,16 @@ namespace XSLT
 
 }
 
+void Reader::forceStateStopped()
+{
+if (!m_tcontext)
+return;
+//tdf#100057 If we force a cancel, libxslt will of course just keep on 
going unless something
+//tells it to stop. Here we force the stopped state so that libxslt 
will stop processing
+//and so Reader::execute will complete and we can join cleanly
+m_tcontext->state = XSLT_STATE_STOPPED;
+}
+
 Reader::~Reader()
 {
 }
@@ -455,6 +466,7 @@ namespace XSLT
 if (m_Reader.is())
 {
 m_Reader->terminate();
+m_Reader->forceStateStopped();
 m_Reader->join();
 }
 m_Reader.clear();
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx 
b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index d276018..9c4485b 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -47,6 +47,36 @@ using ::std::map;
 namespace XSLT
 {
 
+class LibXSLTTransformer;
+
+/*
+ * Reader provides a worker thread to perform the actual transformation.
+ * It pipes the streams provided by a LibXSLTTransformer
+ * instance through libxslt.
+ */
+class Reader : public salhelper::Thread
+{
+public:
+Reader(LibXSLTTransformer* transformer);
+int SAL_CALL read(char * buffer, int len);
+int SAL_CALL write(const char * buffer, int len);
+void forceStateStopped();
+int SAL_CALL closeOutput();
+
+private:
+virtual ~Reader();
+
+static const sal_Int32 OUTPUT_BUFFER_SIZE;
+static const sal_Int32 INPUT_BUFFER_SIZE;
+LibXSLTTransformer* m_transformer;
+Sequence m_readBuf;
+Sequence m_writeBuf;
+xsltTransformContextPtr m_tcontext;
+
+virtual void execute() override;
+static void SAL_CALL registerExtensionModule();
+};
+
 /*
  * LibXSLTTransformer provides an transforming pipe service to XSLTFilter.
  *
@@ -85,13 +115,14 @@ namespace XSLT
 
 ::std::map m_parameters;
 
-

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

2016-05-30 Thread Eike Rathke
 sc/inc/document.hxx|2 +-
 sc/source/core/data/document.cxx   |2 +-
 sc/source/core/data/document10.cxx |7 ++-
 3 files changed, 8 insertions(+), 3 deletions(-)

New commits:
commit dc9eac5a5f4f247ba5efb67931ffde61f2c8d5b6
Author: Eike Rathke 
Date:   Mon May 30 18:30:48 2016 +0200

Resolves: tdf#97158 CopyOneCellFromClip() does not handle multiple sheets

... so check that and bail out to let the remainder of CopyFromClip()
handle it.

Change-Id: I9d139de905fd108ae41fed79a38860058525272c

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 5696f26..01eadaf 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1419,7 +1419,7 @@ public:
 sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, 
sc::ColumnSpanSet& rBroadcastSpans );
 
 bool CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 );
+sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, 
SCROW nRow1, SCCOL nCol2, SCROW nRow2 );
 void CopyBlockFromClip(
 sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2,
 const ScMarkData& rMark, SCsCOL nDx, SCsROW nDy );
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index 68b1f8f..af943d4 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -2806,7 +2806,7 @@ void ScDocument::CopyFromClip( const ScRange& rDestRange, 
const ScMarkData& rMar
 else
 DeleteArea(nCol1, nRow1, nCol2, nRow2, rMark, nDelFlag, false, 
&aBroadcastSpans);
 
-if (CopyOneCellFromClip(aCxt, nCol1, nRow1, nCol2, nRow2))
+if (CopyOneCellFromClip(aCxt, rMark, nCol1, nRow1, nCol2, nRow2))
 continue;
 
 SCCOL nC1 = nCol1;
diff --git a/sc/source/core/data/document10.cxx 
b/sc/source/core/data/document10.cxx
index 59aff13..e99d0b4 100644
--- a/sc/source/core/data/document10.cxx
+++ b/sc/source/core/data/document10.cxx
@@ -65,7 +65,7 @@ void ScDocument::DeleteBeforeCopyFromClip(
 }
 
 bool ScDocument::CopyOneCellFromClip(
-sc::CopyFromClipContext& rCxt, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, 
SCROW nRow2 )
+sc::CopyFromClipContext& rCxt, const ScMarkData& rMark, SCCOL nCol1, SCROW 
nRow1, SCCOL nCol2, SCROW nRow2 )
 {
 ScDocument* pClipDoc = rCxt.getClipDoc();
 if (pClipDoc->GetClipParam().mbCutMode)
@@ -82,6 +82,11 @@ bool ScDocument::CopyOneCellFromClip(
 if (nDestColSize < nSrcColSize)
 return false;
 
+if (rCxt.getClipDoc()->maTabs.size() > 1 || rMark.GetSelectCount() > 1)
+// Copying from multiple source sheets or to multiple destination
+// sheets is not handled here.
+return false;
+
 ScAddress aSrcPos = aClipRange.aStart;
 
 for (SCCOL nCol = aClipRange.aStart.Col(); nCol <= aClipRange.aEnd.Col(); 
++nCol)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 include/comphelper/extract.hxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 00a45faf5ef929572c6f0df686716aec991503be
Author: Stephan Bergmann 
Date:   Mon May 30 18:31:43 2016 +0200

Fix int2enum

* The data argument to the Any ctor call needs to point at sal_Int32, not 
int.

* All calls to int2enum guarantee that rType is an enum type, so assert 
that.

Change-Id: I0ccd498420638fee80aeeccc93d9c1e3309f83b0

diff --git a/include/comphelper/extract.hxx b/include/comphelper/extract.hxx
index 4584954..2b5ae0a 100644
--- a/include/comphelper/extract.hxx
+++ b/include/comphelper/extract.hxx
@@ -19,6 +19,10 @@
 #ifndef INCLUDED_COMPHELPER_EXTRACT_HXX
 #define INCLUDED_COMPHELPER_EXTRACT_HXX
 
+#include 
+
+#include 
+
 #include 
 #include 
 #include 
@@ -38,12 +42,8 @@ namespace cppu
 inline css::uno::Any SAL_CALL int2enum(
 sal_Int32 nEnum, const css::uno::Type & rType )
 {
-if (rType.getTypeClass() == css::uno::TypeClass_ENUM)
-{
-int nVal = nEnum;
-return css::uno::Any( &nVal, rType );
-}
-return css::uno::Any();
+assert(rType.getTypeClass() == css::uno::TypeClass_ENUM);
+return css::uno::Any( &nEnum, rType );
 }
 
 /**
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 forms/source/component/DatabaseForm.cxx |4 ++--
 sd/source/ui/unoidl/unopage.cxx |   10 +++---
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit d8545e78e7d27bb704cef9befa3cc0ff65c68bb3
Author: Stephan Bergmann 
Date:   Mon May 30 18:30:40 2016 +0200

Simplifiy unnecessary uses of int2enum

Change-Id: Ic811eac425717f7eac018dfd90c46bd72267c697

diff --git a/forms/source/component/DatabaseForm.cxx 
b/forms/source/component/DatabaseForm.cxx
index 395b281..55b2353 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -3977,7 +3977,7 @@ void SAL_CALL ODatabaseForm::read(const 
Reference& _rxInStre
 if (nVersion > 1)
 {
 sal_Int32 nCycle = _rxInStream->readShort();
-m_aCycle = ::cppu::int2enum(nCycle, 
cppu::UnoType::get());
+m_aCycle <<= TabulatorCycle(nCycle);
 m_eNavigation = (NavigationBarMode)_rxInStream->readShort();
 
 _rxInStream >> sAggregateProp;
@@ -3995,7 +3995,7 @@ void SAL_CALL ODatabaseForm::read(const 
Reference& _rxInStre
 if (nAnyMask & CYCLE)
 {
 sal_Int32 nCycle = _rxInStream->readShort();
-m_aCycle = ::cppu::int2enum(nCycle, 
cppu::UnoType::get());
+m_aCycle <<= TabulatorCycle(nCycle);
 }
 else
 m_aCycle.clear();
diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx
index 4db7930..cd550d8 100644
--- a/sd/source/ui/unoidl/unopage.cxx
+++ b/sd/source/ui/unoidl/unopage.cxx
@@ -1041,10 +1041,13 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const 
OUString& PropertyName )
 aAny <<= (sal_Int32)( GetPage()->GetSize().getHeight() );
 break;
 case WID_PAGE_ORIENT:
-aAny = ::cppu::int2enum( (sal_Int32)((GetPage()->GetOrientation() == 
ORIENTATION_PORTRAIT)? view::PaperOrientation_PORTRAIT: 
view::PaperOrientation_LANDSCAPE), 
::cppu::UnoType::get() );
+aAny <<= view::PaperOrientation(
+GetPage()->GetOrientation() == ORIENTATION_PORTRAIT
+? view::PaperOrientation_PORTRAIT
+: view::PaperOrientation_LANDSCAPE);
 break;
 case WID_PAGE_EFFECT:
-aAny = ::cppu::int2enum( (sal_Int32)GetPage()->GetFadeEffect(), 
::cppu::UnoType::get() );
+aAny <<= presentation::FadeEffect(GetPage()->GetFadeEffect());
 break;
 case WID_PAGE_CHANGE:
 aAny <<= (sal_Int32)( GetPage()->GetPresChange() );
@@ -1052,7 +1055,8 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const 
OUString& PropertyName )
 case WID_PAGE_SPEED:
 {
 const double fDuration = GetPage()->getTransitionDuration();
-aAny = ::cppu::int2enum( fDuration < 2.0 ? 2 : (fDuration > 2.0 ? 
0 : 1), ::cppu::UnoType::get() );
+aAny <<= presentation::AnimationSpeed(
+fDuration < 2.0 ? 2 : fDuration > 2.0 ? 0 : 1);
 }
 break;
 case WID_PAGE_LAYOUT:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


GSoC Report

2016-05-30 Thread Jakub Trzebiatowski

Dear Community,

I'm working on a table styles as a GSoC project. My first goal is 
to make

existing table styles export and import.
I have started with a core part of table styles - adding them to 
Writer's

UNO API.

Summary of first week:
- Modifified sw_python tests to cover table styles
- Added TableStyles style family
- Implemented getCount, getByIndex, getElementNames, getByName in 
TableStyle

family
- Modified stylesheets iterator to consider table style family.

- Added SwXTextTableStyle class
- A wrapper for internal SwTableAutoFormat class
- A container containing 10 cell styles:
"first-row", "last-row", "first-column", "last-column", "body",
"even-rows", "odd-rows", "even-columns", "odd-columns", 
"background"


Patches can be found here:
https://gerrit.libreoffice.org/#/c/25351/
https://gerrit.libreoffice.org/#/c/25410/
https://gerrit.libreoffice.org/#/c/25558/

If you have any remarks and/or suggestions, please share.

Regards,
Jakub Trzebiatowski, irc: ubap

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


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

2016-05-30 Thread Jan Holesovsky
 include/vcl/scheduler.hxx|9 -
 vcl/source/app/idle.cxx  |   27 ++-
 vcl/source/app/scheduler.cxx |   12 
 3 files changed, 46 insertions(+), 2 deletions(-)

New commits:
commit 7780f96c345c61fff767696a599b2ecd963209d7
Author: Jan Holesovsky 
Date:   Mon May 30 17:57:10 2016 +0200

Switch deterministic scheduling on.

Change-Id: Ie735d6456086933eb84a6088782ee55f1c1ef185

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index efb65ca..3f7e0bf6 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -174,7 +174,7 @@ bool Scheduler::ProcessTaskScheduling( bool bTimerOnly )
 return false;
 }
 
-static bool g_bDeterministicMode = false;
+static bool g_bDeterministicMode = true;
 
 void Scheduler::SetDeterministicMode(bool bDeterministic)
 {
commit 293dd3660bb7a9154ce602ee644f9605c5313961
Author: Jan Holesovsky 
Date:   Mon May 30 17:36:37 2016 +0200

tdf#100092: Implement deterministic scheduling.

With this, two subsequent runs of LibreOffice trigger about the same amount 
of
events.

Change-Id: I92566ef4eee20e7d604cfd48f01c4df30c77e653

diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index 95303ee..ee83c1e 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -53,6 +53,7 @@ protected:
 // These should be constexpr static, when supported.
 static const sal_uInt64 ImmediateTimeoutMs = 1;
 static const sal_uInt64 MaximumTimeoutMs = 1000 * 60; // 1 minute
+static const sal_uInt64 InfiniteTimeoutMs = 1000 * 60 * 60 * 24; // 1 day
 
 static void ImplStartTimer(sal_uInt64 nMS, bool bForce = false);
 
@@ -90,7 +91,7 @@ public:
 Scheduler&  operator=( const Scheduler& rScheduler );
 static void ImplDeInitScheduler();
 
-// Process one pending Timer with highhest priority
+/// Process one pending Timer with highhest priority
 static void CallbackTaskScheduling( bool ignore );
 /// Calculate minimum timeout - and return its value.
 static sal_uInt64 CalculateMinimumTimeout( bool &bHasActiveIdles );
@@ -98,6 +99,12 @@ public:
 static bool   ProcessTaskScheduling( bool bTimerOnly );
 /// Process all events until we are idle
 static void   ProcessEventsToIdle();
+
+/// Control the deterministic mode.  In this mode, two subsequent runs of
+/// LibreOffice fire about the same amount idles.
+static void SetDeterministicMode(bool bDeterministic);
+/// Return the current state of deterministic mode.
+static bool GetDeterministicMode();
 };
 
 #endif // INCLUDED_VCL_SCHEDULER_HXX
diff --git a/vcl/source/app/idle.cxx b/vcl/source/app/idle.cxx
index 123f37a..587e05f 100644
--- a/vcl/source/app/idle.cxx
+++ b/vcl/source/app/idle.cxx
@@ -44,7 +44,23 @@ Idle::Idle( const Idle& rIdle ) : Scheduler(rIdle)
 void Idle::Start()
 {
 Scheduler::Start();
-Scheduler::ImplStartTimer(Scheduler::ImmediateTimeoutMs);
+
+sal_uInt64 nPeriod = Scheduler::ImmediateTimeoutMs;
+if (Scheduler::GetDeterministicMode())
+{
+switch (mePriority)
+{
+case SchedulerPriority::LOW:
+case SchedulerPriority::LOWER:
+case SchedulerPriority::LOWEST:
+nPeriod = Scheduler::InfiniteTimeoutMs;
+break;
+default:
+break;
+}
+}
+
+Scheduler::ImplStartTimer(nPeriod);
 }
 
 bool Idle::ReadyForSchedule( bool bTimerOnly, sal_uInt64 /* nTimeNow */ ) const
@@ -67,6 +83,15 @@ sal_uInt64 Idle::UpdateMinPeriod( sal_uInt64 nMinPeriod, 
sal_uInt64 /* nTime */
 case SchedulerPriority::REPAINT:
 nMinPeriod = ImmediateTimeoutMs; // don't wait.
 break;
+case SchedulerPriority::LOW:
+case SchedulerPriority::LOWER:
+case SchedulerPriority::LOWEST:
+if (Scheduler::GetDeterministicMode())
+{
+nMinPeriod = Scheduler::InfiniteTimeoutMs;
+break;
+}
+// fall-through intended
 default:
 // FIXME: tdf#92036 workaround, I should be 1 too - wait 5ms
 if (nMinPeriod > 5) // only shrink the min. period if nothing is 
quicker.
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 879ca42..efb65ca 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -174,6 +174,18 @@ bool Scheduler::ProcessTaskScheduling( bool bTimerOnly )
 return false;
 }
 
+static bool g_bDeterministicMode = false;
+
+void Scheduler::SetDeterministicMode(bool bDeterministic)
+{
+g_bDeterministicMode = bDeterministic;
+}
+
+bool Scheduler::GetDeterministicMode()
+{
+return g_bDeterministicMode;
+}
+
 sal_uInt64 Scheduler::CalculateMinimumTimeout( bool &bHasActiveIdles )
 {
 // process all pending Tasks
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.fr

Unification of Text Layout Week 1

2016-05-30 Thread Akash Jain
During the first week, I have added platform independent experimental
support for building HarfBuzz using the --with-harfbuzz flag.
I am also working on the new layout class. Most of the work has been
in extending the platform specific faces to supply the new layout
class with the required data.
This is finished. I will continue working on the new class in the current week.

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


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

2016-05-30 Thread Michael Stahl
 external/boost/UnpackedTarball_boost.mk |3 +
 external/boost/boost.gcc47679.patch |   63 
 2 files changed, 66 insertions(+)

New commits:
commit ac5fd13937a6eb708c45064948219b0ade040641
Author: Michael Stahl 
Date:   Mon May 30 17:49:20 2016 +0200

boost: restore boost.gcc47679.patch

One of the tinderboxes fails with mysterious warning:

include/tools/gen.hxx:418:36: error: '*((void*)& aViewportExt +16)' may
be used uninitialized in this function [-Werror=maybe-uninitialized]
 nBottom = rSize.Height() ? nTop+rSize.Height()-1 : RECT_EMPTY;

Change-Id: I62bf99d1a623ba4bd9d7db5fe049366d0f20e26f

diff --git a/external/boost/UnpackedTarball_boost.mk 
b/external/boost/UnpackedTarball_boost.mk
index 60d4a03..604f882 100644
--- a/external/boost/UnpackedTarball_boost.mk
+++ b/external/boost/UnpackedTarball_boost.mk
@@ -9,6 +9,9 @@
 
 boost_patches :=
 
+#http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679
+boost_patches += boost.gcc47679.patch
+
 #https://svn.boost.org/trac/boost/ticket/6142
 boost_patches += boost.6142.warnings.patch.1
 
diff --git a/external/boost/boost.gcc47679.patch 
b/external/boost/boost.gcc47679.patch
new file mode 100644
index 000..06cbd0f
--- /dev/null
+++ b/external/boost/boost.gcc47679.patch
@@ -0,0 +1,63 @@
+diff -ru boost.orig/boost/optional/optional.hpp 
boost/boost/optional/optional.hpp
+--- foo/misc/boost.orig/boost/optional/optional.hpp2015-07-18 
11:27:36.168127029 +0200
 foo/misc/boost/boost/optional/optional.hpp 2015-07-18 20:36:13.777997833 
+0200
+@@ -53,6 +53,8 @@
+ 
+ #include 
+ 
++#include 
++
+ #if (defined BOOST_NO_CXX11_RVALUE_REFERENCES) || (defined 
BOOST_OPTIONAL_CONFIG_NO_RVALUE_REFERENCES)
+ #define BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ #endif
+@@ -134,6 +136,11 @@
+ 
+   public:
+ 
++aligned_storage()
++{
++  memset(&dummy_, 0, sizeof(dummy_));
++}
++
+ #if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+ void const* address() const { return &dummy_; }
+ void  * address()   { return &dummy_; }
+diff -ru 
boost.orig/boost/spirit/home/classic/core/primitives/impl/numerics.ipp 
boost/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
+--- 
foo/misc/boost.orig/boost/spirit/home/classic/core/primitives/impl/numerics.ipp 
   2015-07-18 11:27:36.169127029 +0200
 foo/misc/boost/boost/spirit/home/classic/core/primitives/impl/numerics.ipp 
2015-07-18 20:34:32.110998976 +0200
+@@ -218,6 +218,19 @@
+ }
+ }
+ };
++template 
++struct negative_accumulate
++{
++//  Use this accumulator if number is negative
++static bool add(unsigned char& n, unsigned digit)
++{
++n *= Radix;
++if (n < digit)
++return false;
++n -= digit;
++return true;
++}
++};
+ 
+ template 
+ inline bool allow_more_digits(std::size_t i)
+diff -ru boost.orig/boost/utility/compare_pointees.hpp 
boost/boost/utility/compare_pointees.hpp
+--- foo/misc/boost.orig/boost/utility/compare_pointees.hpp 2015-02-27 
07:26:11.0 +0100
 foo/misc/boost/boost/utility/compare_pointees.hpp  2015-07-18 
20:20:41.388988458 +0200
+@@ -29,7 +29,11 @@
+ inline
+ bool equal_pointees ( OptionalPointee const& x, OptionalPointee const& y )
+ {
+-  return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ;
++  if (!x && !y)
++return true;
++  if (!x || !y)
++return false;
++  return (*x) == (*y);
+ }
+ 
+ template
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-1-0' - loolwsd/loolwsd.spec.in loolwsd/Makefile.am loolwsd/robots.txt

2016-05-30 Thread Andras Timar
 loolwsd/Makefile.am |4 +++-
 loolwsd/loolwsd.spec.in |1 +
 loolwsd/robots.txt  |2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 6f7f7a99780168a821748c750ed2f6036874a16e
Author: Andras Timar 
Date:   Mon May 30 17:40:40 2016 +0200

loolwsd: add robots.txt (compliance)

(cherry picked from commit c542fedd0c30cb949cd8bcb13262cd47fd2e8271)

diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 298909a..bcfc07d 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -8,7 +8,8 @@ dist_bin_SCRIPTS = loolwsd-systemplate-setup
 
 loolwsddatadir = @LOOLWSD_DATADIR@
 
-loolwsddata_DATA = discovery.xml
+loolwsddata_DATA = discovery.xml \
+   robots.txt
 
 loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
 
@@ -112,6 +113,7 @@ noinst_HEADERS = Admin.hpp \
 EXTRA_DIST = discovery.xml \
  loolwsd.xml.in \
  loolwsd.service \
+ robots.txt \
  sysconfig.loolwsd \
  etc/key.pem \
  etc/cert.pem \
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 3b44edc..7dd638d 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -92,6 +92,7 @@ tar cf - . | (cd %{buildroot}/usr/share/loolwsd/loleaflet && 
tar xf -)
 /usr/bin/loolmount
 /usr/bin/looltool
 /usr/share/loolwsd/discovery.xml
+/usr/share/loolwsd/robots.txt
 /usr/share/loolwsd/loleaflet
 %{_unitdir}/loolwsd.service
 %if 0%{?fedora} || 0%{?rhel} >= 7
diff --git a/loolwsd/robots.txt b/loolwsd/robots.txt
new file mode 100644
index 000..1f53798
--- /dev/null
+++ b/loolwsd/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/loolwsd.spec.in loolwsd/Makefile.am loolwsd/robots.txt

2016-05-30 Thread Andras Timar
 loolwsd/Makefile.am |4 +++-
 loolwsd/loolwsd.spec.in |1 +
 loolwsd/robots.txt  |2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit c542fedd0c30cb949cd8bcb13262cd47fd2e8271
Author: Andras Timar 
Date:   Mon May 30 17:40:40 2016 +0200

loolwsd: add robots.txt (compliance)

diff --git a/loolwsd/Makefile.am b/loolwsd/Makefile.am
index 5036c53..8f03e35 100644
--- a/loolwsd/Makefile.am
+++ b/loolwsd/Makefile.am
@@ -8,7 +8,8 @@ dist_bin_SCRIPTS = loolwsd-systemplate-setup
 
 loolwsddatadir = @LOOLWSD_DATADIR@
 
-loolwsddata_DATA = discovery.xml
+loolwsddata_DATA = discovery.xml \
+   robots.txt
 
 loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
 
@@ -115,6 +116,7 @@ noinst_HEADERS = Admin.hpp \
 EXTRA_DIST = discovery.xml \
  loolwsd.xml.in \
  loolwsd.service \
+ robots.txt \
  sysconfig.loolwsd \
  etc/key.pem \
  etc/cert.pem \
diff --git a/loolwsd/loolwsd.spec.in b/loolwsd/loolwsd.spec.in
index 3b44edc..7dd638d 100644
--- a/loolwsd/loolwsd.spec.in
+++ b/loolwsd/loolwsd.spec.in
@@ -92,6 +92,7 @@ tar cf - . | (cd %{buildroot}/usr/share/loolwsd/loleaflet && 
tar xf -)
 /usr/bin/loolmount
 /usr/bin/looltool
 /usr/share/loolwsd/discovery.xml
+/usr/share/loolwsd/robots.txt
 /usr/share/loolwsd/loleaflet
 %{_unitdir}/loolwsd.service
 %if 0%{?fedora} || 0%{?rhel} >= 7
diff --git a/loolwsd/robots.txt b/loolwsd/robots.txt
new file mode 100644
index 000..1f53798
--- /dev/null
+++ b/loolwsd/robots.txt
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bin/gen-boost-headers cui/source editeng/source include/editeng sc/source svx/source sw/source

2016-05-30 Thread Michael Stahl
 bin/gen-boost-headers   |   57 
 cui/source/tabpages/border.cxx  |2 
 editeng/source/items/frmitems.cxx   |   14 ++---
 editeng/source/rtf/rtfitem.cxx  |2 
 include/editeng/boxitem.hxx |6 +-
 sc/source/core/data/document.cxx|2 
 sc/source/core/data/stlpool.cxx |2 
 sc/source/ui/unoobj/cellsuno.cxx|4 -
 svx/source/svdraw/svdattr.cxx   |2 
 svx/source/table/cell.cxx   |4 -
 sw/source/core/doc/DocumentStylePoolManager.cxx |2 
 sw/source/core/doc/tblafmt.cxx  |4 -
 sw/source/core/docnode/ndtbl.cxx|3 -
 sw/source/core/docnode/ndtbl1.cxx   |2 
 sw/source/core/edit/autofmt.cxx |2 
 sw/source/core/unocore/unotbl.cxx   |6 +-
 sw/source/filter/html/htmlcss1.cxx  |4 -
 sw/source/filter/html/htmltab.cxx   |6 +-
 sw/source/filter/ww8/docxattributeoutput.cxx|2 
 sw/source/filter/ww8/rtfattributeoutput.cxx |2 
 sw/source/ui/frmdlg/column.cxx  |   10 ++--
 sw/source/uibase/shells/frmsh.cxx   |5 +-
 sw/source/uibase/shells/tabsh.cxx   |4 +
 sw/source/uibase/uiview/viewtab.cxx |7 +-
 24 files changed, 108 insertions(+), 46 deletions(-)

New commits:
commit 84fb4be390a7a09c27f3aa1f004c022f0cdc192a
Author: Michael Stahl 
Date:   Mon May 30 15:25:26 2016 +0200

editeng: rename misleading SvxBoxItem::GetDistance()/SetDistance()

Change-Id: Iea61f2de2b907974bbb05c66abf6cdaeab87b8b2

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index c999db8..5ea3bdc 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -496,7 +496,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
 nDefDist != nRightDist ||
 nDefDist != nTopDist   ||
 nDefDist != nBottomDist);
-if((pBoxItem->GetDistance() ||
+if ((pBoxItem->GetSmallestDistance() ||
 bIsAnyBorderVisible) && bDiffDist )
 {
 m_pLeftMF->SetModifyFlag();
diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index f976697..58a118c 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1669,7 +1669,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 aSeq[1] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetRight(), 
bConvert) );
 aSeq[2] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetBottom(), 
bConvert) );
 aSeq[3] = uno::makeAny( SvxBoxItem::SvxLineToLine(GetTop(), 
bConvert) );
-aSeq[4] <<= uno::makeAny( (sal_Int32)(bConvert ? 
convertTwipToMm100( GetDistance()) : GetDistance()));
+aSeq[4] <<= uno::makeAny( (sal_Int32)(bConvert ? 
convertTwipToMm100( GetSmallestDistance()) : GetSmallestDistance()));
 aSeq[5] <<= uno::makeAny( (sal_Int32)(bConvert ? 
convertTwipToMm100( nTopDist ) : nTopDist ));
 aSeq[6] <<= uno::makeAny( (sal_Int32)(bConvert ? 
convertTwipToMm100( nBottomDist ) : nBottomDist ));
 aSeq[7] <<= uno::makeAny( (sal_Int32)(bConvert ? 
convertTwipToMm100( nLeftDist ) : nLeftDist ));
@@ -1694,7 +1694,7 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
 aRetLine = SvxBoxItem::SvxLineToLine(GetTop(), bConvert);
 break;
 case BORDER_DISTANCE:
-nDist = GetDistance();
+nDist = GetSmallestDistance();
 bDistMember = true;
 break;
 case TOP_BORDER_DISTANCE:
@@ -1852,7 +1852,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 if( bConvert )
 nDist = convertMm100ToTwip(nDist);
 if ( n == 4 )
-SetDistance( sal_uInt16( nDist ));
+SetAllDistances(sal_uInt16(nDist));
 else
 SetDistance( sal_uInt16( nDist ), nLines[n-5] );
 }
@@ -1951,7 +1951,7 @@ bool SvxBoxItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
 if( bConvert )
 nDist = convertMm100ToTwip(nDist);
 if( nMemberId == BORDER_DISTANCE )
-SetDistance( sal_uInt16( nDist ));
+SetAllDistances(sal_uInt16(nDist));
 else
 SetDistance( sal_uInt16( nDist ), nLine );
 }
@@ -2164,7 +2164,7 @@ bool SvxBoxItem::GetPresentation
 
 SvStream& SvxBoxItem::Store( SvStream& rStrm , sal_u

[Libreoffice-commits] core.git: configure.ac external/boost RepositoryExternal.mk

2016-05-30 Thread Michael Stahl
 RepositoryExternal.mk  |1 
 configure.ac   |7 
 external/boost/UnpackedTarball_boost.mk|   46 
 external/boost/boost.3780.aliasing.patch   |   23 
 external/boost/boost.6369.warnings.patch   |  305 
--
 external/boost/boost.date_time.Wshadow.warnings.patch  |   19 
 external/boost/boost.date_time.Wshadow.warnings.patch.1|  117 -
 external/boost/boost.gcc47679.patch|   63 
 external/boost/boost.multi_array.Wunused-local-typedefs.warnings.patch |   21 
 external/boost/boost.preprocessor.Wundef.warnings.patch|  125 -
 external/boost/boost.property_tree.Wshadow.warnings.patch.1|  320 
--
 external/boost/boost.spirit.Wshadow.warnings.patch |   71 
 external/boost/boost.spirit.Wunused-local-typedefs.warnings.patch  |   28 
 external/boost/boost.spirit.Wunused-parameter.warnings.patch   |   47 
 external/boost/boost.type_index.Wundef.warnings.patch  |   12 
 external/boost/boost.wdeprecated-auto_ptr.patch.0  |   46 
 external/boost/boost.wunused.patch |   20 
 external/boost/boost_1_44_0-unused-parameters.patch| 1169 
--
 external/boost/boost_1_59_0.iostreams.wshadow.patch|  197 -
 external/boost/boost_1_59_0.iostreams.wunused.patch|   12 
 external/boost/boost_1_59_0.multi_array.wshadow.patch  |  484 

 external/boost/boost_1_59_0.property_tree.wreturn-type.patch   |2 
 external/boost/boost_1_59_0.property_tree.wshadow.patch|  104 
 external/boost/boost_1_59_0.property_tree.wtype-limits.patch   |   19 
 external/boost/boost_1_59_0.rational.wshadow.patch |   12 
 external/boost/fallthrough.patch.0 |   46 
 external/boost/gcc6-warnings.patch.0   |   65 
 external/boost/include/boost/algorithm/string.hpp  |   23 
 external/boost/include/boost/algorithm/string/case_conv.hpp|   23 
 external/boost/include/boost/algorithm/string/classification.hpp   |   23 
 external/boost/include/boost/algorithm/string/predicate.hpp|   23 
 external/boost/include/boost/algorithm/string/split.hpp|   23 
 external/boost/include/boost/any.hpp   |   23 
 external/boost/include/boost/archive/iterators/base64_from_binary.hpp  |   23 
 external/boost/include/boost/archive/iterators/binary_from_base64.hpp  |   23 
 external/boost/include/boost/archive/iterators/remove_whitespace.hpp   |   23 
 external/boost/include/boost/archive/iterators/transform_width.hpp |   23 
 external/boost/include/boost/asio.hpp  |   23 
 external/boost/include/boost/assign.hpp|   23 
 external/boost/include/boost/bind.hpp  |   23 
 external/boost/include/boost/cast.hpp  |   23 
 external/boost/include/boost/checked_delete.hpp|   23 
 external/boost/include/boost/container/deque.hpp   |   23 
 external/boost/include/boost/cstdint.hpp   |   23 
 external/boost/include/boost/current_function.hpp  |   23 
 external/boost/include/boost/date_time.hpp |   23 
 external/boost/include/boost/date_time/posix_time/posix_time.hpp   |   23 
 external/boost/include/boost/enable_shared_from_this.hpp   |   23 
 external/boost/include/boost/filesystem.hpp|   23 
 external/boost/include/boost/filesystem/path.hpp   |   23 
 external/boost/include/boost/foreach.hpp   |   23 
 external/boost/include/boost/format.hpp|   23 
 external/boost/include/boost/function.hpp  |   23 
 external/boost/include/boost/functional/hash.hpp   |   23 
 external/boost/include/boost/fusion/adapted/std_pair.hpp   |   23 
 external/boost/include/boost/fusion/include/adapt_struct.hpp   |   23 
 external/boost/include/boost/intrusive/circular_list_algorithms.hpp|   23 
 external/boost/include/boost/intrusive_ptr.hpp |   23 
 external/boost/include/boost/io/ios_state.hpp  |   23 
 external/boost/include/boost/iostreams/device/file_descriptor.hpp  |   23 
 external/boost/include/boost/iostreams/filter/gzip.hpp |   23 
 external/boost/include/boost/iostreams/filtering_stream.hpp|   23 
 external/boos

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

2016-05-30 Thread Susobhan Ghosh
​​
The first week of GSoC is up and I'll summarize what I've done so far, and
what I'm planning to do next:

   1. Slide Background Panel for Impress - Panel has been merged to master.
   - Added listener for events (slide ch
  ​​
  ange event)
  - ​F​
  i
  ​xed​
   update sync for master slides
  - ​F​ixed
  ​
   paper orientation sync in panel.
  ​

  2. ​
   ​
   Writer Page Tab (Deck) - Marked as Experimental, Currently a stub -
   Merged to master.​
   - ​​
  Made it compile first, from last year's unfinished patch.
  - Changed pageformatpanel.ui and pagemarginpanel.ui files for Margin
  and Format Panels.
  - Developed Page Format and Margin Panels - patches up for review on
  gerrit.
  - Working on column count in Styles Panel, and header and footer
  controls for Footer and Header panel.

TO-DO:
​​


   1. Finish up on the remaining 3 panels - Styles Panel, Header Panel and
   Footer Panel.
   2. Design changes to the Writer Page Tab w.r.t. to the improvements
   suggested on the bug report (#83830).


Regards,
​​

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


Re: /usr/lib/libnss3.so: version `NSS_3.19.1' not found

2016-05-30 Thread YuGiOhJCJ Mailing-List
On Sun, 29 May 2016 13:17:14 +0100
Wols Lists  wrote:

> On 29/05/16 09:21, YuGiOhJCJ Mailing-List wrote:
> > On Sun, 29 May 2016 01:35:47 +0100
> > Wols Lists  wrote:
> > 
> >> On 24/05/16 11:26, Eike Rathke wrote:
> >>> Hi YuGiOhJCJ,
> >>>
> >>> On Thursday, 2016-05-19 17:26:21 +0200, YuGiOhJCJ Mailing-List wrote:
> >>>
> > Dumb question: how much system memory is available?
>  I have 4GB of memory:
> >>>
> >>> That certainly is not enough and it will either grind your machine to
> >>> heavily swap, or break the build / abort things if no swap is available.
> >>>
>  $ free -m
>   total   used   free sharedbuffers cached
>  Mem:  3995559   3436  0 53330
>  -/+ buffers/cache:175   3819
>  Swap:  956  0956
> >>>
> >>>
> >>>
> > And why are you building under /tmp/ and how much free disk space is
> > there?
> 
>  Well, I could do it in /home but as it is a NFS share, it is slower than 
>  in /tmp
> >>>
> >>> Ok, but as Linoel already said, using /var/tmp/ might be a better
> >>> choice. Also, if disk space is limited under /tmp/ then building there
> >>> may conflict with temporary files the compiler and linker create, which
> >>> can become quite large.
> >>
> >> Bear in mind, the LFS says that /tmp and /var/tmp behave differently. On
> >> a "correctly" configured system, the contents of /tmp are NOT guaranteed
> >> to survive a system crash. Which is why /tmp is often configured as a
> >> tmpfs. On the other hand, the contents of /var/tmp ARE guaranteed to
> >> survive, which is why vi and emacs and that sort of program all store
> >> their replay logs there ...
> >>
> >> and which is why the OP's choice of /tmp was probably correct :-)
> >> although most distros don't seem to make the /tmp directory overly
> >> large. (They also seem not to allocate much swap space.)
> >>>
>  Do you think I don't have enough memory?
>  Is there a way to require less memory while building libreoffice or 
>  should I buy more memory?
> >>>
> >>> Buy memory ;-)  at least 8GB are needed, but when building with debug
> >>> and symbols even that might result in swapping if you forgot to quit
> >>> a previous gdb session before linking Calc for example.. 12GB or having
> >>> a larger swap than just 1GB is recommended.
> >>>
> >> My rule of thumb is simple. Disk space is cheap, I allocate twice
> >> maximum ram per disk. In other words, my desktop is maxed out at 16Gb so
> >> the two disks each have a 32Gb swap partition. My laptop maxes out at
> >> 8Gb so there should be a 16Gb swap partition on the drive (actually it's
> >> 32Gb :-)
> >>
> >> The reason for that is - in the old days everybody said "swap should be
> >> twice memory" which was thought to be an old wives' tale. Then kernel
> >> 2.4 came out, and it turned out (1) that this requirement was actually
> >> part of the swap algorithm, and (2) the optimisations and hacks and
> >> whatever that enabled smaller swaps were a heap of old crufty rubbish.
> >> Linus ripped out all the hacks and vanilla 2.4 kernels started crashing
> >> everywhere they had a swapspace of less than twice ram.
> >>
> >> Obviously, new optimisations have gone in, presumably much better than
> >> before, but nowhere have I found any reference to whether the
> >> fundamental algorithm has been replaced. So I'm assuming it hasn't, and
> >> allocate at least twice ram to ensure I get top performance.
> >>
> >> Which means my fstab contains the following line
> >>
> >> tmp /tmptmpfs   size=10G,mode=0777  0 0
> >>
> >> and you'll notice the size=10G parameter, giving me a 10Gb /tmp directory.
> >>
> >> (I run gentoo, so /var/tmp/portage is also a tmpfs, and that's declared
> >> at 30Gb!)
> >>
> >> Cheers,
> >> Wol
> > 
> > In my /etc/fstab file I got this line on Slackware 14.1:
> > $ grep "tmp" /etc/fstab
> > tmpfs/dev/shm tmpfs   defaults 0   0
> > It is a bit different than your line in /etc/fstab but I don't know if that 
> > matters.
> > 
> > OK, so I see three things I can do in this order:
> > 1) Try to build libre office in an other directory than /tmp (because it is 
> > a tmpfs) and /home (because it is an NFS share)
> 
> With no size option, /tmp will default to half of ram. I would just add
> the "size" option, so change the fourth parameter to
> "size=10G,defaults", and you'll have a 10gig /tmp.
> 
> MAKE SURE that ram+swap is bigger, or a "/tmp is full" will crash your
> machine!
> 

It seems that my machine does not crash whereas currently:
 * I got this line in my /etc/fstab file:
tmpfs/dev/shm tmpfs   defaults 0   0
 * My RAM is 4GB
 * My swap is 1 GB
 * RAM + swap = 5GB
 * Calling '$ du -h /tmp' gives me a /tmp disk usage of 15GB (which is bigger 
than my RAM + swap)

Why my machine does not crash in these conditions?
___

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

2016-05-30 Thread Eike Rathke
 sc/source/core/data/table2.cxx |9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 0002249b15d0d3aa89b7eafe0791921c0427abea
Author: Eike Rathke 
Date:   Mon May 30 17:00:46 2016 +0200

remove unnecessary temporary ScRangeList copy

Change-Id: I46b9992f34820d21e4d0aa39a77cf6477648721a

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 479c17a..e6ab697 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -541,12 +541,11 @@ void ScTable::CopyToClip(
 void ScTable::CopyToClip(
 sc::CopyToClipContext& rCxt, const ScRangeList& rRanges, ScTable* pTable )
 {
-ScRangeList aRanges(rRanges);
-for ( size_t i = 0, nListSize = aRanges.size(); i < nListSize; ++i )
+for ( size_t i = 0, nListSize = rRanges.size(); i < nListSize; ++i )
 {
-ScRange* p = aRanges[ i ];
-CopyToClip(
-rCxt, p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), 
p->aEnd.Row(), pTable);
+const ScRange* p = rRanges[ i ];
+if (p)
+CopyToClip( rCxt, p->aStart.Col(), p->aStart.Row(), p->aEnd.Col(), 
p->aEnd.Row(), pTable);
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [GSoC] Weekly Report #1 - Toolbars infrastructure via .ui files

2016-05-30 Thread Jan Holesovsky
Hi Szymon,

Szymon Kłos píše v Po 30. 05. 2016 v 16:55 +0200:

> I was doing some improvements to the libcmis also (which is not related
> with my current GSoC project). I was hacking 2 Factor Authentication
> for GDrive:
> - fixed parser for the PIN request page (not merged yet)
> - changed the PIN request window

That sounds as a good use of the GSoC time too :-)

> Unfortunately I had an exam this week and still have classes at the
> university so I didn't do as much as I want.

No problem.

> Next I'm going to create controllers for slide transitions and object
> animation controls, which are helpful in the Impress.

Please do.

Overall, good progress & nice report - keep up the great work! :-)

Thank you,
Kendy

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


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

2016-05-30 Thread Tomaž Vajngerl
 vcl/inc/opengl/program.hxx |1 
 vcl/inc/openglgdiimpl.hxx  |1 
 vcl/opengl/gdiimpl.cxx |   81 -
 vcl/opengl/program.cxx |   23 ++--
 4 files changed, 78 insertions(+), 28 deletions(-)

New commits:
commit 16f87e808942a88c935754c2aabef86ee379b9b7
Author: Tomaž Vajngerl 
Date:   Fri May 27 14:24:38 2016 +0900

tdf#100080 set unused shader attribs with values, fixes GL on AMD

AMD drivers don't work well if a shader has a defined but not
enabled shader attributes. For this reason we need to make sure
that all attributes are set to some value even if the shader
doesn't use that attribute. Intel drivers, on the other hand,
crash if you enable an attribute and don't set it (set it
to null) - so we can't use this workaround.

(cherry picked from commit fdcd13c1c2b8b9fbc3480c8fa92920d8c8d4e5a7)

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

diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 2fab98c..3c194d8 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -106,6 +106,7 @@ public:
 void DrawArrays(GLenum GLenum, std::vector& aVertices);
 
 protected:
+bool EnableVertexAttrib(GLuint& rAttrib, const OString& rName);
 void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* 
pData, GLint nSize = 2 );
 GLuint GetUniformLocation( const OString& rName );
 };
diff --git a/vcl/inc/openglgdiimpl.hxx b/vcl/inc/openglgdiimpl.hxx
index da0fe69..df7b9e9 100644
--- a/vcl/inc/openglgdiimpl.hxx
+++ b/vcl/inc/openglgdiimpl.hxx
@@ -119,7 +119,6 @@ public:
 bool UseInvert(SalInvert nFlags);
 
 void DrawPoint( long nX, long nY );
-void DrawLine( double nX1, double nY1, double nX2, double nY2 );
 void DrawConvexPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, bool 
blockAA = false );
 void DrawConvexPolygon( const tools::Polygon& rPolygon, bool blockAA = 
false );
 void DrawTrapezoid( const basegfx::B2DTrapezoid& trapezoid, bool blockAA = 
false );
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 40df037..39ae806 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -613,25 +613,13 @@ void OpenGLSalGraphicsImpl::DrawPoint( long nX, long nY )
 GLfloat(nX), GLfloat(nY)
 };
 
+std::vector aExtrusion(3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 ApplyProgramMatrices(0.5f);
 mpProgram->DrawArrays(GL_POINTS, pPoint);
 CHECK_GL_ERROR();
 }
 
-void OpenGLSalGraphicsImpl::DrawLine( double nX1, double nY1, double nX2, 
double nY2 )
-{
-OpenGLZone aZone;
-
-std::vector pPoint {
-GLfloat(nX1), GLfloat(nY1),
-GLfloat(nX2), GLfloat(nY2)
-};
-
-ApplyProgramMatrices(0.5f);
-mpProgram->DrawArrays(GL_LINES, pPoint);
-CHECK_GL_ERROR();
-}
-
 namespace
 {
 
@@ -959,6 +947,8 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 
nPoints, const SalPoin
 }
 
 ApplyProgramMatrices();
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
 
@@ -1002,6 +992,8 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const 
tools::Polygon& rPolygon, b
 }
 
 ApplyProgramMatrices();
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
 
@@ -1051,6 +1043,8 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const 
basegfx::B2DTrapezoid& trapezoi
 return;
 }
 
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 ApplyProgramMatrices();
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
@@ -1164,24 +1158,23 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const 
RegionBand& rRegion )
 }
 #undef ADD_VERTICE
 
+std::vector aExtrusion(aRects.size() * 6 * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 ApplyProgramMatrices();
 mpProgram->DrawArrays(GL_TRIANGLES, aVertices);
 CHECK_GL_ERROR();
 }
 
-void OpenGLSalGraphicsImpl::DrawTextureRect( OpenGLTexture& rTexture, const 
SalTwoRect& rPosAry, bool bInverted )
+void OpenGLSalGraphicsImpl::DrawTextureRect( OpenGLTexture& /*rTexture*/, 
const SalTwoRect& rPosAry, bool /*bInverted*/ )
 {
 OpenGLZone aZone;
 
 SAL_INFO("vcl.opengl", "draw texture rect");
 
-GLfloat aTexCoord[8];
-rTexture.GetCoord( aTexCoord, rPosAry, bInverted );
-mpProgram->SetTextureCoord( aTexCoord );
 DrawRect( rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, 
rPosAry.mnDestHeight );
 }
 
-void OpenGLSalGraphicsImpl::DrawTexture( OpenGLTexture& rTexture, const 
SalTwoRect& pPosAry, boo

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

2016-05-30 Thread Szymon Kłos
Hello!

This week I've updated ui files and fixed not working controls. One of
them was the number type listbox (Calc). I had to create toolbox
controller for it and this field can be used outside sidebar now. I
also started conversion of paragraph spacing fields.

I was doing some improvements to the libcmis also (which is not related
with my current GSoC project). I was hacking 2 Factor Authentication
for GDrive:
- fixed parser for the PIN request page (not merged yet)
- changed the PIN request window

Unfortunately I had an exam this week and still have classes at the
university so I didn't do as much as I want.

Next I'm going to create controllers for slide transitions and object
animation controls, which are helpful in the Impress.

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


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

2016-05-30 Thread Caolán McNamara
 fpicker/source/office/iodlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 543822b6b661ebbffad9339b5395ea810ba75de2
Author: Caolán McNamara 
Date:   Mon May 30 15:35:47 2016 +0100

valgrind: Invalid read of size 8

saw this in passing checking something else

==12972==at 0x6DEF40B0: rtl::Reference::get() const 
(ref.hxx:169)
==12972==by 0x6DEEF221: VclPtr::operator bool() const 
(vclptr.hxx:189)
==12972==by 0x6DEED3DA: CustomContainer::GetFocus() (iodlg.cxx:429)
==12972==by 0xD9EC83B: vcl::Window::CompatGetFocus() (window.cxx:3734)
==12972==by 0xD93A604: vcl::Window::ImplGrabFocus(GetFocusFlags) 
(mouse.cxx:383)

...

==12972==  Address 0x2e4b4690 is 288 bytes inside a block of size 424 free'd
==12972==at 0x4C2D22A: operator delete(void*) (vg_replace_malloc.c:576)
==12972==by 0x6DED9F14: SvtFileDialog::dispose() (iodlg.cxx:518)
==12972==by 0xDB04B1F: OutputDevice::disposeOnce() (outdev.cxx:161)
==12972==by 0x6DED1954: VclPtr::disposeAndClear() 
(vclptr.hxx:208)

Change-Id: I702eab8dbcf07885e4a3415ace6706c25854174e
(cherry picked from commit 5b342e10cbec2487085216346c055875a8eb9657)

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 26790b9..d658e92 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -516,6 +516,7 @@ void SvtFileDialog::dispose()
 }
 
 delete _pImp;
+_pImp = nullptr;
 _pFileView.disposeAndClear();
 _pSplitter.disposeAndClear();
 _pContainer.disposeAndClear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Caolán McNamara
 dbaccess/source/ui/app/AppDetailPageHelper.cxx |   14 +++---
 fpicker/source/office/iodlg.cxx|1 +
 include/vcl/toolbox.hxx|   11 ---
 vcl/source/window/toolbox.cxx  |1 -
 vcl/source/window/toolbox2.cxx |   20 +---
 5 files changed, 17 insertions(+), 30 deletions(-)

New commits:
commit 5b342e10cbec2487085216346c055875a8eb9657
Author: Caolán McNamara 
Date:   Mon May 30 15:35:47 2016 +0100

valgrind: Invalid read of size 8

saw this in passing checking something else

==12972==at 0x6DEF40B0: rtl::Reference::get() const 
(ref.hxx:169)
==12972==by 0x6DEEF221: VclPtr::operator bool() const 
(vclptr.hxx:189)
==12972==by 0x6DEED3DA: CustomContainer::GetFocus() (iodlg.cxx:429)
==12972==by 0xD9EC83B: vcl::Window::CompatGetFocus() (window.cxx:3734)
==12972==by 0xD93A604: vcl::Window::ImplGrabFocus(GetFocusFlags) 
(mouse.cxx:383)

...

==12972==  Address 0x2e4b4690 is 288 bytes inside a block of size 424 free'd
==12972==at 0x4C2D22A: operator delete(void*) (vg_replace_malloc.c:576)
==12972==by 0x6DED9F14: SvtFileDialog::dispose() (iodlg.cxx:518)
==12972==by 0xDB04B1F: OutputDevice::disposeOnce() (outdev.cxx:161)
==12972==by 0x6DED1954: VclPtr::disposeAndClear() 
(vclptr.hxx:208)

Change-Id: I702eab8dbcf07885e4a3415ace6706c25854174e

diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 26790b9..d658e92 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -516,6 +516,7 @@ void SvtFileDialog::dispose()
 }
 
 delete _pImp;
+_pImp = nullptr;
 _pFileView.disposeAndClear();
 _pSplitter.disposeAndClear();
 _pContainer.disposeAndClear();
commit dd2a2abadd32423bb46f6163eb3525e448edbda0
Author: Caolán McNamara 
Date:   Mon May 30 11:35:39 2016 +0100

replace ImplConvertMenuString now

Change-Id: Ib68b711fb98a917c2d40d0a659353e3983a3766e

diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx
index 0ce31f3..c7b6a8d 100644
--- a/include/vcl/toolbox.hxx
+++ b/include/vcl/toolbox.hxx
@@ -180,7 +180,6 @@ private:
 using Window::ImplInvalidate;
 SAL_DLLPRIVATE voidImplInvalidate( bool bNewCalc = false, bool 
bFullPaint = false );
 SAL_DLLPRIVATE voidImplUpdateItem( sal_uInt16 nIndex = 0x 
);
-SAL_DLLPRIVATE const OUString  ImplConvertMenuString( const OUString& rStr 
);
 SAL_DLLPRIVATE boolImplHandleMouseMove( const MouseEvent& 
rMEvt, bool bRepeat = false );
 SAL_DLLPRIVATE boolImplHandleMouseButtonUp( const MouseEvent& 
rMEvt, bool bCancel = false );
 SAL_DLLPRIVATE voidImplChangeHighlight( ImplToolItem* pItem, 
bool bNoGrabFocus = false );
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 3b0cd61..0bbd7c4 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -335,11 +335,6 @@ bool ImplToolItem::IsItemHidden() const
 return ( meType == ToolBoxItemType::BUTTON && !mbVisible );
 }
 
-const OUString ToolBox::ImplConvertMenuString( const OUString& rStr )
-{
-return MnemonicGenerator::EraseAllMnemonicChars(rStr);
-}
-
 void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint )
 {
 ImplUpdateInputEnable();
@@ -473,7 +468,7 @@ void ToolBox::InsertItem( const ResId& rResId )
 if ( nObjMask & RSC_TOOLBOXITEM_TEXT )
 {
 aItem.maText = ReadStringRes();
-aItem.maText = ImplConvertMenuString( aItem.maText );
+aItem.maText = MnemonicGenerator::EraseAllMnemonicChars(aItem.maText);
 }
 if ( nObjMask & RSC_TOOLBOXITEM_HELPTEXT )
 aItem.maHelpText = ReadStringRes();
@@ -566,7 +561,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& 
rImage, const OUStrin
 
 // create item and add to list
 mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? 
mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(),
- ImplToolItem( nItemId, rImage, 
ImplConvertMenuString( rText ), nBits ) );
+ ImplToolItem( nItemId, rImage, 
MnemonicGenerator::EraseAllMnemonicChars(rText), nBits ) );
 SetItemImage(nItemId, rImage);
 mpData->ImplClearLayoutData();
 
@@ -585,7 +580,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const 
OUString& rText, ToolBoxItem
 
 // create item and add to list
 mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? 
mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(),
- ImplToolItem( nItemId, ImplConvertMenuString( 
rText ), nBits ) );
+ ImplToolItem( nItemId, 
MnemonicGenerator::EraseAllMnemonicChars(rText), nBits ) );
 mpData->ImplClearLayoutData();
 
 ImplInvalidate( true );
@@ -1266,7 +1261,7 @@ void ToolBox::SetItemText( sal_uInt

[GSoC] Zoner Draw import, Week 1 report

2016-05-30 Thread Alex P
During the first week I implemented parsing and output of lines, rectangles
(except round corners) and Bezier curves. Only geometries, without colors.

Result example: http://i.imgur.com/h3tXPy9.png

Also submitted 2 patches to OLEToy revealing information about rectangles
corner types/rounding and polyline types (line, Bezier curve).
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/fixes22' - desktop/source desktop/unx desktop/win32 include/desktop vcl/source

2016-05-30 Thread Tor Lillqvist
 desktop/source/app/app.cxx |2 
 desktop/source/app/sofficemain.cxx |2 
 desktop/source/inc/exithelper.h|   38 ---
 desktop/unx/source/start.c |2 
 desktop/win32/source/officeloader/officeloader.cxx |2 
 include/desktop/exithelper.h   |   38 +++
 vcl/source/opengl/OpenGLContext.cxx|  105 +
 vcl/source/opengl/OpenGLHelper.cxx |9 -
 8 files changed, 151 insertions(+), 47 deletions(-)

New commits:
commit 45683b62a696302da5fa9a6f26adad561125b338
Author: Tor Lillqvist 
Date:   Wed May 25 15:23:22 2016 +0300

On Windows, compile OpenGL shaders in advance and disable on failure

This is a combination of multiple commits:

Don't claim to be reading a file before trying to open it

Avoid redundancy: The same information was logged in readProgramBinary()

Use VCL_GL_INFO here

Failing to open a cached shader binary is a no reason for a
SAL_WARN. It is normal that they don't exist when first trying, that
is the very nature of a 'cache'.

Move exithelper.h to include

We will want to use EXITHELPER_CRASH_WITH_RESTART in vcl, too.

If the shader compilation or loading of an already compiled shader
fails, disable OpenGL in the registry and exit with the
EXITHELPER_CRASH_WITH_RESTART status. The wrapper process will thus
run soffice.bin once more, and this time OpenGL will not be used.

Change-Id: I3cc4a615f00a8a1adb584493861e4956c83cec32

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 3927840..958ca8a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -35,7 +35,6 @@
 #include "lockfile.hxx"
 #include "userinstall.hxx"
 #include "desktopcontext.hxx"
-#include "exithelper.h"
 #include "migration.hxx"
 
 #include 
@@ -78,6 +77,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index c94d5f14..28296ee 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -22,10 +22,10 @@
 #include "desktopdllapi.h"
 
 #include "app.hxx"
-#include "exithelper.h"
 #include "cmdlineargs.hxx"
 #include "cmdlinehelp.hxx"
 
+#include 
 #include 
 #include 
 #include 
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
index b072f0f..8583f5b 100644
--- a/desktop/unx/source/start.c
+++ b/desktop/unx/source/start.c
@@ -25,6 +25,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -34,7 +35,6 @@
 #include 
 
 #include "args.h"
-#include "../../source/inc/exithelper.h"
 #include "pagein.h"
 #include "splashx.h"
 
diff --git a/desktop/win32/source/officeloader/officeloader.cxx 
b/desktop/win32/source/officeloader/officeloader.cxx
index e782c90..81be532 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -40,10 +40,10 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 
-#include "../../../source/inc/exithelper.h"
 #include "../loader.hxx"
 
 #include 
diff --git a/desktop/source/inc/exithelper.h b/include/desktop/exithelper.h
similarity index 90%
rename from desktop/source/inc/exithelper.h
rename to include/desktop/exithelper.h
index f92f1a8..51175fa 100644
--- a/desktop/source/inc/exithelper.h
+++ b/include/desktop/exithelper.h
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_DESKTOP_SOURCE_INC_EXITHELPER_H
-#define INCLUDED_DESKTOP_SOURCE_INC_EXITHELPER_H
+#ifndef INCLUDED_DESKTOP_EXITHELPER_H
+#define INCLUDED_DESKTOP_EXITHELPER_H
 
 enum EExitCodes {
 /* e.g. used to force showing of the command line help */
@@ -33,6 +33,6 @@ enum EExitCodes {
 EXITHELPER_NORMAL_RESTART = 81
 };
 
-#endif // INCLUDED_DESKTOP_SOURCE_INC_EXITHELPER_H
+#endif // INCLUDED_DESKTOP_EXITHELPER_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/opengl/OpenGLContext.cxx 
b/vcl/source/opengl/OpenGLContext.cxx
index 03d0a5d..1e59d37 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -9,6 +9,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -713,6 +714,101 @@ bool GLWindow::HasGLXExtension( const char* name ) const
 return checkExtension( reinterpret_cast(name), 
reinterpret_cast(GLXExtensions) );
 }
 
+#ifdef WNT
+
+namespace
+{
+
+bool tryShaders(const OUString& rVertexShader, const OUString& 
rFragmentShader, const OUString& rGeometryShader = "")
+{
+GLint nId;
+
+// Somewhat mysteriously, the OpenGLHelper::LoadShaders() API saves a 
compiled binary of the
+// shader only if you give it the digest of the shaders. We have API to 
calculate the digest
+// only of the combination of vertex and fragment (but not g

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

2016-05-30 Thread Rodolfo Ribeiro Gomes
 sw/source/uibase/shells/tabsh.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit ea7de7b2d3dc62b2ae73c2184398b227f8a85890
Author: Rodolfo Ribeiro Gomes 
Date:   Sun May 8 12:05:58 2016 -0300

fdo#34362 Setting table border from toolbar resets "spacing to content"

Change-Id: Iec51c02ab389015d268849aa0dda870c11323f46
Signed-off-by: Rodolfo Ribeiro Gomes 
Reviewed-on: https://gerrit.libreoffice.org/24764
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index ac84b52..c8b9afd 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -487,10 +488,12 @@ void SwTableShell::Execute(SfxRequest &rReq)
 if ( pArgs->GetItemState(RES_BOX, true, &pBoxItem) == 
SfxItemState::SET )
 {
 aBox = *static_cast(pBoxItem);
+sal_uInt16 nDefValue = MIN_BORDER_DIST;
 if ( !rReq.IsAPI() )
-aBox.SetDistance( 
std::max(rCoreBox.GetDistance(),sal_uInt16(55)) );
-else if ( aBox.GetDistance() < MIN_BORDER_DIST )
-aBox.SetDistance( 
std::max(rCoreBox.GetDistance(),(sal_uInt16)MIN_BORDER_DIST)  );
+nDefValue = 55;
+if ( !rReq.IsAPI() || aBox.GetDistance() < MIN_BORDER_DIST )
+for( SvxBoxItemLine k : o3tl::enumrange() )
+aBox.SetDistance( std::max(rCoreBox.GetDistance(k), 
nDefValue) , k );
 }
 else
 OSL_ENSURE( false, "where is BoxItem?" );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cppu/qa editeng/source extensions/source filter/source stoc/source svx/source sw/source unotools/source

2016-05-30 Thread Stephan Bergmann
 cppu/qa/test_reference.cxx   |8 +++-
 editeng/source/items/xmlcnitm.cxx|2 +-
 editeng/source/uno/unonrule.cxx  |2 +-
 extensions/source/bibliography/bibload.cxx   |4 ++--
 extensions/source/bibliography/datman.cxx|7 +++
 extensions/source/bibliography/framectr.cxx  |6 ++
 extensions/source/bibliography/general.cxx   |2 +-
 filter/source/graphicfilter/icgm/actimpr.cxx |3 +--
 filter/source/msfilter/msocximex.cxx |3 +--
 stoc/source/typeconv/convert.cxx |5 ++---
 svx/source/form/fmsrcimp.cxx |2 +-
 svx/source/unodraw/unoshape.cxx  |2 +-
 sw/source/core/doc/docbasic.cxx  |2 +-
 sw/source/core/fields/docufld.cxx|7 +++
 sw/source/core/layout/atrfrm.cxx |4 ++--
 sw/source/core/para/paratr.cxx   |2 +-
 sw/source/core/unocore/unocoll.cxx   |   14 ++
 sw/source/core/unocore/unocrsrhelper.cxx |   10 +-
 sw/source/core/unocore/unodraw.cxx   |9 -
 sw/source/core/unocore/unofield.cxx  |2 +-
 sw/source/core/unocore/unoframe.cxx  |4 ++--
 sw/source/core/unocore/unoparagraph.cxx  |2 +-
 sw/source/core/unocore/unosett.cxx   |4 ++--
 sw/source/core/unocore/unostyle.cxx  |4 ++--
 sw/source/core/unocore/unotbl.cxx|2 +-
 sw/source/filter/html/htmlform.cxx   |   22 --
 sw/source/filter/ww8/ww8par3.cxx |2 +-
 sw/source/uibase/shells/drformsh.cxx |3 +--
 sw/source/uibase/shells/textdrw.cxx  |3 +--
 sw/source/uibase/uno/unotxdoc.cxx|   26 +-
 sw/source/uibase/uno/unotxvw.cxx |   18 +-
 sw/source/uibase/utlui/uiitems.cxx   |2 +-
 sw/source/uibase/utlui/unotools.cxx  |5 ++---
 unotools/source/config/lingucfg.cxx  |   19 +++
 34 files changed, 89 insertions(+), 123 deletions(-)

New commits:
commit 8fec9e7e4ca97e14551a737583226f89b0c6eecd
Author: Stephan Bergmann 
Date:   Mon May 30 15:14:03 2016 +0200

Some clean up of uses of css::uno::Any::setValue

Change-Id: I04e8aef35a6083b61d775c8eb3f96757da2b31bd

diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx
index c04b8b1..df57eab 100644
--- a/cppu/qa/test_reference.cxx
+++ b/cppu/qa/test_reference.cxx
@@ -52,16 +52,14 @@ public:
 virtual Any SAL_CALL queryInterface(const Type & _type)
 throw (RuntimeException, std::exception) override
 {
-Any aInterface;
 if (_type == cppu::UnoType::get())
 {
-Reference< XInterface > ref( static_cast< XInterface * >( this ) );
-aInterface.setValue( &ref, _type );
+return 
css::uno::makeAny>(
+this);
 }
 else if (_type == cppu::UnoType::get())
 {
-Reference< Interface1 > ref( this );
-aInterface.setValue( &ref, _type );
+return css::uno::makeAny>(this);
 }
 
 return Any();
diff --git a/editeng/source/items/xmlcnitm.cxx 
b/editeng/source/items/xmlcnitm.cxx
index 6b4dca4..f832890 100644
--- a/editeng/source/items/xmlcnitm.cxx
+++ b/editeng/source/items/xmlcnitm.cxx
@@ -74,7 +74,7 @@ bool SvXMLAttrContainerItem::QueryValue( css::uno::Any& rVal, 
sal_uInt8 /*nMembe
 Reference xContainer =
 new SvUnoAttributeContainer( new SvXMLAttrContainerData( *pImpl.get() 
) );
 
-rVal.setValue( &xContainer, cppu::UnoType::get());
+rVal <<= xContainer;
 return true;
 }
 
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index a6a6841..a2075e3 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -218,7 +218,7 @@ Sequence 
SvxUnoNumberingRules::getNumberingRuleByIndex(sal
 {
 awt::FontDescriptor aDesc;
 SvxUnoFontDescriptor::ConvertFromFont( *rFmt.GetBulletFont(), aDesc );
-aVal.setValue(&aDesc, ::cppu::UnoType::get());
+aVal <<= aDesc;
 pArray[nIdx++] = beans::PropertyValue( 
OUString(UNO_NAME_NRULE_BULLET_FONT), -1, aVal, 
beans::PropertyState_DIRECT_VALUE);
 }
 
diff --git a/extensions/source/bibliography/bibload.cxx 
b/extensions/source/bibliography/bibload.cxx
index ce394a1..fb36a2f 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -480,7 +480,7 @@ Any BibliographyLoader::getByName(const OUString& rName) 
throw
 pValues[nEntry].Name = sColName;
 pValues[nEntry].Value <<= lcl_AddProperty(xColumns, 
pMapping, sColName);
 }
-aRet.setValue(&aPropSequ, 
cppu::UnoType>::get());
+aRet <<= aPropSequ;
 
 break;
 }
@@ -641,7 +641,7 @@ Any 

[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - include/vcl

2016-05-30 Thread Tor Lillqvist
 include/vcl/salnativewidgets.hxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit d4374477255c1189ad193ae3f5fa1b80a28fc1ba
Author: Tor Lillqvist 
Date:   Fri May 27 14:54:34 2016 +0300

tdf#98666: Don't cache progress bars either

Fixes the bug only partially, though.

(cherry picked from commit 483b4d6bfdb4800811e87a07f25b24e3f6019e38)

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

diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx
index 0789270..6b5821d 100644
--- a/include/vcl/salnativewidgets.hxx
+++ b/include/vcl/salnativewidgets.hxx
@@ -288,6 +288,7 @@ public:
 case CTRL_RADIOBUTTON:
 case CTRL_LISTNODE:
 case CTRL_SLIDER:
+case CTRL_PROGRESS:
 // FIXME: these guys have complex state hidden in ImplControlValue
 // structs which affects rendering, needs to be a and needs to be
 // part of the key to our cache.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] website.git: Branch 'update' - check.php

2016-05-30 Thread Christian Lohmaier
 check.php |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit f9ece5f48fad5c08402748dda829c6a9112b11c4
Author: Christian Lohmaier 
Date:   Mon May 30 14:43:19 2016 +0200

enable update to 5.1.3

diff --git a/check.php b/check.php
index e865a4e..4dab8fa 100644
--- a/check.php
+++ b/check.php
@@ -416,6 +416,9 @@ $build_hash_to_version = array(
 '5f8868b93c074a1680a0e0909a12a29516351466' => '5.1.2.1',
 '2603b69c5ec5981bb5f053f8ebfd1f3de00a4c29' => '5.1.2.1', # buildfix1
 'd3bf12ecb743fc0d20e0be0c58ca359301eb705f' => '5.1.2.2', # Final
+# 5.1.3
+'115e0e13d3c8ac1452186ad2394abce2dd5c2b57' => '5.1.3.1',
+'644e4637d1d8544fd9f56425bd6cec110e49301b' => '5.1.3.2', # Final
 );
 
 # Descriptions of the target versions
@@ -434,11 +437,11 @@ $update_map = array(
   'update_type' => 'text/html',
   'update_src'  => 
'http://www.libreoffice.org/download/libreoffice-still/?type=&lang=&version=5.0.6',
   'substitute'  => true ),
-'latest' => array('gitid'   => 
'd3bf12ecb743fc0d20e0be0c58ca359301eb705f',
-  'id'  => 'LibreOffice 5.1.2',
-  'version' => '5.1.2',
+'latest' => array('gitid'   => 
'644e4637d1d8544fd9f56425bd6cec110e49301b',
+  'id'  => 'LibreOffice 5.1.3',
+  'version' => '5.1.3',
   'update_type' => 'text/html',
-  'update_src'  => 
'http://www.libreoffice.org/download/libreoffice-fresh/?type=&lang=&version=5.1.2',
+  'update_src'  => 
'http://www.libreoffice.org/download/libreoffice-fresh/?type=&lang=&version=5.1.3',
   'substitute'  => true ),
 );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 basic/source/classes/sbunoobj.cxx  |3 +--
 pyuno/source/module/pyuno_runtime.cxx  |3 +--
 stoc/source/typeconv/convert.cxx   |8 
 testtools/source/bridgetest/bridgetest.cxx |2 +-
 testtools/source/bridgetest/cppobj.cxx |5 ++---
 5 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit e630df7853a62225cd77fc4262689ef5607d2907
Author: Stephan Bergmann 
Date:   Mon May 30 14:31:24 2016 +0200

Just use Any::operator <<= for sal_Unicode values

...now that sal_Unicode no longer clashes with sal_uInt16 on any platform 
(in
LIBO_INTERNAL_ONLY code), after e16fa715c43dcdf836ce8c400b6d54eae87b627d 
"Handle
wchar_t as native C++11 type on windows"

Change-Id: Id423dd6235bf14823fa5611b804c0974edbe64b3

diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index 4d8bc81..8154782 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1418,8 +1418,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& 
rType, Property* pUnoProper
 }
 case TypeClass_CHAR:
 {
-sal_Unicode c = pVar->GetChar();
-aRetVal.setValue( &c , cppu::UnoType::get() );
+aRetVal <<= pVar->GetChar();
 break;
 }
 case TypeClass_STRING:  aRetVal <<= pVar->GetOUString(); break;
diff --git a/pyuno/source/module/pyuno_runtime.cxx 
b/pyuno/source/module/pyuno_runtime.cxx
index 468d21f..7d7cfeb 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -810,8 +810,7 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum 
ConversionMode mode ) con
 }
 else if( PyObject_IsInstance( o, getCharClass( runtime ).get() ) )
 {
-sal_Unicode c = PyChar2Unicode( o );
-a.setValue( &c, cppu::UnoType::get());
+a <<= PyChar2Unicode( o );
 }
 else if( PyObject_IsInstance( o, getAnyClass( runtime ).get() ) )
 {
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index e7795c5..2a6cc73 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -761,14 +761,14 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& 
rVal, TypeClass aDestina
 {
 if (aSourceClass==TypeClass_STRING)
 {
-if ((*static_cast(rVal.getValue())).getLength() 
== 1)  // single char
-aRet.setValue( (*static_cast(rVal.getValue())).getStr(), cppu::UnoType::get() );
+auto const s = static_cast(rVal.getValue());
+if (s->getLength() == 1)  // single char
+aRet <<= (*s)[0];
 }
 else if (aSourceClass!=TypeClass_ENUM &&// exclude enums, chars
  aSourceClass!=TypeClass_CHAR)
 {
- sal_Unicode cRet = (sal_Unicode)toHyper( rVal, 0, 0x );// 
range
-aRet.setValue( &cRet, cppu::UnoType::get() );
+aRet <<= sal_Unicode(toHyper( rVal, 0, 0x ));// range
 }
 break;
 }
diff --git a/testtools/source/bridgetest/bridgetest.cxx 
b/testtools/source/bridgetest/bridgetest.cxx
index b426194..207e1e3 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -275,7 +275,7 @@ static bool performAnyTest( const Reference< XBridgeTest > 
&xLBT, const TestData
 }
 
 {
-a.setValue( &(data.Char) , cppu::UnoType::get() );
+a <<= data.Char;
 OSL_ASSERT( xLBT->transportAny( a ) == a );
 }
 
diff --git a/testtools/source/bridgetest/cppobj.cxx 
b/testtools/source/bridgetest/cppobj.cxx
index a5ca8bc..8101f1e 100644
--- a/testtools/source/bridgetest/cppobj.cxx
+++ b/testtools/source/bridgetest/cppobj.cxx
@@ -1003,8 +1003,7 @@ void Test_Impl::testConstructorsService(
 args[7] <<= SAL_MAX_UINT64;
 args[8] <<= 0.123f;
 args[9] <<= 0.456;
-sal_Unicode arg10c = 'X';
-args[10].setValue(&arg10c, UnoType< UnoCharType >::get());
+args[10] <<= sal_Unicode('X');
 args[11] <<= OUString("test");
 args[12] <<= UnoType< Any >::get();
 args[13] <<= true;
@@ -1018,7 +1017,7 @@ void Test_Impl::testConstructorsService(
 args[21] <<= arg21;
 args[22] <<= arg22;
 args[23] <<= arg23;
-args[24].setValue(&arg24, UnoType< UnoSequenceType< UnoCharType > 
>::get());
+args[24] <<= arg24;
 args[25] <<= arg25;
 args[26] <<= arg26;
 args[27] <<= arg27;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Pranav Kant
 loleaflet/src/control/Control.ColumnHeader.js |   13 +
 loleaflet/src/control/Control.RowHeader.js|   13 +
 2 files changed, 26 insertions(+)

New commits:
commit 98a4aa8635add9895e85affdd482223bd7a20e50
Author: Pranav Kant 
Date:   Mon May 30 16:52:43 2016 +0530

bccu#1768: loleaflet: Disable row/col headers menu while viewing

Change-Id: I89e0853b2a5e59ecf3e33c785991c5589d9c0864
(cherry picked from commit 08636e6c678955dc1b3a7876bf61cf26d87eb844)

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index 12dcdb6..21edd57 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -15,6 +15,7 @@ L.Control.ColumnHeader = L.Control.extend({
this._map.on('updatescrolloffset', this.setScrollPosition, 
this);
this._map.on('updateviewport', this.setViewPort, this);
this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, 
this);
+   this._map.on('editlock', this._onEditLock, this);
var docContainer = this._map.options.documentContainer;
var cornerHeader = L.DomUtil.create('div', 
'spreadsheet-header-corner', docContainer.parentElement);
L.DomEvent.addListener(cornerHeader, 'click', 
this._onCornerHeaderClick, this);
@@ -49,6 +50,18 @@ L.Control.ColumnHeader = L.Control.extend({
});
},
 
+   _onEditLock: function(e) {
+   // editlock message is received very early (before DOM setup)
+   // in that case, wait for a second before disabling/enabling 
the context menu
+   if ($('.spreadsheet-header-column').length === 0) {
+   setTimeout(function() {
+   
$('.spreadsheet-header-column').contextMenu(e.value === 1);
+   }, 1000);
+   } else {
+   $('.spreadsheet-header-column').contextMenu(e.value === 
1);
+   }
+   },
+
insertColumn: function(colAlpha) {
// First select the corresponding column because
// .uno:InsertColumn doesn't accept any column number
diff --git a/loleaflet/src/control/Control.RowHeader.js 
b/loleaflet/src/control/Control.RowHeader.js
index a98e15c..67cea77 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -15,6 +15,7 @@ L.Control.RowHeader = L.Control.extend({
this._map.on('updatescrolloffset', this.setScrollPosition, 
this);
this._map.on('updateviewport', this.setViewPort, this);
this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, 
this);
+   this._map.on('editlock', this._onEditLock, this);
var docContainer = this._map.options.documentContainer;
var headersContainer = L.DomUtil.create('div', 
'spreadsheet-header-rows-container', docContainer.parentElement);
this._rows = L.DomUtil.create('div', 'spreadsheet-header-rows', 
headersContainer);
@@ -47,6 +48,18 @@ L.Control.RowHeader = L.Control.extend({
});
},
 
+   _onEditLock: function(e) {
+   // editlock message is received very early (before DOM setup)
+   // in that case, wait for a second before disabling/enabling 
the context menu
+   if ($('.spreadsheet-header-row').length === 0) {
+   setTimeout(function() {
+   
$('.spreadsheet-header-row').contextMenu(e.value === 1);
+   }, 1000);
+   } else {
+   $('.spreadsheet-header-row').contextMenu(e.value === 1);
+   }
+   },
+
insertRow: function(row) {
// First select the corresponding row because
// .uno:InsertRows doesn't accept any row number
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Julien Nabet
 include/svx/gridctrl.hxx   |4 ++--
 svx/source/fmcomp/gridctrl.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 3bfbbe60561af80a4796e32ee23fc7069eb8e4e2
Author: Julien Nabet 
Date:   Sun May 29 13:01:04 2016 +0200

tdf#100115: _nColId is sal_uInt16

like the other methods, so fix it in canCopyCellText + copyCellText

Change-Id: I3395f8823602f0a1791908945e3dec5034d3d612
Reviewed-on: https://gerrit.libreoffice.org/25605
Tested-by: Lionel Elie Mamane 
Reviewed-by: Lionel Elie Mamane 
(cherry picked from commit 634fd0016ef7396a782d28272852302841f37201)
Reviewed-on: https://gerrit.libreoffice.org/25622
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 5046f63..8ab2b8a 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -499,9 +499,9 @@ public:
 getContext() const { return m_xContext; }
 
 /// returns  if the text of the given cell can be copied into the 
clipboard
-boolcanCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId);
+boolcanCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
 /// copies the text of the given cell into the clipboard
-voidcopyCellText(sal_Int32 _nRow, sal_Int16 _nColId);
+voidcopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
 
 // select in listener handling
 voidsetGridListener( FmGridListener* _pListener ) 
{ m_pGridListener = _pListener; }
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 5348090..d677cd3 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2824,7 +2824,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, 
const Point& rPosPixel )
 }
 }
 
-bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId)
+bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
 {
 return  (_nRow >= 0)
 &&  (_nRow < GetRowCount())
@@ -2832,7 +2832,7 @@ bool DbGridControl::canCopyCellText(sal_Int32 _nRow, 
sal_Int16 _nColId)
 &&  (_nColId <= ColCount());
 }
 
-void DbGridControl::copyCellText(sal_Int32 _nRow, sal_Int16 _nColId)
+void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
 {
 DBG_ASSERT(canCopyCellText(_nRow, _nColId), "DbGridControl::copyCellText: 
invalid call!");
 DbGridColumn* pColumn = m_aColumns[ GetModelColumnPos(_nColId) ];
___
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' - include/svx svx/source

2016-05-30 Thread Julien Nabet
 include/svx/gridctrl.hxx   |4 ++--
 svx/source/fmcomp/gridctrl.cxx |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1b2d1b604e0c95a5c3afcf7b4dcc8ed7cc47cc39
Author: Julien Nabet 
Date:   Sun May 29 13:01:04 2016 +0200

tdf#100115: _nColId is sal_uInt16

like the other methods, so fix it in canCopyCellText + copyCellText

Change-Id: I3395f8823602f0a1791908945e3dec5034d3d612
Reviewed-on: https://gerrit.libreoffice.org/25605
Tested-by: Lionel Elie Mamane 
Reviewed-by: Lionel Elie Mamane 
(cherry picked from commit 634fd0016ef7396a782d28272852302841f37201)
Reviewed-on: https://gerrit.libreoffice.org/25620
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 85c6346..d23b7d0 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -498,9 +498,9 @@ public:
 getContext() const { return m_xContext; }
 
 /// returns  if the text of the given cell can be copied into the 
clipboard
-boolcanCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId);
+boolcanCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
 /// copies the text of the given cell into the clipboard
-voidcopyCellText(sal_Int32 _nRow, sal_Int16 _nColId);
+voidcopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId);
 
 // select in listener handling
 voidsetGridListener( FmGridListener* _pListener ) 
{ m_pGridListener = _pListener; }
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 20830d5..8effd55 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2822,7 +2822,7 @@ void DbGridControl::StartDrag( sal_Int8 /*nAction*/, 
const Point& rPosPixel )
 }
 }
 
-bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_Int16 _nColId)
+bool DbGridControl::canCopyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
 {
 return  (_nRow >= 0)
 &&  (_nRow < GetRowCount())
@@ -2830,7 +2830,7 @@ bool DbGridControl::canCopyCellText(sal_Int32 _nRow, 
sal_Int16 _nColId)
 &&  (_nColId <= ColCount());
 }
 
-void DbGridControl::copyCellText(sal_Int32 _nRow, sal_Int16 _nColId)
+void DbGridControl::copyCellText(sal_Int32 _nRow, sal_uInt16 _nColId)
 {
 DBG_ASSERT(canCopyCellText(_nRow, _nColId), "DbGridControl::copyCellText: 
invalid call!");
 DbGridColumn* pColumn = m_aColumns[ GetModelColumnPos(_nColId) ];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Tor Lillqvist
 desktop/source/app/sofficemain.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46d5d475b114b93a76502d58637468e404a8562b
Author: Tor Lillqvist 
Date:   Mon May 30 15:09:08 2016 +0300

Trivial follow-up fix to 64061d8dd687efa1c78e5284ab01f2f16e5817c3

Change-Id: I322690bba054736a1201b3f4d8f4d5670f7799b7

diff --git a/desktop/source/app/sofficemain.cxx 
b/desktop/source/app/sofficemain.cxx
index 66c79ca..755da59 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -25,10 +25,10 @@
 #include 
 
 #include "app.hxx"
-#include "exithelper.h"
 #include "cmdlineargs.hxx"
 #include "cmdlinehelp.hxx"
 
+#include 
 #include 
 #include 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Laurent Balland-Poirier
 include/svl/zformat.hxx  |1 
 include/xmloff/xmlnumfe.hxx  |2 -
 include/xmloff/xmltoken.hxx  |2 +
 svl/source/numbers/zformat.cxx   |   26 +-
 xmloff/source/core/xmltoken.cxx  |2 +
 xmloff/source/style/xmlnumfe.cxx |   51 +--
 xmloff/source/style/xmlnumfi.cxx |   72 +++
 7 files changed, 129 insertions(+), 27 deletions(-)

New commits:
commit 1544a26ac9f7dd60605dd21e9cbe29d490aafdce
Author: Laurent Balland-Poirier 
Date:   Wed May 11 06:54:15 2016 +0200

tdf#99661 Add max-denominator-value attribute to number:fraction

Add max-denominator-value attibute to  to comply with ODF 
1.3
See https://issues.oasis-open.org/browse/OFFICE-3695
Specify loext or number according to ODF version
This value is only used to stored the number of digits in numerator.
No other values than 9, 99, 999,... are expected.

Add loext:max-numerator-digits attributes to 
 to distinguish
??/?? and ##/## or any combination
Not saved for ODF strict
min-...-digits indicates the number of '?'
max-...-digits indicates the total number of '?' and '#'
This needs to be saved with both min-...-digits at least one
because previous versions cannot have min-...-digits of 0. See tdf#38097

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

diff --git a/include/svl/zformat.hxx b/include/svl/zformat.hxx
index 916a0d3..b9c4101 100644
--- a/include/svl/zformat.hxx
+++ b/include/svl/zformat.hxx
@@ -250,6 +250,7 @@ public:
 short GetNumForType( sal_uInt16 nNumFor, sal_uInt16 nPos ) const;
 
 OUString GetDenominatorString( sal_uInt16 nNumFor ) const;
+OUString GetNumeratorString( sal_uInt16 nNumFor ) const;
 /** If the count of string elements (substrings, ignoring [modifiers] and
 so on) in a subformat code nNumFor (0..3) is equal to the given number.
 Used by ImpSvNumberInputScan::IsNumberFormatMain() to detect a matched
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index 0f9d19a..8e47ff6 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -69,7 +69,7 @@ private:
 SAL_DLLPRIVATE void WriteScientificElement_Impl( sal_Int32 nDecimals, 
sal_Int32 nMinDecimals, sal_Int32 nInteger,
 bool bGrouping, sal_Int32 nExp, 
sal_Int32 nExpInterval, bool bExpSign );
 SAL_DLLPRIVATE void WriteFractionElement_Impl( sal_Int32 nInteger, bool 
bGrouping,
-sal_Int32 nNumeratorDigits, sal_Int32 
nDenominatorDigits, sal_Int32 nDenominator );
+   const OUString& 
aNumeratorString, const OUString& aDenominatorString );
 SAL_DLLPRIVATE void WriteCurrencyElement_Impl( const OUString& rString,
 const OUString& rExt );
 SAL_DLLPRIVATE void WriteBooleanElement_Impl();
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index ccbb8cf..aaabbba 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3259,6 +3259,8 @@ namespace xmloff { namespace token {
 XML_EXPONENT_INTERVAL,
 XML_FORCED_EXPONENT_SIGN,
 XML_MIN_DECIMAL_PLACES,
+XML_MAX_DENOMINATOR_VALUE,
+XML_MAX_NUMERATOR_DIGITS,
 
 XML_TOKEN_END
 };
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 0529f27..2f2d412 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2004,7 +2004,6 @@ void lcl_GetOutputStringScientific(double fNumber, 
sal_uInt16 nCharCount,
   nPrec, 
rFormatter.GetNumDecimalSep()[0], true );
 }
 
-
 OUString lcl_GetDenominatorString(const ImpSvNumberformatInfo &rInfo, 
sal_uInt16 nAnz)
 {
 sal_uInt16 i;
@@ -2025,6 +2024,24 @@ OUString lcl_GetDenominatorString(const 
ImpSvNumberformatInfo &rInfo, sal_uInt16
 return aDenominatorString.makeStringAndClear();
 }
 
+OUString lcl_GetNumeratorString(const ImpSvNumberformatInfo &rInfo, sal_uInt16 
nAnz)
+{
+sal_Int16 i;
+OUStringBuffer aNumeratorString;
+for( i = 0; i < nAnz; i++ )
+{
+if( rInfo.nTypeArray[i] == NF_SYMBOLTYPE_FRAC )
+{
+for( i--; i >= 0 && rInfo.nTypeArray[i] == NF_SYMBOLTYPE_DIGIT ; 
i-- )
+{
+aNumeratorString.insert( 0, rInfo.sStrArray[i] );
+}
+i = nAnz;
+}
+}
+return aNumeratorString.makeStringAndClear();
+}
+
 // TODO: More optimizations?
 void lcl_ForcedDenominator(sal_uLong &nFrac, sal_uLong &nDiv, sal_uLong 
nForcedDiv)
 {
@@ -2051,6 +2068,13 @@ OUString SvNumberformat::GetDenominatorString( 
sal_uInt16 nNumFor ) const
 return lcl_GetDenominatorString( rI

[Libreoffice-commits] core.git: 2 commits - desktop/source desktop/unx desktop/win32 include/desktop vcl/opengl

2016-05-30 Thread Tor Lillqvist
 desktop/source/app/app.cxx |2 
 desktop/source/inc/exithelper.h|   38 
 desktop/unx/source/start.c |2 
 desktop/win32/source/officeloader/officeloader.cxx |2 
 include/desktop/exithelper.h   |   38 
 vcl/opengl/win/gdiimpl.cxx |   99 +
 6 files changed, 140 insertions(+), 41 deletions(-)

New commits:
commit 933a9d9245fdeceefd92fba9a5cb4db6bca92984
Author: Tor Lillqvist 
Date:   Mon May 30 14:20:11 2016 +0300

On Windows, compile OpenGL shaders in advance and disable on failure

If the shader compilation or loading of an already compiled shader
fails, disable OpenGL in the registry and exit with the
EXITHELPER_CRASH_WITH_RESTART status. The wrapper process will thus
run soffice.bin once more, and this time OpenGL will not be used.

Change-Id: I3cc4a615f00a8a1adb584493861e4956c83cec32

diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index cf45a46..04ca857 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "opengl/win/gdiimpl.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -349,6 +350,97 @@ bool InitMultisample(const PIXELFORMATDESCRIPTOR& pfd, 
int& rPixelFormat,
 return bArbMultisampleSupported;
 }
 
+namespace
+{
+
+bool tryShaders(const OUString& rVertexShader, const OUString& 
rFragmentShader, const OUString& rGeometryShader = "")
+{
+GLint nId;
+
+// Somewhat mysteriously, the OpenGLHelper::LoadShaders() API saves a 
compiled binary of the
+// shader only if you give it the digest of the shaders. We have API to 
calculate the digest
+// only of the combination of vertex and fragment (but not geometry) 
shader. So if we have a
+// geometry shader, we should not save the binary.
+if (rGeometryShader.isEmpty())
+nId = OpenGLHelper::LoadShaders(rVertexShader, rFragmentShader, 
rGeometryShader, "", OpenGLHelper::GetDigest( rVertexShader, rFragmentShader, 
""));
+else
+nId = OpenGLHelper::LoadShaders(rVertexShader, rFragmentShader, 
rGeometryShader);
+if (!nId)
+return false;
+glDeleteProgram(nId);
+return glGetError() == GL_NO_ERROR;
+}
+
+bool compiledShaderBinariesWork()
+{
+static bool bBeenHere = false;
+static bool bResult;
+
+if (bBeenHere)
+return bResult;
+
+bBeenHere = true;
+
+bResult =
+(
+#if 0 // Only look at shaders used by vcl for now
+ // canvas
+ tryShaders("dummyVertexShader", 
"linearMultiColorGradientFragmentShader") &&
+ tryShaders("dummyVertexShader", 
"linearTwoColorGradientFragmentShader") &&
+ tryShaders("dummyVertexShader", 
"radialMultiColorGradientFragmentShader") &&
+ tryShaders("dummyVertexShader", 
"radialTwoColorGradientFragmentShader") &&
+ tryShaders("dummyVertexShader", 
"rectangularMultiColorGradientFragmentShader") &&
+ tryShaders("dummyVertexShader", 
"rectangularTwoColorGradientFragmentShader") &&
+ // chart2
+ (GLEW_VERSION_3_3 ?
+  (tryShaders("shape3DVertexShader", "shape3DFragmentShader") &&
+   tryShaders("shape3DVertexShaderBatchScroll", 
"shape3DFragmentShaderBatchScroll") &&
+   tryShaders("shape3DVertexShaderBatch", 
"shape3DFragmentShaderBatch") &&
+   tryShaders("textVertexShaderBatch", "textFragmentShaderBatch")) :
+  (tryShaders("shape3DVertexShaderV300", 
"shape3DFragmentShaderV300"))) &&
+ tryShaders("textVertexShader", "textFragmentShader") &&
+ tryShaders("screenTextVertexShader", "screenTextFragmentShader") &&
+ tryShaders("commonVertexShader", "commonFragmentShader") &&
+ tryShaders("pickingVertexShader", "pickingFragmentShader") &&
+ tryShaders("backgroundVertexShader", "backgroundFragmentShader") &&
+ tryShaders("symbolVertexShader", "symbolFragmentShader") &&
+ tryShaders("symbolVertexShader", "symbolFragmentShader") &&
+ // slideshow
+ tryShaders("reflectionVertexShader", "reflectionFragmentShader") &&
+ tryShaders("basicVertexShader", "basicFragmentShader") &&
+ tryShaders("vortexVertexShader", "vortexFragmentShader", 
"vortexGeometryShader") &&
+ tryShaders("basicVertexShader", "rippleFragmentShader") &&
+ tryShaders("glitterVertexShader", "glitterFragmentShader") &&
+ tryShaders("honeycombVertexShader", "honeycombFragmentShader", 
"honeycombGeometryShader") &&
+#endif
+ // vcl
+ tryShaders("combinedVertexShader", "combinedFragmentShader") &&
+ tryShaders("dumbVertexShader", "invert50FragmentShader") &&
+ tryShaders("combinedTextureVertexShader", 
"combinedTextureFragmentShader") &&
+ tryShaders("textureVertexShader", "areaScaleFragmentShader") &&
+ tryShaders("transformedTextureVertexShader", 
"maskedTextur

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

2016-05-30 Thread Miklos Vajna
 include/xmloff/ProgressBarHelper.hxx |1 +
 xmloff/source/core/ProgressBarHelper.cxx |   11 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 2ece89b68513d89700e20962c531579d20676896
Author: Miklos Vajna 
Date:   Mon May 30 09:29:22 2016 +0200

tdf#100134 xmloff: only update the progressbar twice for every percent

This restores the state before commit
e1b78d36008d1fd188ca8dc154ad069d3476520c (#95181#; call the setValue
method of the XStatusIndicator as often as possible to enable
reschedule, 2001-11-26), which doesn't seem to be necessary anymore,
perhaps due to the current scheduler that has priorities.

Rather than a plain revert, still allow the progressbar to jump back, as
that seems to be used relatively frequently. So just filter out the
calls that would increment the value, but only with a small difference,
compared to the shown value.

Reviewed-on: https://gerrit.libreoffice.org/25654
Tested-by: Jenkins 
(cherry picked from commit 20ad9893d5d3be13d8aa17764e483afaa083b5c0)

Change-Id: I7136b20f1c64e267b0b4a35bbe2564e5163d9468
Reviewed-on: https://gerrit.libreoffice.org/25664
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/include/xmloff/ProgressBarHelper.hxx 
b/include/xmloff/ProgressBarHelper.hxx
index 521ee4c..748fb4e 100644
--- a/include/xmloff/ProgressBarHelper.hxx
+++ b/include/xmloff/ProgressBarHelper.hxx
@@ -36,6 +36,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper
 sal_Int32 nRange;
 sal_Int32 nReference;
 sal_Int32 nValue;
+doublefOldPercent;
 bool  bStrict;
 // #96469#; if the value goes over the Range the progressbar 
starts again
 bool  bRepeat;
diff --git a/xmloff/source/core/ProgressBarHelper.cxx 
b/xmloff/source/core/ProgressBarHelper.cxx
index ef7292f..09f12d6 100644
--- a/xmloff/source/core/ProgressBarHelper.cxx
+++ b/xmloff/source/core/ProgressBarHelper.cxx
@@ -25,6 +25,7 @@
 using namespace ::com::sun::star;
 
 static const sal_Int32 nDefaultProgressBarRange = 100;
+static const float fProgressStep = 0.5;
 
 ProgressBarHelper::ProgressBarHelper(const css::uno::Reference < 
css::task::XStatusIndicator>& xTempStatusIndicator,
 const bool bTempStrict)
@@ -32,6 +33,7 @@ ProgressBarHelper::ProgressBarHelper(const 
css::uno::Reference < css::task::XSta
 , nRange(nDefaultProgressBarRange)
 , nReference(100)
 , nValue(0)
+, fOldPercent(0.0)
 , bStrict(bTempStrict)
 , bRepeat(true)
 #ifdef DBG_UTIL
@@ -86,9 +88,12 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue)
 double fValue(nValue);
 double fNewValue ((fValue * nRange) / nReference);
 
-xStatusIndicator->setValue((sal_Int32)fNewValue);
-
-// #95181# disabled, because we want to call setValue very often 
to enable a good reschedule
+double fPercent((fNewValue * 100) / nRange);
+if (fPercent >= (fOldPercent + fProgressStep) || fPercent < 
fOldPercent)
+{
+xStatusIndicator->setValue((sal_Int32)fNewValue);
+fOldPercent = fPercent;
+}
 }
 #ifdef DBG_UTIL
 else if (!bFailure)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 vcl/inc/unx/gtk/gtkinst.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be3e09a2f7effada123c6a75201eb5a0029481c2
Author: Stephan Bergmann 
Date:   Mon May 30 13:45:52 2016 +0200

loplugin:passstuffbyref

Change-Id: If5c3c92eb2828348cda165d72147d7a570af59f8

diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 5218eb4..86002fa 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -175,7 +175,7 @@ public:
 // For LibreOffice internal D&D we provide the Transferable without Gtk
 // intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
 static GtkDragSource* g_ActiveDragSource;
-css::uno::Reference GetTransferrable() 
const { return m_xTrans; }
+css::uno::Reference const & 
GetTransferrable() const { return m_xTrans; }
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - vcl/inc vcl/osx vcl/unx

2016-05-30 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkinst.hxx   |5 +
 vcl/osx/DragSource.cxx|4 ++--
 vcl/unx/gtk3/gtk3gtkframe.cxx |   35 ---
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 ++
 4 files changed, 41 insertions(+), 9 deletions(-)

New commits:
commit c9122b4ae545efc9706c5802c4ab68f1ba7518df
Author: Caolán McNamara 
Date:   Mon May 30 10:57:10 2016 +0100

Resolves: tdf#100097 dbaccess self-dnd depends on getting its own 
transferable

on drop that it set on drag. It does some uno tunnel foo to drag the data it
needs back out of it in some grotesque fashion.

So we have to follow the same style of hackery as under MacOSX to detect
on drop that there is an active drag started by ourself and so use that
active drag's transferable as the source transferable for the drop, rather
that use the intermediate universal GtkDnDTransferable.

Change-Id: I3c3a94416db908603bde8f15dc5b1c9d726b8dbd
(cherry picked from commit 73f84ab139cb1d2564f9292fba08d69a0ab822c1)
(cherry picked from commit 6f41a9b06219c2d8e176f84a5ae4b80b22dc9ce5)
Reviewed-on: https://gerrit.libreoffice.org/25659
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index b91ec52..099fa11 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -166,6 +166,11 @@ public:
 void dragDelete();
 void dragEnd(GdkDragContext* context);
 void dragDataGet(GtkSelectionData *data, guint info);
+
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+static GtkDragSource* g_ActiveDragSource;
+css::uno::Reference GetTransferrable() 
const { return m_xTrans; }
 };
 
 #endif
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index c72b4bc..d794d1f 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -47,8 +47,8 @@ using namespace com::sun::star::awt;
 using namespace com::sun::star::lang;
 using namespace comphelper;
 
-// For OOo internal D&D we provide the Transferable without NSDragPboard
-// interference as a shortcut
+// For LibreOffice internal D&D we provide the Transferable without 
NSDragPboard
+// interference as a shortcut, see tdf#100097 for how dbaccess depends on this
 uno::Reference DragSource::g_XTransferable;
 NSView* DragSource::g_DragSourceView = nil;
 bool DragSource::g_DropSuccessSet = false;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index e21f903..024735f 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3246,6 +3246,10 @@ public:
 }
 };
 
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on 
this
+GtkDragSource* GtkDragSource::g_ActiveDragSource;
+
 gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* 
context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
@@ -3260,7 +3264,13 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, 
GdkDragContext* context
 aEvent.LocationY = y;
 aEvent.DropAction = 
GdkToVcl(gdk_drag_context_get_selected_action(context));
 aEvent.SourceActions = GdkToVcl(gdk_drag_context_get_actions(context));
-css::uno::Reference xTransferable(new 
GtkDnDTransferable(context, time, pWidget, pThis));
+css::uno::Reference xTransferable;
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+if (GtkDragSource::g_ActiveDragSource)
+xTransferable = GtkDragSource::g_ActiveDragSource->GetTransferrable();
+else
+xTransferable = new GtkDnDTransferable(context, time, pWidget, pThis);
 aEvent.Transferable = xTransferable;
 
 pThis->m_pDropTarget->fire_drop(aEvent);
@@ -3316,7 +3326,7 @@ void GtkSalFrame::signalDragDropReceived(GtkWidget* 
/*pWidget*/, GdkDragContext
 pThis->m_pFormatConversionRequest->LoopEnd(gtk_selection_data_copy(data));
 }
 
-gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
+gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
 
@@ -3324,7 +3334,7 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, 
GdkDragContext *contex
 return false;
 
 if (!pThis->m_bInDrag)
-gtk_drag_highlight(widget);
+gtk_drag_highlight(pWidget);
 
 css::datatransfer::dnd::DropTargetDragEnterEvent aEvent;
 aEvent.Source = 
static_cast(pThis->m_pDropTarget);
@@ -3341,8 +3351,14 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget 
*widget, GdkDragContext *contex
 
 if (

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

2016-05-30 Thread Stephan Bergmann
 mysqlc/source/mysqlc_preparedstatement.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 336b62080bd06000e5ac3c7687b34bac2afc79a9
Author: Stephan Bergmann 
Date:   Mon May 30 13:33:37 2016 +0200

Missing include

Change-Id: Id61e2de27ec307fa7773d3f0d5a0810005f1c364

diff --git a/mysqlc/source/mysqlc_preparedstatement.cxx 
b/mysqlc/source/mysqlc_preparedstatement.cxx
index 8122424..5bd8a7e 100644
--- a/mysqlc/source/mysqlc_preparedstatement.cxx
+++ b/mysqlc/source/mysqlc_preparedstatement.cxx
@@ -22,9 +22,9 @@
 #include "mysqlc_propertyids.hxx"
 #include "mysqlc_resultsetmetadata.hxx"
 
+#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] online.git: loolwsd/LOOLKit.cpp

2016-05-30 Thread Ashod Nakashian
 loolwsd/LOOLKit.cpp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c005f765bfefb1a7f9f1936c140e7ea4ba69ff2b
Author: Ashod Nakashian 
Date:   Sun May 29 20:18:17 2016 -0400

loolwsd: reuse the same callback for now

Change-Id: I0f5ff42ed8c3ab422909d185089bfc31d5bb298b
Reviewed-on: https://gerrit.libreoffice.org/25663
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index b462076..074a263 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -906,7 +906,7 @@ private:
 Log::info("Loading view to document from URI: [" + uri + "] 
for session [" + sessionId + "].");
 const auto viewId = _loKitDocument->createView();
 
-_loKitDocument->registerCallback(ViewCallback, 
reinterpret_cast(intSessionId));
+_loKitDocument->registerCallback(DocumentCallback, this);
 
 Log::info() << "Document [" << _url << "] view ["
 << viewId << "] loaded, leaving "
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/LOOLKit.cpp

2016-05-30 Thread Ashod Nakashian
 loolwsd/LOOLKit.cpp |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 335611b0ff2bcbe2341d9718f49c8c9139c5c4b5
Author: Ashod Nakashian 
Date:   Sun May 29 18:31:56 2016 -0400

loolwsd: don't unlock too soon

Since rendering moved to centralized WSD<->Kit
processing, it runs on a different thread than
those processing the communication between
ClientSession and ChildSession. This introduces
a new race between events and tile rendering.

The shared ChildSession lock prevents this race
such that no events are processed while a tile
is rendered and, more importantly, response
is prepared and sent back. That preparation
could be lengthy due to png compression.

The typical race happens when two keystrokes
are entered in quick succession such that the
same tile is invalidated while it's rendered.
If the invalidation is processed in parallel
to rendering, it will find no cached image to
remove. It will reach the client, who will
request a new tile. Meanwhile, the first tile
is rendered and cached. By the time the second
request arrives we have a cache hit, albeit on
an outdated tile, missing the second character.

By locking until the tile response is sent we
ensure that the invalidate event will follow
it, and by then the image will have been cached.
The invalidation then removes the cached image
and the second tile request is forced to place
a new tile render request.

There is some inefficiency, it would seem, but
that is not really true, as Core is really
sequential anyway and we shouldn't process
events in parallel in the first place.

Change-Id: Id8170a41a7e69bca6ac8b520029b7cdb2d96c880
Reviewed-on: https://gerrit.libreoffice.org/25662
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/LOOLKit.cpp b/loolwsd/LOOLKit.cpp
index 626435a..b462076 100644
--- a/loolwsd/LOOLKit.cpp
+++ b/loolwsd/LOOLKit.cpp
@@ -597,7 +597,6 @@ public:
 Log::trace() << "paintTile at (" << tile.getPart() << ',' << 
tile.getTilePosX() << ',' << tile.getTilePosY()
  << ") rendered in " << (timestamp.elapsed()/1000.) << " 
ms" << Log::end;
 const auto mode = 
static_cast(_loKitDocument->getTileMode());
-lock.unlock();
 
 if (!png::encodeBufferToPNG(pixmap.data(), tile.getWidth(), 
tile.getHeight(), output, mode))
 {
@@ -667,7 +666,6 @@ public:
  << " (" << renderArea.getWidth() << ", " << 
renderArea.getHeight() << ") rendered in "
  << double(timestamp.elapsed())/1000 <<  " ms." << 
Log::end;
 const auto mode = 
static_cast(_loKitDocument->getTileMode());
-lock.unlock();
 
 std::vector output;
 output.reserve(pixmapWidth * pixmapHeight * 4);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: loolwsd/DocumentBroker.cpp

2016-05-30 Thread Ashod Nakashian
 loolwsd/DocumentBroker.cpp |   43 ---
 1 file changed, 28 insertions(+), 15 deletions(-)

New commits:
commit 763eee7040f7a04a0a08e9597307f75b6ebce2a5
Author: Ashod Nakashian 
Date:   Sun May 29 17:40:27 2016 -0400

loolwsd: batch tiles by row

Change-Id: Ib5ca8e1457d4e23aa09968f90ccd3bf10d189815
Reviewed-on: https://gerrit.libreoffice.org/25661
Reviewed-by: Ashod Nakashian 
Tested-by: Ashod Nakashian 

diff --git a/loolwsd/DocumentBroker.cpp b/loolwsd/DocumentBroker.cpp
index fe4d715..ed6cc55 100644
--- a/loolwsd/DocumentBroker.cpp
+++ b/loolwsd/DocumentBroker.cpp
@@ -469,11 +469,10 @@ void 
DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
 Log::trace() << "TileCombined request for " << tileCombined.serialize() << 
Log::end;
 
 // Satisfy as many tiles from the cache.
-auto& tiles = tileCombined.getTiles();
-int i = tiles.size();
-while (--i >= 0)
+// The rest, group by rows.
+std::map> rows;
+for (auto& tile : tileCombined.getTiles())
 {
-auto& tile = tiles[i];
 std::unique_ptr cachedTile = 
_tileCache->lookupTile(tile);
 if (cachedTile)
 {
@@ -499,9 +498,7 @@ void 
DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
 cachedTile->close();
 
 session->sendBinaryFrame(output.data(), output.size());
-
-// Remove.
-tiles.erase(tiles.begin() + i);
+continue;
 }
 else
 {
@@ -510,7 +507,7 @@ void 
DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
 if (ver <= 0)
 {
 // Already rendering. Skip.
-tiles.erase(tiles.begin() + i);
+continue;
 }
 else
 if (_cursorPosX >= tile.getTilePosX() && _cursorPosX <= 
tile.getTilePosX() + tile.getTileWidth() &&
@@ -522,23 +519,39 @@ void 
DocumentBroker::handleTileCombinedRequest(TileCombined& tileCombined,
 _childProcess->getWebSocket()->sendFrame(req.data(), 
req.size());
 
 // No need to process with the group anymore.
-tiles.erase(tiles.begin() + i);
+continue;
 }
 }
+
+const auto tilePosY = tile.getTilePosY();
+auto it = rows.lower_bound(tilePosY);
+if (it != rows.end())
+{
+it->second.emplace_back(tile);
+}
+else
+{
+rows.emplace_hint(it, tilePosY, std::vector({ tile }));
+}
 }
 
-if (tiles.empty())
+if (rows.empty())
 {
 // Done.
 return;
 }
 
-const auto tileMsg = tileCombined.serialize();
-Log::debug() << "TileCombined residual request for " << tileMsg << 
Log::end;
+auto& tiles = tileCombined.getTiles();
+for (auto& row : rows)
+{
+tiles = row.second;
+const auto tileMsg = tileCombined.serialize();
+Log::debug() << "TileCombined residual request for " << tileMsg << 
Log::end;
 
-// Forward to child to render.
-const std::string request = "tilecombine " + tileMsg;
-_childProcess->getWebSocket()->sendFrame(request.data(), request.size());
+// Forward to child to render.
+const std::string request = "tilecombine " + tileMsg;
+_childProcess->getWebSocket()->sendFrame(request.data(), 
request.size());
+}
 }
 
 void DocumentBroker::handleTileResponse(const std::vector& payload)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Pranav Kant
 loleaflet/src/control/Control.ColumnHeader.js |   13 +
 loleaflet/src/control/Control.RowHeader.js|   13 +
 2 files changed, 26 insertions(+)

New commits:
commit 08636e6c678955dc1b3a7876bf61cf26d87eb844
Author: Pranav Kant 
Date:   Mon May 30 16:52:43 2016 +0530

bccu#1768: loleaflet: Disable row/col headers menu while viewing

Change-Id: I89e0853b2a5e59ecf3e33c785991c5589d9c0864

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index 12dcdb6..21edd57 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -15,6 +15,7 @@ L.Control.ColumnHeader = L.Control.extend({
this._map.on('updatescrolloffset', this.setScrollPosition, 
this);
this._map.on('updateviewport', this.setViewPort, this);
this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, 
this);
+   this._map.on('editlock', this._onEditLock, this);
var docContainer = this._map.options.documentContainer;
var cornerHeader = L.DomUtil.create('div', 
'spreadsheet-header-corner', docContainer.parentElement);
L.DomEvent.addListener(cornerHeader, 'click', 
this._onCornerHeaderClick, this);
@@ -49,6 +50,18 @@ L.Control.ColumnHeader = L.Control.extend({
});
},
 
+   _onEditLock: function(e) {
+   // editlock message is received very early (before DOM setup)
+   // in that case, wait for a second before disabling/enabling 
the context menu
+   if ($('.spreadsheet-header-column').length === 0) {
+   setTimeout(function() {
+   
$('.spreadsheet-header-column').contextMenu(e.value === 1);
+   }, 1000);
+   } else {
+   $('.spreadsheet-header-column').contextMenu(e.value === 
1);
+   }
+   },
+
insertColumn: function(colAlpha) {
// First select the corresponding column because
// .uno:InsertColumn doesn't accept any column number
diff --git a/loleaflet/src/control/Control.RowHeader.js 
b/loleaflet/src/control/Control.RowHeader.js
index a98e15c..67cea77 100644
--- a/loleaflet/src/control/Control.RowHeader.js
+++ b/loleaflet/src/control/Control.RowHeader.js
@@ -15,6 +15,7 @@ L.Control.RowHeader = L.Control.extend({
this._map.on('updatescrolloffset', this.setScrollPosition, 
this);
this._map.on('updateviewport', this.setViewPort, this);
this._map.on('viewrowcolumnheaders', this.viewRowColumnHeaders, 
this);
+   this._map.on('editlock', this._onEditLock, this);
var docContainer = this._map.options.documentContainer;
var headersContainer = L.DomUtil.create('div', 
'spreadsheet-header-rows-container', docContainer.parentElement);
this._rows = L.DomUtil.create('div', 'spreadsheet-header-rows', 
headersContainer);
@@ -47,6 +48,18 @@ L.Control.RowHeader = L.Control.extend({
});
},
 
+   _onEditLock: function(e) {
+   // editlock message is received very early (before DOM setup)
+   // in that case, wait for a second before disabling/enabling 
the context menu
+   if ($('.spreadsheet-header-row').length === 0) {
+   setTimeout(function() {
+   
$('.spreadsheet-header-row').contextMenu(e.value === 1);
+   }, 1000);
+   } else {
+   $('.spreadsheet-header-row').contextMenu(e.value === 1);
+   }
+   },
+
insertRow: function(row) {
// First select the corresponding row because
// .uno:InsertRows doesn't accept any row number
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: setup_native/Library_shlxtmsi.mk setup_native/source

2016-05-30 Thread skswales
 setup_native/Library_shlxtmsi.mk   
 |2 
 setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx 
 |   71 +---
 setup_native/source/win32/customactions/shellextensions/checkpatches.cxx   
 |   64 +--
 
setup_native/source/win32/customactions/shellextensions/completeinstallpath.cxx 
|   80 ++---
 setup_native/source/win32/customactions/shellextensions/migrateinstallpath.cxx 
 |   76 ++--
 setup_native/source/win32/customactions/shellextensions/shlxtmsi.hxx   
 |   68 +++
 setup_native/source/win32/customactions/shellextensions/startmenuicon.cxx  
 |   34 ---
 setup_native/source/win32/customactions/shellextensions/upgrade.cxx
 |   68 +++
 setup_native/source/win32/customactions/shellextensions/vistaspecial.cxx   
 |   88 +++---
 9 files changed, 191 insertions(+), 360 deletions(-)

New commits:
commit 7fe92c766adf97bdeb4d844ffe6d0650a964572e
Author: skswales 
Date:   Fri May 27 15:26:34 2016 +0100

Work towards tdf#72606 EasyHack _tstring/TCHAR elimination

setup_native/source/win32/customactions/shellextensions in MSI Installer 
compiled as UNICODE

Functions suffixed with A/W (ANSI/Wide) as needed for clarity

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

diff --git a/setup_native/Library_shlxtmsi.mk b/setup_native/Library_shlxtmsi.mk
index 161ff8a..fd0f089 100644
--- a/setup_native/Library_shlxtmsi.mk
+++ b/setup_native/Library_shlxtmsi.mk
@@ -12,6 +12,8 @@ $(eval $(call gb_Library_Library,shlxtmsi))
 $(eval $(call gb_Library_use_external,shlxtmsi,boost_headers))
 
 $(eval $(call gb_Library_add_defs,shlxtmsi,\
+   -DUNICODE \
+   -D_UNICODE \
-U_DLL \
 ))
 
diff --git 
a/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx 
b/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
index 1a4f4f0..ca6b0c5 100644
--- a/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
+++ b/setup_native/source/win32/customactions/shellextensions/checkdirectory.cxx
@@ -17,90 +17,47 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifdef _MSC_VER
-#pragma warning(push, 1) /* disable warnings within system headers */
-#endif
-#define WIN32_LEAN_AND_MEAN
-#include 
-#include 
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
+#include "shlxtmsi.hxx"
 
 #include 
 #include 
 
-#ifdef UNICODE
-#define _UNICODE
-#define _tstringwstring
-#else
-#define _tstringstring
-#endif
-#include 
-#include 
 #include 
 #include 
 
 #include 
 #include <../tools/seterror.hxx>
 
-static std::_tstring GetMsiProperty( MSIHANDLE handle, const std::_tstring& 
sProperty )
-{
-std::_tstring result;
-TCHAR szDummy[1] = TEXT("");
-DWORD nChars = 0;
-
-if ( MsiGetProperty( handle, sProperty.c_str(), szDummy, &nChars ) == 
ERROR_MORE_DATA )
-{
-DWORD nBytes = ++nChars * sizeof(TCHAR);
-LPTSTR buffer = reinterpret_cast(_alloca(nBytes));
-ZeroMemory( buffer, nBytes );
-MsiGetProperty(handle, sProperty.c_str(), buffer, &nChars);
-result = buffer;
-}
-
-return result;
-}
-
-static void UnsetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty)
-{
-MsiSetProperty(handle, sProperty.c_str(), NULL);
-}
-
-static void SetMsiProperty(MSIHANDLE handle, const std::_tstring& sProperty, 
const std::_tstring&)
-{
-MsiSetProperty(handle, sProperty.c_str(), TEXT("1"));
-}
-
 extern "C" UINT __stdcall CheckInstallDirectory(MSIHANDLE handle)
 {
-std::_tstring sInstallPath = GetMsiProperty(handle, 
TEXT("INSTALLLOCATION"));
-std::_tstring sOfficeHostnamePath = GetMsiProperty(handle, 
TEXT("OFFICEDIRHOSTNAME"));
+std::wstring sInstallPath = GetMsiPropertyW(handle, L"INSTALLLOCATION");
+std::wstring sOfficeHostnamePath = GetMsiPropertyW(handle, 
L"OFFICEDIRHOSTNAME");
 
-// MessageBox(NULL, sInstallPath.c_str(), "DEBUG", MB_OK);
+// MessageBoxW(NULL, sInstallPath.c_str(), L"DEBUG", MB_OK);
 
 // unsetting all properties
 
-UnsetMsiProperty( handle, TEXT("DIRECTORY_NOT_EMPTY") );
+UnsetMsiPropertyW( handle, L"DIRECTORY_NOT_EMPTY" );
 
 // 1. Searching for file setup.ini
 
-std::_tstring sSetupIniPath = sInstallPath + sOfficeHostnamePath + 
TEXT("\\program\\setup.ini");
+std::wstring sSetupIniPath = sInstallPath + sOfficeHostnamePath + 
L"\\program\\setup.ini";
 
 WIN32_FIND_DATA data;
-HANDLE hdl = FindFirstFile(sSetupIniPath.c_str(), &data);
+HANDLE hdl = FindFirstFileW(sSetupIniPath.c_str(), &data);
 
-// std::_tstring mystr = "Searching for " + sSetupIniPath;
-// MessageBox(NULL, mystr.c_str(), "DEBUG", MB_OK);
+// std::wstring mystr = L"Searching for " + sSetupIniPath;
+// MessageBoxW(NULL, mystr.c_str(), L"DEBUG", MB_OK);
 

[Libreoffice-commits] online.git: Changes to 'refs/tags/1.6.8-3'

2016-05-30 Thread Andras Timar
Tag '1.6.8-3' created by Andras Timar  at 
2016-05-30 11:00 +

1.6.8-3

Changes since 1.6.8-2-25:
---
 0 files changed
---
___
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' - xmloff/source

2016-05-30 Thread Laurent Balland-Poirier
 xmloff/source/style/xmlnumfe.cxx |   40 +++
 xmloff/source/style/xmlnumfi.cxx |2 +
 2 files changed, 30 insertions(+), 12 deletions(-)

New commits:
commit 61e30ea478b649cebb02405c2e55c181c3fc8f91
Author: Laurent Balland-Poirier 
Date:   Sat May 28 19:53:12 2016 +0200

Choose ODF version for min-decimal-place and force-exponent-sign

Change-Id: I873dbf53bbb865577fd51ee70142c1b45ea54ce2
Reviewed-on: https://gerrit.libreoffice.org/25588
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
(cherry picked from commit e0c8c5b711e4cacb3f666a939f285289479d3d20)
Reviewed-on: https://gerrit.libreoffice.org/25660
Tested-by: Eike Rathke 

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index b1637f8..229237c 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -569,8 +569,16 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
 
 if ( nMinDecimals >= 0 )   // negative = automatic
 {
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,
-  OUString::number( nMinDecimals ) );
+// Export only for 1.2 with extensions or 1.3 and later.
+SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? 
XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+ XML_MIN_DECIMAL_PLACES,
+ OUString::number( nMinDecimals ) );
+}
 }
 
 //  integer digits
@@ -648,10 +656,18 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
   OUString::number( nDecimals ) );
 }
 
+SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 if ( nMinDecimals >= 0 )   // negative = automatic
 {
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,
-  OUString::number( nMinDecimals ) );
+// Export only for 1.2 with extensions or 1.3 and later.
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? 
XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+ XML_MIN_DECIMAL_PLACES,
+ OUString::number( nMinDecimals ) );
+}
 }
 
 //  integer digits
@@ -678,7 +694,6 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
 if ( nExpInterval >= 0 )
 {
 // Export only for 1.2 with extensions or 1.3 and later.
-SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 if (eVersion > SvtSaveOptions::ODFSVER_012)
 {
 // For 1.2+ use loext namespace, for 1.3 use number namespace.
@@ -689,13 +704,14 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
 }
 
 //  exponent sign
-if ( bExpSign )
-{
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_FORCED_EXPONENT_SIGN, 
XML_TRUE );
-}
-else
-{
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_FORCED_EXPONENT_SIGN, 
XML_FALSE );
+// Export only for 1.2 with extensions or 1.3 and later.
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? XML_NAMESPACE_LO_EXT : 
XML_NAMESPACE_NUMBER),
+ XML_FORCED_EXPONENT_SIGN,
+ bExpSign? XML_TRUE : XML_FALSE );
 }
 
 SvXMLElementExport aElem( rExport,
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index dbf7864..ddd925c 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -549,6 +549,7 @@ const SvXMLTokenMap& 
SvXMLNumImpData::GetStyleElemAttrTokenMap()
 //  attributes for an element within a style
 { XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_DECIMAL_PLACES   },
 { XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_MIN_DECIMAL_PLACES   },
+{ XML_NAMESPACE_NUMBER, XML_MIN_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_MIN_DECIMAL_PLACES   },
 { XML_NAMESPACE_NUMBER, XML_MIN_INTEGER_DIGITS,  
XML_TOK_ELEM_ATTR_MIN_INTEGER_DIGITS   },
 { XML_NAMESPACE_NUMBER, XML_GROUPING,
XML_TOK_ELEM_ATTR_GROUPING },
 { XML_NAMESPACE_NUMBER, XML_DISPLAY_FACTOR,  
XML_TOK_ELEM_ATTR_DISPLAY_FACTOR   },
@@ -558,6 +559,

Re: /usr/lib/libnss3.so: version `NSS_3.19.1' not found

2016-05-30 Thread Lionel Elie Mamane
On Sun, May 29, 2016 at 10:21:56AM +0200, YuGiOhJCJ Mailing-List wrote:
> On Sun, 29 May 2016 01:35:47 +0100
> Wols Lists  wrote:

>> Which means my fstab contains the following line

>> tmp /tmptmpfs   size=10G,mode=0777  0 0

>> and you'll notice the size=10G parameter, giving me a 10Gb /tmp directory.

> In my /etc/fstab file I got this line on Slackware 14.1:
> $ grep "tmp" /etc/fstab
> tmpfs/dev/shm tmpfs   defaults 0   0
> It is a bit different than your line in /etc/fstab but I don't know
> if that matters.

That is not the line for /tmp; if you haven't got any line for that,
possibly it is just on your root filesystem, which may or may not have
enough space on it. Try:

mount
cat /proc/mounts

to find the actual situation of /tmp

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


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

2016-05-30 Thread Laurent Balland-Poirier
 xmloff/source/style/xmlnumfe.cxx |   40 +++
 xmloff/source/style/xmlnumfi.cxx |2 +
 2 files changed, 30 insertions(+), 12 deletions(-)

New commits:
commit e0c8c5b711e4cacb3f666a939f285289479d3d20
Author: Laurent Balland-Poirier 
Date:   Sat May 28 19:53:12 2016 +0200

Choose ODF version for min-decimal-place and force-exponent-sign

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

diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index b1637f8..229237c 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -569,8 +569,16 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
 
 if ( nMinDecimals >= 0 )   // negative = automatic
 {
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,
-  OUString::number( nMinDecimals ) );
+// Export only for 1.2 with extensions or 1.3 and later.
+SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? 
XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+ XML_MIN_DECIMAL_PLACES,
+ OUString::number( nMinDecimals ) );
+}
 }
 
 //  integer digits
@@ -648,10 +656,18 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
   OUString::number( nDecimals ) );
 }
 
+SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 if ( nMinDecimals >= 0 )   // negative = automatic
 {
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,
-  OUString::number( nMinDecimals ) );
+// Export only for 1.2 with extensions or 1.3 and later.
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? 
XML_NAMESPACE_LO_EXT : XML_NAMESPACE_NUMBER),
+ XML_MIN_DECIMAL_PLACES,
+ OUString::number( nMinDecimals ) );
+}
 }
 
 //  integer digits
@@ -678,7 +694,6 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
 if ( nExpInterval >= 0 )
 {
 // Export only for 1.2 with extensions or 1.3 and later.
-SvtSaveOptions::ODFSaneDefaultVersion eVersion = 
rExport.getSaneDefaultVersion();
 if (eVersion > SvtSaveOptions::ODFSVER_012)
 {
 // For 1.2+ use loext namespace, for 1.3 use number namespace.
@@ -689,13 +704,14 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
 }
 
 //  exponent sign
-if ( bExpSign )
-{
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_FORCED_EXPONENT_SIGN, 
XML_TRUE );
-}
-else
-{
-rExport.AddAttribute( XML_NAMESPACE_LO_EXT, XML_FORCED_EXPONENT_SIGN, 
XML_FALSE );
+// Export only for 1.2 with extensions or 1.3 and later.
+if (eVersion > SvtSaveOptions::ODFSVER_012)
+{
+// For 1.2+ use loext namespace, for 1.3 use number namespace.
+rExport.AddAttribute(
+((eVersion < SvtSaveOptions::ODFSVER_013) ? XML_NAMESPACE_LO_EXT : 
XML_NAMESPACE_NUMBER),
+ XML_FORCED_EXPONENT_SIGN,
+ bExpSign? XML_TRUE : XML_FALSE );
 }
 
 SvXMLElementExport aElem( rExport,
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index dbf7864..ddd925c 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -549,6 +549,7 @@ const SvXMLTokenMap& 
SvXMLNumImpData::GetStyleElemAttrTokenMap()
 //  attributes for an element within a style
 { XML_NAMESPACE_NUMBER, XML_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_DECIMAL_PLACES   },
 { XML_NAMESPACE_LO_EXT, XML_MIN_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_MIN_DECIMAL_PLACES   },
+{ XML_NAMESPACE_NUMBER, XML_MIN_DECIMAL_PLACES,  
XML_TOK_ELEM_ATTR_MIN_DECIMAL_PLACES   },
 { XML_NAMESPACE_NUMBER, XML_MIN_INTEGER_DIGITS,  
XML_TOK_ELEM_ATTR_MIN_INTEGER_DIGITS   },
 { XML_NAMESPACE_NUMBER, XML_GROUPING,
XML_TOK_ELEM_ATTR_GROUPING },
 { XML_NAMESPACE_NUMBER, XML_DISPLAY_FACTOR,  
XML_TOK_ELEM_ATTR_DISPLAY_FACTOR   },
@@ -558,6 +559,7 @@ const SvXMLTokenMap& 
SvXMLNumImpData::GetStyleElemAttrTokenMap()
 { XML_NAMESPACE_LO_EXT, XML_EXPONENT_INTERVAL,   
XML_TOK_ELEM_ATTR

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

2016-05-30 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkinst.hxx   |5 +
 vcl/osx/DragSource.cxx|4 ++--
 vcl/unx/gtk3/gtk3gtkframe.cxx |   35 ---
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 ++
 4 files changed, 41 insertions(+), 9 deletions(-)

New commits:
commit 6f41a9b06219c2d8e176f84a5ae4b80b22dc9ce5
Author: Caolán McNamara 
Date:   Mon May 30 10:57:10 2016 +0100

Resolves: tdf#100097 dbaccess self-dnd depends on getting its own 
transferable

on drop that it set on drag. It does some uno tunnel foo to drag the data it
needs back out of it in some grotesque fashion.

So we have to follow the same style of hackery as under MacOSX to detect
on drop that there is an active drag started by ourself and so use that
active drag's transferable as the source transferable for the drop, rather
that use the intermediate universal GtkDnDTransferable.

Change-Id: I3c3a94416db908603bde8f15dc5b1c9d726b8dbd
(cherry picked from commit 73f84ab139cb1d2564f9292fba08d69a0ab822c1)

diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 6f1f999..5218eb4 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -171,6 +171,11 @@ public:
 void dragDelete();
 void dragEnd(GdkDragContext* context);
 void dragDataGet(GtkSelectionData *data, guint info);
+
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+static GtkDragSource* g_ActiveDragSource;
+css::uno::Reference GetTransferrable() 
const { return m_xTrans; }
 };
 
 #endif
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index c72b4bc..d794d1f 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -47,8 +47,8 @@ using namespace com::sun::star::awt;
 using namespace com::sun::star::lang;
 using namespace comphelper;
 
-// For OOo internal D&D we provide the Transferable without NSDragPboard
-// interference as a shortcut
+// For LibreOffice internal D&D we provide the Transferable without 
NSDragPboard
+// interference as a shortcut, see tdf#100097 for how dbaccess depends on this
 uno::Reference DragSource::g_XTransferable;
 NSView* DragSource::g_DragSourceView = nil;
 bool DragSource::g_DropSuccessSet = false;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 0bb9bf7..2c04616 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3296,6 +3296,10 @@ public:
 }
 };
 
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on 
this
+GtkDragSource* GtkDragSource::g_ActiveDragSource;
+
 gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* 
context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
@@ -3310,7 +3314,13 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, 
GdkDragContext* context
 aEvent.LocationY = y;
 aEvent.DropAction = 
GdkToVcl(gdk_drag_context_get_selected_action(context));
 aEvent.SourceActions = GdkToVcl(gdk_drag_context_get_actions(context));
-css::uno::Reference xTransferable(new 
GtkDnDTransferable(context, time, pWidget, pThis));
+css::uno::Reference xTransferable;
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+if (GtkDragSource::g_ActiveDragSource)
+xTransferable = GtkDragSource::g_ActiveDragSource->GetTransferrable();
+else
+xTransferable = new GtkDnDTransferable(context, time, pWidget, pThis);
 aEvent.Transferable = xTransferable;
 
 pThis->m_pDropTarget->fire_drop(aEvent);
@@ -3366,7 +3376,7 @@ void GtkSalFrame::signalDragDropReceived(GtkWidget* 
/*pWidget*/, GdkDragContext
 pThis->m_pFormatConversionRequest->LoopEnd(gtk_selection_data_copy(data));
 }
 
-gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
+gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
 
@@ -3374,7 +3384,7 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, 
GdkDragContext *contex
 return false;
 
 if (!pThis->m_bInDrag)
-gtk_drag_highlight(widget);
+gtk_drag_highlight(pWidget);
 
 css::datatransfer::dnd::DropTargetDragEnterEvent aEvent;
 aEvent.Source = 
static_cast(pThis->m_pDropTarget);
@@ -3391,8 +3401,14 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget 
*widget, GdkDragContext *contex
 
 if (!pThis->m_bInDrag)
 {
-css::uno::Reference xTrans(new 
GtkDnDTransferable(context, time, widget, pThis));
-css::uno::Sequence aFormats = 
xTrans->getTransferDataFlavors(

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

2016-05-30 Thread Caolán McNamara
 vcl/inc/unx/gtk/gtkinst.hxx   |5 
 vcl/osx/DragSource.cxx|4 +--
 vcl/unx/gtk3/gtk3gtkframe.cxx |   46 ++
 vcl/unx/gtk3/gtk3gtkinst.cxx  |6 +
 4 files changed, 42 insertions(+), 19 deletions(-)

New commits:
commit 73f84ab139cb1d2564f9292fba08d69a0ab822c1
Author: Caolán McNamara 
Date:   Mon May 30 10:57:10 2016 +0100

Resolves: tdf#100097 dbaccess self-dnd depends on getting its own 
transferable

on drop that it set on drag. It does some uno tunnel foo to drag the data it
needs back out of it in some grotesque fashion.

So we have to follow the same style of hackery as under MacOSX to detect
on drop that there is an active drag started by ourself and so use that
active drag's transferable as the source transferable for the drop, rather
that use the intermediate universal GtkDnDTransferable.

Change-Id: I3c3a94416db908603bde8f15dc5b1c9d726b8dbd

diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index 6f1f999..5218eb4 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -171,6 +171,11 @@ public:
 void dragDelete();
 void dragEnd(GdkDragContext* context);
 void dragDataGet(GtkSelectionData *data, guint info);
+
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+static GtkDragSource* g_ActiveDragSource;
+css::uno::Reference GetTransferrable() 
const { return m_xTrans; }
 };
 
 #endif
diff --git a/vcl/osx/DragSource.cxx b/vcl/osx/DragSource.cxx
index c72b4bc..d794d1f 100644
--- a/vcl/osx/DragSource.cxx
+++ b/vcl/osx/DragSource.cxx
@@ -47,8 +47,8 @@ using namespace com::sun::star::awt;
 using namespace com::sun::star::lang;
 using namespace comphelper;
 
-// For OOo internal D&D we provide the Transferable without NSDragPboard
-// interference as a shortcut
+// For LibreOffice internal D&D we provide the Transferable without 
NSDragPboard
+// interference as a shortcut, see tdf#100097 for how dbaccess depends on this
 uno::Reference DragSource::g_XTransferable;
 NSView* DragSource::g_DragSourceView = nil;
 bool DragSource::g_DropSuccessSet = false;
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index bac7584..ee02b03 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -3296,6 +3296,10 @@ public:
 }
 };
 
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends on 
this
+GtkDragSource* GtkDragSource::g_ActiveDragSource;
+
 gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, GdkDragContext* 
context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
@@ -3310,7 +3314,13 @@ gboolean GtkSalFrame::signalDragDrop(GtkWidget* pWidget, 
GdkDragContext* context
 aEvent.LocationY = y;
 aEvent.DropAction = 
GdkToVcl(gdk_drag_context_get_selected_action(context));
 aEvent.SourceActions = GdkToVcl(gdk_drag_context_get_actions(context));
-css::uno::Reference xTransferable(new 
GtkDnDTransferable(context, time, pWidget, pThis));
+css::uno::Reference xTransferable;
+// For LibreOffice internal D&D we provide the Transferable without Gtk
+// intermediaries as a shortcut, see tdf#100097 for how dbaccess depends 
on this
+if (GtkDragSource::g_ActiveDragSource)
+xTransferable = GtkDragSource::g_ActiveDragSource->GetTransferrable();
+else
+xTransferable = new GtkDnDTransferable(context, time, pWidget, pThis);
 aEvent.Transferable = xTransferable;
 
 pThis->m_pDropTarget->fire_drop(aEvent);
@@ -3366,7 +3376,7 @@ void GtkSalFrame::signalDragDropReceived(GtkWidget* 
/*pWidget*/, GdkDragContext
 pThis->m_pFormatConversionRequest->LoopEnd(gtk_selection_data_copy(data));
 }
 
-gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
+gboolean GtkSalFrame::signalDragMotion(GtkWidget *pWidget, GdkDragContext 
*context, gint x, gint y, guint time, gpointer frame)
 {
 GtkSalFrame* pThis = static_cast(frame);
 
@@ -3374,7 +3384,7 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget *widget, 
GdkDragContext *contex
 return false;
 
 if (!pThis->m_bInDrag)
-gtk_drag_highlight(widget);
+gtk_drag_highlight(pWidget);
 
 css::datatransfer::dnd::DropTargetDragEnterEvent aEvent;
 aEvent.Source = 
static_cast(pThis->m_pDropTarget);
@@ -3391,8 +3401,14 @@ gboolean GtkSalFrame::signalDragMotion(GtkWidget 
*widget, GdkDragContext *contex
 
 if (!pThis->m_bInDrag)
 {
-css::uno::Reference xTrans(new 
GtkDnDTransferable(context, time, widget, pThis));
-css::uno::Sequence aFormats = 
xTrans->getTransferDataFlavors();
+css::uno::Reference xTransferable;
+// For Libre

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

2016-05-30 Thread Miklos Vajna
 include/xmloff/ProgressBarHelper.hxx |1 +
 xmloff/source/core/ProgressBarHelper.cxx |   11 ---
 2 files changed, 9 insertions(+), 3 deletions(-)

New commits:
commit 20ad9893d5d3be13d8aa17764e483afaa083b5c0
Author: Miklos Vajna 
Date:   Mon May 30 09:29:22 2016 +0200

tdf#100134 xmloff: only update the progressbar twice for every percent

This restores the state before commit
e1b78d36008d1fd188ca8dc154ad069d3476520c (#95181#; call the setValue
method of the XStatusIndicator as often as possible to enable
reschedule, 2001-11-26), which doesn't seem to be necessary anymore,
perhaps due to the current scheduler that has priorities.

Rather than a plain revert, still allow the progressbar to jump back, as
that seems to be used relatively frequently. So just filter out the
calls that would increment the value, but only with a small difference,
compared to the shown value.

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

diff --git a/include/xmloff/ProgressBarHelper.hxx 
b/include/xmloff/ProgressBarHelper.hxx
index 521ee4c..748fb4e 100644
--- a/include/xmloff/ProgressBarHelper.hxx
+++ b/include/xmloff/ProgressBarHelper.hxx
@@ -36,6 +36,7 @@ class XMLOFF_DLLPUBLIC ProgressBarHelper
 sal_Int32 nRange;
 sal_Int32 nReference;
 sal_Int32 nValue;
+doublefOldPercent;
 bool  bStrict;
 // #96469#; if the value goes over the Range the progressbar 
starts again
 bool  bRepeat;
diff --git a/xmloff/source/core/ProgressBarHelper.cxx 
b/xmloff/source/core/ProgressBarHelper.cxx
index ef7292f..09f12d6 100644
--- a/xmloff/source/core/ProgressBarHelper.cxx
+++ b/xmloff/source/core/ProgressBarHelper.cxx
@@ -25,6 +25,7 @@
 using namespace ::com::sun::star;
 
 static const sal_Int32 nDefaultProgressBarRange = 100;
+static const float fProgressStep = 0.5;
 
 ProgressBarHelper::ProgressBarHelper(const css::uno::Reference < 
css::task::XStatusIndicator>& xTempStatusIndicator,
 const bool bTempStrict)
@@ -32,6 +33,7 @@ ProgressBarHelper::ProgressBarHelper(const 
css::uno::Reference < css::task::XSta
 , nRange(nDefaultProgressBarRange)
 , nReference(100)
 , nValue(0)
+, fOldPercent(0.0)
 , bStrict(bTempStrict)
 , bRepeat(true)
 #ifdef DBG_UTIL
@@ -86,9 +88,12 @@ void ProgressBarHelper::SetValue(sal_Int32 nTempValue)
 double fValue(nValue);
 double fNewValue ((fValue * nRange) / nReference);
 
-xStatusIndicator->setValue((sal_Int32)fNewValue);
-
-// #95181# disabled, because we want to call setValue very often 
to enable a good reschedule
+double fPercent((fNewValue * 100) / nRange);
+if (fPercent >= (fOldPercent + fProgressStep) || fPercent < 
fOldPercent)
+{
+xStatusIndicator->setValue((sal_Int32)fNewValue);
+fOldPercent = fPercent;
+}
 }
 #ifdef DBG_UTIL
 else if (!bFailure)
___
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-05-30 Thread Stanislav Horacek
 sc/source/ui/src/scfuncs.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 62ebd61b2709f918802d8b40abc39498b8a42dfc
Author: Stanislav Horacek 
Date:   Sat May 28 11:31:35 2016 +0200

FORECAST.ETS.* functions: default aggregation is 1 (0 is not allowed)

Change-Id: I71470b0871a181dd9ce090053a41238698744424
Reviewed-on: https://gerrit.libreoffice.org/25577
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 3239ecb4916e0b5ac7583c6de884c9c00f5ebc90)
Reviewed-on: https://gerrit.libreoffice.org/25658

diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index cec7ee3..faa26fe 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -10122,7 +10122,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
 };
 String 13 // Description of Parameter 6
 {
-Text [ en-US ] = "Aggregation (default 0 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
+Text [ en-US ] = "Aggregation (default 1 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
 };
 };
  // -=*# Resource for function FORECAST.ETS.MULT #*=-
@@ -10186,7 +10186,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
 };
 String 13 // Description of Parameter 6
 {
-Text [ en-US ] = "Aggregation (default 0 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
+Text [ en-US ] = "Aggregation (default 1 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
 };
 };
  // -=*# Resource for function FORECAST.ETS.CONFINT #*=-
___
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' - vcl/inc vcl/opengl

2016-05-30 Thread Tomaž Vajngerl
 vcl/inc/opengl/program.hxx |1 
 vcl/opengl/gdiimpl.cxx |   68 ++---
 vcl/opengl/program.cxx |   23 ---
 3 files changed, 78 insertions(+), 14 deletions(-)

New commits:
commit 4b13afe164f2701bf8c13d9be5b3ac2d093249e2
Author: Tomaž Vajngerl 
Date:   Fri May 27 17:54:50 2016 +0900

tdf#100080 set unused shader attribs with values, fixes GL on AMD

AMD drivers don't work well if a shader has a defined but not
enabled shader attributes. For this reason we need to make sure
that all attributes are set to some value even if the shader
doesn't use that attribute. Intel drivers, on the other hand,
crash if you enable an attribute and don't set it (set it
to null) - so we can't use this workaround.

Change-Id: Ic076cf8a5fac8ef048d0054e6e4340b47b4d5188
Reviewed-on: https://gerrit.libreoffice.org/25591
Tested-by: Jenkins 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit fdcd13c1c2b8b9fbc3480c8fa92920d8c8d4e5a7)
Reviewed-on: https://gerrit.libreoffice.org/25594
Tested-by: Tomaž Vajngerl 

diff --git a/vcl/inc/opengl/program.hxx b/vcl/inc/opengl/program.hxx
index 2fab98c..3c194d8 100644
--- a/vcl/inc/opengl/program.hxx
+++ b/vcl/inc/opengl/program.hxx
@@ -106,6 +106,7 @@ public:
 void DrawArrays(GLenum GLenum, std::vector& aVertices);
 
 protected:
+bool EnableVertexAttrib(GLuint& rAttrib, const OString& rName);
 void SetVertexAttrib( GLuint& rAttrib, const OString& rName, const GLvoid* 
pData, GLint nSize = 2 );
 GLuint GetUniformLocation( const OString& rName );
 };
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 58b4d62..720aa19 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -615,6 +615,8 @@ void OpenGLSalGraphicsImpl::DrawPoint( long nX, long nY )
 GLfloat(nX), GLfloat(nY)
 };
 
+std::vector aExtrusion(3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 ApplyProgramMatrices(0.5f);
 mpProgram->DrawArrays(GL_POINTS, pPoint);
 CHECK_GL_ERROR();
@@ -959,6 +961,8 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( sal_uInt32 
nPoints, const SalPoin
 }
 
 ApplyProgramMatrices();
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
 
@@ -1002,6 +1006,8 @@ void OpenGLSalGraphicsImpl::DrawConvexPolygon( const 
tools::Polygon& rPolygon, b
 }
 
 ApplyProgramMatrices();
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
 
@@ -1052,6 +1058,8 @@ void OpenGLSalGraphicsImpl::DrawTrapezoid( const 
basegfx::B2DTrapezoid& trapezoi
 }
 
 ApplyProgramMatrices();
+std::vector aExtrusion(nPoints * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 mpProgram->DrawArrays(GL_TRIANGLE_FAN, aVertices);
 CHECK_GL_ERROR();
 
@@ -1163,25 +1171,23 @@ void OpenGLSalGraphicsImpl::DrawRegionBand( const 
RegionBand& rRegion )
 ADD_VERTICE( rRect.BottomRight() );
 }
 #undef ADD_VERTICE
-
+std::vector aExtrusion(aRects.size() * 6 * 3, 0);
+mpProgram->SetExtrusionVectors(aExtrusion.data());
 ApplyProgramMatrices();
 mpProgram->DrawArrays(GL_TRIANGLES, aVertices);
 CHECK_GL_ERROR();
 }
 
-void OpenGLSalGraphicsImpl::DrawTextureRect( OpenGLTexture& rTexture, const 
SalTwoRect& rPosAry, bool bInverted )
+void OpenGLSalGraphicsImpl::DrawTextureRect( OpenGLTexture& /*rTexture*/, 
const SalTwoRect& rPosAry, bool /*bInverted*/ )
 {
 OpenGLZone aZone;
 
 SAL_INFO("vcl.opengl", "draw texture rect");
 
-GLfloat aTexCoord[8];
-rTexture.GetCoord( aTexCoord, rPosAry, bInverted );
-mpProgram->SetTextureCoord( aTexCoord );
 DrawRect( rPosAry.mnDestX, rPosAry.mnDestY, rPosAry.mnDestWidth, 
rPosAry.mnDestHeight );
 }
 
-void OpenGLSalGraphicsImpl::DrawTexture( OpenGLTexture& rTexture, const 
SalTwoRect& pPosAry, bool bInverted )
+void OpenGLSalGraphicsImpl::DrawTexture( OpenGLTexture& rTexture, const 
SalTwoRect& rPosAry, bool bInverted )
 {
 OpenGLZone aZone;
 
@@ -1192,7 +1198,14 @@ void OpenGLSalGraphicsImpl::DrawTexture( OpenGLTexture& 
rTexture, const SalTwoRe
 mpProgram->SetShaderType(TextureShaderType::Normal);
 mpProgram->SetIdentityTransform("transform");
 mpProgram->SetTexture("texture", rTexture);
-DrawTextureRect( rTexture, pPosAry, bInverted );
+
+GLfloat aTexCoord[8];
+rTexture.GetCoord(aTexCoord, rPosAry, bInverted);
+mpProgram->SetTextureCoord(aTexCoord);
+mpProgram->SetMaskCoord(aTexCoord);
+mpProgram->SetAlphaCoord(aTexCoord);
+
+DrawTextureRect( rTexture, rPosAry, bInverted );
 mpProgram->Clean();
 }
 
@@ -1405,6 +1418,13 @@ void OpenGLSalGraphicsImpl::DrawAlphaTexture( 
OpenGLTexture& rTexture, const Sal
 mpProgram->

[Libreoffice-commits] core.git: Branch 'feature/fixes22' - 3 commits - vcl/inc vcl/Library_vcl.mk vcl/opengl

2016-05-30 Thread Tomaž Vajngerl
 vcl/Library_vcl.mk |1 
 vcl/inc/opengl/AccumulatedTextures.hxx |   35 --
 vcl/inc/opengl/RenderList.hxx  |  101 
 vcl/inc/opengl/VertexUtils.hxx |  138 +++
 vcl/inc/opengl/program.hxx |6 
 vcl/inc/opengl/texture.hxx |9 
 vcl/inc/openglgdiimpl.hxx  |7 
 vcl/opengl/RenderList.cxx  |  216 ++
 vcl/opengl/combinedFragmentShader.glsl |   17 +
 vcl/opengl/combinedVertexShader.glsl   |9 
 vcl/opengl/gdiimpl.cxx |  387 ++---
 vcl/opengl/program.cxx |   12 -
 vcl/opengl/texture.cxx |   52 ++--
 13 files changed, 709 insertions(+), 281 deletions(-)

New commits:
commit 4abd0a6fcd81b242fde3abbb19c6c4336f3dc34a
Author: Tomaž Vajngerl 
Date:   Sun May 29 15:36:39 2016 +0900

opengl: batch draw polypolygons

Change-Id: Ie9c41f95815a57c3a9e68ce7b7b0c1e09291988b

diff --git a/vcl/inc/opengl/RenderList.hxx b/vcl/inc/opengl/RenderList.hxx
index 0ba977a..d533ad4 100644
--- a/vcl/inc/opengl/RenderList.hxx
+++ b/vcl/inc/opengl/RenderList.hxx
@@ -91,6 +91,9 @@ public:
   const SalColor& rLineColor, const SalColor& 
rFillColor);
 
 void addDrawLine(long nX1, long nY1, long nX2, long nY2, const SalColor& 
rLineColor, bool bUseAA);
+
+void addDrawPolyPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, 
double fTransparency,
+const SalColor& rLineColor, const SalColor& 
rFillColor, bool bUseAA);
 };
 
 #endif // INCLUDED_VCL_INC_OPENGL_RENDERLIST_H
diff --git a/vcl/inc/opengl/VertexUtils.hxx b/vcl/inc/opengl/VertexUtils.hxx
index c64340b..d8c 100644
--- a/vcl/inc/opengl/VertexUtils.hxx
+++ b/vcl/inc/opengl/VertexUtils.hxx
@@ -39,6 +39,20 @@ inline void 
addRectangle(std::vector& rVertices, GLflo
 });
 }
 
+template
+inline void addTrapezoid(std::vector& rVertices, GLfloat x1, GLfloat 
y1, GLfloat x2, GLfloat y2,
+  GLfloat x3, GLfloat 
y3, GLfloat x4, GLfloat y4);
+
+template<>
+inline void addTrapezoid(std::vector& rVertices, 
GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2,
+
GLfloat x3, GLfloat y3, GLfloat x4, GLfloat y4)
+{
+rVertices.insert(rVertices.end(), {
+x1, y1, x2, y2, x3, y3,
+x3, y3, x2, y2, x4, y4
+});
+}
+
 inline glm::vec4 createGLColor(const SalColor& rColor, GLfloat rTransparency)
 {
 return glm::vec4(SALCOLOR_RED(rColor)   / 255.0f,
diff --git a/vcl/opengl/RenderList.cxx b/vcl/opengl/RenderList.cxx
index 008be02..de5a9d6 100644
--- a/vcl/opengl/RenderList.cxx
+++ b/vcl/opengl/RenderList.cxx
@@ -11,6 +11,11 @@
 #include "opengl/RenderList.hxx"
 #include "opengl/VertexUtils.hxx"
 
+#include 
+#include 
+#include 
+#include 
+
 namespace
 {
 
@@ -119,4 +124,93 @@ void RenderList::addDrawLine(long nX1, long nY1, long nX2, 
long nY2, const SalCo
 lclAddLineSegmentVertices(rRenderParameter, nX1, nY1, nX2, nY2, 
rLineColor, 0.0f);
 }
 
+void RenderList::addDrawPolyPolygon(const basegfx::B2DPolyPolygon& 
rPolyPolygon, double fTransparency,
+const SalColor& rLineColor, const SalColor& 
rFillColor, bool bUseAA)
+{
+if (rPolyPolygon.count() <= 0)
+return;
+if (rLineColor == SALCOLOR_NONE && rFillColor == SALCOLOR_NONE)
+return;
+if (fTransparency == 1.0)
+return;
+
+checkOverlapping(rPolyPolygon.getB2DRange());
+
+RenderParameters& rLineParameter = maRenderEntries.back().maLineParameters;
+RenderParameters& rLineAAParameter = 
maRenderEntries.back().maLineAAParameters;
+
+if (rFillColor != SALCOLOR_NONE)
+{
+RenderParameters& rTriangleParameter = 
maRenderEntries.back().maTriangleParameters;
+
+const basegfx::B2DPolyPolygon& aSimplePolyPolygon = 
::basegfx::tools::solveCrossovers(rPolyPolygon);
+basegfx::B2DTrapezoidVector aTrapezoidVector;
+basegfx::tools::trapezoidSubdivide(aTrapezoidVector, 
aSimplePolyPolygon);
+
+if (!aTrapezoidVector.empty())
+{
+for (basegfx::B2DTrapezoid & rTrapezoid : aTrapezoidVector)
+{
+GLfloat topX1 = rTrapezoid.getTopXLeft();
+GLfloat topX2 = rTrapezoid.getTopXRight();
+GLfloat topY  = rTrapezoid.getTopY();
+
+GLfloat bottomX1 = rTrapezoid.getBottomXLeft();
+GLfloat bottomX2 = rTrapezoid.getBottomXRight();
+GLfloat bottomY  = rTrapezoid.getBottomY();
+
+
vcl::vertex::addTrapezoid(rTriangleParameter.maVertices,
+ topX1,topY,
+ topX2,topY,
+ bottomX1, bottomY,
+ b

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

2016-05-30 Thread Stanislav Horacek
 sc/source/ui/src/scfuncs.src |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3239ecb4916e0b5ac7583c6de884c9c00f5ebc90
Author: Stanislav Horacek 
Date:   Sat May 28 11:31:35 2016 +0200

FORECAST.ETS.* functions: default aggregation is 1 (0 is not allowed)

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

diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src
index cec7ee3..faa26fe 100644
--- a/sc/source/ui/src/scfuncs.src
+++ b/sc/source/ui/src/scfuncs.src
@@ -10122,7 +10122,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
 };
 String 13 // Description of Parameter 6
 {
-Text [ en-US ] = "Aggregation (default 0 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
+Text [ en-US ] = "Aggregation (default 1 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
 };
 };
  // -=*# Resource for function FORECAST.ETS.MULT #*=-
@@ -10186,7 +10186,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
 };
 String 13 // Description of Parameter 6
 {
-Text [ en-US ] = "Aggregation (default 0 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
+Text [ en-US ] = "Aggregation (default 1 = AVERAGE); method to be 
used to aggregate identical (time) values." ;
 };
 };
  // -=*# Resource for function FORECAST.ETS.CONFINT #*=-
___
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' - formula/source

2016-05-30 Thread Julien Nabet
 formula/source/core/api/token.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fdd5860624f5e1c1cfbaea3c72e65c00ce3e1e5c
Author: Julien Nabet 
Date:   Sun May 29 21:49:08 2016 +0200

cid#1362174, 1362177: USE_AFTER_FREE+resource leak due to copypasta

Change-Id: Icd903335fdef3921781e2f16e98a0e10bda31e3f
Reviewed-on: https://gerrit.libreoffice.org/25641
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 
(cherry picked from commit 7a2bca302f8299d70f77952110fb4ccfa4b258c2)
Reviewed-on: https://gerrit.libreoffice.org/25649
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 

diff --git a/formula/source/core/api/token.cxx 
b/formula/source/core/api/token.cxx
index 14a671b..c0b52b6 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -1520,7 +1520,7 @@ FormulaTokenArray * FormulaTokenArray::RewriteMissing( 
const MissingConvention &
 }
 
 if (pOcds != &aOpCodeDcountStack[0])
-delete [] pOcas;
+delete [] pOcds;
 if (pOcas != &aOpCodeAddressStack[0])
 delete [] pOcas;
 if (pCtx != &aCtx[0])
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Justin Luth
 sw/source/uibase/docvw/AnnotationWin.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 8038cab377a5ac726cf38f5f95bc987063b95de5
Author: Justin Luth 
Date:   Mon May 30 07:10:25 2016 +0300

tdf#99870 writer: don't delete selection with delete-comment

When using the keyboard to select text and then deleting a comment,
all the text between the cursor and the comment would also be deleted.
(Not necessarily the selected text, but everything
from the point or the mark would be included in the delete.)

Change-Id: Id15a00d112d118227bc4a34b5102bb09d8d167b0
Reviewed-on: https://gerrit.libreoffice.org/25216
Reviewed-by: Justin Luth 
Tested-by: Jenkins 
(cherry picked from commit 12868914a39b0e8fb32f63d1307c1bb1c535fb9c)
Reviewed-on: https://gerrit.libreoffice.org/25652
Tested-by: Justin Luth 

diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 8c03679..17bc48e 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -158,6 +158,7 @@ void SwAnnotationWin::Delete()
 SwSidebarWin::Delete();
 // we delete the field directly, the Mgr cleans up the PostIt by 
listening
 GrabFocusToDocument();
+DocView().GetWrtShellPtr()->ClearMark();
 DocView().GetWrtShellPtr()->DelRight();
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: basic/CppunitTest_basic_macros.mk basic/qa

2016-05-30 Thread Tomofumi Yagi
 basic/CppunitTest_basic_macros.mk |3 +++
 basic/qa/cppunit/test_vba.cxx |   24 ++--
 2 files changed, 25 insertions(+), 2 deletions(-)

New commits:
commit d2a44e62704f185a0acecbb6320b92a4df3063b9
Author: Tomofumi Yagi 
Date:   Sat May 21 19:38:48 2016 +0900

tdf#99696 fix build error for 64bit Windows in unit tests using ADODB

This patch fixes the problem that the build for x64 fails in basic module
on 64bit Windows installed 32bit Excel Application.

New code checks the existance of ODBC driver for excel insted of the
existance of Excel application(at this time the bitness of ODBC driver for
excel would match that of building LibreOffice).

What we need is probably not Excel Application but ODBC drivers for proper
bitness.

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

diff --git a/basic/CppunitTest_basic_macros.mk 
b/basic/CppunitTest_basic_macros.mk
index 13e9235..8d64f40 100644
--- a/basic/CppunitTest_basic_macros.mk
+++ b/basic/CppunitTest_basic_macros.mk
@@ -42,6 +42,9 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_macros, \
 ifeq ($(OS),WNT)
 $(eval $(call gb_CppunitTest_use_system_win32_libs,basic_macros, \
oleaut32 \
+   $(if $(filter 140,$(VCVER)),legacy_stdio_definitions) \
+   odbc32 \
+   odbccp32 \
 ))
 endif
 
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index 265aaf6..83d243d 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -10,6 +10,13 @@
 #include 
 #include 
 
+#ifdef WIN32
+#include 
+
+#include 
+#include 
+#endif
+
 using namespace ::com::sun::star;
 
 namespace
@@ -96,13 +103,26 @@ void VBATest::testMiscOLEStuff()
 bool bOk = false;
 if( xOLEFactory.is() )
 {
-uno::Reference< uno::XInterface > xExcel = 
xOLEFactory->createInstance( "Excel.Application" );
 uno::Reference< uno::XInterface > xADODB = 
xOLEFactory->createInstance( "ADODB.Connection" );
-   bOk = xExcel.is() && xADODB.is();
+bOk = xADODB.is();
 }
 if ( !bOk )
 return; // can't do anything, skip test
 
+sal_Unicode sBuf[1024*4];
+SQLGetInstalledDriversW( sBuf, sizeof( sBuf ), nullptr );
+
+const sal_Unicode *pODBCDriverName = sBuf;
+bool bFound = false;
+for (; wcslen( pODBCDriverName ) != 0; pODBCDriverName += wcslen( 
pODBCDriverName ) + 1 ) {
+if ( wcsstr( pODBCDriverName, L"Microsoft Excel Driver" ) != nullptr ) 
{
+bFound = true;
+break;
+}
+}
+if ( !bFound )
+return; // can't find ODBC driver needed test, so skip test
+
 const char* macroSource[] = {
 "ole_ObjAssignNoDflt.vb",
 "ole_ObjAssignToNothing.vb",
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-05-30 Thread Stephan Bergmann
 sw/source/core/unocore/unofield.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 46a987fe08c6f7d20da437eed621d670ce44aea7
Author: Stephan Bergmann 
Date:   Mon May 30 11:19:37 2016 +0200

Fix tools/date.hxx Date vs. css::uno::Date mismatch

...that was there ever since at least 
84a3db80b4fd66c6854b3135b5f69b61fd828e62
"initial import".  None of the "make check" code appears to trigger this 
code
path.

Change-Id: Ic85b2ef4cf0a0ad06b467558e823cfa4ee31a08c

diff --git a/sw/source/core/unocore/unofield.cxx 
b/sw/source/core/unocore/unofield.cxx
index beea48c..89e5f17 100644
--- a/sw/source/core/unocore/unofield.cxx
+++ b/sw/source/core/unocore/unofield.cxx
@@ -2459,7 +2459,7 @@ throw (beans::UnknownPropertyException, 
lang::WrappedTargetException,
 aRet <<= m_pImpl->m_pProps->bBool4;
 break;
 case FIELD_PROP_DATE :
-aRet.setValue(&m_pImpl->m_pProps->aDate, 
::cppu::UnoType::get());
+aRet <<= m_pImpl->m_pProps->aDate.GetUNODate();
 break;
 case FIELD_PROP_USHORT1:
 aRet <<= static_cast(m_pImpl->m_pProps->nUSHORT1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sal/osl

2016-05-30 Thread Richard PALO
 sal/osl/unx/process.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit acbbb01940588604de965c4fcef64b2e17473fe6
Author: Richard PALO 
Date:   Sun May 29 08:16:28 2016 +0200

tdf#100021 - format argument issue in process.cxx

avoid warning whether pid_t is long or int

Change-Id: I533175b53166cb233169902d277906f5ce979421
Signed-off-by: Richard PALO 
Reviewed-on: https://gerrit.libreoffice.org/25593
Reviewed-by: Michael Stahl 
Tested-by: Michael Stahl 

diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx
index 4d372a3..9a9ba28 100644
--- a/sal/osl/unx/process.cxx
+++ b/sal/osl/unx/process.cxx
@@ -1023,7 +1023,7 @@ oslProcessError SAL_CALL osl_getProcessInfo(oslProcess 
Process, oslProcessData F
 int  fd;
 sal_Char name[PATH_MAX + 1];
 
-snprintf(name, sizeof(name), "/proc/%u", pid);
+snprintf(name, sizeof(name), "/proc/%ld", (long)pid);
 
 if ((fd = open(name, O_RDONLY)) >= 0)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


  1   2   >