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

2014-07-31 Thread Stephan Bergmann
New branch 'feature/gsoc14-libcmis2' available with the following commits:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - external/libcmis

2014-07-31 Thread Mihai Varga
 external/libcmis/StaticLibrary_cmis.mk   |   11 
 external/libcmis/UnpackedTarball_cmis.mk |4 
 external/libcmis/libcmis-0.4.1-empty-path.patch  |   13 
 external/libcmis/libcmis-0.4.1-properties-fix.patch  |  280 
--
 external/libcmis/libcmis-0.4.1-unreferenced-local-variable.patch |   96 ---
 external/libcmis/libcmis-0.4.1.patch |   95 ---
 external/libcmis/libcmis-libxml2_compatibility.patch |2 
 7 files changed, 11 insertions(+), 490 deletions(-)

New commits:
commit 2542957b43f63ab63ba825565dd2620bd409ba7d
Author: Mihai Varga 
Date:   Mon Jun 23 11:44:40 2014 +0300

Updated CMIS patches and the makefile for the OneDrive binding

Change-Id: I45eb81a0139c42864f93ad89c4a31185f3ac5bd6

diff --git a/external/libcmis/StaticLibrary_cmis.mk 
b/external/libcmis/StaticLibrary_cmis.mk
index f87df26..8171590 100644
--- a/external/libcmis/StaticLibrary_cmis.mk
+++ b/external/libcmis/StaticLibrary_cmis.mk
@@ -46,14 +46,23 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,cmislib,\
UnpackedTarball/cmis/src/libcmis/gdrive-repository \
UnpackedTarball/cmis/src/libcmis/gdrive-session \
UnpackedTarball/cmis/src/libcmis/gdrive-utils \
+   UnpackedTarball/cmis/src/libcmis/http-session \
UnpackedTarball/cmis/src/libcmis/json-utils \
UnpackedTarball/cmis/src/libcmis/oauth2-data \
UnpackedTarball/cmis/src/libcmis/oauth2-handler \
UnpackedTarball/cmis/src/libcmis/oauth2-providers \
UnpackedTarball/cmis/src/libcmis/object \
UnpackedTarball/cmis/src/libcmis/object-type \
-   UnpackedTarball/cmis/src/libcmis/property-type \
+   UnpackedTarball/cmis/src/libcmis/onedrive-document \
+   UnpackedTarball/cmis/src/libcmis/onedrive-folder \
+   UnpackedTarball/cmis/src/libcmis/onedrive-object \
+   UnpackedTarball/cmis/src/libcmis/onedrive-object-type \
+   UnpackedTarball/cmis/src/libcmis/onedrive-property \
+   UnpackedTarball/cmis/src/libcmis/onedrive-repository \
+   UnpackedTarball/cmis/src/libcmis/onedrive-session \
+   UnpackedTarball/cmis/src/libcmis/onedrive-utils \
UnpackedTarball/cmis/src/libcmis/property \
+   UnpackedTarball/cmis/src/libcmis/property-type \
UnpackedTarball/cmis/src/libcmis/rendition \
UnpackedTarball/cmis/src/libcmis/repository \
UnpackedTarball/cmis/src/libcmis/session-factory \
diff --git a/external/libcmis/UnpackedTarball_cmis.mk 
b/external/libcmis/UnpackedTarball_cmis.mk
index 1ee253d..16d4400 100644
--- a/external/libcmis/UnpackedTarball_cmis.mk
+++ b/external/libcmis/UnpackedTarball_cmis.mk
@@ -14,11 +14,7 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
 $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
-   
external/libcmis/libcmis-0.4.1.patch \
-   
external/libcmis/libcmis-0.4.1-empty-path.patch \
-   
external/libcmis/libcmis-0.4.1-properties-fix.patch \

external/libcmis/libcmis-libxml2_compatibility.patch \
-   
external/libcmis/libcmis-0.4.1-unreferenced-local-variable.patch \
 ))
 
 ifeq ($(OS)$(COM),WNTMSC)
diff --git a/external/libcmis/libcmis-0.4.1-empty-path.patch 
b/external/libcmis/libcmis-0.4.1-empty-path.patch
deleted file mode 100644
index c48265d2..000
--- a/external/libcmis/libcmis-0.4.1-empty-path.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git src/libcmis/document.cxx src/libcmis/document.cxx
-index 1af0d63..7ecfd24 100644
 src/libcmis/document.cxx
-+++ src/libcmis/document.cxx
-@@ -44,6 +44,8 @@ namespace libcmis
-  it != parents.end(); ++it )
- {
- string path = ( *it )->getPath( );
-+if ( path.empty() )
-+continue;
- if ( path[path.size() - 1] != '/' )
- path += "/";
- path += getName( );
diff --git a/external/libcmis/libcmis-0.4.1-properties-fix.patch 
b/external/libcmis/libcmis-0.4.1-properties-fix.patch
deleted file mode 100644
index b3739e9..000
--- a/external/libcmis/libcmis-0.4.1-properties-fix.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-From 958b3c763fb52d1bf2ad88c177e7e4f426aab354 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= 
-Date: Wed, 4 Dec 2013 10:44:37 +0100
-Subject: [PATCH] Object creation mixed relationship properties with document
- properties
-
-Added a Unit test to show the problem. We surely don't want the
-relationship cmis:properties to be read as properties. This bug caused
-some problems with other operations like checkout.

- .../data/atom/test-document-relationships.xml  | 

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

2014-07-31 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/sdt-2-para.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |   28 +
 sw/source/filter/ww8/docxattributeoutput.cxx  |   55 +-
 sw/source/filter/ww8/docxattributeoutput.hxx  |8 +++
 sw/source/filter/ww8/docxexport.cxx   |7 +++
 sw/source/filter/ww8/docxexport.hxx   |3 +
 sw/source/filter/ww8/docxsdrexport.cxx|   23 ++
 sw/source/filter/ww8/docxsdrexport.hxx|5 ++
 8 files changed, 119 insertions(+), 10 deletions(-)

New commits:
commit 4a39475e355b256dc0a922d21b21e695aaa5577b
Author: Miklos Vajna 
Date:   Thu Jul 31 09:36:32 2014 +0200

DOCX export: handle exact end of paragraph w:sdt tags

Previously every paragraph SDT was closed immediately after the
paragraph end. This commit adds support for having multiple paragraphs
inside an SDT.

A few testcases implicitly tested that such SDT's are lost on save,
adjust the relevant XPath expressions now that this works.

Change-Id: I07802b3e067600b087b7e0f9b2e7b3ba17c3379a

diff --git a/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx 
b/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx
new file mode 100644
index 000..b6d6565
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/sdt-2-para.docx 
differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 9b4b380..76cb592 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -126,7 +126,7 @@ DECLARE_OOXMLEXPORT_TEST(testHyperlineIsEnd, 
"hyperlink.docx")
 // If  document.xml miss any ending tag then parseExport() returns NULL 
which fail the test case.
 CPPUNIT_ASSERT(pXmlDoc) ;
 // Check hyperlink is properly open.
-assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:hyperlink",1);
+assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:hyperlink",1);
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
@@ -136,7 +136,7 @@ DECLARE_OOXMLEXPORT_TEST(testFdo69649, "fdo69649.docx")
 if (!pXmlDoc)
 return;
 
-assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[21]/w:hyperlink/w:r[5]/w:t", "15");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[21]/w:hyperlink/w:r[5]/w:t", "15");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFieldFlagO,"TOC_field_f.docx")
@@ -183,7 +183,7 @@ DECLARE_OOXMLEXPORT_TEST(testPreserveWfieldTOC, 
"PreserveWfieldTOC.docx")
 if (!pXmlDoc)
 return;
 
-assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", " 
TOC \\z \\w \\f \\o \"1-3\" \\h");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\w 
\\f \\o \"1-3\" \\h");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFieldFlagB,"TOC_field_b.docx")
@@ -204,7 +204,7 @@ DECLARE_OOXMLEXPORT_TEST(testPreserveXfieldTOC, 
"PreserveXfieldTOC.docx")
 if (!pXmlDoc)
 return;
 
-assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", " 
TOC \\x \\f \\o \"1-3\" \\h");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\x \\f 
\\o \"1-3\" \\h");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testFDO77715,"FDO77715.docx")
@@ -225,7 +225,7 @@ DECLARE_OOXMLEXPORT_TEST(testTOCFlag_u,"testTOCFlag_u.docx")
 
 // FIXME "p[2]" will have to be "p[1]", once the TOC import code is fixed
 // not to insert an empty paragraph before TOC.
-assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", " 
TOC \\z \\o \"1-9\" \\u \\h");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " TOC \\z \\o 
\"1-9\" \\u \\h");
 }
 
 DECLARE_OOXMLEXPORT_TEST(testfdo73596_RunInStyle,"fdo73596_RunInStyle.docx")
@@ -337,7 +337,7 @@ DECLARE_OOXMLEXPORT_TEST(testPageref, "testPageref.docx")
 if (!pXmlDoc)
 return;
 
-assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:p[1]/w:hyperlink/w:r[3]/w:instrText", "PAGEREF 
_Toc355095261 \\h");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p[2]/w:hyperlink/w:r[3]/w:instrText", 
"PAGEREF _Toc355095261 \\h");
 }
 
 
DECLARE_OOXMLEXPORT_TEST(testAlphabeticalIndex_AutoColumn,"alphabeticalIndex_AutoColumn.docx")
@@ -375,7 +375,7 @@ DECLARE_OOXMLEXPORT_TEST(testBibliography,"FDO75133.docx")
 if (!pXmlDoc)
 return;
 
-assertXPathContent(pXmlDoc, "/w:document/w:body/w:p/w:r[2]/w:instrText", " 
BIBLIOGRAPHY ");
+assertXPathContent(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtContent/w:p/w:r[2]/w:instrText", " BIBLIOGRAPHY 
");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartGallery", "val", 
"Bibliographies");
 assertXPath(pXmlDoc, 
"/w:document/w:body/w:sdt/w:sdtPr/w:docPartObj/w:docPartUnique", 1);
 }
@@ -453,7 +453,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO78654 , "fdo78654.docx")

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - config_host/config_oauth2.h.in configure.ac officecfg/registry svtools/source ucb/source

2014-07-31 Thread Mihai Varga
 config_host/config_oauth2.h.in   |   10 
 configure.ac |   33 +++
 officecfg/registry/data/org/openoffice/Office/Common.xcu |2 
 svtools/source/dialogs/ServerDetailsControls.cxx |6 ++
 ucb/source/ucp/cmis/cmis_content.cxx |5 ++
 ucb/source/ucp/cmis/cmis_repo_content.cxx|5 ++
 6 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit 002f33224802da1820f3152a030833b11ec77a9b
Author: Mihai Varga 
Date:   Mon Jun 23 19:14:08 2014 +0300

OneDrive binding settings

Change-Id: I72c97931098c1a029d39532e3433c0aeaba73e3f

diff --git a/config_host/config_oauth2.h.in b/config_host/config_oauth2.h.in
index 40c57a8..72c19a8 100644
--- a/config_host/config_oauth2.h.in
+++ b/config_host/config_oauth2.h.in
@@ -33,6 +33,16 @@
 #define ALFRESCO_CLOUD_REDIRECT_URI "http://127.0.0.1/Callback";
 #define ALFRESCO_CLOUD_SCOPE "public_api"
 
+
+/* OneDrive */
+#define ONEDRIVE_BASE_URL "https://apis.live.net/v5.0";
+#define ONEDRIVE_CLIENT_ID ""
+#define ONEDRIVE_CLIENT_SECRET ""
+#define ONEDRIVE_AUTH_URL "https://login.live.com/oauth20_authorize.srf";
+#define ONEDRIVE_TOKEN_URL "https://login.live.com/oauth20_token.srf";
+#define ONEDRIVE_REDIRECT_URI "https://login.live.com/oauth20_desktop.srf";
+#define ONEDRIVE_SCOPE "wl.offline_access"
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configure.ac b/configure.ac
index 5ef2401..a3a1781 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2209,6 +2209,19 @@ AC_ARG_WITH(alfresco-cloud-client-secret,
 --with-alfresco-cloud-client-id is empty, the feature will be 
disabled]),
 )
 
+AC_ARG_WITH(onedrive-client-id,
+AS_HELP_STRING([--with-onedrive-client-id],
+[Provides the client id of the application for OAuth2 authentication
+on OneDrive. If either this or --with-onedrive-client-secret is
+empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(onedrive-client-secret,
+AS_HELP_STRING([--with-onedrive-client-secret],
+[Provides the client secret of the application for OAuth2
+authentication on OneDrive. If either this or
+--with-onedrive-client-id is empty, the feature will be disabled]),
+)
 dnl ===
 dnl Do we want to use pre-build binary tarball for recompile
 dnl ===
@@ -12709,6 +12722,26 @@ fi
 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
 AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
 
+AC_MSG_CHECKING([for OneDrive client id and secret])
+ONEDRIVE_CLIENT_ID="\"$with_onedrive_client_id\""
+ONEDRIVE_CLIENT_SECRET="\"$with_onedrive_client_secret\""
+if test "$with_onedrive_client_id" = "no" -o -z "$with_onedrive_client_id"; 
then
+ONEDRIVE_CLIENT_ID="\"\""
+fi
+
+if test "$with_onedrive_client_secret" = "no" -o -z 
"$with_onedrive_client_secret"; then
+ONEDRIVE_CLIENT_SECRET="\"\""
+fi
+
+if test -z "$ONEDRIVE_CLIENT_ID" -o -z "$ONEDRIVE_CLIENT_SECRET"; then
+AC_MSG_RESULT([not set])
+else
+AC_MSG_RESULT([set])
+fi
+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
 # ===
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu 
b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index dcb3f70..5cc6649 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -585,6 +585,7 @@
 
http://ec2-184-72-233-127.compute-1.amazonaws.com/ot-cmis/services/RepositoryService?wsdl
 http:///_vti_bin/CMISSoapwsdl.aspx
 https://www.googleapis.com/drive/v2
+https://apis.live.net/v5.0
   
 
 
@@ -599,6 +600,7 @@
 OpenText ELS 10.2.0
 SharePoint 2010
 Google Drive
+OneDrive
   
 
   
diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx 
b/svtools/source/dialogs/ServerDetailsControls.cxx
index 4bc907c..1c72356 100644
--- a/svtools/source/dialogs/ServerDetailsControls.cxx
+++ b/svtools/source/dialogs/ServerDetailsControls.cxx
@@ -283,6 +283,9 @@ CmisDetailsContainer::CmisDetailsContainer( 
VclBuilderContainer* pBuilder ) :
OUString( GDRIVE_CLIENT_SECRET ).isEmpty();
 bool bSkipAlfresco = OUString( ALFRESCO_CLOUD_CLIENT_ID ).isEmpty() ||
OUString( ALFRESCO_CLOUD_CLIENT_SECRET ).isEmpty();
+bool bSkipOneDrive= OUString( ONEDRIVE_CLIENT_ID ).isEmpty() ||
+   OUString( ONEDRIVE_CLIENT_SECRET ).isEmpty();
+
 
 

[Bug 39674] find / fix all German spellings in internal APIs

2014-07-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=39674

--- Comment #13 from Noel Grandin  ---
Jonathon, you will need to check out the source code, and then run the script

./bin/find-german-comments

Then pick a place to start and focus on cleaning up one location.

Come hang out on the IRC channel if you need more help.

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


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - uui/Library_uui.mk uui/source uui/uiconfig

2014-07-31 Thread Mihai Varga
 uui/Library_uui.mk  |1 
 uui/source/authfallbackdlg.cxx  |   63 ++
 uui/source/authfallbackdlg.hxx  |   44 ++
 uui/uiconfig/ui/authfallback.ui |   96 
 4 files changed, 204 insertions(+)

New commits:
commit 4265926f7cffa127e8ca2a94bb81820576ddc32e
Author: Mihai Varga 
Date:   Thu Jul 31 11:10:07 2014 +0300

Authentication fallback dialog for the OneDrive connection

It asks the user to access an URL in his browser and provide a code
from the URL he has been redirected to

diff --git a/uui/Library_uui.mk b/uui/Library_uui.mk
index 560cb65..cd85de6 100644
--- a/uui/Library_uui.mk
+++ b/uui/Library_uui.mk
@@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,uui,\
 
 $(eval $(call gb_Library_add_exception_objects,uui,\
uui/source/alreadyopen \
+   uui/source/authfallbackdlg \
uui/source/filechanged \
uui/source/fltdlg \
uui/source/iahndl \
diff --git a/uui/source/authfallbackdlg.cxx b/uui/source/authfallbackdlg.cxx
new file mode 100644
index 000..5f1548d
--- /dev/null
+++ b/uui/source/authfallbackdlg.cxx
@@ -0,0 +1,63 @@
+/* -*- 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 "authfallbackdlg.hxx"
+
+#include 
+#include 
+
+using namespace boost;
+
+AuthFallbackDlg::AuthFallbackDlg( Window* pParent ) :
+ModalDialog( pParent, "AuthFallbackDlg", "uui/ui/authfallback.ui" )
+{
+get( m_pTVInstructions, "instructions" );
+get( m_pEDUrl, "url" );
+get( m_pEDCode, "code" );
+get( m_pBTOk, "ok" );
+get( m_pBTCancel, "cancel" );
+
+m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) );
+m_pBTOk->Enable( false );
+}
+
+AuthFallbackDlg::AuthFallbackDlg( Window* pParent, 
+const OUString& instructions,
+const OUString& url ) :
+ModalDialog( pParent, "AuthFallbackDlg", "uui/ui/authfallback.ui" )
+{
+get( m_pTVInstructions, "instructions" );
+get( m_pEDUrl, "url" );
+get( m_pEDCode, "code" );
+get( m_pBTOk, "ok" );
+get( m_pBTCancel, "cancel" );
+
+m_pBTOk->SetClickHdl( LINK( this, AuthFallbackDlg, OKHdl) );
+m_pBTCancel->SetClickHdl( LINK( this, AuthFallbackDlg, CancelHdl) );
+m_pBTOk->Enable( true );
+
+m_pTVInstructions->SetText( instructions );
+m_pEDUrl->SetText( url );
+}
+
+AuthFallbackDlg::~AuthFallbackDlg( )
+{
+}
+
+IMPL_LINK ( AuthFallbackDlg,  OKHdl, Button *, EMPTYARG )
+{
+EndDialog( RET_OK );
+return 1;
+}
+
+IMPL_LINK ( AuthFallbackDlg,  CancelHdl, Button *, EMPTYARG )
+{
+EndDialog( RET_CANCEL );
+return 0;
+}
diff --git a/uui/source/authfallbackdlg.hxx b/uui/source/authfallbackdlg.hxx
new file mode 100644
index 000..d068f48
--- /dev/null
+++ b/uui/source/authfallbackdlg.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
+#define INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
+
+#include 
+#include 
+#include 
+#include 
+
+
+class AuthFallbackDlg : public ModalDialog
+{
+private :
+
+VclMultiLineEdit* m_pTVInstructions;
+Edit* m_pEDUrl;
+Edit* m_pEDCode;
+PushButton* m_pBTOk;
+PushButton* m_pBTCancel;
+
+public :
+
+ AuthFallbackDlg( Window* pParent);
+ AuthFallbackDlg(Window* pParent, const OUString& instructions,
+ const OUString& url );
+ virtual ~AuthFallbackDlg();
+
+OUString GetCode() { return m_pEDCode->GetText(); }
+
+private:
+
+DECL_LINK ( OKHdl, Button * );
+DECL_LINK ( CancelHdl, Button * );
+};
+
+#endif // INCLUDED_SVTOOLS_AUTHFALLBACKDLG_HXX
diff --git a/uui/uiconfig/ui/authfallback.ui b/uui/uiconfig/ui/authfallback.ui
new file mode 100644
index 000..6e79a4c
--- /dev/null
+++ b/uui/uiconfig/ui/authfallback.ui
@@ -0,0 +1,96 @@
+
+
+  
+  
+False
+OneDrive authentication 
code
+400
+270
+
+  
+True
+False
+vertical
+
+  
+True
+False
+4
+False
+False
+  
+  
+False
+True
+0
+  
+
+
+  
+True
+False
+●
+False
+  
+  
+False
+True
+1
+  
+
+
+  
+True
+False

[Bug 65675] LibreOffice 4.2 most annoying bugs

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

a07cd040897db54e1...@spambog.com changed:

   What|Removed |Added

 Depends on||76389

--- Comment #195 from a07cd040897db54e1...@spambog.com ---
Added 76389:
AutoFilter not hilighted after loading a file with AutoFilter set.

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


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

a07cd040897db54e1...@spambog.com changed:

   What|Removed |Added

 Depends on||77479

--- Comment #196 from a07cd040897db54e1...@spambog.com ---
Added 77479:
AutoFilter lost after sorting

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


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - offapi/com offapi/UnoApi_offapi.mk

2014-07-31 Thread Mihai Varga
 offapi/UnoApi_offapi.mk   |1 
 offapi/com/sun/star/ucb/AuthenticationFallbackRequest.idl |   45 ++
 2 files changed, 46 insertions(+)

New commits:
commit 3a8d12b771146b37c4548e4dd08794d8c9c3
Author: Mihai Varga 
Date:   Thu Jul 31 11:20:37 2014 +0300

IDL definition for the auth fallback request

Change-Id: Id47bf660c44e2df54c21b9b945b4be57799e4ec6

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 364581d..e720630 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -3798,6 +3798,7 @@ $(eval $(call 
gb_UnoApi_add_idlfiles,offapi,com/sun/star/text,\
 $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/ucb,\
AlreadyInitializedException \
AuthenticationRequest \
+   AuthenticationFallbackRequest \
CheckinArgument \
CertificateValidationRequest \
Command \
diff --git a/offapi/com/sun/star/ucb/AuthenticationFallbackRequest.idl 
b/offapi/com/sun/star/ucb/AuthenticationFallbackRequest.idl
new file mode 100644
index 000..b7fa8d8
--- /dev/null
+++ b/offapi/com/sun/star/ucb/AuthenticationFallbackRequest.idl
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_ucb_AuthenticationFallbackRequest_idl__
+#define __com_sun_star_ucb_AuthenticationFallbackRequest_idl__
+
+#include 
+
+
+module com { module sun { module star { module ucb {
+
+/** An interaction continuation handing back some authentication data.
+*/
+published exception AuthenticationFallbackRequest: 
com::sun::star::task::ClassifiedInteractionRequest
+{
+/** Instructions to be followed by the user
+*/
+string instructions;
+
+/** url to be opened in browser
+*/
+string url;
+};
+
+
+}; }; }; };
+
+#endif
+
+/* 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 'feature/gsoc14-libcmis2' - include/ucbhelper ucbhelper/Library_ucbhelper.mk ucbhelper/source

2014-07-31 Thread Mihai Varga
 include/ucbhelper/authenticationfallback.hxx |   62 +++
 ucbhelper/Library_ucbhelper.mk   |1 
 ucbhelper/source/provider/authenticationfallback.cxx |   45 +
 3 files changed, 108 insertions(+)

New commits:
commit 07f01a61b6e56feb6382600cb72f0a68462ef3be
Author: Mihai Varga 
Date:   Thu Jul 31 11:33:02 2014 +0300

Authentication fallback request for the OneDrive connection

diff --git a/include/ucbhelper/authenticationfallback.hxx 
b/include/ucbhelper/authenticationfallback.hxx
new file mode 100644
index 000..c73383a
--- /dev/null
+++ b/include/ucbhelper/authenticationfallback.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_UCBHELPER_AUTHENTICATIONFALLBACK_HXX
+#define INCLUDED_UCBHELPER_AUTHENTICATIONFALLBACK_HXX
+
+#include 
+#include 
+#include 
+#include 
+
+
+namespace ucbhelper {
+
+/**
+  * This class implements a simple authentication interaction request used
+  * when programmatically authentication cannot succeed.
+  *
+  * Read-only values : instructions, url
+  * Read-write values: code
+  */
+class UCBHELPER_DLLPUBLIC AuthenticationFallbackRequest : public 
ucbhelper::InteractionRequest
+{
+private:
+rtl::Reference< ucbhelper::InteractionAuthFallback > m_xAuthFallback; 
+
+public:
+/**
+  * Constructor.
+  *
+  * @param rInstructions instructions to be followed by the user
+  * @param rURL contains a URL for which authentication is requested.
+  */
+AuthenticationFallbackRequest( const OUString & rInstructions,
+ const OUString & rURL );
+
+const rtl::Reference< ucbhelper::InteractionAuthFallback >&
+getAuthFallbackInter( ) const { return m_xAuthFallback; } 
+
+};
+
+} // namespace ucbhelper
+
+#endif /* ! INCLUDED_UCBHELPER_AUTHENTICATIONFALLBACK_HXX*/
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/Library_ucbhelper.mk b/ucbhelper/Library_ucbhelper.mk
index 8d1d805..6787db1 100644
--- a/ucbhelper/Library_ucbhelper.mk
+++ b/ucbhelper/Library_ucbhelper.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\
 ucbhelper/source/client/fileidentifierconverter \
 ucbhelper/source/client/interceptedinteraction \
 ucbhelper/source/client/proxydecider \
+   ucbhelper/source/provider/authenticationfallback \
 ucbhelper/source/provider/cancelcommandexecution \
 ucbhelper/source/provider/contenthelper \
 ucbhelper/source/provider/contentidentifier \
diff --git a/ucbhelper/source/provider/authenticationfallback.cxx 
b/ucbhelper/source/provider/authenticationfallback.cxx
new file mode 100644
index 000..7f47b09
--- /dev/null
+++ b/ucbhelper/source/provider/authenticationfallback.cxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+using namespace com::sun::star;
+using namespace ucbhelper;
+
+AuthenticationFallbackRequest::AuthenticationFallbackRequest(
+  const OUString & rInstructions,
+  const OUString & rURL )
+{
+
+ucb::AuthenticationFallbackRequest aRequest;
+aRequest.instructions = rInstructions;
+aRequest.url = rURL;
+

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

2014-07-31 Thread Noel Grandin
 
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
 |   52 +++---
 1 file changed, 16 insertions(+), 36 deletions(-)

New commits:
commit 7f9732e998e6e90cafa8bd36886af5e8bc7a71a1
Author: Noel Grandin 
Date:   Thu Jul 31 10:38:38 2014 +0200

remove commented out code

and fix up some formatting

Change-Id: I8d24c66901eeaf8a6c7aa5e797821c807edaf6ee

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
index 1bf160d..76b0792 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
@@ -31,14 +31,7 @@ import java.io.*;
  */
 public final class ConverterInfoMgr {
 
-private static ArrayList converterInfoList;
-
-   /**
-*  Constructor
-*/
-static {
-   converterInfoList = new ArrayList();
-}
+private static final ArrayList converterInfoList = new 
ArrayList();
 
/**
 *  Adds a converter plug-in to the registry.  The
@@ -137,24 +130,12 @@ public final class ConverterInfoMgr {
 */
public static boolean removeByJar(String jar) {
 
-ConverterInfo converterInfo;
 boolean   rc = false;
 
-// FIX (HJ): Has to use an iterator, since we are removing items
-/*Enumeration ciEnum = converterInfoList.elements();
-while (ciEnum.hasMoreElements())
-{
-converterInfo = (ConverterInfo)ciEnum.nextElement();
-if (jar.equals(converterInfo.getJarName())) {
-   converterInfoList.remove(converterInfo);
-   rc = true;
-}
-}*/
-
 Iterator ciIter = converterInfoList.iterator();
 while (ciIter.hasNext())
 {
-converterInfo = ciIter.next();
+ConverterInfo converterInfo = ciIter.next();
 if (jar.equals(converterInfo.getJarName())) {
ciIter.remove();
rc = true;
@@ -215,7 +196,7 @@ public final class ConverterInfoMgr {
 String fromDeviceInfo = fromEnum.next();
 if (deviceMime.trim().equals(fromDeviceInfo) &&
 officeMime.trim().equals(toDeviceInfo)) {
-   return (converterInfo);
+   return converterInfo;
 }
 }
 }
@@ -279,8 +260,7 @@ public final class ConverterInfoMgr {
 fromOfficeInfo.equals(toOfficeInfo)) {
 
 // Found a match
-
-return (converterInfo);
+return converterInfo;
 }
 }
 }
@@ -299,7 +279,7 @@ public final class ConverterInfoMgr {
 public static void main(String args[]) {
 
 ConverterInfoReader cir = null;
-boolean validate = false;
+boolean validate = false;
 InputStreamReader   isr = new InputStreamReader(System.in);
 BufferedReader  br  = new BufferedReader(isr);
 charc   = ' ';
@@ -314,7 +294,7 @@ public final class ConverterInfoMgr {
 System.out.println("(F)ind ConverterInfo");
 System.out.println("(C)ind ConverterInfo chain");
 System.out.println("(V)iew plug-ins");
-System.out.println("(T)oggle Validation");
+System.out.println("(T)oggle Validation");
 System.out.println("(Q)uit\n");
 
 try {
@@ -360,14 +340,14 @@ public final class ConverterInfoMgr {
 
 // Unload by Display Name or Jarfile
 
-} else if (c == 'T') {
-if (validate== true){
-System.out.println("Validation switched off");
-validate=false;
-}else{
-System.out.println("Validation switched on");
-validate=true;
-}
+} else if (c == 'T') {
+if (validate== true){
+System.out.println("Validation switched off");
+validate=false;
+} else {
+System.out.println("Validation switched on");
+validate=true;
+}
 } else if (c == 'D' || c == 'J') {
 
 if (c == 'D') {
@@ -483,8 +463,8 @@ public final class ConverterInfoMgr {
 System.out.println("Vendor   : " + 
converterInfo.getVendor());
 System.out.println("ClassImpl: " + 
converterInfo.getClassImpl());
 System.out.println("XsltSerial   : " + 
converterInfo.getXsltSerial());
-System.out.println("XsltDeserial : " + 
converterInfo.getXsltDeserial());
-System.out.println("Serialize: " + 
converterInfo.canSerialize());
+

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - uui/source

2014-07-31 Thread Mihai Varga
 uui/source/iahndl-authentication.cxx |   23 +++
 uui/source/iahndl.cxx|9 +
 uui/source/iahndl.hxx|6 ++
 3 files changed, 38 insertions(+)

New commits:
commit cb4734178ef0223903426e9e0fd8587f5886b8df
Author: Mihai Varga 
Date:   Thu Jul 31 11:41:20 2014 +0300

OneDrive authentication fallback request handler

Change-Id: I136912073582c29f68b25787b69f7cc117fb4a6a

diff --git a/uui/source/iahndl-authentication.cxx 
b/uui/source/iahndl-authentication.cxx
index fbb1dba..b2876c4 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -39,6 +40,7 @@
 #include 
 #include 
 
+#include "authfallbackdlg.hxx"
 #include "ids.hrc"
 #include "getcontinuations.hxx"
 #include "passwordcontainer.hxx"
@@ -744,4 +746,25 @@ UUIInteractionHelper::handlePasswordRequest(
 return false;
 }
 
+bool
+UUIInteractionHelper::handleAuthFallbackRequest( OUString & instructions,
+OUString & url,
+uno::Sequence< uno::Reference< task::XInteractionContinuation > > 
const & rContinuations )
+{
+Window * pParent = getParentProperty( );
+AuthFallbackDlg *dlg = new AuthFallbackDlg( pParent, instructions, url );
+int retCode = dlg->Execute( );
+uno::Reference< task::XInteractionAbort > xAbort;
+uno::Reference< ucb::XInteractionAuthFallback > xAuthFallback;
+getContinuations(rContinuations, &xAbort, &xAuthFallback);
+
+if( retCode == RET_OK && xAuthFallback.is( ) )
+{
+xAuthFallback->setCode( dlg->GetCode( ) );
+xAuthFallback->select( );
+}
+
+return true;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index d80904b..694c602 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -42,6 +42,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -829,6 +830,14 @@ UUIInteractionHelper::handleRequest_impl(
 
 if (!bObtainErrorStringOnly)
 {
+ucb::AuthenticationFallbackRequest anAuthFallbackRequest;
+if ( aAnyRequest >>= anAuthFallbackRequest )
+{
+handleAuthFallbackRequest( anAuthFallbackRequest.instructions,
+anAuthFallbackRequest.url, 
rRequest->getContinuations() );
+return true;
+}
+
 if ( handleAuthenticationRequest( rRequest ) )
 return true;
 
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index efbee64..164c263 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -295,6 +295,12 @@ private:
 const ::com::sun::star::uno::Reference< 
::com::sun::star::task::XInteractionRequest >& i_rRequest,
 const OUString& i_rServiceName
 ) const;
+
+bool
+handleAuthFallbackRequest(
+OUString & instructions,
+OUString & url,
+Continuations  const & rContinuations );
 };
 
 class ErrorResource: private Resource
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] osl_areCommandArgsSet

2014-07-31 Thread Stephan Bergmann
* osl_areCommandArgsSet should arguably have been given a return type of 
sal_Bool, not int


* the documentation of osl_areCommandArgsSet is missing a @since tag; 
please fix


* given that osl_setCommandArgs is deprecated and for internal use only, 
osl_areCommandArgsSet should arguably have been added as internal-only 
functionality ("detail" identifier namespace, "PRIVATE_" ELF symbol map 
namespace); please at least mark it as internal-only in the documentation


* the implementations of osl_areCommandArgsSet 
(sal/osl/unx/process_impl.cxx, sal/osl/w32/process.cxx) are broken as 
they access g_command_args.m_nCount without the corresponding mutex 
locked; please fix


* the design of osl_areCommandArgsSet and its use in 
desktop/source/lib/init.cxx are broken, as it is prone to TOCTOU


* adding osl_areCommandArgsSet was unnecessary; given that 
osl_setCommandArgs(0,NULL) is already handled as a special case, that 
case can be extended to silently do nothing if osl_setCommandArgs has 
already been called previously; please fix the LOK use-case that way


* "and possibly if UNO is being used in addition to LOK in an external 
program": by design, osl_setCommandsArgs is exclusively called from 
sal_detail_initialize, which in turn is exclusively called form 
SAL_IMPLEMENT_MAIN[_WITH_ARGS], and every process that uses binary UNO 
needs to implement main via those macros; note that 
sal_detail_[de]initialize potentially does further things necessary for 
binary UNO to work properly besides calling osl_setCommandArgs; it is 
unwise to hack around that for the LOK use-case in an ad hoc way


* was it necessary to backport osl_areCommandArgsSet to LO 4.3 (given I 
see no mention of LOK in 
)?


Stephan

On 07/10/2014 08:17 PM, Andrzej Hunt wrote:

Rebased ref, commits from common ancestor:
commit aef3fcd39558e424b816e5eb07a9421ab046ff0f
Author: Andrzej Hunt 
Date:   Thu Jul 10 12:19:36 2014 +0200

 Check whether Command Args are already set up before doing so.

 Could already be set up e.g. if a client application is using UNO
 separately, in addition to LOK.

 Change-Id: I50c3230b6f2456360273902a308c303576baac10

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index e1931b5..520d7ca 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -607,7 +607,14 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath)

  try
  {
-osl_setCommandArgs(0, NULL);
+// If we've set up the command args elsewhere then we cannot do it
+// again (as an assert will fire), this will be the case e.g.
+// for unit tests (and possibly if UNO is being used in addition
+// to LOK in an external program).
+if (!osl_areCommandArgsSet())
+{
+osl_setCommandArgs(0, NULL);
+}
  initialize_uno(aAppURL);
  force_c_locale();

commit 91e852a36d57e514dd4b1fb5421e9e5e19172ea4
Author: Andrzej Hunt 
Date:   Thu Jul 10 12:17:05 2014 +0200

 Introduce osl_areCommandArgsSet.

 We cannot call osl_setCommandArgs twice, however there is currently
 no way to determine whether or not this has already been done. This is
 necessary e.g. for LibreOfficeKit where we may also be using UNO
 separately (and also for unit tests where LO is already set-up prior
 to the unit test running, and therefore we can't set up osl again
 from within LOK).

 Change-Id: Id1f357ef604eb2b6b7814c9a04ac6933a39fd3eb

diff --git a/include/osl/process.h b/include/osl/process.h
index 7d0960e..1a9a416 100644
--- a/include/osl/process.h
+++ b/include/osl/process.h
@@ -366,6 +366,11 @@ SAL_DLLPUBLIC sal_uInt32 SAL_CALL 
osl_getCommandArgCount(void);
  SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getCommandArg(
  sal_uInt32 nArg, rtl_uString **strCommandArg);

+/** Determine whether or not the command args have already been set.
+@return The command args are already set, and may not be set again.
+*/
+SAL_DLLPUBLIC int SAL_CALL osl_areCommandArgsSet ();
+
  /** Set the command-line arguments as passed to the main-function of this 
process.

  Deprecated: This function is only for internal use. Passing the args from 
main will
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index d28f46d..b63f222 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -191,6 +191,11 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 
nArg, rtl_uString ** strC
  return (result);
  }

+int SAL_CALL osl_areCommandArgsSet (void)
+{
+return (g_command_args.m_nCount > 0);
+}
+
  /***
   osl_setCommandArgs().
   **/
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 3dd0e77..25f4e58 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -374,6 +374,12 @@ oslProcessError SAL_

[Libreoffice-commits] core.git: Branch 'feature/gsoc14-colors' - include/svx svx/source

2014-07-31 Thread Krisztian Pinter
 include/svx/Palette.hxx |3 ++-
 svx/source/tbxctrls/Palette.cxx |   19 +--
 2 files changed, 15 insertions(+), 7 deletions(-)

New commits:
commit 771b951a806d956c2ae2dc7b64cb6e15f4839630
Author: Krisztian Pinter 
Date:   Thu Jul 31 10:56:58 2014 +0200

Make .soc loading lazy

Change-Id: If7475d6c46faaa6f6f6cde494990e6573b3aadff

diff --git a/include/svx/Palette.hxx b/include/svx/Palette.hxx
index 2be4eb2..11a3462 100644
--- a/include/svx/Palette.hxx
+++ b/include/svx/Palette.hxx
@@ -65,7 +65,8 @@ public:
 
 class PaletteSOC : public Palette
 {
-//TODO add lazy loading
+boolmbLoadedPalette;
+OUStringmaFPath;
 OUStringmaName;
 XColorListRef   mpColorList;
 public:
diff --git a/svx/source/tbxctrls/Palette.cxx b/svx/source/tbxctrls/Palette.cxx
index 95ebb58..496e0fc 100644
--- a/svx/source/tbxctrls/Palette.cxx
+++ b/svx/source/tbxctrls/Palette.cxx
@@ -173,11 +173,11 @@ OString lcl_getToken(const OString& rStr, sal_Int32& 
index)
 
 // PaletteSOC 
--
 
-PaletteSOC::PaletteSOC( const OUString &rFPath, const OUString &rFName )
+PaletteSOC::PaletteSOC( const OUString &rFPath, const OUString &rFName ) :
+mbLoadedPalette( false ),
+maFPath( rFPath ),
+maName( rFName )
 {
-maName = rFName;
-mpColorList = 
XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(XCOLOR_LIST,
 rFPath));
-mpColorList->Load();
 }
 
 PaletteSOC::~PaletteSOC()
@@ -191,13 +191,20 @@ const OUString& PaletteSOC::GetName()
 
 void PaletteSOC::LoadColorSet( SvxColorValueSet& rColorSet )
 {
+if( !mbLoadedPalette )
+{
+mbLoadedPalette = true;
+mpColorList = 
XPropertyList::AsColorList(XPropertyList::CreatePropertyListFromURL(XCOLOR_LIST,
 maFPath));
+mpColorList->Load();
+}
 rColorSet.Clear();
-rColorSet.addEntriesForXColorList( *mpColorList );
+if( mpColorList.is() )
+rColorSet.addEntriesForXColorList( *mpColorList );
 }
 
 bool PaletteSOC::IsValid()
 {
-return mpColorList.is();
+return true;
 }
 
 /* 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: sw/qa sw/source

2014-07-31 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/2-id.docx   |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |9 +
 sw/source/filter/ww8/docxattributeoutput.cxx  |2 +-
 3 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 48f52a509aeed8c8a780bf07d3761a7699e8a36b
Author: Miklos Vajna 
Date:   Thu Jul 31 10:50:44 2014 +0200

DocxAttributeOutput::WriteSdtBlock: never write  twice

Change-Id: Iab68a4e809a7924e753db5a85d9914308419b845

diff --git a/sw/qa/extras/ooxmlexport/data/2-id.docx 
b/sw/qa/extras/ooxmlexport/data/2-id.docx
new file mode 100644
index 000..6d05e68
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/2-id.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 76cb592..1e0b98d 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -532,6 +532,15 @@ DECLARE_OOXMLEXPORT_TEST(testSdt2Run, "sdt-2-para.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_TEST(test2Id, "2-id.docx")
+{
+if (xmlDocPtr pXmlDoc = parseExport())
+{
+// This was 2, but only one w:id is allowed.
+assertXPath(pXmlDoc, "//w:sdtPr/w:id", 1);
+}
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9078f8b..c66a6ea 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -612,7 +612,7 @@ void DocxAttributeOutput::WriteSdtBlock( sal_Int32& 
nSdtPrToken,
 
 m_pSerializer->endElement( nSdtPrToken );
 }
-else if( (nSdtPrToken > 0) && !(m_bRunTextIsOn && 
m_rExport.SdrExporter().IsParagraphHasDrawing()))
+else if( (nSdtPrToken > 0) && nSdtPrToken != FSNS( XML_w, XML_id ) && 
!(m_bRunTextIsOn && m_rExport.SdrExporter().IsParagraphHasDrawing()))
 m_pSerializer->singleElement( nSdtPrToken, FSEND );
 
 if( nSdtPrToken == FSNS( XML_w, XML_id ) || ( bPara && 
m_bParagraphSdtHasId ) )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - ucb/source

2014-07-31 Thread Mihai Varga
 ucb/source/ucp/cmis/auth_provider.cxx |   48 ++
 ucb/source/ucp/cmis/auth_provider.hxx |   11 ++
 ucb/source/ucp/cmis/cmis_content.cxx  |4 ++
 ucb/source/ucp/cmis/cmis_repo_content.cxx |4 ++
 4 files changed, 67 insertions(+)

New commits:
commit dad477120de1201e34a06f30c8bd800d79b831c2
Author: Mihai Varga 
Date:   Thu Jul 31 12:07:56 2014 +0300

OnDrive authfallback request is now issued

diff --git a/ucb/source/ucp/cmis/auth_provider.cxx 
b/ucb/source/ucp/cmis/auth_provider.cxx
index bd00986..63e742f 100644
--- a/ucb/source/ucp/cmis/auth_provider.cxx
+++ b/ucb/source/ucp/cmis/auth_provider.cxx
@@ -13,6 +13,7 @@
 #include 
 
 #include 
+#include 
 
 #include "auth_provider.hxx"
 
@@ -21,6 +22,8 @@ using namespace std;
 
 namespace cmis
 {
+com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment> 
+AuthProvider::sm_xEnv;
 bool AuthProvider::authenticationQuery( string& username, string& password 
)
 {
 if ( m_xEnv.is() )
@@ -62,6 +65,51 @@ namespace cmis
 }
 return false;
 }
+
+char* AuthProvider::onedriveAuthCodeFallback( const char* url,
+const char* /*username*/,
+const char* /*password*/ )
+{
+OUString instructions = "Please open the following link in your 
browser and\n"
+"paste the code from the URL you have been redirected to\n"
+"in the box bellow. For example:\n"
+
"https://login.live.com/oauth20_desktop.srf?code=YOUR_CODE&lc=1033";;
+OUString url_oustr( url, strlen( url ), RTL_TEXTENCODING_UTF8 );
+const com::sun::star::uno::Reference< 
+com::sun::star::ucb::XCommandEnvironment> xEnv = getXEnv( );
+
+if ( xEnv.is() )
+{
+uno::Reference< task::XInteractionHandler > xIH
+= xEnv->getInteractionHandler();
+
+if ( xIH.is() )
+{
+rtl::Reference< ucbhelper::AuthenticationFallbackRequest > 
xRequest
+= new ucbhelper::AuthenticationFallbackRequest (
+instructions, url_oustr );
+
+xIH->handle( xRequest.get() );
+
+rtl::Reference< ucbhelper::InteractionContinuation > xSelection
+= xRequest->getSelection();
+
+if ( xSelection.is() )
+{
+// Handler handled the request.
+const rtl::Reference< ucbhelper::InteractionAuthFallback >&
+xAuthFallback = xRequest->getAuthFallbackInter( );
+if ( xAuthFallback.is() )
+{
+OUString code = xAuthFallback->getCode( );
+return strdup( OUSTR_TO_STDSTR( code ).c_str( ) );
+}
+}
+}
+}
+
+return strdup( "" );
+}
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucb/source/ucp/cmis/auth_provider.hxx 
b/ucb/source/ucp/cmis/auth_provider.hxx
index f36d9a7..9fbf599 100644
--- a/ucb/source/ucp/cmis/auth_provider.hxx
+++ b/ucb/source/ucp/cmis/auth_provider.hxx
@@ -18,6 +18,7 @@ namespace cmis
 class AuthProvider : public libcmis::AuthProvider
 {
 const com::sun::star::uno::Reference< 
com::sun::star::ucb::XCommandEnvironment>& m_xEnv;
+static com::sun::star::uno::Reference< 
com::sun::star::ucb::XCommandEnvironment> sm_xEnv;
 OUString m_sUrl;
 OUString m_sBindingUrl;
 
@@ -29,6 +30,16 @@ namespace cmis
 m_xEnv( xEnv ), m_sUrl( sUrl ), m_sBindingUrl( sBindingUrl ) { 
}
 
 bool authenticationQuery( std::string& username, std::string& 
password ) SAL_OVERRIDE;
+
+static char* onedriveAuthCodeFallback( const char* url,
+const char* /*username*/,
+const char* /*password*/ );
+
+static void setXEnv( const com::sun::star::uno::Reference<
+com::sun::star::ucb::XCommandEnvironment>& xEnv ) { 
sm_xEnv = xEnv; }
+
+static com::sun::star::uno::Reference< 
+com::sun::star::ucb::XCommandEnvironment> getXEnv( ) { return 
sm_xEnv; }
 };
 }
 
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 29d43c3..15c3ec9 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -334,6 +334,7 @@ namespace cmis
 
 // Get the auth credentials
 AuthProvider authProvider( xEnv, 
m_xIdentifier->getContentIdentifier( ), m_aURL.getBindingUrl( ) );
+AuthProvider::setXEnv( xEnv );
 
 string rUsername = OUSTR_TO_STDSTR( m_aURL.getUsername( ) );
 string rPassword = OUSTR_TO_STDSTR( m_aURL.getPassword( ) );
@@ -352,10 +353,13 @@ namespace cmis
 ALFRESCO_CLOUD_SCOPE, ALFRESCO_CLOUD_REDIRECT_URI,
  

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

2014-07-31 Thread Andrzej Hunt
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 62da1a834128f5762fa2e6ceb35fa61372ed5949
Author: Andrzej Hunt 
Date:   Thu Jul 31 11:26:59 2014 +0200

GtkComboBoxText requires gtk >= 2.24 (again).

Broken in 77d083130948fa35f9f404656b8c170060e78043.

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 9a40325..112e03e 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -27,7 +27,11 @@ static int help()
 static GtkWidget* pDocView;
 static GtkWidget* pDocViewQuad;
 static GtkWidget* pVBox;
+// GtkComboBox requires gtk 2.24 or later
+#if ( GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION >= 24 ) || GTK_MAJOR_VERSION 
> 2
 static GtkComboBoxText* pPartSelector;
+#endif
+
 static LibreOfficeKit* pOffice;
 static char* pFileName;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread Noel Grandin
 editeng/source/xml/xmltxtexp.cxx |2 -
 include/svx/unoapi.hxx   |7 +++---
 include/xmloff/xmlexp.hxx|3 +-
 include/xmloff/xmluconv.hxx  |   12 ++
 reportdesign/source/filter/xml/xmlExport.cxx |4 +--
 sc/source/filter/xml/xmlexprt.cxx|4 +--
 sc/source/filter/xml/xmlexprt.hxx|2 -
 sd/source/ui/unoidl/UnoDocumentSettings.cxx  |6 ++---
 sd/source/ui/unoidl/unomodel.cxx |2 -
 svx/source/unodraw/unoprov.cxx   |6 ++---
 svx/source/xml/xmlxtexp.cxx  |2 -
 sw/inc/swmodule.hxx  |2 -
 sw/source/uibase/app/swmodul1.cxx|4 +--
 sw/source/uibase/inc/unomod.hxx  |4 +--
 sw/source/uibase/uno/unomod.cxx  |   30 +--
 xmloff/source/core/xmlexp.cxx|2 -
 xmloff/source/core/xmluconv.cxx  |   16 +-
 17 files changed, 59 insertions(+), 49 deletions(-)

New commits:
commit 7e0e581c162a8836034a47e84d28a638e9aa9744
Author: Noel Grandin 
Date:   Thu Jul 31 10:19:33 2014 +0200

cleanup usage of MapUnit enum

some places were using the wrong enum constant, and some places were
unnnecessarily converting to sal_Int16

Change-Id: I754993533c840cd33106820d99af2dc951f26a80

diff --git a/include/svx/unoapi.hxx b/include/svx/unoapi.hxx
index 07330ac..076f629 100644
--- a/include/svx/unoapi.hxx
+++ b/include/svx/unoapi.hxx
@@ -63,7 +63,7 @@ SvxNumBulletItem* SvxGetNumBulletItemByName( SfxItemPool* 
pPool, const OUString&
  * Maps the vcl MapUnit enum to a API constant MeasureUnit.
  * Returns false if conversion is not supported.
  */
-SVX_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const short nVcl, short& eApi ) 
throw();
+SVX_DLLPUBLIC bool SvxMapUnitToMeasureUnit( const MapUnit nVcl, short& eApi ) 
throw();
 
 /**
  * Maps the API constant MeasureUnit to a vcl MapUnit enum.
diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index 63216fe..25ef7fc 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -39,6 +39,7 @@
 
 #include 
 #include 
+#include 
 
 
 // predeclarations
@@ -92,18 +93,18 @@ public:
 SvXMLUnitConverter(
 const ::com::sun::star::uno::Reference<
 ::com::sun::star::uno::XComponentContext >& xContext,
-sal_Int16 eCoreMeasureUnit,
-sal_Int16 eXMLMeasureUnit);
+sal_Int16 eCoreMeasureUnit /*css::util::MeasureUnit*/,
+sal_Int16 eXMLMeasureUnit /*css::util::MeasureUnit*/);
 
 virtual ~SvXMLUnitConverter();
 
 static sal_Int16 GetMeasureUnit(FieldUnit const nFieldUnit);
 
 /** sets the default unit for numerical measures */
-void SetCoreMeasureUnit( sal_Int16 const eCoreMeasureUnit );
+void SetCoreMeasureUnit( sal_Int16 const eCoreMeasureUnit 
/*css::util::MeasureUnit*/);
 
 /** sets the default unit for textual measures */
-void SetXMLMeasureUnit( sal_Int16 const eXMLMeasureUnit );
+void SetXMLMeasureUnit( sal_Int16 const eXMLMeasureUnit 
/*css::util::MeasureUnit*/);
 
 /** gets the default unit for textual measures */
 sal_Int16 GetXMLMeasureUnit() const;
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx 
b/reportdesign/source/filter/xml/xmlExport.cxx
index ffcf047..b200d0b 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -217,8 +217,8 @@ ORptExport::ORptExport(const Reference< XComponentContext 
>& _rxContext, OUStrin
 ,m_bAllreadyFilled(false)
 {
 setExportFlags( EXPORT_OASIS | nExportFlag);
-GetMM100UnitConverter().SetCoreMeasureUnit(MAP_100TH_MM);
-GetMM100UnitConverter().SetXMLMeasureUnit(MAP_CM);
+
GetMM100UnitConverter().SetCoreMeasureUnit(css::util::MeasureUnit::MM_100TH);
+GetMM100UnitConverter().SetXMLMeasureUnit(css::util::MeasureUnit::CM);
 
 // (getExportFlags() & EXPORT_CONTENT) != 0 ? : XML_N_OOO
 _GetNamespaceMap().Add( GetXMLToken(XML_NP_OFFICE), 
GetXMLToken(XML_N_OFFICE ), XML_NAMESPACE_OFFICE );
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 6c1661b..82281dd 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1316,7 +1316,7 @@ uno::Any SAL_CALL SdXImpressDocument::getPropertyValue( 
const OUString& Property
 break;
 
 sal_Int16 nMeasureUnit = 0;
-SvxMapUnitToMeasureUnit( (const 
short)pEmbeddedObj->GetMapUnit(), nMeasureUnit );
+SvxMapUnitToMeasureUnit( pEmbeddedObj->GetMapUnit(), 
nMeasureUnit );
 aAny <<= (sal_Int16)nMeasureUnit;
 }
 break;
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 7358264..8d0cc2b 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -1008,7 +1008,7 @@ sal_Bool SvxMeasureUnitToMap

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

2014-07-31 Thread rbuj
 
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
 |   15 --
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 56739cf7ae7d697aba4daad0b3eb66cbd6b35af2
Author: rbuj 
Date:   Wed Jul 30 14:13:01 2014 +0200

xmerge: Avoid java.util.ConcurrentModificationException

Fix removeByName function, which deletes elements of the list without an 
iterator.

Move declarations inside the for loop in the removeByJar function, and 
delete the comment about removing list elements.

Change-Id: I6a9ba82af2999703d1447c5c0bc5800ec4367b65

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
index 76b0792..adf2be9 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
@@ -132,13 +132,11 @@ public final class ConverterInfoMgr {
 
 boolean   rc = false;
 
-Iterator ciIter = converterInfoList.iterator();
-while (ciIter.hasNext())
-{
-ConverterInfo converterInfo = ciIter.next();
+for (Iterator it = converterInfoList.iterator(); 
it.hasNext();) {
+ConverterInfo converterInfo = it.next();
 if (jar.equals(converterInfo.getJarName())) {
-   ciIter.remove();
-   rc = true;
+it.remove();
+rc = true;
 }
 }
 return rc;
@@ -157,9 +155,10 @@ public final class ConverterInfoMgr {
 
 boolean   rc = false;
 
-for (ConverterInfo converterInfo : converterInfoList) {
+for (Iterator it = converterInfoList.iterator(); 
it.hasNext();) {
+ConverterInfo converterInfo = it.next();
 if (name.equals(converterInfo.getDisplayName())) {
-converterInfoList.remove(converterInfo);
+it.remove();
 rc = true;
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: [Libreoffice-commits] core.git: 7 commits - chart2/source extensions/source hwpfilter/source l10ntools/source sal/osl unoidl/source

2014-07-31 Thread Stephan Bergmann
Please refrain from such cosmetic changes in the future.  IIRC, the 
unoidl module (being mostly written by a single person, me) more-or-less 
consistently used a single formatting style until now.  I see no good 
reason to change that to another formatting style.


Stephan

On 07/10/2014 10:33 PM, Norbert Thiebaud wrote:

commit d4810a814c7c7f3db2df15b62367bd1edc7040f6
Author: Norbert Thiebaud 
Date:   Thu Jul 10 18:46:38 2014 +0200

 cosmetic 'en-passant'

 Change-Id: I9a787065898004ece4bd55839c563b7395e3a314

diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx
index 137d950..93cfc2d 100644
--- a/unoidl/source/unoidl-check.cxx
+++ b/unoidl/source/unoidl-check.cxx
@@ -27,9 +27,12 @@

  namespace unoidl {

-bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs) {
-if (lhs.type == rhs.type) {
-switch (lhs.type) {
+bool operator ==(ConstantValue const & lhs, ConstantValue const & rhs)
+{
+if (lhs.type == rhs.type)
+{
+switch (lhs.type)
+{
  case ConstantValue::TYPE_BOOLEAN:
  return lhs.booleanValue == rhs.booleanValue;
  case ConstantValue::TYPE_BYTE:
@@ -55,13 +58,13 @@ bool operator ==(ConstantValue const & lhs, ConstantValue const 
& rhs) {
  return false;
  }

-bool operator !=(ConstantValue const & lhs, ConstantValue const & rhs) {
+bool operator !=(ConstantValue const & lhs, ConstantValue const & rhs)
+{
  return !(lhs == rhs);
  }

-bool operator ==(
-SingleInterfaceBasedServiceEntity::Constructor::Parameter const & lhs,
-SingleInterfaceBasedServiceEntity::Constructor::Parameter const & rhs)
+bool operator ==( SingleInterfaceBasedServiceEntity::Constructor::Parameter const 
& lhs,
+  SingleInterfaceBasedServiceEntity::Constructor::Parameter const 
& rhs)
  {
  return lhs.name == rhs.name && lhs.type == rhs.type && lhs.rest == 
rhs.rest;
  }
@@ -70,12 +73,18 @@ bool operator ==(

  namespace {

-void badUsage() {
+void badUsage()
+{
  std::cerr
-<< "Usage:" << std::endl << std::endl
+<< "Usage:"
+<< std::endl
+<< std::endl
  << ("  unoidl-check []  -- []")
-<< std::endl << "" << std::endl << std::endl
+<< std::endl
+<< ""
+<< std::endl
+<< std::endl
  << ("where each  is either a new- or legacy-format .rdb 
file,"
  " a single .idl")
  << std::endl
@@ -87,11 +96,14 @@ void badUsage() {
  std::exit(EXIT_FAILURE);
  }

-OUString getArgumentUri(sal_uInt32 argument, bool * delimiter) {
+OUString getArgumentUri(sal_uInt32 argument, bool * delimiter)
+{
  OUString arg;
  rtl_getAppCommandArg(argument, &arg.pData);
-if (arg == "--") {
-if (delimiter == 0) {
+if (arg == "--")
+{
+if (delimiter == 0)
+{
  badUsage();
  }
  *delimiter = true;
@@ -99,15 +111,18 @@ OUString getArgumentUri(sal_uInt32 argument, bool * 
delimiter) {
  }
  OUString url;
  osl::FileBase::RC e1 = osl::FileBase::getFileURLFromSystemPath(arg, url);
-if (e1 != osl::FileBase::E_None) {
+if (e1 != osl::FileBase::E_None)
+{
  std::cerr
  << "Cannot convert \"" << arg << "\" to file URL, error code "
-<< +e1 << std::endl;
+<< +e1
+<< std::endl;
  std::exit(EXIT_FAILURE);
  }
  OUString cwd;
  oslProcessError e2 = osl_getProcessWorkingDir(&cwd.pData);
-if (e2 != osl_Process_E_None) {
+if (e2 != osl_Process_E_None)
+{
  std::cerr
  << "Cannot obtain working directory, error code " << +e2
  << std::endl;
@@ -115,19 +130,21 @@ OUString getArgumentUri(sal_uInt32 argument, bool * 
delimiter) {
  }
  OUString abs;
  e1 = osl::FileBase::getAbsoluteFileURL(cwd, url, abs);
-if (e1 != osl::FileBase::E_None) {
+if (e1 != osl::FileBase::E_None)
+{
  std::cerr
  << "Cannot make \"" << url
-<< "\" into an absolute file URL, error code " << +e1 << std::endl;
+<< "\" into an absolute file URL, error code " << +e1
+<< std::endl;
  std::exit(EXIT_FAILURE);
  }
  return abs;
  }

-OUString showDirection(
-unoidl::InterfaceTypeEntity::Method::Parameter::Direction direction)
+OUString showDirection( 
unoidl::InterfaceTypeEntity::Method::Parameter::Direction direction)
  {
-switch (direction) {
+switch (direction)
+{
  case unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_IN:
  return OUString("[in]");
  case unoidl::InterfaceTypeEntity::Method::Parameter::DIRECTION_OUT:
@@ -139,824 +156,828 @@ OUString showDirection(
  }
  }

-struct EqualsAnnotation {
+struct EqualsAnnotation
+{
  EqualsAnnotation(OUString const & name): name_(name) {}

  bool operator ()(unoidl::AnnotatedReference const & ref)
-{ return ref.name == name_; }
+   

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

2014-07-31 Thread Michael Stahl
 writerfilter/source/dmapper/StyleSheetTable.cxx |   25 ++--
 writerfilter/source/rtftok/rtfdocumentimpl.cxx  |4 +--
 2 files changed, 25 insertions(+), 4 deletions(-)

New commits:
commit b9b9fea12ed1d87d34f84f51574c10e2345d9ac7
Author: Michael Stahl 
Date:   Thu Jul 31 11:42:52 2014 +0200

writerfilter: fix ubsan complaints about "-42" enum value

Apparently the StyleType enum is specific to the domain-mapper, the
OOXML filter has integer constants in its model.xml file...

Also surprisingly the section styles only exist in RTF; w_ST_StyleType
in "ECMA-376 3rd Edition" only contains the 4 values of StyleType enum.

Change-Id: I5407800f801824676df309b3705e233cf1382721

diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx 
b/writerfilter/source/dmapper/StyleSheetTable.cxx
index 8f50037..7c698ef 100644
--- a/writerfilter/source/dmapper/StyleSheetTable.cxx
+++ b/writerfilter/source/dmapper/StyleSheetTable.cxx
@@ -427,7 +427,28 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
 {
 SAL_WARN_IF( m_pImpl->m_pCurrentEntry->nStyleTypeCode != 
STYLE_TYPE_UNKNOWN,
 "writerfilter", "Style type needs to be processed first" );
-StyleType nType = ( StyleType ) nIntValue;
+StyleType nType(STYLE_TYPE_UNKNOWN);
+switch (nIntValue)
+{
+case 1:
+nType = STYLE_TYPE_PARA;
+break;
+case 2:
+nType = STYLE_TYPE_CHAR;
+break;
+case 3:
+nType = STYLE_TYPE_TABLE;
+break;
+case 4:
+nType = STYLE_TYPE_LIST;
+break;
+default:
+SAL_WARN("writerfilter", "unknown LN_CT_Style_type " << 
nType);
+//fall-through
+case 0: // explicit unknown set by tokenizer
+break;
+
+}
 if ( nType == STYLE_TYPE_TABLE )
 {
 StyleSheetEntryPtr pEntry = m_pImpl->m_pCurrentEntry;
@@ -435,7 +456,7 @@ void StyleSheetTable::lcl_attribute(Id Name, Value & val)
 m_pImpl->m_pCurrentEntry = pTableEntry;
 }
 else
-m_pImpl->m_pCurrentEntry->nStyleTypeCode = 
(StyleType)nIntValue;
+m_pImpl->m_pCurrentEntry->nStyleTypeCode = nType;
 }
 break;
 case NS_ooxml::LN_CT_Style_default:
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx 
b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8ff911a..3bba4c4 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -3647,7 +3647,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 if (m_aStates.top().nDestinationState == DESTINATION_STYLESHEET || 
m_aStates.top().nDestinationState == DESTINATION_STYLEENTRY)
 {
 m_nCurrentStyleIndex = nParam;
-RTFValue::Pointer_t pValue(new RTFValue(-42)); // TODO no value in 
enum StyleType?
+RTFValue::Pointer_t pValue(new RTFValue(0)); // TODO no value in 
enum StyleType?
 m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type, 
pValue); // section style
 }
 break;
@@ -3655,7 +3655,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, 
int nParam)
 if (m_aStates.top().nDestinationState == DESTINATION_STYLESHEET || 
m_aStates.top().nDestinationState == DESTINATION_STYLEENTRY)
 {
 m_nCurrentStyleIndex = nParam;
-RTFValue::Pointer_t pValue(new RTFValue(-43)); // FIXME the 
correct value would be 3 but maybe table styles mess things up in dmapper, be 
cautious and disable them for now
+RTFValue::Pointer_t pValue(new RTFValue(0)); // FIXME the correct 
value would be 3 but maybe table styles mess things up in dmapper, be cautious 
and disable them for now
 m_aStates.top().aTableAttributes.set(NS_ooxml::LN_CT_Style_type, 
pValue); // table style
 }
 break;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread Takeshi Abe
 cui/source/tabpages/page.cxx |4 +-
 cui/source/tabpages/paragrph.cxx |   19 +-
 cui/source/tabpages/swpossizetabpage.cxx |4 +-
 cui/source/tabpages/tparea.cxx   |   42 +--
 cui/source/tabpages/tpbitmap.cxx |   42 ++-
 5 files changed, 50 insertions(+), 61 deletions(-)

New commits:
commit ee8f76a3e89c7070958a4c42b17818a0b90f3f0d
Author: Takeshi Abe 
Date:   Thu Jul 31 10:32:53 2014 +0900

Avoid possible memory leaks in case of exceptions

Change-Id: I8bdb8ca84b75efde4effba1ce76704d2c7c3f214

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 76d2894..6c02b90 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -60,6 +60,7 @@
 #include 
 
 #include 
+#include 
 
 // static 
 
@@ -874,7 +875,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
(m_pRegisterCB->IsChecked() || 
m_pRegisterCB->IsValueChangedFromSaved()))
 {
 const SfxBoolItem& rRegItem = (const 
SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE);
-SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone();
+boost::scoped_ptr 
pRegItem((SfxBoolItem*)rRegItem.Clone());
 bool bCheck = m_pRegisterCB->IsChecked();
 pRegItem->SetValue(bCheck);
 rSet->Put(*pRegItem);
@@ -885,7 +886,6 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put(SfxStringItem(SID_SWREGISTER_COLLECTION,
 m_pRegisterLB->GetSelectEntry()));
 }
-delete pRegItem;
 }
 
 SvxFrameDirection eDirection = m_pTextFlowBox->GetSelectEntryValue();
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index bbeb896..21dc407 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 
 static const sal_uInt16 pStdRanges[] =
 {
@@ -383,7 +384,7 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 *rOutSet, SID_ATTR_PARA_REGISTER);
 if (!pBoolItem)
 return bModified;
-SfxBoolItem* pRegItem = (SfxBoolItem*)pBoolItem->Clone();
+boost::scoped_ptr 
pRegItem((SfxBoolItem*)pBoolItem->Clone());
 sal_uInt16 _nWhich = GetWhich( SID_ATTR_PARA_REGISTER );
 bool bSet = pRegItem->GetValue();
 
@@ -395,7 +396,6 @@ bool SvxStdParagraphTabPage::FillItemSet( SfxItemSet* 
rOutSet )
 }
 else if ( SFX_ITEM_DEFAULT == GetItemSet().GetItemState( _nWhich, 
false ) )
 rOutSet->ClearItem(_nWhich);
-delete pRegItem;
 }
 
 return bModified;
@@ -2155,29 +2155,26 @@ bool SvxAsianTabPage::FillItemSet( SfxItemSet* rSet )
 SfxItemPool* pPool = rSet->GetPool();
 if (m_pScriptSpaceCB->IsEnabled() && 
m_pScriptSpaceCB->IsValueChangedFromSaved())
 {
-SfxBoolItem* pNewItem = (SfxBoolItem*)rSet->Get(
-pPool->GetWhich(SID_ATTR_PARA_SCRIPTSPACE)).Clone();
+boost::scoped_ptr pNewItem((SfxBoolItem*)rSet->Get(
+pPool->GetWhich(SID_ATTR_PARA_SCRIPTSPACE)).Clone());
 pNewItem->SetValue(m_pScriptSpaceCB->IsChecked());
 rSet->Put(*pNewItem);
-delete pNewItem;
 bRet = true;
 }
 if (m_pHangingPunctCB->IsEnabled() && 
m_pHangingPunctCB->IsValueChangedFromSaved())
 {
-SfxBoolItem* pNewItem = (SfxBoolItem*)rSet->Get(
-pPool->GetWhich(SID_ATTR_PARA_HANGPUNCTUATION)).Clone();
+boost::scoped_ptr pNewItem((SfxBoolItem*)rSet->Get(
+pPool->GetWhich(SID_ATTR_PARA_HANGPUNCTUATION)).Clone());
 pNewItem->SetValue(m_pHangingPunctCB->IsChecked());
 rSet->Put(*pNewItem);
-delete pNewItem;
 bRet = true;
 }
 if (m_pForbiddenRulesCB->IsEnabled() && 
m_pForbiddenRulesCB->IsValueChangedFromSaved())
 {
-SfxBoolItem* pNewItem = (SfxBoolItem*)rSet->Get(
-pPool->GetWhich(SID_ATTR_PARA_FORBIDDEN_RULES)).Clone();
+boost::scoped_ptr pNewItem((SfxBoolItem*)rSet->Get(
+pPool->GetWhich(SID_ATTR_PARA_FORBIDDEN_RULES)).Clone());
 pNewItem->SetValue(m_pForbiddenRulesCB->IsChecked());
 rSet->Put(*pNewItem);
-delete pNewItem;
 bRet = true;
 }
 return bRet;
diff --git a/cui/source/tabpages/swpossizetabpage.cxx 
b/cui/source/tabpages/swpossizetabpage.cxx
index 666bc03..b471078 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star::text;
 #define SwFPos SvxSwFramePosString
@@ -857,10 +858,9 @@ bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
 const SfxPoolItem* pItem = GetItem( rOldSet, 
SID_SW_FOLLOW_TEXT_FLOW);
 if(pItem)

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

2014-07-31 Thread Stephan Bergmann
 sw/inc/ndarr.hxx|1 +
 sw/source/core/docnode/node.cxx |   23 ---
 2 files changed, 13 insertions(+), 11 deletions(-)

New commits:
commit 5ee87e861e3147d6a3a9411296cd2498d77555db
Author: Stephan Bergmann 
Date:   Thu Jul 31 12:12:17 2014 +0200

Avoid undef downcast in base class ctor

Change-Id: I71eecfdc657b153f9289e8e9af52fba9ed22d3a8

diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 7d65a95..26fee7e 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -90,6 +90,7 @@ class SW_DLLPUBLIC SwNodes
 friend class SwDoc;
 friend class SwNode;
 friend class SwNodeIndex;
+friend class SwStartNode;
 friend class ::sw::DocumentContentOperationsManager;
 
 SwNodeIndex* pRoot; ///< List of all indices on nodes.
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 399bfc4..e315529 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -289,9 +289,9 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 
nNdType )
 #endif
 , pStartOfSection( 0 )
 {
-SwNodes& rNodes = const_cast (rWhere.GetNodes());
 if( rWhere.GetIndex() )
 {
+SwNodes& rNodes = const_cast (rWhere.GetNodes());
 SwNode* pNd = rNodes[ rWhere.GetIndex() -1 ];
 rNodes.InsertNode( this, rWhere );
 if( 0 == ( pStartOfSection = pNd->GetStartNode()) )
@@ -304,11 +304,6 @@ SwNode::SwNode( const SwNodeIndex &rWhere, const sal_uInt8 
nNdType )
 }
 }
 }
-else
-{
-rNodes.InsertNode( this, rWhere );
-pStartOfSection = (SwStartNode*)this;
-}
 }
 
 /** Inserts a node into the rNodes array at the rWhere position
@@ -341,11 +336,6 @@ SwNode::SwNode( SwNodes& rNodes, sal_uLong nPos, const 
sal_uInt8 nNdType )
 }
 }
 }
-else
-{
-rNodes.InsertNode( this, nPos );
-pStartOfSection = (SwStartNode*)this;
-}
 }
 
 SwNode::~SwNode()
@@ -851,6 +841,12 @@ SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const 
sal_uInt8 nNdType,
 SwStartNodeType eSttNd )
 : SwNode( rWhere, nNdType ), eSttNdTyp( eSttNd )
 {
+if( !rWhere.GetIndex() )
+{
+SwNodes& rNodes = const_cast (rWhere.GetNodes());
+rNodes.InsertNode( this, rWhere );
+pStartOfSection = this;
+}
 // Just do this temporarily until the EndNode is inserted
 pEndOfSection = (SwEndNode*)this;
 }
@@ -858,6 +854,11 @@ SwStartNode::SwStartNode( const SwNodeIndex &rWhere, const 
sal_uInt8 nNdType,
 SwStartNode::SwStartNode( SwNodes& rNodes, sal_uLong nPos )
 : SwNode( rNodes, nPos, ND_STARTNODE ), eSttNdTyp( SwNormalStartNode )
 {
+if( !nPos )
+{
+rNodes.InsertNode( this, nPos );
+pStartOfSection = this;
+}
 // Just do this temporarily until the EndNode is inserted
 pEndOfSection = (SwEndNode*)this;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread Andrzej Hunt
 desktop/source/lib/init.cxx   |  101 --
 libreofficekit/qa/data/blank_presentation.odp |binary
 libreofficekit/qa/data/blank_text.odt |binary
 libreofficekit/qa/data/impress_slidenames.odp |binary
 libreofficekit/qa/unit/tiledrendering.cxx |  100 ++---
 5 files changed, 137 insertions(+), 64 deletions(-)

New commits:
commit 5909d640dc2fe7b6aed0aa6e9136d981b09175ad
Author: Andrzej Hunt 
Date:   Thu Jul 31 11:57:09 2014 +0200

LOK: add document loading failure test.

We don't really have any way of telling the client that the file didn't
exist yet though, so not very useful so far.

Change-Id: I1db386781b88b345f3e9cb4f37838ca1d95f92f9

diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index 043ffaf..5d61000 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -48,6 +48,7 @@ public:
 // components on the one Office instance that we retrieve.
 void runAllTests();
 
+void testDocumentLoadFail( Office* pOffice );
 void testDocumentTypes( Office* pOffice );
 void testImpressSlideNames( Office* pOffice );
 void testOverlay( Office* pOffice );
@@ -63,11 +64,23 @@ void TiledRenderingTest::runAllTests()
   m_sLOPath.c_str() ) );
 CPPUNIT_ASSERT( pOffice.get() );
 
+testDocumentLoadFail( pOffice.get() );
 testDocumentTypes( pOffice.get() );
 testImpressSlideNames( pOffice.get() );
 testOverlay( pOffice.get() );
 }
 
+void TiledRenderingTest::testDocumentLoadFail( Office* pOffice )
+{
+const string sDocPath = m_sSrcRoot + 
"/libreofficekit/qa/data/IDONOTEXIST.odt";
+scoped_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) 
);
+CPPUNIT_ASSERT( !pDocument.get() );
+// TODO: we probably want to have some way of returning what
+// the cause of failure was. getError() will return
+// something along the lines of:
+// "Unsupported URL 
: "type detection 
failed""
+}
+
 // Our dumped .png files end up in
 // workdir/CppunitTest/libreofficekit_tiledrendering.test.core
 
commit dd418d8ca230da09a15de10db66970bb50db0172
Author: Andrzej Hunt 
Date:   Thu Jul 31 11:20:00 2014 +0200

LOK documentLoad needs SolarMutex protection too.

We probably need to do this for most of LOK now that
we use soffice_main.

Change-Id: I77be7865511c083679cf2f68b0e5df106506fd70

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index bc38cc2..53e49e3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -276,6 +276,8 @@ static LibreOfficeKitDocument* 
lo_documentLoad(LibreOfficeKit* pThis, const char
 
 OUString aURL = getAbsoluteURL(pURL);
 
+SolarMutexGuard aGuard;
+
 uno::Reference xComponentLoader = 
frame::Desktop::create(xContext);
 
 pLib->maLastExceptionMsg = "";
commit 5beec739f0c790615ed84e35dd513282d7dfa17d
Author: Andrzej Hunt 
Date:   Thu Jul 31 10:22:55 2014 +0200

LOK: add test for getDocumentType.

Change-Id: I264567f73dae9ecd061e09c4413857f793fcac48

diff --git a/libreofficekit/qa/data/blank_presentation.odp 
b/libreofficekit/qa/data/blank_presentation.odp
new file mode 100644
index 000..fd68d9a
Binary files /dev/null and b/libreofficekit/qa/data/blank_presentation.odp 
differ
diff --git a/libreofficekit/qa/data/blank_text.odt 
b/libreofficekit/qa/data/blank_text.odt
new file mode 100644
index 000..00b92d7
Binary files /dev/null and b/libreofficekit/qa/data/blank_text.odt differ
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index c544615..043ffaf 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -48,6 +48,7 @@ public:
 // components on the one Office instance that we retrieve.
 void runAllTests();
 
+void testDocumentTypes( Office* pOffice );
 void testImpressSlideNames( Office* pOffice );
 void testOverlay( Office* pOffice );
 
@@ -62,6 +63,7 @@ void TiledRenderingTest::runAllTests()
   m_sLOPath.c_str() ) );
 CPPUNIT_ASSERT( pOffice.get() );
 
+testDocumentTypes( pOffice.get() );
 testImpressSlideNames( pOffice.get() );
 testOverlay( pOffice.get() );
 }
@@ -83,6 +85,34 @@ static void dumpRGBABitmap( const OUString& rPath, const 
unsigned char* pBuffer,
 sOutput.Close();
 }
 
+LibreOfficeKitDocumentType getDocumentType( Office* pOffice, const string& 
rPath )
+{
+scoped_ptr< Document> pDocument( pOffice->documentLoad( rPath.c_str() ) );
+CPPUNIT_ASSERT( pDocument.get() );
+return pDocument->getDocumentType();
+}
+
+void TiledRenderingTest::testDocumentTypes( Office* pOffice )
+{
+const string sTextDocPath = m_sSrcRoot + 
"/libreofficekit/qa/data/blank_text.odt";
+const string sTextLockFile = m_sSrcRoot 
+"/l

Re: [Libreoffice-commits] core.git: 7 commits - chart2/source extensions/source hwpfilter/source l10ntools/source sal/osl unoidl/source

2014-07-31 Thread Bjoern Michaelsen
Hi all,

On Thu, Jul 31, 2014 at 11:59:42AM +0200, Stephan Bergmann wrote:
> Please refrain from such cosmetic changes in the future.  IIRC, the
> unoidl module (being mostly written by a single person, me)
> more-or-less consistently used a single formatting style until now.
> I see no good reason to change that to another formatting style.

Before this explodes into a bikeshed, I tentatively agree with Stephan here,
despite me writing:

 https://wiki.openoffice.org/wiki/Writer/Code_Conventions

back in the days. Note that document wasnt build on what I assumed to be the
"right style"(*), but the most commonly used style in an attempt to bring more
consistency to the code base.

I dont think drive-by reformatting to be a good way to solve this though: If we 
want consistency (which is the ~only benefit of a 'cosmetic' code style), the
way to go would be to define a style for uncrustifyi(**) and then use that to 
make 
~all the codebase use that (after painting a lot of bikesheds).

Best,

Bjoern

(*)  Given free choice, I would go for 1TBS ...
 https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS
(**) http://uncrustify.sourceforge.net/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


RE: export of Calc functions to OOXML

2014-07-31 Thread Winfried Donkers
Hi Eike,

(re-introducing the mailing list I left out in my previous reply)

>> FormulaGrammar::isOOXML( meGrammar ) only returns true when saving as 
>> OOXML, and FormulaGrammar::isODFF( meGrammar ) only returns true when saving 
>> as ODFF.
>> Is that correct?
> Yes, that's correct. Also note that ODFF means ODF 1.2 or later, as the 
> OpenFormula definition exists since ODF 1.2, and
> FormulaGrammar::isPODF(meGrammar) returns true for the non-ODFF ODF 1.1 or 
> earlier and the pre-ODF XML format used in OOo1.x

Great, I can get on now :-)

>> If so, then I intend to create a child class MissingConventionOOXML 
>> (and a child class RenameMissingConventionODF)
> I guess that was a typo and should had been MissingConventionODF instead?

Yes, you are correct.

>> with parent class
>> MissingConvention (which will contain no ODF or OOXML specific code).

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


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

2014-07-31 Thread Stephan Bergmann
 svx/source/svdraw/svdotext.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 91f7e828f89144422016f7c71558fc72bf41ac80
Author: Stephan Bergmann 
Date:   Thu Jul 31 12:57:37 2014 +0200

typo

Change-Id: Ic8795d05f66b45bd43e3444f0f368a2e6352aa2c

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 219fc63..973ac5f 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -326,7 +326,7 @@ bool SdrTextObj::IsAutoGrowWidth() const
 return false; // AutoGrow only together with TextFrames
 
 const SfxItemSet& rSet = GetObjectItemSet();
-bool bRet = 
((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+bool bRet = 
((SdrTextAutoGrowWidthItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
 
 bool bInEditMOde = IsInEditMode();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


ODF Formula Standard & Calc

2014-07-31 Thread Olivier Hallot
Hi all

Is there a reference page where each Calc function is listed/mapped as
conforming or not conforming to ODFF?

Thanks
-- 
Olivier Hallot
Comunidade LibreOffice
http://ask.libreoffice.org/pt-br
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ODF Formula Standard & Calc

2014-07-31 Thread Eike Rathke
Hi Olivier,

On Thursday, 2014-07-31 08:43:42 -0300, Olivier Hallot wrote:

> Is there a reference page where each Calc function is listed/mapped as
> conforming or not conforming to ODFF?

AFAIK no, but we have a page that lists the additional functions not
covered by ODFF, see
https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes#List_of_LibreOffice_OpenFormula_extensions

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key ID: 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Support the FSFE, care about Free Software! https://fsfe.org/support/?erack


pgpnwMpG3_tea.pgp
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: ODF Formula Standard & Calc

2014-07-31 Thread Regina Henschel

Hi Oliver,

Olivier Hallot schrieb:

Hi all

Is there a reference page where each Calc function is listed/mapped as
conforming or not conforming to ODFF?


Long time ago I had started
https://wiki.openoffice.org/wiki/Calc/ODFF_Implementation/Examine_functions

But it is not maintained and you will need to examine the current state 
in LO.

I do not know any other page.

Kind regards
Regina

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


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - 9 commits - cui/source editeng/source include/svx include/xmloff libreofficekit/qa reportdesign/source sc/source sd/source svx/source

2014-07-31 Thread Takeshi Abe
 cui/source/tabpages/page.cxx   
 |4 
 cui/source/tabpages/paragrph.cxx   
 |   19 +-
 cui/source/tabpages/swpossizetabpage.cxx   
 |4 
 cui/source/tabpages/tparea.cxx 
 |   42 ++
 cui/source/tabpages/tpbitmap.cxx   
 |   42 +++---
 editeng/source/xml/xmltxtexp.cxx   
 |2 
 include/svx/unoapi.hxx 
 |7 -
 include/xmloff/xmlexp.hxx  
 |3 
 include/xmloff/xmluconv.hxx
 |   12 +
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
 |4 
 reportdesign/source/filter/xml/xmlExport.cxx   
 |4 
 sc/source/filter/xml/xmlexprt.cxx  
 |4 
 sc/source/filter/xml/xmlexprt.hxx  
 |2 
 sd/source/ui/unoidl/UnoDocumentSettings.cxx
 |6 
 sd/source/ui/unoidl/unomodel.cxx   
 |2 
 svx/source/unodraw/unoprov.cxx 
 |6 
 svx/source/xml/xmlxtexp.cxx
 |2 
 sw/inc/swmodule.hxx
 |2 
 sw/qa/extras/ooxmlexport/data/2-id.docx
 |binary
 sw/qa/extras/ooxmlexport/data/sdt-2-para.docx  
 |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx  
 |   37 -
 sw/source/filter/ww8/docxattributeoutput.cxx   
 |   57 
 sw/source/filter/ww8/docxattributeoutput.hxx   
 |8 +
 sw/source/filter/ww8/docxexport.cxx
 |7 +
 sw/source/filter/ww8/docxexport.hxx
 |3 
 sw/source/filter/ww8/docxsdrexport.cxx 
 |   23 +++
 sw/source/filter/ww8/docxsdrexport.hxx 
 |5 
 sw/source/uibase/app/swmodul1.cxx  
 |4 
 sw/source/uibase/inc/unomod.hxx
 |4 
 sw/source/uibase/uno/unomod.cxx
 |   30 ++--
 writerfilter/source/dmapper/StyleSheetTable.cxx
 |   25 +++
 writerfilter/source/rtftok/rtfdocumentimpl.cxx 
 |4 
 
xmerge/source/xmerge/java/org/openoffice/xmerge/util/registry/ConverterInfoMgr.java
 |   65 +++---
 xmloff/source/core/xmlexp.cxx  
 |2 
 xmloff/source/core/xmluconv.cxx
 |   16 +-
 35 files changed, 289 insertions(+), 168 deletions(-)

New commits:
commit 8ec35ed13bf520c925917ae49f7b810fbdd61589
Author: Takeshi Abe 
Date:   Thu Jul 31 10:32:53 2014 +0900

Avoid possible memory leaks in case of exceptions

Change-Id: I8bdb8ca84b75efde4effba1ce76704d2c7c3f214

diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 76d2894..6c02b90 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -60,6 +60,7 @@
 #include 
 
 #include 
+#include 
 
 // static 
 
@@ -874,7 +875,7 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
(m_pRegisterCB->IsChecked() || 
m_pRegisterCB->IsValueChangedFromSaved()))
 {
 const SfxBoolItem& rRegItem = (const 
SfxBoolItem&)rOldSet.Get(SID_SWREGISTER_MODE);
-SfxBoolItem* pRegItem = (SfxBoolItem*)rRegItem.Clone();
+boost::scoped_ptr 
pRegItem((SfxBoolItem*)rRegItem.Clone());
 bool bCheck = m_pRegisterCB->IsChecked();
 pRegItem->SetValue(bCheck);
 rSet->Put(*pRegItem);
@@ -885,7 +886,6 @@ bool SvxPageDescPage::FillItemSet( SfxItemSet* rSet )
 rSet->Put(SfxStringItem(SID_SWREGISTER_COLLECTION,
 m_pRegisterLB->GetSelectEntry()));
 }
-delete pRegItem;
 }
 
 SvxFrameDirection eDirection = m_pTextFlowBox->GetSelectEntryValue();
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index bbeb896..21dc407 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -51,6 +51,7 @@
 #include 
 

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

2014-07-31 Thread Stephan Bergmann
 include/svx/sdtmfitm.hxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 6a2ea81ca1622d2c2ad55bea8ddc28167fcc2794
Author: Stephan Bergmann 
Date:   Thu Jul 31 14:26:43 2014 +0200

Remove unused ctors

Change-Id: I01506e923f3197f97f771983edd72dfddb2af1b8

diff --git a/include/svx/sdtmfitm.hxx b/include/svx/sdtmfitm.hxx
index a3e3b66..00a84d1 100644
--- a/include/svx/sdtmfitm.hxx
+++ b/include/svx/sdtmfitm.hxx
@@ -28,7 +28,6 @@
 class SdrTextMinFrameHeightItem: public SdrMetricItem {
 public:
 SdrTextMinFrameHeightItem(long nHgt=0): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT,nHgt)  {}
-SdrTextMinFrameHeightItem(SvStream& rIn): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT,rIn) {}
 };
 
 
@@ -37,7 +36,6 @@ public:
 class SdrTextMaxFrameHeightItem: public SdrMetricItem {
 public:
 SdrTextMaxFrameHeightItem(long nHgt=0): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT,nHgt)  {}
-SdrTextMaxFrameHeightItem(SvStream& rIn): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT,rIn) {}
 };
 
 
@@ -46,7 +44,6 @@ public:
 class SdrTextMinFrameWidthItem: public SdrMetricItem {
 public:
 SdrTextMinFrameWidthItem(long nWdt=0): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH,nWdt)  {}
-SdrTextMinFrameWidthItem(SvStream& rIn): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH,rIn) {}
 };
 
 
@@ -55,7 +52,6 @@ public:
 class SdrTextMaxFrameWidthItem: public SdrMetricItem {
 public:
 SdrTextMaxFrameWidthItem(long nWdt=0): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH,nWdt)  {}
-SdrTextMaxFrameWidthItem(SvStream& rIn): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH,rIn) {}
 };
 
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'feature/gsoc14-libcmis2' - 8 commits - desktop/source libreofficekit/qa svx/source

2014-07-31 Thread Stephan Bergmann
 desktop/source/lib/init.cxx   |  101 --
 libreofficekit/qa/data/blank_presentation.odp |binary
 libreofficekit/qa/data/blank_text.odt |binary
 libreofficekit/qa/data/impress_slidenames.odp |binary
 libreofficekit/qa/unit/tiledrendering.cxx |  100 ++---
 svx/source/svdraw/svdotext.cxx|2 
 6 files changed, 138 insertions(+), 65 deletions(-)

New commits:
commit 96f972695389b1ead00153200f481c48e3034e99
Author: Stephan Bergmann 
Date:   Thu Jul 31 12:57:37 2014 +0200

typo

Change-Id: Ic8795d05f66b45bd43e3444f0f368a2e6352aa2c

diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 219fc63..973ac5f 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -326,7 +326,7 @@ bool SdrTextObj::IsAutoGrowWidth() const
 return false; // AutoGrow only together with TextFrames
 
 const SfxItemSet& rSet = GetObjectItemSet();
-bool bRet = 
((SdrTextAutoGrowHeightItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
+bool bRet = 
((SdrTextAutoGrowWidthItem&)(rSet.Get(SDRATTR_TEXT_AUTOGROWWIDTH))).GetValue();
 
 bool bInEditMOde = IsInEditMode();
 
commit e9c960a8a7dda1a9d56d6342fc22c76ab5801b69
Author: Andrzej Hunt 
Date:   Thu Jul 31 11:57:09 2014 +0200

LOK: add document loading failure test.

We don't really have any way of telling the client that the file didn't
exist yet though, so not very useful so far.

Change-Id: I1db386781b88b345f3e9cb4f37838ca1d95f92f9

diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index 043ffaf..5d61000 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -48,6 +48,7 @@ public:
 // components on the one Office instance that we retrieve.
 void runAllTests();
 
+void testDocumentLoadFail( Office* pOffice );
 void testDocumentTypes( Office* pOffice );
 void testImpressSlideNames( Office* pOffice );
 void testOverlay( Office* pOffice );
@@ -63,11 +64,23 @@ void TiledRenderingTest::runAllTests()
   m_sLOPath.c_str() ) );
 CPPUNIT_ASSERT( pOffice.get() );
 
+testDocumentLoadFail( pOffice.get() );
 testDocumentTypes( pOffice.get() );
 testImpressSlideNames( pOffice.get() );
 testOverlay( pOffice.get() );
 }
 
+void TiledRenderingTest::testDocumentLoadFail( Office* pOffice )
+{
+const string sDocPath = m_sSrcRoot + 
"/libreofficekit/qa/data/IDONOTEXIST.odt";
+scoped_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) 
);
+CPPUNIT_ASSERT( !pDocument.get() );
+// TODO: we probably want to have some way of returning what
+// the cause of failure was. getError() will return
+// something along the lines of:
+// "Unsupported URL 
: "type detection 
failed""
+}
+
 // Our dumped .png files end up in
 // workdir/CppunitTest/libreofficekit_tiledrendering.test.core
 
commit fa7c1b03f01efbc0af4399a2bc774b6e337446a9
Author: Andrzej Hunt 
Date:   Thu Jul 31 11:20:00 2014 +0200

LOK documentLoad needs SolarMutex protection too.

We probably need to do this for most of LOK now that
we use soffice_main.

Change-Id: I77be7865511c083679cf2f68b0e5df106506fd70

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index bc38cc2..53e49e3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -276,6 +276,8 @@ static LibreOfficeKitDocument* 
lo_documentLoad(LibreOfficeKit* pThis, const char
 
 OUString aURL = getAbsoluteURL(pURL);
 
+SolarMutexGuard aGuard;
+
 uno::Reference xComponentLoader = 
frame::Desktop::create(xContext);
 
 pLib->maLastExceptionMsg = "";
commit 8622a3bca4616a7a218a52115dddfbde0a8ec42c
Author: Andrzej Hunt 
Date:   Thu Jul 31 10:22:55 2014 +0200

LOK: add test for getDocumentType.

Change-Id: I264567f73dae9ecd061e09c4413857f793fcac48

diff --git a/libreofficekit/qa/data/blank_presentation.odp 
b/libreofficekit/qa/data/blank_presentation.odp
new file mode 100644
index 000..fd68d9a
Binary files /dev/null and b/libreofficekit/qa/data/blank_presentation.odp 
differ
diff --git a/libreofficekit/qa/data/blank_text.odt 
b/libreofficekit/qa/data/blank_text.odt
new file mode 100644
index 000..00b92d7
Binary files /dev/null and b/libreofficekit/qa/data/blank_text.odt differ
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx 
b/libreofficekit/qa/unit/tiledrendering.cxx
index c544615..043ffaf 100644
--- a/libreofficekit/qa/unit/tiledrendering.cxx
+++ b/libreofficekit/qa/unit/tiledrendering.cxx
@@ -48,6 +48,7 @@ public:
 // components on the one Office instance that we retrieve.
 void runAllTests();
 
+void testDocumentTypes( Office* pOffice );
 void testImpressSlideNames( Office* pOffice );
 void testOverlay( Office* pOffice );
 
@@ -62,6 +63,7 @@ void TiledRe

[Libreoffice-commits] core.git: Branch 'feature/calctiledrendering5' - 187 commits - avmedia/source basctl/source basic/source bridges/source canvas/Library_directx9canvas.mk canvas/Library_gdipluscan

2014-07-31 Thread Andrzej Hunt
Rebased ref, commits from common ancestor:
commit 4a95e1a9c212a45408f9a7407ab283eca221378d
Author: Andrzej Hunt 
Date:   Thu Jul 31 14:46:03 2014 +0200

Implement getPartName for Calc.

Change-Id: I5aa70213f33e0c5d9dc0fe44ddabc68f43cc6b10

diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 932017d..f97a687 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -366,6 +366,7 @@ public:
 virtual void setPart(   int nPart ) SAL_OVERRIDE;
 virtual int  getPart() SAL_OVERRIDE;
 virtual int  getParts() SAL_OVERRIDE;
+virtual OUString getPartName( int nPart ) SAL_OVERRIDE;
 };
 
 class ScDrawPagesObj : public cppu::WeakImplHelper2<
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 68d4402..bec936a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -479,6 +479,14 @@ int ScModelObj::getPart()
 return pViewData->GetTabNo();
 }
 
+OUString ScModelObj::getPartName( int nPart )
+{
+ScDocument& rDoc = pDocShell->GetDocument();
+OUString sTableName;
+rDoc.GetName( nPart, sTableName );
+return sTableName;
+}
+
 Size ScModelObj::getDocumentSize()
 {
 // There seems to be no clear way of getting the grid window for this
commit e0e7d7a81f22053e7610732ad7dc7c1191dd95a9
Author: Andrzej Hunt 
Date:   Mon Jul 28 09:02:25 2014 +0200

DO NOT MERGE: reenable LOK tiled rendering test (BRANCH ONLY).

Change-Id: Ica4e570cafa25f4c642016608d8d510e668ed701

diff --git a/libreofficekit/Module_libreofficekit.mk 
b/libreofficekit/Module_libreofficekit.mk
index a5b9cb0..7c3ea39 100644
--- a/libreofficekit/Module_libreofficekit.mk
+++ b/libreofficekit/Module_libreofficekit.mk
@@ -11,9 +11,9 @@ $(eval $(call gb_Module_Module,libreofficekit))
 
 ifeq ($(OS),LINUX)
 
-# $(eval $(call gb_Module_add_check_targets,libreofficekit,\
-# CppunitTest_libreofficekit_tiledrendering \
-# ))
+$(eval $(call gb_Module_add_check_targets,libreofficekit,\
+CppunitTest_libreofficekit_tiledrendering \
+))
 
 ifneq ($(ENABLE_GTK),)
 $(eval $(call gb_Module_add_targets,libreofficekit,\
commit 97f0daebce014693b8c9a8848e3df938da8bd22a
Author: Andrzej Hunt 
Date:   Mon Jul 21 21:15:39 2014 +0200

Lets not roll our own twip/mm100 conversions.

Change-Id: Id1d0c2bed0359c35086d963dcfe9b765b6232b09

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 08b8013..60a6f47 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -424,9 +425,8 @@ Size ScGridWindow::GetDataAreaSize()
 SdrPage* pPage = pPageView->GetPage();
 Rectangle aDrawDataArea = pPage->GetAllObjBoundRect();
 // Draw layer works in 100th mm, whereas we're working with TWIPs.
-aDrawDataArea.SetPos( aDrawDataArea.TopLeft() * 1440 / 2540 );
-aDrawDataArea.SetSize( Size( aDrawDataArea.GetSize().Width() * 1440 / 2540,
- aDrawDataArea.GetSize().Height() * 1440 / 
2540 ) );
+aDrawDataArea.SetPos( convertMm100ToTwip(aDrawDataArea.TopLeft() ) );
+aDrawDataArea.SetSize( convertMm100ToTwip( aDrawDataArea.GetSize() ) );
 
 // We specifically keep iterating until we have covered both the
 // data area AND the drawing layer area. We also make sure that
@@ -641,7 +641,7 @@ void ScGridWindow::Draw( SCCOL nX1, SCROW nY1, SCCOL nX2, 
SCROW nY2, ScUpdateMod
 MapMode aDrawMode = pOutDev->GetMapMode();
 Point aOrigin = aDrawMode.GetOrigin();
 aDrawMode.SetMapUnit( MAP_100TH_MM );
-aDrawMode.SetOrigin( (aOrigin * 2540l) / 1440l );
+aDrawMode.SetOrigin( convertTwipToMm100( aOrigin ) );
 Rectangle aDrawingRectLogic;
 
 {
commit 46abcb038c779cce39a37c13fbf4ec4179dad346
Author: Andrzej Hunt 
Date:   Mon Jul 21 21:13:15 2014 +0200

Add Point and Size versions of convertMm100ToTwip/TwipToMm100.

There seem to be quite a few cases where the individual components
are being converted, this way we can just conver the entire
object as one.

Change-Id: I0043b6f40520d7497e6edc185187706b255f2354

diff --git a/include/tools/mapunit.hxx b/include/tools/mapunit.hxx
index a68b6b4..af3eaa9 100644
--- a/include/tools/mapunit.hxx
+++ b/include/tools/mapunit.hxx
@@ -20,6 +20,8 @@
 #ifndef INCLUDED_TOOLS_MAPUNIT_HXX
 #define INCLUDED_TOOLS_MAPUNIT_HXX
 
+#include "gen.hxx"
+
 enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM,
MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH,
MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT,
@@ -33,6 +35,18 @@ inline sal_Int64 convertTwipToMm100(sal_Int64 n)
 return (n*127-36)/72;
 }
 
+inline Point convertTwipToMm100(const Point& rPoint)
+{
+return Point(convertTwipToMm100(rPoint.getX()),
+ convertTwipToMm100(rPoint.getY()));
+}
+
+inline Size convertTwipToMm100(const Size& rSize)
+{
+return Size(convertTwipToMm100(rS

[Libreoffice-commits] core.git: Branch 'feature/refactor-god-objects' - sw/inc sw/Library_sw.mk sw/qa sw/source

2014-07-31 Thread Valentin Kettner
 sw/Library_sw.mk |1 
 sw/inc/doc.hxx   |   27 --
 sw/qa/core/uwriter.cxx   |   11 -
 sw/source/core/bastyp/calc.cxx   |3 
 sw/source/core/doc/DocumentStatisticsManager.cxx |  246 +++
 sw/source/core/doc/doc.cxx   |  213 ++-
 sw/source/core/doc/docnew.cxx|8 
 sw/source/core/edit/editsh.cxx   |5 
 sw/source/core/fields/docufld.cxx|3 
 sw/source/core/inc/DocumentStatisticsManager.hxx |   73 ++
 sw/source/core/layout/layact.cxx |1 
 sw/source/core/layout/laycache.cxx   |5 
 sw/source/core/unocore/unofield.cxx  |3 
 sw/source/core/view/viewsh.cxx   |2 
 sw/source/filter/html/swhtml.cxx |3 
 sw/source/filter/ww8/wrtww8.cxx  |3 
 sw/source/filter/xml/wrtxml.cxx  |3 
 sw/source/filter/xml/xmlexp.cxx  |6 
 sw/source/filter/xml/xmlmeta.cxx |5 
 sw/source/ui/dialog/docstdlg.cxx |3 
 sw/source/uibase/app/docsh.cxx   |3 
 sw/source/uibase/app/docsh2.cxx  |5 
 sw/source/uibase/uiview/view2.cxx|3 
 sw/source/uibase/uno/unotxdoc.cxx|3 
 24 files changed, 397 insertions(+), 241 deletions(-)

New commits:
commit 0d1abb0c531e26a7e9ee1b332d652e2f789b7ff5
Author: Valentin Kettner 
Date:   Thu Jul 31 12:14:23 2014 +0200

Refactored IDocumentStatistics our of SwDoc.

Into the new class DocumentStatisticsManager.

Change-Id: I281232dc09dbd79c2faf3c2a78ae49625bbe88ee

diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk
index 98b9338..6fec65f 100644
--- a/sw/Library_sw.mk
+++ b/sw/Library_sw.mk
@@ -197,6 +197,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\
 sw/source/core/doc/DocumentContentOperationsManager \
 sw/source/core/doc/DocumentRedlineManager \
 sw/source/core/doc/DocumentFieldsManager \
+sw/source/core/doc/DocumentStatisticsManager \
 sw/source/core/doc/extinput \
 sw/source/core/doc/fmtcol \
 sw/source/core/doc/ftnidx \
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 6aa5ba3..60278c0 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -191,6 +190,7 @@ class IDocumentListsAccess;
 class IDocumentOutlineNodes;
 class IDocumentContentOperations;
 class IDocumentRedlineAccess;
+class IDocumentStatistics;
 class _SetGetExpFlds;
 
 namespace sw { namespace mark {
@@ -212,6 +212,7 @@ namespace sw {
 class DocumentContentOperationsManager;
 class DocumentRedlineManager;
 class DocumentFieldsManager;
+class DocumentStatisticsManager;
 }
 
 namespace com { namespace sun { namespace star {
@@ -250,7 +251,6 @@ void StartGrammarChecking( SwDoc &rDoc );
 class SW_DLLPUBLIC SwDoc :
 public IInterface,
 public IDocumentStylePoolAccess,
-public IDocumentStatistics,
 public IDocumentState,
 public IDocumentLayoutAccess,
 public IDocumentExternalData
@@ -269,7 +269,6 @@ class SW_DLLPUBLIC SwDoc :
Timer should not be members of the model
 */
 Timer   maOLEModifiedTimer;  //< Timer for update modified 
OLE-Objecs
-Timer   maStatsUpdateTimer;  //< Timer for asynchronous stats 
calculation
 SwDBDatamaDBData;//< database descriptor
 OUStringmsTOIAutoMarkURL;//< URL of table of index AutoMark 
file
 boost::ptr_vector< boost::nullable > maPatternNms;  // 
Array for names of document-templates
@@ -292,6 +291,7 @@ class SW_DLLPUBLIC SwDoc :
 const ::boost::scoped_ptr< ::sw::DocumentOutlineNodesManager > 
m_pDocumentOutlineNodesManager;
 const ::boost::scoped_ptr< ::sw::DocumentContentOperationsManager > 
m_pDocumentContentOperationsManager;
 const ::boost::scoped_ptr< ::sw::DocumentFieldsManager > 
m_pDocumentFieldsManager;
+const ::boost::scoped_ptr< ::sw::DocumentStatisticsManager > 
m_pDocumentStatisticsManager;
 
 // Pointer
 SwFrmFmt*mpDfltFrmFmt;   //< Default formats.
@@ -324,7 +324,6 @@ class SW_DLLPUBLIC SwDoc :
 SwEndNoteInfo   *mpEndNoteInfo;
 SwLineNumberInfo*mpLineNumberInfo;
 SwFtnIdxs   *mpFtnIdxs;
-SwDocStat   *mpDocStat;  //< Statistics information.
 
 SwDocShell  *mpDocShell; //< Ptr to SfxDocShell of Doc.
 SfxObjectShellLock mxTmpDocShell;//< A temporary shell that is used to 
copy OLE-Nodes
@@ -566,11 +565,11 @@ public:
 virtual void SetLineNumberInfo(const SwLineNumberInfo& rInfo);
 
 // IDocumentStatistics
-virtual void DocInfoChgd() SAL_OVERRIDE;
-virtual const SwDocStat &GetDocStat() const SAL_OVERRIDE;
-virtual const SwDocStat &GetUpdatedD

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

2014-07-31 Thread Kohei Yoshida
 sc/inc/document.hxx |2 +
 sc/inc/refhint.hxx  |7 +++
 sc/inc/tokenarray.hxx   |5 --
 sc/inc/types.hxx|6 +++
 sc/qa/unit/ucalc.hxx|2 +
 sc/qa/unit/ucalc_sharedformula.cxx  |   68 ++
 sc/source/core/data/bcaslot.cxx |   17 ++--
 sc/source/core/data/documen7.cxx|2 -
 sc/source/core/data/document10.cxx  |   13 ++
 sc/source/core/data/formulacell.cxx |   16 +++-
 sc/source/core/inc/bcaslot.hxx  |6 ++-
 sc/source/core/tool/refhint.cxx |9 +++-
 sc/source/core/tool/token.cxx   |   24 +---
 sc/source/ui/docshell/docfunc.cxx   |6 +--
 sc/source/ui/undo/undoblk.cxx   |   71 ++--
 15 files changed, 218 insertions(+), 36 deletions(-)

New commits:
commit 27182231acd3a0c9898a8dba78b76dc8a827b4c0
Author: Kohei Yoshida 
Date:   Wed Jul 30 13:51:28 2014 -0400

fdo#78555: Retain formula results when moving a range of cells.

* No need to re-compile RPN token array on reference change alone.  We do 
that
  when the formula contains one or more names that have been updated.

* Adjust undo code to get it to work without relying on ref undo document,
  which would cause the token arrays to be unnecessarily recompiled.

* Whatever else need to be changed in order to pass all unit tests.

Change-Id: I99e86d23320aca8900fef011da23a9d34e42751e

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 0dc3239..6bfb138 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1876,6 +1876,8 @@ public:
 void EndListeningCell( sc::EndListeningContext& rCxt, const ScAddress& 
rPos, SvtListener& rListener );
 
 void EndListeningFormulaCells( std::vector& rCells );
+void CollectAllAreaListeners(
+std::vector& rListeners, const ScRange& rRange, 
sc::AreaOverlapType eType );
 
 voidPutInFormulaTree( ScFormulaCell* pCell );
 voidRemoveFromFormulaTree( ScFormulaCell* pCell );
diff --git a/sc/inc/refhint.hxx b/sc/inc/refhint.hxx
index 1eff906..0f65aae 100644
--- a/sc/inc/refhint.hxx
+++ b/sc/inc/refhint.hxx
@@ -15,6 +15,8 @@
 
 namespace sc {
 
+struct RefUpdateContext;
+
 class RefHint : public SfxSimpleHint
 {
 public:
@@ -42,10 +44,11 @@ class RefMovedHint : public RefHint
 {
 ScRange maRange;
 ScAddress maMoveDelta;
+const sc::RefUpdateContext& mrCxt;
 
 public:
 
-RefMovedHint( const ScRange& rRange, const ScAddress& rMove );
+RefMovedHint( const ScRange& rRange, const ScAddress& rMove, const 
sc::RefUpdateContext& rCxt );
 virtual ~RefMovedHint();
 
 /**
@@ -57,6 +60,8 @@ public:
  * Get the movement vector.
  */
 const ScAddress& getDelta() const;
+
+const sc::RefUpdateContext& getContext() const;
 };
 
 class RefColReorderHint : public RefHint
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index 8ae6145..9762364 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -152,11 +152,8 @@ public:
  * Move reference positions that are within specified moved range.
  *
  * @param rPos position of this formula cell
- * @param rMovedRange range that has been moved.
- * @param rDelta movement vector.
  */
-void MoveReference(
-const ScAddress& rPos, const ScRange& rMovedRange, const ScAddress& 
rDelta );
+sc::RefUpdateResult MoveReference( const ScAddress& rPos, const 
sc::RefUpdateContext& rCxt );
 
 /**
  * Move reference positions in response to column reordering.  A range
diff --git a/sc/inc/types.hxx b/sc/inc/types.hxx
index 37784dc..8dc8f18 100644
--- a/sc/inc/types.hxx
+++ b/sc/inc/types.hxx
@@ -100,6 +100,12 @@ struct RangeMatrix
 
 typedef boost::unordered_map ColRowReorderMapType;
 
+enum AreaOverlapType
+{
+AreaInside,
+AreaPartialOverlap
+};
+
 }
 
 #endif
diff --git a/sc/source/core/data/bcaslot.cxx b/sc/source/core/data/bcaslot.cxx
index 701e530..ea70ffb 100644
--- a/sc/source/core/data/bcaslot.cxx
+++ b/sc/source/core/data/bcaslot.cxx
@@ -432,7 +432,8 @@ void ScBroadcastAreaSlot::EraseArea( 
ScBroadcastAreas::iterator& rIter )
 }
 }
 
-void ScBroadcastAreaSlot::GetAllListeners( const ScRange& rRange, 
std::vector& rListeners )
+void ScBroadcastAreaSlot::GetAllListeners(
+const ScRange& rRange, std::vector& rListeners, 
sc::AreaOverlapType eType )
 {
 for (ScBroadcastAreas::const_iterator aIter( aBroadcastAreaTbl.begin()),
 aIterEnd( aBroadcastAreaTbl.end()); aIter != aIterEnd; ++aIter )
@@ -442,7 +443,14 @@ void ScBroadcastAreaSlot::GetAllListeners( const ScRange& 
rRange, std::vectorGetRange();
-if (!rRange.In(rAreaRange))
+
+if (eType == sc::AreaInside && !rRange.In(rAreaRange))
+// The range needs to be fully inside specified range.
+continue;
+
+if (eType == sc::AreaPartialOverlap &&
+(!rRange

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

2014-07-31 Thread Kohei Yoshida
 sc/source/ui/docshell/docfunc.cxx |   28 
 1 file changed, 4 insertions(+), 24 deletions(-)

New commits:
commit c5bbfb3935c86d862acd3b5cd0643a474206ed1d
Author: Kohei Yoshida 
Date:   Thu Jul 31 09:07:25 2014 -0400

fdo#78555: Oopsy.

Change-Id: I969973b2d8165d7ff7a46e6b7e60ad07e58bfdee

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index ff27635..6e8dcf5 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2664,8 +2664,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 //  ausfuehren
 
 ScDocument* pUndoDoc = NULL;
-ScDocument* pRefUndoDoc = NULL;
-ScRefUndoData* pUndoData = NULL;
+
 if (bRecord)
 {
 bool bWholeCols = ( nStartRow == 0 && nEndRow == MAXROW );
@@ -2679,8 +2678,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 {
 rDoc.CopyToDocument( nStartCol, nStartRow, nStartTab, nEndCol, 
nEndRow, nEndTab,
 nUndoFlags, false, pUndoDoc );
-//  pRefUndoDoc = new ScDocument( SCDOCMODE_UNDO );
-//  pRefUndoDoc->InitUndo( &rDoc, 0, nTabCount-1, false, false );
 }
 
 if ( nDestTab != nStartTab )
@@ -2688,9 +2685,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 rDoc.CopyToDocument( nDestCol, nDestRow, nDestTab,
 nDestEndCol, nDestEndRow, nDestEndTab,
 nUndoFlags, false, pUndoDoc );
-
-//  pUndoData = new ScRefUndoData( &rDoc );
-
 rDoc.BeginDrawUndo();
 }
 
@@ -2712,7 +2706,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 nUndoEndCol,nUndoEndRow,nDestEndTab,
 HASATTR_MERGED | HASATTR_OVERLAPPED ))
 {
-rDoc.CopyFromClip( rSource, aSourceMark, IDF_ALL, pRefUndoDoc, 
pClipDoc );
+rDoc.CopyFromClip( rSource, aSourceMark, IDF_ALL, NULL, 
pClipDoc );
 for (nTab=nStartTab; nTab<=nEndTab; nTab++)
 {
 SCCOL nTmpEndCol = nEndCol;
@@ -2725,8 +2719,6 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const 
ScAddress& rDestPos,
 rDocShell.ErrorMessage(STR_MSSG_MOVEBLOCKTO_0);
 
 delete pUndoDoc;
-delete pRefUndoDoc;
-delete pUndoData;
 delete pClipDoc;
 return false;
 }
@@ -2762,28 +2754,16 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, 
const ScAddress& rDestPos,
 clipdoc does not contain a drawing layer.*/
 if ( pClipDoc->GetDrawLayer() )
 rDoc.CopyFromClip( aPasteDest, aDestMark, IDF_OBJECTS,
-pRefUndoDoc, pClipDoc, true, false, 
bIncludeFiltered );
+   NULL, pClipDoc, true, false, bIncludeFiltered );
 
 if (bRecord)
 {
-if (pRefUndoDoc)
-{
-//  alle Tabellen anlegen, damit Formeln kopiert werden 
koennen:
-pUndoDoc->AddUndoTab( 0, nTabCount-1, false, false );
-
-pRefUndoDoc->DeleteArea( nDestCol, nDestRow, nDestEndCol, 
nDestEndRow, aSourceMark, IDF_ALL );
-//  kopieren mit bColRowFlags=sal_False (#54194#)
-pRefUndoDoc->CopyToDocument( 0, 0, 0, MAXCOL, MAXROW, MAXTAB,
-IDF_FORMULA, false, pUndoDoc, 
NULL, false );
-delete pRefUndoDoc;
-}
-
 rDocShell.GetUndoManager()->AddUndoAction(
 new ScUndoDragDrop( &rDocShell, ScRange(
 nStartCol, nStartRow, nStartTab,
 nOldEndCol, nOldEndRow, nEndTab ),
 ScAddress( nDestCol, nDestRow, nDestTab ),
-bCut, pUndoDoc, pUndoData, bScenariosAdded ) );
+bCut, pUndoDoc, NULL, bScenariosAdded ) );
 }
 
 SCCOL nDestPaintEndCol = nDestEndCol;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - filter/source include/svx offapi/com sc/source sd/source svx/source sw/source

2014-07-31 Thread Stephan Bergmann
 filter/source/msfilter/msdffimp.cxx |4 +-
 filter/source/msfilter/svdfppt.cxx  |4 +-
 include/svx/sdtmfitm.hxx|   38 
 offapi/com/sun/star/style/XStyleLoader2.idl |2 +
 sc/source/core/data/postit.cxx  |8 ++---
 sd/source/core/sdpage.cxx   |8 ++---
 sd/source/filter/ppt/pptin.cxx  |2 -
 sd/source/ui/func/fuconrec.cxx  |4 +-
 sd/source/ui/func/futext.cxx|   20 +++---
 svx/source/svdraw/svdattr.cxx   |8 ++---
 svx/source/svdraw/svdoashp.cxx  |8 ++---
 svx/source/svdraw/svdotext.cxx  |   12 
 sw/source/filter/html/htmldrawreader.cxx|2 -
 sw/source/filter/ww8/ww8par.cxx |4 +-
 14 files changed, 55 insertions(+), 69 deletions(-)

New commits:
commit 68969cc61adecac481ae9656978ef952f435b310
Author: Stephan Bergmann 
Date:   Thu Jul 31 15:57:12 2014 +0200

Consistency around SdrMetricItem

...where some instances of SDRATTR_TEXT_MINFRAMEHEIGHT etc. where 
SdrMetricItem
while others where of trivial derived classes SdrTextMinFrameHeightItem 
etc.,
that appear to only existed for better-named constructors.

Change-Id: If0af79fbb803275ed09fc7b950868c5de7d61615

diff --git a/filter/source/msfilter/msdffimp.cxx 
b/filter/source/msfilter/msdffimp.cxx
index 0956d12..0fe240b 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5122,9 +5122,9 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
 if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
 {
 aSet.Put( SdrTextAutoGrowHeightItem( true ) );
-aSet.Put( SdrTextMinFrameHeightItem(
+aSet.Put( makeSdrTextMinFrameHeightItem(
 aNewRect.Bottom() - aNewRect.Top() ) );
-aSet.Put( SdrTextMinFrameWidthItem(
+aSet.Put( makeSdrTextMinFrameWidthItem(
 aNewRect.Right() - aNewRect.Left() ) );
 bFitText = true;
 }
diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 1426da8..4757135 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1088,12 +1088,12 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, 
DffObjData& rObjData, voi
 if ( nMinFrameHeight < 0 )
 nMinFrameHeight = 0;
 if ( !pTObj->ISA( SdrObjCustomShape ) )
-pTObj->SetMergedItem( SdrTextMinFrameHeightItem( 
nMinFrameHeight ) );
+pTObj->SetMergedItem( makeSdrTextMinFrameHeightItem( 
nMinFrameHeight ) );
 
 if ( nMinFrameWidth < 0 )
 nMinFrameWidth = 0;
 if ( !pTObj->ISA( SdrObjCustomShape ) )
-pTObj->SetMergedItem( SdrTextMinFrameWidthItem( nMinFrameWidth 
) );
+pTObj->SetMergedItem( makeSdrTextMinFrameWidthItem( 
nMinFrameWidth ) );
 
 // set margins at the borders of the textbox
 pTObj->SetMergedItem( SdrTextLeftDistItem( nTextLeft ) );
diff --git a/include/svx/sdtmfitm.hxx b/include/svx/sdtmfitm.hxx
index 00a84d1..a590dde 100644
--- a/include/svx/sdtmfitm.hxx
+++ b/include/svx/sdtmfitm.hxx
@@ -22,37 +22,21 @@
 #include 
 #include 
 
+inline SdrMetricItem makeSdrTextMinFrameHeightItem(long nHgt) {
+return SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT, nHgt);
+}
 
-// class SdrTextMinFrameHeighItem
+inline SdrMetricItem makeSdrTextMaxFrameHeightItem(long nHgt) {
+return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT, nHgt);
+}
 
-class SdrTextMinFrameHeightItem: public SdrMetricItem {
-public:
-SdrTextMinFrameHeightItem(long nHgt=0): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEHEIGHT,nHgt)  {}
+inline SdrMetricItem makeSdrTextMinFrameWidthItem(long nWdt) {
+return SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH, nWdt);
 };
 
-
-// class SdrTextMaxFrameHeightItem
-
-class SdrTextMaxFrameHeightItem: public SdrMetricItem {
-public:
-SdrTextMaxFrameHeightItem(long nHgt=0): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEHEIGHT,nHgt)  {}
-};
-
-
-// class SdrTextMinFrameWidthItem
-
-class SdrTextMinFrameWidthItem: public SdrMetricItem {
-public:
-SdrTextMinFrameWidthItem(long nWdt=0): 
SdrMetricItem(SDRATTR_TEXT_MINFRAMEWIDTH,nWdt)  {}
-};
-
-
-// class SdrTextMaxFrameWidthItem
-
-class SdrTextMaxFrameWidthItem: public SdrMetricItem {
-public:
-SdrTextMaxFrameWidthItem(long nWdt=0): 
SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH,nWdt)  {}
-};
+inline SdrMetricItem makeSdrTextMaxFrameWidthItem(long nWdt) {
+return SdrMetricItem(SDRATTR_TEXT_MAXFRAMEWIDTH, nWdt);
+}
 
 #endif
 
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index b89c22b..b573afe 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -646,8 +646,8 @@ void ScPostIt::CreateCaptionFromInit

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

2014-07-31 Thread Andrzej Hunt
 include/osl/process.h|4 
 sal/osl/unx/process_impl.cxx |5 -
 sal/osl/w32/process.cxx  |5 -
 3 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 533b9ab6fc425746ce30882b424715c97631d907
Author: Andrzej Hunt 
Date:   Thu Jul 31 15:37:52 2014 +0200

osl_areCommandArgsSet: ensure mutexes locked when accessing data.

Change-Id: I6b1f10e74aafc47e5618290d92087563c60e3c49

diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index b63f222..c70e111 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -193,7 +193,10 @@ oslProcessError SAL_CALL osl_getCommandArg (sal_uInt32 
nArg, rtl_uString ** strC
 
 int SAL_CALL osl_areCommandArgsSet (void)
 {
-return (g_command_args.m_nCount > 0);
+pthread_mutex_lock (&(g_command_args.m_mutex));
+int nRet = (int) (g_command_args.m_nCount > 0);
+pthread_mutex_unlock (&(g_command_args.m_mutex));
+return nRet;
 }
 
 /***
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 25f4e58..786e299 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -376,7 +376,10 @@ oslProcessError SAL_CALL osl_getCommandArg( sal_uInt32 
nArg, rtl_uString **strCo
 
 int SAL_CALL osl_areCommandArgsSet(void)
 {
-return (g_command_args.m_nCount > 0);
+osl_acquireMutex (*osl_getGlobalMutex());
+int nRet = (int) (g_command_args.m_nCount > 0);
+osl_releaseMutex (*osl_getGlobalMutex());
+return nRet;
 }
 
 
commit 41fbe85870d0f83c0f7eb59f6f517500b0323239
Author: Andrzej Hunt 
Date:   Thu Jul 31 15:34:04 2014 +0200

Mark osl_areCommandArgsSet as internal only.

Change-Id: Iac97290738088bd1ce7469ffee773994e7653efc

diff --git a/include/osl/process.h b/include/osl/process.h
index 876919a..78a937b 100644
--- a/include/osl/process.h
+++ b/include/osl/process.h
@@ -367,6 +367,9 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getCommandArg(
 sal_uInt32 nArg, rtl_uString **strCommandArg);
 
 /** Determine whether or not the command args have already been set.
+
+Deprecated: This function is only for internal use
+
 @return The command args are already set, and may not be set again.
 @since LibreOffice 4.3
 */
commit 7cfd6db1ff785bc86125655102d4b13d0d58f792
Author: Andrzej Hunt 
Date:   Thu Jul 31 15:32:08 2014 +0200

Add @since to osl_areCommandArgsSet.

Change-Id: Ib2d033f975a9b5bf7b667fd80e495d8f043faff0

diff --git a/include/osl/process.h b/include/osl/process.h
index 7fb619f..876919a 100644
--- a/include/osl/process.h
+++ b/include/osl/process.h
@@ -368,6 +368,7 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getCommandArg(
 
 /** Determine whether or not the command args have already been set.
 @return The command args are already set, and may not be set again.
+@since LibreOffice 4.3
 */
 SAL_DLLPUBLIC int SAL_CALL osl_areCommandArgsSet (void);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Luke  changed:

   What|Removed |Added

 Depends on||71961

--- Comment #197 from Luke  ---
Added Bug 71961. It's export analog mab was fixed, but the import still remains
broken.

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


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

2014-07-31 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx|9 +
 writerfilter/source/dmapper/DomainMapper.cxx |6 ++
 3 files changed, 15 insertions(+)

New commits:
commit ddb24728b2971f6ed64a0372acb166251f1d9c8f
Author: Miklos Vajna 
Date:   Thu Jul 31 15:45:31 2014 +0200

DOCX import: merging properties of different SDT's are not wanted

When the document starts with a table and both the A1 cell as well as
the document start has an SDT start, then we see both at the same time
when we check for pending SDT's in lcl_utext().

This leads to merging the properties of the two SDT's, which is clearly
not wanted. Fix the problem by clearning the SDT property list when we
see a start of a new property list: that produces a valid document.

Change-Id: I8fbe7bec02beebb26ed99fa7b08bc62225bff50c

diff --git a/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx 
b/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx
new file mode 100644
index 000..d3bf3bc
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/table-start-2-sdt.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 1e0b98d..73fab54 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -541,6 +541,15 @@ DECLARE_OOXMLEXPORT_TEST(test2Id, "2-id.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTableStart2Sdt, "table-start-2-sdt.docx")
+{
+if (xmlDocPtr pXmlDoc = parseExport())
+{
+// w:docPartGallery should be a child of , make sure 
it's not a child of w:text.
+assertXPath(pXmlDoc, "//w:sdt/w:sdtPr/w:text/w:docPartGallery", 0);
+}
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 37af96b..c9973c2 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -2451,6 +2451,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, 
PropertyMapPtr rContext )
 }
 }
 break;
+case NS_ooxml::LN_CT_SdtPr_rPr:
+{
+// Make sure properties from a pervious SDT are not merged with the 
current ones.
+m_pImpl->m_pSdtHelper->getInteropGrabBagAndClear();
+}
+break;
 default:
 {
 #ifdef DEBUG_DOMAINMAPPER
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

--- Comment #199 from Luke  ---
Correction. Added Bug 67347, the import analog of Bug 71961.

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


Minutes of ESC call: 2014-07-31

2014-07-31 Thread Eike Rathke

* Present:
+ Lionel, Stephan, Christian, Kendy, Eike, Muthu, Kohei, Markus,
  Robinson, Jacobo, Michael S, Miklos

* Completed Action Items
+ RC3 respin / RC4 with spell-checking patch (Cloph)
  + done, released as public final version
+ update + enable the bibisect on Windows (Cloph)
  + currently uploading, 201 builds, 1.8GB, ~9MB per build
+ enable checkin of windows bibisect (Cloph)
  + will be updated by tinderbox builds

* Pending Action Items:
+ ask UX advise wrt. wrench icons (revert or not ?) (Astron)
+ blog about the sad realities of web plugins (Bjoern)
+ setup some VM's that can be created on-demand (Cloph)
+ done for the hackfest, non-public
+ working on creating a public machine
+ open-source newer Synezip tests / speak at the conference (Umesh)
+ Ask for 1-2 more dev-list moderators & re-visit next-week (Michael)
+ contact Michael / the list when students show up (Jan Marek)

* GSOC Update (Cedric)
+ at least 6 students will be at the conference in Bern
+ a student presentation slot has been created:
+ thus students can prepare a 5-6 minute lightning talk on their project

* Release Engineering update (Christian)
+ 4.2.6 status
  + will be released tomorrow (Friday)
+ 4.3.0 retrospective / MABs ...
+ Android Remote
+ 4.3.1 late feature
  + OpenGL context on OSX including 3D models in impress (Markus)
+ all on track (Cloph)

* Windows quick starter reportedly broken in 4.3
  https://bugs.freedesktop.org/show_bug.cgi?id=80466
+ is it worth fixing this or should we just kill the quick starter?
+ do we have real data if it helps at all when turned on? (Kendy)
+ remove for 4.3.1 ? re-enable for 4.3.2 if fix is possible?
+ let's try that for 4.3.1 RC1

* how to deal with 10.5 OSX
+ wouldnt it need a fork anyway, if we introduce C++11 features?
+ maybe, but I at least don't care; has always been communicated
  that 10.5 commits on master are only acceptable as long as
  they don't hinder us going forward (Stephan)
+ create a branch Douglas can work on

* Crashtest update (Markus)
+ 
http://dev-builds.libreoffice.org/crashtest/82127a86dc1d127a3b6caa8279163aab1ccf119a/
+ new results - complete run
+ hopefully new builds next week

* Certification Committee (Stephan/Bjoern/Kendy)
 + waiting until ~September

* Hackfests (Bjoern)
+ Boston Hackfest
* Went well, many thanks to Xamarin for hosting.
  + https://wiki.documentfoundation.org/Events/2014/US_Summer_Hackfest
  + Badly need more easy hacks ...
+ Interest in Portland, OR for hosting a future hackfest.
+ Munich hack-fest (Jan-Marek):
http://www.it-muenchen-blog.de/2014/07/bug-squashing-party-2014/
+ will have a BSP come-together; if someone says they're coming
  just show up etc.
   + November 21st-23rd, 2014
   https://wiki.debian.org/BSP/2014/11/de/Munich
   + we should drop by with 2 or 3 developers, if possible
+ Toulouse Hackfest ...
+ Confirmed for Nov. 15-16th
+ more details: 
https://wiki.documentfoundation.org/Hackfest/Toulouse2014
+ Be great to have -really- easy easy hacks for devs (Bjoern)

* QA (Robinson)
+ Also possible crasher if Quickstarter is enabled
+ https://bugs.freedesktop.org/show_bug.cgi?id=80927
+ other recently "interesting" bugs
+ VIEWING: Bad Font Rendering in KDE
  https://bugs.freedesktop.org/show_bug.cgi?id=59818
+ 4.3.0 looks OK from QA point of view? (Kendy)
+ (other than what I mentioned) yes (Robinson)
+ unconfirmed bug count under 700

* UX Update (?)
+ [ no Astron / Mirek ]

* Bern Conference
  + book hotel if you didn't already, many are full
  + there will be a PGP keysigning party, see
+ https://conference.libreoffice.org/2014/ksp-keysigning-party/
  upload your key as indicated
+ not only to strengthen the web of trust but also fun socializing

* QA stats:
  + https://bugs.freedesktop.org/page.cgi?id=weekly-bug-summary.html
+141-132(+9 overall)
many thanks to the top bug squashers:
Joel Madero 14
Foss 9
ign_christian8
Jorendc  8
tommy27  7
Michael Stahl6
Julien Nabet 5
David Tardon 5
Owen Genat   5
Jean-Baptiste Faure  5
Caolán McNamara  4

* Open 4.4 MAB
  + 3/7 3/7 2/5 1/2 1/1
  + https://bugs.freedesktop.org/showdependencytree.cgi?id=79641&hide_resolved=1

* Open 4.3 MAB
  + 11/47 14/47 14/45 19/43 10/32 6/27 5/24 5/22 3/20 5/16 4/12 2/8 3/7 2/5
 23%   29%   33%   44%   31%   22%  20%  22%  15%
  + https://bugs.freedesktop.org/showdependencytree.cgi?id=75025&hide_resolved=1

* Open 4.2 MAB
  + 84/236 85/235 82/229 81/222 76/215 74/212 74/210 71/20

[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Luke  changed:

   What|Removed |Added

 Depends on|71961   |67347

--- Comment #198 from Luke  ---
Added Bug 71961. It's export analog mab was fixed, but the import still remains
broken.

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


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

2014-07-31 Thread Miklos Vajna
 sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx |9 +
 writerfilter/source/dmapper/SdtHelper.cxx |2 ++
 3 files changed, 11 insertions(+)

New commits:
commit 8fea536cebefe319a7fd5971b28e0936ac91ecb9
Author: Miklos Vajna 
Date:   Thu Jul 31 17:20:43 2014 +0200

SdtHelper::createDateControl: clear the property list after reading it

Otherwise it may happen that the property list will be read twice, and
on export we'll create two  for a single imported one.

Change-Id: I57ab595f956c5e808fc73fe644ee3e249a1fc1ed

diff --git a/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx 
b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx
new file mode 100644
index 000..038ab11
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/sdt-date-duplicate.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
index 73fab54..2e5844a 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
@@ -550,6 +550,15 @@ DECLARE_OOXMLEXPORT_TEST(testTableStart2Sdt, 
"table-start-2-sdt.docx")
 }
 }
 
+DECLARE_OOXMLEXPORT_TEST(testSdtDateDuplicate, "sdt-date-duplicate.docx")
+{
+if (xmlDocPtr pXmlDoc = parseExport())
+{
+// Single  was exported as 2  elements.
+assertXPath(pXmlDoc, "//w:sdt", 1);
+}
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/SdtHelper.cxx 
b/writerfilter/source/dmapper/SdtHelper.cxx
index bf268a3..693b248 100644
--- a/writerfilter/source/dmapper/SdtHelper.cxx
+++ b/writerfilter/source/dmapper/SdtHelper.cxx
@@ -131,6 +131,8 @@ void SdtHelper::createDateControl(OUString& rContentText, 
beans::PropertyValue a
 aGrabBag["CharFormat"] <<= aCharFormat.Value;
 // merge in properties like ooxml:CT_SdtPr_alias and friends.
 aGrabBag.update(comphelper::SequenceAsHashMap(m_aGrabBag));
+// and empty the property list, so they won't end up on the next sdt as 
well
+m_aGrabBag.realloc(0);
 
 std::vector aItems;
 createControlShape(lcl_getOptimalWidth(m_rDM_Impl.GetStyleSheetTable(), 
rContentText, aItems), xControlModel, aGrabBag.getAsConstPropertyValueList());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread Matthew Pottage
 writerfilter/source/dmapper/DomainMapper.cxx |   46 +--
 writerfilter/source/dmapper/DomainMapperTableHandler.cxx |  159 --
 writerfilter/source/dmapper/DomainMapperTableManager.cxx |2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx|   44 +-
 writerfilter/source/dmapper/NumberingManager.cxx |   85 ++---
 writerfilter/source/dmapper/PropertyMap.cxx  |  230 ---
 writerfilter/source/dmapper/PropertyMap.hxx  |   35 +-
 writerfilter/source/dmapper/SdtHelper.cxx|   12 
 writerfilter/source/dmapper/StyleSheetTable.cxx  |   44 +-
 9 files changed, 325 insertions(+), 332 deletions(-)

New commits:
commit 4c3ba3a413be7339115ea5e6edc825a8434cd345
Author: Matthew Pottage 
Date:   Sat Jul 26 17:17:27 2014 +0100

fdo#75757: Remove inheritance from std::map.

Done for writerfilter::dmapper::PropertyMap.

Added public functions getPropertyValue, bool isSet and Erase. The function
getPropertyValue returns boost::optional,
where PropertyMap::Property is an alias for 
std::pair.

Fixed all resulting compilation errors. The functions which iterated the map
(ListLevel::GetCharStyleProperties, ListLevel::GetLevelProperties and
SectionPropertyMap::_ApplyProperties) have been written to either used
GetPropertyValues or not iterate over the PropertyMap's attributes.

The properties of the public member functions are now properly used
(Erase and Insert(...,false)).

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

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index c9973c2..5507934 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -184,7 +184,6 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 OUString sStringValue = val.getString();
 
 SectionPropertyMap * pSectionContext = m_pImpl->GetSectionContext();
-PropertyMap::iterator oldPropValue;
 switch( nName )
 {
 case NS_ooxml::LN_CT_Lvl_start:
@@ -374,16 +373,10 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 #define SINGLE_LINE_SPACING 240
 style::LineSpacing aSpacing;
 PropertyMapPtr pTopContext = m_pImpl->GetTopContext();
-bool bFound = false;
-PropertyMap::iterator aLineSpacingIter;
-if (pTopContext)
-{
-aLineSpacingIter = pTopContext->find(PROP_PARA_LINE_SPACING);
-bFound = aLineSpacingIter != pTopContext->end();
-}
-if (bFound)
+boost::optional aLineSpacingVal;
+if (pTopContext && (aLineSpacingVal = 
pTopContext->getProperty(PROP_PARA_LINE_SPACING)) )
 {
-aLineSpacingIter->second.getValue() >>= aSpacing;
+aLineSpacingVal->second >>= aSpacing;
 }
 else
 {
@@ -404,7 +397,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 {
 // direct formatting is applied for table cell data
 TablePropertyMapPtr pTblCellWithDirectFormatting(new 
TablePropertyMap);
-pTblCellWithDirectFormatting->insert(std::pair< 
PropertyIds, PropValue >(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )));
+
pTblCellWithDirectFormatting->Insert(PROP_PARA_LINE_SPACING, uno::makeAny( 
aSpacing ), false);
 
m_pImpl->getTableManager().cellProps(pTblCellWithDirectFormatting);
 }
 }
@@ -1035,11 +1028,11 @@ sal_Int32 lcl_getCurrentNumberingProperty(
 static bool ExchangeLeftRight( const PropertyMapPtr rContext, 
DomainMapper_Impl* m_pImpl )
 {
 bool bExchangeLeftRight = false;
-PropertyMap::const_iterator aPropParaIte = 
rContext->find(PROP_WRITING_MODE);
-if( aPropParaIte != rContext->end())
+boost::optional aPropPara = 
rContext->getProperty(PROP_WRITING_MODE);
+if( aPropPara )
 {
 sal_Int32 aAdjust ;
-if( (aPropParaIte->second.getValue() >>= aAdjust) && aAdjust == 
text::WritingMode2::RL_TB )
+if( (aPropPara->second >>= aAdjust) && aAdjust == 
text::WritingMode2::RL_TB )
 bExchangeLeftRight = true;
 }
 else
@@ -1048,11 +1041,11 @@ static bool ExchangeLeftRight( const PropertyMapPtr 
rContext, DomainMapper_Impl*
 StyleSheetEntryPtr pTable = 
m_pImpl->GetStyleSheetTable()->FindDefaultParaStyle();
 if ( pTable )
 {
-PropertyMap::const_iterator aPropStyle = 
pTable->pProperties->find(PROP_WRITING_MODE);
-if( aPropStyle != pTable->pProperties->end())
+boost::optional aPropStyle = 
pTable->pProperties->getProperty(PROP_WRITING_MODE);
+if( aP

[Bug 75757] remove inheritance to std::map and std::vector

2014-07-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=75757

--- Comment #13 from Commit Notification 
 ---
Matthew Pottage committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4c3ba3a413be7339115ea5e6edc825a8434cd345

fdo#75757: Remove inheritance from std::map.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

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


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

2014-07-31 Thread Michael Stahl
 writerfilter/source/dmapper/DomainMapper.cxx |2 +-
 writerfilter/source/dmapper/NumberingManager.cxx |1 -
 writerfilter/source/dmapper/PropertyMap.cxx  |1 -
 3 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 3bc61ac26f00e5bc3c7ae4ab8a44d0d7e519e2c1
Author: Michael Stahl 
Date:   Thu Jul 31 17:34:50 2014 +0200

writerfilter: fix some -Werror=unused in previous patch

Change-Id: Iba7db7f9375807e97a4cdddc0c873fa3c9f6cfb6

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 5507934..bd0b370 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -428,7 +428,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
 // ooxml::CT_Spacing_line, then it should get the rule
 // after lineRule as well.
 TablePropertyMapPtr pTblCellWithDirectFormatting(new 
TablePropertyMap);
-pTblCellWithDirectFormatting->insert(std::pair< 
PropertyIds, PropValue >(PROP_PARA_LINE_SPACING, uno::makeAny( aSpacing )));
+
pTblCellWithDirectFormatting->Insert(PROP_PARA_LINE_SPACING, 
uno::makeAny(aSpacing), false);
 
m_pImpl->getTableManager().cellProps(pTblCellWithDirectFormatting);
 }
 }
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx 
b/writerfilter/source/dmapper/NumberingManager.cxx
index d5cf412..abd78b7 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -220,7 +220,6 @@ static bool IgnoreForCharStyle(const OUString& aStr)
 uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )
 {
 PropertyValueVector_t rProperties;
-PropertyNameSupplier& aPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 
 uno::Sequence< beans::PropertyValue > vPropVals = 
PropertyMap::GetPropertyValues();
 beans::PropertyValue* aValIter = vPropVals.begin();
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx 
b/writerfilter/source/dmapper/PropertyMap.cxx
index 18e68e7..b1d5c5b 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1182,7 +1182,6 @@ public:
 void SectionPropertyMap::_ApplyProperties(
 uno::Reference< beans::XPropertySet > const& xStyle)
 {
-PropertyNameSupplier& rPropNameSupplier = 
PropertyNameSupplier::GetPropertyNameSupplier();
 uno::Reference const xMultiSet(xStyle,
 uno::UNO_QUERY);
 
___
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' - editeng/source include/svx svx/source

2014-07-31 Thread matteocam
 editeng/source/outliner/outliner.cxx |   38 +--
 include/svx/svdotext.hxx |   13 ---
 svx/source/svdraw/svdotext.cxx   |   17 +++
 svx/source/svdraw/svdotxed.cxx   |8 +++
 4 files changed, 58 insertions(+), 18 deletions(-)

New commits:
commit 664055f31a4a1178dd88e2b642d27930bb64568e
Author: matteocam 
Date:   Thu Jul 31 18:58:16 2014 +0300

Copy second paragraph when breakup occurs

Change-Id: I937c80f0f07b3bf1d5052d962bfd5d075159014f

diff --git a/editeng/source/outliner/outliner.cxx 
b/editeng/source/outliner/outliner.cxx
index ff9217a..f196875 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2090,11 +2090,45 @@ bool Outliner::HasParaFlag( const Paragraph* pPara, 
sal_uInt16 nFlag ) const
 
 OutlinerParaObject *Outliner::GetNonOverflowingParaObject() const
 {
-return NULL;
+/* XXX:
+ * nCount should be the number of paragraphs of the non overflowing text
+ * nStart should be the starting paragraph of the non overflowing text 
(XXX: Always 0?)
+*/
+
+if ( GetParagraphCount() < 1 )
+return NULL;
+
+// XXX: returns first paragraph
+sal_Int32 nStartPara = 0;
+sal_Int32 nCount = 1;
+
+// code inspired from Outliner::CreateParaObject
+
+// we need a paragraph data vector and the actual text
+ParagraphDataVector aParagraphDataVector(nCount);
+const sal_Int32 nLastPara(nStartPara + nCount - 1);
+
+for(sal_Int32 nPara(nStartPara); nPara <= nLastPara; nPara++)
+{
+aParagraphDataVector[nPara-nStartPara] = *GetParagraph(nPara);
+}
+
+EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount 
);
+const bool bIsEditDoc(OUTLINERMODE_TEXTOBJECT == ImplGetOutlinerMode());
+
+OutlinerParaObject* pPObj = new OutlinerParaObject(*pText, 
aParagraphDataVector, bIsEditDoc);
+pPObj->SetOutlinerMode(GetMode());
+
+delete pText;
+return pPObj;
 }
 OutlinerParaObject *Outliner::GetOverflowingParaObject() const
 {
-return NULL;
+// XXX: returns second paragraph if there is one, first otherwise
+if ( GetParagraphCount() >= 2 )
+return CreateParaObject(1, 1);
+else
+return CreateParaObject(0, 1);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index 841bf54..b5fa059 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -349,18 +349,7 @@ public:
 
 // Chaining
 bool IsToBeChained() const;
-SdrTextObj *GetNextLinkInChain() const {
-/* FIXME(matteocam) return mpNextInChain; */
-if ( pPage && pPage->GetObjCount() > 1) {
-pNextTextObj =  dynamic_cast< SdrTextObj * >( pPage->GetObj(1) );
-if ( pNextTextObj == NULL)
-return NULL;
-return pNextTextObj;
-} else {
-fprintf(stderr, "Make New Object please\n");
-return NULL;
-}
-}
+SdrTextObj *GetNextLinkInChain() const;
 
 SdrObjKind GetTextKind() const { return eTextKind; }
 
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 0b5e690..1c6a524 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -2004,6 +2004,23 @@ void SdrTextObj::SetObjectItemNoBroadcast(const 
SfxPoolItem& rItem)
 static_cast< sdr::properties::TextProperties& 
>(GetProperties()).SetObjectItemNoBroadcast(rItem);
 }
 
+SdrTextObj* SdrTextObj::GetNextLinkInChain() const
+{
+/* FIXME(matteocam) return mpNextInChain; */
+SdrTextObj *pNextTextObj = NULL;
+
+if ( pPage && pPage->GetObjCount() > 1) {
+pNextTextObj =  dynamic_cast< SdrTextObj * >( pPage->GetObj(1) );
+if ( pNextTextObj == NULL)
+return NULL;
+return pNextTextObj;
+} else {
+fprintf(stderr, "Make New Object please\n");
+return NULL;
+}
+
+}
+
 
 
 // The concept of the text object:
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index af34e51..f6d3fba 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -251,11 +251,11 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* 
pPaperMax, Rectangle* p
 
 void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
 {
+OutlinerParaObject* pNewText = NULL;
+OutlinerParaObject* pNextText = NULL;
+
 if(rOutl.IsModified())
 {
-OutlinerParaObject* pNewText = NULL;
-OutlinerParaObject* pOverflownText = NULL;
-
 // to make the gray field background vanish  again
 rOutl.UpdateFields();
 
@@ -295,7 +295,7 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
 // sets text to next box
 if (pNextText != NULL) {
 SdrTextObj *pNextTextObj = GetNextLinkInChain();
-pNextTextObj->SetOutlinerParaObject( pOverflownText );
+pNextTextObj->SetOutlinerParaObject( pNextTe

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

2014-07-31 Thread Tor Lillqvist
 sd/source/ui/unoidl/unomodel.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 53e4b24c9ee9f2114bbc6b820ece4c469cd811d5
Author: Tor Lillqvist 
Date:   Thu Jul 31 21:16:54 2014 +0300

WaE: 'aPageKind' may be used uninitialized in this function

Change-Id: Idb44259f11715b1d2c769bfebca7300cc397b7cf

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 82281dd..97de832 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -2276,7 +2276,7 @@ void SdXImpressDocument::setPartMode( 
LibreOfficeKitPartMode ePartMode )
 return;
 }
 
-PageKind aPageKind;
+PageKind aPageKind( PK_STANDARD );
 switch ( ePartMode )
 {
 case LOK_PARTMODE_EMBEDDEDOBJ:
@@ -2289,7 +2289,6 @@ void SdXImpressDocument::setPartMode( 
LibreOfficeKitPartMode ePartMode )
 // And let's fall through in a normal build.
 case LOK_PARTMODE_DEFAULT:
 case LOK_PARTMODE_SLIDE:
-aPageKind = PK_STANDARD;
 break;
 case LOK_PARTMODE_SLIDENOTES:
 aPageKind = PK_NOTES;
___
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' - include/svx svx/source

2014-07-31 Thread matteocam
 include/svx/svdotext.hxx |3 +
 svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |3 -
 svx/source/svdraw/svdotextdecomposition.cxx  |   35 ++-
 svx/source/svdraw/svdotxed.cxx   |   11 +
 4 files changed, 18 insertions(+), 34 deletions(-)

New commits:
commit 6ae67a97b82445ab3e1cf0fd5cc3048d2d8308fb
Author: matteocam 
Date:   Thu Jul 31 21:47:38 2014 +0300

Only non overflown text kept for original box. No copying occurs.

Change-Id: Ic7b1afd8e4617baf69407338fcf233d24dee975e

diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx
index b5fa059..dce4166 100644
--- a/include/svx/svdotext.hxx
+++ b/include/svx/svdotext.hxx
@@ -214,6 +214,9 @@ public:
 const Point& GetTextEditOffset() const { return maTextEditOffset; }
 void SetTextEditOffset(const Point& rNew) { maTextEditOffset = rNew; }
 
+// FIXME(matteocam) // XXX: move as protected
+OutlinerParaObject *mpOverflowingText = NULL;
+
 protected:
 
 //FIXME(matteocam)
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index b0d879c..a61e61e 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -307,12 +307,9 @@ namespace drawinglayer
 }
 else if( rText.isToBeChained() && !rText.isInEditMode() ) // 
FIXME(matteocam)
 {
-//bool b = true; // XXX: Chained Text by default!
-//if (b)
 pNew = new SdrChainedTextPrimitive2D(
 &rText.getSdrText(),
 rText.getOutlinerParaObject() );
-//else // end FIXME
 }
 else // text in range
 {
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 67a3fde7..ad2cfe6 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -1508,32 +1508,21 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 const drawinglayer::primitive2d::SdrChainedTextPrimitive2D& 
rSdrChainedTextPrimitive,
 const drawinglayer::geometry::ViewInformation2D& aViewInformation) 
const
 {
-/* BEGIN Experiments */
 // FIXME(matteocam)
-
-// we use (text) object 0 and 1 for these experiments:
-// copying text from one to the other.
-
-SdrTextObj *pNextTextObj;
-if ( pPage && pPage->GetObjCount() > 1) {
-pNextTextObj =  dynamic_cast< SdrTextObj * >(
-pPage->GetObj(1) );
-if ( pNextTextObj == NULL)
-return;
-} else {
-fprintf(stderr, "Make New Object please\n");
-return;
-}
-
-// for debugging purposes:
-// carry out experiments only when setting b=false from gdb
-//bool b = true;
-//if (!b) {
 /* fprintf(stderr, "Object #0 = %p, Object #1 = %p\n",
 pPage->GetObj(0), pPage->GetObj(1)); */
-impCopyTextInTextObj(pNextTextObj); // just do it
-//return;
-//}
+
+//impCopyTextInTextObj(pNextTextObj); // just do it
+
+// put overflowing text in next text box
+if (mpOverflowingText != NULL) {
+SdrTextObj *pNextTextObj = GetNextLinkInChain();
+//pNextTextObj->SetOutlinerParaObject( mpOverflowingText );
+
+//SdrOutliner rOutl = pNextTextObj->ImpGetDrawOutliner();
+//pNextTextObj->BegTextEdit( rOutl );
+// XXX: Also, will all those calls currently in impCopyTextInTextObj 
be necessary too?
+}
 
 drawinglayer::primitive2d::Primitive2DSequence aRetval(0);
 rTarget = aRetval;
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index f6d3fba..ec533bb 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -266,6 +266,9 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
 // set non overflow part of text to current box
 pNewText = rOutl.GetNonOverflowingParaObject();
 pNextText = rOutl.GetOverflowingParaObject();
+// set overflowing text for SdrChainedTextPrimitive2D
+mpOverflowingText = pNextText;
+//SetOverflowingText( pNextText );
 
 // XXX: should this SdrTextObj know "how much text to ask" by 
CreateParaObject?
 //  No, it must be the editengine (or outliner) to give it 
since it is
@@ -292,14 +295,6 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
 nStat &= ~EE_CNTRL_AUTOPAGESIZE;
 rOutl.SetControlWord(nStat);
 
-// sets text to next box
-if (pNextText != NULL) {
-SdrTextObj *pNextTextObj = GetNextLinkInChain();
-pNextTextObj->SetOutlinerParaObject( pNextText );
-pNextTextObj->BegTextEdit( rOutl );
-// XXX: Also

[Bug 75025] LibreOffice 4.3 most annoying bugs

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

tommy27  changed:

   What|Removed |Added

 Depends on||81972

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


[Bug 75025] LibreOffice 4.3 most annoying bugs

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

tommy27  changed:

   What|Removed |Added

 Depends on|81972   |

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


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

2014-07-31 Thread matteocam
 svx/source/svdraw/svdotextdecomposition.cxx |   58 ++--
 svx/source/svdraw/svdotxed.cxx  |8 ---
 2 files changed, 30 insertions(+), 36 deletions(-)

New commits:
commit d7270b2f63688bb09ed0a9328a2fde57b38eace6
Author: matteocam 
Date:   Thu Jul 31 22:28:15 2014 +0300

Copy second paragraph by impCopyTextInTextObj

Change-Id: Ia2131655e4c280c8f054dbd3dda2f230cabff415

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index ad2cfe6..fdfabdd 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -775,35 +775,33 @@ void SdrTextObj::impCopyTextInTextObj(SdrTextObj 
*pNextTextObj) const
 return;
 
 // trying to copy text in obj 1
-SdrText* pText = getActiveText();
+//SdrText* pText = getActiveText();
+
+Rectangle &aNextRect = pNextTextObj->aRect;
+SdrOutliner& rOutliner = pNextTextObj->ImpGetDrawOutliner();
+rOutliner.SetPaperSize(
+Size(
+aNextRect.Right()-aNextRect.Left(),
+aNextRect.Bottom()-aNextRect.Top()
+)
+ );
+rOutliner.SetUpdateMode(true);
+rOutliner.SetText(*mpOverflowingText);  // XXX: copies overflown text
+Size aNewSize(rOutliner.CalcTextSize());
+// create OutlinerParaObject for pNextTextObj
+OutlinerParaObject* pNewParaObject=rOutliner.CreateParaObject();
+rOutliner.Clear();
+
+aNewSize.Width()++; // because of possible rounding errors
+aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
+aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
+
+Rectangle aNewRect(aNextRect);
+aNewRect.SetSize(aNewSize);
+pNextTextObj->ImpJustifyRect(aNewRect);
+if (aNewRect!=aNextRect) {
+pNextTextObj->SetLogicRect(aNewRect);
 
-if( pText!=NULL && pText->GetOutlinerParaObject() && pModel!=NULL)
-{
-Rectangle &aNextRect = pNextTextObj->aRect;
-SdrOutliner& rOutliner = pNextTextObj->ImpGetDrawOutliner();
-rOutliner.SetPaperSize(
-Size(
-aNextRect.Right()-aNextRect.Left(),
-aNextRect.Bottom()-aNextRect.Top()
-)
- );
-rOutliner.SetUpdateMode(true);
-rOutliner.SetText(*pText->GetOutlinerParaObject());
-Size aNewSize(rOutliner.CalcTextSize());
-// create OutlinerParaObject for pNextTextObj
-OutlinerParaObject* pNewParaObject=rOutliner.CreateParaObject();
-rOutliner.Clear();
-
-aNewSize.Width()++; // because of possible rounding errors
-aNewSize.Width()+=GetTextLeftDistance()+GetTextRightDistance();
-aNewSize.Height()+=GetTextUpperDistance()+GetTextLowerDistance();
-
-Rectangle aNewRect(aNextRect);
-aNewRect.SetSize(aNewSize);
-pNextTextObj->ImpJustifyRect(aNewRect);
-if (aNewRect!=aNextRect) {
-pNextTextObj->SetLogicRect(aNewRect);
-}
 
 // Set text object's string
 pNextTextObj->SetOutlinerParaObject( pNewParaObject );
@@ -1517,8 +1515,10 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 // put overflowing text in next text box
 if (mpOverflowingText != NULL) {
 SdrTextObj *pNextTextObj = GetNextLinkInChain();
-//pNextTextObj->SetOutlinerParaObject( mpOverflowingText );
+assert (pNextTextObj);
+impCopyTextInTextObj(pNextTextObj);
 
+//pNextTextObj->SetOutlinerParaObject( mpOverflowingText );
 //SdrOutliner rOutl = pNextTextObj->ImpGetDrawOutliner();
 //pNextTextObj->BegTextEdit( rOutl );
 // XXX: Also, will all those calls currently in impCopyTextInTextObj 
be necessary too?
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index ec533bb..cffa559 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -265,16 +265,10 @@ void SdrTextObj::EndTextEdit(SdrOutliner& rOutl)
 {
 // set non overflow part of text to current box
 pNewText = rOutl.GetNonOverflowingParaObject();
-pNextText = rOutl.GetOverflowingParaObject();
 // set overflowing text for SdrChainedTextPrimitive2D
+pNextText = rOutl.GetOverflowingParaObject();
 mpOverflowingText = pNextText;
 //SetOverflowingText( pNextText );
-
-// XXX: should this SdrTextObj know "how much text to ask" by 
CreateParaObject?
-//  No, it must be the editengine (or outliner) to give it 
since it is
-//  a special case: we want to have something that may be 
interrupted
-//  within a paragraph itself.
-
 }
 else // standard case
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 46259] rewrite mysql connector to use mariadb client library

2014-07-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=46259

Matthew Pottage  changed:

   What|Removed |Added

   Assignee|libreoffice-b...@lists.free |matthewpottage@invincitech.
   |desktop.org |com
 CC||matthewpottage@invincitech.
   ||com

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


[Bug 46259] rewrite mysql connector to use mariadb client library

2014-07-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=46259

--- Comment #17 from Matthew Pottage  ---
I've started working on this. At the moment I am investigating the codebase and
how much it depends on the MySQL C++ Library.

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


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

2014-07-31 Thread Markus Mohrhard
 formula/source/ui/dlg/FormulaHelper.cxx  |4 +++-
 include/formula/IFunctionDescription.hxx |5 ++---
 sc/source/core/tool/chartlis.cxx |   23 ---
 3 files changed, 13 insertions(+), 19 deletions(-)

New commits:
commit 42cd7a8a26201fa1db98d6498198db23abef87fc
Author: Markus Mohrhard 
Date:   Thu Jul 31 22:09:55 2014 +0200

fix memory leak around chart listeners

Found by Lsan.

The following pattern leaks memory:

boost::ptr_container x;
x.release().release();

Change-Id: Iaf52e4f2d6a96266fc6afd65ef8027d80c97a08b

diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 1fa991a..be56325 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -519,39 +519,32 @@ public:
 
 void ScChartListenerCollection::FreeUnused()
 {
-std::vector aUsed, aUnused;
+ListenersType aUsed, aUnused;
 
 // First, filter each listener into 'used' and 'unused' categories.
 {
-ListenersType::iterator it = maListeners.begin(), itEnd = 
maListeners.end();
-for (; it != itEnd; ++it)
+while(!maListeners.empty())
 {
-ScChartListener* p = it->second;
+ScChartListener* p = maListeners.begin()->second;
 if (p->IsUno())
 {
 // We don't delete UNO charts; they are to be deleted 
separately via FreeUno().
-aUsed.push_back(p);
+aUsed.transfer(maListeners.begin(), maListeners);
 continue;
 }
 
 if (p->IsUsed())
 {
 p->SetUsed(false);
-aUsed.push_back(p);
+aUsed.transfer(maListeners.begin(), maListeners);
 }
 else
-aUnused.push_back(p);
+aUnused.transfer(maListeners.begin(), maListeners);
+
 }
 }
 
-// Release all pointers currently managed by the ptr_map container.
-maListeners.release().release();
-
-// Re-insert the listeners we need to keep.
-std::for_each(aUsed.begin(), aUsed.end(), 
InsertChartListener(maListeners));
-
-// Now, delete the ones no longer needed.
-std::for_each(aUnused.begin(), aUnused.end(), 
boost::checked_deleter());
+std::swap(aUsed, maListeners);
 }
 
 void ScChartListenerCollection::FreeUno( const uno::Reference< 
chart::XChartDataChangeEventListener >& rListener,
commit 3d6521280929ecacc53b7c358d29d0b5d31b3462
Author: Markus Mohrhard 
Date:   Thu Jul 31 21:43:59 2014 +0200

fix memory leak around function descriptions

Found by Lsan.

Change-Id: Ia443ed6eb2a20854998a615f3c2bd9fdac156a8c

diff --git a/formula/source/ui/dlg/FormulaHelper.cxx 
b/formula/source/ui/dlg/FormulaHelper.cxx
index 5805778..6c999bd 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -21,6 +21,8 @@
 #include 
 #include 
 
+#include 
+
 namespace formula
 {
 
@@ -91,7 +93,7 @@ bool FormulaHelper::GetNextFunc( const OUString&  rFormula,
 const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
 for(sal_uInt32 j= 0; j < nCategoryCount && !*ppFDesc; ++j)
 {
-const IFunctionCategory* pCategory = 
m_pFunctionManager->getCategory(j);
+boost::scoped_ptr 
pCategory(m_pFunctionManager->getCategory(j));
 const sal_uInt32 nCount = pCategory->getCount();
 for(sal_uInt32 i = 0 ; i < nCount; ++i)
 {
diff --git a/include/formula/IFunctionDescription.hxx 
b/include/formula/IFunctionDescription.hxx
index a3570bb..579d36b 100644
--- a/include/formula/IFunctionDescription.hxx
+++ b/include/formula/IFunctionDescription.hxx
@@ -60,7 +60,7 @@ namespace formula
 ~IFunctionManager() {}
 };
 
-class SAL_NO_VTABLE IFunctionCategory
+class IFunctionCategory
 {
 public:
 IFunctionCategory(){}
@@ -70,8 +70,7 @@ namespace formula
 virtual sal_uInt32  getNumber() const = 0;
 virtual OUString getName() const = 0;
 
-protected:
-~IFunctionCategory() {}
+virtual ~IFunctionCategory() {}
 };
 
 class SAL_NO_VTABLE IFunctionDescription
___
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' - svx/source

2014-07-31 Thread matteocam
 svx/source/svdraw/svdotextdecomposition.cxx |   39 +---
 1 file changed, 2 insertions(+), 37 deletions(-)

New commits:
commit 1d7f1e71abaaa63ea585a7a4317370c5bd16f734
Author: matteocam 
Date:   Fri Aug 1 00:01:26 2014 +0300

No more arbitrary truncation of lines at 4

Change-Id: Ibea3cd5d664052c99b10629a5a5cd45a3b56c4b0

diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index fdfabdd..cf2f455 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -103,7 +103,6 @@ namespace
 void impFlushLinePrimitivesToParagraphPrimitives();
 void impHandleDrawPortionInfo(const DrawPortionInfo& rInfo);
 void impHandleDrawBulletInfo(const DrawBulletInfo& rInfo);
-void impHandleTruncatedPortion(const DrawPortionInfo& rInfo);
 
 public:
 impTextBreakupHandler(SdrOutliner& rOutliner)
@@ -511,23 +510,7 @@ namespace
 
 void impTextBreakupHandler::impHandleDrawPortionInfo(const 
DrawPortionInfo& rInfo)
 {
-// FIXME(matteocam)
-
-/*
- * We want to break the text at the 10th character if we are at
- * the end of the paragraph.
- * XXX: How to send it back to editengine?
- *  [AutoFit uses SetGlobalStretch... from Outliner]
- * XXX: how to pass on to the rest of the text "This should be
- *  drawn somewhere else"?
-*/
-
-bool bTruncateText = rInfo.mbEndOfParagraph; // arbitrary property
-
-if ( bTruncateText ) // truncate text
-impHandleTruncatedPortion(rInfo);
-else // no chaining or truncating
-impCreateTextPortionPrimitive(rInfo);
+impCreateTextPortionPrimitive(rInfo);
 
 if(rInfo.mbEndOfLine || rInfo.mbEndOfParagraph)
 {
@@ -540,24 +523,6 @@ namespace
 }
 }
 
-void impTextBreakupHandler::impHandleTruncatedPortion(const 
DrawPortionInfo& rInfo)
-{
-// truncate portion at 4
-int nTruncationPoint = 4;
-
-// make truncated DrawPortionInfo
-DrawPortionInfo rTruncatedPortionInfo = rInfo;
-rTruncatedPortionInfo.mnTextLen =
-std::min( rInfo.mnTextLen, nTruncationPoint );
-
-// make text portion primitive with the first part of the portion
-impCreateTextPortionPrimitive(rTruncatedPortionInfo);
-
-// if text is left in original portion, send it back to editeng
-// TODO(matteocam)
-}
-
-
 void impTextBreakupHandler::impHandleDrawBulletInfo(const DrawBulletInfo& 
rInfo)
 {
 basegfx::B2DHomMatrix aNewTransform;
@@ -1516,7 +1481,7 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 if (mpOverflowingText != NULL) {
 SdrTextObj *pNextTextObj = GetNextLinkInChain();
 assert (pNextTextObj);
-impCopyTextInTextObj(pNextTextObj);
+impCopyTextInTextObj(pNextTextObj); // XXX: it actually moves the 
overflowing text currently
 
 //pNextTextObj->SetOutlinerParaObject( mpOverflowingText );
 //SdrOutliner rOutl = pNextTextObj->ImpGetDrawOutliner();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 46259] rewrite mysql connector to use mariadb client library

2014-07-31 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=46259

--- Comment #18 from Michael Stahl  ---
good to see somebody interested in this!

by the way i notice a ridiculously large patch in external/libmariadb;
probably there's a new release by now that would include that, if
anybody has time to upgrade the bundled libmariadb  :)

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


[Libreoffice-commits] core.git: Branch 'feature/template_manager_improvements' - 2 commits - sfx2/source sfx2/uiconfig

2014-07-31 Thread Efe Gürkan YALAMAN
 sfx2/source/dialog/backingwindow.cxx |   67 ---
 sfx2/source/dialog/backingwindow.hxx |1 
 sfx2/uiconfig/ui/startcenter.ui  |   17 
 3 files changed, 49 insertions(+), 36 deletions(-)

New commits:
commit 58fc7d25a5904a6747fdb2a3bf4c4a39be547bef
Author: Efe Gürkan YALAMAN 
Date:   Fri Aug 1 02:59:41 2014 +0300

All templates option added

Change-Id: I622d5d6fd7fa7be474fa56abf67a1a62fddbcf60

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index f481f18..bf17b95 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -363,7 +363,7 @@ void BackingWindow::setupButton( MenuButton* pButton )
 pMenu->SetMenuFlags(
  pMenu->GetMenuFlags() | MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES );
 
-pButton->SetClickHdl( LINK( this, BackingWindow, ClickHdl ) );
+//pButton->SetClickHdl( LINK( this, BackingWindow, ClickHdl ) );
 pButton->SetSelectHdl( LINK( this, BackingWindow, MenuSelectHdl ) );
 }
 
@@ -590,21 +590,25 @@ IMPL_LINK( BackingWindow, MenuSelectHdl, MenuButton*, 
pButton )
 {
 OString sId = pButton->GetCurItemIdent();
 
-if( sId == "filter_writer" )
+if( sId == "filter_none" )
+{
+mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_NONE));
+}
+else if( sId == "filter_writer" )
 {
 mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_WRITER));
 }
 else if( sId == "filter_calc" )
 {
-mpLocalView->filterItems(ViewFilter_Application(FILTER_APP_CALC));
+mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_CALC));
 }
 else if( sId == "filter_impress" )
 {
-mpLocalView->filterItems(ViewFilter_Application(FILTER_APP_IMPRESS));
+mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_IMPRESS));
 }
 else if( sId == "filter_draw" )
 {
-mpLocalView->filterItems(ViewFilter_Application(FILTER_APP_DRAW));
+mpCurrentView->filterItems(ViewFilter_Application(FILTER_APP_DRAW));
 }
 else if( sId == "edit" )
 {
diff --git a/sfx2/uiconfig/ui/startcenter.ui b/sfx2/uiconfig/ui/startcenter.ui
index da54f91..915028e 100644
--- a/sfx2/uiconfig/ui/startcenter.ui
+++ b/sfx2/uiconfig/ui/startcenter.ui
@@ -1,5 +1,5 @@
 
-
+
 
   
   
@@ -435,6 +435,14 @@
 True
 False
 
+  
+True
+False
+All Templates
+True
+  
+
+
   
 True
 False
commit f42ed44b2f612b33998242091a3a762ca3fb4215
Author: Efe Gürkan YALAMAN 
Date:   Fri Aug 1 02:46:51 2014 +0300

Some code cleanup

SetupButton function overloaded for MenuButton type.

Change-Id: Ib171c7590a59ad360dd8ebab1039d3eba5d565ef

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 34a40e1..f481f18 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -52,9 +52,6 @@
 #include 
 #include 
 
-//FIXME:well find a better way for it.
-#include "../doc/doc.hrc"
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::frame;
@@ -294,32 +291,13 @@ void BackingWindow::initControls()
 //mpTemplateBar->SetDropdownClickHdl(LINK(this, 
BackingWindow,TBXDropdownHdl));
 
 //set handlers
-//mpLocalView->setItemStateHdl(LINK(this, BackingWindow, TVItemStateHdl));
 mpLocalView->setOpenRegionHdl(LINK(this, BackingWindow, OpenRegionHdl));
 mpLocalView->setOpenTemplateHdl(LINK(this,BackingWindow,OpenTemplateHdl));
 
-/*FIXME: Add other things for Local View
- *Filter and the bars*/
+/*FIXME: Add other things for Local View*/
 
 setupButton( mpOpenButton );
-//setupButton( mpTemplateButton );
-Font bFont(mpTemplateButton->GetControlFont());
-bFont.SetHeight(nButtonsFontSize);
-mpTemplateButton->SetControlFont(bFont);
-
-// color that fits the theme
-mpTemplateButton->SetControlForeground(aButtonsText);
-
-
-
-//Menubutton implementation
-PopupMenu* pMenu = mpTemplateButton->GetPopupMenu();
-pMenu->SetMenuFlags(
-pMenu->GetMenuFlags() | MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES );
-
-mpTemplateButton->SetSelectHdl(LINK(this,BackingWindow,MenuSelectHdl));
-mpTemplateButton->SetClickHdl( LINK(this, BackingWindow, ClickHdl) );
-
+setupButton( mpTemplateButton );
 setupButton( mpWriterAllButton );
 setupButton( mpDrawAllButton );
 setupButton( mpCalcAllButton );
@@ -373,6 +351,23 @@ void BackingWindow::setupButton( PushButton* pButton )
 pButton->SetClickHdl( LINK( this, BackingWindow, ClickHdl ) );
 }
 
+void BackingWindow::setupButton( MenuButton* pButton )
+{
+Font aFont(pButton->GetControlFont());
+aFont.SetHeight(nButtonsFontSize);
+pButton->SetControlFont(aFont);
+pButton->SetControlForeground(aButtonsText);
+
+//Menubutton implementa

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

2014-07-31 Thread Kohei Yoshida
 chart2/source/view/main/ChartView.cxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 6053491532a5d9954caaa4abf09af30850f0cb94
Author: Kohei Yoshida 
Date:   Thu Jul 31 23:33:14 2014 -0400

fdo#75380: Let's not always set the line style to NONE here.

This one line guarantees that no matter what the real line style is,
it will be ignored.

Change-Id: I3bceaf49ce13ddb42ceb56750d8a4ccfef54033b

diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index c7dbcf6..f904639 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2401,7 +2401,6 @@ void formatPage(
 
 //format page
 tPropertyNameValueMap aNameValueMap;
-aNameValueMap.insert( tPropertyNameValueMap::value_type( "LineStyle", 
uno::makeAny( drawing::LineStyle_NONE )));
 PropertyMapper::getValueMap( aNameValueMap, 
PropertyMapper::getPropertyNameMapForFillAndLineProperties(), xModelPage );
 
 OUString aCID( ObjectIdentifier::createClassifiedIdentifier( 
OBJECTTYPE_PAGE, OUString() ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Bug 65675 depends on bug 75380, which changed state.

Bug 75380 Summary: FORMATTING: Can't Create a Border Around a Chart
https://bugs.freedesktop.org/show_bug.cgi?id=75380

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

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


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Bug 65675 depends on bug 79332, which changed state.

Bug 79332 Summary: self-contained pivot table, dataloss after after save and 
reopen
https://bugs.freedesktop.org/show_bug.cgi?id=79332

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WORKSFORME

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


[Bug 65675] LibreOffice 4.2 most annoying bugs

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

Bug 65675 depends on bug 79332, which changed state.

Bug 79332 Summary: self-contained pivot table, dataloss after after save and 
reopen
https://bugs.freedesktop.org/show_bug.cgi?id=79332

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |---

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


LibreOffice Gerrit News for core on 2014-08-01

2014-07-31 Thread gerrit
Moin!

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

 First time contributors doing great things! 
+ Convert WIZ_RTFCOPYTABLE to .ui
  in https://gerrit.libreoffice.org/10670 from Mihály Palenik
  about module dbaccess
+ Convert DLG_DATABASE_TYPE_CHANGE to .ui
  in https://gerrit.libreoffice.org/10664 from Mihály Palenik
  about module dbaccess
+ xmerge: static non-final variable in the initialization
  in https://gerrit.libreoffice.org/10662 from Robert Antoni Buj i Gelonch
  about module xmerge
+ xmerge: Remove local variable name conflict
  in https://gerrit.libreoffice.org/10663 from Robert Antoni Buj i Gelonch
  about module xmerge
+ xmerge: If statement is redundant
  in https://gerrit.libreoffice.org/10668 from Robert Antoni Buj i Gelonch
  about module xmerge
+ xmerge: The assigned value is never used
  in https://gerrit.libreoffice.org/10660 from Robert Antoni Buj i Gelonch
  about module xmerge
+ xmerge: String comparison
  in https://gerrit.libreoffice.org/10665 from Robert Antoni Buj i Gelonch
  about module xmerge
+ xmerge: Use J2SE 5.0 String.{replace|contains}
  in https://gerrit.libreoffice.org/10659 from Robert Antoni Buj i Gelonch
  about module xmerge
+ fdo#79422 Fix hang problem After ReplaceAll by closing Search Dialog
  in https://gerrit.libreoffice.org/10643 from Seyeong Kim
  about module sc, svx
 End of freshness 

+ Improve 2 dialogs for data Statistics
  in https://gerrit.libreoffice.org/10673 from Olivier Hallot
  about module sc
+ fdo#80534 bad default value (0) for the number of rows
  in https://gerrit.libreoffice.org/10657 from Joren De Cuyper
  about module sw
+ fdo#41350 "Expand Single Word" only shown active for "Last line: Justifie
  in https://gerrit.libreoffice.org/10656 from Joren De Cuyper
  about module cui
+ fdo#81341 : DOCX: EditTime is not geting preserved after RT
  in https://gerrit.libreoffice.org/10655 from Pallavi Jadhav
  about module sw


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

+ fdo#75757: Remove inheritance from std::map.
  in https://gerrit.libreoffice.org/10558 from Matthew Pottage
+ writerfilter: fix ubsan complaints about "-42" enum value
  in https://gerrit.libreoffice.org/10646 from Stephan Bergmann
+ xmerge: Avoid java.util.ConcurrentModificationException
  in https://gerrit.libreoffice.org/10642 from Robert Antoni Buj i Gelonch
+ Improve "Navigate by" layout
  in https://gerrit.libreoffice.org/10613 from Samuel Mehrbrodt
+ sal_osl_process: fix "Parent and child environment not equal" for OSX <10
  in https://gerrit.libreoffice.org/10641 from Douglas Mencken


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

None

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

+ fdo#78304:Image in header is not getting preserved.
  in https://gerrit.libreoffice.org/10386 from Sourav Mahajan
+ fdo#80996:Fix for DataLabel not preserved for ColumnChart after RT
  in https://gerrit.libreoffice.org/10169 from Dushyant Bhalgami
+ VS2013: Make 64 bit shell extensions optional
  in https://gerrit.libreoffice.org/10163 from David Ostrovsky
+ fdo#57950 Replace chained append( with operator+)
  in https://gerrit.libreoffice.org/10149 from Petr Vorel
+ fdo#79018: LO hangs while opening file.
  in https://gerrit.libreoffice.org/9564 from Yogesh Bharate
+ Use assert instead of OSL_ASSERT in sal/
  in https://gerrit.libreoffice.org/10113 from Arnaud Versini
+ fdo#78947 : The File gets corrupted when saved in LO
  in https://gerrit.libreoffice.org/9775 from BisalNayal
+ move OpenGLContext to SAL
  in https://gerrit.libreoffice.org/9429 from David Tardon
+ Changes for Wordml
  in https://gerrit.libreoffice.org/9013 from Michel Messak
+ fdo#64945 Remove inconvenient localized symbol code.
  in https://gerrit.libreoffice.org/8696 from Darshana Padmadas
+ fdo#77716 : Paragraph spacing is not preserved after RT.
  in https://gerrit.libreoffice.org/9197 from Tushar Bende
+ fdo#77121 Header / Footer positions not preserved after RT
  in https://gerrit.libreoffice.org/9235 from Priyanka Gaikwad


Best,

Your friendly LibreOffice Gerrit Digest Mailer

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


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

2014-07-31 Thread rbuj
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java 
|2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 23aa8ea1ac4316c89c0dcbc2da2fef8dfcd9e3c3
Author: rbuj 
Date:   Thu Jul 31 19:37:15 2014 +0200

xmerge: String comparison

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

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
index a28edaa..d39a4d9 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/Format.java
@@ -434,7 +434,7 @@ public class Format implements Cloneable {
 return false;
 }
 
-if (fontName!=rhs.fontName)
+if (fontName == null ? rhs.fontName != null : 
!fontName.equals(rhs.fontName))
 return false;
 
 if (foreground!=rhs.foreground)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread rbuj
 xmerge/source/bridge/java/XMergeBridge.java   
|4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java 
|4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java  
|4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java 
|3 +--
 4 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit e36edbb3e5dee78c32dea2a68067906101f4a7c8
Author: rbuj 
Date:   Thu Jul 31 16:22:15 2014 +0200

xmerge: The assigned value is never used

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

diff --git a/xmerge/source/bridge/java/XMergeBridge.java 
b/xmerge/source/bridge/java/XMergeBridge.java
index 2f4897d..87b07a6 100644
--- a/xmerge/source/bridge/java/XMergeBridge.java
+++ b/xmerge/source/bridge/java/XMergeBridge.java
@@ -116,7 +116,7 @@ public class XMergeBridge {
 
 String getFileName(String origName)
 {
-String name=null;
+String name;
 if (origName !=null)
 {
 if(origName.equalsIgnoreCase(""))
@@ -474,7 +474,7 @@ public class XMergeBridge {
  URI uri=new URI(sURL);
  String  newFileName= getPath(uri);
 
- File newFile=null;
+ File newFile;
  if (newFileName.lastIndexOf(".")!=-1){
  newFile =new 
File(newFileName.substring(0,newFileName.lastIndexOf("."))+String.valueOf(i)+newFileName.substring(newFileName.lastIndexOf(".")));
  }
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
index 1b4c0d1..ccd03e2 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/ConverterFactory.java
@@ -46,7 +46,7 @@ public class ConverterFactory {
 */
 public boolean canConvert(String mimeTypeIn, String mimeTypeOut) {
 
-ConverterInfo foundInfo = null;
+ConverterInfo foundInfo;
 
 // findConverterInfo expects the second paramenter to be the
 // destination MimeType
@@ -73,7 +73,7 @@ public class ConverterFactory {
 */
 public Convert getConverter(String mimeTypeIn, String mimeTypeOut) {
 
-ConverterInfo foundInfo = null;
+ConverterInfo foundInfo;
 boolean toOffice;
 
 toOffice = ConverterInfo.isValidOfficeType(mimeTypeOut);
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java
index abdeaa7..1938a4e 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/OfficeZip.java
@@ -83,7 +83,7 @@ class OfficeZip {
 void read(InputStream is) throws IOException {
 
 ZipInputStream zis = new ZipInputStream(is);
-ZipEntry ze = null;
+ZipEntry ze;
 int i = -1;
 
 while ((ze = zis.getNextEntry()) != null) {
@@ -94,7 +94,7 @@ class OfficeZip {
 
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
-int len = 0;
+int len;
 byte buffer[] = new byte[BUFFERSIZE];
 
 while ((len = zis.read(buffer)) > 0) {
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java
index 139f078..34c358d 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/NodeIterator.java
@@ -119,9 +119,8 @@ public abstract class NodeIterator implements Iterator {
 
 public boolean equivalent(Object obj1, Object obj2) {
 boolean equal = false;
-String errMsg = null;
 if (!(obj1 instanceof Node && obj2 instanceof Node)) {
-errMsg = Resources.getInstance().getString("NOT_NODE_ERROR");
+String errMsg = 
Resources.getInstance().getString("NOT_NODE_ERROR");
 Debug.log(Debug.ERROR, errMsg);
 } else {
 Node node1 = (Node)obj1;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread rbuj
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
 |8 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java 
  |6 +-
 2 files changed, 3 insertions(+), 11 deletions(-)

New commits:
commit 583a35b7872be903520dd9fc342efde23ade929f
Author: rbuj 
Date:   Thu Jul 31 20:03:30 2014 +0200

xmerge: If statement is redundant

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

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
index 16102e8..c2cad73 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/diff/CellNodeIterator.java
@@ -65,12 +65,8 @@ public final class CellNodeIterator extends NodeIterator  {
 
 // can use an array later to check all possible tags for
 // future expansion
-if (node.getNodeType() == Node.ELEMENT_NODE &&
-node.getNodeName().equals(SUPPORTED_TAG1)) {
-return true;
-} else {
-return false;
-}
+return node.getNodeType() == Node.ELEMENT_NODE &&
+node.getNodeName().equals(SUPPORTED_TAG1);
 }
 
 
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java
index a4ba311..cd939b7 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/merger/merge/DocumentMerge.java
@@ -67,11 +67,7 @@ public class DocumentMerge implements MergeAlgorithm {
 for (Difference difference : differences) {
 if (difference.getOrgPosition() > currentPosition) {
 currentPosition = difference.getOrgPosition();
-if (difference.getOperation() == Difference.DELETE) {
-haveDeleteOperation = true;
-} else  {
-haveDeleteOperation = false;
-}
+haveDeleteOperation = difference.getOperation() == 
Difference.DELETE;
 } else if (difference.getOrgPosition() == currentPosition) {
 if (difference.getOperation() == Difference.DELETE) {
 haveDeleteOperation = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-07-31 Thread rbuj
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java   
|4 ++--
 xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java   
|4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java
   |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java
 |4 ++--
 
xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/RowStyle.java 
   |4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 4ac335c1dcebc89e27f1e4bf6b119547afb1526f
Author: rbuj 
Date:   Thu Jul 31 19:15:12 2014 +0200

xmerge: Remove local variable name conflict

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

diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
index c47b235..ba409f6 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/ParaStyle.java
@@ -237,8 +237,8 @@ public class ParaStyle extends Style implements Cloneable {
 int len = children.getLength();
 for (int i = 0; i < len; i++) {
 Node child = children.item(i);
-String name = child.getNodeName();
-if (name.equals("style:properties")) {
+String nodeName = child.getNodeName();
+if (nodeName.equals("style:properties")) {
 NamedNodeMap childAttrNodes = child.getAttributes();
 if (childAttrNodes != null) {
 int nChildAttrNodes = childAttrNodes.getLength();
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java
index cc45fa5..3f9e6b9 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/TextStyle.java
@@ -96,8 +96,8 @@ public class TextStyle extends Style implements Cloneable {
 int len = children.getLength();
 for (int i = 0; i < len; i++) {
 Node child = children.item(i);
-String name = child.getNodeName();
-if (name.equals("style:properties")) {
+String nodeName = child.getNodeName();
+if (nodeName.equals("style:properties")) {
 NamedNodeMap childAttrNodes = child.getAttributes();
 if (childAttrNodes != null) {
 int nChildAttrNodes = childAttrNodes.getLength();
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java
index 5669537..5f51f61 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/CellStyle.java
@@ -67,8 +67,8 @@ public class CellStyle extends Style implements Cloneable {
 int len = children.getLength();
 for (int i = 0; i < len; i++) {
 Node child = children.item(i);
-String name = child.getNodeName();
-if (name.equals("style:properties")) {
+String nodeName = child.getNodeName();
+if (nodeName.equals("style:properties")) {
 NamedNodeMap childAttrNodes = child.getAttributes();
 if (childAttrNodes != null) {
 int nChildAttrNodes = childAttrNodes.getLength();
diff --git 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java
 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java
index bc2d03d..4a8d87c 100644
--- 
a/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java
+++ 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/converter/xml/sxc/ColumnStyle.java
@@ -65,8 +65,8 @@ public class ColumnStyle extends Style implements Cloneable {
 int len = children.getLength();
 for (int i = 0; i < len; i++) {
 Node child = children.item(i);
-String name = child.getNodeName();
-if (name.equals("style:properties")) {
+String nodeName = child.getNodeName();
+if (nodeName.equals("style:properties")) {
 NamedNodeMap childAttrNodes = child.getAttributes();
 if (childAttrNodes != null) {
 int nChildAttrNodes = childAttrNodes.getLength();
diff --git 
a/xmerge/source/xmerge/j

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

2014-07-31 Thread rbuj
 xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit ebe8792a37c21637cd9b5dc1522185b49ad7ac1c
Author: rbuj 
Date:   Thu Jul 31 18:47:56 2014 +0200

xmerge: static non-final variable in the initialization

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

diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java 
b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
index b97f03e..af82a66 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/Version.java
@@ -26,9 +26,9 @@ package org.openoffice.xmerge;
  */
 public final class Version {
 
-private static Package pkg;
+private static final Package pkg;
 
-private static Version version;
+private static final Version version;
 
 static {
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits