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

2015-08-10 Thread Mihai Varga
 loleaflet/src/layer/tile/TileLayer.js |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 1708455928b02cebff9a501972811488fd717c2b
Author: Mihai Varga 
Date:   Tue Aug 11 09:44:54 2015 +0300

loleaflet: don't decrease emptyTilesCount when prefetching

from other parts

diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index bcda4aa..f85b3d2 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -437,7 +437,6 @@ L.TileLayer = L.GridLayer.extend({
tile.el.src = img;
}
else if (command.preFetch === 'true') {
-   this._emptyTilesCount -= 1;
this._tileCache[key] = img;
}
L.Log.log(textMsg, L.INCOMING, key);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Mihály Palenik
 cui/source/options/optaccessibility.cxx |   23 -
 cui/source/options/optaccessibility.hxx |5 -
 cui/source/options/optgdlg.cxx  |   94 -
 cui/source/options/optgdlg.hxx  |9 --
 cui/source/options/opthtml.cxx  |   46 --
 cui/source/options/opthtml.hxx  |3 
 cui/source/options/optmemory.cxx|9 --
 cui/source/options/optmemory.hxx|2 
 cui/uiconfig/ui/optaccessibilitypage.ui |   79 ++---
 cui/uiconfig/ui/optgeneralpage.ui   |   71 +++-
 cui/uiconfig/ui/opthtmlpage.ui  |   83 --
 cui/uiconfig/ui/optmemorypage.ui|   99 ++
 cui/uiconfig/ui/optviewpage.ui  |  141 +---
 13 files changed, 190 insertions(+), 474 deletions(-)

New commits:
commit 0b0fb87fbac36ef9fbf3dfeac0f1372617f4b3e4
Author: Mihály Palenik 
Date:   Tue Aug 11 00:50:04 2015 +0200

Delete unnecessary global options from Options dialog

Here https://wiki.documentfoundation.org/Design/Whiteboards/Options/Global
are unnecessary global options. These options are set in Expert
Configuration dialog under org.oppenoffice.Office.Common node.

Preference name, Property, Location in Options dialog;
Help, Tip, General/Help/Tips;
Undo, Steps, Memory/Undo/Number of Undo Steps;
Font/View, History, View/Font Lists/Show font history;
Drawinglayer, TransparentSelection, View/Selection/Transparency;
Drawinglayer, TransparentSelectionPercent,
View/Selection/Transparency level;
Accessibility, IsHelpTipsDisappear,
Accessibility/Help tips disappear after ... seconds;
Accessibility, HelpTipSeconds,
Accessibility/Help tips disappear after ... seconds;
Filter/HTML/Export, Browser,
Load/Save/HTML Compatibility/Export/Export choice;

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

diff --git a/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index d781ed26..4e12f54 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -41,15 +41,11 @@ 
SvxAccessibilityOptionsTabPage::SvxAccessibilityOptionsTabPage(vcl::Window* pPar
 get(m_pTextSelectionInReadonly, "textselinreadonly");
 get(m_pAnimatedGraphics, "animatedgraphics");
 get(m_pAnimatedTexts, "animatedtext");
-get(m_pTipHelpCB, "tiphelptimeout");
-get(m_pTipHelpNF, "tiphelptimeoutnf");
 
 get(m_pAutoDetectHC, "autodetecthc");
 get(m_pAutomaticFontColor, "autofontcolor");
 get(m_pPagePreviews, "systempagepreviewcolor");
 
-m_pTipHelpCB->SetClickHdl(LINK(this, SvxAccessibilityOptionsTabPage, 
TipHelpHdl));
-
 #ifdef UNX
 // UNIX: read the gconf2 setting instead to use the checkbox
 m_pAccessibilityTool->Hide();
@@ -69,8 +65,6 @@ void SvxAccessibilityOptionsTabPage::dispose()
 m_pTextSelectionInReadonly.clear();
 m_pAnimatedGraphics.clear();
 m_pAnimatedTexts.clear();
-m_pTipHelpCB.clear();
-m_pTipHelpNF.clear();
 m_pAutoDetectHC.clear();
 m_pAutomaticFontColor.clear();
 m_pPagePreviews.clear();
@@ -87,8 +81,6 @@ bool SvxAccessibilityOptionsTabPage::FillItemSet( SfxItemSet* 
)
 //aConfig.Set... from controls
 
 m_pImpl->m_aConfig.SetIsForPagePreviews( m_pPagePreviews->IsChecked() );
-m_pImpl->m_aConfig.SetIsHelpTipsDisappear( m_pTipHelpCB->IsChecked() );
-m_pImpl->m_aConfig.SetHelpTipSeconds( (short)m_pTipHelpNF->GetValue() );
 m_pImpl->m_aConfig.SetIsAllowAnimatedGraphics( 
m_pAnimatedGraphics->IsChecked() );
 m_pImpl->m_aConfig.SetIsAllowAnimatedText( m_pAnimatedTexts->IsChecked() );
 m_pImpl->m_aConfig.SetIsAutomaticFontColor( 
m_pAutomaticFontColor->IsChecked() );
@@ -112,8 +104,6 @@ void SvxAccessibilityOptionsTabPage::Reset( const 
SfxItemSet* )
 //set controls from aConfig.Get...
 
 m_pPagePreviews->Check(
m_pImpl->m_aConfig.GetIsForPagePreviews() );
-EnableTipHelp(
m_pImpl->m_aConfig.GetIsHelpTipsDisappear() );
-m_pTipHelpNF->SetValue(m_pImpl->m_aConfig.GetHelpTipSeconds() 
);
 m_pAnimatedGraphics->Check(
m_pImpl->m_aConfig.GetIsAllowAnimatedGraphics() );
 m_pAnimatedTexts->Check(   
m_pImpl->m_aConfig.GetIsAllowAnimatedText() );
 m_pAutomaticFontColor->Check(  
m_pImpl->m_aConfig.GetIsAutomaticFontColor() );
@@ -126,17 +116,4 @@ void SvxAccessibilityOptionsTabPage::Reset( const 
SfxItemSet* )
 m_pAccessibilityTool->Check(aMiscSettings.GetEnableATToolSupport());
 }
 
-IMPL_LINK(SvxAccessibilityOptionsTabPage, TipHelpHdl, CheckBox*, pBox)
-{
-bool bChecked = pBox->IsChecked();
-m_pTipHelpNF->Enable(bChecked);
-return 0;
-}
-
-void SvxAccessibilityOptionsTabPage::EnableTipHelp(bool bCheck)
-{
-m_pTipHelpCB->Check(bC

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

2015-08-10 Thread Mihai Varga
 loleaflet/src/layer/Layer.js  |6 --
 loleaflet/src/layer/tile/GridLayer.js |   12 +++-
 2 files changed, 11 insertions(+), 7 deletions(-)

New commits:
commit aeac42bbc0f3daf841e7b4ea46df80942484395c
Author: Mihai Varga 
Date:   Tue Aug 11 09:28:19 2015 +0300

loleaflet: moved the socket initialization in the GridLayer

diff --git a/loleaflet/src/layer/Layer.js b/loleaflet/src/layer/Layer.js
index 85c6339..9d6fb1c 100644
--- a/loleaflet/src/layer/Layer.js
+++ b/loleaflet/src/layer/Layer.js
@@ -44,12 +44,6 @@ L.Layer = L.Evented.extend({
this._map = map;
this._zoomAnimated = map._zoomAnimated;
 
-   if (this._map.socket && !this._map.socket.onopen) {
-   this._map.socket.onopen = L.bind(this._initDocument, 
this);
-   }
-   if (this._map.socket && !this._map.socket.onmessage) {
-   this._map.socket.onmessage = L.bind(this._onMessage, 
this);
-   }
this.onAdd(map);
 
if (this.getAttribution && this._map.attributionControl) {
diff --git a/loleaflet/src/layer/tile/GridLayer.js 
b/loleaflet/src/layer/tile/GridLayer.js
index 3b38029..ecf4113 100644
--- a/loleaflet/src/layer/tile/GridLayer.js
+++ b/loleaflet/src/layer/tile/GridLayer.js
@@ -38,8 +38,17 @@ L.GridLayer = L.Layer.extend({
 
this._map._fadeAnimated = false;
this._viewReset();
-   this._update();
this._map._docLayer = this;
+
+   if (this._map.socket && !this._map.socket.onopen) {
+   this._map.socket.onopen = L.bind(this._initDocument, 
this);
+   }
+   else if (this._map.socket && this._map.socket.readyState === 1) 
{
+   this._initDocument();
+   }
+   if (this._map.socket && !this._map.socket.onmessage) {
+   this._map.socket.onmessage = L.bind(this._onMessage, 
this);
+   }
},
 
beforeAdd: function (map) {
@@ -51,6 +60,7 @@ L.GridLayer = L.Layer.extend({
map._removeZoomLimit(this);
this._container = null;
this._tileZoom = null;
+   this._map.socket.onmessage = null;
},
 
bringToFront: function () {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: codemaker/source compilerplugins/clang i18npool/source include/rtl l10ntools/source sal/qa store/source

2015-08-10 Thread Noel Grandin
 codemaker/source/cppumaker/dependencies.cxx |2 
 compilerplugins/clang/defaultparams.cxx |   80 
 i18npool/source/breakiterator/gendict.cxx   |2 
 include/rtl/string.hxx  |2 
 include/rtl/ustring.hxx |4 -
 l10ntools/source/export.cxx |2 
 l10ntools/source/xmlparse.cxx   |2 
 sal/qa/osl/file/osl_File.cxx|6 +-
 store/source/storbios.cxx   |2 
 9 files changed, 91 insertions(+), 11 deletions(-)

New commits:
commit 9d307abeec2a80e59af0f0af10dc42d90cd7441a
Author: Noel Grandin 
Date:   Fri Aug 7 08:35:12 2015 +0200

new loplugin: defaultparams

find places where we do not need to be passing a parameter to a
function, because that function has a default value which matches the
value we are passing.

Change-Id: I04d1fd6275204dd4925e6563282464f461123632

diff --git a/codemaker/source/cppumaker/dependencies.cxx 
b/codemaker/source/cppumaker/dependencies.cxx
index b56bacf..ebcd839 100644
--- a/codemaker/source/cppumaker/dependencies.cxx
+++ b/codemaker/source/cppumaker/dependencies.cxx
@@ -301,7 +301,7 @@ void Dependencies::insert(OUString const & name, bool base) 
{
 for (std::vector< OString >::iterator i(args.begin()); i != args.end();
  ++i)
 {
-insert(b2u(*i), false);
+insert(b2u(*i));
 }
 // fall through
 case UnoType::SORT_SEQUENCE_TYPE:
diff --git a/compilerplugins/clang/defaultparams.cxx 
b/compilerplugins/clang/defaultparams.cxx
new file mode 100644
index 000..173cc5e
--- /dev/null
+++ b/compilerplugins/clang/defaultparams.cxx
@@ -0,0 +1,80 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+
+#include "plugin.hxx"
+
+// Find places where we call a method with values == the values specified in 
the parameter defaults.
+// i.e. where the code might as well not specify anything.
+
+namespace {
+
+class DefaultParams:
+public RecursiveASTVisitor, public loplugin::Plugin
+{
+public:
+explicit DefaultParams(InstantiationData const & data): Plugin(data) {}
+
+virtual void run() override { 
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
+
+bool VisitCallExpr(const CallExpr * callExpr);
+};
+
+bool DefaultParams::VisitCallExpr(const CallExpr * callExpr) {
+if (ignoreLocation(callExpr)) {
+return true;
+}
+if (callExpr->getNumArgs() == 0) {
+return true;
+}
+if (callExpr->getDirectCallee() == nullptr) {
+return true;
+}
+const FunctionDecl* functionDecl = 
callExpr->getDirectCallee()->getCanonicalDecl();
+unsigned i = callExpr->getNumArgs() - 1;
+const Expr* arg = callExpr->getArg(i);
+// variadic functions
+if (i >= functionDecl->getNumParams()) {
+return true;
+}
+const ParmVarDecl* parmVarDecl = functionDecl->getParamDecl(i);
+const Expr* defaultArgExpr = parmVarDecl->getDefaultArg();
+if (!arg->isDefaultArgument() &&
+arg->isIntegerConstantExpr(compiler.getASTContext()) &&
+parmVarDecl->hasDefaultArg() &&
+!parmVarDecl->hasUninstantiatedDefaultArg() &&
+defaultArgExpr->isIntegerConstantExpr(compiler.getASTContext()))
+{
+APSInt x1, x2;
+if (arg->EvaluateAsInt(x1, compiler.getASTContext()) &&
+defaultArgExpr->EvaluateAsInt(x2, compiler.getASTContext()) &&
+x1 == x2)
+{
+report(
+DiagnosticsEngine::Warning,
+"not necessary to pass this argument, it defaults to the same 
value",
+callExpr->getSourceRange().getBegin())
+  << callExpr->getSourceRange();
+report(
+DiagnosticsEngine::Warning,
+"default method parameter declaration here",
+parmVarDecl->getSourceRange().getBegin())
+  << parmVarDecl->getSourceRange();
+}
+}
+return true;
+}
+
+loplugin::Plugin::Registration< DefaultParams > X("defaultparams", false);
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/i18npool/source/breakiterator/gendict.cxx 
b/i18npool/source/breakiterator/gendict.cxx
index 3e649dd..493d053 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -126,7 +126,7 @@ static inline void printDataArea(FILE *dictionary_fp, FILE 
*source_fp, vectorGetText( sText, STRING_TYP_TEXT, sCur, false );
+pEntrys->GetText( sText, STRING_TYP_TEXT, sCur );
 if( !sText.isEmpty())
   

Re: [ANN] LibreOffice 5.0.1 RC1 available

2015-08-10 Thread Tommy
On Tue, 11 Aug 2015 01:23:05 +0200, Christian Lohmaier  
 wrote:



Dear Community,

The Document Foundation is pleased to announce the first release
candidate of LibreOffice 5.0.1


5.0.1.1 rc version added to Bugzilla

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


[GSoC] Reuse Mozilla's rolling update mechanism for LibreOffice - Weekly Report 11

2015-08-10 Thread Nathan Yee
This is the week 11 progress report of the GSoC bug "Reuse Mozilla's
rolling update mechanism for LibreOffice".

Last week:
- successfully did an in-place upgrade on Windows using partial mar files
- updated documentation at
https://wiki.documentfoundation.org/Development/Online_Update

Goals for this week:
- integrate the new update mechanism into the existing LibreOffice online
update mechanism

-- 
Nathan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: config_host.mk.in configure.ac

2015-08-10 Thread Norbert Thiebaud
 config_host.mk.in |1 -
 configure.ac  |   25 -
 2 files changed, 26 deletions(-)

New commits:
commit 12fb9096f562281c7ca4b7fed6a3342dac9a91b7
Author: Norbert Thiebaud 
Date:   Mon Aug 10 14:10:00 2015 -0500

configure.ac : completely kill the --enable/disable--verbose thing

There is no legitimate use case... no-one need or want to see
the build output with all the command by default.. and if one is
enclined to do such things, verbose=t in the env does the trick
leaving that as a configure options garantee bit-root (as it was the case)
and just make it bigger for nothing.. worse may encourage newcomer
to shoot themselves in the foot

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

diff --git a/config_host.mk.in b/config_host.mk.in
index 500d752..732c1b7 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -614,7 +614,6 @@ export VALGRIND_CFLAGS=$(gb_SPACE)@VALGRIND_CFLAGS@
 export VALIDATOR_EXTENSION_PACK=@VALIDATOR_EXTENSION_PACK@
 export VCVER=@VCVER@
 export DEVENV=@DEVENV@
-export verbose?=@verbose@
 export VISIO_CFLAGS=$(gb_SPACE)@VISIO_CFLAGS@
 export VISIO_LIBS=$(gb_SPACE)@VISIO_LIBS@
 export WATCH_WINDOW_EXTENSION_PACK=@WATCH_WINDOW_EXTENSION_PACK@
diff --git a/configure.ac b/configure.ac
index 300d303..c2f7dc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1276,12 +1276,6 @@ AC_ARG_ENABLE(build-unowinreg,
 ],
 ,)
 
-AC_ARG_ENABLE(verbose,
-AS_HELP_STRING([--enable-verbose],
-[Increase build verbosity.])[
-  --disable-verbose   Decrease build verbosity.],
-,)
-
 AC_ARG_ENABLE(dependency-tracking,
 AS_HELP_STRING([--enable-dependency-tracking],
 [Do not reject slow dependency extractors.])[
@@ -12721,25 +12715,6 @@ AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_ID, 
$ONEDRIVE_CLIENT_ID)
 AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_SECRET, $ONEDRIVE_CLIENT_SECRET)
 
 
-# ===
-# De- or increase default verbosity of build process
-# ===
-AC_MSG_CHECKING([build verbosity])
-verbose=
-if test -n "$enable_verbose"; then
-if test "$enable_verbose" = "yes"; then
-verbose="t"
-AC_MSG_RESULT([high])
-fi
-if test "$enable_verbose" = "no"; then
-verbose=
-AC_MSG_RESULT([low])
-fi
-else
-AC_MSG_RESULT([not set])
-fi
-AC_SUBST(verbose)
-
 dnl ===
 dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
 dnl --enable-dependency-tracking configure option
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: android/Bootstrap android/source compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac external/harfbuzz external/libabw external/libcdr external/libebook ex

2015-08-10 Thread Norbert Thiebaud
 Makefile.in   |2 +-
 android/Bootstrap/Makefile.shared |4 ++--
 android/source/Makefile   |2 +-
 compilerplugins/Makefile-clang.mk |2 +-
 config_host.mk.in |2 +-
 configure.ac  |7 ---
 external/harfbuzz/ExternalProject_harfbuzz.mk |2 +-
 external/libabw/ExternalProject_libabw.mk |2 +-
 external/libcdr/ExternalProject_libcdr.mk |2 +-
 external/libebook/ExternalProject_libebook.mk |2 +-
 external/libeot/ExternalProject_libeot.mk |2 +-
 external/libetonyek/ExternalProject_libetonyek.mk |2 +-
 external/libfreehand/ExternalProject_libfreehand.mk   |2 +-
 external/liblangtag/ExternalProject_langtag.mk|2 +-
 external/libmspub/ExternalProject_libmspub.mk |2 +-
 external/libmwaw/ExternalProject_libmwaw.mk   |2 +-
 external/libodfgen/ExternalProject_libodfgen.mk   |2 +-
 external/liborcus/ExternalProject_liborcus.mk |2 +-
 external/libpagemaker/ExternalProject_libpagemaker.mk |2 +-
 external/librevenge/ExternalProject_librevenge.mk |2 +-
 external/libvisio/ExternalProject_libvisio.mk |2 +-
 external/libwpd/ExternalProject_libwpd.mk |2 +-
 external/libwpg/ExternalProject_libwpg.mk |2 +-
 external/libwps/ExternalProject_libwps.mk |2 +-
 filter/Configuration_filter.mk|2 +-
 include/sal/detail/log.h  |3 +--
 instsetoo_native/CustomTarget_install.mk  |2 +-
 odk/CustomTarget_doxygen.mk   |4 ++--
 solenv/gbuild/gbuild.mk   |2 +-
 29 files changed, 34 insertions(+), 34 deletions(-)

New commits:
commit a8db357874b3ab3f785457cd9a84c68a05d3c61e
Author: Norbert Thiebaud 
Date:   Mon Aug 10 14:06:40 2015 -0500

gbuild/config stop using VERBOSE, use only verbose=t

configure.ac was setting VERBOSE=YES/NO when really
we use verbose=t or verbose=

Change-Id: I47aee8d177cb2d788a62ecdbbb9cc3695c2bb299
Reviewed-on: https://gerrit.libreoffice.org/17634
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/Makefile.in b/Makefile.in
index 3f806c0..5236134 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -58,7 +58,7 @@ gb_Side ?= host
 
 include $(BUILDDIR)/config_$(gb_Side).mk
 
-export GMAKE_OPTIONS?=-r$(if $(verbose)$(VERBOSE),,s)$(value $(MAKEFLAGS))
+export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
 
 PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
 
diff --git a/android/Bootstrap/Makefile.shared 
b/android/Bootstrap/Makefile.shared
index 84c6881..aaf50ce 100644
--- a/android/Bootstrap/Makefile.shared
+++ b/android/Bootstrap/Makefile.shared
@@ -65,7 +65,7 @@ properties:
echo "APP_PLATFORM := android-21" >> jni/Application.mk
 
 install:
-   unset JAVA_HOME && $(ANT) $(if $(VERBOSE)$(verbose),,-quiet) debug 
install
+   unset JAVA_HOME && $(ANT) $(if $(verbose),,-quiet) debug install
@echo
@echo 'Run it with "make run"'
@echo
@@ -74,7 +74,7 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
 
 clean: android_version_setup properties
-   $(ANT) $(if $(VERBOSE)$(verbose),,-quiet) -keep-going clean
+   $(ANT) $(if $(verbose),,-quiet) -keep-going clean
rm -rf assets libs $(SODEST) $(OBJLOCAL) 
$(BOOTSTRAPDIR)/no-resource-compress.xml
rm -f native-code.cxx
rm -rf $(APPCOMPATDIR)
diff --git a/android/source/Makefile b/android/source/Makefile
index 6f70a91..6711b6c 100644
--- a/android/source/Makefile
+++ b/android/source/Makefile
@@ -35,7 +35,7 @@ build-ant: android_version_setup copy-stuff prepare-appcompat 
link-so properties
#ownCloud lib dependency
$(call 
COPYJAR,$(WORKDIR)/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar)
 #
-   unset JAVA_HOME && $(ANT) $(if $(VERBOSE)$(verbose),,-quiet) $(if 
$(ENABLE_RELEASE_BUILD),release,debug)
+   unset JAVA_HOME && $(ANT) $(if $(verbose),,-quiet) $(if 
$(ENABLE_RELEASE_BUILD),release,debug)
 
 run:
adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity
diff --git a/compilerplugins/Makefile-clang.mk 
b/compilerplugins/Makefile-clang.mk
index bed75ce..b914d37 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -32,7 +32,7 @@ CLANGINDIR=$(SRCDIR)/compilerplugins/clang
 # plugin will cause cache misses with ccache.
 CLANGOUTDIR=$(BUILDDIR)/compilerplugins/obj
 
-QUIET=$(if $(VERBOSE)$(verbose),,@)
+QUIET=$(if $(verbose),,@)
 
 ifneq ($(ENABLE_WERROR),)
 CLANGWERROR := -Werror
diff --git a/config_host.mk.in b/config_host.mk.in
index 63b10d5..500d752 100644
-

[Libreoffice-commits] core.git: slideshow/CppunitTest_slideshow.mk slideshow/Executable_demoshow.mk slideshow/Library_OGLTrans.mk slideshow/Library_slideshow.mk slideshow/qa slideshow/source

2015-08-10 Thread Norbert Thiebaud
 slideshow/CppunitTest_slideshow.mk  |1 
 slideshow/Executable_demoshow.mk|   10 ---
 slideshow/Library_OGLTrans.mk   |6 -
 slideshow/Library_slideshow.mk  |1 
 slideshow/qa/debug/readme.txt   |3 
 slideshow/source/engine/activities/simplecontinuousactivitybase.cxx |   15 ++--
 slideshow/source/engine/activitiesqueue.cxx |4 -
 slideshow/source/engine/animationnodes/animationbasenode.cxx|4 -
 slideshow/source/engine/animationnodes/basecontainernode.cxx|9 +-
 slideshow/source/engine/animationnodes/basenode.cxx |   33 
+-
 slideshow/source/engine/eventqueue.cxx  |2 
 slideshow/source/engine/shapes/drawshapesubsetting.cxx  |   12 ---
 slideshow/source/engine/shapes/viewshape.cxx|   13 ++-
 slideshow/source/engine/smilfunctionparser.cxx  |4 -
 14 files changed, 49 insertions(+), 68 deletions(-)

New commits:
commit 7bdc6be9c23517eec02ce7139edd7003abbee1f8
Author: Norbert Thiebaud 
Date:   Mon Aug 10 14:01:33 2015 -0500

slideshow: stop (mis)-using VERBOSE

converted the use of internal 'verbose' level tracing to SAL_INFO/SAL_WARN

Change-Id: Iab89d9b5c75fe476c6516718f1cee3d01d196858
Reviewed-on: https://gerrit.libreoffice.org/17632
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/slideshow/CppunitTest_slideshow.mk 
b/slideshow/CppunitTest_slideshow.mk
index 2207a83..c957930 100644
--- a/slideshow/CppunitTest_slideshow.mk
+++ b/slideshow/CppunitTest_slideshow.mk
@@ -18,7 +18,6 @@ $(eval $(call gb_CppunitTest_set_include,slideshow,\
 
 $(eval $(call gb_CppunitTest_set_defs,slideshow,\
 $$(DEFS) \
-$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
 ))
 
 ifneq ($(strip $(debug)$(DEBUG)),)
diff --git a/slideshow/Executable_demoshow.mk b/slideshow/Executable_demoshow.mk
index 56725bd..d46e47f 100644
--- a/slideshow/Executable_demoshow.mk
+++ b/slideshow/Executable_demoshow.mk
@@ -16,16 +16,8 @@ $(eval $(call gb_Executable_set_include,demoshow,\
 -I$(SRCDIR)/slideshow/source/inc \
 ))
 
-ifeq ($(strip $(VERBOSE)),TRUE)
-$(eval $(call gb_Executable_set_defs,demoshow,\
-$$(DEFS) \
--DVERBOSE \
-))
-endif
-
 ifneq ($(strip $(debug)$(DEBUG)),)
-$(eval $(call gb_Executable_set_defs,demoshow,\
-$$(DEFS) \
+$(eval $(call gb_Executable_add_defs,demoshow,\
 -DBOOST_SP_ENABLE_DEBUG_HOOKS \
 ))
 endif
diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index f5f4676..4c3340f 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -9,12 +9,6 @@
 
 $(eval $(call gb_Library_Library,OGLTrans))
 
-ifeq ($(strip $(VERBOSE)),TRUE)
-$(eval $(call gb_Library_add_defs,OGLTrans,\
--DVERBOSE \
-))
-endif
-
 ifneq ($(strip $(debug)$(DEBUG)),)
 $(eval $(call gb_Library_add_defs,OGLTrans,\
 -DBOOST_SP_ENABLE_DEBUG_HOOKS \
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk
index 5d01391..5772afd 100644
--- a/slideshow/Library_slideshow.mk
+++ b/slideshow/Library_slideshow.mk
@@ -16,7 +16,6 @@ $(eval $(call gb_Library_set_include,slideshow,\
 
 $(eval $(call gb_Library_add_defs,slideshow,\
 -DBOOST_SPIRIT_USE_OLD_NAMESPACE \
-$(if $(filter TRUE,$(VERBOSE)),-DVERBOSE) \
 ))
 
 ifneq ($(strip $(debug)$(DEBUG)),)
diff --git a/slideshow/qa/debug/readme.txt b/slideshow/qa/debug/readme.txt
index a3df5a9..eb458d6 100644
--- a/slideshow/qa/debug/readme.txt
+++ b/slideshow/qa/debug/readme.txt
@@ -1,7 +1,6 @@
 Recognized preprocessor switches
 
 
- - VERBOSE=t: enable extra verbose trace output (debug=t builds only)
  - TIMELOG=t: enable time logging (also for product builds)
 
 
@@ -17,4 +16,4 @@ nodetree.sh:
  script.
  To generate output at other instances, use the DEBUG_NODES_SHOWTREE
  macro in animationnodefactory.cxx.
- 
\ No newline at end of file
+ 
diff --git 
a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx 
b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
index 347483a..f227e89 100644
--- a/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
+++ b/slideshow/source/engine/activities/simplecontinuousactivitybase.cxx
@@ -56,8 +56,8 @@ namespace slideshow
 const double nCurrElapsedTime( maTimer.getElapsedTime() );
 
 // log time
-VERBOSE_TRACE( "SimpleContinuousActivityBase::calcTimeLag(): "
-   "next step is based on time: %f", nCurrElapsedTime 
);
+SAL_INFO("slideshow.verbose", 
"SimpleContinuousActivityBase::calcTimeLag(): "
+ "next step is based on time: " << nCurrElapsedTime );
 
 // go to great length to ensure a proper animation
 

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

2015-08-10 Thread Maxim Monastirsky
 include/sfx2/sidebar/SidebarController.hxx |2 ++
 include/sfx2/sidebar/TabBar.hxx|2 +-
 sfx2/source/sidebar/SidebarController.cxx  |1 -
 svx/source/sidebar/PanelLayout.cxx |   11 ++-
 4 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit e98cf0c63d6c48ca7c1db87d7413d5c419690c76
Author: Maxim Monastirsky 
Date:   Tue Aug 11 02:09:25 2015 +0300

Related: tdf#78111 Try to guard against too wide panel layouts

The sidebar has width limit, so a panel shouldn't attempt to
resize more than that. Otherwise we'll get an endless loop.

Change-Id: Ia36535637e3585595c673c7fc46a1a7b162b74ba

diff --git a/include/sfx2/sidebar/SidebarController.hxx 
b/include/sfx2/sidebar/SidebarController.hxx
index 00a53b3..d3aabbc 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -122,6 +122,8 @@ public:
 const static sal_Int32 SwitchFlag_ForceNewDeck = 0x02;
 const static sal_Int32 SwitchFlag_ForceNewPanels = 0x02;
 
+const static sal_Int32 gnMaximumSidebarWidth = 400;
+
 void OpenThenSwitchToDeck (
 const ::rtl::OUString& rsDeckId);
 
diff --git a/include/sfx2/sidebar/TabBar.hxx b/include/sfx2/sidebar/TabBar.hxx
index 2a8d7f9..3dcf791 100644
--- a/include/sfx2/sidebar/TabBar.hxx
+++ b/include/sfx2/sidebar/TabBar.hxx
@@ -46,7 +46,7 @@ class SidebarController;
 
 /** The tab bar is the container for the individual tabs.
 */
-class TabBar
+class SFX2_DLLPUBLIC TabBar
 : public vcl::Window
 {
 public:
diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 6482717..aac2906 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -64,7 +64,6 @@ namespace
 {
 const static char gsReadOnlyCommandName[] = ".uno:EditDoc";
 const static char gsHideSidebarCommandName[] = ".uno:Sidebar";
-const static sal_Int32 gnMaximumSidebarWidth (400);
 const static sal_Int32 gnWidthCloseThreshold (70);
 const static sal_Int32 gnWidthOpenThreshold (40);
 }
diff --git a/svx/source/sidebar/PanelLayout.cxx 
b/svx/source/sidebar/PanelLayout.cxx
index 591dfe3..1f2b032 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -11,9 +11,13 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 
+using namespace sfx2::sidebar;
+
 PanelLayout::PanelLayout(vcl::Window* pParent, const OString& rID, const 
OUString& rUIXMLDescription, const 
com::sun::star::uno::Reference &rFrame)
 : Control(pParent)
 , m_bInClose(false)
@@ -40,7 +44,12 @@ void PanelLayout::dispose()
 Size PanelLayout::GetOptimalSize() const
 {
 if (isLayoutEnabled(this))
-return 
VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
+{
+Size aSize = 
VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
+aSize.Width() = std::min(aSize.Width(),
+(SidebarController::gnMaximumSidebarWidth - 
TabBar::GetDefaultWidth()) * GetDPIScaleFactor());
+return aSize;
+}
 
 return Control::GetOptimalSize();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[ANN] LibreOffice 5.0.1 RC1 available

2015-08-10 Thread Christian Lohmaier
Dear Community,

The Document Foundation is pleased to announce the first release
candidate of LibreOffice 5.0.1. The upcoming 5.0.0 will be the first
bugfix release of our fresh 5.0 line. Please be aware that LibreOffice 5.0.1
RC1 has not been flagged as ready for production use yet, however feel
free to give it a try instead of 5.0.0.

A work-in-progress list of new features in LibreOffice 5.0 can be
found at https://wiki.documentfoundation.org/ReleaseNotes/5.0

The release is available for Windows, Linux and Mac OS X from our QA
builds download page at

  http://www.libreoffice.org/download/pre-releases/

Windows builds are also provided in 64bit version.

Should you find bugs, please report them to our Bugzilla:

  https://bugs.documentfoundation.org

A good way to assess the release candidate quality is to run some
specific manual tests on it, our TCM wiki page has more details:

 
http://wiki.documentfoundation.org/QA/Testing/Regression_Tests#Full_Regression_Test

For other ways to get involved with this exciting project - you can
e.g. contribute code:

  http://www.libreoffice.org/community/developers/

translate LibreOffice to your language:

  http://wiki.documentfoundation.org/LibreOffice_Localization_Guide

or help with funding our operations:

  http://donate.libreoffice.org/

A list of known issues and fixed bugs compared to 5.0.0 final (rc5) is
available from our wiki:

  http://wiki.documentfoundation.org/Releases/5.0.1/RC1

Let us close again with a BIG Thank You! to all of you having
contributed to the LibreOffice project - this release would not have
been possible without your help.

On behalf of the Community,

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


[GSoC] Rework the Expert Configuration dialog Week 11

2015-08-10 Thread Mihály Palenik
Hello,

Last week I deleted unnecessary options from options dialog. Under this
link (https://wiki.documentfoundation.org/Design/Whiteboards/Options) they
are listed.
This week I will try write help page to this dialog.

Best regards,
Mihály Palenik
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Stephen Hart license statement

2015-08-10 Thread Steve Hart

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

All of my past and future contributions to LibreOffice may be license
under the MPLv2/LGPLv3+ dual license.
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQEcBAEBCAAGBQJVySnMAAoJEGhVcfU/3hy/69oIAIuCWFrWfdSvEFG0EfqxZFx5
75thQks5IROT+HvUXG1eBiewrf1j1jMxENltnGD5NWWYkEfWADqnUoGdzWzPl7E4
AIse4FQXDs+3v1koB8fKeYQcu7UJHtDDJVF9nhZamdVmmxBTgqS1UHYXvgOa/RSk
VB1DzZMaNAX7FQNtDqLIHzQO6PsgklHca7/YtWyqw3xTaXa/+jyulimQyY2dB5zx
WCaJgPleQnaqkeQj3ooFmFy2YFGHeacnsd0fIHCgWr+o+wkGairuSvmuvnG+q+8/
UMN54sRdDI8T//S4jLJB+71hrpaTj/9DPuNeGcHN9UAy9ktsXVHXBGG0cpllqiU=
=m4ht
-END PGP SIGNATURE-

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


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

2015-08-10 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc.hxx |2 +
 sc/qa/unit/ucalc_formula.cxx |   54 +++
 2 files changed, 56 insertions(+)

New commits:
commit 066f3132effa9017fe9127e9d311d6ae88d0c729
Author: Łukasz Hryniuk 
Date:   Mon Aug 10 17:13:02 2015 +0200

tdf#89387 a few tests for FTEST function

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

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 7c54dc0..3e03b5f 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -184,6 +184,7 @@ public:
 void testFuncRangeOp();
 void testFuncFORMULA();
 void testFuncTableRef();
+void testFuncFTEST();
 
 void testExternalRef();
 void testExternalRefFunctions();
@@ -514,6 +515,7 @@ public:
 CPPUNIT_TEST(testFuncRangeOp);
 CPPUNIT_TEST(testFuncFORMULA);
 CPPUNIT_TEST(testFuncTableRef);
+CPPUNIT_TEST(testFuncFTEST);
 CPPUNIT_TEST(testExternalRef);
 CPPUNIT_TEST(testExternalRefFunctions);
 CPPUNIT_TEST(testCopyToDocument);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 720ff5e..0a9fd2d 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -5522,4 +5522,58 @@ void Test::testFuncTableRef()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testFuncFTEST()
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+
+m_pDoc->InsertTab(0, "FTest");
+
+ScAddress aPos(6,0,0);
+m_pDoc->SetString(aPos, "=FTEST(A1:C3;D1:F3)");
+m_pDoc->SetValue(0, 0, 0, 9.0); // A1
+OUString aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_MESSAGE("FTEST should return #VALUE! for less than 2 
values",
+OUString::createFromAscii("#VALUE!") == aVal);
+m_pDoc->SetValue(0, 1, 0, 8.0); // A2
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_MESSAGE("FTEST should return #VALUE! for less than 2 
values",
+OUString::createFromAscii("#VALUE!") == aVal);
+m_pDoc->SetValue(3, 0, 0, 5.0); // D1
+aVal = m_pDoc->GetString(aPos);
+CPPUNIT_ASSERT_MESSAGE("FTEST should return #VALUE! for less than 2 
values",
+OUString::createFromAscii("#VALUE!") == aVal);
+m_pDoc->SetValue(3, 1, 0, 6.0); // D2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
1., m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(1, 0, 0, 6.0); // B1
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.6222, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(1, 1, 0, 8.0); // B2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.7732, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(4, 0, 0, 7.0); // E1
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.8194, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(4, 1, 0, 4.0); // E2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.9674, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(2, 0, 0, 3.0); // C1
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.3402, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(5, 0, 0, 28.0); // F1
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0161, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(2, 1, 0, 9.0); // C2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0063, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(5, 1, 0, 4.0); // F2
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0081, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(0, 2, 0, 2.0); // A3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0122, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(3, 2, 0, 8.0); // D3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0178, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(1, 2, 0, 4.0); // B3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0093, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(4, 2, 0, 7.0); // E3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0132, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(5, 2, 0, 5.0); // F3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0168, m_pDoc->GetValue(aPos), 10e-4);
+m_pDoc->SetValue(2, 2, 0, 13.0); // C3
+CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("Calculation of FTEST failed", 
0.0422, m_pDoc->GetValue(aPos), 10e-4);
+
+m_pDoc->DeleteTab(0);
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Łukasz Hryniuk
 sc/source/core/tool/interpr5.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e67bbe231f875477b16f3fe51dcf14e3711a73a5
Author: Łukasz Hryniuk 
Date:   Sat Aug 8 16:04:01 2015 +0200

tdf#89387 related, fix SumSquare bug in SumMXMY2

SumSquare returns IterateResult, which, because of rounding errors, store
first value in mfFirst and rest in mfRest. They should be added to get
the full sum of square of matrices difference.

Change-Id: I9bc435801d94206960b0b4fe4a9149ef1abeb3be
Reviewed-on: https://gerrit.libreoffice.org/17592
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit d5bff1225a6739e8369bacd8392686bd26630d2f)
Reviewed-on: https://gerrit.libreoffice.org/17639

diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 8397a0e..c0606a9 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1788,7 +1788,7 @@ void ScInterpreter::ScSumXMY2()
 else
 {
 ScMatrix::IterateResult aRes = pResMat->SumSquare(false);
-double fSum = aRes.mfRest;
+double fSum = aRes.mfFirst + aRes.mfRest;
 PushDouble(fSum);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Łukasz Hryniuk
 sc/qa/unit/ucalc.hxx |2 ++
 sc/qa/unit/ucalc_formula.cxx |   30 ++
 sc/source/core/tool/interpr5.cxx |2 +-
 3 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit fc71e5b4637ece8822e83c844d191f461b2f0177
Author: Łukasz Hryniuk 
Date:   Sat Aug 8 20:50:04 2015 +0200

tdf#89387 related tests for ScSumXMY2()

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

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 759d65d..7c54dc0 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -160,6 +160,7 @@ public:
 void testFuncSUM();
 void testFuncPRODUCT();
 void testFuncSUMPRODUCT();
+void testFuncSUMXMY2();
 void testFuncMIN();
 void testFuncN();
 void testFuncCOUNTIF();
@@ -491,6 +492,7 @@ public:
 CPPUNIT_TEST(testFuncSUM);
 CPPUNIT_TEST(testFuncPRODUCT);
 CPPUNIT_TEST(testFuncSUMPRODUCT);
+CPPUNIT_TEST(testFuncSUMXMY2);
 CPPUNIT_TEST(testFuncMIN);
 CPPUNIT_TEST(testFuncN);
 CPPUNIT_TEST(testFuncCOUNTIF);
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 38ac04a..720ff5e 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -3369,6 +3369,36 @@ void Test::testFuncSUMPRODUCT()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testFuncSUMXMY2()
+{
+m_pDoc->InsertTab(0, "Test SumXMY2");
+
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto recalc.
+
+ScAddress aPos(0,0,0);
+m_pDoc->SetString(aPos, "=SUMXMY2(B1:B3;C1:C3)");
+CPPUNIT_ASSERT_EQUAL(0.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(1,0,0),  1.0); // B1
+CPPUNIT_ASSERT_EQUAL(1.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(1,1,0),  2.0); // B2
+CPPUNIT_ASSERT_EQUAL(5.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(1,2,0),  3.0); // B3
+CPPUNIT_ASSERT_EQUAL(14.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(2,0,0), -1.0); // C1
+CPPUNIT_ASSERT_EQUAL(17.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(2,1,0),  3.0); // C2
+CPPUNIT_ASSERT_EQUAL(14.0,  m_pDoc->GetValue(aPos));
+m_pDoc->SetValue(ScAddress(2,2,0),  1.0); // C3
+CPPUNIT_ASSERT_EQUAL(9.0,  m_pDoc->GetValue(aPos));
+
+double result = 0.0;
+m_pDoc->SetString(0, 4, 0, OUString("=SUMXMY2({2;3;4};{4;3;2})"));
+m_pDoc->GetValue(0, 4, 0, result);
+CPPUNIT_ASSERT_MESSAGE("Calculation of SUMXMY2 with inline arrays failed", 
result == 8.0);
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testFuncMIN()
 {
 sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn on auto recalc.
commit d5bff1225a6739e8369bacd8392686bd26630d2f
Author: Łukasz Hryniuk 
Date:   Sat Aug 8 16:04:01 2015 +0200

tdf#89387 related, fix SumSquare bug in SumMXMY2

SumSquare returns IterateResult, which, because of rounding errors, store
first value in mfFirst and rest in mfRest. They should be added to get
the full sum of square of matrices difference.

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

diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index c3c746d..907ce8d 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -1791,7 +1791,7 @@ void ScInterpreter::ScSumXMY2()
 else
 {
 ScMatrix::IterateResult aRes = pResMat->SumSquare(false);
-double fSum = aRes.mfRest;
+double fSum = aRes.mfFirst + aRes.mfRest;
 PushDouble(fSum);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Debug build breaks in unit test

2015-08-10 Thread Regina Henschel

Hi Norbert,

Norbert Thiebaud schrieb:

On Sun, Aug 9, 2015 at 7:42 AM, Regina Henschel  wrote:

Hi all,

my build with --enable-dbgutil with VS2013 on 32-bit Windows 7 breaks in a
unit test. It is a build of an unchanged source. The log is in
http://pastebin.ca/3095468


btw any chance that you build was a mix-bag of --enable-verbose and
not --enable-verbose build ?


Yes. I'll try it with a clean build.

Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2015-08-10 Thread Miklos Vajna
 include/vcl/edit.hxx|4 ++--
 vcl/source/control/edit.cxx |   28 +++-
 2 files changed, 9 insertions(+), 23 deletions(-)

New commits:
commit 4532ea42904e4a7d6c50f7f8ea53aaa97ec72c5e
Author: Miklos Vajna 
Date:   Mon Aug 10 18:38:16 2015 +0200

tdf#92982 vcl rendercontext: simplify Edit::ImplClearBackground() logic

This fixes the vertical rendering artifacts visible on the bug
screenshot with the oxygen-gtk Gtk theme, and also is a lot simpler than
what we did here before.

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

diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx
index a245985..17a8a21 100644
--- a/include/vcl/edit.hxx
+++ b/include/vcl/edit.hxx
@@ -113,13 +113,13 @@ private:
 SAL_DLLPRIVATE voidImplInitEditData();
 SAL_DLLPRIVATE voidImplModified();
 SAL_DLLPRIVATE OUStringImplGetText() const;
-SAL_DLLPRIVATE voidImplRepaint(vcl::RenderContext& rRenderContext, 
bool bLayout = false);
+SAL_DLLPRIVATE voidImplRepaint(vcl::RenderContext& rRenderContext, 
const Rectangle& rRectangle, bool bLayout = false);
 SAL_DLLPRIVATE voidImplInvalidateOrRepaint();
 SAL_DLLPRIVATE voidImplDelete( const Selection& rSelection, 
sal_uInt8 nDirection, sal_uInt8 nMode );
 SAL_DLLPRIVATE voidImplSetText( const OUString& rStr, const 
Selection* pNewSelection = 0 );
 SAL_DLLPRIVATE voidImplInsertText( const OUString& rStr, const 
Selection* pNewSelection = 0, bool bIsUserInput = false );
 SAL_DLLPRIVATE OUStringImplGetValidString( const OUString& rString ) 
const;
-SAL_DLLPRIVATE voidImplClearBackground(vcl::RenderContext& 
rRenderContext, long nXStart, long nXEnd);
+SAL_DLLPRIVATE voidImplClearBackground(vcl::RenderContext& 
rRenderContext, const Rectangle& rRectangle, long nXStart, long nXEnd);
 SAL_DLLPRIVATE voidImplPaintBorder(vcl::RenderContext& 
rRenderContext, long nXStart, long nXEnd);
 SAL_DLLPRIVATE voidImplShowCursor( bool bOnlyIfVisible = true );
 SAL_DLLPRIVATE voidImplAlign();
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 8d64c5e..39f5bf0 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -501,7 +501,7 @@ long Edit::ImplGetTextYPosition() const
 return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2;
 }
 
-void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, bool bLayout)
+void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, const Rectangle& 
rRectangle, bool bLayout)
 {
 if (!IsReallyVisible())
 return;
@@ -543,7 +543,7 @@ void Edit::ImplRepaint(vcl::RenderContext& rRenderContext, 
bool bLayout)
 if (pCursor)
 pCursor->Hide();
 
-ImplClearBackground(rRenderContext, 0, GetOutputSizePixel().Width());
+ImplClearBackground(rRenderContext, rRectangle, 0, 
GetOutputSizePixel().Width());
 
 bool bPaintPlaceholderText = aText.isEmpty() && 
!maPlaceholderText.isEmpty();
 
@@ -1022,7 +1022,7 @@ int Edit::ImplGetNativeControlType() const
 return nCtrl;
 }
 
-void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, long 
nXStart, long nXEnd )
+void Edit::ImplClearBackground(vcl::RenderContext& rRenderContext, const 
Rectangle& rRectangle, long nXStart, long nXEnd )
 {
 /*
 * note: at this point the cursor must be switched off already
@@ -1038,22 +1038,8 @@ void Edit::ImplClearBackground(vcl::RenderContext& 
rRenderContext, long nXStart,
 {
 // ImplPaintBorder() is a NOP, we have a native border, and this is a 
sub-edit of a control.
 // That means we have to draw the parent native widget to paint the 
edit area to clear our background.
-long nLeft = mnXOffset + ImplGetExtraXOffset();
-long nTop = ImplGetTextYPosition();
-long nRight = GetOutputWidthPixel();
-long nHeight = GetTextHeight();
-Rectangle aEditArea(nLeft, nTop, nRight, nTop + nHeight);
-
-ControlType aCtrlType = ImplGetNativeControlType();
-ControlPart aCtrlPart = PART_ENTIRE_CONTROL;
-Rectangle aCtrlRegion(0, 0, GetParent()->GetOutputWidthPixel(), 
GetParent()->GetOutputHeightPixel());
-ControlState nState = ControlState::ENABLED;
-ImplControlValue aControlValue;
-
-rRenderContext.Push(PushFlags::CLIPREGION);
-rRenderContext.SetClipRegion(vcl::Region(aEditArea));
-rRenderContext.DrawNativeControl(aCtrlType, aCtrlPart, aCtrlRegion, 
nState, aControlValue, OUString());
-rRenderContext.Pop();
+PaintBufferGuard g(ImplGetWindowImpl()->mpFrameData, GetParent());
+GetParent()->Paint(rRenderContext, rRectangle);
 }
 }
 
@@ -1806,10 +1792,10 @@ void Edit::FillLayoutData() const
 const_cast(this)->Invalidate();
 }
 
-void E

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

2015-08-10 Thread Yousuf Philips
 basctl/uiconfig/basicide/toolbar/findbar.xml |2 +-
 sc/uiconfig/scalc/toolbar/findbar.xml|2 +-
 sd/uiconfig/sdraw/toolbar/findbar.xml|2 +-
 sd/uiconfig/simpress/toolbar/findbar.xml |2 +-
 sw/uiconfig/sglobal/toolbar/findbar.xml  |2 +-
 sw/uiconfig/sweb/toolbar/findbar.xml |2 +-
 sw/uiconfig/swriter/toolbar/findbar.xml  |4 ++--
 sw/uiconfig/swxform/toolbar/findbar.xml  |2 +-
 8 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit e12dc8fe8de1099fb1d34ac88d198ff623dbb4be
Author: Yousuf Philips 
Date:   Sun Aug 2 19:22:05 2015 +0400

tdf#93065 Swap next and previous buttons in find toolbar

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

diff --git a/basctl/uiconfig/basicide/toolbar/findbar.xml 
b/basctl/uiconfig/basicide/toolbar/findbar.xml
index a7cb693..662f54e 100644
--- a/basctl/uiconfig/basicide/toolbar/findbar.xml
+++ b/basctl/uiconfig/basicide/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sc/uiconfig/scalc/toolbar/findbar.xml 
b/sc/uiconfig/scalc/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sc/uiconfig/scalc/toolbar/findbar.xml
+++ b/sc/uiconfig/scalc/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sd/uiconfig/sdraw/toolbar/findbar.xml 
b/sd/uiconfig/sdraw/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sd/uiconfig/sdraw/toolbar/findbar.xml
+++ b/sd/uiconfig/sdraw/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sd/uiconfig/simpress/toolbar/findbar.xml 
b/sd/uiconfig/simpress/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sd/uiconfig/simpress/toolbar/findbar.xml
+++ b/sd/uiconfig/simpress/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sw/uiconfig/sglobal/toolbar/findbar.xml 
b/sw/uiconfig/sglobal/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sw/uiconfig/sglobal/toolbar/findbar.xml
+++ b/sw/uiconfig/sglobal/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sw/uiconfig/sweb/toolbar/findbar.xml 
b/sw/uiconfig/sweb/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sw/uiconfig/sweb/toolbar/findbar.xml
+++ b/sw/uiconfig/sweb/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
diff --git a/sw/uiconfig/swriter/toolbar/findbar.xml 
b/sw/uiconfig/swriter/toolbar/findbar.xml
index f6dfa42..7305b61 100644
--- a/sw/uiconfig/swriter/toolbar/findbar.xml
+++ b/sw/uiconfig/swriter/toolbar/findbar.xml
@@ -20,16 +20,16 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
   
   
   
-  
   
+  
   
   
 
diff --git a/sw/uiconfig/swxform/toolbar/findbar.xml 
b/sw/uiconfig/swxform/toolbar/findbar.xml
index 807ffbf..990cc6a 100644
--- a/sw/uiconfig/swxform/toolbar/findbar.xml
+++ b/sw/uiconfig/swxform/toolbar/findbar.xml
@@ -20,8 +20,8 @@
 http://openoffice.org/2001/toolbar"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; toolbar:id="toolbar">
   
   
-  
   
+  
   
   
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Eike Rathke
 sc/source/ui/view/output2.cxx |   52 --
 1 file changed, 30 insertions(+), 22 deletions(-)

New commits:
commit 2a06a052b920f696a794c2fb847fce63038220e9
Author: Eike Rathke 
Date:   Mon Aug 10 21:03:28 2015 +0200

Resolves: tdf#86024 do not attempt to shorten numeric value output

Regression of 087a79db1272858f107656c5ca3c6efb45680986

Change-Id: I903e05234882c79e6da6499cb17e16fd7226f91c

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 5f43c75..cd63e9d 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -2017,32 +2017,40 @@ Rectangle ScOutputData::LayoutStrings(bool 
bPixelToLogic, bool bPaint, const ScA
 
 OUString aShort = aString;
 
-double fVisibleRatio = 1.0;
-double fTextWidth = aVars.GetTextSize().Width();
-sal_Int32 nTextLen = aString.getLength();
-if (eOutHorJust == SVX_HOR_JUSTIFY_LEFT && 
aAreaParam.mnRightClipLength > 0)
+// But never fiddle with numeric values.
+// (Which was the cause of tdf#86024).
+// The General automatic format output takes
+// care of this, or fixed width numbers either fit
+// or display as ###.
+if (!bCellIsValue)
 {
-fVisibleRatio = (fTextWidth - 
aAreaParam.mnRightClipLength) / fTextWidth;
-if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+double fVisibleRatio = 1.0;
+double fTextWidth = 
aVars.GetTextSize().Width();
+sal_Int32 nTextLen = aString.getLength();
+if (eOutHorJust == SVX_HOR_JUSTIFY_LEFT && 
aAreaParam.mnRightClipLength > 0)
 {
-// Only show the left-end segment.
-sal_Int32 nShortLen = 
fVisibleRatio*nTextLen + 1;
-aShort = aShort.copy(0, nShortLen);
+fVisibleRatio = (fTextWidth - 
aAreaParam.mnRightClipLength) / fTextWidth;
+if (0.0 < fVisibleRatio && fVisibleRatio < 
1.0)
+{
+// Only show the left-end segment.
+sal_Int32 nShortLen = 
fVisibleRatio*nTextLen + 1;
+aShort = aShort.copy(0, nShortLen);
+}
 }
-}
-else if (eOutHorJust == SVX_HOR_JUSTIFY_RIGHT && 
aAreaParam.mnLeftClipLength > 0)
-{
-fVisibleRatio = (fTextWidth - 
aAreaParam.mnLeftClipLength) / fTextWidth;
-if (0.0 < fVisibleRatio && fVisibleRatio < 1.0)
+else if (eOutHorJust == SVX_HOR_JUSTIFY_RIGHT 
&& aAreaParam.mnLeftClipLength > 0)
 {
-// Only show the right-end segment.
-sal_Int32 nShortLen = 
fVisibleRatio*nTextLen + 1;
-aShort = aShort.copy(nTextLen-nShortLen);
-
-// Adjust the text position after 
shortening of the string.
-double fShortWidth = 
pFmtDevice->GetTextWidth(aShort);
-double fOffset = fTextWidth - fShortWidth;
-aDrawTextPos.Move(fOffset, 0);
+fVisibleRatio = (fTextWidth - 
aAreaParam.mnLeftClipLength) / fTextWidth;
+if (0.0 < fVisibleRatio && fVisibleRatio < 
1.0)
+{
+// Only show the right-end segment.
+sal_Int32 nShortLen = 
fVisibleRatio*nTextLen + 1;
+aShort = 
aShort.copy(nTextLen-nShortLen);
+
+// Adjust the text position after 
shortening of the string.
+double fShortWidth = 
pFmtDevice->GetTextWidth(aShort);
+double fOffset = fTextWidth - 
fShortWidth;
+aDrawTextPos.Move(fOffset, 0);
+}
 }
 }
 
___
Libreoffice-commits mailing l

[Libreoffice-commits] core.git: canvas/Library_gdipluscanvas.mk canvas/source

2015-08-10 Thread Norbert Thiebaud
 canvas/Library_gdipluscanvas.mk  |6 --
 canvas/source/cairo/cairo_canvas.cxx |6 ++
 canvas/source/cairo/cairo_canvascustomsprite.cxx |2 --
 canvas/source/cairo/cairo_devicehelper.cxx   |2 --
 canvas/source/cairo/cairo_services.cxx   |2 --
 canvas/source/cairo/cairo_spritecanvas.cxx   |4 +---
 canvas/source/cairo/cairo_spritecanvashelper.cxx |2 --
 canvas/source/cairo/cairo_spritedevicehelper.cxx |6 ++
 canvas/source/cairo/cairo_spritehelper.cxx   |2 --
 canvas/source/cairo/cairo_textlayout.cxx |   22 ++
 canvas/source/directx/dx_9rm.cxx |4 +---
 canvas/source/directx/dx_canvas.cxx  |6 ++
 canvas/source/directx/dx_canvascustomsprite.cxx  |2 --
 canvas/source/directx/dx_devicehelper.cxx|2 --
 canvas/source/directx/dx_impltools.cxx   |2 --
 canvas/source/directx/dx_spritecanvas.cxx|4 +---
 canvas/source/directx/dx_spritecanvashelper.cxx  |2 --
 canvas/source/directx/dx_spritedevicehelper.cxx  |6 ++
 canvas/source/directx/dx_spritehelper.cxx|7 ++-
 canvas/source/directx/dx_textlayout.cxx  |4 +---
 canvas/source/directx/dx_vcltools.cxx|8 +++-
 canvas/source/opengl/ogl_canvascustomsprite.cxx  |5 +
 canvas/source/opengl/ogl_spritecanvas.cxx|8 +++-
 canvas/source/opengl/ogl_spritedevicehelper.cxx  |1 -
 canvas/source/opengl/ogl_textlayout.cxx  |6 +-
 canvas/source/tools/canvascustomspritehelper.cxx |4 +---
 canvas/source/tools/spriteredrawmanager.cxx  |1 -
 canvas/source/vcl/canvas.cxx |5 ++---
 canvas/source/vcl/canvascustomsprite.cxx |1 -
 canvas/source/vcl/services.cxx   |1 -
 canvas/source/vcl/spritecanvas.cxx   |3 +--
 canvas/source/vcl/spritecanvashelper.cxx |1 -
 canvas/source/vcl/spritehelper.cxx   |   11 ---
 33 files changed, 40 insertions(+), 108 deletions(-)

New commits:
commit 326777b5d91a7e269bb4dfa38a3263769e0b99b3
Author: Norbert Thiebaud 
Date:   Sun Aug 9 21:14:53 2015 -0500

remove VERBOSE use from canva

in preparation to kill --enable-verbose in configure.ac
convert modules that use VERBOSE-YES/NO (uppercase) env variable
to do things differently at compile time
Convert canvas to use SAL_INFO/SAL_WARN mechanism instead of its
home-grown 'verbose logging'.

Change-Id: I2898d2309d421457839e3cd7078166c6da919882
Reviewed-on: https://gerrit.libreoffice.org/17619
Tested-by: Jenkins 
Reviewed-by: Norbert Thiebaud 

diff --git a/canvas/Library_gdipluscanvas.mk b/canvas/Library_gdipluscanvas.mk
index fdb3927..94efa63 100644
--- a/canvas/Library_gdipluscanvas.mk
+++ b/canvas/Library_gdipluscanvas.mk
@@ -30,12 +30,6 @@ $(eval $(call gb_Library_add_defs,gdipluscanvas,\
-UNOMINMAX \
 ))
 
-ifneq ($(strip $(VERBOSE)$(verbose)),)
-$(eval $(call gb_Library_add_defs,gdipluscanvas,\
-   -DVERBOSE \
-))
-endif
-
 $(eval $(call gb_Library_use_libraries,gdipluscanvas,\
cppu \
tk \
diff --git a/canvas/source/cairo/cairo_canvas.cxx 
b/canvas/source/cairo/cairo_canvas.cxx
index e27daa2..c8bdca8 100644
--- a/canvas/source/cairo/cairo_canvas.cxx
+++ b/canvas/source/cairo/cairo_canvas.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
 #include 
 #include 
 
@@ -66,7 +64,7 @@ namespace cairocanvas
4: XWindow for creating Window (or empty for VirtualDevice)
5: SystemGraphicsData as a streamed Any
  */
-VERBOSE_TRACE("Canvas created %p\n", this);
+SAL_INFO("canvas.cairo","Canvas created " <<  this);
 
 ENSURE_ARG_OR_THROW( maArguments.getLength() >= 6 &&
  maArguments[0].getValueTypeClass() == 
uno::TypeClass_HYPER &&
@@ -108,7 +106,7 @@ namespace cairocanvas
 
 Canvas::~Canvas()
 {
-OSL_TRACE( "CairoCanvas destroyed" );
+SAL_INFO("canvas.cairo", "CairoCanvas destroyed" );
 }
 
 void Canvas::disposeThis()
diff --git a/canvas/source/cairo/cairo_canvascustomsprite.cxx 
b/canvas/source/cairo/cairo_canvascustomsprite.cxx
index 1cb6d77..b3d9716 100644
--- a/canvas/source/cairo/cairo_canvascustomsprite.cxx
+++ b/canvas/source/cairo/cairo_canvascustomsprite.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
 #include 
 #include 
 
diff --git a/canvas/source/cairo/cairo_devicehelper.cxx 
b/canvas/source/cairo/cairo_devicehelper.cxx
index a59f257..a093995 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include 
-#include 
 #include 
 
 #include 
di

Re: Debug build breaks in unit test

2015-08-10 Thread Oliver Brinzing

Hi,

my build has finished after 7 hours (Win 7 64Bit Core I5 8GB  / PARALLELISM=1)  
with success :-)
VS 2013 Integration works too

i had 3 build breaks at all:

- [ LNK ] Executable/python.exe
  [ BIN ] pyuno
  [ MOD ] pyuno
  make[1]: ***.  Stop.
  Makefile:250: recipe for target 'build' failed
  make: *** [build] Error 2

a simple restart fixed it.

- [ PRL ] CustomTarget/postprocess/images/sorted.lst
  [ PRL ] CustomTarget/postprocess/images/commandimagelist.ilst
  [ PRL ] CustomTarget/postprocess/images/images_breeze.zip
  [...]
  [ CUS ] postprocess/images
  [ BIN ] postprocess
  [ MOD ] postprocess
  make[1]: ***.  Stop.
  Makefile:250: recipe for target 'build' failed
  make: *** [build] Error 2

i had to delete the "commandimagelist.ilst" before restart worked

- first unpacking external source "libreoffice-translations-5.0.0.5.tar" failed with an error "c" 
could not resolved".
  adding /cygdrive/c ..." solved it. but later on the build broke, cause folder "translations" was 
missing.

  i had to link it from "src\libreoffice-translations-5.0.0.5\translations":
  C:\sources\libo-core\src\libreoffice-translations-5.0.0.5>mklink /D translations 
c:\sources\libo-core\translations

  moving the folder did not work - cause "make" tried to unpack it again and 
failed ...


next time i will try with PARALLELISM=4 ...

Regards
Oliver

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


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

2015-08-10 Thread Tor Lillqvist
 vcl/inc/win/salgdi.h |2 -
 vcl/win/source/gdi/salgdi3.cxx   |   11 
 vcl/win/source/gdi/winlayout.cxx |   52 ++-
 vcl/win/source/gdi/winlayout.hxx |1 
 4 files changed, 14 insertions(+), 52 deletions(-)

New commits:
commit 3e47219e06b9a279ba22a9bbef668731f2d3e07d
Author: Tor Lillqvist 
Date:   Mon Aug 10 19:26:57 2015 +0300

SimpleWinLayout::mbDisableGlyphs was always true

Remove dead code. Should have no effect on behaviour.

Possibly originally the intent was that mbDisableGlyphs would have
been false in most cases on NT-based Windows (all versions that we
support now). However, since dadfc60873d4dce4e0c46e1d3405f8d45535cdcf,
in 2005, mbDisableGlyphs was set to always true in the SimpleWinLayout
ctor.

Change-Id: Id929224d5656706762c2f44ee26c76f8b20ee8b8

diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index 2e89269..7d05d23 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -87,7 +87,6 @@ public:
 
 BYTEGetCharSet() const  { return meWinCharSet; 
}
 BYTEGetPitchAndFamily() const   { return 
mnPitchAndFamily; }
-boolIsGlyphApiDisabled() const  { return 
mbDisableGlyphApi; }
 boolSupportsKorean() const  { return 
mbHasKoreanRange; }
 boolSupportsCJK() const { return 
mbHasCJKSupport; }
 boolSupportsArabic() const  { return 
mbHasArabicSupport; }
@@ -111,7 +110,6 @@ private:
 sal_IntPtr  mnId;
 
 // some members that are initalized lazily when the font gets selected 
into a HDC
-mutable boolmbDisableGlyphApi;
 mutable boolmbHasKoreanRange;
 mutable boolmbHasCJKSupport;
 #if ENABLE_GRAPHITE
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 2e3c44a..78f1055 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1086,7 +1086,6 @@ ImplWinFontData::ImplWinFontData( const 
ImplDevFontAttributes& rDFS,
 int nHeight, BYTE eWinCharSet, BYTE nPitchAndFamily )
 :   PhysicalFontFace( rDFS, 0 ),
 mnId( 0 ),
-mbDisableGlyphApi( false ),
 mbHasKoreanRange( false ),
 mbHasCJKSupport( false ),
 #if ENABLE_GRAPHITE
@@ -1186,15 +1185,6 @@ void ImplWinFontData::UpdateFromHDC( HDC hDC ) const
 }
 }
 #endif
-
-// even if the font works some fonts have problems with the glyph API
-// => the heuristic below tries to figure out which fonts have the problem
-TEXTMETRICA aTextMetric;
-if( ::GetTextMetricsA( hDC, &aTextMetric ) )
-if( !(aTextMetric.tmPitchAndFamily & TMPF_TRUETYPE)
-||   (aTextMetric.tmPitchAndFamily & TMPF_DEVICE) )
-mbDisableGlyphApi = true;
-
 }
 
 #if ENABLE_GRAPHITE
@@ -1291,7 +1281,6 @@ void ImplWinFontData::ReadCmapTable( HDC hDC ) const
 if( aRawFontData.get() ) {
 CmapResult aResult;
 ParseCMAP( aRawFontData.get(), aRawFontData.size(), aResult );
-mbDisableGlyphApi |= aResult.mbRecoded;
 aResult.mbSymbolic = bIsSymbolFont;
 if( aResult.mnRangeCount > 0 )
 {
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 47c47d5..9edf88c 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -241,11 +241,9 @@ SimpleWinLayout::SimpleWinLayout(HDC hDC, BYTE nCharSet, 
const ImplWinFontData&
 mpGlyphs2Chars( NULL ),
 mpGlyphRTLFlags( NULL ),
 mnWidth( 0 ),
-mbDisableGlyphs( false ),
 mnNotdefWidth( -1 ),
 mnCharSet( nCharSet )
 {
-mbDisableGlyphs = true;
 }
 
 SimpleWinLayout::~SimpleWinLayout()
@@ -264,20 +262,8 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
 {
 // prepare layout
 // TODO: fix case when recyclying old SimpleWinLayout object
-mbDisableGlyphs |= bool(rArgs.mnFlags & 
SalLayoutFlags::DisableGlyphProcessing);
 mnCharCount = rArgs.mnEndCharPos - rArgs.mnMinCharPos;
 
-if( !mbDisableGlyphs )
-{
-// Win32 glyph APIs have serious problems with vertical layout
-// => workaround is to use the unicode methods then
-if( rArgs.mnFlags & SalLayoutFlags::Vertical )
-mbDisableGlyphs = true;
-else
-// use cached value from font face
-mbDisableGlyphs = mrWinFontData.IsGlyphApiDisabled();
-}
-
 // TODO: use a cached value for bDisableAsianKern from upper layers
 if( rArgs.mnFlags & SalLayoutFlags::KerningAsian )
 {
@@ -435,9 +421,6 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs )
 if( GetTextExtentPoint32W( mhDC, &cNotDef, 1, &aExtent) )
 mnNotdefWidth = aExtent.cx;
 }
-// use a better NotDef glyph
-if( !mbDisableGlyphs && !bSurrogate )
-mp

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

2015-08-10 Thread Miklos Vajna
 vcl/source/gdi/impanmvw.cxx |   23 +++
 1 file changed, 23 insertions(+)

New commits:
commit cd064472ce4ff9d1dd6720c32fde22f36eb232f4
Author: Miklos Vajna 
Date:   Mon Aug 10 16:44:03 2015 +0200

tdf#93325 ImplAnimView rendercontext: stop painting animgifs directly

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

diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 4794cd4..2b28b3c 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "impanmvw.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -154,6 +155,15 @@ void ImplAnimView::getPosSize( const AnimationBitmap& 
rAnm, Point& rPosPix, Size
 void ImplAnimView::drawToPos( sal_uLong nPos )
 {
 VclPtr pRenderContext = mpOut;
+
+std::unique_ptr pGuard;
+if (mpOut->GetOutDevType() == OUTDEV_WINDOW)
+{
+vcl::Window* pWindow = static_cast(mpOut.get());
+pGuard.reset(new 
PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
+pRenderContext = pGuard->GetRenderContext();
+}
+
 ScopedVclPtrInstance aVDev;
 std::unique_ptr xOldClip(!maClip.IsNull() ? new vcl::Region( 
pRenderContext->GetClipRegion() ) : NULL);
 
@@ -167,6 +177,8 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
 pRenderContext->SetClipRegion( maClip );
 
 pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, 
*aVDev.get() );
+if (pGuard)
+pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz));
 
 if (xOldClip)
 pRenderContext->SetClipRegion(*xOldClip);
@@ -175,6 +187,15 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
 void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
 {
 VclPtr pRenderContext = mpOut;
+
+std::unique_ptr pGuard;
+if (!pVDev && mpOut->GetOutDevType() == OUTDEV_WINDOW)
+{
+vcl::Window* pWindow = static_cast(mpOut.get());
+pGuard.reset(new 
PaintBufferGuard(pWindow->ImplGetWindowImpl()->mpFrameData, pWindow));
+pRenderContext = pGuard->GetRenderContext();
+}
+
 Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), 
pRenderContext->GetOutputSize() );
 
 // check, if output lies out of display
@@ -268,6 +289,8 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* 
pVDev )
 pRenderContext->SetClipRegion( maClip );
 
 pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, 
*pDev );
+if (pGuard)
+pGuard->SetPaintRect(Rectangle(maDispPt, maDispSz));
 
 if( xOldClip)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Haskell UNO Language Binding - Weekly Report 11

2015-08-10 Thread Jorge Mendes
Hi,

The past week I've been improving the code generator program and the
code that is generated. Now the Haskell code generator is more like
cppumaker. The generated code doesn't use
"rtl::Reference"/"css::uno::Reference" to keep interface references
any more, and I have taken some steps to have "Sequence< T >" handled
as lists in Haskell (got "Sequence< OUString >" to "[Text]" working).

There still are some issues to solve:
 - A small part of the code that should be generated is still
handmade. This should be fixed this week, as it doesn't require much
work.
 - Some C/C++ pointers are not freed/deleted, while others are handled
by the Haskell run time system (using ForeignPtr). This is also on my
TODO list.
 - The use of interfaces is still a bit tricky. In some places it
requires a "uno2cpp.mapInterface(...)", while in other places this
crashes. I will look into this during this week.

Also, many UNO IDL entities are not yet converted to, or handled in,
Haskell. I'll also try work on this front a bit.

Kind regards,
Jorge
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Debug build breaks in unit test

2015-08-10 Thread Christian Lohmaier
Hi *,

On Sun, Aug 9, 2015 at 4:33 PM, Oliver Brinzing  wrote:
> Hi Regina,
>
> ->
> https://wiki.documentfoundation.org/Development/BuildingOnWindows#System_PATH_causing_weird_build_breakage
> -> BitDefender / other Anti-Virus / security tools breaking the build
>
> i told my anti virus not to scan c:\cygwin\* and c:\sources\*

Note that you also need to include the temporary directory (or set
TMPDIR to a path below the ones above, so that it is covered as well)

pasebin.ca is down right now, so cannot have a look at Regina's log,
but by defaullt, the build won't run those cve-document tests and
should not trigger the problem.

ciao
Christian
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: Branch 'feature/vba-export' - oox/source

2015-08-10 Thread Markus Mohrhard
 oox/source/ole/vbaexport.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit d9c3f48ec551dd429437656576913254622026fe
Author: Markus Mohrhard 
Date:   Mon Aug 10 17:24:26 2015 +0200

implement utf16 string export

Change-Id: I569aac676764c356a5ffc8d47153e70cb3224af9

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 6a5365b..6cdf5a1 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -35,6 +35,17 @@ void exportString(SvStream& rStrm, const OUString& rString)
 rStrm.WriteOString(aStringCorrectCodepage);
 }
 
+void exportUTF16String(SvStream& rStrm, const OUString& rString)
+{
+sal_Int32 n = rString.getLength();
+const sal_Unicode* pString = rString.getStr();
+for (sal_Int32 i = 0; i < n; ++i)
+{
+sal_Unicode character = pString[i];
+rStrm.WriteUnicode(character);
+}
+}
+
 }
 
 VbaExport::VbaExport(css::uno::Reference xModel):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Eike Rathke
 chart2/source/tools/DiagramHelper.cxx |   56 --
 1 file changed, 33 insertions(+), 23 deletions(-)

New commits:
commit 0f4b3cb7d3d68906de316a64dcec281da2a641bd
Author: Eike Rathke 
Date:   Mon Aug 10 17:04:13 2015 +0200

if we have a number formatter then use it, dammit..

Change-Id: I2d70bed4d9cf6f0ef4556a327c51fc5c10fcd2be

diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index c77c9a5..3dcbf4b 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1243,16 +1243,25 @@ sal_Int32 DiagramHelper::getDateTimeInputNumberFormat( 
const Reference< util::XN
 sal_Int32 DiagramHelper::getPercentNumberFormat( const Reference< 
util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
 {
 sal_Int32 nRet=-1;
-Reference< util::XNumberFormats > xNumberFormats( 
xNumberFormatsSupplier->getNumberFormats() );
-if( xNumberFormats.is() )
+const LanguageTag& rLanguageTag = 
Application::GetSettings().GetLanguageTag();
+NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
+SvNumberFormatter* pNumFormatter = 
aNumberFormatterWrapper.getSvNumberFormatter();
+if( pNumFormatter )
 {
-bool bCreate = true;
-const LocaleDataWrapper& rLocaleDataWrapper = 
Application::GetSettings().GetLocaleDataWrapper();
-Sequence aKeySeq = xNumberFormats->queryKeys( 
util::NumberFormat::PERCENT,
-rLocaleDataWrapper.getLanguageTag().getLocale(), bCreate );
-if( aKeySeq.getLength() )
+nRet = pNumFormatter->GetStandardFormat( util::NumberFormat::PERCENT, 
rLanguageTag.getLanguageType() );
+}
+else
+{
+Reference< util::XNumberFormats > xNumberFormats( 
xNumberFormatsSupplier->getNumberFormats() );
+if( xNumberFormats.is() )
 {
-nRet = aKeySeq[0];
+bool bCreate = true;
+Sequence aKeySeq = xNumberFormats->queryKeys( 
util::NumberFormat::PERCENT,
+rLanguageTag.getLocale(), bCreate );
+if( aKeySeq.getLength() )
+{
+nRet = aKeySeq[0];
+}
 }
 }
 return nRet;
commit ae9a59382f11166da44512a01ae38fc4790ac0d4
Author: Eike Rathke 
Date:   Mon Aug 10 16:40:39 2015 +0200

if we have a number formatter then use it, dammit..

Change-Id: I43b777bb0b3f53682bab7af4643b29e2bd313caa

diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index 2b522b1..c77c9a5 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -1165,27 +1165,28 @@ bool DiagramHelper::isDateNumberFormat( sal_Int32 
nNumberFormat, const Reference
 sal_Int32 DiagramHelper::getDateNumberFormat( const Reference< 
util::XNumberFormatsSupplier >& xNumberFormatsSupplier )
 {
 sal_Int32 nRet=-1;
-Reference< util::XNumberFormats > xNumberFormats( 
xNumberFormatsSupplier->getNumberFormats() );
-if( xNumberFormats.is() )
-{
-bool bCreate = true;
-const LocaleDataWrapper& rLocaleDataWrapper = 
Application::GetSettings().GetLocaleDataWrapper();
-Sequence aKeySeq = xNumberFormats->queryKeys( 
util::NumberFormat::DATE,
-rLocaleDataWrapper.getLanguageTag().getLocale(), bCreate );
-if( aKeySeq.getLength() )
-{
-nRet = aKeySeq[0];
-}
-}
 
 //try to get a date format with full year display
+const LanguageTag& rLanguageTag = 
Application::GetSettings().GetLanguageTag();
 NumberFormatterWrapper aNumberFormatterWrapper( xNumberFormatsSupplier );
 SvNumberFormatter* pNumFormatter = 
aNumberFormatterWrapper.getSvNumberFormatter();
 if( pNumFormatter )
 {
-const SvNumberformat* pFormat = pNumFormatter->GetEntry( nRet );
-if( pFormat )
-nRet = pNumFormatter->GetFormatIndex( NF_DATE_SYS_DDMM, 
pFormat->GetLanguage() );
+nRet = pNumFormatter->GetFormatIndex( NF_DATE_SYS_DDMM, 
rLanguageTag.getLanguageType() );
+}
+else
+{
+Reference< util::XNumberFormats > xNumberFormats( 
xNumberFormatsSupplier->getNumberFormats() );
+if( xNumberFormats.is() )
+{
+bool bCreate = true;
+Sequence aKeySeq = xNumberFormats->queryKeys( 
util::NumberFormat::DATE,
+rLanguageTag.getLocale(), bCreate );
+if( aKeySeq.getLength() )
+{
+nRet = aKeySeq[0];
+}
+}
 }
 return nRet;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/vba-export' - 6 commits - oox/source

2015-08-10 Thread Rosemary
 oox/source/ole/vbaexport.cxx |   70 ---
 1 file changed, 66 insertions(+), 4 deletions(-)

New commits:
commit 9007214d68f295c38f64f93212d2391bd5cc7001
Author: Rosemary 
Date:   Sun Aug 9 17:18:10 2015 +0530

PROJECT CONSTANTS record

Change-Id: I569aac676764c356a5ffc8d47153e70cb3224af9

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 4f6bc1b..6a5365b 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -45,6 +45,15 @@ VbaExport::VbaExport(css::uno::Reference 
xModel):
 
 namespace {
 
+//section 2.3.4.2.1.11
+void writePROJECTCONSTANTS(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x000C); // id
+rStrm.WriteUInt32(0x); // sizeOfConstants
+rStrm.WriteUInt16(0x003C); // Reserved
+rStrm.WriteUInt32(0x); // sizeOfConstantsUnicode
+}
+
 //section 2.3.4.2.1.10
 void writePROJECTVERSION(SvStream& rStrm)
 {
@@ -143,6 +152,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTHELPCONTEXT(rStrm);
 writePROJECTLIBFLAGS(rStrm);
 writePROJECTVERSION(rStrm);
+writePROJECTCONSTANTS(rStrm);
 }
 
 // section 2.3.4.2
commit 2145b1cdf0aabc3ac45361c0853e2669ece9edad
Author: Rosemary 
Date:   Sun Aug 9 17:04:48 2015 +0530

PROJECT VERSION record

Conflicts:
oox/source/ole/vbaexport.cxx

Change-Id: Id0206e4a9495bcf92e8ece0e2ea1e1bd4ef9233b

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index c6417e2..4f6bc1b 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -27,12 +27,6 @@
 #define CODEPAGE RTL_TEXTENCODING_MS_1252
 #endif
 
-VbaExport::VbaExport(css::uno::Reference xModel):
-mxModel(xModel)
-{
-maProjectName = "How to get the correct project name?";
-}
-
 namespace {
 
 void exportString(SvStream& rStrm, const OUString& rString)
@@ -43,8 +37,23 @@ void exportString(SvStream& rStrm, const OUString& rString)
 
 }
 
+VbaExport::VbaExport(css::uno::Reference xModel):
+mxModel(xModel)
+{
+maProjectName = "How to get the correct project name?";
+}
+
 namespace {
 
+//section 2.3.4.2.1.10
+void writePROJECTVERSION(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0009); // id
+rStrm.WriteUInt32(0x0004); // Reserved
+rStrm.WriteUInt32(1467127224); // VersionMajor // TODO: where is this 
magic number comming from
+rStrm.WriteUInt16(5); // VersionMinor // TODO: where is this magic number 
coming from
+}
+
 //section 2.3.4.2.1.9
 void writePROJECTLIBFLAGS(SvStream& rStrm)
 {
@@ -133,6 +142,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTHELPFILEPATH(rStrm);
 writePROJECTHELPCONTEXT(rStrm);
 writePROJECTLIBFLAGS(rStrm);
+writePROJECTVERSION(rStrm);
 }
 
 // section 2.3.4.2
commit d3ee7ae620235c94701f01b574b4d0487df04b78
Author: Rosemary 
Date:   Sun Aug 9 16:52:12 2015 +0530

PROJECT LIBFLAGS record

Conflicts:
oox/source/ole/vbaexport.cxx

Change-Id: Ie52ca9f20146d8a30dfd656e43f26e754f9b4c79

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 3e6516a..c6417e2 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -45,6 +45,14 @@ void exportString(SvStream& rStrm, const OUString& rString)
 
 namespace {
 
+//section 2.3.4.2.1.9
+void writePROJECTLIBFLAGS(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0008); // id
+rStrm.WriteUInt32(0x0004); // size
+rStrm.WriteUInt32(0x); // ProjectLibFlags
+}
+
 //section 2.3.4.2.1.8
 void writePROJECTHELPCONTEXT(SvStream& rStrm)
 {
@@ -124,6 +132,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTDOCSTRING(rStrm);
 writePROJECTHELPFILEPATH(rStrm);
 writePROJECTHELPCONTEXT(rStrm);
+writePROJECTLIBFLAGS(rStrm);
 }
 
 // section 2.3.4.2
commit aa7c0454c0818acd7a738e2bdd57e1ce1d82cf28
Author: Rosemary 
Date:   Sun Aug 9 16:43:59 2015 +0530

PROJECT HELP CONTEXT record

Conflicts:
oox/source/ole/vbaexport.cxx

Change-Id: I2d635df9e562970ff92777ab05a0b1a8f7baf188

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 548bd58..3e6516a 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -45,6 +45,14 @@ void exportString(SvStream& rStrm, const OUString& rString)
 
 namespace {
 
+//section 2.3.4.2.1.8
+void writePROJECTHELPCONTEXT(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0007); // id
+rStrm.WriteUInt32(0x0004); // size
+rStrm.WriteUInt32(0x); // HelpContext
+}
+
 //section 2.3.4.2.1.7
 void writePROJECTHELPFILEPATH(SvStream& rStrm)
 {
@@ -115,6 +123,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTNAME(rStrm);
 writePROJECTDOCSTRING(rStrm);
 writePROJECTHELPFILEPATH(rStrm);
+writePROJECTHELPCONTEXT(rStrm);
 }
 
 // section 2.3.4.2
commit 1b2d7920ef77b28120e6df25c79031eef37d1b3c
Author: Rosemary 
Date:   Sun Aug 9 16:36:28 2015 +0530

PROJECT HELP F

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

2015-08-10 Thread Miklos Vajna
 vcl/source/gdi/impanmvw.cxx |   26 ++
 1 file changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 131d5b01f400899470925757658841080b09283a
Author: Miklos Vajna 
Date:   Mon Aug 10 15:49:09 2015 +0200

tdf#93325 ImplAnimView: handle rendercontext

Stop accessing mpOut directly, always go via an explicit
vcl::RenderContext.

Change-Id: I742b63e0db529d1829d2339c213a0b900f727728

diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx
index 2176ee5..4794cd4 100644
--- a/vcl/source/gdi/impanmvw.cxx
+++ b/vcl/source/gdi/impanmvw.cxx
@@ -153,8 +153,9 @@ void ImplAnimView::getPosSize( const AnimationBitmap& rAnm, 
Point& rPosPix, Size
 
 void ImplAnimView::drawToPos( sal_uLong nPos )
 {
+VclPtr pRenderContext = mpOut;
 ScopedVclPtrInstance aVDev;
-std::unique_ptr xOldClip(!maClip.IsNull() ? new vcl::Region( 
mpOut->GetClipRegion() ) : NULL);
+std::unique_ptr xOldClip(!maClip.IsNull() ? new vcl::Region( 
pRenderContext->GetClipRegion() ) : NULL);
 
 aVDev->SetOutputSizePixel( maSzPix, false );
 nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL );
@@ -163,17 +164,18 @@ void ImplAnimView::drawToPos( sal_uLong nPos )
 draw( i, aVDev.get() );
 
 if (xOldClip)
-mpOut->SetClipRegion( maClip );
+pRenderContext->SetClipRegion( maClip );
 
-mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *aVDev.get() );
+pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, 
*aVDev.get() );
 
 if (xOldClip)
-mpOut->SetClipRegion(*xOldClip);
+pRenderContext->SetClipRegion(*xOldClip);
 }
 
 void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* pVDev )
 {
-Rectangle aOutRect( mpOut->PixelToLogic( Point() ), mpOut->GetOutputSize() 
);
+VclPtr pRenderContext = mpOut;
+Rectangle aOutRect( pRenderContext->PixelToLogic( Point() ), 
pRenderContext->GetOutputSize() );
 
 // check, if output lies out of display
 if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() )
@@ -219,7 +221,7 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* 
pVDev )
 {
 pDev = VclPtr::Create();
 pDev->SetOutputSizePixel( maSzPix, false );
-pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut );
+pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, 
*pRenderContext );
 }
 else
 pDev = pVDev;
@@ -260,23 +262,23 @@ void ImplAnimView::draw( sal_uLong nPos, VirtualDevice* 
pVDev )
 
 if( !pVDev )
 {
-std::unique_ptr xOldClip(!maClip.IsNull() ? new 
vcl::Region( mpOut->GetClipRegion() ) : NULL);
+std::unique_ptr xOldClip(!maClip.IsNull() ? new 
vcl::Region( pRenderContext->GetClipRegion() ) : NULL);
 
 if (xOldClip)
-mpOut->SetClipRegion( maClip );
+pRenderContext->SetClipRegion( maClip );
 
-mpOut->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, *pDev );
+pRenderContext->DrawOutDev( maDispPt, maDispSz, Point(), maSzPix, 
*pDev );
 
 if( xOldClip)
 {
-mpOut->SetClipRegion(*xOldClip);
+pRenderContext->SetClipRegion(*xOldClip);
 xOldClip.reset();
 }
 
 pDev.disposeAndClear();
 
-if( mpOut->GetOutDevType() == OUTDEV_WINDOW )
-static_cast( mpOut.get() )->Sync();
+if( pRenderContext->GetOutDevType() == OUTDEV_WINDOW )
+static_cast( pRenderContext.get() )->Sync();
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 2 commits - fpicker/source include/svtools svtools/source svtools/uiconfig

2015-08-10 Thread Szymon Kłos
 fpicker/source/office/RemoteFilesDialog.cxx |1 
 include/svtools/PlaceEditDialog.hxx |5 +++
 svtools/source/dialogs/PlaceEditDialog.cxx  |   12 +
 svtools/uiconfig/ui/placeedit.ui|   37 
 4 files changed, 51 insertions(+), 4 deletions(-)

New commits:
commit df8017eee8fe6f196d529a8f144cb90abee8ca4a
Author: Szymon Kłos 
Date:   Mon Aug 10 16:17:23 2015 +0200

added mnemonic_widget properties

Change-Id: I36b2b5bdbc597b82e746c5f81b99064efb06da75

diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index 55867ff..07b0835 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -174,6 +174,7 @@
 0
 Host:
 True
+host
   
   
 0
@@ -213,6 +214,7 @@
 0
 Share:
 True
+share
   
   
 0
@@ -238,6 +240,7 @@
 0
 Repository:
 True
+repositories
   
   
 0
@@ -335,6 +338,7 @@
 0
 Port:
 True
+port-nospin
   
   
 False
@@ -408,9 +412,7 @@
 False
 0
 Password*:
-
-  
-
+password
   
   
 0
@@ -423,9 +425,6 @@
 True
 False
 ●
-
-  
-
   
   
 1
commit 692a4e5afbf176c6555e202709b9b81cb22e6600
Author: Szymon Kłos 
Date:   Mon Aug 10 16:07:40 2015 +0200

added password field in the Add service dialog

Change-Id: I1074a3a2980e939de3f578cb566bab1e0ed96aed

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 7b90ae0..37c9535 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -655,6 +655,7 @@ void RemoteFilesDialog::DisableControls()
 IMPL_LINK_NOARG ( RemoteFilesDialog, AddServiceHdl )
 {
 ScopedVclPtrInstance< PlaceEditDialog > aDlg( this );
+aDlg->ShowPasswordControl();
 short aRetCode = aDlg->Execute();
 
 switch( aRetCode )
diff --git a/include/svtools/PlaceEditDialog.hxx 
b/include/svtools/PlaceEditDialog.hxx
index e492978..cfcfe67 100644
--- a/include/svtools/PlaceEditDialog.hxx
+++ b/include/svtools/PlaceEditDialog.hxx
@@ -34,6 +34,8 @@ private:
 std::shared_ptr< DetailsContainer > m_xCurrentDetails;
 
 VclPtr m_pEDUsername;
+VclPtr m_pEDPassword;
+VclPtrm_pFTPasswordLabel;
 VclPtr m_pBTOk;
 VclPtr m_pBTCancel;
 
@@ -67,6 +69,9 @@ public :
 
  OUString GetServerName() { return m_pEDServerName->GetText(); }
  OUString GetServerUrl();
+ OUString GetPassword() { return m_pEDPassword->GetText(); };
+
+ void ShowPasswordControl( bool bShow = true ) { m_pEDPassword->Show( 
bShow ); m_pFTPasswordLabel->Show( bShow ); }
 
 private:
 
diff --git a/svtools/source/dialogs/PlaceEditDialog.cxx 
b/svtools/source/dialogs/PlaceEditDialog.cxx
index 8ead056..b02e927 100644
--- a/svtools/source/dialogs/PlaceEditDialog.cxx
+++ b/svtools/source/dialogs/PlaceEditDialog.cxx
@@ -31,6 +31,11 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent)
 get( m_pBTCancel, "cancel" );
 get( m_pBTDelete, "delete" );
 get( m_pBTRepoRefresh, "repositoriesRefresh" );
+get( m_pEDPassword, "password" );
+get( m_pFTPasswordLabel, "passwordLabel" );
+
+m_pEDPassword->Hide();
+m_pFTPasswordLabel->Hide();
 
 m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
 m_pBTOk->Enable( false );
@@ -59,6 +64,11 @@ PlaceEditDialog::PlaceEditDialog(vcl::Window* pParent, const 
std::shared_ptrHide();
+m_pFTPasswordLabel->Hide();
 
 m_pBTOk->SetClickHdl( LINK( this, PlaceEditDialog, OKHdl) );
 m_pBTDelete->SetClickHdl ( LINK( this, PlaceEditDialog, DelHdl) );
@@ -105,6 +115,8 @@ void PlaceEditDialog::dispose()
 m_pBTOk.clear();
 m_pBTCancel.clear();
 m_pBTDelete.clear();
+m_pEDPassword.clear();
+m_pFTPasswordLabel.clear();
 ModalDialog::dispose();
 }
 
diff --git a/svtools/uiconfig/ui/placeedit.ui b/svtools/uiconfig/ui/placeedit.ui
index ec5c41e..55867ff 100644
--- a/svtools/uiconfig/ui/placeedit.ui
+++ b/svtools/uiconfig/ui/placeedit.ui
@@ -191,7 +191,7 @@
   
   
 0
-6
+7
   
 
 
@@ -203,7 +203,7 @@
   
   
 1
-6
+7
   
 
  

[Libreoffice-commits] core.git: Branch 'feature/vba-export' - oox/source

2015-08-10 Thread Markus Mohrhard
 oox/source/ole/vbaexport.cxx |   17 +++--
 1 file changed, 7 insertions(+), 10 deletions(-)

New commits:
commit c04be764b851cd04d6e27430a594bb9a51c332a2
Author: Markus Mohrhard 
Date:   Mon Aug 10 16:08:42 2015 +0200

better string export

Change-Id: I85a4f051a473214c3b7f1f5463a268973f0f

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 35ebdd5..f8752ac 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -35,6 +35,12 @@ VbaExport::VbaExport(css::uno::Reference 
xModel):
 
 namespace {
 
+void exportString(SvStream& rStrm, const OUString& rString)
+{
+OString aStringCorrectCodepage = OUStringToOString(rString, CODEPAGE);
+rStrm.WriteOString(aStringCorrectCodepage);
+}
+
 //section 2.3.4.2.1.5
 void writePROJECTNAME(SvStream& rStrm)
 {
@@ -42,16 +48,7 @@ void writePROJECTNAME(SvStream& rStrm)
 sal_uInt32 sizeOfProjectName = 0x000a; // for project name "VBAProject"
 rStrm.WriteUInt32(sizeOfProjectName); // sizeOfProjectName
 //characters of "VBAProject"
-rStrm.WriteUChar('V');
-rStrm.WriteUChar('B');
-rStrm.WriteUChar('A');
-rStrm.WriteUChar('P');
-rStrm.WriteUChar('r');
-rStrm.WriteUChar('o');
-rStrm.WriteUChar('j');
-rStrm.WriteUChar('e');
-rStrm.WriteUChar('c');
-rStrm.WriteUChar('t');
+exportString(rStrm, "VBAProject");
 }
 
 // section 2.3.4.2.1.4
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/vba-export' - 4 commits - oox/source

2015-08-10 Thread Markus Mohrhard
 oox/source/ole/vbaexport.cxx |   40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

New commits:
commit 262e5046ddf190bb105f2d2592f3766349a9f385
Author: Markus Mohrhard 
Date:   Mon Aug 10 15:47:14 2015 +0200

0x02 is OSX, 32bit Windows is 0x01

Change-Id: Ic37ed1ee67727bfad1b76095fea71e2f4a6f

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 46c8fe7..35ebdd5 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -83,7 +83,7 @@ void writePROJECTSYSKIND(SvStream& rStrm)
 {
 rStrm.WriteUInt16(0x0001); // id
 rStrm.WriteUInt32(0x0004); // size
-rStrm.WriteUInt32(0x0002); // SysKind, hard coded to 32-bin windows 
for now
+rStrm.WriteUInt32(0x0001); // SysKind, hard coded to 32-bin windows 
for now
 }
 
 // section 2.3.4.2.1
commit 26485d3f7dac2df8df458a98b35f0c7409cffda9
Author: Rosemary 
Date:   Sun Aug 9 15:43:56 2015 +0530

PROJECTNAME record

Change-Id: I0a54cf38ca9b94064881e8d527d5cd4637736050

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index bfc1060..46c8fe7 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -35,6 +35,25 @@ VbaExport::VbaExport(css::uno::Reference 
xModel):
 
 namespace {
 
+//section 2.3.4.2.1.5
+void writePROJECTNAME(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0004); // id
+sal_uInt32 sizeOfProjectName = 0x000a; // for project name "VBAProject"
+rStrm.WriteUInt32(sizeOfProjectName); // sizeOfProjectName
+//characters of "VBAProject"
+rStrm.WriteUChar('V');
+rStrm.WriteUChar('B');
+rStrm.WriteUChar('A');
+rStrm.WriteUChar('P');
+rStrm.WriteUChar('r');
+rStrm.WriteUChar('o');
+rStrm.WriteUChar('j');
+rStrm.WriteUChar('e');
+rStrm.WriteUChar('c');
+rStrm.WriteUChar('t');
+}
+
 // section 2.3.4.2.1.4
 void writePROJECTCODEPAGE(SvStream& rStrm)
 {
@@ -74,6 +93,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTLCID(rStrm);
 writePROJECTLCIDINVOKE(rStrm);
 writePROJECTCODEPAGE(rStrm);
+writePROJECTNAME(rStrm);
 }
 
 // section 2.3.4.2
commit e1e292834715ed9bf0b7d99cb66d4cdf094772dd
Author: Markus Mohrhard 
Date:   Mon Aug 10 14:47:36 2015 +0200

work on correct codepage handling

Change-Id: I9daa2ee90f3f6bd284a1bfd27b648f2e41bb4e0f

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 4533b12..bfc1060 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -18,6 +18,15 @@
 #include "oox/helper/propertyset.hxx"
 #include "oox/token/properties.hxx"
 
+#define USE_UTF8_CODEPAGE 0
+#if USE_UTF8_CODEPAGE
+#define CODEPAGE_MS 65001
+#define CODEPAGE RTL_TEXTENCODING_UTF8
+#else
+#define CODEPAGE_MS 1252
+#define CODEPAGE RTL_TEXTENCODING_MS_1252
+#endif
+
 VbaExport::VbaExport(css::uno::Reference xModel):
 mxModel(xModel)
 {
@@ -31,7 +40,7 @@ void writePROJECTCODEPAGE(SvStream& rStrm)
 {
 rStrm.WriteUInt16(0x0003); // id
 rStrm.WriteUInt32(0x0002); // size
-rStrm.WriteUInt16(1252); // CodePage
+rStrm.WriteUInt16(CODEPAGE_MS); // CodePage
 }
 
 // section 2.3.4.2.1.3
commit c7315f58a3f86df7e93252d759428b5c0e9687a9
Author: Rosemary 
Date:   Sun Aug 9 15:29:30 2015 +0530

PROJECT CODE PAGE record

Change-Id: I4ee0a1481335a9337ba2e20b59af4e332a532174

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 30fe32f..4533b12 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -26,6 +26,14 @@ VbaExport::VbaExport(css::uno::Reference 
xModel):
 
 namespace {
 
+// section 2.3.4.2.1.4
+void writePROJECTCODEPAGE(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0003); // id
+rStrm.WriteUInt32(0x0002); // size
+rStrm.WriteUInt16(1252); // CodePage
+}
+
 // section 2.3.4.2.1.3
 void writePROJECTLCIDINVOKE(SvStream& rStrm)
 {
@@ -56,6 +64,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 writePROJECTSYSKIND(rStrm);
 writePROJECTLCID(rStrm);
 writePROJECTLCIDINVOKE(rStrm);
+writePROJECTCODEPAGE(rStrm);
 }
 
 // section 2.3.4.2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Eike Rathke
 chart2/source/controller/dialogs/DataBrowser.cxx |   29 +++--
 chart2/source/controller/dialogs/DataBrowser.hxx |2 
 chart2/source/inc/DiagramHelper.hxx  |1 
 chart2/source/tools/DiagramHelper.cxx|   49 +++
 4 files changed, 66 insertions(+), 15 deletions(-)

New commits:
commit 711b34d590e659ed754f7c57b3b5eb12acfbbd78
Author: Eike Rathke 
Date:   Mon Aug 10 15:10:09 2015 +0200

tdf#92997 obtain a date/time edit format according to field value

Bloody workaround hack for the fact that Chart does not handle
category/x-axis times internally and is not able to pass its own axis
numberformat to its own databrowser editor.

Change-Id: I016695ad0104366c0bb636b449a2014ade31aca3

diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx 
b/chart2/source/controller/dialogs/DataBrowser.cxx
index 9af794b..3162e1d 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -674,13 +674,18 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 
nColumnId ) const
 aResult = aText;
 else if( aAny>>=fDouble )
 {
-sal_Int32 nLabelColor;
-sal_Int32 nDateNumberFormat = 
DiagramHelper::getDateNumberFormat( Reference< util::XNumberFormatsSupplier >( 
m_xChartDoc, uno::UNO_QUERY) );
 if( ! ::rtl::math::isNan( fDouble ) && 
m_spNumberFormatterWrapper.get() )
 {
+// If a numberformat was available here we could directly
+// obtain the corresponding edit format in
+// getDateTimeInputNumberFormat() instead of doing the
+// guess work.
+sal_Int32 nNumberFormat = 
DiagramHelper::getDateTimeInputNumberFormat(
+Reference< util::XNumberFormatsSupplier >( 
m_xChartDoc, uno::UNO_QUERY), fDouble );
+sal_Int32 nLabelColor;
 bool bColorChanged = false;
 aResult = m_spNumberFormatterWrapper->getFormattedString(
-nDateNumberFormat, fDouble, nLabelColor, bColorChanged 
);
+nNumberFormat, fDouble, nLabelColor, bColorChanged );
 }
 }
 }
@@ -1096,18 +1101,14 @@ sal_uInt32 DataBrowser::GetNumberFormatKey( sal_Int32 
nRow, sal_uInt16 nCol ) co
 return m_apDataBrowserModel->getNumberFormatKey( lcl_getColumnInData( nCol 
), lcl_getRowInData( nRow ));
 }
 
-bool DataBrowser::isDateString( const OUString& aInputString, double& 
fOutDateValue )
+bool DataBrowser::isDateTimeString( const OUString& aInputString, double& 
fOutDateTimeValue )
 {
 sal_uInt32 nNumberFormat=0;
 SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? 
m_spNumberFormatterWrapper->getSvNumberFormatter() : 0;
-if( !aInputString.isEmpty() &&  pSvNumberFormatter && 
pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue 
) )
+if( !aInputString.isEmpty() &&  pSvNumberFormatter && 
pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, 
fOutDateTimeValue ) )
 {
-Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( 
m_xChartDoc, uno::UNO_QUERY );
-Reference< util::XNumberFormats > xNumberFormats;
-if( xNumberFormatsSupplier.is() )
- xNumberFormats = Reference< util::XNumberFormats >( 
xNumberFormatsSupplier->getNumberFormats() );
-if( DiagramHelper::isDateNumberFormat( nNumberFormat, xNumberFormats ) 
)
-return true;
+short nType = pSvNumberFormatter->GetType( nNumberFormat);
+return (nType & util::NumberFormat::DATE) || (nType & 
util::NumberFormat::TIME);
 }
 return false;
 }
@@ -1149,10 +1150,10 @@ bool DataBrowser::SaveModified()
 case DataBrowserModel::TEXTORDATE:
 {
 OUString aText( m_aTextEditField->GetText() );
-double fDateValue = 0.0;
+double fValue = 0.0;
 bChangeValid = false;
-if( isDateString( aText, fDateValue ) )
-bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( fDateValue ) );
+if( isDateTimeString( aText, fValue ) )
+bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( fValue ) );
 if(!bChangeValid)
 bChangeValid = m_apDataBrowserModel->setCellAny( nCol, nRow, 
uno::makeAny( aText ) );
 }
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx 
b/chart2/source/controller/dialogs/DataBrowser.hxx
index 79fee95..514b697 100644
--- a/chart2/source/controller/dialogs/DataBrowser.hxx
+++ b/chart2/source/controller/dialogs/DataBrowser.hxx
@@ -86,7 +86,7 @@ public:
 */
 double GetCellNumber( long nRow, sal_uInt16 nColumnId ) const;
 
-bool isDateString( const OUStri

[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - fpicker/source

2015-08-10 Thread Szymon Kłos
 fpicker/source/office/RemoteFilesDialog.cxx |   69 +++-
 1 file changed, 49 insertions(+), 20 deletions(-)

New commits:
commit 48ed3e1f7b3b4f225166dbea6944c63785c0905e
Author: Szymon Kłos 
Date:   Mon Aug 10 14:15:59 2015 +0200

Show 'change password' only if is password is stored

Change-Id: I04275d2e45ff32ed003a2487cd87500d550e9d73

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index c90175d..7b90ae0 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -578,7 +578,39 @@ void RemoteFilesDialog::AddFileExtension()
 void RemoteFilesDialog::EnableControls()
 {
 if( m_pServices_lb->GetEntryCount() > 0 )
+{
 m_pServices_lb->Enable( true );
+
+if( m_pServices_lb->GetSelectEntryCount() )
+{
+m_pAddMenu->EnableItem( "change_password", false );
+
+try
+{
+Reference< XPasswordContainer2 > xMasterPasswd(
+PasswordContainer::create( 
comphelper::getProcessComponentContext() ) );
+
+if( xMasterPasswd->isPersistentStoringAllowed() )
+{
+int nPos = GetSelectedServicePos();
+
+if( nPos >= 0 )
+{
+OUString sUrl( m_aServices[nPos]->GetUrl() );
+
+UrlRecord aURLEntries = xMasterPasswd->find( sUrl, 
Reference< XInteractionHandler>() );
+
+if( aURLEntries.UserList.getLength() )
+{
+m_pAddMenu->EnableItem( "change_password" );
+}
+}
+}
+}
+catch( const Exception& )
+{}
+}
+}
 else
 m_pServices_lb->Enable( false );
 
@@ -745,7 +777,7 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, 
MenuButton *, pButton,
 Reference< XPasswordContainer2 > xMasterPasswd(
 PasswordContainer::create( 
comphelper::getProcessComponentContext() ) );
 
-if( xMasterPasswd->isPersistentStoringAllowed() )
+if( xMasterPasswd->isPersistentStoringAllowed() && 
xMasterPasswd->authorizateWithMasterPassword( Reference< XInteractionHandler>() 
) )
 {
 int nPos = GetSelectedServicePos();
 
@@ -759,29 +791,26 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, 
MenuButton *, pButton,
 
 UrlRecord aURLEntries = xMasterPasswd->find( sUrl, 
xInteractionHandler );
 
-if( aURLEntries.Url == sUrl )
+if( aURLEntries.Url == sUrl && 
aURLEntries.UserList.getLength() )
 {
-if( aURLEntries.UserList.getLength() )
-{
-OUString sUserName = 
aURLEntries.UserList[0].UserName;
+OUString sUserName = aURLEntries.UserList[0].UserName;
 
-::comphelper::SimplePasswordRequest* 
pPasswordRequest
-= new ::comphelper::SimplePasswordRequest( 
PasswordRequestMode_PASSWORD_CREATE );
-Reference< XInteractionRequest > rRequest( 
pPasswordRequest );
+::comphelper::SimplePasswordRequest* pPasswordRequest
+= new ::comphelper::SimplePasswordRequest( 
PasswordRequestMode_PASSWORD_CREATE );
+Reference< XInteractionRequest > rRequest( 
pPasswordRequest );
 
-xInteractionHandler->handle( rRequest );
+xInteractionHandler->handle( rRequest );
 
-if ( pPasswordRequest->isPassword() )
-{
-OUString aNewPass = 
pPasswordRequest->getPassword();
-Sequence< OUString > aPasswd( 1 );
-aPasswd[0] = aNewPass;
-
-Reference< XPasswordContainer2 > 
xPasswdContainer(
-
PasswordContainer::create(comphelper::getProcessComponentContext()));
-xPasswdContainer->addPersistent(
-sUrl, sUserName, aPasswd, 
xInteractionHandler );
-}
+if ( pPasswordRequest->isPassword() )
+{
+OUString aNewPass = 
pPasswordRequest->getPassword();
+Sequence< OUString > aPasswd( 1 );
+aPasswd[0] = aNewPass;
+
+Reference< XPasswordContainer2 > xPasswdContainer(
+PasswordContainer::create( 
comphelper::getProcessComponentContext() ) );
+xPasswdContainer->a

[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - fpicker/source fpicker/uiconfig

2015-08-10 Thread Szymon Kłos
 fpicker/source/office/RemoteFilesDialog.cxx |   52 
 fpicker/source/office/RemoteFilesDialog.hxx |5 ++
 fpicker/uiconfig/ui/remotefilesdialog.ui|8 
 3 files changed, 65 insertions(+)

New commits:
commit fcc8fd178d7f001ff75d602d98a365ab0851af16
Author: Szymon Kłos 
Date:   Mon Aug 10 13:49:18 2015 +0200

added change password entry in the split button menu

Change-Id: I68e76e346ec6d704c27fe6f4031453dd44dbc983

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index a85c40d..c90175d 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -738,6 +738,58 @@ IMPL_LINK_TYPED ( RemoteFilesDialog, EditServiceMenuHdl, 
MenuButton *, pButton,
 }
 }
 }
+else if( sIdent == "change_password" )
+{
+try
+{
+Reference< XPasswordContainer2 > xMasterPasswd(
+PasswordContainer::create( 
comphelper::getProcessComponentContext() ) );
+
+if( xMasterPasswd->isPersistentStoringAllowed() )
+{
+int nPos = GetSelectedServicePos();
+
+if( nPos >= 0 )
+{
+OUString sUrl( m_aServices[nPos]->GetUrl() );
+
+Reference< XInteractionHandler > xInteractionHandler(
+InteractionHandler::createWithParent( 
comphelper::getProcessComponentContext(), 0 ),
+UNO_QUERY );
+
+UrlRecord aURLEntries = xMasterPasswd->find( sUrl, 
xInteractionHandler );
+
+if( aURLEntries.Url == sUrl )
+{
+if( aURLEntries.UserList.getLength() )
+{
+OUString sUserName = 
aURLEntries.UserList[0].UserName;
+
+::comphelper::SimplePasswordRequest* 
pPasswordRequest
+= new ::comphelper::SimplePasswordRequest( 
PasswordRequestMode_PASSWORD_CREATE );
+Reference< XInteractionRequest > rRequest( 
pPasswordRequest );
+
+xInteractionHandler->handle( rRequest );
+
+if ( pPasswordRequest->isPassword() )
+{
+OUString aNewPass = 
pPasswordRequest->getPassword();
+Sequence< OUString > aPasswd( 1 );
+aPasswd[0] = aNewPass;
+
+Reference< XPasswordContainer2 > 
xPasswdContainer(
+
PasswordContainer::create(comphelper::getProcessComponentContext()));
+xPasswdContainer->addPersistent(
+sUrl, sUserName, aPasswd, 
xInteractionHandler );
+}
+}
+}
+}
+}
+}
+catch( const Exception& )
+{}
+}
 
 EnableControls();
 }
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx 
b/fpicker/source/office/RemoteFilesDialog.hxx
index a63bef3..740262a 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -10,6 +10,8 @@
 #ifndef INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
 #define INCLUDED_SVTOOLS_REMOTEFILESDIALOG_HXX
 
+#include 
+
 #include 
 #include 
 #include 
@@ -32,6 +34,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -42,6 +46,7 @@
 #include "iodlg.hrc"
 
 using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::task;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ui::dialogs;
 
diff --git a/fpicker/uiconfig/ui/remotefilesdialog.ui 
b/fpicker/uiconfig/ui/remotefilesdialog.ui
index 7c0c923..e0699a5 100644
--- a/fpicker/uiconfig/ui/remotefilesdialog.ui
+++ b/fpicker/uiconfig/ui/remotefilesdialog.ui
@@ -285,5 +285,13 @@
 True
   
 
+
+  
+True
+False
+_Change password
+True
+  
+
   
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/vba-export' - oox/source

2015-08-10 Thread Rosemary
 oox/source/ole/vbaexport.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit dbbc781a9038c9667a816c4806e459860a17bb2c
Author: Rosemary 
Date:   Sun Aug 9 15:11:35 2015 +0530

PROJECTLCIDINVOKE record
Change-Id: I8e0df8f48fdabafac09d1a6d645da58ba17f71f1
Reviewed-on: https://gerrit.libreoffice.org/17600
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 
Tested-by: Markus Mohrhard 

diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index d075ffe..30fe32f 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -26,6 +26,14 @@ VbaExport::VbaExport(css::uno::Reference 
xModel):
 
 namespace {
 
+// section 2.3.4.2.1.3
+void writePROJECTLCIDINVOKE(SvStream& rStrm)
+{
+rStrm.WriteUInt16(0x0014); // id
+rStrm.WriteUInt32(0x0004); // size
+rStrm.WriteUInt32(0x0409); // LcidInvoke
+}
+
 // section 2.3.4.2.1.2
 void writePROJECTLCID(SvStream& rStrm)
 {
@@ -47,6 +55,7 @@ void writePROJECTINFORMATION(SvStream& rStrm)
 {
 writePROJECTSYSKIND(rStrm);
 writePROJECTLCID(rStrm);
+writePROJECTLCIDINVOKE(rStrm);
 }
 
 // section 2.3.4.2
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-draw-chained-text-boxes' - 2 commits - editeng/source include/editeng svx/source

2015-08-10 Thread matteocam
 editeng/source/outliner/outliner.cxx   |2 +-
 editeng/source/outliner/overflowingtxt.cxx |4 +++-
 include/editeng/overflowingtxt.hxx |3 ++-
 svx/source/svdraw/svdedxv.cxx  |2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit b602f532c8b9b022366a561e1b61ab198321bb20
Author: matteocam 
Date:   Mon Aug 10 13:26:38 2015 +0200

Removed warnings from editeng

Change-Id: I045ec6348277fd958d91169931ba4a0194f76a51

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index 68a17c2..bf4ab34 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2089,7 +2089,7 @@ NonOverflowingText *Outliner::GetNonOverflowingText() 
const
 
 // last non-overflowing paragraph is before the first overflowing one
 sal_Int32 nCount = pEditEngine->GetOverflowingParaNum();
-sal_Int32 nOverflowLine = pEditEngine->GetOverflowingLineNum();
+//sal_Int32 nOverflowLine = pEditEngine->GetOverflowingLineNum(); // XXX: 
Unused for now
 
 // Defensive check: oveflowing para index beyond actual # of paragraphs?
 if ( nCount > GetParagraphCount()-1) {
diff --git a/include/editeng/overflowingtxt.hxx 
b/include/editeng/overflowingtxt.hxx
index 76a9623..a2fb6c0 100644
--- a/include/editeng/overflowingtxt.hxx
+++ b/include/editeng/overflowingtxt.hxx
@@ -72,8 +72,9 @@ private:
 
 friend class Outliner;
 const EditTextObject *mpContentTextObj;
-const bool mbLastParaInterrupted;
 const ESelection maContentSel;
+const bool mbLastParaInterrupted;
+
 };
 
 
commit 6343fe5bcb5efcf3992e6614d5262bae48262505
Author: matteocam 
Date:   Mon Aug 10 13:24:24 2015 +0200

Remove Warning for cursor handling

Change-Id: I193ec852d965738d1b29b4c8c0c82c4bb7451a5b

diff --git a/editeng/source/outliner/overflowingtxt.cxx 
b/editeng/source/outliner/overflowingtxt.cxx
index 34f1bb4..92c6ca8 100644
--- a/editeng/source/outliner/overflowingtxt.cxx
+++ b/editeng/source/outliner/overflowingtxt.cxx
@@ -160,7 +160,9 @@ OutlinerParaObject 
*NonOverflowingText::ToParaObject(Outliner *pOutliner) const
 
 ESelection NonOverflowingText::GetOverflowPointSel() const
 {
-return getLastPositionSel(mpContentTextObj);
+//return getLastPositionSel(mpContentTextObj);
+// XXX: Not sure this can work properly
+return maContentSel;
 }
 
 // The equivalent of ToParaObject for OverflowingText. Here we are prepending 
the overflowing text to the old dest box's text
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index c731052..7ac8413 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1299,7 +1299,7 @@ bool SdrObjEditView::IsTextEditFrameHit(const Point& 
rHit) const
 
 TextChainCursorManager *SdrObjEditView::ImpHandleMotionThroughBoxesKeyInput(
 const KeyEvent& rKEvt,
-vcl::Window* pWin,
+vcl::Window*,
 bool *bOutHandled)
 {
 *bOutHandled = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 9 commits - comphelper/source cui/source desktop/source onlineupdate/source reportdesign/source sfx2/source store/source svx/source sw/source unodevtools/source writerf

2015-08-10 Thread Caolán McNamara
 comphelper/source/misc/types.cxx  |4 --
 cui/source/dialogs/iconcdlg.cxx   |6 +---
 cui/source/options/optgenrl.cxx   |6 
 cui/source/options/optlingu.cxx   |6 
 cui/source/options/optsave.cxx|   18 +---
 cui/source/tabpages/backgrnd.cxx  |   10 +++
 cui/source/tabpages/border.cxx|4 +-
 desktop/source/deployment/manager/dp_manager.cxx  |4 +-
 onlineupdate/source/libmar/sign/nss_secutil.c |2 -
 onlineupdate/source/libmar/tool/mar.c |1 
 reportdesign/source/filter/xml/xmlExport.cxx  |4 --
 sfx2/source/dialog/tabdlg.cxx |6 ++--
 store/source/store.cxx|2 -
 svx/source/form/fmtextcontrolshell.cxx|4 +-
 sw/source/filter/xml/wrtxml.cxx   |   25 --
 sw/source/filter/xml/xmltexte.cxx |3 --
 unodevtools/source/skeletonmaker/javacompskeleton.cxx |2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |2 -
 18 files changed, 44 insertions(+), 65 deletions(-)

New commits:
commit 52be3fcbd960238b717a6487f0e19156825c8159
Author: Caolán McNamara 
Date:   Mon Aug 10 12:00:34 2015 +0100

cppcheck: badBitmaskCheck

Change-Id: I0a6787379317e5077c5a4520e5144fe091a01538

diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index bf90a98..da60498 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -820,7 +820,7 @@ short IconChoiceDialog::Ok()
 
 if ( pPage->FillItemSet( &aTmp ) )
 {
-_bModified |= true;
+_bModified = true;
 pExampleSet->Put( aTmp );
 pOutSet->Put( aTmp );
 }
@@ -829,13 +829,11 @@ short IconChoiceDialog::Ok()
 }
 
 if ( _bModified || ( pOutSet && pOutSet->Count() > 0 ) )
-_bModified |= true;
+_bModified = true;
 
 return _bModified ? RET_OK : RET_CANCEL;
 }
 
-
-
 void IconChoiceDialog::FocusOnIcon( sal_uInt16 nId )
 {
 // set focus to icon for the current visible page
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 824447b..a179917 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -306,8 +306,6 @@ VclPtr SvxGeneralTabPage::Create( vcl::Window* 
pParent, const SfxIte
 return VclPtr::Create( pParent, *rAttrSet );
 }
 
-
-
 bool SvxGeneralTabPage::FillItemSet( SfxItemSet* )
 {
 // remove leading and trailing whitespaces
@@ -320,13 +318,11 @@ bool SvxGeneralTabPage::FillItemSet( SfxItemSet* )
 if ( m_pUseDataCB->IsChecked() != aSaveOpt.IsUseUserData() )
 {
 aSaveOpt.SetUseUserData( m_pUseDataCB->IsChecked() );
-bModified |= true;
+bModified = true;
 }
 return bModified;
 }
 
-
-
 void SvxGeneralTabPage::Reset( const SfxItemSet* rSet )
 {
 SetAddress_Impl();
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index d4d9f1b..5a68179 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -1156,8 +1156,6 @@ VclPtr SvxLinguTabPage::Create( vcl::Window* 
pParent,
 return VclPtr::Create( pParent, *rAttrSet );
 }
 
-
-
 bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
 {
 bool bModified = true; // 
@@ -1315,14 +1313,12 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet 
)
 {
 rCoreSet->Put( SfxBoolItem( GetWhich( SID_AUTOSPELL_CHECK ),
 bNewAutoCheck ) );
-bModified |= true;
+bModified = true;
 }
 
 return bModified;
 }
 
-
-
 sal_uLong SvxLinguTabPage::GetDicUserData( const uno::Reference< XDictionary > 
&rxDic, sal_uInt16 nIdx )
 {
 sal_uLong nRes = 0;
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index c617d64..2c049a5 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -280,55 +280,55 @@ bool SfxSaveTabPage::FillItemSet( SfxItemSet* rSet )
 {
 rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_DOCINFO ),
aDocInfoCB->IsChecked() ) );
-bModified |= true;
+bModified = true;
 }
 
 if ( aBackupCB->IsEnabled() && aBackupCB->IsValueChangedFromSaved() )
 {
 rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_BACKUP ),
aBackupCB->IsChecked() ) );
-bModified |= true;
+bModified = true;
 }
 
 if ( aAutoSaveCB->IsValueChangedFromSaved() )
 {
 rSet->Put( SfxBoolItem( GetWhich( SID_ATTR_AUTOSAVE ),
aAutoSaveCB->IsChecked() ) );
-bModified |= true;
+bModified = true;
 }
 if ( aWarnAlienFormat

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

2015-08-10 Thread Tor Lillqvist
 vcl/win/source/gdi/winlayout.cxx |   72 +++
 vcl/win/source/gdi/winlayout.hxx |   52 ++--
 2 files changed, 62 insertions(+), 62 deletions(-)

New commits:
commit 8bc5b7a41f290ab4cc999cddf5d578843559ad1f
Author: Tor Lillqvist 
Date:   Mon Aug 10 13:58:37 2015 +0300

Add missing SAL_OVERRIDEs

It is really ugly to use SAL_OVERRIDE inconsistently.

Change-Id: I8b556a9cc65e6f71198d126d07ce1559216543e9

diff --git a/vcl/win/source/gdi/winlayout.hxx b/vcl/win/source/gdi/winlayout.hxx
index 196b8e9..528215f 100644
--- a/vcl/win/source/gdi/winlayout.hxx
+++ b/vcl/win/source/gdi/winlayout.hxx
@@ -41,7 +41,7 @@ class WinLayout : public SalLayout
 {
 public:
 WinLayout(HDC, const ImplWinFontData&, 
ImplWinFontEntry&, bool bUseOpenGL);
-virtual voidInitFont() const;
+virtual voidInitFont() const SAL_OVERRIDE;
 voidSetFontScale( float f ) { mfFontScale = f; }
 HFONT   DisableFontScaling() const;
 
@@ -71,22 +71,22 @@ public:
 SimpleWinLayout(HDC, BYTE nCharSet, const 
ImplWinFontData&, ImplWinFontEntry&, bool bUseOpenGL);
 virtual ~SimpleWinLayout();
 
-virtual boolLayoutText( ImplLayoutArgs& );
-virtual voidAdjustLayout( ImplLayoutArgs& );
+virtual boolLayoutText( ImplLayoutArgs& ) SAL_OVERRIDE;
+virtual voidAdjustLayout( ImplLayoutArgs& ) SAL_OVERRIDE;
 virtual voidDrawTextImpl(HDC hDC) const SAL_OVERRIDE;
 
 virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& 
rPos, int&,
DeviceCoordinate* pGlyphAdvances, int* 
pCharIndexes,
-   const PhysicalFontFace** pFallbackFonts = 
NULL ) const;
+   const PhysicalFontFace** pFallbackFonts = 
NULL ) const SAL_OVERRIDE;
 
-virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const;
+virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const 
SAL_OVERRIDE;
 virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, 
DeviceCoordinate nCharExtra, int nFactor) const SAL_OVERRIDE;
-virtual voidGetCaretPositions( int nArraySize, long* pCaretXArray ) 
const;
+virtual voidGetCaretPositions( int nArraySize, long* pCaretXArray ) 
const SAL_OVERRIDE;
 
 // for glyph+font+script fallback
-virtual voidMoveGlyph( int nStart, long nNewXPos );
-virtual voidDropGlyph( int nStart );
-virtual voidSimplify( bool bIsBase );
+virtual voidMoveGlyph( int nStart, long nNewXPos ) SAL_OVERRIDE;
+virtual voidDropGlyph( int nStart ) SAL_OVERRIDE;
+virtual voidSimplify( bool bIsBase ) SAL_OVERRIDE;
 
 protected:
 voidJustify( DeviceCoordinate nNewWidth );
@@ -114,22 +114,22 @@ class UniscribeLayout : public WinLayout
 public:
 UniscribeLayout(HDC, const ImplWinFontData&, 
ImplWinFontEntry&, bool bUseOpenGL);
 
-virtual boolLayoutText( ImplLayoutArgs& );
-virtual voidAdjustLayout( ImplLayoutArgs& );
+virtual boolLayoutText( ImplLayoutArgs& ) SAL_OVERRIDE;
+virtual voidAdjustLayout( ImplLayoutArgs& ) SAL_OVERRIDE;
 virtual voidDrawTextImpl(HDC hDC) const SAL_OVERRIDE;
 virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& 
rPos, int&,
DeviceCoordinate* pGlyphAdvances, int* 
pCharPosAry,
-   const PhysicalFontFace** pFallbackFonts = 
NULL ) const;
+   const PhysicalFontFace** pFallbackFonts = 
NULL ) const SAL_OVERRIDE;
 
-virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const;
+virtual DeviceCoordinate FillDXArray( DeviceCoordinate* pDXArray ) const 
SAL_OVERRIDE;
 virtual sal_Int32 GetTextBreak(DeviceCoordinate nMaxWidth, 
DeviceCoordinate nCharExtra, int nFactor) const SAL_OVERRIDE;
-virtual voidGetCaretPositions( int nArraySize, long* pCaretXArray ) 
const;
+virtual voidGetCaretPositions( int nArraySize, long* pCaretXArray ) 
const SAL_OVERRIDE;
 virtual boolIsKashidaPosValid ( int nCharPos ) const SAL_OVERRIDE;
 
 // for glyph+font+script fallback
-virtual voidMoveGlyph( int nStart, long nNewXPos );
-virtual voidDropGlyph( int nStart );
-virtual voidSimplify( bool bIsBase );
+virtual voidMoveGlyph( int nStart, long nNewXPos ) SAL_OVERRIDE;
+virtual voidDropGlyph( int nStart ) SAL_OVERRIDE;
+virtual voidSimplify( bool bIsBase ) SAL_OVERRIDE;
 virtual voidDisableGlyphInjection( bool bDisable ) SAL_OVERRIDE { 
mbDisableGlyphInjection = bDisable; }
 
 protected:
@@ -184,7 +184,7 @@ public:
 throw()
 : GraphiteLayout(pFace), mrFont(rFont) {};
 virtual ~GraphiteLayoutWinImpl() throw() {};
-virtual sal_GlyphId getKashidaGlyph(int 

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

2015-08-10 Thread Miklos Vajna
 sw/source/core/inc/drawfont.hxx |  264 
 1 file changed, 132 insertions(+), 132 deletions(-)

New commits:
commit e46e30b3507ac00a4936031e4236b8a9cbd6583f
Author: Miklos Vajna 
Date:   Mon Aug 10 11:27:51 2015 +0200

sw: prefix members of SwDrawTextInfo

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

diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index b751fc1..98b2e4a 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -42,47 +42,47 @@ class SwUnderlineFont;
 // encapsulates information for drawing text
 class SW_DLLPUBLIC SwDrawTextInfo
 {
-const SwTextFrm* pFrm;
-VclPtr pOut;
-SwViewShell const * pSh;
-const SwScriptInfo* pScriptInfo;
+const SwTextFrm* m_pFrm;
+VclPtr m_pOut;
+SwViewShell const * m_pSh;
+const SwScriptInfo* m_pScriptInfo;
 Point m_aPos;
 vcl::TextLayoutCache const* m_pCachedVclData;
 OUString m_aText;
-const SwWrongList* pWrong;
-const SwWrongList* pGrammarCheck;
-const SwWrongList* pSmartTags;
+const SwWrongList* m_pWrong;
+const SwWrongList* m_pGrammarCheck;
+const SwWrongList* m_pSmartTags;
 Size m_aSize;
-SwFont *pFnt;
-SwUnderlineFont* pUnderFnt;
-sal_Int32* pHyphPos;
-long nLeft;
-long nRight;
-long nKanaDiff;
-sal_Int32 nIdx;
-sal_Int32 nLen;
-sal_Int32 nOfst;
-sal_uInt16 nWidth;
-sal_uInt16 nAscent;
-sal_uInt16 nCompress;
-long nSperren;
-long nSpace;
-long nKern;
-sal_Int32 nNumberOfBlanks;
-sal_uInt8 nCursorBidiLevel;
-bool bBullet : 1;
-bool bUpper : 1;// for small caps: upper case flag
-bool bDrawSpace : 1;// for small caps: underline/ line through
-bool bGreyWave  : 1;// grey wave line for extended text input
+SwFont *m_pFnt;
+SwUnderlineFont* m_pUnderFnt;
+sal_Int32* m_pHyphPos;
+long m_nLeft;
+long m_nRight;
+long m_nKanaDiff;
+sal_Int32 m_nIdx;
+sal_Int32 m_nLen;
+sal_Int32 m_nOfst;
+sal_uInt16 m_nWidth;
+sal_uInt16 m_nAscent;
+sal_uInt16 m_nCompress;
+long m_nSperren;
+long m_nSpace;
+long m_nKern;
+sal_Int32 m_nNumberOfBlanks;
+sal_uInt8 m_nCursorBidiLevel;
+bool m_bBullet : 1;
+bool m_bUpper : 1;// for small caps: upper case flag
+bool m_bDrawSpace : 1;// for small caps: underline/ line through
+bool m_bGreyWave  : 1;// grey wave line for extended text input
 // For underlining we need to know, if a section is right in front of a
 // whole block or a fix margin section.
-bool bSpaceStop : 1;
-bool bSnapToGrid : 1;   // Does paragraph snap to grid?
+bool m_bSpaceStop : 1;
+bool m_bSnapToGrid : 1;   // Does paragraph snap to grid?
 // Paint text as if text has LTR direction, used for line numbering
-bool bIgnoreFrmRTL : 1;
+bool m_bIgnoreFrmRTL : 1;
 // GetCrsrOfst should not return the next position if screen position is
 // inside second half of bound rect, used for Accessibility
-bool bPosMatchesBounds :1;
+bool m_bPosMatchesBounds :1;
 
 SwDrawTextInfo();  // prohibited
 public:
@@ -108,48 +108,48 @@ public:
 bool m_bDrawSp: 1;
 #endif
 
-SwDrawTextInfo( SwViewShell const *pS, OutputDevice &rO, const 
SwScriptInfo* pSI,
-const OUString &rSt, sal_Int32 nI, sal_Int32 nL,
-sal_uInt16 nW = 0, bool bB = false,
+SwDrawTextInfo( SwViewShell const *pSh, OutputDevice &rOut, const 
SwScriptInfo* pSI,
+const OUString &rText, sal_Int32 nIdx, sal_Int32 nLen,
+sal_uInt16 nWidth = 0, bool bBullet = false,
 vcl::TextLayoutCache const*const pCachedVclData = nullptr)
 : m_pCachedVclData(pCachedVclData)
 {
-pFrm = NULL;
-pSh = pS;
-pOut = &rO;
-pScriptInfo = pSI;
-m_aText = rSt;
-nIdx = nI;
-nLen = nL;
-nKern = 0;
-nCompress = 0;
-nWidth = nW;
-nNumberOfBlanks = 0;
-nCursorBidiLevel = 0;
-bBullet = bB;
-pUnderFnt = 0;
-bGreyWave = false;
-bSpaceStop = false;
-bSnapToGrid = false;
-bIgnoreFrmRTL = false;
-bPosMatchesBounds = false;
+m_pFrm = NULL;
+m_pSh = pSh;
+m_pOut = &rOut;
+m_pScriptInfo = pSI;
+m_aText = rText;
+m_nIdx = nIdx;
+m_nLen = nLen;
+m_nKern = 0;
+m_nCompress = 0;
+m_nWidth = nWidth;
+m_nNumberOfBlanks = 0;
+m_nCursorBidiLevel = 0;
+m_bBullet = bBullet;
+m_pUnderFnt = 0;
+m_bGreyWave = false;
+m_bSpaceStop = false;
+m_bSnapToGrid = false;
+m_bIgnoreFrmRTL = false;
+m_bPosMatchesBounds = fal

[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - 48 commits - chart2/source configure.ac drawinglayer/source extensions/source external/glm fpicker/source fpicker/uic

2015-08-10 Thread Szymon Kłos
Rebased ref, commits from common ancestor:
commit 904e0d6acf824d81c7d7a0f016866d2dbafb5adb
Author: Szymon Kłos 
Date:   Mon Aug 10 12:02:55 2015 +0200

when user typed a folder name, open it

Change-Id: I800f97bfd9f564c065ca7e59f5751768f2f2bd0d

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 20ce343..a85c40d 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -914,6 +914,9 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, NewFolderHdl )
 
 IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 {
+OUString sNameNoExt = m_pName_ed->GetText();
+OUString sPathNoExt;
+
 // auto extension
 if( m_eMode == REMOTEDLG_MODE_SAVE )
 AddFileExtension();
@@ -933,6 +936,7 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 if( !bSelected )
 {
 m_sPath = sCurrentPath + INetURLObject::encode( sName, 
INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL );
+sPathNoExt = sCurrentPath + INetURLObject::encode( sNameNoExt, 
INetURLObject::PART_FPATH, INetURLObject::ENCODE_ALL );
 }
 else
 {
@@ -953,11 +957,11 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 bool bExists = false;
 
 if( bFileDlg )
-bExists = ContentIsDocument(m_sPath);
+bExists = ContentIsDocument( m_sPath );
 else
-bExists = ContentIsFolder(m_sPath);
+bExists = ContentIsFolder( m_sPath );
 
-if ( bExists )
+if( bExists )
 {
 if( m_eMode == REMOTEDLG_MODE_SAVE )
 {
@@ -970,9 +974,15 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 }
 else
 {
-if( m_eMode == REMOTEDLG_MODE_OPEN )
+if( ContentIsFolder( sPathNoExt ) )
+{
+OpenURL( sPathNoExt );
+m_pName_ed->SetText( "" );
+
 return 0;
-if( m_eMode == REMOTEDLG_MODE_SAVE && ContentIsFolder(m_sPath) )
+}
+
+if( m_eMode == REMOTEDLG_MODE_OPEN )
 return 0;
 }
 
commit e4aa4bb290cd1a50125e4e5f47681a985e2912e6
Author: Szymon Kłos 
Date:   Fri Aug 7 18:32:32 2015 +0200

added New Folder button

Change-Id: I4b1ef03e707fdfb3d1968dca9f48c548f872612c

diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 80abcac..20ce343 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -183,6 +183,7 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, 
WinBits nBits )
 get( m_pServices_lb, "services_lb" );
 get( m_pFilter_lb, "filter_lb" );
 get( m_pName_ed, "name_ed" );
+get( m_pNewFolder, "new_folder" );
 
 m_eMode = ( nBits & WB_SAVEAS ) ? REMOTEDLG_MODE_SAVE : 
REMOTEDLG_MODE_OPEN;
 m_eType = ( nBits & WB_PATH ) ? REMOTEDLG_TYPE_PATHDLG : 
REMOTEDLG_TYPE_FILEDLG;
@@ -196,10 +197,20 @@ RemoteFilesDialog::RemoteFilesDialog( vcl::Window* 
pParent, WinBits nBits )
 m_pName_ed->Enable( false );
 
 if( m_eMode == REMOTEDLG_MODE_OPEN )
+{
 get( m_pOk_btn, "open" );
+
+m_pNewFolder->Hide();
+}
 else
+{
 get( m_pOk_btn, "save" );
 
+m_aImages = ImageList( fpicker::SvtResId( RID_FILEPICKER_IMAGES ) );
+m_pNewFolder->SetModeImage( m_aImages.GetImage( 
IMG_FILEDLG_CREATEFOLDER ) );
+m_pNewFolder->SetClickHdl( LINK( this, RemoteFilesDialog, NewFolderHdl 
) );
+}
+
 m_pOk_btn->Show();
 m_pOk_btn->Enable( false );
 
@@ -324,6 +335,7 @@ void RemoteFilesDialog::dispose()
 m_pServices_lb.clear();
 m_pFilter_lb.clear();
 m_pName_ed.clear();
+m_pNewFolder.clear();
 
 ModalDialog::dispose();
 }
@@ -872,6 +884,34 @@ IMPL_LINK ( RemoteFilesDialog, SelectBreadcrumbHdl, 
Breadcrumb*, pPtr )
 return 1;
 }
 
+IMPL_LINK_NOARG ( RemoteFilesDialog, NewFolderHdl )
+{
+m_pFileView->EndInplaceEditing( false );
+
+SmartContent aContent( m_pFileView->GetViewURL() );
+OUString aTitle;
+aContent.getTitle( aTitle );
+ScopedVclPtrInstance< QueryFolderNameDialog > aDlg( this, aTitle, 
fpicker::SVT_RESSTR( STR_SVT_NEW_FOLDER ) );
+bool bHandled = false;
+
+while( !bHandled )
+{
+if( aDlg->Execute() == RET_OK )
+{
+OUString aUrl = aContent.createFolder( aDlg->GetName() );
+if( !aUrl.isEmpty() )
+{
+m_pFileView->CreatedFolder( aUrl, aDlg->GetName() );
+bHandled = true;
+}
+}
+else
+bHandled = true;
+}
+
+return 1;
+}
+
 IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
 {
 // auto extension
diff --git a/fpicker/source/office/RemoteFilesDialog.hxx 
b/fpicker/source/office/RemoteFilesDialog.hxx
index 0d61f41..a63bef3 100644
--- a/fpicker/source/office/RemoteFilesDialog.hxx
+++ b/fpicker/source/office/RemoteFilesDialog.hxx
@@ -37,6 +37,9 @@
 
 #include "fpdialogbase.hxx"
 #include "fpsofficeResMgr.hxx"
+#inc

[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/qa sw/source

2015-08-10 Thread Michael Stahl
 sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx |binary
 sw/source/core/doc/DocumentLayoutManager.cxx |9 -
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 0ecc9fe7ac1358d9bbcfcebcc348906cca73872b
Author: Michael Stahl 
Date:   Fri Aug 7 20:44:43 2015 +0200

sw: fix ~SwIndexReg() assertion on import of tdf92157-1.docx

Problem is that the TextBox SwFrmFmt of a draw object gets a FLY_AS_CHAR
anchor set, which is then not updated later before nodes are deleted.

(regression from c7307c77254557646f33017af915f6808a861e29)

(cherry picked from commit 9dbb88fc41e7a91c852795f00a663c0d073dd70a)

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

diff --git a/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx 
b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx
new file mode 100644
index 000..6edbe18
Binary files /dev/null and 
b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx differ
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index 450fac1..08b8fa2 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -496,7 +496,14 @@ SwFrmFmt *DocumentLayoutManager::CopyLayoutFmt(
 // If the draw format has a TextBox, then copy its fly format as well.
 if (SwFrmFmt* pSourceTextBox = SwTextBoxHelper::findTextBox(&rSource))
 {
-SwFrmFmt* pDestTextBox = CopyLayoutFmt(*pSourceTextBox, rNewAnchor, 
bSetTxtFlyAtt, bMakeFrms);
+SwFmtAnchor boxAnchor(rNewAnchor);
+if (FLY_AS_CHAR == boxAnchor.GetAnchorId())
+{
+// AS_CHAR *must not* be set on textbox fly-frame
+boxAnchor.SetType(FLY_AT_CHAR);
+}
+SwFrmFmt* pDestTextBox = CopyLayoutFmt(*pSourceTextBox,
+boxAnchor, bSetTxtFlyAtt, bMakeFrms);
 SwAttrSet aSet(pDest->GetAttrSet());
 SwFmtCntnt 
aCntnt(pDestTextBox->GetCntnt().GetCntntIdx()->GetNode().GetStartNode());
 aSet.Put(aCntnt);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - sw/qa writerfilter/source

2015-08-10 Thread Mark Hung
 sw/qa/extras/ooxmlexport/data/tdf91594.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx  |   17 +++
 writerfilter/source/dmapper/DomainMapper.cxx  |   51 +-
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |6 --
 writerfilter/source/dmapper/DomainMapper_Impl.hxx |   19 ++--
 writerfilter/source/ooxml/model.xml   |1 
 6 files changed, 55 insertions(+), 39 deletions(-)

New commits:
commit 53e86198f2a40f40f291fb6a9cf5cc67e45df94c
Author: Mark Hung 
Date:   Wed Jun 24 01:40:13 2015 +0800

tdf#91594 misinterprets letters from Symbol font in docx files

Fix the issue caused by wrong assumption about symbol chracter
and symbol font attributes order in writerfilter. Also allow
symbols to be displayed if user's language is not Western.

Reviewed-on: https://gerrit.libreoffice.org/16543
Tested-by: Jenkins 
Reviewed-by: Michael Stahl 

Conflicts:
writerfilter/source/dmapper/DomainMapper.cxx

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf91594.docx 
b/sw/qa/extras/ooxmlexport/data/tdf91594.docx
new file mode 100644
index 000..ea539af
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf91594.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 2e4b8a3..2d265e2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -661,6 +661,23 @@ DECLARE_OOXMLEXPORT_TEST(testTdf89890, "tdf89890.docx")
 CPPUNIT_ASSERT(bFound);
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf91594, "tdf91594.docx")
+{
+uno::Reference xPara1(getParagraph(1));
+CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0fb), xPara1->getString()[0] );
+uno::Reference xPara2(getParagraph(2));
+CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0fc), xPara2->getString()[0] );
+uno::Reference xPara3(getParagraph(3));
+CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0fd), xPara3->getString()[0] );
+uno::Reference xPara4(getParagraph(4));
+CPPUNIT_ASSERT_EQUAL(sal_Unicode(0xf0fe), xPara4->getString()[0] );
+
+uno::Reference xRun(getRun(xPara1,1), uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty(xRun, 
"CharFontName"));
+CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty(xRun, 
"CharFontNameAsian"));
+CPPUNIT_ASSERT_EQUAL(OUString("Wingdings"), getProperty(xRun, 
"CharFontNameComplex"));
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 8dc4ef2..b0c6724 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -239,37 +239,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 break;
 
 case NS_ooxml::LN_CT_Sym_char:
-if( m_pImpl->GetTopContext() && 
m_pImpl->GetTopContext()->GetFootnote().is())
-{
-m_pImpl->GetTopContext()->GetFootnote()->setLabel(OUString( 
sal_Unicode(nIntValue)));
-break;
-}
-else //it's a _real_ symbol
-{
-m_pImpl->SetSymbolData(nIntValue);
-}
+m_pImpl->SetSymbolChar(nIntValue);
 break;
 case NS_ooxml::LN_CT_Sym_font:
-//the footnote symbol and font are provided after the footnote is 
already inserted
-if( m_pImpl->GetTopContext() && 
m_pImpl->GetTopContext()->GetFootnote().is())
-{
-uno::Reference< beans::XPropertySet > xAnchorProps( 
m_pImpl->GetTopContext()->GetFootnote()->getAnchor(), uno::UNO_QUERY );
-xAnchorProps->setPropertyValue(
-PropertyNameSupplier::GetPropertyNameSupplier().GetName( 
PROP_CHAR_FONT_NAME),
-uno::makeAny( sStringValue ));
-}
-else //a real symbol
-if (m_pImpl->GetTopContext())
-{
-m_pImpl->GetTopContext()->Insert(PROP_CHAR_FONT_NAME, 
uno::makeAny( sStringValue ));
-/*
- * In case of symbol, symbol character get imported first and 
then font of symbols.
- * So we are storing symbol character and when we parse symbol 
font then create UNO object for text.
- */
-sal_Int32 symboldata = m_pImpl->GetSymbolData();
-utext( reinterpret_cast < const sal_uInt8 * >( &(symboldata) 
), 1 );
-}
-
+m_pImpl->SetSymbolFont(sStringValue);
 break;
 case NS_ooxml::LN_CT_Underline_val:
 handleUnderlineType(nIntValue, m_pImpl->GetTopContext());
@@ -2532,6 +2505,26 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, 
PropertyMapPtr rContext )
 m_pImpl->disableInter

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

2015-08-10 Thread Michael Stahl
 sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx |binary
 sw/source/core/doc/DocumentLayoutManager.cxx |9 -
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 26a3f8283716e6545ec7803cfdc65068f1abf085
Author: Michael Stahl 
Date:   Fri Aug 7 20:44:43 2015 +0200

sw: fix ~SwIndexReg() assertion on import of tdf92157-1.docx

Problem is that the TextBox SwFrmFmt of a draw object gets a FLY_AS_CHAR
anchor set, which is then not updated later before nodes are deleted.

(regression from c7307c77254557646f33017af915f6808a861e29)

(cherry picked from commit 9dbb88fc41e7a91c852795f00a663c0d073dd70a)

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

diff --git a/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx 
b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx
new file mode 100644
index 000..6edbe18
Binary files /dev/null and 
b/sw/qa/core/data/ooxml/pass/tdf92157-1-minimized.docx differ
diff --git a/sw/source/core/doc/DocumentLayoutManager.cxx 
b/sw/source/core/doc/DocumentLayoutManager.cxx
index 14dc9ab..d606706 100644
--- a/sw/source/core/doc/DocumentLayoutManager.cxx
+++ b/sw/source/core/doc/DocumentLayoutManager.cxx
@@ -496,7 +496,14 @@ SwFrameFormat *DocumentLayoutManager::CopyLayoutFormat(
 // If the draw format has a TextBox, then copy its fly format as well.
 if (SwFrameFormat* pSourceTextBox = SwTextBoxHelper::findTextBox(&rSource))
 {
-SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox, 
rNewAnchor, bSetTextFlyAtt, bMakeFrms);
+SwFormatAnchor boxAnchor(rNewAnchor);
+if (FLY_AS_CHAR == boxAnchor.GetAnchorId())
+{
+// AS_CHAR *must not* be set on textbox fly-frame
+boxAnchor.SetType(FLY_AT_CHAR);
+}
+SwFrameFormat* pDestTextBox = CopyLayoutFormat(*pSourceTextBox,
+boxAnchor, bSetTextFlyAtt, bMakeFrms);
 SwAttrSet aSet(pDest->GetAttrSet());
 SwFormatContent 
aContent(pDestTextBox->GetContent().GetContentIdx()->GetNode().GetStartNode());
 aSet.Put(aContent);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-08-10 Thread Miklos Vajna
 sw/qa/extras/uiwriter/data/tdf87922.odt |binary
 sw/qa/extras/uiwriter/uiwriter.cxx  |   30 ++
 2 files changed, 30 insertions(+)

New commits:
commit c438141318a79350ef26a37b59fd7328e46275b2
Author: Miklos Vajna 
Date:   Mon Aug 10 09:17:42 2015 +0200

tdf#87922 testcase

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

diff --git a/sw/qa/extras/uiwriter/data/tdf87922.odt 
b/sw/qa/extras/uiwriter/data/tdf87922.odt
new file mode 100644
index 000..b0560f1
Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf87922.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index 233837c..cedc596 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -74,6 +74,8 @@
 #include "com/sun/star/text/TextMarkupType.hpp"
 #include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -151,6 +153,7 @@ public:
 void testTdf89954();
 void testTdf89720();
 void testTdf88986();
+void testTdf87922();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -218,6 +221,7 @@ public:
 CPPUNIT_TEST(testTdf89954);
 CPPUNIT_TEST(testTdf89720);
 CPPUNIT_TEST(testTdf88986);
+CPPUNIT_TEST(testTdf87922);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -2223,6 +2227,32 @@ void SwUiWriterTest::testTdf88986()
 CPPUNIT_ASSERT(aSet.HasItem(SID_COLOR_TABLE));
 }
 
+void SwUiWriterTest::testTdf87922()
+{
+// Create an SwDrawTextInfo.
+SwDoc* pDoc = createDoc("tdf87922.odt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+SwScriptInfo* pScriptInfo = 0;
+// Get access to the single paragraph in the document.
+SwNodeIndex aNodeIndex(pDoc->GetNodes().GetEndOfContent(), -1);
+const OUString& rText = aNodeIndex.GetNode().GetTextNode()->GetText();
+sal_Int32 nIndex = 0;
+sal_Int32 nLength = rText.getLength();
+SwDrawTextInfo aDrawTextInfo(pWrtShell, *pWrtShell->GetOut(), pScriptInfo, 
rText, nIndex, nLength);
+// Root -> page -> body -> text.
+SwTextFrm* pTextFrm = 
static_cast(pWrtShell->GetLayout()->GetLower()->GetLower()->GetLower());
+aDrawTextInfo.SetFrm(pTextFrm);
+
+// If no color background color is found, assume white.
+Color* pColor = sw::GetActiveRetoucheColor();
+*pColor = Color(COL_WHITE);
+
+// Make sure that automatic color on black background is white, not black.
+vcl::Font aFont;
+aDrawTextInfo.ApplyAutoColor(&aFont);
+CPPUNIT_ASSERT_EQUAL(COL_WHITE, aFont.GetColor().GetColor());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Integrate LO with GNOME - WR#11

2015-08-10 Thread Pranav Kant
This week :-
- Presented this work at GUADEC with Markus.
- Very well received by the GNOME community.
- Discussions with Caolán about shipping the .gir and .typelib files;
hoping to finish the required things by next week.
- Healthy discussions with Markus and Stephen Bergmann regarding other
LibreOffice components.
- Discussions with Cosimo and Debarshi about best approaches for
integrating the widget with gnome-documents.

This week was more of insight of how we want to achieve what we intend to
achieve in this project.

Coming up next week :-
- Modifications to the build system for shipping .gir and .typelib files

-- 
Regards,
Pranav Kant
http://pranavk.me 
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: Painting problem in Write 5

2015-08-10 Thread Miklos Vajna
Hi,

On Sun, Aug 09, 2015 at 02:39:38PM -0400, Ashod Nakashian  
wrote:
> If this isn't known, I can create a bug and bisect.

Right, if you don't plan to debug this yourself, then please create a
bugreport with steps to reproduce the problem. If you can also
(bi)bisect it, that would be great. :-)

Regards,

Miklos


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


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

2015-08-10 Thread Mihai Varga
 loleaflet/dist/leaflet.css   |5 +
 loleaflet/src/control/Control.Buttons.js |   23 +--
 loleaflet/src/control/Parts.js   |2 +-
 loleaflet/src/layer/tile/TileLayer.js|   11 +++
 4 files changed, 34 insertions(+), 7 deletions(-)

New commits:
commit f961995d9697852289bebae69846f01c653e25c2
Author: Mihai Varga 
Date:   Mon Aug 10 10:25:38 2015 +0300

loleaflet: use 'resetselection' instead of mouse click

diff --git a/loleaflet/src/control/Parts.js b/loleaflet/src/control/Parts.js
index 4171f19..23f856f 100644
--- a/loleaflet/src/control/Parts.js
+++ b/loleaflet/src/control/Parts.js
@@ -22,7 +22,7 @@ L.Map.include({
}
if (docLayer._isCursorOverlayVisible) {
// a click outside the slide to clear any selection
-   docLayer.sendMessage('mouse type=buttondown x=-1 y=-1 
count=1');
+   docLayer.sendMessage('resetselection');
}
this.fire('updateparts', {
currentPart: docLayer._currentPart,
commit 4f181fcfdaeea51645f096aa0237f292d48acb81
Author: Mihai Varga 
Date:   Fri Aug 7 12:22:19 2015 +0300

loleaflet: disable buttons in viewing mode

diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index 2c8beca..477f86f 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -329,10 +329,15 @@ a.leaflet-control-buttons:first-child,
 a.leaflet-control-buttons:hover:first-child {
margin-left: 0px;
}
+
 .leaflet-control-buttons-active {
border: thin solid;
}
 
+.leaflet-control-buttons-disabled{
+   opacity: 0.5;
+   }
+
 .leaflet-control-button-separator {
width: 14px;
height: 1px;
diff --git a/loleaflet/src/control/Control.Buttons.js 
b/loleaflet/src/control/Control.Buttons.js
index 3c971c7..dd7625c 100644
--- a/loleaflet/src/control/Control.Buttons.js
+++ b/loleaflet/src/control/Control.Buttons.js
@@ -33,6 +33,7 @@ L.Control.Buttons = L.Control.extend({
buttonsName, container, this._onButtonClick);
}
map.on('commandstatechanged', this._onStateChange, this);
+   map.on('updatepermission', this._onPermissionUpdate, this);
 
return container;
},
@@ -64,7 +65,7 @@ L.Control.Buttons = L.Control.extend({
callback: L.bind(this._onSaveAs, this)
});
}
-   else {
+   else if (this._map._docLayer._permission === 'edit') {
this._map.toggleCommandState(button.uno);
}
},
@@ -81,6 +82,12 @@ L.Control.Buttons = L.Control.extend({
else if (state === 'false') {

L.DomUtil.removeClass(button.el.firstChild, 'leaflet-control-buttons-active');
}
+   else if (state === 'enabled' && 
this._map._docLayer._permission === 'edit') {
+   
L.DomUtil.removeClass(button.el.firstChild, 'leaflet-control-buttons-disabled');
+   }
+   else if (state === 'disabled') {
+   
L.DomUtil.removeClass(button.el.firstChild, 'leaflet-control-buttons-disabled');
+   }
}
}
},
@@ -99,6 +106,18 @@ L.Control.Buttons = L.Control.extend({
if (e !== false) {
this._map.saveAs(e.url, e.format, e.options);
}
+   },
+
+   _onPermissionUpdate: function (e) {
+   for (var key in this._buttons) {
+   var button = this._buttons[key];
+   if (e.perm !== 'edit') {
+   L.DomUtil.addClass(button.el.firstChild, 
'leaflet-control-buttons-disabled');
+   }
+   else {
+   L.DomUtil.removeClass(button.el.firstChild, 
'leaflet-control-buttons-disabled');
+   }
+   }
}
 });
 
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 1d815cc..bcda4aa 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -116,12 +116,15 @@ L.TileLayer = L.GridLayer.extend({
this._endMarker.on('drag dragend', this._onSelectionHandleDrag, 
this);
this._textArea = this._map._textArea;
this._textArea.focus();
-   if (this.options.edit && !this.options.readOnly) {
-   this._map.setPermission('edit');
-   }
if (this.options.readOnly) {
this._map.setPermission('readonly');
   

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

2015-08-10 Thread Miklos Vajna
 sw/inc/swmodule.hxx |5 +
 sw/source/core/inc/drawfont.hxx |2 +-
 sw/source/core/inc/frame.hxx|2 +-
 sw/source/core/inc/swfont.hxx   |2 +-
 sw/source/core/layout/paintfrm.cxx  |8 
 sw/source/core/txtnode/fntcache.cxx |   10 ++
 6 files changed, 26 insertions(+), 3 deletions(-)

New commits:
commit 31937624e359803d2db8c12a805ec1a5c9d0fe30
Author: Miklos Vajna 
Date:   Mon Aug 10 09:16:22 2015 +0200

sw: make these available outside sw core

Change-Id: Id5c4c65369c713d8fd7ba45acf55a65c0a05bb0e

diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx
index f6bdea0..35d58c6 100644
--- a/sw/inc/swmodule.hxx
+++ b/sw/inc/swmodule.hxx
@@ -258,6 +258,11 @@ inline ::com::sun::star::uno::Reference<
 SW_DLLPUBLIC SwView*GetActiveView();
 SW_DLLPUBLIC SwWrtShell* GetActiveWrtShell();
 
+namespace sw
+{
+SW_DLLPUBLIC Color* GetActiveRetoucheColor();
+}
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/inc/drawfont.hxx b/sw/source/core/inc/drawfont.hxx
index 7d36258..b751fc1 100644
--- a/sw/source/core/inc/drawfont.hxx
+++ b/sw/source/core/inc/drawfont.hxx
@@ -40,7 +40,7 @@ namespace vcl {
 class SwUnderlineFont;
 
 // encapsulates information for drawing text
-class SwDrawTextInfo
+class SW_DLLPUBLIC SwDrawTextInfo
 {
 const SwTextFrm* pFrm;
 VclPtr pOut;
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 58df49f..bdfb9a6 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -213,7 +213,7 @@ namespace drawinglayer { namespace attribute {
  * level: pages, headers, footers, etc. (Inside a paragraph SwLinePortion
  * instances are used.)
  */
-class SwFrm: public SwClient, public SfxBroadcaster
+class SW_DLLPUBLIC SwFrm: public SwClient, public SfxBroadcaster
 {
 // the hidden Frm
 friend class SwFlowFrm;
diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx
index e9c96e1..70a0aca 100644
--- a/sw/source/core/inc/swfont.hxx
+++ b/sw/source/core/inc/swfont.hxx
@@ -123,7 +123,7 @@ public:
 #define SW_CTL 2
 #define SW_SCRIPTS 3
 
-class SwFont
+class SW_DLLPUBLIC SwFont
 {
 // CJK == Chinese, Japanese, Korean
 // CTL == Complex text layout ( Hebrew, Arabic )
diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index e4482e8..748fe0a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -235,6 +235,14 @@ const static double aEdgeScale = 0.5;
 //To optimize the expensive RetouchColor determination
 Color aGlobalRetoucheColor;
 
+namespace sw
+{
+Color* GetActiveRetoucheColor()
+{
+return &aGlobalRetoucheColor;
+}
+}
+
 /**
  * Container for static properties
  */
commit d48d0e81971266ff4625721b0f069a62ec7014e2
Author: Miklos Vajna 
Date:   Mon Aug 10 09:14:27 2015 +0200

tdf#87922 SwDrawTextInfo::ApplyAutoColor: handle fill attributes

With this, if page background is set to e.g. black, then automatic color
of text is again white, not black.

Change-Id: I8246fa4b7834f60872b0737f03906ccc86948cc1

diff --git a/sw/source/core/txtnode/fntcache.cxx 
b/sw/source/core/txtnode/fntcache.cxx
index a106cbd..fba875c 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -47,6 +47,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2521,6 +2522,7 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
 {
 // check if current background has a user defined setting
 const Color* pCol = GetFont() ? GetFont()->GetBackColor() : NULL;
+Color aColor;
 if( ! pCol || COL_TRANSPARENT == pCol->GetColor() )
 {
 const SvxBrushItem* pItem;
@@ -2537,6 +2539,14 @@ bool SwDrawTextInfo::ApplyAutoColor( vcl::Font* pFont )
 /// is a background brush and its color is *not* "no 
fill"/"auto fill".
 if( GetFrm()->GetBackgroundBrush( aFillAttributes, pItem, 
pCol, aOrigBackRect, false ) )
 {
+if (aFillAttributes.get() && aFillAttributes->isUsed())
+{
+// First see if fill atttributes provide a color.
+aColor = 
Color(aFillAttributes->getAverageColor(aGlobalRetoucheColor.getBColor()));
+pCol = &aColor;
+}
+
+// If not, then fall back to the old brush item.
 if ( !pCol )
 {
 pCol = &pItem->GetColor();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits