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

2017-02-15 Thread Noel Grandin
 include/rsc/rsc-vcl-shared-types.hxx |2 +-
 vcl/source/control/field2.cxx|5 +
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 544bd60be20d1abe195f51fc9906cdef2c8489dd
Author: Noel Grandin 
Date:   Thu Feb 16 09:49:23 2017 +0200

remove unused F_100TH_SEC from TimeFieldFormat enum

Change-Id: I04b27ea7ede9dca6ca41ac910ac97a878788f2e0

diff --git a/include/rsc/rsc-vcl-shared-types.hxx 
b/include/rsc/rsc-vcl-shared-types.hxx
index 3e23887..1091e64 100644
--- a/include/rsc/rsc-vcl-shared-types.hxx
+++ b/include/rsc/rsc-vcl-shared-types.hxx
@@ -23,7 +23,7 @@
 #include 
 #include 
 
-enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_100TH_SEC, F_SEC_CS 
};
+enum class TimeFieldFormat : sal_Int32 { F_NONE, F_SEC, F_SEC_CS };
 
 enum class KeyFuncType : sal_Int32 { DONTKNOW, NEW, OPEN, SAVE,
SAVEAS, PRINT, CLOSE, QUIT,
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index cab30fd..dd7acf7 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1930,7 +1930,6 @@ static bool ImplTimeProcessKeyInput( Edit*, const 
KeyEvent& rKEvt,
  (rLocaleDataWrapper.getTimePM().indexOf(cChar) != -1) ||
  // Accept AM/PM:
  (cChar == 'a') || (cChar == 'A') || (cChar == 'm') || (cChar == 
'M') || (cChar == 'p') || (cChar == 'P') ||
- ((eFormat == TimeFieldFormat::F_100TH_SEC) && 
string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
  ((eFormat == TimeFieldFormat::F_SEC_CS) && 
string::equals(rLocaleDataWrapper.getTime100SecSep(), cChar)) ||
  (bDuration && (cChar == '-')) )
 return false;
@@ -2185,8 +2184,6 @@ bool TimeFormatter::ImplTimeReformat( const OUString& 
rStr, OUString& rOutStr )
 bool b100Sec = false;
 if ( meFormat != TimeFieldFormat::F_NONE )
 bSecond = true;
-if ( meFormat == TimeFieldFormat::F_100TH_SEC )
-b100Sec = true;
 
 if ( meFormat == TimeFieldFormat::F_SEC_CS )
 {
@@ -2412,7 +2409,7 @@ void TimeFormatter::ImplSetUserTime( const tools::Time& 
rNewTime, Selection* pNe
 bool b100Sec = false;
 if ( meFormat != TimeFieldFormat::F_NONE )
 bSec = true;
-if ( meFormat == TimeFieldFormat::F_100TH_SEC || meFormat == 
TimeFieldFormat::F_SEC_CS )
+if ( meFormat == TimeFieldFormat::F_SEC_CS )
 b100Sec = true;
 if ( meFormat == TimeFieldFormat::F_SEC_CS )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/pranavk/userlist_backport' - 0 commits -

2017-02-15 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/pranavk/Leaflet_upstrea' - 0 commits -

2017-02-15 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/pranavk/userlist' - 0 commits -

2017-02-15 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/pranavk/sidebar' - 0 commits -

2017-02-15 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/pranavk/mobilify' - 0 commits -

2017-02-15 Thread Unknown
Rebased ref, commits from common ancestor:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 13 commits - compilerplugins/clang desktop/source framework/source helpcompiler/inc helpcompiler/source include/framework include/helpcompiler include/i18nutil include/

2017-02-15 Thread Noel Grandin
 compilerplugins/clang/unusedenumconstants.py|5 +
 desktop/source/deployment/registry/help/dp_help.cxx |5 -
 framework/source/dispatch/closedispatcher.cxx   |6 +-
 framework/source/dispatch/startmoduledispatcher.cxx |2 
 framework/source/fwe/classes/framelistanalyzer.cxx  |   23 +++
 framework/source/loadenv/loadenv.cxx|8 +-
 framework/source/services/frame.cxx |2 
 helpcompiler/inc/HelpCompiler.hxx   |2 
 helpcompiler/source/HelpCompiler.cxx|2 
 helpcompiler/source/HelpLinker.cxx  |   52 -
 include/framework/framelistanalyzer.hxx |   50 +---
 include/helpcompiler/compilehelp.hxx|   15 ++---
 include/i18nutil/paper.hxx  |2 
 include/rsc/rsc-vcl-shared-types.hxx|8 --
 reportdesign/source/ui/inc/ReportDefines.hxx|2 
 reportdesign/source/ui/report/DesignView.cxx|4 -
 reportdesign/source/ui/report/ReportController.cxx  |   24 
 reportdesign/source/ui/report/ReportSection.cxx |6 +-
 reportdesign/source/ui/report/dlgedfunc.cxx |   25 +++-
 sal/qa/osl/file/osl_File.cxx|5 -
 sc/inc/dbdata.hxx   |1 
 sc/inc/detfunc.hxx  |   12 +---
 sc/inc/externalrefmgr.hxx   |   12 
 sc/inc/global.hxx   |   13 +---
 sc/inc/types.hxx|8 +-
 sc/inc/viewdata.hxx |   15 +++--
 sc/source/core/data/bcaslot.cxx |6 +-
 sc/source/core/data/table3.cxx  |2 
 sc/source/core/inc/bcaslot.hxx  |2 
 sc/source/core/tool/dbdata.cxx  |2 
 sc/source/core/tool/detfunc.cxx |   55 ++
 sc/source/ui/app/inputhdl.cxx   |4 -
 sc/source/ui/docshell/dbdocfun.cxx  |2 
 sc/source/ui/docshell/dbdocimp.cxx  |2 
 sc/source/ui/docshell/docfunc.cxx   |4 -
 sc/source/ui/docshell/docsh4.cxx|2 
 sc/source/ui/docshell/docsh5.cxx|6 +-
 sc/source/ui/docshell/externalrefmgr.cxx|   37 
 sc/source/ui/drawfunc/futext.cxx|2 
 sc/source/ui/inc/dbfunc.hxx |2 
 sc/source/ui/unoobj/cellsuno.cxx|   22 +++
 sc/source/ui/view/cellsh1.cxx   |4 -
 sc/source/ui/view/dbfunc.cxx|   29 ++---
 sc/source/ui/view/gridwin.cxx   |4 -
 sc/source/ui/view/tabvwshc.cxx  |4 -
 sc/source/ui/view/viewdata.cxx  |4 -
 sc/source/ui/view/viewfun5.cxx  |2 
 sc/source/ui/view/viewfunc.cxx  |2 
 sfx2/source/view/viewfrm.cxx|2 
 svx/source/dialog/page.h|2 
 vcl/source/window/decoview.cxx  |   59 
 51 files changed, 220 insertions(+), 351 deletions(-)

New commits:
commit d76d15552d7ef9faddb0694e5f05d180e5798c14
Author: Noel Grandin 
Date:   Thu Feb 16 08:16:45 2017 +0200

convert FrameListAnalyzer::EDetect to scoped enum

Change-Id: I4e1bd449c4ad60ec810ef52c73d6c6ff3dd313ee

diff --git a/framework/source/dispatch/closedispatcher.cxx 
b/framework/source/dispatch/closedispatcher.cxx
index a9ad77b..97527aa 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -287,7 +287,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, 
LinkParamNone*, void)
 // If we found some special cases, we can
 // make some decisions earlier!
 css::uno::Reference< css::frame::XFramesSupplier > xDesktop( 
css::frame::Desktop::create(xContext), css::uno::UNO_QUERY_THROW);
-FrameListAnalyzer aCheck1(xDesktop, xCloseFrame, FrameListAnalyzer::E_HELP 
| FrameListAnalyzer::E_BACKINGCOMPONENT);
+FrameListAnalyzer aCheck1(xDesktop, xCloseFrame, FrameAnalyzerFlags::Help 
| FrameAnalyzerFlags::BackingComponent);
 
 // Check for existing UNO connections.
 // NOTE: There is a race between checking this and connections being 
created/destroyed before
@@ -330,7 +330,7 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, 
LinkParamNone*, void)
 {
 // OK; this frame is empty now.
 // Check the environment again to decide, what is the next step.
-FrameListAnalyzer aCheck2(xDesktop, xCloseFrame, 
FrameListAnalyzer::E_ALL);
+FrameListAnalyzer aCheck2(xDesktop, xCloseFrame, 
FrameAnalyzerFlags::All);
 
 // c1) there is as minimum 1 frame open, which is visi

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

2017-02-15 Thread Pranav Kant
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |2 
 sc/source/core/data/column2.cxx |   43 ++-
 sc/source/ui/docshell/docfunc.cxx   |   11 +++
 sc/source/ui/docshell/docsh4.cxx|   56 
 sc/source/ui/inc/docsh.hxx  |3 +
 5 files changed, 98 insertions(+), 17 deletions(-)

New commits:
commit 748361ada42ffef774a7cb68f704de0e9edb5639
Author: Pranav Kant 
Date:   Thu Feb 16 00:54:48 2017 +0530

gtktiledviewer: Different UNO command for calc

Change-Id: I229451bac7cf4c223efd3fa18c177d650d3f9954
Reviewed-on: https://gerrit.libreoffice.org/34327
Tested-by: Jenkins 
Reviewed-by: pranavk 

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 28a1f6b..3115fd4 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -347,7 +347,7 @@ static void deleteCommentButtonClicked(GtkWidget* pWidget, 
gpointer userdata)
 boost::property_tree::write_json(aStream, aTree);
 std::string aArguments = aStream.str();
 
-lok_doc_view_post_command(LOK_DOC_VIEW(rWindow.m_pDocView), 
".uno:DeleteComment", aArguments.c_str(), false);
+lok_doc_view_post_command(LOK_DOC_VIEW(rWindow.m_pDocView), 
rWindow.m_aToolItemCommandNames[rWindow.m_pDeleteComment].c_str(), 
aArguments.c_str(), false);
 }
 
 GtkWidget* CommentsSidebar::createCommentBox(const 
boost::property_tree::ptree& aComment)
commit 57056e5d6032ff1ce0a91c078ebaa1deeaa9dc6f
Author: Pranav Kant 
Date:   Wed Feb 15 23:55:38 2017 +0530

sc lok: implement comment callbacks

Change-Id: I1253138aa530ecb2b63bf6cda658d480ac62ada5
Reviewed-on: https://gerrit.libreoffice.org/34326
Tested-by: Jenkins 
Reviewed-by: pranavk 

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index b11a297..1fda6e2 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -18,6 +18,7 @@
  */
 
 #include "column.hxx"
+#include "docsh.hxx"
 #include "scitems.hxx"
 #include "formulacell.hxx"
 #include "document.hxx"
@@ -1875,26 +1876,38 @@ void ScColumn::SetCellNote(SCROW nRow, ScPostIt* pNote)
 }
 
 namespace {
-class ForgetCellNoteCaptionsHandler
-{
+class CellNoteHandler
+{
+const ScDocument* m_pDocument;
+const ScAddress m_aAddress; // 'incomplete' address consisting of tab, 
column
+const bool m_bForgetCaptionOwnership;
 
-public:
-ForgetCellNoteCaptionsHandler() {}
+public:
+CellNoteHandler(const ScDocument* pDocument, const ScAddress& rPos, 
bool bForgetCaptionOwnership) :
+m_pDocument(pDocument),
+m_aAddress(rPos),
+m_bForgetCaptionOwnership(bForgetCaptionOwnership) {}
 
-void operator() ( size_t /*nRow*/, ScPostIt* p )
-{
-p->ForgetCaption();
-}
-};
-}
+void operator() ( size_t nRow, ScPostIt* p )
+{
+if (m_bForgetCaptionOwnership)
+p->ForgetCaption();
+
+// Create a 'complete' address object
+ScAddress aAddr(m_aAddress);
+aAddr.SetRow(nRow);
+// Notify our LOK clients
+ScDocShell::LOKCommentNotify(LOKCommentNotificationType::Remove, 
m_pDocument, aAddr, p);
+}
+};
+} // anonymous namespace
 
 void ScColumn::DeleteCellNotes( sc::ColumnBlockPosition& rBlockPos, SCROW 
nRow1, SCROW nRow2, bool bForgetCaptionOwnership )
 {
-if (bForgetCaptionOwnership)
-{
-ForgetCellNoteCaptionsHandler aFunc;
-sc::ParseNote(maCellNotes.begin(), maCellNotes, nRow1, nRow2, aFunc);
-}
+ScAddress aAddr(nCol, 0, nTab);
+CellNoteHandler aFunc(pDocument, aAddr, bForgetCaptionOwnership);
+sc::ParseNote(maCellNotes.begin(), maCellNotes, nRow1, nRow2, aFunc);
+
 rBlockPos.miCellNotePos =
 maCellNotes.set_empty(rBlockPos.miCellNotePos, nRow1, nRow2);
 }
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index dde0818..6c5dbe7 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1290,10 +1290,12 @@ void ScDocFunc::ReplaceNote( const ScAddress& rPos, 
const OUString& rNoteText, c
 
 // create new note (creates drawing undo action for the new caption 
object)
 ScNoteData aNewData;
-if( ScPostIt* pNewNote = ScNoteUtil::CreateNoteFromString( rDoc, rPos, 
rNoteText, false, true ) )
+ScPostIt* pNewNote = nullptr;
+if( (pNewNote = ScNoteUtil::CreateNoteFromString( rDoc, rPos, 
rNoteText, false, true )) )
 {
 if( pAuthor ) pNewNote->SetAuthor( *pAuthor );
 if( pDate ) pNewNote->SetDate( *pDate );
+
 // rescue note data for undo
 aNewData = pNewNote->GetNoteData();
 }
@@ -1309,6 +1311,13 @@ void ScDocFunc::ReplaceNote( const Sc

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

2017-02-15 Thread Pranav Kant
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |  103 +---
 1 file changed, 49 insertions(+), 54 deletions(-)

New commits:
commit a6c4552e792f6ab20fae83d354b369defd3bb345
Author: Pranav Kant 
Date:   Wed Feb 15 17:00:05 2017 +0530

gtktiledviewer: This is a better place to change doc-specific controls

Change-Id: Id8fbebe2f6e339120741ed3744b18f50941c995e

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 7a626b8..28a1f6b 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -587,11 +587,6 @@ gboolean TiledRowColumnBar::docConfigureEvent(GtkWidget* 
pDocView, GdkEventConfi
 gtk_widget_queue_draw(rWindow.m_pColumnBar->m_pDrawingArea);
 gtk_widget_show(rWindow.m_pFormulabarEntry);
 
-// Change cell alignment uno commands for spreadsheet
-lcl_registerToolItem(rWindow, rWindow.m_pLeftpara, ".uno:AlignLeft");
-lcl_registerToolItem(rWindow, rWindow.m_pCenterpara, 
".uno:AlignHorizontalCenter");
-lcl_registerToolItem(rWindow, rWindow.m_pRightpara, ".uno:AlignRight");
-gtk_widget_hide(GTK_WIDGET(rWindow.m_pJustifypara));
 }
 
 return TRUE;
@@ -1122,6 +1117,14 @@ static void initWindow(TiledWindow& rWindow)
 // used.
 gtk_widget_set_halign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START);
 gtk_widget_set_valign(GTK_WIDGET(rWindow.m_pDocView), GTK_ALIGN_START);
+
+// Change cell alignment uno commands for spreadsheet
+lcl_registerToolItem(rWindow, rWindow.m_pLeftpara, ".uno:AlignLeft");
+lcl_registerToolItem(rWindow, rWindow.m_pCenterpara, 
".uno:AlignHorizontalCenter");
+lcl_registerToolItem(rWindow, rWindow.m_pRightpara, ".uno:AlignRight");
+gtk_widget_hide(GTK_WIDGET(rWindow.m_pJustifypara));
+
+lcl_registerToolItem(rWindow, rWindow.m_pDeleteComment, 
".uno:DeleteNote");
 }
 
 // Fill our comments sidebar
commit 2d6ec9761df5fcd36dd0ce7964d1ae6876ec9943
Author: Pranav Kant 
Date:   Wed Feb 15 16:42:49 2017 +0530

gtktiledviewer: Kill CommentsSidebar's docConfigure

Move this code to initWindow too

Change-Id: I057d9b8f60b9da2c20b28901ab958f9fc2095df3

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 2f8dcdb..7a626b8 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -57,8 +57,6 @@ public:
 static GtkWidget* createCommentBox(const boost::property_tree::ptree& 
aComment);
 /// Click even handler for m_pViewAnnotationsButton
 static void unoViewAnnotations(GtkWidget* pWidget, gpointer userdata);
-/// Configure event handler for window
-static gboolean docConfigureEvent(GtkWidget* pWidget, GdkEventConfigure* 
pEvent, gpointer pData);
 };
 
 
@@ -433,41 +431,6 @@ void CommentsSidebar::unoViewAnnotations(GtkWidget* 
pWidget, gpointer /*userdata
 }
 }
 
-gboolean CommentsSidebar::docConfigureEvent(GtkWidget* pDocView, 
GdkEventConfigure* /*pEvent*/, gpointer /*userdata*/)
-{
-TiledWindow& rWindow = lcl_getTiledWindow(pDocView);
-LibreOfficeKitDocument* pDocument = 
lok_doc_view_get_document(LOK_DOC_VIEW(pDocView));
-
-// whether tiled rendering is turned on
-gboolean bTiledAnnotations;
-g_object_get(G_OBJECT(pDocView), "tiled-annotations", &bTiledAnnotations, 
nullptr);
-
-if (!bTiledAnnotations && pDocument && 
pDocument->pClass->getDocumentType(pDocument) == LOK_DOCTYPE_TEXT)
-{
-if (!rWindow.m_pCommentsSidebar)
-{
-rWindow.m_pCommentsSidebar.reset(new CommentsSidebar());
-rWindow.m_pCommentsSidebar->m_pMainVBox = 
gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-gtk_container_add(GTK_CONTAINER(rWindow.m_pMainHBox), 
rWindow.m_pCommentsSidebar->m_pMainVBox);
-
-rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton = 
gtk_button_new_with_label(".uno:ViewAnnotations");
-#if GTK_CHECK_VERSION(3,12,0)
-// Hack to make sidebar grid wide enough to not need any 
horizontal scrollbar
-
gtk_widget_set_margin_start(rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton,
 20);
-
gtk_widget_set_margin_end(rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton, 
20);
-#endif
-
gtk_container_add(GTK_CONTAINER(rWindow.m_pCommentsSidebar->m_pMainVBox), 
rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton);
-
g_signal_connect(rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton, 
"clicked", G_CALLBACK(CommentsSidebar::unoViewAnnotations), nullptr);
-
-gtk_widget_show_all(rWindow.m_pCommentsSidebar->m_pMainVBox);
-
-
gtk_button_clicked(GTK_BUTTON(rWindow.m_pCommentsSidebar->m_pViewAnnotationsButton));
-}
-}
-
-return TRUE;
-}
-
 TiledRowColumnBar

[Libreoffice-commits] core.git: 8 commits - desktop/qa include/svx libreofficekit/qa sc/source svx/source sw/source

2017-02-15 Thread Pranav Kant
 desktop/qa/desktop_lib/test_desktop_lib.cxx |8 -
 include/svx/postattr.hxx|4 
 libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx |   90 ++--
 sc/source/ui/unoobj/docuno.cxx  |   17 +--
 sc/source/ui/view/cellsh1.cxx   |3 
 svx/source/items/postattr.cxx   |4 
 sw/source/uibase/shells/textfld.cxx |   14 +--
 7 files changed, 70 insertions(+), 70 deletions(-)

New commits:
commit abef7dfae3d87f52464d1f0879927ffdcfd41656
Author: Pranav Kant 
Date:   Wed Feb 15 16:13:11 2017 +0530

gtktiledviewer: Kill signalSize; move its code to initWindow

Change-Id: I8aa0a00768e074b016ea20680c67884f19fe26df

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 6ad2052..2f8dcdb 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -215,8 +215,6 @@ static std::map g_aWindows;
 static void setupDocView(GtkWidget* pDocView);
 static GtkWidget* createWindow(TiledWindow& rWindow);
 static void openDocumentCallback (GObject* source_object, GAsyncResult* res, 
gpointer userdata);
-/// Called when the document size is changed.
-static void signalSize(LOKDocView* pLOKDocView, gpointer pData);
 /// Handler for m_pPartModeComboBox.
 static void changePartMode( GtkWidget* pSelector, gpointer /*pItem*/);
 /// Handler for m_pPartSelector.
@@ -1135,10 +1133,15 @@ static void registerSelectorHandlers(TiledWindow& 
rWindow)
 /// document load)
 static void initWindow(TiledWindow& rWindow)
 {
+rWindow.m_bPartSelectorBroadcast = false;
 populatePartSelector(LOK_DOC_VIEW(rWindow.m_pDocView));
+rWindow.m_bPartSelectorBroadcast = true;
+
 populatePartModeSelector( GTK_COMBO_BOX_TEXT(rWindow.m_pPartModeComboBox) 
);
 registerSelectorHandlers(rWindow);
 
+registerSelectorHandlers(rWindow);
+
 GList *focusChain = nullptr;
 focusChain = g_list_append( focusChain, rWindow.m_pDocView );
 gtk_container_set_focus_chain ( GTK_CONTAINER (rWindow.m_pVBox), 
focusChain );
@@ -1170,9 +1173,6 @@ static void createView(GtkWidget* pButton, gpointer 
/*pItem*/)
 // Hide the unused progress bar.
 gtk_widget_show_all(rNewWindow.m_pStatusBar);
 gtk_widget_hide(rNewWindow.m_pProgressBar);
-// Trigger a 'document size changed' event to populate the part selectors.
-signalSize(LOK_DOC_VIEW(pDocView), nullptr);
-registerSelectorHandlers(rNewWindow);
 }
 
 /// Creates a new model, i.e. LOK init and document load, one view implicitly.
@@ -1727,14 +1727,6 @@ static void populatePartSelector(LOKDocView* pLOKDocView)
 gtk_combo_box_set_active(GTK_COMBO_BOX(rWindow.m_pPartSelector), 
lok_doc_view_get_part(pLOKDocView));
 }
 
-static void signalSize(LOKDocView* pLOKDocView, gpointer /*pData*/)
-{
-TiledWindow& rWindow = lcl_getTiledWindow(GTK_WIDGET(pLOKDocView));
-rWindow.m_bPartSelectorBroadcast = false;
-populatePartSelector(pLOKDocView);
-rWindow.m_bPartSelectorBroadcast = true;
-}
-
 static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
 {
 int nPart = gtk_combo_box_get_active( GTK_COMBO_BOX(pSelector) );
@@ -2206,7 +2198,6 @@ static void setupDocView(GtkWidget* pDocView)
 g_signal_connect(pDocView, "search-not-found", G_CALLBACK(signalSearch), 
nullptr);
 g_signal_connect(pDocView, "search-result-count", 
G_CALLBACK(signalSearchResultCount), nullptr);
 g_signal_connect(pDocView, "part-changed", G_CALLBACK(signalPart), 
nullptr);
-g_signal_connect(pDocView, "size-changed", G_CALLBACK(signalSize), 
nullptr);
 g_signal_connect(pDocView, "hyperlink-clicked", 
G_CALLBACK(signalHyperlink), nullptr);
 g_signal_connect(pDocView, "cursor-changed", G_CALLBACK(cursorChanged), 
nullptr);
 g_signal_connect(pDocView, "formula-changed", G_CALLBACK(formulaChanged), 
nullptr);
commit 786107e674877478b8c7fdc4e6b545c44ac6b6ac
Author: Pranav Kant 
Date:   Wed Feb 15 15:49:41 2017 +0530

gtktiledviewer: Factor out per view code to separate function

This code (populating part selector, part mode selector etc.) is something
that needs to be executed for each view, not just the view that makes
open_document call. Put all such code in initWindow function from now.

Change-Id: Ibf9b12adb156258aa3cfdf959fffb541a88da529

diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx 
b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index e7df903..6ad2052 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -221,6 +221,10 @@ static void signalSize(LOKDocView* pLOKDocView, gpointer 
pData);
 static void changePartMode( GtkWidget* pSelector, gpointer /*pItem*/);
 /// Handler for m_pPartSelector.
 static void changePart( GtkWidget* pSelector, gpointer /*pItem*/ );
+/// Par

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

2017-02-15 Thread Pranav Kant
 sc/inc/docuno.hxx |3 +
 sc/inc/viewdata.hxx   |1 
 sc/source/ui/docshell/docfunc.cxx |5 ++
 sc/source/ui/unoobj/docuno.cxx|   71 +++---
 4 files changed, 74 insertions(+), 6 deletions(-)

New commits:
commit a29b0d68011f9e2be8eee466f3f9ccad283f274c
Author: Pranav Kant 
Date:   Wed Feb 8 20:42:17 2017 +0530

sc lok: Prevent showing comments if tiled annotations are off

Change-Id: I594b61e102c0ecacb169ee6064ba96d70c16ab42

diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 671b400..dde0818 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -19,6 +19,7 @@
 
 #include "scitems.hxx"
 
+#include 
 #include 
 #include 
 #include 
@@ -1214,7 +1215,9 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool 
bShow )
 {
 ScDocument& rDoc = rDocShell.GetDocument();
 ScPostIt* pNote = rDoc.GetNote( rPos );
-if( !pNote || (bShow == pNote->IsCaptionShown()) ) return false;
+if( !pNote || (bShow == pNote->IsCaptionShown()) ||
+(comphelper::LibreOfficeKit::isActive() && 
!comphelper::LibreOfficeKit::isTiledAnnotations()) )
+return false;
 
 // move the caption to internal or hidden layer and create undo action
 pNote->ShowCaption( rPos, bShow );
commit c7b84ac9ea14e6c96165e3281c4bea422918c83f
Author: Pranav Kant 
Date:   Wed Feb 8 20:40:57 2017 +0530

sc lok: Set appropriate ScViewOptions when annotations are off

Change-Id: I65b3fea9a33396419dff70b134729594c0dda4db

diff --git a/sc/inc/viewdata.hxx b/sc/inc/viewdata.hxx
index 1d9dcda..6a8eb4c 100644
--- a/sc/inc/viewdata.hxx
+++ b/sc/inc/viewdata.hxx
@@ -431,6 +431,7 @@ public:
 voidSetHScrollMode  ( bool bNewMode )   { pOptions->SetOption( 
VOPT_HSCROLL, bNewMode ); }
 boolIsOutlineMode   () const{ return pOptions->GetOption( 
VOPT_OUTLINER ); }
 voidSetOutlineMode  ( bool bNewMode )   { pOptions->SetOption( 
VOPT_OUTLINER, bNewMode ); }
+voidSetNotesMode( bool bNewMode )   { pOptions->SetOption( 
VOPT_NOTES, bNewMode ); }
 
 /// Force page size for PgUp/PgDown to overwrite the computation based on 
m_aVisArea.
 void ForcePageUpDownOffset(long nTwips) { m_nLOKPageUpDownOffset = nTwips; 
}
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index beb3bd6..f506fa5 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1052,6 +1052,10 @@ void ScModelObj::initializeForTiledRendering(const 
css::uno::SequenceSetNotesMode(false);
+
 // default tile size in pixels
 mnTilePixelWidth = 256;
 mnTilePixelHeight = 256;
commit 31b32d156ab69f347f21de29c8ba6cd07cc4dc95
Author: Pranav Kant 
Date:   Thu Feb 9 19:19:38 2017 +0530

sc lok: implement commandvalues command, ViewAnnotations

... to list all notes in calc.

Change-Id: I6c636ebd47ee238c32e3c0b7d10254d237396a51

diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index d496958..e7195e5 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -356,6 +356,9 @@ public:
 
 /// @see vcl::ITiledRenderable::setClientVisibleArea().
 virtual void setClientVisibleArea(const Rectangle& rRectangle) override;
+
+/// @see vcl::ITiledRenderable::getPostIts().
+OUString getPostIts() override;
 };
 
 class ScDrawPagesObj : public cppu::WeakImplHelper<
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 2c43888..beb3bd6 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -19,6 +19,8 @@
 
 #include 
 
+#include 
+
 #include "scitems.hxx"
 #include 
 #include 
@@ -975,6 +977,63 @@ void ScModelObj::setClientVisibleArea(const Rectangle& 
rRectangle)
 pViewData->ForcePageUpDownOffset(rRectangle.GetHeight());
 }
 
+OUString ScModelObj::getPostIts()
+{
+if (!pDocShell)
+return OUString();
+
+const ScDocument& rDoc = pDocShell->GetDocument();
+std::vector aNotes;
+rDoc.GetAllNoteEntries(aNotes);
+
+boost::property_tree::ptree aAnnotations;
+for (const sc::NoteEntry& aNote : aNotes)
+{
+boost::property_tree::ptree aAnnotation;
+aAnnotation.put("id", aNote.maPos.hash());
+aAnnotation.put("author", aNote.mpNote->GetAuthor());
+aAnnotation.put("dateTime", aNote.mpNote->GetDate());
+aAnnotation.put("text", aNote.mpNote->GetText());
+
+// Calculating the cell cursor position
+ScViewData* pViewData = ScDocShell::GetViewData();
+ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+if (pGridWindow)
+{
+Fraction zoomX = Fraction(long(mnTilePixelWidth * 
TWIPS_PER_PIXEL), mnTileTwipWidth);
+Fraction zoomY = Fraction(long(mnTilePixelHeight * 
TWIPS_PER_PIXEL), mnTileTwipHeight);
+
+Fraction defaultZoomX = pViewData->GetZoomX();
+Fraction defaultZoomY = pViewData->G

writing extensions in a functional language

2017-02-15 Thread Gergely Buday
Dear Developers,

 

I am interested in writing an extension to Libre Office, particularly Calc.

 

I would like to do it in a functional language.

 

My favourite is Standard ML and it is quite portable.

 

How much work, i.e. how many lines of code would it be to write an interface
for ML/LibreOffice?

 

Where in the Libre Office source tree I can find the glue code for various
extension languages?

 

Another option is to use Scala as it is possible to write extensions in Java
and Scala can use Java libraries.

 

Did anybody write a Libre Office extension in Scala?

 

- Gergely

 

 

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


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

2017-02-15 Thread David Ostrovsky
 external/firebird/UnpackedTarball_firebird.mk |1 +
 external/firebird/firebird-vs2017.patch.1 |   12 
 2 files changed, 13 insertions(+)

New commits:
commit 3e1e49561bb734475d2b7d1db1beef0d3e9b53cd
Author: David Ostrovsky 
Date:   Wed Feb 15 22:31:00 2017 +0100

Fix firebird MSVC 15.0 detection

Change-Id: I9721632c68e6428b03b0368e7802c6eb4f5eb0a2
Reviewed-on: https://gerrit.libreoffice.org/34323
Tested-by: Jenkins 
Reviewed-by: David Ostrovsky 

diff --git a/external/firebird/UnpackedTarball_firebird.mk 
b/external/firebird/UnpackedTarball_firebird.mk
index 3cd7a42..29395c0 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
 ifeq ($(OS),WNT)
 $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
external/firebird/firebird-cygwin-msvc.patch \
+   external/firebird/firebird-vs2017.patch.1 \
 ))
 endif
 
diff --git a/external/firebird/firebird-vs2017.patch.1 
b/external/firebird/firebird-vs2017.patch.1
new file mode 100644
index 000..ba747b3
--- /dev/null
+++ b/external/firebird/firebird-vs2017.patch.1
@@ -0,0 +1,12 @@
+diff -ru firebird.orig/src/common/os/win32/mod_loader.cpp 
firebird/src/common/os/win32/mod_loader.cpp
+--- firebird.orig/src/common/os/win32/mod_loader.cpp   2017-02-15 
22:11:48.939042400 +0100
 firebird/src/common/os/win32/mod_loader.cpp2017-02-15 
22:12:30.062262700 +0100
+@@ -103,6 +103,8 @@
+   "msvcr120.dll",
+ #elif _MSC_VER == 1900
+   "vcruntime140.dll",
++#elif _MSC_VER == 1910
++  "vcruntime140.dll",
+ #else
+ #error Specify CRT DLL name here !
+ #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Tor Lillqvist
 oox/source/export/drawingml.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 50089a812be66d37ea7b660da11f08079ff5277f
Author: Tor Lillqvist 
Date:   Thu Feb 16 00:41:52 2017 +0200

Try harder to fix Android tinderbox

Change-Id: I4f3f112d4cd301d3ee1806cd2d26564ac3852723

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index a57fc82..1824072 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -104,6 +104,17 @@ using ::css::io::XOutputStream;
 using ::sax_fastparser::FSHelperPtr;
 using ::sax_fastparser::FastSerializerHelper;
 
+#if defined(ANDROID)
+namespace std
+{
+template
+T lround(T x)
+{
+return ::lround(x);
+}
+}
+#endif
+
 namespace oox {
 namespace drawingml {
 
@@ -1912,17 +1923,6 @@ void DrawingML::WriteLinespacing( LineSpacing& rSpacing )
 }
 }
 
-#if defined(ANDROID)
-namespace std
-{
-template
-T lround(T x)
-{
-return ::lround(x);
-}
-}
-#endif
-
 void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& 
rParagraph )
 {
 Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Henry Castro
 loleaflet/src/layer/AnnotationManager.js |   73 +--
 loleaflet/src/layer/marker/Annotation.js |6 ++
 loleaflet/src/layer/tile/TileLayer.js|3 +
 3 files changed, 77 insertions(+), 5 deletions(-)

New commits:
commit 4b5c667d239f0775b9775b58bc7fb94a49d67670
Author: Henry Castro 
Date:   Wed Feb 15 17:47:46 2017 -0400

loleaflet: sync annotations with server side

diff --git a/loleaflet/src/layer/AnnotationManager.js 
b/loleaflet/src/layer/AnnotationManager.js
index 3fef9d1..92ee3f6 100644
--- a/loleaflet/src/layer/AnnotationManager.js
+++ b/loleaflet/src/layer/AnnotationManager.js
@@ -65,7 +65,7 @@ L.AnnotationManager = L.Class.extend({
},
 
unselect: function () {
-   this._selected.annotation = null;
+   this._selected = {};
this._map.removeLayer(this._arrow);
this.layout();
},
@@ -74,7 +74,7 @@ L.AnnotationManager = L.Class.extend({
var topRight = 
this._map.project(this._map.options.maxBounds.getNorthEast());
var annotation = this._items[id];
var point0, point1, point2, point3;
-   if (annotation.id !== id) {
+   if (!this._selected.annotation || 
this._selected.annotation._data.id !== annotation._data.id) {
this._selected.annotation = annotation;
this.layout();
point0 = 
this._map._docLayer._twipsToPixels(annotation._data.anchorPos);
@@ -165,13 +165,44 @@ L.AnnotationManager = L.Class.extend({
this.unselect();
this._map.removeLayer(this._items[id]);
delete this._items[id];
-   this._map.focus();
+   },
+
+   onACKComment: function (textMsg) {
+   textMsg = textMsg.substring('comment:'.length + 1);
+   var obj = JSON.parse(textMsg);
+
+   if (obj.comment.action === 'Add') {
+   if (this._items['new']) {
+   delete obj.comment.action;
+   obj.comment.anchorPos = 
L.LOUtil.stringToPoint(obj.comment.anchorPos);
+   this._items[obj.comment.id] = 
this._items['new'];
+   this._items[obj.comment.id]._data = obj.comment;
+   this._items['new'] = null;
+   this._removeAnchor('new');
+   this._anchors.push({anchor: 
obj.comment.anchorPos, id: obj.comment.id});
+   this._anchors.sort(function(a, b) {
+   return Math.abs(a.anchor.y) - 
Math.abs(b.anchor.y);
+   });
+   this._items[obj.comment.id]._updateContent();
+   this.layout();
+   }
+
+   } else if (obj.comment.action === 'Remove') {
+   if (this._items[obj.comment.id]) {
+   // something wrong here
+   }
+   } else if (obj.comment.action === 'Modify') {
+   if (this._items[obj.comment.id] && 
this._items[obj.comment.id].text !== obj.comment.text) {
+   // something wrong here
+   }
+   }
},
 
_onAnnotationCancel: function (e) {
if (e.id === 'new') {
this.remove(e.id);
}
+   this._map.focus();
},
 
_onAnnotationClick: function (e) {
@@ -185,11 +216,45 @@ L.AnnotationManager = L.Class.extend({
},
 
_onAnnotationRemove: function (id) {
+   var comment = {
+   Id: {
+   type: 'long',
+   value: id
+   }
+   };
+   this._map.sendUnoCommand('.uno:DeleteComment', comment);
this.remove(id);
+   this._map.focus();
},
 
_onAnnotationSave: function (e) {
-   this.layout();
+   if (e.id === 'new') {
+   var comment = {
+   Text: {
+   type: 'string',
+   value: this._items[e.id]._data.text
+   },
+   Author: {
+   type: 'string',
+   value: this._items[e.id]._data.author
+   }
+   };
+   this._map.sendUnoCommand('.uno:InsertAnnotation', 
comment);
+   } else {
+   var comment = {
+   Id: {
+   type: 'long',
+ 

[Libreoffice-commits] core.git: accessibility/inc accessibility/source animations/source avmedia/source basctl/source basegfx/source basegfx/test basic/source binaryurp/source bridges/source

2017-02-15 Thread Tor Lillqvist
 accessibility/inc/extended/accessiblelistboxentry.hxx   |2 
 accessibility/inc/extended/accessibletabbar.hxx |2 
 accessibility/inc/extended/accessibletabbarpagelist.hxx |2 
 accessibility/inc/extended/textwindowaccessibility.hxx  |4 
 accessibility/inc/helper/characterattributeshelper.hxx  |2 
 accessibility/inc/standard/accessiblemenubasecomponent.hxx  |2 
 accessibility/inc/standard/vclxaccessiblestatusbar.hxx  |2 
 accessibility/inc/standard/vclxaccessibletabcontrol.hxx |2 
 accessibility/source/extended/accessiblelistboxentry.cxx|2 
 accessibility/source/extended/textwindowaccessibility.cxx   |   18 +--
 accessibility/source/standard/vclxaccessibleedit.cxx|4 
 accessibility/source/standard/vclxaccessibleradiobutton.cxx |2 
 animations/source/animcore/animcore.cxx |   18 +--
 avmedia/source/framework/MediaControlBase.cxx   |4 
 avmedia/source/viewer/mediawindow.cxx   |2 
 avmedia/source/viewer/mediawindow_impl.cxx  |2 
 basctl/source/accessibility/accessibledialogwindow.cxx  |6 -
 basctl/source/basicide/basides1.cxx |2 
 basctl/source/basicide/basobj2.cxx  |   14 +-
 basctl/source/basicide/bastypes.cxx |4 
 basctl/source/basicide/breakpoint.cxx   |4 
 basctl/source/basicide/breakpoint.hxx   |2 
 basctl/source/basicide/documentenumeration.cxx  |2 
 basctl/source/basicide/documentenumeration.hxx  |4 
 basctl/source/basicide/macrodlg.cxx |2 
 basctl/source/basicide/moduldl2.cxx |2 
 basctl/source/basicide/scriptdocument.cxx   |   12 +-
 basctl/source/dlged/dlgedobj.cxx|   18 +--
 basctl/source/inc/accessibledialogwindow.hxx|2 
 basctl/source/inc/dlgedobj.hxx  |4 
 basctl/source/inc/scriptdocument.hxx|2 
 basegfx/source/color/bcolortools.cxx|4 
 basegfx/source/curve/b2dbeziertools.cxx |2 
 basegfx/source/curve/b2dcubicbezier.cxx |   12 +-
 basegfx/source/polygon/b2dlinegeometry.cxx  |4 
 basegfx/source/polygon/b2dpolygon.cxx   |   12 +-
 basegfx/source/polygon/b2dpolygoncutandtouch.cxx|4 
 basegfx/source/polygon/b2dpolygontools.cxx  |4 
 basegfx/source/polygon/b2dpolygontriangulator.cxx   |6 -
 basegfx/source/polygon/b2dpolypolygoncutter.cxx |   20 ++--
 basegfx/source/polygon/b2dpolypolygontools.cxx  |4 
 basegfx/source/polygon/b2dtrapezoid.cxx |6 -
 basegfx/source/polygon/b3dpolygon.cxx   |   16 +--
 basegfx/source/polygon/b3dpolygontools.cxx  |4 
 basegfx/source/polygon/b3dpolypolygon.cxx   |2 
 basegfx/source/polygon/b3dpolypolygontools.cxx  |8 -
 basegfx/source/range/b2xrange.cxx   |6 -
 basegfx/source/raster/rasterconvert3d.cxx   |   24 ++--
 basegfx/source/tools/keystoplerp.cxx|2 
 basegfx/source/tools/tools.cxx  |8 -
 basegfx/source/workbench/bezierclip.cxx |   58 ++--
 basegfx/source/workbench/bezierclip.hxx |4 
 basegfx/source/workbench/convexhull.cxx |   12 +-
 basegfx/test/boxclipper.cxx |2 
 basegfx/test/boxclipper.hxx |2 
 basic/source/basmgr/basicmanagerrepository.cxx  |6 -
 basic/source/basmgr/vbahelper.cxx   |4 
 basic/source/classes/sbxmod.cxx |2 
 basic/source/inc/expr.hxx   |4 
 basic/source/inc/parser.hxx |2 
 basic/source/inc/propacc.hxx|2 
 basic/source/inc/sbunoobj.hxx   |2 
 binaryurp/source/cache.hxx  |2 
 bridges/source/cpp_uno/gcc3_aix_powerpc/share.hxx   |6 -
 bridges/source/cpp_uno/gcc3_linux_alpha/share.hxx   |6 -
 bridges/source/cpp_uno/gcc3_linux_arm/share.hxx |6 -
 bridges/source/cpp_uno/gcc3_linux_hppa/share.hxx|6 -
 bridges/source/cpp_uno/gcc3_linux_ia64/share.hxx|6 -
 bridges/source/cpp_uno/gcc3_linux_intel/share.hxx   |6 -
 bridges/source/cpp_uno/gcc3_linux_m68k/share.hxx|6 -
 bridges/source/cpp_uno/gcc3_linux_mips/share.hxx|6 -
 bridges/source/cpp_uno/gcc3_linux_mips64/s

Re: Support new and discontinue old compilers

2017-02-15 Thread David Ostrovsky
On Wed, 2017-02-15 at 15:39 +0200, marius adrian popa wrote:
> I will check the issue with Firebird 
> 
> http://paste.openstack.org/show/594333/
> 

Not needed, the failure above was outdated, the recent firebird failure
is: [1],
which was trivial to fix: [2]. As a good open source citizen, I
uploaded this PR
[3] upstream.
IOW, LO can be built on MSVC 15.0, even with firebird ;) I updated the
WIKI
correspondingly: [4].
* [1] http://paste.openstack.org/show/599110/
* [2] https://gerrit.libreoffice.org/#/c/34323/
* [3] https://github.com/FirebirdSQL/firebird/pull/84
* [4] https://wiki.documentfoundation.org/Development/BuildingOnWindows
#Visual_Studio_2017_compiler
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


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

2017-02-15 Thread Tamás Zolnai
 chart2/qa/extras/chart2dump/chart2dump.cxx 
|   64 ++
 chart2/qa/extras/chart2dump/data/normal_area_chart.ods 
|binary
 chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods
|binary
 chart2/qa/extras/chart2dump/data/stacked_area_chart.ods
|binary
 chart2/qa/extras/chart2dump/reference/areacharttest/normal_area_chart.txt  
|   62 +
 
chart2/qa/extras/chart2dump/reference/areacharttest/percent_stacked_area_chart.txt
 |   62 +
 chart2/qa/extras/chart2dump/reference/areacharttest/stacked_area_chart.txt 
|   62 +
 7 files changed, 250 insertions(+)

New commits:
commit d007cef2dfd0c4d7b009b4f943464c6c4854d88d
Author: Tamás Zolnai 
Date:   Wed Feb 15 18:56:39 2017 +0100

ChartDumpTest: Test area charts

Change-Id: Ie6dbc4a005f1840dc6b324a99406283676580b96
Reviewed-on: https://gerrit.libreoffice.org/34315
Tested-by: Jenkins 
Reviewed-by: Tamás Zolnai 

diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx 
b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 049a7cf..ba1d83b 100755
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -937,6 +937,70 @@ DECLARE_DUMP_TEST(PieChartTest, Chart2DumpTest, false)
 }
 }
 
+DECLARE_DUMP_TEST(AreaChartTest, Chart2DumpTest, false)
+{
+const std::vector aTestFiles =
+{
+"normal_area_chart.ods",
+"stacked_area_chart.ods",
+"percent_stacked_area_chart.ods"
+};
+
+for (const OUString& sTestFile : aTestFiles)
+{
+setTestFileName(sTestFile);
+load(getTestFileDirName(), getTestFileName());
+uno::Reference< chart::XChartDocument > 
xChartDoc(getChartDocFromSheet(0, mxComponent), UNO_QUERY_THROW);
+uno::Reference 
xDrawPageSupplier(xChartDoc, uno::UNO_QUERY);
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShapes(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xShapes.is());
+
+uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, 
UNO_QUERY_THROW);
+Reference xChartType = 
getChartTypeFromDoc(xChartDoc2, 0);
+CPPUNIT_ASSERT(xChartType.is());
+
+std::vector > aDataSeriesYValues = 
getDataSeriesYValuesFromChartType(xChartType);
+size_t nSeriesCount = aDataSeriesYValues.size();
+CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(nSeriesCount);
+
+for (size_t nSeries = 0; nSeries < nSeriesCount; ++nSeries)
+{
+uno::Reference xSeries = getShapeByName(xShapes, 
"CID/D=0:CS=0:CT=0:Series=" + OUString::number(nSeries));
+CPPUNIT_ASSERT(xSeries.is());
+CPPUNIT_DUMP_ASSERT_NOTE("Series " + OUString::number(nSeries));
+
+// One are for one series
+uno::Reference xIndexAccess(xSeries, 
UNO_QUERY_THROW);
+uno::Reference 
xIndexAccess2(xIndexAccess->getByIndex(0), UNO_QUERY_THROW); // Why this second 
group shape is here?
+uno::Reference 
xArea(xIndexAccess2->getByIndex(0), UNO_QUERY_THROW);
+
+// Check size and position
+awt::Point aAreaPosition = xArea->getPosition();
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaPosition.X, INT_EPS);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaPosition.Y, INT_EPS);
+awt::Size aAreaSize = xArea->getSize();
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaSize.Height, INT_EPS);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAreaSize.Width, INT_EPS);
+
+// Check transformation
+Reference< beans::XPropertySet > xPropSet(xArea, UNO_QUERY_THROW);
+CPPUNIT_ASSERT(xPropSet.is());
+drawing::HomogenMatrix3 aAreaTransformation;
+xPropSet->getPropertyValue("Transformation") >>= 
aAreaTransformation;
+CPPUNIT_DUMP_ASSERT_TRANSFORMATIONS_EQUAL(aAreaTransformation);
+
+// Check area fill style and color
+drawing::FillStyle aAreaFillStyle;
+xPropSet->getPropertyValue(UNO_NAME_FILLSTYLE) >>= aAreaFillStyle;
+
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aAreaFillStyle));
+util::Color aAreaFillColor = 0;
+xPropSet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= aAreaFillColor;
+
CPPUNIT_DUMP_ASSERT_NUMBERS_EQUAL(static_cast(aAreaFillColor));
+}
+}
+}
+
 
 CPPUNIT_PLUGIN_IMPLEMENT();
 
diff --git a/chart2/qa/extras/chart2dump/data/normal_area_chart.ods 
b/chart2/qa/extras/chart2dump/data/normal_area_chart.ods
new file mode 100755
index 000..84b9ec2
Binary files /dev/null and 
b/chart2/qa/extras/chart2dump/data/normal_area_chart.ods differ
diff --git a/chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods 
b/chart2/qa/extras/chart2dump/data/percent_stacked_area_chart.ods
new file mode 100755
index 000..0cc5d17
Binary files

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

2017-02-15 Thread Eike Rathke
 svl/qa/unit/svl.cxx|   35 +++
 svl/source/numbers/zformat.cxx |   11 +++
 2 files changed, 46 insertions(+)

New commits:
commit 5e180078ecc4501900e41da48b279033a7529a96
Author: Eike Rathke 
Date:   Wed Feb 15 22:05:29 2017 +0100

unit test for engineering notation, tdf#105968

Change-Id: Ib5303f09cfda232b0bee88df3d76650165337c08

diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 9804c7e..8e185d5 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1221,6 +1221,41 @@ void Test::testUserDefinedNumberFormats()
 sCode = "[DBNum2][$-0404]General\\ ";
 checkPreviewString(aFormatter, sCode, 120, eLang, sExpected);
 }
+{  // tdf#105968 engineering format with value rounded up to next magnitude
+sCode = "##0.00E+00";
+sExpected = "100.00E+00";
+checkPreviewString(aFormatter, sCode, 99.995, eLang, sExpected);
+// test '1'=='1' assumption
+checkPreviewString(aFormatter, sCode, 100.0, eLang, sExpected);
+sExpected = "199.99E+00";
+checkPreviewString(aFormatter, sCode, 199.99, eLang, sExpected);
+sExpected = "1.00E+03";
+checkPreviewString(aFormatter, sCode, 1000.0, eLang, sExpected);
+// and another just "normally" rounded value
+sExpected = "894.55E-06";
+checkPreviewString(aFormatter, sCode, 0.000894549, eLang, sExpected);
+// not expecting rounding into another magnitude
+sExpected = "999.99E-06";
+checkPreviewString(aFormatter, sCode, 0.00091, eLang, sExpected);
+// expecting rounding into another magnitude
+sExpected = "1.00E-03";
+checkPreviewString(aFormatter, sCode, 0.00099, eLang, sExpected);
+
+// Now the same all negative values.
+sExpected = "-100.00E+00";
+checkPreviewString(aFormatter, sCode, -99.995, eLang, sExpected);
+checkPreviewString(aFormatter, sCode, -100.0, eLang, sExpected);
+sExpected = "-199.99E+00";
+checkPreviewString(aFormatter, sCode, -199.99, eLang, sExpected);
+sExpected = "-1.00E+03";
+checkPreviewString(aFormatter, sCode, -1000.0, eLang, sExpected);
+sExpected = "-894.55E-06";
+checkPreviewString(aFormatter, sCode, -0.000894549, eLang, sExpected);
+sExpected = "-999.99E-06";
+checkPreviewString(aFormatter, sCode, -0.00091, eLang, sExpected);
+sExpected = "-1.00E-03";
+checkPreviewString(aFormatter, sCode, -0.00099, eLang, sExpected);
+}
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(Test);
commit 63bc2b13cb344cce99348496838d7d2c2f690211
Author: Eike Rathke 
Date:   Wed Feb 15 22:01:51 2017 +0100

Resolves: tdf#105968 handle engineering notation rounded into next magnitude

Change-Id: Ie31ab88543994f0e8aeef8152c230c05e071ef8e

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 8178b7e..ac0c608 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -2593,11 +2593,22 @@ bool SvNumberformat::ImpGetScientificOutput(double 
fNumber,
 nExpSign = 1;
 }
 ExpStr = OUString::number( nExp );
+const sal_Unicode cFirstDigit = sStr[0];
 // rescale mantissa
 sStr = ::rtl::math::doubleToUString( fNumber,
  rtl_math_StringFormat_E,
  nRescale + rInfo.nCntPost, '.' );
+
+// sStr now may contain a rounded-up value shifted into the next
+// magnitude, for example 1.000E+02 (4 digits) for fNumber 99.995
+// (9.9995E+02 rounded to 3 decimals) but we want the final result
+// to be 100.00E+00 (5 digits), so for the following fill routines
+// below to work correctly append a zero decimal.
+/* TODO: this is awkward, could an engineering notation mode be
+ * introduced to rtl_math_doubleToUString()? */
 sStr.truncate( sStr.indexOf('E') );
+if (sStr[0] == '1' && cFirstDigit != '1')
+sStr.append('0');
 }
 
 // cut any decimal delimiter
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Caolán McNamara
 oox/source/export/drawingml.cxx |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 7e3edba7497291f089fb4a5aabd721b7192cee64
Author: Caolán McNamara 
Date:   Wed Feb 15 20:39:45 2017 +

no std::lround on android

Change-Id: I910a0a81a925ce4578f3b9b3a51987fbbd91aa13

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 13871c9..a57fc82 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1912,6 +1912,17 @@ void DrawingML::WriteLinespacing( LineSpacing& rSpacing )
 }
 }
 
+#if defined(ANDROID)
+namespace std
+{
+template
+T lround(T x)
+{
+return ::lround(x);
+}
+}
+#endif
+
 void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& 
rParagraph )
 {
 Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Johnny_M
 include/svx/svdhlpln.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 6efb8713d46fe59e623445a1a8c8a82e23012a82
Author: Johnny_M 
Date:   Wed Feb 15 18:43:24 2017 +

Translate German comments (left over from the include/ dir)

This is to translate German comments yet left in the include/ directory 
after https://gerrit.libreoffice.org/33895

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

diff --git a/include/svx/svdhlpln.hxx b/include/svx/svdhlpln.hxx
index 9bb995f..fafab5a 100644
--- a/include/svx/svdhlpln.hxx
+++ b/include/svx/svdhlpln.hxx
@@ -32,10 +32,10 @@ class OutputDevice;
 
 enum class SdrHelpLineKind { Point, Vertical, Horizontal };
 
-#define SDRHELPLINE_POINT_PIXELSIZE 15 /* Tatsaechliche Groesse= PIXELSIZE*2+1 
*/
+#define SDRHELPLINE_POINT_PIXELSIZE 15 /* actual size = PIXELSIZE*2+1 */
 
 class SdrHelpLine {
-PointaPos; // je nach Wert von eKind ist X oder Y evtl. 
belanglos
+PointaPos; // X or Y may be unimportant, depending on the 
value of eKind
 SdrHelpLineKind  eKind;
 
 public:
@@ -51,7 +51,7 @@ public:
 
 Pointer GetPointer() const;
 boolIsHit(const Point& rPnt, sal_uInt16 nTolLog, const 
OutputDevice& rOut) const;
-// OutputDevice wird benoetigt, da Fangpunkte eine feste Pixelgroesse haben
+// OutputDevice is required because capture points have a fixed pixel size
 Rectangle   GetBoundRect(const OutputDevice& rOut) const;
 };
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Johnny_M
 include/svtools/rtftoken.h |   18 +-
 sc/inc/autoform.hxx|   10 +
 sc/source/core/tool/ddelink.cxx|   52 ++---
 sc/source/core/tool/editutil.cxx   |   28 +++
 sc/source/core/tool/rangelst.cxx   |   66 ++---
 sc/source/core/tool/refupdat.cxx   |   36 ++--
 sc/source/core/tool/stringutil.cxx |2 -
 sc/source/core/tool/viewopti.cxx   |6 +--
 8 files changed, 106 insertions(+), 112 deletions(-)

New commits:
commit c0089c104de4758dae6e3d732d4f5ff2c6fd5074
Author: Johnny_M 
Date:   Fri Feb 3 17:44:50 2017 +

Translate German comments

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

diff --git a/include/svtools/rtftoken.h b/include/svtools/rtftoken.h
index cb23f30..550a36f 100644
--- a/include/svtools/rtftoken.h
+++ b/include/svtools/rtftoken.h
@@ -24,7 +24,7 @@ namespace rtl {
   class OUString;
 };
 
-// suche die TokenID zu dem Token
+// search the TokenID for the token
 int GetRTFToken( const rtl::OUString& rSearch );
 
 enum RTF_TOKEN_RANGES {
@@ -43,10 +43,10 @@ enum RTF_TOKEN_RANGES {
 RTF_OBJECTS = 0x0D00,
 RTF_NUMBULLETS  = 0x0E00,
 
-// !!! kann hinein verodert werden (Border/Background) 
+// !!! can be mixed in using the "or" operator (border/background) 
 RTF_TABLEDEF= 0x1000,
 
-// !!! kann hinein verodert werden (Border/Tab) 
+// !!! can be mixed in using the "or" operator (border/tab) 
 RTF_SWGDEFS = 0x4000
 };
 
@@ -179,7 +179,7 @@ enum RTF_TOKEN_IDS {
 RTF_BLIPUID,
 RTF_BLIPUPI,
 
-RTF_FIELD,  // Felder
+RTF_FIELD,  // Fields
 RTF_FLDDIRTY,
 RTF_FLDEDIT,
 RTF_FLDLOCK,
@@ -520,7 +520,7 @@ enum RTF_TOKEN_IDS {
 RTF_SECTSPECIFYCL,
 RTF_SECTSPECIFYL,
 
-// Swg-Header/Footer-Tokens
+// Swg header/footer tokens
 RTF_HEADER_YB   = (RTF_SECTFMT|RTF_SWGDEFS),
 RTF_HEADER_XL,
 RTF_HEADER_XR,
@@ -629,7 +629,7 @@ enum RTF_TOKEN_IDS {
 RTF_TLTH,
 RTF_TLEQ,
 
-// Swg-TabStop-Tokens
+// Swg TabStop tokens
 RTF_TLSWG = (RTF_TABSTOPDEF|RTF_SWGDEFS),
 
 /*  */
@@ -655,7 +655,7 @@ enum RTF_TOKEN_IDS {
 RTF_BRDROUTSET,
 RTF_BRDRFRAME,
 
-// Swg-Border-Tokens
+// Swg border tokens
 RTF_BRDBOX  = (RTF_BRDRDEF|RTF_SWGDEFS),
 RTF_BRDLINE_COL,
 RTF_BRDLINE_IN,
@@ -793,7 +793,7 @@ enum RTF_TOKEN_IDS {
 RTF_TWOINONE,
 RTF_HORZVERT,
 
-// Swg-Border-Tokens
+// Swg border tokens
 RTF_SWG_ESCPROP = (RTF_CHRFMT|RTF_SWGDEFS),
 RTF_HYPHEN,
 RTF_HYPHLEAD,
@@ -882,7 +882,7 @@ enum RTF_TOKEN_IDS {
 RTF_FRMTXLRTBV,
 RTF_FRMTXTBRLV,
 
-// Swg-Frame-Tokens
+// Swg frame tokens
 RTF_FLYPRINT = (RTF_APOCTL|RTF_SWGDEFS),
 RTF_FLYOPAQUE,
 RTF_FLYPRTCTD,
diff --git a/sc/inc/autoform.hxx b/sc/inc/autoform.hxx
index 69dd61f..66ff572 100644
--- a/sc/inc/autoform.hxx
+++ b/sc/inc/autoform.hxx
@@ -23,14 +23,8 @@
 /*
 !!
 
-Die akt. Struktur der Autoformatierung darf nicht mehr veraendert werden.
-Diese wird durch unterschiedlichen Code vom StartWriter und vom StarCalc
-eingelesen/geschrieben.
-Sollte sich doch mal eine Aenderung nicht vermeiden lassen, dann auf
-jedenfall in beiden Applikationen aendern.
-
-The structure of table auto formatting should not changed. It is used
-by different code of Writer and Calc. If a change is necessary, the
+The structure of auto formatting should not be changed. It is used
+by various code of Writer and Calc. If a change is necessary, the
 source code of both applications must be changed!
 
 !!
diff --git a/sc/source/core/tool/ddelink.cxx b/sc/source/core/tool/ddelink.cxx
index 5390726..f46b0fa 100644
--- a/sc/source/core/tool/ddelink.cxx
+++ b/sc/source/core/tool/ddelink.cxx
@@ -54,7 +54,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, const OUString& rA, 
const OUString& rT, co
 
 ScDdeLink::~ScDdeLink()
 {
-// Verbindung aufheben
+// cancel connection
 
 // pResult is refcounted
 }
@@ -91,7 +91,7 @@ ScDdeLink::ScDdeLink( ScDocument* pD, SvStream& rStream, 
ScMultipleReadHeader& r
 if ( bHasValue )
 pResult = new ScFullMatrix(0, 0);
 
-if (rHdr.BytesLeft())   // neu in 388b und der 364w (RealTime-Client) 
Version
+if (rHdr.BytesLeft())   // new in 388b and the 364w (RealTime Client) 
version
 rStream.ReadUChar( nMode );
 else
 nMode = SC_DDE_DEFAULT;
@@ -111,11 +111,11 @@ void ScDd

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

2017-02-15 Thread Tamás Zolnai
 chart2/qa/extras/chart2dump/chart2dump.cxx |   47 -
 1 file changed, 27 insertions(+), 20 deletions(-)

New commits:
commit f3134948fb42b92db53f519f579d4fedf5554c5e
Author: Tamás Zolnai 
Date:   Wed Feb 15 16:48:32 2017 +0100

ChartDumpTest: Add different deltas for different systems for now

Change-Id: Id505edb3ca1b03817d3a98e6102d79df901a3dc2
Reviewed-on: https://gerrit.libreoffice.org/34308
Reviewed-by: Tamás Zolnai 
Tested-by: Tamás Zolnai 

diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx 
b/chart2/qa/extras/chart2dump/chart2dump.cxx
index db82546..049a7cf 100755
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -25,7 +25,14 @@
 #include 
 
 #define EPS 1E-12
+
+#if defined(MACOSX)
+#define INT_EPS 200.1
+#elif defined(UNX)
 #define INT_EPS 2.1
+#else
+#define INT_EPS 0.1
+#endif
 
 #define DECLARE_DUMP_TEST(TestName, BaseClass, DumpMode) \
 class TestName : public BaseClass { \
@@ -210,12 +217,12 @@ protected:
 aExpectedTransform.Line3.Column3 = rExpectedTranform.getToken(8, 
';').toDouble();
 
 // Check the equality of the two transformation
-return (std::abs(aExpectedTransform.Line1.Column1 - 
rTransform.Line1.Column1) < 184.1 &&
-std::abs(aExpectedTransform.Line1.Column2 - 
rTransform.Line1.Column2) < 18 &&
-std::abs(aExpectedTransform.Line1.Column3 - 
rTransform.Line1.Column3) < 90.1 &&
-std::abs(aExpectedTransform.Line2.Column1 - 
rTransform.Line2.Column1) < 45.1 &&
-std::abs(aExpectedTransform.Line2.Column2 - 
rTransform.Line2.Column2) < 74.1 &&
-std::abs(aExpectedTransform.Line2.Column3 - 
rTransform.Line2.Column3) < 44.1 &&
+return (std::abs(aExpectedTransform.Line1.Column1 - 
rTransform.Line1.Column1) < INT_EPS &&
+std::abs(aExpectedTransform.Line1.Column2 - 
rTransform.Line1.Column2) < INT_EPS &&
+std::abs(aExpectedTransform.Line1.Column3 - 
rTransform.Line1.Column3) < INT_EPS &&
+std::abs(aExpectedTransform.Line2.Column1 - 
rTransform.Line2.Column1) < INT_EPS &&
+std::abs(aExpectedTransform.Line2.Column2 - 
rTransform.Line2.Column2) < INT_EPS &&
+std::abs(aExpectedTransform.Line2.Column3 - 
rTransform.Line2.Column3) < INT_EPS &&
 std::abs(aExpectedTransform.Line3.Column1 - 
rTransform.Line3.Column1) < INT_EPS &&
 std::abs(aExpectedTransform.Line3.Column2 - 
rTransform.Line3.Column2) < INT_EPS &&
 std::abs(aExpectedTransform.Line3.Column3 - 
rTransform.Line3.Column3) < INT_EPS);
@@ -416,11 +423,11 @@ DECLARE_DUMP_TEST(LegendTest, Chart2DumpTest, false)
 
 // Check legend position and size
 awt::Point aLegendPosition = xLegend->getPosition();
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.X, 48.1);
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.Y, 50.1);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.X, INT_EPS);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendPosition.Y, INT_EPS);
 awt::Size aLegendSize = xLegend->getSize();
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Width, 97.1);
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Height, 100.1);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Width, INT_EPS);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLegendSize.Height, INT_EPS);
 
 // Check legend entries
 uno::Reference< chart2::XChartDocument > xChartDoc2(xChartDoc, 
UNO_QUERY_THROW);
@@ -595,9 +602,9 @@ DECLARE_DUMP_TEST(AxisGeometryTest, Chart2DumpTest, false)
 // Check position and size
 awt::Point aAxisPosition = xXAxis->getPosition();
 CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisPosition.X, INT_EPS);
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisPosition.Y, 25.1);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisPosition.Y, INT_EPS);
 awt::Size aAxisSize = xXAxis->getSize();
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisSize.Height, 25.1);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisSize.Height, INT_EPS);
 CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aAxisSize.Width, INT_EPS);
 
 // Check transformation
@@ -689,11 +696,11 @@ DECLARE_DUMP_TEST(AxisLabelTest, Chart2DumpTest, false)
 // Check size and position
 uno::Reference xLabelShape(xLabel, 
uno::UNO_QUERY);
 awt::Point aLabelPosition = xLabelShape->getPosition();
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.X, 90.1);
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.Y, 35.1);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.X, INT_EPS);
+CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLabelPosition.Y, INT_EPS);
 awt::Size aLabelSize = xLabelShape->getSize();
-CPPUNIT_DUMP_ASSERT_DOUBLES_EQUAL(aLab

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/source

2017-02-15 Thread Michael Meeks
 vcl/source/window/toolbox2.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b57bfba7c1f331e13ca995c493c2973d67aa5021
Author: Michael Meeks 
Date:   Wed Feb 15 11:01:41 2017 +

Simple work-around for unpleasant framework shutdown to avoid crash.


http://crashreport.libreoffice.org/stats/crash_details/2de31c06-da20-4280-916a-e282a337b16b

Change-Id: I0b599de9b36f62d65988c1ab698f1559134fbf7c
Reviewed-on: https://gerrit.libreoffice.org/34294
Tested-by: Jenkins 
Reviewed-by: Michael Meeks 
(cherry picked from commit 2c60e02bbfde8655828a5b019642f5e85f975e61)
Reviewed-on: https://gerrit.libreoffice.org/34297
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 37f809c..6345910 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -635,7 +635,8 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const
 
 /*static*/ Size ToolBox::GetDefaultImageSize(ToolBoxButtonSize 
eToolBoxButtonSize)
 {
-float fScaleFactor = Application::GetDefaultDevice()->GetDPIScaleFactor();
+OutputDevice *pDefault = Application::GetDefaultDevice();
+float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0;
 
 Size aUnscaledSize = Size(16, 16);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - external/firebird

2017-02-15 Thread Stephan Bergmann
 
external/firebird/0001-Avoid-hangup-in-SS-when-error-happens-at-system-atta.patch.1
 |   51 
 
external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1
 | 1013 ++
 external/firebird/UnpackedTarball_firebird.mk  
 |2 
 3 files changed, 1066 insertions(+)

New commits:
commit ae318272cf19134dd020e1755ddbb480fb2b721f
Author: Stephan Bergmann 
Date:   Mon Jan 16 21:35:20 2017 +0100

external/firebird: Backport fix for CORE-5452 causing spurious SEGV

...while building LO.  Patches from 
's
B3_0_Release branch; to apply, 0002 needed 0001 first (which looks like a
reasonable thing to include in itself, anyway), plus a trivial whitespace
modification, plus an additional #include for Windows.

Reviewed-on: https://gerrit.libreoffice.org/33186
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

(cherry picked from commit 592f4f6a5941e42e6b2b3fa76e74b8ad509724c9)
Change-Id: Idd2e326432fa52762742a168c7e880a9c6fb650c
Reviewed-on: https://gerrit.libreoffice.org/34305
Tested-by: Jenkins 
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git 
a/external/firebird/0001-Avoid-hangup-in-SS-when-error-happens-at-system-atta.patch.1
 
b/external/firebird/0001-Avoid-hangup-in-SS-when-error-happens-at-system-atta.patch.1
new file mode 100644
index 000..e569fcc
--- /dev/null
+++ 
b/external/firebird/0001-Avoid-hangup-in-SS-when-error-happens-at-system-atta.patch.1
@@ -0,0 +1,51 @@
+From 36a7a2634669075be3294a1d075524a0b6f80962 Mon Sep 17 00:00:00 2001
+From: hvlad 
+Date: Wed, 17 Aug 2016 15:45:30 +0300
+Subject: [PATCH] Avoid hangup in SS when error happens at system attachment
+ initialization time
+
+---
+ src/jrd/cch.cpp | 7 ++-
+ src/jrd/vio.cpp | 5 +
+ 2 files changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/src/jrd/cch.cpp b/src/jrd/cch.cpp
+index 35ea096..643cf4d 100644
+--- a/src/jrd/cch.cpp
 b/src/jrd/cch.cpp
+@@ -2963,10 +2963,15 @@ static THREAD_ENTRY_DECLARE 
cache_writer(THREAD_ENTRY_PARAM arg)
+   iscDbLogStatus(dbb->dbb_filename.c_str(), &status_vector);
+   }
+ 
+-  bcb->bcb_flags &= ~(BCB_cache_writer | BCB_writer_start);
++  bcb->bcb_flags &= ~BCB_cache_writer;
+ 
+   try
+   {
++  if (bcb->bcb_flags & BCB_writer_start)
++  {
++  bcb->bcb_flags &= ~BCB_writer_start;
++  bcb->bcb_writer_init.release();
++  }
+   bcb->bcb_writer_fini.release();
+   }
+   catch (const Firebird::Exception& ex)
+diff --git a/src/jrd/vio.cpp b/src/jrd/vio.cpp
+index a8cf0fc..3d35a27 100644
+--- a/src/jrd/vio.cpp
 b/src/jrd/vio.cpp
+@@ -4988,6 +4988,11 @@ static THREAD_ENTRY_DECLARE 
garbage_collector(THREAD_ENTRY_PARAM arg)
+   try
+   {
+   // Notify the finalization caller that we're finishing.
++  if (dbb->dbb_flags & DBB_gc_starting)
++  {
++  dbb->dbb_flags &= ~DBB_gc_starting;
++  dbb->dbb_gc_init.release();
++  }
+   dbb->dbb_gc_fini.release();
+   }
+   catch (const Firebird::Exception& ex)
+-- 
+2.9.3
+
diff --git 
a/external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1
 
b/external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1
new file mode 100644
index 000..c55df4d
--- /dev/null
+++ 
b/external/firebird/0002-Backported-fix-for-CORE-5452-Segfault-when-engine-s-.patch.1
@@ -0,0 +1,1013 @@
+From 40f782ae3e918c4f3842571ff8064be1c4f54961 Mon Sep 17 00:00:00 2001
+From: AlexPeshkoff 
+Date: Fri, 13 Jan 2017 14:29:54 +0300
+Subject: [PATCH] Backported fix for CORE-5452: Segfault when engine's dynamic
+ library is unloaded right after closing worker threads (GC and/or cache
+ writer)
+
+---
+ src/alice/alice_meta.epp |  1 -
+ src/burp/burp.h  |  2 -
+ src/common/ThreadStart.h | 86 
+ src/common/classes/Synchronize.h |  5 +-
+ src/common/classes/misc/class_perf.cpp   |  1 -
+ src/common/xdr.cpp   |  2 -
+ src/gpre/boot/gpre_meta_boot.cpp |  1 -
+ src/gpre/std/gpre_meta.epp   |  1 -
+ src/include/fb_exception.h   |  1 -
+ src/include/firebird.h   |  1 -
+ src/isql/OptionsBase.cpp |  1 -
+ src/isql/extract.epp |  1 -
+ src/isql/isql.epp|  5 --
+ src/jrd/Attachment.h |  1 +
+ src/jrd/Database.h   |  6 +-
+ src/jrd/Mapping.cpp  | 26 +
+ src/jrd/cch.cpp  | 31 +-
+ src/jrd/cch.h| 14 -

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

2017-02-15 Thread Caolán McNamara
 svx/source/accessibility/charmapacc.cxx |   29 +
 svx/source/inc/charmapacc.hxx   |1 +
 2 files changed, 18 insertions(+), 12 deletions(-)

New commits:
commit b3098d239f46c8d5965754f275bc62216dcb4f4f
Author: Caolán McNamara 
Date:   Wed Feb 15 16:52:53 2017 +

Related: tdf#105712 inconsistency with num of a11y children in special char

with no visible scrollbar it claims 1 child, but trying to get child at
index 0 throws

Change-Id: Icf1a0afc4a6f6090e3f14f30b4380db477955561

diff --git a/svx/source/accessibility/charmapacc.cxx 
b/svx/source/accessibility/charmapacc.cxx
index 816c68b..7d79b0a 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -71,11 +71,16 @@ void SAL_CALL SvxShowCharSetVirtualAcc::fireEvent(
 m_xTable->fireEvent(_nEventId,_rOldValue,_rNewValue);
 }
 
-sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChildCount(  )
+sal_Int32 SvxShowCharSetVirtualAcc::getImplAccessibleChildCount() const
+{
+return mpParent->getScrollBar().IsVisible() ? 2 : 1;
+}
+
+sal_Int32 SAL_CALL SvxShowCharSetVirtualAcc::getAccessibleChildCount()
 {
 OExternalLockGuard aGuard( this );
 ensureAlive();
-return ( mpParent->getScrollBar().IsVisible() ) ? 2 : 1;
+return getImplAccessibleChildCount();
 }
 
 uno::Reference< css::accessibility::XAccessible > SAL_CALL 
SvxShowCharSetVirtualAcc::getAccessibleAtPoint( const awt::Point& aPoint )
@@ -115,17 +120,17 @@ Reference< XAccessible > SAL_CALL 
SvxShowCharSetVirtualAcc::getAccessibleChild(
 {
 OExternalLockGuard aGuard( this );
 ensureAlive();
-if ( mpParent->getScrollBar().IsVisible() && i == 0 )
-return mpParent->getScrollBar().GetAccessible();
-else if ( i == 1 )
-{
-if ( !m_xTable.is() )
-{
-m_xTable = new SvxShowCharSetAcc(this);
-}
-}
-else
+
+sal_Int32 nCount = getImplAccessibleChildCount();
+if (i >= nCount)
 throw IndexOutOfBoundsException();
+
+if (i == 0 && mpParent->getScrollBar().IsVisible())
+return mpParent->getScrollBar().GetAccessible();
+
+if (!m_xTable.is())
+m_xTable = new SvxShowCharSetAcc(this);
+
 return m_xTable.get();
 }
 
diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx
index 41d8f26..d935404 100644
--- a/svx/source/inc/charmapacc.hxx
+++ b/svx/source/inc/charmapacc.hxx
@@ -43,6 +43,7 @@ namespace svx
 {
 VclPtr mpParent; // the vcl control
 rtl::Reference  m_xTable; // the table, which holds 
the characters shown by the vcl control
+sal_Int32 getImplAccessibleChildCount() const;
 protected:
 virtual ~SvxShowCharSetVirtualAcc() override;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Julien Nabet
 basctl/source/basicide/moduldlg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 31d786ecd6a4e5d56ac96b33085b3ba7dcf42439
Author: Julien Nabet 
Date:   Tue Feb 14 21:00:45 2017 +0100

tdf#105386: crash with macro organizer

bt part:
0  SvTreeList::GetParent (this=0x560670dd2e40, pEntry=pEntry@entry=0x0) at 
/home/julien/lo/libreoffice/svtools/source/contnr/treelist.cxx:1693
1  0x7fd90573298c in SvTreeListBox::GetParent 
(this=this@entry=0x560670dd0d60, pEntry=pEntry@entry=0x0)
at /home/julien/lo/libreoffice/svtools/source/contnr/treelistbox.cxx:779
2  0x7fd8dfc3b4d8 in basctl::ExtTreeListBox::NotifyAcceptDrop 
(this=0x560670dd0d60, pEntry=0x560670e90b20)
at /home/julien/lo/libreoffice/basctl/source/basicide/moduldlg.cxx:180

Change-Id: I033440c1fcc50e2c7a0bb1eed0efa4559c514126
Reviewed-on: https://gerrit.libreoffice.org/34280
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
(cherry picked from commit 18be4782ad4a98041d9680f8d76a213b8fd49362)
Reviewed-on: https://gerrit.libreoffice.org/34287
Reviewed-by: Katarina Behrens 
(cherry picked from commit effeccd268305a2d3537cc89e4e35f682505afcb)
Reviewed-on: https://gerrit.libreoffice.org/34292
Reviewed-by: Christian Lohmaier 

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index cf4e557..5a620ea 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -184,7 +184,9 @@ bool ExtTreeListBox::NotifyAcceptDrop( SvTreeListEntry* 
pEntry )
 
 // don't drop in the same library
 SvTreeListEntry* pSelected = FirstSelected();
-if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
+if (!pSelected)
+bValid = false;
+else if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
 bValid = false;
 else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected 
) ) )
 bValid = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Jochen Nitschke
 sc/source/filter/oox/formulabase.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit deff2acd61de53e29a8cf1eed7f8db458244dab0
Author: Jochen Nitschke 
Date:   Wed Feb 15 16:19:00 2017 +0100

tdf#105909 auto filter state lost on xlsx import

in commit 77dc03c29501234bb07170004a7b8204987bad0c
the new variant of FormulaProcessorBase::extractCellRange(..)
replaced a CellRangeAddress& ApiCellRangeList::front() with
ScAddress& ApiCellRangeList::getBaseAddress() which returned only
the start address of the front range. This went unnoticed because
ScRange has a non explicit constructor from ScAddress.

later ApiCellRangeList::getBaseAddress() got replaced
by ScRangeList::GetTopLeftCorner().

use ScRangeList::front() to fix this regression.

Change-Id: I338e5d3054b62d5dd191492a38451d0adc85ae0d
Reviewed-on: https://gerrit.libreoffice.org/34304
Tested-by: Jenkins 
Reviewed-by: Jochen Nitschke 

diff --git a/sc/source/filter/oox/formulabase.cxx 
b/sc/source/filter/oox/formulabase.cxx
index d0e73d5..fa096ca 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1603,7 +1603,7 @@ bool FormulaProcessorBase::extractCellRange( ScRange& 
orRange,
 lclProcessRef( aRanges, extractReference( rTokens ), bAllowRelative, -1 );
 if( !aRanges.empty() )
 {
-orRange = aRanges.GetTopLeftCorner();
+orRange = *aRanges.front();
 return true;
 }
 return false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Tor Lillqvist
 svx/source/customshapes/EnhancedCustomShape2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 160fd56f986c76a1b160cb84d48e1e7702fff3cf
Author: Tor Lillqvist 
Date:   Tue Feb 14 22:53:53 2017 +0200

tdf#106011: The "swing angle" is negative when counter-clockwise

Change-Id: I1ef77e4c8cf0a6d31b36411a79b576115c32c644
(cherry picked from commit 34d8dc19a08e2752a4b8d3b3d83b7cf3ac341f1c)
Reviewed-on: https://gerrit.libreoffice.org/34283
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 14bf483..6a5e9e9 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1828,7 +1828,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& 
rSrcPt, sal_uInt16& rSegm
 << aStartPoint.Y() << " end: "
 << aEndPoint.X() << ", " << aEndPoint.Y()
 << " clockwise: " << int(bClockwise));
-basegfx::B2DPolygon aArc = CreateArc( aRect, 
bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, 
bClockwise, aStartPoint == aEndPoint && fSwingAngle > F_PI);
+basegfx::B2DPolygon aArc = CreateArc( aRect, 
bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, 
bClockwise, aStartPoint == aEndPoint && ((bClockwise && fSwingAngle > F_PI) || 
(!bClockwise && fSwingAngle < -F_PI)));
 // Now that we have the arc, move it to 
aStartPointB2D.
 basegfx::B2DHomMatrix aMatrix = 
basegfx::tools::createTranslateB2DHomMatrix(aStartPointB2D.getX(), 
aStartPointB2D.getY());
 aArc.transform(aMatrix);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Tor Lillqvist
 svx/source/customshapes/EnhancedCustomShape2d.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 61d5ff8fd96809a285f0e64817ef6fe4b8cdaa75
Author: Tor Lillqvist 
Date:   Tue Feb 14 22:53:53 2017 +0200

tdf#106011: The "swing angle" is negative when counter-clockwise

Change-Id: I1ef77e4c8cf0a6d31b36411a79b576115c32c644
(cherry picked from commit 34d8dc19a08e2752a4b8d3b3d83b7cf3ac341f1c)
Reviewed-on: https://gerrit.libreoffice.org/34284
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 

diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx 
b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 4bad1d5..d630954 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -1780,7 +1780,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& 
rSrcPt, sal_uInt16& rSegm
 << aStartPoint.Y() << " end: "
 << aEndPoint.X() << ", " << aEndPoint.Y()
 << " clockwise: " << int(bClockwise));
-basegfx::B2DPolygon aArc = CreateArc( aRect, 
bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, 
bClockwise, aStartPoint == aEndPoint && fSwingAngle > F_PI);
+basegfx::B2DPolygon aArc = CreateArc( aRect, 
bClockwise ? aEndPoint : aStartPoint, bClockwise ? aStartPoint : aEndPoint, 
bClockwise, aStartPoint == aEndPoint && ((bClockwise && fSwingAngle > F_PI) || 
(!bClockwise && fSwingAngle < -F_PI)));
 // Now that we have the arc, move it to 
aStartPointB2D.
 basegfx::B2DHomMatrix aMatrix = 
basegfx::tools::createTranslateB2DHomMatrix(aStartPointB2D.getX(), 
aStartPointB2D.getY());
 aArc.transform(aMatrix);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Miklos Vajna
 oox/source/drawingml/graphicshapecontext.cxx |   12 
 oox/source/ppt/extdrawingfragmenthandler.cxx |5 -
 2 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 4bef184a4b88b7dbb4edf0ccde6bd5bff668e729
Author: Miklos Vajna 
Date:   Fri Feb 10 14:33:51 2017 +0100

Related: tdf#105707 PPTX import: warn on invalid/empty SmartArt fallback 
relid

We already warn when the SmartArt doesn't have a drawingML fallback, but
having a reference to a fallback that is not a valid one (so resolves to
an empty fragment path) is also unusable. So warn in that case as well.

(cherry picked from commit 2d732b498bab244cde6978e9389511a940101995)

This second related situation is about when there is drawingML fallback
for the SmartArt, but it's ampty shape tree, which is never created with
MSO2010+ (those shape trees always have at least one element). This is
as bad as the missing drawingML fallback, so warn on it.

(cherry picked from commit 8c6776f27cef1e2b7b40957f1801b08707bc3230)

Change-Id: I03b2325003b4eb38b1347a88899799c6d5c33606
Reviewed-on: https://gerrit.libreoffice.org/34197
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 

diff --git a/oox/source/drawingml/graphicshapecontext.cxx 
b/oox/source/drawingml/graphicshapecontext.cxx
index b58bf56..e211d73 100644
--- a/oox/source/drawingml/graphicshapecontext.cxx
+++ b/oox/source/drawingml/graphicshapecontext.cxx
@@ -275,6 +275,18 @@ ContextHandlerRef 
DiagramGraphicDataContext::onCreateContext( ::sal_Int32 aEleme
 // No DrawingML fallback, need to warn the user at the end.
 if (mpShapePtr->getExtDrawings().empty())
 getFilter().setMissingExtDrawing();
+else
+{
+for (const auto& rRelId : mpShapePtr->getExtDrawings())
+{
+// An invalid fallback reference is as bad as a missing one.
+if (getFragmentPathFromRelId(rRelId).isEmpty())
+{
+getFilter().setMissingExtDrawing();
+break;
+}
+}
+}
 
 break;
 }
diff --git a/oox/source/ppt/extdrawingfragmenthandler.cxx 
b/oox/source/ppt/extdrawingfragmenthandler.cxx
index eae641e..9f402f8 100644
--- a/oox/source/ppt/extdrawingfragmenthandler.cxx
+++ b/oox/source/ppt/extdrawingfragmenthandler.cxx
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 
 using namespace ::oox::core;
 using namespace ::com::sun::star::xml::sax;
@@ -35,7 +36,9 @@ ExtDrawingFragmentHandler::ExtDrawingFragmentHandler( 
XmlFilterBase& rFilter,
 
 ExtDrawingFragmentHandler::~ExtDrawingFragmentHandler( ) throw ()
 {
-
+// Empty DrawingML fallback, need to warn the user at the end.
+if (mpShapePtr && mpShapePtr->getChildren().empty())
+getFilter().setMissingExtDrawing();
 }
 
 ContextHandlerRef
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Kohei Yoshida
 sc/source/core/tool/token.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit d7a6b6dbec77f6ca6aee013ba3887d1decba8069
Author: Kohei Yoshida 
Date:   Wed Feb 8 21:43:01 2017 -0500

tdf#103890: Fix the logic on setting 3D flag on reference.

This is a backport commit that combines 3 original commits from the
master branch.

(cherry picked from commit bf8d4fb60da5e583b3a90639af45b901e19cb5aa)
(cherry picked from commit 6e1efe7b6bd16e3183cdb7c87d786cb714a61959)
(cherry picked from commit aeb465a458fc7ba02e3b1ca6b4193488defef511)

Change-Id: I401d379be058cc45a5715a4a8a8f72aa56208655
Reviewed-on: https://gerrit.libreoffice.org/34139
Tested-by: Jenkins 
Reviewed-by: Eike Rathke 
Reviewed-by: Christian Lohmaier 

diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 9ce7673..2eb0fa6 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3167,8 +3167,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 assert(!"can't move");
 }
 
-bool b3DFlag = rOldPos.Tab() != rNewPos.Tab() || rCxt.mnTabDelta;
-
 TokenPointers aPtrs( pCode, nLen, pRPN, nRPN);
 for (size_t j=0; j<2; ++j)
 {
@@ -3195,8 +3193,7 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 }
 
 rRef.SetAddress(aAbs, rNewPos);
-if (b3DFlag)
-rRef.SetFlag3D(b3DFlag);
+rRef.SetFlag3D(aAbs.Tab() != rNewPos.Tab() || 
!rRef.IsTabRel());
 }
 break;
 case svDoubleRef:
@@ -3212,8 +3209,12 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceOnMove(
 }
 
 rRef.SetRange(aAbs, rNewPos);
-if (b3DFlag)
-rRef.Ref1.SetFlag3D(true);
+// Absolute sheet reference => set 3D flag.
+// More than one sheet referenced => has to have both 
3D flags.
+// If end part has 3D flag => start part must have it 
too.
+rRef.Ref2.SetFlag3D(aAbs.aStart.Tab() != 
aAbs.aEnd.Tab() || !rRef.Ref2.IsTabRel());
+rRef.Ref1.SetFlag3D(aAbs.aStart.Tab() != rNewPos.Tab() 
|| !rRef.Ref1.IsTabRel() ||
+rRef.Ref2.IsFlag3D());
 }
 break;
 case svExternalSingleRef:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread sll
 sc/source/ui/navipi/navipi.cxx |   28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

New commits:
commit 95c1c7d3b085541735f964ac3c1fff9d286baa16
Author: sll 
Date:   Tue Sep 6 18:18:02 2016 +0200

tdf#98493 UI : "SCENARIO SELECTION IN NAVIGATOR (sheet group)"

Change-Id: I71071ba71ce05487273ce66e64f930cd2ec7b8d0
Reviewed-on: https://gerrit.libreoffice.org/28697
Reviewed-by: Eike Rathke 
Tested-by: Eike Rathke 
(cherry picked from commit 1eebbd48fabbefaa52f5f223649c8d591915a884)
Reviewed-on: https://gerrit.libreoffice.org/33953
Reviewed-by: Jean-Sébastien B. 
Tested-by: Jenkins 
Reviewed-by: Christian Lohmaier 

diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index ce339cc..8ed6c481 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -958,16 +958,32 @@ void ScNavigatorDlg::SetCurrentTableStr( const OUString& 
rName )
 if (!GetViewData()) return;
 
 ScDocument* pDoc = pViewData->GetDocument();
-SCTAB nCount = pDoc->GetTableCount();
+SCTAB nCount = pDoc->GetTableCount();
 OUString aTabName;
+SCTAB nLastSheet = 0;
 
-for ( SCTAB i=0; iGetName( i, aTabName );
-if ( aTabName.equals(rName) )
+pDoc->GetName(i, aTabName);
+if (aTabName.equals(rName))
 {
-SetCurrentTable( i );
-return;
+// Check if this is a Scenario sheet and if so select the sheet
+// where it belongs to, which is the previous non-Scenario sheet.
+if (pDoc->IsScenario(i))
+{
+SetCurrentTable(nLastSheet);
+return;
+}
+else
+{
+SetCurrentTable(i);
+return;
+}
+}
+else
+{
+if (!pDoc->IsScenario(i))
+nLastSheet = i;
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Support new and discontinue old compilers

2017-02-15 Thread Stephan Bergmann

On 02/15/2017 04:22 PM, Stephan Bergmann wrote:

On 02/15/2017 02:39 PM, marius adrian popa wrote:

I will check the issue with Firebird

http://paste.openstack.org/show/594333/


I at least don't see that problem with a build of recent LO master
against MSVC 2015.  Building external/firebird works fine for me.


Ah, seeing the commit message of 
 
"Support MSVC 15.0", that issue is probably specific to MSVC 2017, 
unrelated to MSVC 2015.

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


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

2017-02-15 Thread Fakabbir Amin
 tools/source/fsys/urlobj.cxx |   35 ++-
 1 file changed, 22 insertions(+), 13 deletions(-)

New commits:
commit 2af4221bd1f91b4cef22d6b1867a250e3780f6e3
Author: Fakabbir Amin 
Date:   Wed Feb 15 12:54:37 2017 +0530

tdf#103221 recoded clear if-else sequence

Change-Id: I8a3126427dca7b6c54282f48645f238f98ca62af
Reviewed-on: https://gerrit.libreoffice.org/34289
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 55caad8..455ece0 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4436,19 +4436,28 @@ OUString INetURLObject::getFSysPath(FSysStyle eStyle,
 + ((eStyle & FSysStyle::Dos) ? 1 : 0)
 > 1)
 {
-eStyle = eStyle & FSysStyle::Vos
- && m_aHost.isPresent()
- && m_aHost.getLength() > 0 ?
- FSysStyle::Vos :
- hasDosVolume(eStyle)
- || ((eStyle & FSysStyle::Dos)
-&& m_aHost.isPresent()
-&& m_aHost.getLength() > 0) ?
- FSysStyle::Dos :
- eStyle & FSysStyle::Unix
- && (!m_aHost.isPresent() || m_aHost.getLength() == 0) ?
- FSysStyle::Unix :
- FSysStyle(0);
+if(eStyle & FSysStyle::Vos && m_aHost.isPresent() && 
m_aHost.getLength() > 0)
+{
+eStyle= FSysStyle::Vos;
+}
+else
+{
+if(hasDosVolume(eStyle) || ((eStyle & FSysStyle::Dos) && 
m_aHost.isPresent() && m_aHost.getLength() > 0))
+{
+eStyle = FSysStyle::Dos;
+}
+else
+{
+if(eStyle & FSysStyle::Unix && (!m_aHost.isPresent() || 
m_aHost.getLength() == 0))
+{
+eStyle = FSysStyle::Unix;
+}
+else
+{
+eStyle= FSysStyle(0);
+}
+}
+}
 }
 
 switch (eStyle)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Justin Luth
 sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx |binary
 sc/qa/unit/subsequent_export-test.cxx |   14 ++
 sc/source/filter/excel/xetable.cxx|   21 +
 sc/source/filter/inc/xetable.hxx  |2 ++
 4 files changed, 29 insertions(+), 8 deletions(-)

New commits:
commit 7003415978b162bdd9f84d3e2ea0d05e5599137a
Author: Justin Luth 
Date:   Fri Feb 10 12:44:47 2017 +0300

tdf#105840 EXCEL export: fixes for hidden defaultRow

second attempt at fixing hidden rows without creating
a million repeated rows. (related to tdf#98106)
This affects both .xls and .xlsx.  XLSX previously had
NO support for default-hidden(zeroHeight), but XLS already did.

Change-Id: I804e3f2ba21e595a1c2b2ebb355f0995868dd289
Reviewed-on: https://gerrit.libreoffice.org/34128
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 
Reviewed-on: https://gerrit.libreoffice.org/34277

diff --git a/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx 
b/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx
new file mode 100644
index 000..e2c22cd
Binary files /dev/null and b/sc/qa/unit/data/xlsx/tdf105840_allRowsHidden.xlsx 
differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx 
b/sc/qa/unit/subsequent_export-test.cxx
index 2a088dd..7060520 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -114,6 +114,7 @@ public:
 void testColumnWidthExportFromODStoXLSX();
 void testOutlineExportXLSX();
 void testHiddenEmptyRowsXLSX();
+void testAllRowsHiddenXLSX();
 void testLandscapeOrientationXLSX();
 
 void testInlineArrayXLS();
@@ -214,6 +215,7 @@ public:
 CPPUNIT_TEST(testColumnWidthExportFromODStoXLSX);
 CPPUNIT_TEST(testOutlineExportXLSX);
 CPPUNIT_TEST(testHiddenEmptyRowsXLSX);
+CPPUNIT_TEST(testAllRowsHiddenXLSX);
 CPPUNIT_TEST(testLandscapeOrientationXLSX);
 CPPUNIT_TEST(testInlineArrayXLS);
 CPPUNIT_TEST(testEmbeddedChartXLS);
@@ -870,6 +872,17 @@ void ScExportTest::testOutlineExportXLSX()
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 30);
 }
 
+void ScExportTest::testAllRowsHiddenXLSX()
+{
+ScDocShellRef xOrigDocSh = loadDoc("tdf105840_allRowsHidden.", 
FORMAT_XLSX);
+CPPUNIT_ASSERT(xOrigDocSh.Is());
+
+std::shared_ptr pXPathFile = 
ScBootstrapFixture::exportTo(&(*xOrigDocSh), FORMAT_XLSX);
+xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
+CPPUNIT_ASSERT(pSheet);
+assertXPath(pSheet, "/x:worksheet/x:sheetFormatPr", "zeroHeight", "true" );
+assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row", 0);
+}
 
 void ScExportTest::testHiddenEmptyRowsXLSX()
 {
@@ -881,6 +894,7 @@ void ScExportTest::testHiddenEmptyRowsXLSX()
 xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, 
"xl/worksheets/sheet1.xml");
 CPPUNIT_ASSERT(pSheet);
 
+assertXPath(pSheet, "/x:worksheet/x:sheetFormatPr",  "zeroHeight", "false" 
);
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "hidden", "true");
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "hidden", "true");
 assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "hidden", "true");
diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index b954c74..45db9a1 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2046,7 +2046,7 @@ sal_uInt16 XclExpRow::GetFirstFreeXclCol() const
 
 bool XclExpRow::IsDefaultable() const
 {
-const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | 
EXC_ROW_UNSYNCED;
+const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | 
EXC_ROW_HIDDEN | EXC_ROW_UNSYNCED;
 return !::get_flag( mnFlags, static_cast< sal_uInt16 >( 
~nFlagsAlwaysMarkedAsDefault ) ) &&
IsEmpty();
 }
@@ -2055,6 +2055,7 @@ void XclExpRow::DisableIfDefault( const 
XclExpDefaultRowData& rDefRowData )
 {
 mbEnabled = !IsDefaultable() ||
 (mnHeight != rDefRowData.mnHeight) ||
+(IsHidden() != rDefRowData.IsHidden()) ||
 (IsUnsynced() != rDefRowData.IsUnsynced());
 }
 
@@ -2274,12 +2275,15 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& 
rDefRowData, const ScfUInt
 // return the default row format to caller
 rDefRowData = aMaxDefData;
 
-// now disable repeating extra (empty) rows that are equal to
-// default row height
+// now disable repeating extra (empty) rows that are equal to the default 
row
 for ( XclRepeatedRows::iterator it = aRepeated.begin(), it_end = 
aRepeated.end(); it != it_end; ++it)
 {
-if ( (*it)->GetXclRowRpt() > 1 && (*it)->GetHeight() == 
rDefRowData.mnHeight )
+if ( (*it)->GetXclRowRpt() > 1
+ && (*it)->GetHeight() == rDefRowData.mnHeight
+ && (*it)->IsHidden() == rDefRowData.IsHidden() )
+{
 (*it)->SetXclRowRp

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

2017-02-15 Thread Justin Luth
 sc/source/filter/excel/xetable.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit dccb8131161ebf7487c3e7fee41fb30aad37118a
Author: Justin Luth 
Date:   Wed Feb 8 19:32:14 2017 +0300

Optimize Excel GetOrCreateRow: compare to previous map entry

Follow-up patch to 09e9274fc080b471393b806617eb03124db67590 and
related to tdf#105840. Just keeping the non-dependent parts
separate, and building up to a solution for bug 105840.

Change-Id: I129e671f71de6abf876a82d4a6503695add85548
Reviewed-on: https://gerrit.libreoffice.org/34039
Reviewed-by: Justin Luth 
Tested-by: Justin Luth 
Reviewed-by: Bartosz Kosiorek 
Reviewed-on: https://gerrit.libreoffice.org/34276
Tested-by: Jenkins 

diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index 9f8eec1..b954c74 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2381,9 +2381,11 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 
nXclRow, bool bRowAlwaysE
 if( !bFound || bFoundHigher )
 {
 size_t nFrom = 0;
+RowRef pPrevEntry = nullptr;
 if( itr != maRowMap.begin() )
 {
 --itr;
+pPrevEntry = itr->second;
 if( bFoundHigher )
 nFrom = nXclRow;
 else
@@ -2403,10 +2405,10 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 
nXclRow, bool bRowAlwaysE
 // not set, to correctly export the heights of rows with wrapped
 // texts.
 const sal_uInt16 nHeight = rDoc.GetRowHeight(nFrom, nScTab, false);
-if ( !nFrom || ( nFrom == nXclRow ) || bHidden ||
+if ( !pPrevEntry || ( nFrom == nXclRow ) || bHidden ||
  ( maOutlineBfr.IsCollapsed() ) ||
  ( maOutlineBfr.GetLevel() != 0 ) ||
- ( nHeight != rDoc.GetRowHeight(nFrom - 1, nScTab, false) ) )
+ ( nHeight != pPrevEntry->GetHeight() ) )
 {
 if( maOutlineBfr.GetLevel() > mnHighestOutlineLevel )
 {
@@ -2414,6 +2416,7 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 
nXclRow, bool bRowAlwaysE
 }
 RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, 
bRowAlwaysEmpty));
 maRowMap.insert(RowMap::value_type(nFrom, p));
+pPrevEntry = p;
 }
 ++nFrom;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Justin Luth
 sc/source/filter/excel/xetable.cxx |   37 +++--
 1 file changed, 27 insertions(+), 10 deletions(-)

New commits:
commit 854bae75ab891423182f11604aedc42c6bfa334e
Author: Justin Luth 
Date:   Wed Feb 8 19:08:07 2017 +0300

Optimize Excel GetOrCreateRow: reduce loops

for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom )

This previous code worked best under the assumption
that every row is added to the map. However, the size of the
map actually has no correlation to the row numbers contained in it
when many rows are identical to each other (think silly formatting
and empty rows - related to tdf#105840)
Thus row 1,000,000 could occupy slot 2, and every access of that row
would then trigger nearly 1 million redundant loops.

Optimize:
-check to see if the row already exists - if so do nothing.
-existance of higher rows indicates there are no missing rows.
-build missing rows from the previously-mapped row.

Reviewed-on: https://gerrit.libreoffice.org/34038
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

Conflicts:

sc/source/filter/excel/xetable.cxx

Change-Id: Ib02520a1bf0f77b5ca0ec5ad3165ff7ea879515f
Reviewed-on: https://gerrit.libreoffice.org/34275
Tested-by: Jenkins 
Reviewed-by: Bartosz Kosiorek 

diff --git a/sc/source/filter/excel/xetable.cxx 
b/sc/source/filter/excel/xetable.cxx
index fe39f238..9f8eec1 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2374,22 +2374,39 @@ void XclExpRowBuffer::SaveXml( XclExpXmlStream& rStrm )
 
 XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool 
bRowAlwaysEmpty )
 {
-RowMap::iterator itr = maRowMap.begin();
-ScDocument& rDoc = GetRoot().GetDoc();
-SCTAB nScTab = GetRoot().GetCurrScTab();
-for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom )
+RowMap::iterator itr = maRowMap.lower_bound( nXclRow );
+const bool bFound = itr != maRowMap.end();
+// bFoundHigher: nXclRow was identical to the previous entry, so not 
explicitly created earlier
+const bool bFoundHigher = bFound && itr != maRowMap.find( nXclRow );
+if( !bFound || bFoundHigher )
 {
-itr = maRowMap.find(nFrom);
-if ( itr == maRowMap.end() )
+size_t nFrom = 0;
+if( itr != maRowMap.begin() )
+{
+--itr;
+if( bFoundHigher )
+nFrom = nXclRow;
+else
+nFrom = itr->first + 1;
+}
+
+const ScDocument& rDoc = GetRoot().GetDoc();
+const SCTAB nScTab = GetRoot().GetCurrScTab();
+// create the missing rows first
+while( nFrom <= nXclRow )
 {
 // only create RowMap entries if it is first row in spreadsheet,
 // if it is the desired row, for rows that height differ from 
previous,
 // if row is collapsed, has outline level (tdf#100347), or row is 
hidden (tdf#98106).
-if ( !nFrom || ( nFrom == nXclRow ) ||
- ( rDoc.GetRowHeight(nFrom, nScTab, false) != 
rDoc.GetRowHeight(nFrom - 1, nScTab, false) ) ||
+const bool bHidden = rDoc.RowHidden(nFrom, nScTab);
+// Always get the actual row height even if the manual size flag is
+// not set, to correctly export the heights of rows with wrapped
+// texts.
+const sal_uInt16 nHeight = rDoc.GetRowHeight(nFrom, nScTab, false);
+if ( !nFrom || ( nFrom == nXclRow ) || bHidden ||
  ( maOutlineBfr.IsCollapsed() ) ||
  ( maOutlineBfr.GetLevel() != 0 ) ||
- ( rDoc.RowHidden(nFrom, nScTab) ) )
+ ( nHeight != rDoc.GetRowHeight(nFrom - 1, nScTab, false) ) )
 {
 if( maOutlineBfr.GetLevel() > mnHighestOutlineLevel )
 {
@@ -2398,11 +2415,11 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 
nXclRow, bool bRowAlwaysE
 RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, 
bRowAlwaysEmpty));
 maRowMap.insert(RowMap::value_type(nFrom, p));
 }
+++nFrom;
 }
 }
 itr = maRowMap.find(nXclRow);
 return *itr->second;
-
 }
 
 // Cell Table
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: 5.3.0.3 firebird race condition

2017-02-15 Thread Stephan Bergmann

On 02/14/2017 05:32 PM, marius adrian popa wrote:

I guess can be cherrypicked for 5.3.x



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


Re: Support new and discontinue old compilers

2017-02-15 Thread Stephan Bergmann

On 02/15/2017 02:39 PM, marius adrian popa wrote:

I will check the issue with Firebird

http://paste.openstack.org/show/594333/


I at least don't see that problem with a build of recent LO master 
against MSVC 2015.  Building external/firebird works fine for me.


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


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

2017-02-15 Thread Caolán McNamara
 sw/source/filter/ww8/ww8graf2.cxx |   27 ---
 1 file changed, 20 insertions(+), 7 deletions(-)

New commits:
commit 432f605e3287269d1a20383f4eeebf012ee3679d
Author: Caolán McNamara 
Date:   Wed Feb 15 14:28:55 2017 +

Resolves: tdf#101000 ensure unique image names in .docs

Change-Id: Id4f93638ad366b66968e6946a835239beee16942

diff --git a/sw/source/filter/ww8/ww8graf2.cxx 
b/sw/source/filter/ww8/ww8graf2.cxx
index 08099375..c4fabfa 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -30,8 +30,9 @@
 #include 
 #include 
 #include 
-#include 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
@@ -455,6 +456,19 @@ void SwWW8ImplReader::PicRead(SvStream *pDataStream, 
WW8_PIC *pPic,
 pDataStream->SeekRel(2);  //cProps
 }
 
+namespace
+{
+SwNodeType GetNodeType(SwFrameFormat &rSource)
+{
+const SwNodeIndex* pNodeIndex = rSource.GetContent().GetContentIdx();
+if (!pNodeIndex)
+return SwNodeType::NONE;
+const SwNode& rCSttNd = pNodeIndex->GetNode();
+SwNodeRange aRg(rCSttNd, 1, *rCSttNd.EndOfSectionNode());
+return aRg.aStart.GetNode().GetNodeType();
+}
+}
+
 SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
 SwFrameFormat* pOldFlyFormat)
 {
@@ -671,12 +685,11 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj* 
pTextObj,
 if (pRecord)
 SetAttributesAtGrfNode(pRecord, pRet, nullptr);
 
-// #i68101#
-// removed pObject->HasSetName() usage since always 
returned
-// true, also removed else-part and wrote an informing mail
-// to Henning Brinkmann about this to clarify.
-pRet->SetName(pObject->GetName());
-
+OUString aObjectName(pObject->GetName());
+if (aObjectName.isEmpty() || 
!m_rDoc.FindFlyByName(aObjectName, GetNodeType(*pRet)))
+pRet->SetName(aObjectName);
+else
+m_aGrfNameGenerator.SetUniqueGraphName(pRet, 
aObjectName);
 
 // determine the pointer to the new object and update
 // Z-order-list accordingly (or delete entry)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Tor Lillqvist
 oox/source/export/drawingml.cxx |   28 
 1 file changed, 28 insertions(+)

New commits:
commit d2b014edc0f466370023a35eb46548390ceb7fb2
Author: Tor Lillqvist 
Date:   Wed Feb 15 16:20:13 2017 +0200

tdf#106026: Export paragraph top and bottom margin to DrawingML

Change-Id: I8c60f86a1debe135c9172ff639aa5af93f03b99b

diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 084ce1a..13871c9 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1948,6 +1948,12 @@ void DrawingML::WriteParagraphProperties( const 
Reference< XTextContent >& rPara
 GET( nParaLeftMargin, ParaLeftMargin );
 GET( nParaFirstLineIndent,ParaFirstLineIndent);
 
+sal_Int32 nParaTopMargin = 0;
+sal_Int32 nParaBottomMargin = 0;
+
+GET( nParaTopMargin, ParaTopMargin );
+GET( nParaBottomMargin, ParaBottomMargin );
+
 sal_Int32 nLeftMargin =  getBulletMarginIndentation ( rXPropSet, 
nLevel,"LeftMargin");
 sal_Int32 nLineIndentation = getBulletMarginIndentation ( rXPropSet, 
nLevel,"FirstLineOffset");
 
@@ -1980,6 +1986,28 @@ void DrawingML::WriteParagraphProperties( const 
Reference< XTextContent >& rPara
 mpFS->endElementNS( XML_a, XML_lnSpc );
 }
 
+if( nParaTopMargin != 0 )
+{
+mpFS->startElementNS( XML_a, XML_spcBef, FSEND );
+{
+mpFS->singleElementNS( XML_a, XML_spcPts,
+   XML_val, I32S( std::lround( 
nParaTopMargin / 25.4 * 72 ) ),
+   FSEND );
+}
+mpFS->endElementNS( XML_a, XML_spcBef );
+}
+
+if( nParaBottomMargin != 0 )
+{
+mpFS->startElementNS( XML_a, XML_spcAft, FSEND );
+{
+mpFS->singleElementNS( XML_a, XML_spcPts,
+   XML_val, I32S( std::lround( 
nParaBottomMargin / 25.4 * 72 ) ),
+   FSEND );
+}
+mpFS->endElementNS( XML_a, XML_spcAft );
+}
+
 WriteParagraphNumbering( rXPropSet, nLevel );
 
 mpFS->endElementNS( XML_a, XML_pPr );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] online.git: Branch 'private/Ashod/nonblocking' - net/loolnb.cpp net/socket.hpp

2017-02-15 Thread Michael Meeks
 net/loolnb.cpp |  250 
 net/socket.hpp |  273 +++--
 2 files changed, 231 insertions(+), 292 deletions(-)

New commits:
commit ae35938a9dac2fe632b32b072a9cb5469bdbbdb7
Author: Michael Meeks 
Date:   Wed Feb 15 14:48:48 2017 +

De-templatize and simplify.

diff --git a/net/loolnb.cpp b/net/loolnb.cpp
index da7b17a..bffc684 100644
--- a/net/loolnb.cpp
+++ b/net/loolnb.cpp
@@ -52,147 +52,6 @@ public:
 }
 };
 
-/// Handles non-blocking socket event polling.
-/// Only polls on N-Sockets and invokes callback and
-/// doesn't manage buffers or client data.
-/// Note: uses poll(2) since it has very good performance
-/// compared to epoll up to a few hundred sockets and
-/// doesn't suffer select(2)'s poor API. Since this will
-/// be used per-document we don't expect to have several
-/// hundred users on same document to suffer poll(2)'s
-/// scalability limit. Meanwhile, epoll(2)'s high
-/// overhead to adding/removing sockets is not helpful.
-template 
-class SocketPoll
-{
-public:
-SocketPoll()
-{
-// Create the wakeup fd.
-if (::pipe2(_wakeup, O_CLOEXEC | O_NONBLOCK) == -1)
-{
-// FIXME: Can't have wakeup pipe, should we exit?
-// FIXME: running out of sockets should be a case we handle 
elegantly here - and also in our accept / ClientSocket creation I guess.
-_wakeup[0] = -1;
-_wakeup[1] = -1;
-}
-}
-
-~SocketPoll()
-{
-::close(_wakeup[0]);
-::close(_wakeup[1]);
-}
-
-/// Poll the sockets for available data to read or buffer to write.
-void poll(const int timeoutMs, const std::function&, const int)>& handler)
-{
-const size_t size = _pollSockets.size();
-
-// The events to poll on change each spin of the loop.
-setupPollFds();
-
-int rc;
-do
-{
-rc = ::poll(&_pollFds[0], size + 1, timeoutMs);
-}
-while (rc < 0 && errno == EINTR);
-
-// Fire the callback and remove dead fds.
-for (int i = static_cast(size) - 1; i >= 0; --i)
-{
-if (_pollFds[i].revents)
-{
-if (!handler(_pollSockets[i], _pollFds[i].revents))
-{
-std::cout << "Removing: " << _pollFds[i].fd << std::endl;
-_pollSockets.erase(_pollSockets.begin() + i);
-// Don't remove from pollFds; we'll recreate below.
-}
-}
-}
-
-// Process the wakeup pipe (always the last entry).
-if (_pollFds[size].revents)
-{
-// Add new sockets first.
-addNewSocketsToPoll();
-
-// Clear the data.
-int dump;
-if (::read(_wakeup[0], &dump, sizeof(dump)) == -1)
-{
-// Nothing to do.
-}
-}
-}
-
-/// Insert a new socket to be polled.
-/// Sockets are removed only when the handler return false.
-void insertNewSocket(const std::shared_ptr& newSocket)
-{
-std::lock_guard lock(_mutex);
-
-_newSockets.emplace_back(newSocket);
-
-// wakeup the main-loop.
-if (::write(_wakeup[1], "w", 1) == -1)
-{
-// wakeup pipe is already full.
-assert(errno == EAGAIN || errno == EWOULDBLOCK);
-}
-}
-
-private:
-
-/// Add the new sockets to list of those to poll.
-void addNewSocketsToPoll()
-{
-std::lock_guard lock(_mutex);
-
-// Copy the new sockets over and clear.
-_pollSockets.insert(_pollSockets.end(), _newSockets.begin(), 
_newSockets.end());
-_newSockets.clear();
-}
-
-void removeSocketFromPoll(const std::shared_ptr& socket)
-{
-_pollSockets.erase(_pollSockets.find(socket));
-}
-
-/// Initialize the poll fds array with the right events
-void setupPollFds()
-{
-const size_t size = _pollSockets.size();
-
-_pollFds.resize(size + 1); // + wakeup pipe
-
-for (size_t i = 0; i < size; ++i)
-{
-_pollFds[i].fd = _pollSockets[i]->getFD();
-_pollFds[i].events = _pollSockets[i]->getPollEvents();
-_pollFds[i].revents = 0;
-}
-
-// Add the read-end of the wake pipe.
-_pollFds[size].fd = _wakeup[0];
-_pollFds[size].events = POLLIN;
-_pollFds[size].revents = 0;
-}
-
-private:
-/// main-loop wakeup pipe
-int _wakeup[2];
-/// The sockets we're controlling
-std::vector> _pollSockets;
-/// Protects _newSockets
-std::mutex _mutex;
-std::vector> _newSockets;
-/// The fds to poll.
-std::vector _pollFds;
-};
-
 /// Generic thread class.
 class Thread
 {
@@ -229,10 +88,78 @@ private:
 
 Poco::Net::SocketAddress addr("127.0.0.1", PortNumber);
 
-void server(SocketPoll& poller)
+/// 

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

2017-02-15 Thread Caolán McNamara
 filter/source/graphicfilter/iras/iras.cxx |   15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

New commits:
commit f18e476308845c6b4acde4e8009c3ca21bbe0621
Author: Caolán McNamara 
Date:   Wed Feb 15 14:46:32 2017 +

assume max compression of 255 for ras

Change-Id: I51dfa45b266b6b9361f48aac58f0a4bca8446bdd

diff --git a/filter/source/graphicfilter/iras/iras.cxx 
b/filter/source/graphicfilter/iras/iras.cxx
index 30d618e..9cc98ad 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -168,12 +168,17 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
 if (!bOk)
 return false;
 
-if (mnType != RAS_TYPE_BYTE_ENCODED) //simple raw format
+//The RLE packets are typically three bytes in size:
+//The first byte is a Flag Value indicating the type of RLE packet.
+//The second byte is the Run Count.
+//The third byte is the Run Value.
+//
+//for the sake of simplicity we'll assume that RAS_TYPE_BYTE_ENCODED can
+//describe data 255 times larger than the data stored
+size_t nMaxCompression = mnType != RAS_TYPE_BYTE_ENCODED ? 1 : 255;
+if (m_rRAS.remainingSize() * nMaxCompression < 
static_cast(mnHeight) * mnWidth * mnDepth / 8)
 {
-if (m_rRAS.remainingSize() < static_cast(mnHeight) * 
mnWidth * mnDepth / 8)
-{
-return false;
-}
+return false;
 }
 
 Bitmap aBmp(Size(mnWidth, mnHeight), mnDstBitsPerPix);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Fakabbir Amin
 sc/source/filter/xml/xmlstyle.cxx  |   14 +++---
 sc/source/ui/app/inputhdl.cxx  |8 ++--
 sc/source/ui/formdlg/formula.cxx   |5 +
 sc/source/ui/miscdlgs/acredlin.cxx |   27 ++-
 sc/source/ui/view/cellsh3.cxx  |5 +
 sc/source/ui/view/colrowba.cxx |9 +++--
 sc/source/ui/view/dbfunc3.cxx  |4 +---
 sc/source/ui/view/gridwin5.cxx |   15 +++
 8 files changed, 32 insertions(+), 55 deletions(-)

New commits:
commit 445a3d0a8d891b872b7fb0611e98de508d4fa1ae
Author: Fakabbir Amin 
Date:   Wed Feb 15 12:09:13 2017 +0530

tdf#100726 Improved readability in sc directory

cleaning concatenation in sc directory.

Change-Id: I137eb0eaf161edece272b084980e622831200803
Reviewed-on: https://gerrit.libreoffice.org/34288
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/sc/source/filter/xml/xmlstyle.cxx 
b/sc/source/filter/xml/xmlstyle.cxx
index 3d38967..1777058 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -715,9 +715,9 @@ void ScXMLAutoStylePoolP::exportStyleContent(
 {
 if (aOperator == 
sheet::ConditionOperator_FORMULA)
 {
-OUString 
sCondition("is-true-formula(");
-sCondition += 
xSheetCondition->getFormula1();
-sCondition += ")";
+OUString sCondition = 
"is-true-formula("
++ 
xSheetCondition->getFormula1()
++ ")";
 
rScXMLExport.AddAttribute(XML_NAMESPACE_STYLE, XML_CONDITION, sCondition);
 
rScXMLExport.AddAttribute(XML_NAMESPACE_STYLE, XML_APPLY_STYLE_NAME, 
rScXMLExport.EncodeStyleName( sStyleName ));
 OUString sOUBaseAddress;
@@ -737,10 +737,10 @@ void ScXMLAutoStylePoolP::exportStyleContent(
 sCondition = 
"cell-content-is-between(";
 else
 sCondition = 
"cell-content-is-not-between(";
-sCondition += 
xSheetCondition->getFormula1();
-sCondition += ",";
-sCondition += 
xSheetCondition->getFormula2();
-sCondition += ")";
+sCondition += 
xSheetCondition->getFormula1()
++ ","
++ 
xSheetCondition->getFormula2()
++ ")";
 }
 else
 {
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 7e3c8a7..7d6e6ed 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3082,15 +3082,11 @@ void ScInputHandler::SetReference( const ScRange& rRef, 
ScDocument* pDoc )
  case formula::FormulaGrammar::CONV_XL_A1 :
  case formula::FormulaGrammar::CONV_XL_OOX :
  case formula::FormulaGrammar::CONV_XL_R1C1 :
- aRefStr = "[\'";
- aRefStr += aFileName;
- aRefStr += "']";
+ aRefStr = "[\'" + aFileName + "']";
  break;
  case formula::FormulaGrammar::CONV_OOO :
  default:
- aRefStr = "\'";
- aRefStr += aFileName;
- aRefStr += "'#";
+ aRefStr = "\'" + aFileName + "'#";
  break;
 }
 aRefStr += aTmp;
diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx
index 22faa17..36d9a0e 100644
--- a/sc/source/ui/formdlg/formula.cxx
+++ b/sc/source/ui/formdlg/formula.cxx
@@ -408,10 +408,7 @@ void ScFormulaDlg::SetReference( const ScRange& rRef, 
ScDocument* pRefDoc )
 //   OUString aFileName = pObjSh->GetMedium()->GetName();
 OUString aFileName = 
pObjSh->GetMedium()->GetURLObject().GetMainURL( 
INetURLObject::DecodeMechanism::Unambiguous );
 
-aRefStr = "'";
-aRefStr += aFileName;
-aRefStr

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

2017-02-15 Thread Stephan Bergmann
 cpputools/source/unoexe/unoexe.cxx |   14 --
 embeddedobj/source/commonembedding/embedobj.cxx|   12 +
 embeddedobj/source/commonembedding/persistence.cxx |   41 --
 embeddedobj/source/commonembedding/visobj.cxx  |4 -
 embeddedobj/source/commonembedding/xfactory.cxx|   41 +-
 embeddedobj/source/general/docholder.cxx   |8 ---
 embeddedobj/source/general/xcreator.cxx|   20 ++---
 embeddedobj/source/msole/olepersist.cxx|   44 
 embeddedobj/source/msole/olevisual.cxx |4 -
 embeddedobj/source/msole/xdialogcreator.cxx|6 --
 embeddedobj/source/msole/xolefactory.cxx   |   46 +
 11 files changed, 57 insertions(+), 183 deletions(-)

New commits:
commit 93732de5c1648215690854a573058d1a299796dd
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:11:01 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Icefafed29c9702730181f61bb03296b5b474bfa6
Reviewed-on: https://gerrit.libreoffice.org/34269
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/cpputools/source/unoexe/unoexe.cxx 
b/cpputools/source/unoexe/unoexe.cxx
index ca9aaa8..bed17183 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -155,15 +155,7 @@ void createInstance(
 throw RuntimeException( "cannot get service instance \"" + 
rServiceName + "\"!" );
 }
 
-rxOut.set( x, UNO_QUERY );
-if (! rxOut.is())
-{
-const Type & rType = cppu::UnoType::get();
-throw RuntimeException(
-"service instance \"" + rServiceName +
-"\" does not support demanded interface \"" +
-rType.getTypeName() + "\"!" );
-}
+rxOut.set( x, UNO_QUERY_THROW );
 }
 
 /// @throws Exception
@@ -490,9 +482,7 @@ SAL_IMPLEMENT_MAIN()
 
 if (bSingleAccept)
 {
-Reference< XComponent > xComp( xBridge, UNO_QUERY );
-if (! xComp.is())
-throw RuntimeException( "bridge factory does not 
export interface \"com.sun.star.lang.XComponent\"!" );
+Reference< XComponent > xComp( xBridge, UNO_QUERY_THROW );
 ODisposingListener::waitFor( xComp );
 xComp->dispose();
 // explicitly dispose the remote bridge so that it 
joins
commit 5ce42c21654db41544d831ac18c1388dde64d122
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:56 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Ieee649609a7f01b4d51ed6ed78a8ae809ca61d9e
Reviewed-on: https://gerrit.libreoffice.org/34268
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/embeddedobj/source/commonembedding/embedobj.cxx 
b/embeddedobj/source/commonembedding/embedobj.cxx
index 304c7cc..c70a7ba 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -237,9 +237,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 
nNextState )
 {
 xInplaceClient->activatingInplace();
 
-uno::Reference< embed::XWindowSupplier > 
xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY );
-if ( !xClientWindowSupplier.is() )
-throw uno::RuntimeException(); // TODO: the inplace 
client implementation must support XWinSupp
+uno::Reference< embed::XWindowSupplier > 
xClientWindowSupplier( xInplaceClient, uno::UNO_QUERY_THROW );
 
 m_xClientWindow = xClientWindowSupplier->getWindow();
 m_aOwnRectangle = xInplaceClient->getPlacement();
@@ -248,9 +246,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 
nNextState )
 
 // create own window based on the client window
 // place and resize the window according to the rectangles
-uno::Reference< awt::XWindowPeer > xClientWindowPeer( 
m_xClientWindow, uno::UNO_QUERY );
-if ( !xClientWindowPeer.is() )
-throw uno::RuntimeException(); // TODO: the container 
window must support the interface
+uno::Reference< awt::XWindowPeer > xClientWindowPeer( 
m_xClientWindow, uno::UNO_QUERY_THROW );
 
 // dispatch provider may not be provided
 uno::Reference< frame::XDispatchProvider > xContainerDP = 
xInplaceClient->getInplaceDispatchProvider();
@@ -287,9 +283,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 
nNextState )
 {
 if ( nNextState == embed::EmbedStates::RUNNING )
 {
-uno::Reference< embed::XInplaceClient > xInplaceClient( 
m_xClientSite, uno::UNO_QUERY );
-if ( !xInplaceClient.is() )
-throw uno::Ru

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

2017-02-15 Thread Stephan Bergmann
 comphelper/source/container/embeddedobjectcontainer.cxx |4 -
 comphelper/source/misc/mimeconfighelper.cxx |5 --
 comphelper/source/misc/storagehelper.cxx|   40 +++-
 connectivity/source/drivers/firebird/Tables.cxx |4 -
 4 files changed, 12 insertions(+), 41 deletions(-)

New commits:
commit 20d648625b991318793bbc7eacfa7c0f2c23f5da
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:11:11 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I143ec0287421675fb13a03e8cf3c7054a17be37f
Reviewed-on: https://gerrit.libreoffice.org/34271
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index 4e0324a..c05d143 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -1156,9 +1156,7 @@ bool EmbeddedObjectContainer::InsertGraphicStream( const 
css::uno::Reference < c
 ::comphelper::OStorageHelper::CopyInputToOutput( rStream, xOutStream );
 xOutStream->flush();
 
-uno::Reference< beans::XPropertySet > xPropSet( xGraphicStream, 
uno::UNO_QUERY );
-if ( !xPropSet.is() )
-throw uno::RuntimeException();
+uno::Reference< beans::XPropertySet > xPropSet( xGraphicStream, 
uno::UNO_QUERY_THROW );
 
 xPropSet->setPropertyValue("UseCommonStoragePasswordEncryption",
 uno::Any( true ) );
diff --git a/comphelper/source/misc/mimeconfighelper.cxx 
b/comphelper/source/misc/mimeconfighelper.cxx
index ef41ce3..a24e4ab 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -579,10 +579,7 @@ OUString 
MimeConfigurationHelper::UpdateMediaDescriptorWithFilterName(
 
 uno::Reference< document::XTypeDetection > xTypeDetection(
 
m_xContext->getServiceManager()->createInstanceWithContext("com.sun.star.document.TypeDetection",
 m_xContext),
-uno::UNO_QUERY );
-
-if ( !xTypeDetection.is() )
-throw uno::RuntimeException(); // TODO
+uno::UNO_QUERY_THROW );
 
 // typedetection can change the mode, add a stream and so on, thus a 
copy should be used
 uno::Sequence< beans::PropertyValue > aTempMD( aMediaDescr );
diff --git a/comphelper/source/misc/storagehelper.cxx 
b/comphelper/source/misc/storagehelper.cxx
index 0157843..d6229e9 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -74,10 +74,7 @@ uno::Reference< embed::XStorage > 
OStorageHelper::GetTemporaryStorage(
 const uno::Reference< uno::XComponentContext >& rxContext )
 {
 uno::Reference< embed::XStorage > xTempStorage( GetStorageFactory( 
rxContext )->createInstance(),
-uno::UNO_QUERY );
-if ( !xTempStorage.is() )
-throw uno::RuntimeException();
-
+uno::UNO_QUERY_THROW );
 return xTempStorage;
 }
 
@@ -92,10 +89,7 @@ uno::Reference< embed::XStorage > 
OStorageHelper::GetStorageFromURL(
 aArgs[1] <<= nStorageMode;
 
 uno::Reference< embed::XStorage > xTempStorage( GetStorageFactory( 
rxContext )->createInstanceWithArguments( aArgs ),
-uno::UNO_QUERY );
-if ( !xTempStorage.is() )
-throw uno::RuntimeException();
-
+uno::UNO_QUERY_THROW );
 return xTempStorage;
 }
 
@@ -124,10 +118,7 @@ uno::Reference< embed::XStorage > 
OStorageHelper::GetStorageFromURL2(
 if (!xFact.is()) throw uno::RuntimeException();
 
 uno::Reference< embed::XStorage > xTempStorage(
-xFact->createInstanceWithArguments( aArgs ), uno::UNO_QUERY );
-if ( !xTempStorage.is() )
-throw uno::RuntimeException();
-
+xFact->createInstanceWithArguments( aArgs ), uno::UNO_QUERY_THROW );
 return xTempStorage;
 }
 
@@ -141,10 +132,7 @@ uno::Reference< embed::XStorage > 
OStorageHelper::GetStorageFromInputStream(
 aArgs[1] <<= embed::ElementModes::READ;
 
 uno::Reference< embed::XStorage > xTempStorage( GetStorageFactory( 
rxContext )->createInstanceWithArguments( aArgs ),
-uno::UNO_QUERY );
-if ( !xTempStorage.is() )
-throw uno::RuntimeException();
-
+uno::UNO_QUERY_THROW );
 return xTempStorage;
 }
 
@@ -159,10 +147,7 @@ uno::Reference< embed::XStorage > 
OStorageHelper::GetStorageFromStream(
 aArgs[1] <<= nStorageMode;
 
 uno::Reference< embed::XStorage > xTempStorage( GetStorageFactory( 
rxContext )->createInstanceWithArguments( aArgs ),
-uno::UNO_QUERY );

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

2017-02-15 Thread Stephan Bergmann
 basic/source/uno/namecont.cxx |   18 ++
 basic/source/uno/scriptcont.cxx   |   28 
 cli_ure/source/climaker/climaker_emit.cxx |5 +
 3 files changed, 7 insertions(+), 44 deletions(-)

New commits:
commit 878a8ff3f0b6b7f956e8ed40932ff47e0e56a0cd
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:11:21 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Ie7b5bb82868f517d056907567dd8e53a34d8a0b0
Reviewed-on: https://gerrit.libreoffice.org/34273
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index ae83e5a..221c2d3 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2076,14 +2076,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const 
uno::Reference< embed::XSto
 try
 {
 xInfoStream = xTargetLibrariesStor->openStreamElement( 
aStreamName, embed::ElementModes::READWRITE );
-uno::Reference< beans::XPropertySet > xProps( xInfoStream, 
uno::UNO_QUERY );
-SAL_WARN_IF(
-!xProps.is(), "basic",
-"The stream must implement XPropertySet!");
-if ( !xProps.is() )
-{
-throw uno::RuntimeException("InfoStream doesn't implement 
XPropertySet");
-}
+uno::Reference< beans::XPropertySet > xProps( xInfoStream, 
uno::UNO_QUERY_THROW );
 OUString aMime( "text/xml" );
 xProps->setPropertyValue("MediaType", uno::Any( aMime ) );
 
@@ -2134,14 +2127,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const 
uno::Reference< embed::XSto
 xmlscript::exportLibraryContainer( xWriter, pLibArray.get() );
 if ( bStorage )
 {
-uno::Reference< embed::XTransactedObject > xTransact( 
xTargetLibrariesStor, uno::UNO_QUERY );
-SAL_WARN_IF(
-!xTransact.is(), "basic",
-"The storage must implement XTransactedObject!");
-if ( !xTransact.is() )
-{
-throw uno::RuntimeException("xTargetLibrariesStor doesn't 
implement XTransactedObject");
-}
+uno::Reference< embed::XTransactedObject > xTransact( 
xTargetLibrariesStor, uno::UNO_QUERY_THROW );
 xTransact->commit();
 }
 }
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index cfd7447..e18fe5c 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -668,11 +668,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( 
SfxLibrary* pLib, cons
 uno::Reference< io::XStream > xSourceStream = 
xStorage->openStreamElement(
 aSourceStreamName,
 embed::ElementModes::READWRITE );
-uno::Reference< beans::XPropertySet > xProps( 
xSourceStream, uno::UNO_QUERY );
-if ( !xProps.is() )
-{
-throw uno::RuntimeException("xSourceStream doesn't 
implement XPropertySet");
-}
+uno::Reference< beans::XPropertySet > xProps( 
xSourceStream, uno::UNO_QUERY_THROW );
 OUString aMime( "text/xml" );
 xProps->setPropertyValue("MediaType", uno::Any( aMime ) );
 
@@ -796,13 +792,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( 
SfxLibrary* pLib, cons
 embed::ElementModes::WRITE | 
embed::ElementModes::TRUNCATE );
 
 // #87671 Allow encryption
-uno::Reference< embed::XEncryptionProtectedSource > 
xEncr( xSourceStream, uno::UNO_QUERY );
-OSL_ENSURE( xEncr.is(),
-"StorageStream opened for writing must 
implement XEncryptionProtectedSource!\n" );
-if ( !xEncr.is() )
-{
-throw uno::RuntimeException("xSourceStream doesn't 
implement XEncryptionProtectedSource");
-}
+uno::Reference< embed::XEncryptionProtectedSource > 
xEncr( xSourceStream, uno::UNO_QUERY_THROW );
 xEncr->setEncryptionPassword( pLib->maPassword );
 }
 catch(const css::packages::WrongPasswordException& )
@@ -813,11 +803,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( 
SfxLibrary* pLib, cons
 pLib->maPassword );
 }
 
-uno::Reference< beans::XPropertySet > xProps( 
xSourceStream, uno::UNO_QUERY );
-if ( !xProps.is() )
-{
-throw uno::RuntimeException("xSourceStream doesn't 
implement XPropertySet");
-}
+uno::R

[Libreoffice-commits] core.git: 3 commits - framework/source i18npool/source package/source

2017-02-15 Thread Stephan Bergmann
 framework/source/services/taskcreatorsrv.cxx  |5 
 i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx |5 
 package/source/xstor/ohierarchyholder.cxx |8 
 package/source/xstor/owriteablestream.cxx |   64 
+-
 package/source/xstor/xstorage.cxx |   94 
++
 package/source/zippackage/ZipPackage.cxx  |   15 -
 package/source/zippackage/ZipPackageStream.cxx|   22 --
 package/source/zippackage/wrapstreamforshare.cxx  |4 
 8 files changed, 50 insertions(+), 167 deletions(-)

New commits:
commit 32cb8a544d25bc2a5150cd6818f505f5d5fa3687
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:50 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I313b17cea20fc9dc3b617ecc41626410c0dfb127
Reviewed-on: https://gerrit.libreoffice.org/34267
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/framework/source/services/taskcreatorsrv.cxx 
b/framework/source/services/taskcreatorsrv.cxx
index d66eff4..13c5a56 100644
--- a/framework/source/services/taskcreatorsrv.cxx
+++ b/framework/source/services/taskcreatorsrv.cxx
@@ -250,10 +250,7 @@ css::uno::Reference< css::awt::XWindow > 
TaskCreatorService::implts_createContai
 
 // create a new blank container window and get access to parent container 
to append new created task.
 css::uno::Reference< css::awt::XWindowPeer > xPeer  = 
xToolkit->createWindow( aDescriptor );
-css::uno::Reference< css::awt::XWindow > xWindow( xPeer, 
css::uno::UNO_QUERY );
-if ( ! xWindow.is())
-throw css::uno::Exception("TaskCreator service was not able to create 
suitable frame window.",
-  static_cast< ::cppu::OWeakObject* >(this));
+css::uno::Reference< css::awt::XWindow > xWindow( xPeer, 
css::uno::UNO_QUERY_THROW );
 
 sal_Int32 nBackground = 0x;
 
commit f2fd6a6a3051000c04b175e33f16fe863df5735c
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:46 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I86acad58909fd5d8c69b723159d0e8afe5a67134
Reviewed-on: https://gerrit.libreoffice.org/34266
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git 
a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx 
b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 79cc2b4..847434d 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -993,10 +993,7 @@ DefaultNumberingProvider::isScriptFlagEnabled(const 
OUString& aName)
 Reference xInterface = 
xConfigProvider->createInstanceWithArguments(
 "com.sun.star.configuration.ConfigurationAccess", aArgs);
 
-xHierarchicalNameAccess.set(xInterface, UNO_QUERY);
-
-if (! xHierarchicalNameAccess.is())
-throw RuntimeException();
+xHierarchicalNameAccess.set(xInterface, UNO_QUERY_THROW);
 }
 
 Any aEnabled = xHierarchicalNameAccess->getByHierarchicalName(aName);
commit d2e77c3f9f5a0ceb40edda34b632abef5b0b57bb
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:35 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I3d5024ee6e43e5c1ac9f19e967dd6e210757e4d7
Reviewed-on: https://gerrit.libreoffice.org/34265
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/package/source/xstor/ohierarchyholder.cxx 
b/package/source/xstor/ohierarchyholder.cxx
index f5bcc68..2837d9d 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -94,9 +94,7 @@ uno::Reference< embed::XExtendedStorageStream > 
OHierarchyElement_Impl::GetStrea
 uno::Reference< embed::XStorage > xOwnStor;
 
 xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
-: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), 
uno::UNO_QUERY );
-if ( !xOwnStor.is() )
-throw uno::RuntimeException();
+: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), 
uno::UNO_QUERY_THROW );
 
 if ( aListPath.empty() )
 {
@@ -177,9 +175,7 @@ void OHierarchyElement_Impl::RemoveStreamHierarchically( 
OStringList_Impl& aList
 uno::Reference< embed::XStorage > xOwnStor;
 
 xOwnStor = m_xOwnStorage.is() ? m_xOwnStorage
-: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), 
uno::UNO_QUERY );
-if ( !xOwnStor.is() )
-throw uno::RuntimeException();
+: uno::Reference< embed::XStorage >( m_xWeakOwnStorage.get(), 
uno::UNO_QUERY_THROW );
 
 if ( aListPath.empty() )
 {
diff --git a/package/source/xstor/owriteablestream.cxx 
b/package/source/xstor/owriteablestream.cxx
index 455d51c..a

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

2017-02-15 Thread Stephan Bergmann
 pyuno/source/module/pyuno.cxx|4 +---
 pyuno/source/module/pyuno_runtime.cxx|   15 +++
 pyuno/source/module/pyuno_struct.cxx |5 +
 remotebridges/source/unourl_resolver/unourl_resolver.cxx |6 +-
 4 files changed, 6 insertions(+), 24 deletions(-)

New commits:
commit e3aef4dc7c335b0906d3cd87ecf98b60bb3b7c53
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:31 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Ib973a403a830a3ecf8e57a5e70a581ba06f96a05
Reviewed-on: https://gerrit.libreoffice.org/34264
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx
index e94309d..473df58 100644
--- a/pyuno/source/module/pyuno.cxx
+++ b/pyuno/source/module/pyuno.cxx
@@ -1709,9 +1709,7 @@ PyRef PyUNO_new (
 {
 PyThreadDetach antiguard;
 xInvocation.set(
-ssf->createInstanceWithArguments( Sequence( &targetInterface, 
1 ) ), UNO_QUERY );
-if( !xInvocation.is() )
-throw RuntimeException("XInvocation2 not implemented, cannot 
interact with object");
+ssf->createInstanceWithArguments( Sequence( &targetInterface, 
1 ) ), css::uno::UNO_QUERY_THROW );
 
 Reference xUnoTunnel (
 
xInvocation->getIntrospection()->queryAdapter(cppu::UnoType::get()),
 UNO_QUERY );
diff --git a/pyuno/source/module/pyuno_runtime.cxx 
b/pyuno/source/module/pyuno_runtime.cxx
index b14cbde..755a6dc 100644
--- a/pyuno/source/module/pyuno_runtime.cxx
+++ b/pyuno/source/module/pyuno_runtime.cxx
@@ -267,9 +267,7 @@ PyRef stRuntimeImpl::create( const Reference< 
XComponentContext > &ctx )
 ctx->getServiceManager()->createInstanceWithContext(
 "com.sun.star.script.Invocation",
 ctx ),
-UNO_QUERY );
-if( ! c->xInvocation.is() )
-throw RuntimeException( "pyuno: couldn't instantiate invocation 
service" );
+css::uno::UNO_QUERY_THROW );
 
 c->xTypeConverter = Converter::create(ctx);
 if( ! c->xTypeConverter.is() )
@@ -792,15 +790,8 @@ Any Runtime::pyObject2Any ( const PyRef & source, enum 
ConversionMode mode ) con
 else if( PyObject_IsInstance( o, getPyUnoStructClass().get() ) )
 {
 PyUNO* o_pi = reinterpret_cast(o);
-Reference my_mh (o_pi->members->xInvocation, 
UNO_QUERY);
-
-if (!my_mh.is())
-{
-throw RuntimeException(
-"struct wrapper does not support XMaterialHolder" );
-}
-else
-a = my_mh->getMaterial();
+Reference my_mh (o_pi->members->xInvocation, 
css::uno::UNO_QUERY_THROW);
+a = my_mh->getMaterial();
 }
 else if( PyObject_IsInstance( o, getCharClass( runtime ).get() ) )
 {
diff --git a/pyuno/source/module/pyuno_struct.cxx 
b/pyuno/source/module/pyuno_struct.cxx
index 437b4a8..be8e0b9 100644
--- a/pyuno/source/module/pyuno_struct.cxx
+++ b/pyuno/source/module/pyuno_struct.cxx
@@ -368,10 +368,7 @@ PyRef PyUNOStruct_new (
 {
 PyThreadDetach antiguard;
 xInvocation.set(
-ssf->createInstanceWithArguments( Sequence( &targetInterface, 
1 ) ), UNO_QUERY );
-OSL_ASSERT( xInvocation.is() );
-if( !xInvocation.is() )
-throw RuntimeException("XInvocation2 not implemented, cannot 
interact with object");
+ssf->createInstanceWithArguments( Sequence( &targetInterface, 
1 ) ), css::uno::UNO_QUERY_THROW );
 }
 if( !Py_IsInitialized() )
 throw RuntimeException();
commit 57c4fe05d7f3c7593198c0f82e29943d5791a470
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:27 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I8b729ab7434ee04d55fd407cf67f54c1cb9fbca9
Reviewed-on: https://gerrit.libreoffice.org/34263
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx 
b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index b7a208f..1e80b1b 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -116,11 +116,7 @@ Reference< XInterface > ResolverImpl::resolve( const 
OUString & rUnoUrl )
 
 Reference< XConnector > xConnector(
 _xSMgr->createInstanceWithContext( 
"com.sun.star.connection.Connector", _xCtx ),
-UNO_QUERY );
-
-if (! xConnector.is())
-throw RuntimeException("no connector!" );
-
+UNO_QUERY_THROW );
 Reference< XConnection > xConnection( xConnector->connect( aConnectDescr ) 
);
 
 // As soon as singletons are ready, switch to singleton !
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman

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

2017-02-15 Thread Stephan Bergmann
 reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx |4 ++--
 reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx |5 +
 sc/source/ui/vba/vbaglobals.cxx |9 ++---
 sc/source/ui/vba/vbarange.cxx   |4 +---
 sccomp/source/solver/CoinMPSolver.cxx   |4 +---
 sccomp/source/solver/LpsolveSolver.cxx  |4 +---
 6 files changed, 8 insertions(+), 22 deletions(-)

New commits:
commit 131503c1b1387fb1e7865b123c6161fc6709a718
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:23 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I6723de749d0e741a79a3ec276e781ee0e5b49934
Reviewed-on: https://gerrit.libreoffice.org/34262
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
index a4ec3461..d736f52 100644
--- a/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlExportDocumentHandler.cxx
@@ -299,8 +299,8 @@ void SAL_CALL ExportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
 if ( !m_xDelegatee.is() || !m_xModel.is() )
 throw uno::Exception();
 
-m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
-if ( !m_xDatabaseDataProvider.is() || 
!m_xDatabaseDataProvider->getActiveConnection().is() )
+
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY_THROW);
+if ( !m_xDatabaseDataProvider->getActiveConnection().is() )
 throw uno::Exception();
 
 uno::Reference< reflection::XProxyFactory > xProxyFactory = 
reflection::ProxyFactory::create( m_xContext );
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx 
b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index 7d9c13a..488fcea 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -355,10 +355,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const 
uno::Sequence< uno::Any >
 {
 static const char s_sDatabaseDataProvider[] = 
"com.sun.star.chart2.data.DatabaseDataProvider";
 
m_xDatabaseDataProvider.set(m_xContext->getServiceManager()->createInstanceWithContext(s_sDatabaseDataProvider
-,m_xContext),uno::UNO_QUERY);
-if ( !m_xDatabaseDataProvider.is() )
-throw uno::Exception();
-
+,m_xContext),uno::UNO_QUERY_THROW);
 m_xDatabaseDataProvider->setRowLimit(10);
 
 uno::Reference< chart2::data::XDataReceiver > 
xReceiver(m_xModel,uno::UNO_QUERY_THROW);
commit 6113c68c7653f545f762b22f70adc518cf8d660d
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:19 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: If7a8abbf739aca98616ecb5cc3546ced192361d9
Reviewed-on: https://gerrit.libreoffice.org/34261
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/sc/source/ui/vba/vbaglobals.cxx b/sc/source/ui/vba/vbaglobals.cxx
index 598390f..9799067 100644
--- a/sc/source/ui/vba/vbaglobals.cxx
+++ b/sc/source/ui/vba/vbaglobals.cxx
@@ -72,13 +72,8 @@ ScVbaGlobals::getExcel()
 uno::Reference< excel::XWorkbook > SAL_CALL
 ScVbaGlobals::getActiveWorkbook()
 {
-uno::Reference< excel::XWorkbook > xWorkbook( 
getApplication()->getActiveWorkbook(), uno::UNO_QUERY);
-if ( xWorkbook.is() )
-{
-return xWorkbook;
-}
-// FIXME check if this is correct/desired behavior
-throw uno::RuntimeException( "No activeWorkbook available" );
+uno::Reference< excel::XWorkbook > xWorkbook( 
getApplication()->getActiveWorkbook(), uno::UNO_QUERY_THROW);
+return xWorkbook;
 }
 
 uno::Reference< excel::XWindow > SAL_CALL
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index 4d444f2..e112341 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -3174,9 +3174,7 @@ ScVbaRange::Find( const uno::Any& What, const uno::Any& 
After, const uno::Any& L
 // After must be a single cell in the range
 if( xAfterRange->getCount() > 1 )
 throw uno::RuntimeException("After must be a single cell." );
-uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( 
xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), 
uno::UNO_QUERY );
-if( !xCell.is() )
-throw uno::RuntimeException("After must be in range." );
+uno::Reference< excel::XRange > xCell( Cells( uno::makeAny( 
xAfterRange->getRow() ), uno::makeAny( xAfterRange->getColumn() ) ), 
uno::UNO_QUERY_THROW );
 xStartCell.set( xAfterRange->getCellRange(), uno::UNO_QUERY_THROW 
);
 }
 
commit 9a22e9691773e7d16fbc8da1568e5d67d76fcf08
Author: Stephan Bergmann 
Date:   Tue 

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

2017-02-15 Thread Stephan Bergmann
 scripting/source/provider/MasterScriptProvider.cxx |   22 ++---
 sfx2/source/appl/imestatuswindow.cxx   |7 --
 sfx2/source/doc/guisaveas.cxx  |   17 +++-
 sfx2/source/doc/objstor.cxx|   12 +--
 sfx2/source/view/ipclient.cxx  |   21 +---
 5 files changed, 16 insertions(+), 63 deletions(-)

New commits:
commit c27586115d1df8b80cece6b03e333803c1a15b19
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:10 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I705e4e7e8446a503e3ef0e2828a22554f94585c6
Reviewed-on: https://gerrit.libreoffice.org/34259
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/scripting/source/provider/MasterScriptProvider.cxx 
b/scripting/source/provider/MasterScriptProvider.cxx
index c469ba3..e1599be 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -473,12 +473,7 @@ MasterScriptProvider::insertByName( const OUString& aName, 
const Any& aElement )
 {
 if ( m_xMSPPkg.is() )
 {
-Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY 
);
-if ( !xCont.is() )
-{
-throw RuntimeException(
-"PackageMasterScriptProvider doesn't implement 
XNameContainer" );
-}
+Reference< container::XNameContainer > xCont( m_xMSPPkg, 
UNO_QUERY_THROW );
 xCont->insertByName( aName, aElement );
 }
 else
@@ -552,12 +547,7 @@ MasterScriptProvider::removeByName( const OUString& Name )
 {
 if ( m_xMSPPkg.is() )
 {
-Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY 
);
-if ( !xCont.is() )
-{
-throw RuntimeException(
-"PackageMasterScriptProvider doesn't implement 
XNameContainer" );
-}
+Reference< container::XNameContainer > xCont( m_xMSPPkg, 
UNO_QUERY_THROW );
 xCont->removeByName( Name );
 }
 else
@@ -651,13 +641,7 @@ MasterScriptProvider::hasByName( const OUString& aName )
 {
 if ( m_xMSPPkg.is() )
 {
-Reference< container::XNameContainer > xCont( m_xMSPPkg, UNO_QUERY 
);
-if ( !xCont.is() )
-{
-throw RuntimeException(
-"PackageMasterScriptProvider doesn't implement 
XNameContainer" );
-}
-
+Reference< container::XNameContainer > xCont( m_xMSPPkg, 
UNO_QUERY_THROW );
 result = xCont->hasByName( aName );
 }
 // If this is a document provider then we shouldn't
commit 8b3a9d3055d261a3ba16932bf7f361e0ca5c77c2
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:07 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Ida366e40ade98443019d3c312ae19864f93c9e5e
Reviewed-on: https://gerrit.libreoffice.org/34258
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/sfx2/source/appl/imestatuswindow.cxx 
b/sfx2/source/appl/imestatuswindow.cxx
index 4d46add..0e5bb44 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -205,12 +205,7 @@ css::uno::Reference< css::beans::XPropertySet > 
ImeStatusWindow::getConfig()
 xProvider->createInstanceWithArguments(
 "com.sun.star.configuration.ConfigurationUpdateAccess",
 aArgs),
-css::uno::UNO_QUERY);
-if (!m_xConfig.is())
-throw css::uno::RuntimeException(
-"null com.sun.star.configuration."
-"ConfigurationUpdateAccess",
-nullptr);
+css::uno::UNO_QUERY_THROW);
 bAdd = true;
 }
 xConfig = m_xConfig;
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index b465b54..8f08c35 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -395,9 +395,7 @@ uno::Reference< frame::XStorable > const & 
ModelData_Impl::GetStorable()
 {
 if ( !m_xStorable.is() )
 {
-m_xStorable.set( m_xModel, uno::UNO_QUERY );
-if ( !m_xStorable.is() )
-throw uno::RuntimeException();
+m_xStorable.set( m_xModel, uno::UNO_QUERY_THROW );
 }
 
 return m_xStorable;
@@ -408,9 +406,7 @@ uno::Reference< frame::XStorable2 > const & 
ModelData_Impl::GetStorable2()
 {
 if ( !m_xStorable2.is() )
 {
-m_xStorable2.set( m_xModel, uno::UNO_QUERY );
-if ( !m_xStorable2.is() )
-throw uno::RuntimeException();
+m_xStorable2.set( m_xModel, uno::UNO_QUERY_THROW );
 }
 
 return m_xStorable2;
@@ -1274,10 +1270,7 @@ uno::Reference< container::XNameAccess > con

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

2017-02-15 Thread Stephan Bergmann
 stoc/source/javaloader/javaloader.cxx |5 +
 stoc/source/javavm/javavm.cxx |   16 +++-
 svx/source/accessibility/AccessibleTextHelper.cxx |5 +
 svx/source/svdraw/svdoole2.cxx|4 +---
 4 files changed, 6 insertions(+), 24 deletions(-)

New commits:
commit 9a7d112603393ad45b71d36860ac7d0d8175c06d
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:10:00 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Icc72bd482d37e1857137470a8357659ab4d0a969
Reviewed-on: https://gerrit.libreoffice.org/34257
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/stoc/source/javaloader/javaloader.cxx 
b/stoc/source/javaloader/javaloader.cxx
index 5b421b0..7ff8f61 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -257,10 +257,7 @@ const css::uno::Reference & 
JavaComponentLoader::getJavaL
 }
 
 // set the service manager at the javaloader
-css::uno::Reference 
javaLoader_XInitialization(m_javaLoader, UNO_QUERY);
-if(!javaLoader_XInitialization.is())
-throw RuntimeException(
-"javaloader error - initialization of java javaloader failed, 
no XInitialization");
+css::uno::Reference 
javaLoader_XInitialization(m_javaLoader, UNO_QUERY_THROW);
 
 Any any;
 any <<= css::uno::Reference(
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index ee5069d..ef8e8ae 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -273,9 +273,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm,
 xCtx );
 if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: 
couldn't get ConfigurationRegistry", nullptr);
 
-css::uno::Reference 
xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY);
-if(!xConfRegistry_simple.is()) throw 
css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 
nullptr);
-
+css::uno::Reference 
xConfRegistry_simple(xConfRegistry, css::uno::UNO_QUERY_THROW);
 xConfRegistry_simple->open("org.openoffice.Inet", true, false);
 css::uno::Reference xRegistryRootKey = 
xConfRegistry_simple->getRootKey();
 
@@ -358,11 +356,7 @@ void getDefaultLocaleFromConfig(
 "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
 
 css::uno::Reference xConfRegistry_simple(
-xConfRegistry, css::uno::UNO_QUERY);
-if(!xConfRegistry_simple.is())
-throw css::uno::RuntimeException(
-"javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
-
+xConfRegistry, css::uno::UNO_QUERY_THROW);
 xConfRegistry_simple->open("org.openoffice.Setup", true, false);
 css::uno::Reference xRegistryRootKey = 
xConfRegistry_simple->getRootKey();
 
@@ -464,11 +458,7 @@ void getJavaPropsFromSafetySettings(
 "javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
 
 css::uno::Reference xConfRegistry_simple(
-xConfRegistry, css::uno::UNO_QUERY);
-if(!xConfRegistry_simple.is())
-throw css::uno::RuntimeException(
-"javavm.cxx: couldn't get ConfigurationRegistry", nullptr);
-
+xConfRegistry, css::uno::UNO_QUERY_THROW);
 xConfRegistry_simple->open(
 "org.openoffice.Office.Java",
 true, false);
commit 90e6afc6e236ebe7abcc406fa9cb9d5455f0ae81
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:57 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I6244b12a85a6cbd8c5945a0b4965c070eed15ed4
Reviewed-on: https://gerrit.libreoffice.org/34256
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx 
b/svx/source/accessibility/AccessibleTextHelper.cxx
index c4c05e8..c30ec41 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1566,10 +1566,7 @@ namespace accessibility
 if( !xFrontEndContext.is() )
 throw 
uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend 
invalid", mxFrontEnd );
 
-uno::Reference< XAccessibleComponent > xFrontEndComponent( 
xFrontEndContext, uno::UNO_QUERY );
-
-if( !xFrontEndComponent.is() )
-throw 
uno::RuntimeException("AccessibleTextHelper_Impl::getAccessibleAt: frontend is 
no XAccessibleComponent", mxFrontEnd );
+uno::Reference< XAccessibleComponent > xFrontEndComponent( 
xFrontEndContext, uno::UNO_QUERY_THROW );
 
 // #103862# No longer need to make given position relative
 Point aPoint( _aPoint.X, _aPoint.Y );
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index a299327..34b6ec0 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -471,9 +471,7 @@ void SAL_CALL 
SdrLightEmbeddedClient_Impl::changedPlacement( cons

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

2017-02-15 Thread Stephan Bergmann
 sw/source/ui/vba/vbaselection.cxx  |6 +-
 sw/source/uibase/uno/unotxdoc.cxx  |4 ++--
 testtools/source/bridgetest/bridgetest.cxx |6 +-
 testtools/source/performance/ubtest.cxx|4 +---
 4 files changed, 5 insertions(+), 15 deletions(-)

New commits:
commit 5ed0dc584160b74eca08f7f8ba1e15ef40d163df
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:54 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I1a2239b596201bc0172f2a6ade177c10491be9c2
Reviewed-on: https://gerrit.libreoffice.org/34255
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/ui/vba/vbaselection.cxx 
b/sw/source/ui/vba/vbaselection.cxx
index be9eb17..fc5017d 100644
--- a/sw/source/ui/vba/vbaselection.cxx
+++ b/sw/source/ui/vba/vbaselection.cxx
@@ -803,11 +803,7 @@ SwVbaSelection::Tables( const uno::Any& aIndex )
 }
 
 // if the current selection is a XTextTableCursor and the index is 1 then 
we can service this request, otherwise we just have to throw
-uno::Reference< text::XTextTableCursor > xTextTableCursor( 
mxModel->getCurrentSelection(), uno::UNO_QUERY );
-
-if ( !xTextTableCursor.is() )
-   throw uno::RuntimeException();
-
+uno::Reference< text::XTextTableCursor > xTextTableCursor( 
mxModel->getCurrentSelection(), uno::UNO_QUERY_THROW );
 SwXTextTableCursor* pTTCursor = dynamic_cast< SwXTextTableCursor* >( 
xTextTableCursor.get() );
 if ( pTTCursor )
 {
diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index a6aadb5..cd1e00c 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -737,8 +737,8 @@ SwUnoCursor* 
SwXTextDocument::CreateCursorForSearch(Reference< XTextCursor > & x
 sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor 
> & xDesc)
 {
 SolarMutexGuard aGuard;
-Reference< XUnoTunnel > xDescTunnel(xDesc, UNO_QUERY);
-if(!IsValid() || !xDescTunnel.is() || 
!xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId()))
+Reference< XUnoTunnel > xDescTunnel(xDesc, UNO_QUERY_THROW);
+if(!IsValid() || 
!xDescTunnel->getSomething(SwXTextSearch::getUnoTunnelId()))
 throw RuntimeException();
 
 Reference< XTextCursor >  xCursor;
commit c68b5c36cdadeedd47dfb68aee10c5df8513dbdc
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:48 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Iaf7b4695e7930b8e7fa5dd3736d19744afb52fa3
Reviewed-on: https://gerrit.libreoffice.org/34254
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/testtools/source/bridgetest/bridgetest.cxx 
b/testtools/source/bridgetest/bridgetest.cxx
index bc238c6..fede2db 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -1155,11 +1155,7 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString 
> & rArgs )
 {
 throw RuntimeException( "cannot get test object!" );
 }
-Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY );
-if (! xTest.is())
-{
-throw RuntimeException( "test object does not implement 
XBridgeTest!" );
-}
+Reference< XBridgeTest > xTest( xOriginal, UNO_QUERY_THROW );
 
 Reference xLBT;
 bRet = check( makeSurrogate( xLBT, xTest ), "makeSurrogate" );
diff --git a/testtools/source/performance/ubtest.cxx 
b/testtools/source/performance/ubtest.cxx
index 5b1ebee..acf0969 100644
--- a/testtools/source/performance/ubtest.cxx
+++ b/testtools/source/performance/ubtest.cxx
@@ -554,9 +554,7 @@ static void benchmark(
 TimingSheet & rSheet, const Reference< XInterface > & xInstance, sal_Int64 
nLoop )
 throw (Exception)
 {
-Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY );
-if (! xBench.is())
-throw RuntimeException("illegal test object!" );
+Reference< XPerformanceTest > xBench( xInstance, UNO_QUERY_THROW );
 
 sal_Int64 i;
 sal_uInt32 tStart, tEnd;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Stephan Bergmann
 toolkit/source/awt/vclxtoolkit.cxx|   25 +
 toolkit/source/controls/dialogcontrol.cxx |   24 ++--
 uui/source/iahndl.cxx |   12 ++--
 3 files changed, 13 insertions(+), 48 deletions(-)

New commits:
commit 223bb798f6f1917b926aa2fb293709ef63725a64
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:42 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I1db6d47af232f35a8d8596a7a18c3c3e7a272f4b
Reviewed-on: https://gerrit.libreoffice.org/34253
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 5feba060..2b4f3f8 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1921,10 +1921,7 @@ void SAL_CALL VCLXToolkit::pause(sal_Int32 nMilliseconds)
 
 void SAL_CALL VCLXToolkit::keyPress( const css::awt::KeyEvent & aKeyEvent )
 {
-css::uno::Reference xWindow ( aKeyEvent.Source, 
css::uno::UNO_QUERY );
-if( !xWindow.is() )
-throw css::uno::RuntimeException( "invalid event source" );
-
+css::uno::Reference xWindow ( aKeyEvent.Source, 
css::uno::UNO_QUERY_THROW );
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
 if( !pWindow )
 throw css::uno::RuntimeException( "invalid event source" );
@@ -1935,10 +1932,7 @@ void SAL_CALL VCLXToolkit::keyPress( const 
css::awt::KeyEvent & aKeyEvent )
 
 void SAL_CALL VCLXToolkit::keyRelease( const css::awt::KeyEvent & aKeyEvent )
 {
-css::uno::Reference xWindow ( aKeyEvent.Source, 
css::uno::UNO_QUERY );
-if( !xWindow.is() )
-throw css::uno::RuntimeException( "invalid event source" );
-
+css::uno::Reference xWindow ( aKeyEvent.Source, 
css::uno::UNO_QUERY_THROW );
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
 if( !pWindow )
 throw css::uno::RuntimeException( "invalid event source" );
@@ -1950,10 +1944,7 @@ void SAL_CALL VCLXToolkit::keyRelease( const 
css::awt::KeyEvent & aKeyEvent )
 
 void SAL_CALL VCLXToolkit::mousePress( const css::awt::MouseEvent & 
aMouseEvent )
 {
-css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY );
-if( !xWindow.is() )
-throw css::uno::RuntimeException( "invalid event source" );
-
+css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY_THROW );
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
 if( !pWindow )
 throw css::uno::RuntimeException( "invalid event source" );
@@ -1964,10 +1955,7 @@ void SAL_CALL VCLXToolkit::mousePress( const 
css::awt::MouseEvent & aMouseEvent
 
 void SAL_CALL VCLXToolkit::mouseRelease( const css::awt::MouseEvent & 
aMouseEvent )
 {
-css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY );
-if( !xWindow.is() )
-throw css::uno::RuntimeException( "invalid event source" );
-
+css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY_THROW );
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
 if( !pWindow )
 throw css::uno::RuntimeException( "invalid event source" );
@@ -1978,10 +1966,7 @@ void SAL_CALL VCLXToolkit::mouseRelease( const 
css::awt::MouseEvent & aMouseEven
 
 void SAL_CALL VCLXToolkit::mouseMove( const css::awt::MouseEvent & aMouseEvent 
)
 {
-css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY );
-if( !xWindow.is() )
-throw css::uno::RuntimeException( "invalid event source" );
-
+css::uno::Reference xWindow ( aMouseEvent.Source, 
css::uno::UNO_QUERY_THROW );
 VclPtr pWindow = VCLUnoHelper::GetWindow( xWindow );
 if( !pWindow )
 throw css::uno::RuntimeException( "invalid event source" );
diff --git a/toolkit/source/controls/dialogcontrol.cxx 
b/toolkit/source/controls/dialogcontrol.cxx
index ba0d503..b7f7193 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -704,41 +704,31 @@ void SAL_CALL UnoMultiPageControl::dispose()
 // css::awt::XSimpleTabController
 ::sal_Int32 SAL_CALL UnoMultiPageControl::insertTab()
 {
-Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY );
-if ( !xMultiPage.is() )
-throw RuntimeException();
+Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY_THROW );
 return xMultiPage->insertTab();
 }
 
 void SAL_CALL UnoMultiPageControl::removeTab( ::sal_Int32 ID )
 {
-Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY );
-if ( !xMultiPage.is() )
-throw RuntimeException();
+Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY_THROW );
 xMultiPage->removeTab( ID );
 }
 
 void SAL_CALL UnoMultiPageControl::setTabProps( ::sal_Int32 ID, const 
Sequence< NamedValue >& Properties )
 {
-Reference< XSimpleTabController > xMultiPage( getPeer(), UNO_QUERY );
-if ( !xMultiPage.is() )
-throw RuntimeExceptio

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

2017-02-15 Thread Stephan Bergmann
 xmloff/source/core/RDFaExportHelper.cxx   |4 -
 xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx |   17 
+--
 xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx   |   24 
+-
 xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx|   24 
+-
 xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx |   17 
+--
 xmlsecurity/source/xmlsec/nss/xmlencryption_nssimpl.cxx   |   24 
+-
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx|   23 
+
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx   |7 --
 8 files changed, 24 insertions(+), 116 deletions(-)

New commits:
commit 45aad89c34604d2b075bf4f1122589952f582bdb
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:32 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: Ie82c1f243717eb42218040a9b4d59f8cf10de387
Reviewed-on: https://gerrit.libreoffice.org/34251
Tested-by: Jenkins 
Reviewed-by: Stephan Bergmann 

diff --git a/xmloff/source/core/RDFaExportHelper.cxx 
b/xmloff/source/core/RDFaExportHelper.cxx
index 2bc047b..6311f23 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -90,9 +90,7 @@ RDFaExportHelper::RDFaExportHelper(SvXMLExport & i_rExport)
 : m_rExport(i_rExport), m_xRepository(nullptr), m_Counter(0)
 {
 const uno::Reference xRS( m_rExport.GetModel(),
-uno::UNO_QUERY);
-OSL_ENSURE(xRS.is(), "AddRDFa: model is no rdf::XRepositorySupplier");
-if (!xRS.is()) throw uno::RuntimeException();
+uno::UNO_QUERY_THROW);
 m_xRepository.set(xRS->getRDFRepository(), uno::UNO_QUERY_THROW);
 }
 
commit 8ca2d453e3008c265c8968529991d01579ff8f3a
Author: Stephan Bergmann 
Date:   Tue Feb 14 16:09:20 2017 +0100

Some simplifications, using UNO_QUERY_THROW

Change-Id: I6e7555472da6b23af4c64b299182339a5b324ee9
Reviewed-on: https://gerrit.libreoffice.org/34250
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git 
a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index f383046..710191c 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -638,11 +638,7 @@ Sequence< Reference < XCertificate > > 
SecurityEnvironment_MSCryptImpl::buildCer
 chainPara.cbSize = sizeof( CERT_CHAIN_PARA ) ;
 chainPara.RequestedUsage = certUsage ;
 
-Reference< XUnoTunnel > xCertTunnel( begin, UNO_QUERY ) ;
-if( !xCertTunnel.is() ) {
-throw RuntimeException() ;
-}
-
+Reference< XUnoTunnel > xCertTunnel( begin, UNO_QUERY_THROW ) ;
 xcert = 
reinterpret_cast(xCertTunnel->getSomething( 
X509Certificate_MSCryptImpl::getUnoTunnelId() ));
 if( xcert == nullptr ) {
 throw RuntimeException() ;
@@ -814,10 +810,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::verifyCertificate(
 PCCERT_CONTEXT pCertContext = nullptr;
 const X509Certificate_MSCryptImpl* xcert = nullptr;
 
-Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY ) ;
-if( !xCertTunnel.is() ) {
-throw RuntimeException() ;
-}
+Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY_THROW ) ;
 
 SAL_INFO("xmlsecurity.xmlsec", "Start verification of certificate: " << 
aCert->getSubjectName());
 
@@ -981,11 +974,7 @@ sal_Int32 
SecurityEnvironment_MSCryptImpl::getCertificateCharacters( const css::
 PCCERT_CONTEXT pCertContext ;
 const X509Certificate_MSCryptImpl* xcert ;
 
-Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY ) ;
-if( !xCertTunnel.is() ) {
-throw RuntimeException() ;
-}
-
+Reference< XUnoTunnel > xCertTunnel( aCert, UNO_QUERY_THROW ) ;
 xcert = 
reinterpret_cast(xCertTunnel->getSomething( 
X509Certificate_MSCryptImpl::getUnoTunnelId() ));
 if( xcert == nullptr ) {
 throw RuntimeException() ;
diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
index 38a329a..14d21e1 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx
@@ -74,11 +74,7 @@ SAL_CALL XMLEncryption_MSCryptImpl::encrypt(
 throw RuntimeException() ;
 
 //Get Keys Manager
-Reference< XUnoTunnel > xSecTunnel( aEnvironment , UNO_QUERY ) ;
-if( !xSecTunnel.is() ) {
- throw RuntimeException() ;
-}
-
+Reference< XUnoTunnel > xSecTunnel( aEnvironment , UNO_QUERY_THROW ) ;
 SecurityEnvironment_MSCryptImpl* pSecEnv = 
reinterpret_cast(xSecTunnel->getSomething( 
SecurityEnvironment_MSCryptImpl::getUnoTunnelId() ));
 if( pSecEnv == nullptr )
 throw RuntimeException(

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

2017-02-15 Thread Miklos Vajna
 sw/qa/extras/README |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit fb5113dc1656920ec8a17ef3faef6ad07ad73e7c
Author: Miklos Vajna 
Date:   Wed Feb 15 15:06:42 2017 +0100

sw/qa/extras: go back to the TDF mirror for xray

This was already mentioned once, but then got replaced with the original
homepage which is now gone.

Change-Id: I854e47e45b4f3b85e9957329266d43d6d896e06a

diff --git a/sw/qa/extras/README b/sw/qa/extras/README
index c295858..c77ded0 100644
--- a/sw/qa/extras/README
+++ b/sw/qa/extras/README
@@ -76,7 +76,7 @@ enough if you want to test a paragraph or character property.
 Figuring out the UNO API just by reading the idl files under `offapi/` is not
 that productive. Xray can help in this case. Download it from:
 
-http://bernard.marcelly.perso.sfr.fr/index2.html
+http://dev-www.libreoffice.org/extern/XrayTool52_en.sxw
 
 It's a document file, start Writer, Tools -> Options -> LibreOffice -> 
Security,
 Macro Security, and there choose Low. Then open the document, and click 
`Install
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: system-wide location for dictionary files and dictionary file name format

2017-02-15 Thread Erik Quaeghebeur
> Firefox has no problem using ar.{aff,dic} for Arabic, neither does
> gtkspell (or whatever GTK+ apps use).

I can confirm. Firefox also deals nicely with the four French variants,
even listing “French (Moderne)” for fr-moderne (doesn't do that for the
others though, just gives “fr-reforme1990”, don't know why, perhaps the
8-character limit in bcp47… must check). KDE (KTextEditor) also does
things nicely,  giving “français (France) [reforme1990]” (of course here
the “(France)” shouldn't be there, but that's minor).

What are the experiences of others, with other software (emacs, vim,…)?
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: system-wide location for dictionary files and dictionary file name format

2017-02-15 Thread Erik Quaeghebeur
Caolán McNamara 2017-02-15 13:42:
>
> For Fedora we use http://www.dicollecte.org/download/fr/hunspell-french
> -dictionaries-v6.0.2.zip and just unzip it and rename the
> toutesvariantes.* to fr_FR.* to serve as the default French spelling
> dictionary.

FYI: ‘classique’ is (now) the recommended one (as per README) although
‘toutesvariantes’ is the safe one to avoid ‘false’ misspelling
indications. 

> Secondly, what the rest of LibreOffice does with this then is probably
> still a little unclear in parts. I see that in our format character
> dialog where we can directly enter bcp47 that I can successfully enter
> a tag like de-1996 but not fr-x-whatever so it appears the the private
> use tags are not allowed there for some additional reason I don't know
> (@erack?)

> Anyhow, in fedora wrt french spelling we just took the recommended
> dictionary and set it as the default system wide fr_FR.

This is what is being done on Gentoo currently. I find it suboptimal and
was hoping to improve the situation. LO is making this a bit harder than
I'd expected. But I'll find a way. Thanks much for the very helpful
explanations!

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


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

2017-02-15 Thread Michael Meeks
 vcl/source/window/toolbox2.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 2c60e02bbfde8655828a5b019642f5e85f975e61
Author: Michael Meeks 
Date:   Wed Feb 15 11:01:41 2017 +

Simple work-around for unpleasant framework shutdown to avoid crash.


http://crashreport.libreoffice.org/stats/crash_details/2de31c06-da20-4280-916a-e282a337b16b

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

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index ec58bbd..4be71d6 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -635,7 +635,8 @@ ToolBoxButtonSize ToolBox::GetToolboxButtonSize() const
 
 /*static*/ Size ToolBox::GetDefaultImageSize(ToolBoxButtonSize 
eToolBoxButtonSize)
 {
-float fScaleFactor = Application::GetDefaultDevice()->GetDPIScaleFactor();
+OutputDevice *pDefault = Application::GetDefaultDevice();
+float fScaleFactor = pDefault ? pDefault->GetDPIScaleFactor() : 1.0;
 
 Size aUnscaledSize = Size(16, 16);
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: Support new and discontinue old compilers

2017-02-15 Thread marius adrian popa
I will check the issue with Firebird

http://paste.openstack.org/show/594333/

On Wed, Feb 15, 2017 at 10:26 AM, David Ostrovsky 
wrote:

>
> I'm pleased to share with you, that MSVC 15 (aka VS 2017) is up
> and running on master: [1].
>
> After fixing the VC++ runtime merge module merging problem in resulted
> MSI in MSVC 14.0 and MSVC 15.0, the produced MSI can not only be
> installed, but the LO can actually run after the installation. The VC++
> Runtime merge module merging bug that started to show up since MSVC
> 14.0, is appeared to be a trivial problem, that was surprisingly hard
> to track down: [2]. I don't want to enter into glory details here as
> for why that was the case, but I will write a blog about that one.
>
> That raises the question, if we are ready to move forward and left MSVC
> 12.0 (aka VS 2013) behind us: [3]. I know, it's always hard to get a
> feedback on such questions, as you can see no reaction on this infra
> issue: [4]. Needless to say that I asked on IRC too, without any
> response, so I guess the only way to get a feedback on that one, is to
> merge that change and see, if it's going to be reverted...
>
> * [1] https://gerrit.libreoffice.org/#/c/31279
> * [2] https://gerrit.libreoffice.org/#/c/33366/
> * [3] https://gerrit.libreoffice.org/#/c/22588/
> * [4] https://redmine.documentfoundation.org/issues/2147
>
> ___
> LibreOffice mailing list
> LibreOffice@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libreoffice
>
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: system-wide location for dictionary files and dictionary file name format

2017-02-15 Thread Khaled Hosny
On Wed, Feb 15, 2017 at 12:42:22PM +, Caolán McNamara wrote:
> > Hmm, it seems language tags such as ‘nl’ or ‘fr’ without a region
> > component, and which are valid according to bcp47 are not recognized
> > by LO. Is this a bug I should report?
> 
> Only if you intend to work on solving it, is my opinion. It would be
> nice to support a bare "language" dictionary and have it in use for all
> variants unless there are more specific variants to use, but I don't
> intend to do it myself, or think my way through hacking firefox,
> enchant and the rest of the things that parse filenames in
> /usr/share/myspell|hunspell to also support that.

Firefox has no problem using ar.{aff,dic} for Arabic, neither does
gtkspell (or whatever GTK+ apps use). Only LibreOffice (and OpenOffice
before it) has problem using such dictionaries, and it turn packagers
duplicates the dictionary files to support LibreOffice e.g. the
hunspell-ar package on Debian has tens of ar_XX.{aff,dic} symlinks just
because of this.

This has long annoyed me, and I might give it a try if there are some
code pointers.

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


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

2017-02-15 Thread Xisco Fauli
 sw/source/core/tox/ToxTextGenerator.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 05116fb49efa563610f6486d0c3f6216624dcd13
Author: Xisco Fauli 
Date:   Wed Feb 15 11:06:00 2017 +0100

tdf#104315: Revert "tdf#44282 fix missing space...

... for numbered lists in TOC"

This commit is causing lot of regressions in TOC.
Besides, as the comment says, it's an ugly hack,
so I'd prefer to revert it and find a better solution

This reverts commit 250252d02bac88877845a4bc27e3f1837f1312ba.

Change-Id: I9f57d1cb0f7237372030c12651ba92fbe5a60945
Reviewed-on: https://gerrit.libreoffice.org/34293
Tested-by: Jenkins 
Reviewed-by: Miklos Vajna 
(cherry picked from commit dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd)
Reviewed-on: https://gerrit.libreoffice.org/34295

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 9d6a887..4eaaf8c3 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -215,10 +215,7 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc, const 
std::vector
 }
 
 case TOKEN_TEXT:
-{
- if(rText.getLength() > 0) rText = rText.copy(0, 
rText.getLength() - 1);  //Ugly hack to remove default spacing when user 
specifies 
- rText += aToken.sText;
-}
+rText += aToken.sText;
 break;
 
 case TOKEN_PAGE_NUMS:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Markus Mohrhard
 ucb/source/ucp/webdav/DAVResourceAccess.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit d96d0770a05bed00d13c3035562404c165bd2aeb
Author: Markus Mohrhard 
Date:   Wed Feb 15 03:37:21 2017 +0100

try to fix "random config" box

Test run #211.

Change-Id: I438ba57d69bcd46b9114c80e9ca4b7f7ac731963
Reviewed-on: https://gerrit.libreoffice.org/34286
Tested-by: Jenkins 
Reviewed-by: Markus Mohrhard 

diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx 
b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
index 68501d0..f0bf077 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx
@@ -28,6 +28,9 @@
 #include "DAVAuthListenerImpl.hxx"
 #include "DAVResourceAccess.hxx"
 
+#include 
+#include 
+
 using namespace http_dav_ucp;
 using namespace com::sun::star;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Re: system-wide location for dictionary files and dictionary file name format

2017-02-15 Thread Caolán McNamara
On Tue, 2017-02-14 at 22:28 +0100, Erik Quaeghebeur wrote:
> Caolán McNamara 2017-2-13 10:31:
> > 
> > For dictionaries (and hyphenation patterns and thesaurus things)
> > under
> > linux we also check for system installed ones. This is
> > DICT_SYSTEM_DIR
> > in configure.ac and lingucomponent/source/lingutil/lingutil.cxx.
> 
> Thanks for your elaborate response. I guess that Redhat doesn't use
> the dicollecte French dictionaries, if the oxt is not installed, but
> just some dictionaries get dumped into DICT_SYSTEM_DIR.

For Fedora we use http://www.dicollecte.org/download/fr/hunspell-french
-dictionaries-v6.0.2.zip and just unzip it and rename the
toutesvariantes.* to fr_FR.* to serve as the default French spelling
dictionary.

> Hmm, it seems language tags such as ‘nl’ or ‘fr’ without a region
> component, and which are valid according to bcp47 are not recognized
> by LO. Is this a bug I should report?

Only if you intend to work on solving it, is my opinion. It would be
nice to support a bare "language" dictionary and have it in use for all
variants unless there are more specific variants to use, but I don't
intend to do it myself, or think my way through hacking firefox,
enchant and the rest of the things that parse filenames in
/usr/share/myspell|hunspell to also support that.

> > So for the original question, the answer for installing system wide
> > dictionaries at a distro level is probably to put the .dic and .aff
> > into /usr/share/hunspell and it'll "just work". Special variants
> > need to be named in a bcp47 format to have a chance of getting
> > picked up right, but that's a lesser used codepath so mileage many
> > vary.
> 
> OK, but after reading through the bcp47 RFC, I have the impression
> that only private-use tags for the earlier French example could work:
> fr-x-classique, fr-x-moderne, fr-x-toutesvariantes, and fr-x-
> reforme1990 then, with the possibility of registering fr-1990, it
> seems. I've tried it, and they're not seen by LO.

Yeah, "your mileage may vary" I guess kicks in there. The main "real-
world" use case for BCP47 is to distinguish Cyrillic vs Latin Serbian.
Couple of things. Firstly, you only get 8 letters for the part after x-
so fr-x-moderne is valid bcp-47 while fr-x-classique is not (but fr-x-
classiqu would be). If I add fr-x-classiqu.aff|dic then I see they are
successfully added to the list of dictionaries available to
LibreOffice.

Secondly, what the rest of LibreOffice does with this then is probably
still a little unclear in parts. I see that in our format character
dialog where we can directly enter bcp47 that I can successfully enter
a tag like de-1996 but not fr-x-whatever so it appears the the private
use tags are not allowed there for some additional reason I don't know
(@erack?)

Anyhow, in fedora wrt french spelling we just took the recommended
dictionary and set it as the default system wide fr_FR.

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


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

2017-02-15 Thread Vitaliy Anderson
 sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx |binary
 sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt |binary
 sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt  |binary
 sw/qa/extras/uiwriter/uiwriter.cxx   |   35 +++
 4 files changed, 35 insertions(+)

New commits:
commit b29046814f59f5911e619cb7569bdb0333e5
Author: Vitaliy Anderson 
Date:   Fri Feb 3 03:58:02 2017 -0800

tdf#104349, tdf#104668 MS Word compatibility trailing blanks option part 3

Add unittest

Change-Id: I2c0671b8ba0ee899d2e77e8d29ebbadea09e7a78
Reviewed-on: https://gerrit.libreoffice.org/33883
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx
new file mode 100644
index 000..d72725c
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanks.docx differ
diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt
new file mode 100644
index 000..bd0abdc
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksFalse.odt differ
diff --git a/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt
new file mode 100644
index 000..407fdf4
Binary files /dev/null and 
b/sw/qa/extras/uiwriter/data/MsWordCompTrailingBlanksTrue.odt differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx 
b/sw/qa/extras/uiwriter/uiwriter.cxx
index a085220..8e6479f 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -227,6 +228,7 @@ public:
 void testTdf104492();
 void testTdf105417();
 void testTdf105625();
+void testMsWordCompTrailingBlanks();
 
 CPPUNIT_TEST_SUITE(SwUiWriterTest);
 CPPUNIT_TEST(testReplaceForward);
@@ -348,6 +350,7 @@ public:
 CPPUNIT_TEST(testTdf104492);
 CPPUNIT_TEST(testTdf105417);
 CPPUNIT_TEST(testTdf105625);
+CPPUNIT_TEST(testMsWordCompTrailingBlanks);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -4303,6 +4306,38 @@ void SwUiWriterTest::testTdf105625()
 CPPUNIT_ASSERT_EQUAL(nMarksBefore, nMarksAfter + 1);
 }
 
+void SwUiWriterTest::testMsWordCompTrailingBlanks()
+{
+// The option is true in settings.xml
+SwDoc* pDoc = createDoc( "MsWordCompTrailingBlanksTrue.odt" );
+CPPUNIT_ASSERT_EQUAL( true, pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) );
+calcLayout();
+// Check that trailing spaces spans have no width if option is enabled
+
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( 
"/root/page/body/txt[2]/Text[4]", "nWidth" ) );
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( 
"/root/page/body/txt[2]/Text[5]", "nWidth" ) );
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( 
"/root/page/body/txt[3]/Text[4]", "nWidth" ) );
+CPPUNIT_ASSERT_EQUAL( OUString( "" ), parseDump( 
"/root/page/body/txt[3]/Text[5]", "nWidth" ) );
+
+// The option is false in settings.xml
+pDoc = createDoc( "MsWordCompTrailingBlanksFalse.odt" );
+CPPUNIT_ASSERT_EQUAL( false, pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) );
+calcLayout();
+// Check that trailing spaces spans have width if option is disabled
+CPPUNIT_ASSERT( !parseDump( "/root/page/body/txt[2]/Text[4]", "nWidth" 
).isEmpty() );
+CPPUNIT_ASSERT( !parseDump( "/root/page/body/txt[2]/Text[5]", "nWidth" 
).isEmpty() );
+CPPUNIT_ASSERT( !parseDump( "/root/page/body/txt[3]/Text[4]", "nWidth" 
).isEmpty() );
+CPPUNIT_ASSERT( !parseDump( "/root/page/body/txt[3]/Text[5]", "nWidth" 
).isEmpty() );
+
+// MsWordCompTrailingBlanks option should be false by default in new 
documents
+pDoc = createDoc();
+CPPUNIT_ASSERT_EQUAL( false, pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) );
+
+// The option should be true if a .docx, .doc or .rtf document is opened
+pDoc = createDoc( "MsWordCompTrailingBlanks.docx" );
+CPPUNIT_ASSERT_EQUAL( true, pDoc->getIDocumentSettingAccess().get( 
DocumentSettingId::MS_WORD_COMP_TRAILING_BLANKS ) );
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
 CPPUNIT_PLUGIN_IMPLEMENT();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Miklos Vajna
 sw/source/filter/ww8/rtfexportfilter.cxx |4 +-
 sw/source/filter/ww8/rtfexportfilter.hxx |2 -
 writerfilter/source/dmapper/SmartTagHandler.cxx  |4 +-
 writerfilter/source/dmapper/SmartTagHandler.hxx  |2 -
 writerfilter/source/filter/RtfFilter.cxx |6 ++--
 writerfilter/source/filter/WriterFilter.cxx  |4 +-
 writerfilter/source/rtftok/rtfreferencetable.cxx |4 +-
 writerfilter/source/rtftok/rtfreferencetable.hxx |2 -
 writerfilter/source/rtftok/rtfvalue.cxx  |   32 +++
 writerfilter/source/rtftok/rtfvalue.hxx  |   16 +--
 10 files changed, 38 insertions(+), 38 deletions(-)

New commits:
commit 31f4400ea5d41ed11b3aef114950d7b424df6a26
Author: Miklos Vajna 
Date:   Wed Feb 15 10:08:50 2017 +0100

writerfilter: can use std::move() here

Change-Id: I48980ae44cd68b9526d915f877a37f6a559910e5

diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx 
b/sw/source/filter/ww8/rtfexportfilter.cxx
index 5da1c73..a88b179 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -31,8 +31,8 @@
 
 using namespace ::com::sun::star;
 
-RtfExportFilter::RtfExportFilter(const uno::Reference< uno::XComponentContext 
>& xCtx)
-: m_xCtx(xCtx)
+RtfExportFilter::RtfExportFilter(uno::Reference xCtx)
+: m_xCtx(std::move(xCtx))
 {
 }
 
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx 
b/sw/source/filter/ww8/rtfexportfilter.hxx
index 842ac77..473c9b2 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -47,7 +47,7 @@ protected:
 css::uno::Reference m_xCtx;
 css::uno::Reference m_xSrcDoc;
 public:
-explicit RtfExportFilter(const 
css::uno::Reference& xCtx);
+explicit RtfExportFilter(css::uno::Reference 
xCtx);
 virtual ~RtfExportFilter() override;
 
 // XFilter
diff --git a/writerfilter/source/dmapper/SmartTagHandler.cxx 
b/writerfilter/source/dmapper/SmartTagHandler.cxx
index 4b1b308..1d8c8a3 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.cxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.cxx
@@ -35,9 +35,9 @@ namespace dmapper
 
 using namespace ::com::sun::star;
 
-SmartTagHandler::SmartTagHandler(const uno::Reference& 
xComponentContext, const uno::Reference& xTextDocument)
+SmartTagHandler::SmartTagHandler(uno::Reference 
xComponentContext, const uno::Reference& xTextDocument)
 : LoggedProperties("SmartTagHandler"),
-  m_xComponentContext(xComponentContext),
+  m_xComponentContext(std::move(xComponentContext)),
   m_xDocumentMetadataAccess(xTextDocument, uno::UNO_QUERY)
 {
 }
diff --git a/writerfilter/source/dmapper/SmartTagHandler.hxx 
b/writerfilter/source/dmapper/SmartTagHandler.hxx
index a8365a6..6a877cf 100644
--- a/writerfilter/source/dmapper/SmartTagHandler.hxx
+++ b/writerfilter/source/dmapper/SmartTagHandler.hxx
@@ -34,7 +34,7 @@ class SmartTagHandler
 std::vector< std::pair > m_aAttributes;
 
 public:
-SmartTagHandler(const css::uno::Reference& 
xComponentContext, const css::uno::Reference& 
xTextDocument);
+SmartTagHandler(css::uno::Reference 
xComponentContext, const css::uno::Reference& 
xTextDocument);
 virtual ~SmartTagHandler() override;
 
 virtual void lcl_attribute(Id Name, Value& val) override;
diff --git a/writerfilter/source/filter/RtfFilter.cxx 
b/writerfilter/source/filter/RtfFilter.cxx
index a148a2f..34e6e4a 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -52,7 +52,7 @@ class RtfFilter : public cppu::WeakImplHelper
 uno::Reference m_xSrcDoc, m_xDstDoc;
 
 public:
-explicit RtfFilter(const uno::Reference& xContext);
+explicit RtfFilter(uno::Reference xContext);
 
 // XFilter
 sal_Bool SAL_CALL filter(const uno::Sequence& 
rDescriptor) override;
@@ -74,8 +74,8 @@ public:
 
 };
 
-RtfFilter::RtfFilter(const uno::Reference< uno::XComponentContext >& rxContext)
-: m_xContext(rxContext)
+RtfFilter::RtfFilter(uno::Reference xContext)
+: m_xContext(std::move(xContext))
 {
 }
 
diff --git a/writerfilter/source/filter/WriterFilter.cxx 
b/writerfilter/source/filter/WriterFilter.cxx
index cb9b4cf..82c96f4 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -96,8 +96,8 @@ protected:
 uno::Reference m_xSrcDoc, m_xDstDoc;
 
 public:
-explicit WriterFilter(const uno::Reference& 
rxContext)
-: m_xContext(rxContext)
+explicit WriterFilter(uno::Reference xContext)
+: m_xContext(std::move(xContext))
 {}
 
 // XFilter
diff --git a/writerfilter/source/rtftok/rtfreferencetable.cxx 
b/writerfilter/source/rtftok/rtfreferencetable.cxx
index 769321e..a32ceb1 100644
--- a/writerfilter/source/rtftok/rtfreferencetable.cxx
+++ b/writerfilter/source/rtftok/rtfreferencetable.cxx
@@ -14,8 +14,8 @@ namespace writerfilter
 namespace rtftok
 {
 
-RTFReferenceTable::RTFReferenceTa

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

2017-02-15 Thread Xisco Fauli
 sw/source/core/tox/ToxTextGenerator.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit dc8ebf205c3231ffc4d6737b53cee396c2ac0bfd
Author: Xisco Fauli 
Date:   Wed Feb 15 11:06:00 2017 +0100

tdf#104315: Revert "tdf#44282 fix missing space...

... for numbered lists in TOC"

This commit is causing lot of regressions in TOC.
Besides, as the comment says, it's an ugly hack,
so I'd prefer to revert it and find a better solution

This reverts commit 250252d02bac88877845a4bc27e3f1837f1312ba.

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

diff --git a/sw/source/core/tox/ToxTextGenerator.cxx 
b/sw/source/core/tox/ToxTextGenerator.cxx
index 9d6a887..4eaaf8c3 100644
--- a/sw/source/core/tox/ToxTextGenerator.cxx
+++ b/sw/source/core/tox/ToxTextGenerator.cxx
@@ -215,10 +215,7 @@ ToxTextGenerator::GenerateText(SwDoc* pDoc, const 
std::vector
 }
 
 case TOKEN_TEXT:
-{
- if(rText.getLength() > 0) rText = rText.copy(0, 
rText.getLength() - 1);  //Ugly hack to remove default spacing when user 
specifies 
- rText += aToken.sText;
-}
+rText += aToken.sText;
 break;
 
 case TOKEN_PAGE_NUMS:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Caolán McNamara
 sc/inc/sc.hrc |   32 ++--
 1 file changed, 14 insertions(+), 18 deletions(-)

New commits:
commit 54c0b9977a6421ecb7383fa48636075c6ca9967e
Author: Caolán McNamara 
Date:   Wed Feb 15 10:55:10 2017 +

these ooo-build resources were like this to minimize merge conflicts

just roll them into the normal mix now

Change-Id: I65d37ce3067e6d23a7ca42b76a5e15526aefa001

diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index 4d1e380..cd375f8 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1234,35 +1234,31 @@
 
 #define WID_CONDFRMT_REF(SC_DIALOGS_START + 163)
 
-#define SC_DIALOGS_END  (WID_CONDFRMT_REF + 1)
-
-#define MID_1   1
-#define MID_2   2
-#define MID_3   3
-#define MID_4   4
-
-// ooo-build specific resources
-
-#define SC_OOO_BUILD_START  (SC_DIALOGS_END)
-
 // toggle sheet grid
-#define FID_TAB_TOGGLE_GRID (SC_OOO_BUILD_START + 1)
+#define FID_TAB_TOGGLE_GRID (SC_DIALOGS_START + 164)
 
 // formula options page
-#define RID_SCPAGE_FORMULA  (SC_OOO_BUILD_START + 2)
+#define RID_SCPAGE_FORMULA  (SC_DIALOGS_START + 165)
 
 // insert current date and time to cell via command
-#define SID_INSERT_CURRENT_DATE (SC_OOO_BUILD_START + 4)
-#define SID_INSERT_CURRENT_TIME (SC_OOO_BUILD_START + 5)
+#define SID_INSERT_CURRENT_DATE (SC_DIALOGS_START + 166)
+#define SID_INSERT_CURRENT_TIME (SC_DIALOGS_START + 167)
 
 // data Form
-#define SID_DATA_FORM   (SC_OOO_BUILD_START + 7) // menu (in Data 
menu)
+#define SID_DATA_FORM   (SC_DIALOGS_START + 168) // menu (in 
Data menu)
 
 // compatibility options page
-#define RID_SCPAGE_COMPATIBILITY(SC_OOO_BUILD_START + 9)
+#define RID_SCPAGE_COMPATIBILITY(SC_DIALOGS_START + 169)
 
 // init option page
-#define RID_SCPAGE_DEFAULTS (SC_OOO_BUILD_START + 10)
+#define RID_SCPAGE_DEFAULTS (SC_DIALOGS_START + 170)
+
+#define SC_DIALOGS_END  (RID_SCPAGE_DEFAULTS + 1)
+
+#define MID_1   1
+#define MID_2   2
+#define MID_3   3
+#define MID_4   4
 
 #endif
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Noel Grandin
 compilerplugins/clang/unusedenumconstants.py  |3 +
 sc/inc/viewutil.hxx   |2 
 sc/source/filter/excel/excform.cxx|   35 +---
 sc/source/filter/excel/excform8.cxx   |   28 -
 sc/source/filter/excel/frmbase.cxx|4 -
 sc/source/filter/excel/xiname.cxx |4 -
 sc/source/filter/inc/drawingbase.hxx  |7 +-
 sc/source/filter/inc/externallinkbuffer.hxx   |   23 +++
 sc/source/filter/inc/flttypes.hxx |   10 +--
 sc/source/filter/inc/formel.hxx   |   11 +--
 sc/source/filter/inc/formulabase.hxx  |   24 +++-
 sc/source/filter/inc/worksheethelper.hxx  |   13 ++--
 sc/source/filter/lotus/lotimpop.cxx   |8 +-
 sc/source/filter/lotus/lotread.cxx|6 --
 sc/source/filter/lotus/lotus.cxx  |2 
 sc/source/filter/oox/condformatbuffer.cxx |6 +-
 sc/source/filter/oox/drawingbase.cxx  |   21 +--
 sc/source/filter/oox/drawingfragment.cxx  |2 
 sc/source/filter/oox/externallinkbuffer.cxx   |   66 +++---
 sc/source/filter/oox/externallinkfragment.cxx |4 -
 sc/source/filter/oox/formulabase.cxx  |   30 +-
 sc/source/filter/oox/formulaparser.cxx|   40 -
 sc/source/filter/oox/pagesettings.cxx |2 
 sc/source/filter/oox/pivotcachefragment.cxx   |2 
 sc/source/filter/oox/sheetdatacontext.cxx |6 +-
 sc/source/filter/oox/viewsettings.cxx |2 
 sc/source/filter/oox/workbookfragment.cxx |   25 
 sc/source/filter/oox/worksheetfragment.cxx|   15 ++---
 sc/source/filter/oox/worksheethelper.cxx  |2 
 sc/source/filter/qpro/qpro.cxx|2 
 sc/source/filter/qpro/qproform.cxx|   12 ++--
 sc/source/filter/xcl97/XclImpChangeTrack.cxx  |2 
 sc/source/ui/docshell/impex.cxx   |   62 +++--
 sc/source/ui/inc/gridwin.hxx  |4 -
 sc/source/ui/inc/tabview.hxx  |2 
 sc/source/ui/view/gridwin.cxx |   26 ++---
 sc/source/ui/view/gridwin3.cxx|   11 ---
 sc/source/ui/view/gridwin4.cxx|   35 ++--
 sc/source/ui/view/select.cxx  |2 
 sc/source/ui/view/tabview2.cxx|2 
 sc/source/ui/view/tabview3.cxx|   75 --
 sc/source/ui/view/tabview4.cxx|8 +-
 sc/source/ui/view/tabvwsh5.cxx|2 
 43 files changed, 277 insertions(+), 371 deletions(-)

New commits:
commit e5a71788c7740c70cf610bcb6d67f7bc8b806761
Author: Noel Grandin 
Date:   Wed Feb 15 12:14:10 2017 +0200

convert ScUpdateMode to scoped enum

and drop unused SC_UPDATE_CHANGED.

I can't find anything in our git history to even indicate when it was
last in use.

Change-Id: Iec6192a3d02132d15b3f392264e81f36b1fd4fad

diff --git a/sc/inc/viewutil.hxx b/sc/inc/viewutil.hxx
index bbccd75..2819ace 100644
--- a/sc/inc/viewutil.hxx
+++ b/sc/inc/viewutil.hxx
@@ -35,7 +35,7 @@ class ScAddress;
 class ScRange;
 class ScMarkData;
 enum class SvtScriptType;
-enum ScUpdateMode { SC_UPDATE_ALL, SC_UPDATE_CHANGED, SC_UPDATE_MARKS };
+enum class ScUpdateMode { All, Marks };
 
 class SC_DLLPUBLIC ScViewUtil
 {
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index dff2da7..d8217c5 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -253,7 +253,7 @@ class ScGridWindow : public vcl::Window, public 
DropTargetHelper, public DragSou
 SdrObject*  GetEditObject();
 boolIsMyModel(SdrEditView* pSdrView);
 
-voidDrawRedraw( ScOutputData& rOutputData, ScUpdateMode eMode, 
sal_uLong nLayer );
+voidDrawRedraw( ScOutputData& rOutputData, sal_uLong nLayer );
 voidDrawSdrGrid( const Rectangle& rDrawingRect, OutputDevice* 
pContentDev );
 voidDrawAfterScroll();
 Rectangle   GetListValButtonRect( const ScAddress& rButtonPos );
@@ -374,7 +374,7 @@ public:
   ScUpdateMode eMode );
 
 /// Draw content of the gridwindow; shared between the desktop and the 
tiled rendering.
-void DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableInfo, 
ScOutputData& aOutputData, bool bLogicText, ScUpdateMode eMode);
+void DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableInfo, 
ScOutputData& aOutputData, bool bLogicText);
 
 voidCreateAnchorHandle(SdrHdlList& rHdl, const ScAddress& 
rAddress);
 
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index d7c659e..3d7d54a 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -451,7 +451,7 @@ public:
 // Zeichnen
 
 voidPaintArea( SCCOL nStartCol, SCROW nStartRow, SCCOL 
nEndCol, SC

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

2017-02-15 Thread Caolán McNamara
 sc/source/core/data/global.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit ccd6ed5e3b3978822c00020fbc6baeb4af6628a5
Author: Caolán McNamara 
Date:   Wed Feb 15 10:19:17 2017 +

no need to check pRscString on every iteration

Change-Id: Icfcf2ca8efbaeaaa8fdddaa57496622a113027f7

diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 4e58714..7ff840b 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -599,10 +599,13 @@ void ScGlobal::Clear()
 DELETEZ(pAddInCollection);
 DELETEZ(pUserList);
 
-for( sal_uInt16 nC = 0 ; nC < SC_GLOBSTR_STR_COUNT ; nC++ )
-if( ppRscString ) delete ppRscString[ nC ];
-delete[] ppRscString;
-ppRscString = nullptr;
+if (ppRscString)
+{
+for (sal_uInt16 nC = 0; nC < SC_GLOBSTR_STR_COUNT; ++nC)
+delete ppRscString[nC];
+delete[] ppRscString;
+ppRscString = nullptr;
+}
 
 DELETEZ(pStarCalcFunctionList); // Destroy before ResMgr!
 DELETEZ(pStarCalcFunctionMgr);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Caolán McNamara
 cui/source/tabpages/measure.cxx   |  154 +-
 include/svx/sxmtpitm.hxx  |   33 ++-
 svx/source/sdr/contact/viewcontactofsdrmeasureobj.cxx |   16 -
 svx/source/svdraw/svdattr.cxx |5 
 svx/source/svdraw/svdomeas.cxx|   78 -
 5 files changed, 147 insertions(+), 139 deletions(-)

New commits:
commit 933c85431d57139a60751b4132155f42d62da64b
Author: Caolán McNamara 
Date:   Wed Feb 15 09:52:27 2017 +

replace SdrMeasureTextVPos with css::drawing::MeasureTextVertPos

cause we freely cast from SdrMeasureTextVPos to MeasureTextVertPos and
since...

commit b0a23c4c35f90ce3cf6a18a37fe141eb33cd5c57
Date:   Mon Feb 13 11:06:07 2017 +0200

remove unused BreakedLine enumerator from SdrMeasureTextVPos

the numbers don't match eachother anymore

Change-Id: Ie4a22179c5f5b7d08af8c1a973b6c64cda83681d

diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index de10555..289f992 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -339,7 +339,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 // Position
 if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTVPOS ) != 
SfxItemState::DONTCARE )
 {
-SdrMeasureTextVPos eVPos = (SdrMeasureTextVPos)
+css::drawing::MeasureTextVertPos eVPos =
 static_cast( rAttrs->Get( 
SDRATTR_MEASURETEXTVPOS ) ).GetValue();
 {
 if ( rAttrs->GetItemState( SDRATTR_MEASURETEXTHPOS ) != 
SfxItemState::DONTCARE )
@@ -352,7 +352,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 RectPoint eRP = RectPoint::MM;
 switch( eVPos )
 {
-case SdrMeasureTextVPos::Above:
+case css::drawing::MeasureTextVertPos_EAST:
 switch( eHPos )
 {
 case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:eRP 
= RectPoint::LT; break;
@@ -362,7 +362,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 default: break;
 }
 break;
-case SdrMeasureTextVPos::VerticalCentered:
+case css::drawing::MeasureTextVertPos_CENTERED:
 switch( eHPos )
 {
 case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:eRP 
= RectPoint::LM; break;
@@ -372,7 +372,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 default: break;
 }
 break;
-case SdrMeasureTextVPos::Below:
+case css::drawing::MeasureTextVertPos_WEST:
 switch( eHPos )
 {
 case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:eRP 
= RectPoint::LB; break;
@@ -382,7 +382,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 default: break;
 }
 break;
-case SdrMeasureTextVPos::Auto:
+case css::drawing::MeasureTextVertPos_AUTO:
 switch( eHPos )
 {
 case css::drawing::MeasureTextHorzPos_LEFTOUTSIDE:eRP 
= RectPoint::LM; break;
@@ -403,7 +403,7 @@ void SvxMeasurePage::Reset( const SfxItemSet* rAttrs )
 nState = CTL_STATE::NOHORZ;
 }
 
-if( eVPos == SdrMeasureTextVPos::Auto )
+if (eVPos == css::drawing::MeasureTextVertPos_AUTO)
 {
 m_pTsbAutoPosV->SetState( TRISTATE_TRUE );
 nState |= CTL_STATE::NOVERT;
@@ -522,42 +522,41 @@ bool SvxMeasurePage::FillItemSet( SfxItemSet* rAttrs)
 if( bPositionModified )
 {
 // Position
-SdrMeasureTextVPos eVPos, eOldVPos;
+css::drawing::MeasureTextVertPos eVPos, eOldVPos;
 css::drawing::MeasureTextHorzPos eHPos, eOldHPos;
 
 RectPoint eRP = m_pCtlPosition->GetActualRP();
 switch( eRP )
 {
 default:
-case RectPoint::LT: eVPos = SdrMeasureTextVPos::Above;
+case RectPoint::LT: eVPos = css::drawing::MeasureTextVertPos_EAST;
 eHPos = css::drawing::MeasureTextHorzPos_LEFTOUTSIDE; 
break;
-case RectPoint::LM: eVPos = SdrMeasureTextVPos::VerticalCentered;
+case RectPoint::LM: eVPos = 
css::drawing::MeasureTextVertPos_CENTERED;
 eHPos = css::drawing::MeasureTextHorzPos_LEFTOUTSIDE; 
break;
-case RectPoint::LB: eVPos = SdrMeasureTextVPos::Below;
+case RectPoint::LB: eVPos = css::drawing::MeasureTextVertPos_WEST;
 eHPos = css::drawing::MeasureTextHorzPos_LEFTOUTSIDE; 
break;
-case RectPoint::MT: eVPos =

[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - basctl/source

2017-02-15 Thread Julien Nabet
 basctl/source/basicide/moduldlg.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit effeccd268305a2d3537cc89e4e35f682505afcb
Author: Julien Nabet 
Date:   Tue Feb 14 21:00:45 2017 +0100

tdf#105386: crash with macro organizer

bt part:
0  SvTreeList::GetParent (this=0x560670dd2e40, pEntry=pEntry@entry=0x0) at 
/home/julien/lo/libreoffice/svtools/source/contnr/treelist.cxx:1693
1  0x7fd90573298c in SvTreeListBox::GetParent 
(this=this@entry=0x560670dd0d60, pEntry=pEntry@entry=0x0)
at /home/julien/lo/libreoffice/svtools/source/contnr/treelistbox.cxx:779
2  0x7fd8dfc3b4d8 in basctl::ExtTreeListBox::NotifyAcceptDrop 
(this=0x560670dd0d60, pEntry=0x560670e90b20)
at /home/julien/lo/libreoffice/basctl/source/basicide/moduldlg.cxx:180

Change-Id: I033440c1fcc50e2c7a0bb1eed0efa4559c514126
Reviewed-on: https://gerrit.libreoffice.org/34280
Tested-by: Jenkins 
Reviewed-by: Julien Nabet 
(cherry picked from commit 18be4782ad4a98041d9680f8d76a213b8fd49362)
Reviewed-on: https://gerrit.libreoffice.org/34287
Reviewed-by: Katarina Behrens 

diff --git a/basctl/source/basicide/moduldlg.cxx 
b/basctl/source/basicide/moduldlg.cxx
index 4d4df19..6618253 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -177,7 +177,9 @@ bool ExtTreeListBox::NotifyAcceptDrop( SvTreeListEntry* 
pEntry )
 
 // don't drop in the same library
 SvTreeListEntry* pSelected = FirstSelected();
-if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
+if (!pSelected)
+bValid = false;
+else if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
 bValid = false;
 else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected 
) ) )
 bValid = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: writerperfect/CppunitTest_writerperfect_wpftimport.mk

2017-02-15 Thread David Tardon
 writerperfect/CppunitTest_writerperfect_wpftimport.mk |3 ---
 1 file changed, 3 deletions(-)

New commits:
commit 2c9c5476d41cf379dae01423c28130845c557ced
Author: David Tardon 
Date:   Wed Feb 15 10:19:31 2017 +0100

disable these for now

Change-Id: Ic9b1283fa1c03e18047781f2a032c994cfc669c9

diff --git a/writerperfect/CppunitTest_writerperfect_wpftimport.mk 
b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
index fb86265..cb2c2c5 100644
--- a/writerperfect/CppunitTest_writerperfect_wpftimport.mk
+++ b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
@@ -44,9 +44,6 @@ $(eval $(call 
gb_CppunitTest_use_rdbs,writerperfect_wpftimport,\
 $(eval $(call gb_CppunitTest_use_configuration,writerperfect_wpftimport))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_wpftimport,\
-   writerperfect/qa/unit/DrawImportTest \
-   writerperfect/qa/unit/ImpressImportTest \
-   writerperfect/qa/unit/SpreadsheetImportTest \
writerperfect/qa/unit/TextImportTest \
writerperfect/qa/unit/wpftimport \
 ))
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 5 commits - sd/source writerperfect/CppunitTest_writerperfect_wpftimport.mk writerperfect/inc writerperfect/qa writerperfect/source

2017-02-15 Thread David Tardon
 sd/source/ui/slidesorter/view/SlsTheme.cxx |1 
 writerperfect/CppunitTest_writerperfect_wpftimport.mk  |4 
 writerperfect/inc/DocumentHandlerForOdg.hxx|   31 +++
 writerperfect/inc/DocumentHandlerForOdp.hxx|   31 +++
 writerperfect/inc/DocumentHandlerForOds.hxx|   31 +++
 writerperfect/inc/DocumentHandlerForOdt.hxx|   31 +++
 writerperfect/qa/unit/DrawImportTest.cxx   |  154 +
 writerperfect/qa/unit/ImpressImportTest.cxx|  154 +
 writerperfect/qa/unit/SpreadsheetImportTest.cxx|  137 +++
 writerperfect/source/calc/DocumentHandlerForOds.hxx|   31 ---
 writerperfect/source/draw/DocumentHandlerForOdg.hxx|   31 ---
 writerperfect/source/impress/DocumentHandlerForOdp.hxx |   31 ---
 writerperfect/source/writer/DocumentHandlerForOdt.hxx  |   31 ---
 13 files changed, 573 insertions(+), 125 deletions(-)

New commits:
commit 3f60b31bc08aabd00d6499de5ee7d78ccb3d8f56
Author: David Tardon 
Date:   Wed Feb 15 10:17:39 2017 +0100

WaE: control reaches end of non-void function

Change-Id: I7186d7f6b1e51188e9ff13d654f8dcaa478fb452

diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx 
b/sd/source/ui/slidesorter/view/SlsTheme.cxx
index 1715406..7bc1b98 100644
--- a/sd/source/ui/slidesorter/view/SlsTheme.cxx
+++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx
@@ -182,6 +182,7 @@ ColorData Theme::GetGradientColor (
 case GradientColorClass::Fill1: return rDescriptor.maFillColor1;
 case GradientColorClass::Fill2: return rDescriptor.maFillColor2;
 }
+return 0;
 }
 
 void Theme::SetGradient (
commit cf0fa3bbb0020e6734d5d9fec7ebf99946c94b56
Author: David Tardon 
Date:   Tue Feb 14 12:29:10 2017 +0100

test result of presentation document import

Change-Id: I4f7a9867a2fab4c49542a917aef9010e48c9b9b8

diff --git a/writerperfect/CppunitTest_writerperfect_wpftimport.mk 
b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
index 4cf414d..fb86265 100644
--- a/writerperfect/CppunitTest_writerperfect_wpftimport.mk
+++ b/writerperfect/CppunitTest_writerperfect_wpftimport.mk
@@ -45,6 +45,7 @@ $(eval $(call 
gb_CppunitTest_use_configuration,writerperfect_wpftimport))
 
 $(eval $(call gb_CppunitTest_add_exception_objects,writerperfect_wpftimport,\
writerperfect/qa/unit/DrawImportTest \
+   writerperfect/qa/unit/ImpressImportTest \
writerperfect/qa/unit/SpreadsheetImportTest \
writerperfect/qa/unit/TextImportTest \
writerperfect/qa/unit/wpftimport \
diff --git a/writerperfect/qa/unit/ImpressImportTest.cxx 
b/writerperfect/qa/unit/ImpressImportTest.cxx
new file mode 100644
index 000..c6a128c
--- /dev/null
+++ b/writerperfect/qa/unit/ImpressImportTest.cxx
@@ -0,0 +1,154 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+#include "DocumentHandlerForOdp.hxx"
+#include "ImportFilter.hxx"
+#include "WpftFilterFixture.hxx"
+#include "WpftLoader.hxx"
+#include "wpftimport.hxx"
+
+namespace
+{
+
+namespace uno = css::uno;
+
+class ImpressImportFilter : public writerperfect::ImportFilter
+{
+public:
+explicit ImpressImportFilter(const uno::Reference< uno::XComponentContext 
> &rxContext)
+: writerperfect::ImportFilter(rxContext) {}
+
+// XServiceInfo
+virtual rtl::OUString SAL_CALL getImplementationName() override;
+virtual sal_Bool SAL_CALL supportsService(const rtl::OUString 
&ServiceName) override;
+virtual uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() 
override;
+
+private:
+virtual bool doDetectFormat(librevenge::RVNGInputStream &rInput, 
rtl::OUString &rTypeName) override;
+virtual bool doImportDocument(librevenge::RVNGInputStream &rInput, 
OdpGenerator &rGenerator, utl::MediaDescriptor &rDescriptor) override;
+
+static void generate(librevenge::RVNGPresentationInterface &rDocument);
+};
+
+bool ImpressImportFilter::doImportDocument(librevenge::RVNGInputStream &, 
OdpGenerator &rGenerator, utl::MediaDescriptor &)
+{
+ImpressImportFilter::generate(rGenerator);
+return true;
+}
+
+bool ImpressImportFilter::doDetectFormat(librevenge::RVNGInputStream &, 
rtl::OUString &rTypeName)
+{
+rTypeName = "WpftDummyText";
+return true;
+}
+
+// XServiceInfo
+rtl::OUString SAL_CALL ImpressImportFilter::getImplementationName()
+{
+return OUString("org.libreoffice.comp.Wpft.QA.ImpressImportFilter");
+}
+
+sal_Bool SAL_CALL ImpressImportFilter::supportsService(const rtl::OUString 
&rServiceName)
+{
+return cppu::supportsService(this, rServi

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

2017-02-15 Thread Caolán McNamara
 sw/source/core/layout/fly.cxx |   21 -
 1 file changed, 8 insertions(+), 13 deletions(-)

New commits:
commit 4e0ac535a96dc461a795d399677123eebf0cf787
Author: Caolán McNamara 
Date:   Wed Feb 15 09:02:23 2017 +

coverity#1400531 Dereference before null check

Change-Id: Iff64a2dd599c6881e92e0cf49a0f535104a49ac1

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 383ef52..02b32b0 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -437,12 +437,7 @@ void SwFlyFrame::FinitDrawObj()
 }
 }
 }
-if(!pFormat)
-{
-GetVirtDrawObj()->SetUserCall(nullptr);
-delete GetVirtDrawObj();
-return;
-}
+
 bool bOtherFramesAround(false);
 SwFlyDrawContact* pContact(nullptr);
 pFormat->CallSwClientNotify(sw::KillDrawHint(this, bOtherFramesAround, 
pContact));
commit 82f65d5753eca4549a4e37285e75315a94e1a863
Author: Caolán McNamara 
Date:   Wed Feb 15 08:58:10 2017 +

coverity#1400529 Unchecked dynamic_cast

Change-Id: I8879fbca5c9a77ec1e21c096ab3323c7a341e709

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 55f1ac2..383ef52 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -667,19 +667,19 @@ bool SwFlyFrame::FrameSizeChg( const SwFormatFrameSize 
&rFrameSize )
 void SwFlyFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rHint)
 {
 SwFrame::SwClientNotify(rMod, rHint);
-if(auto pGetZOrdnerHint = dynamic_cast(&rHint))
+if (auto pGetZOrdnerHint = dynamic_cast(&rHint))
 {
-auto pFormat(dynamic_cast(&rMod));
-if(pFormat->Which() == RES_FLYFRMFMT && 
pFormat->getIDocumentLayoutAccess().GetCurrentViewShell()) // #i11176#
+const auto& rFormat(dynamic_cast(rMod));
+if (rFormat.Which() == RES_FLYFRMFMT && 
rFormat.getIDocumentLayoutAccess().GetCurrentViewShell()) // #i11176#
 pGetZOrdnerHint->m_rnZOrder = GetVirtDrawObj()->GetOrdNum();
 }
-else if(auto pConnectedHint = dynamic_cast(&rHint))
+else if (auto pConnectedHint = dynamic_cast(&rHint))
 {
-auto pFormat(dynamic_cast(&rMod));
-if(!pConnectedHint->m_risConnected && pFormat->Which() == 
RES_FLYFRMFMT && (!pConnectedHint->m_pRoot || pConnectedHint->m_pRoot == 
getRootFrame()))
+const auto& rFormat(dynamic_cast(rMod));
+if (!pConnectedHint->m_risConnected && rFormat.Which() == 
RES_FLYFRMFMT && (!pConnectedHint->m_pRoot || pConnectedHint->m_pRoot == 
getRootFrame()))
 pConnectedHint->m_risConnected = true;
 }
-};
+}
 
 void SwFlyFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2017-02-15 Thread Caolán McNamara
 sc/inc/pch/precompiled_sc.hxx  |1 
 sc/inc/strload.hxx |   45 
--
 sc/source/core/data/global.cxx |   20 +++-
 sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx|1 
 sc/source/ui/StatisticsDialogs/ChiSquareTestDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx   |1 
 sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx|1 
 sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx  |1 
 sc/source/ui/StatisticsDialogs/FTestDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/MatrixComparisonGenerator.cxx   |1 
 sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/RegressionDialog.cxx|1 
 sc/source/ui/StatisticsDialogs/SamplingDialog.cxx  |1 
 sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/TTestDialog.cxx |1 
 sc/source/ui/StatisticsDialogs/ZTestDialog.cxx |1 
 sc/source/ui/cctrl/checklistmenu.cxx   |2 
 sc/source/ui/view/gridwin.cxx  |1 
 sc/source/ui/view/gridwin2.cxx |1 
 22 files changed, 18 insertions(+), 68 deletions(-)

New commits:
commit aff0a1d32242de794ab6bbae3cd35d208cbe876c
Author: Caolán McNamara 
Date:   Tue Feb 14 20:55:11 2017 +

move ScRscStrLoader to its sole use place

Change-Id: I8a5d4a23651868f9f3fa890cb50c0b64f58c63b7

diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx
index 643a525..c5f20e5 100644
--- a/sc/inc/pch/precompiled_sc.hxx
+++ b/sc/inc/pch/precompiled_sc.hxx
@@ -440,7 +440,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
diff --git a/sc/inc/strload.hxx b/sc/inc/strload.hxx
deleted file mode 100644
index aaff970..000
--- a/sc/inc/strload.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef INCLUDED_SC_INC_STRLOAD_HXX
-#define INCLUDED_SC_INC_STRLOAD_HXX
-
-#include "scresid.hxx"
-#include 
-
-class ScRscStrLoader : public Resource
-{
-public:
-ScRscStrLoader( sal_uInt16 nRsc, sal_uInt16 nStrId ) :
-Resource( ScResId( nRsc ) ), theStr( ScResId( nStrId ) )
-{
-FreeResource();
-}
-
-const OUString& GetString() const { return theStr; }
-
-private:
-OUString theStr;
-};
-
-#define SC_STRLOAD(resource,strid) ScRscStrLoader( resource, strid).GetString()
-
-#endif // INCLUDED_SC_INC_STRLOAD_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 6963bed..4e58714 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -69,7 +69,6 @@
 #include "adiasync.hxx"
 #include "userlist.hxx"
 #include "interpre.hxx"
-#include "strload.hxx"
 #include "docpool.hxx"
 #include "unitconv.hxx"
 #include "compiler.hxx"
@@ -311,6 +310,21 @@ void ScGlobal::SetUserList( const ScUserList* pNewList )
 }
 }
 
+class ScRscStrLoader : public Resource
+{
+public:
+ScRscStrLoader( sal_uInt16 nRsc, sal_uInt16 nStrId ) :
+Resource( ScResId( nRsc ) ), theStr( ScResId( nStrId ) )
+{
+FreeResource();
+}
+
+const OUString& GetString() const { return theStr; }
+
+private:
+OUString theStr;
+};
+
 const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
 {
 assert( nIndex < SC_GLOBSTR_STR_COUNT);
@@ -345,9 +359,9 @@ const OUString& ScGlobal::GetRscString( sal_uInt16 nIndex )
 ;   // nothing
 }
 if (eOp != ocNone)
-ppRscString[ nIndex ] = new OUString( ScCompiler::GetNativeSymbol( 
eOp));
+ppRscString[ nI

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

2017-02-15 Thread brainbreaker
 android/source/res/layout/file_list_item.xml|   19 ++-
 android/source/res/layout/item_recent_files.xml |   16 ++--
 android/source/res/values/dimens.xml|3 +++
 android/source/res/values/themes.xml|2 +-
 4 files changed, 28 insertions(+), 12 deletions(-)

New commits:
commit 36a43c356e33ce97017801dc25f711b576486a11
Author: brainbreaker 
Date:   Sun Feb 12 22:29:21 2017 +0530

Fixed the margins of list items of File Recycler View

Screenshots of the change:-
Before:
1. https://s19.postimg.org/bbs91keyr/Screenshot_20170212_182941.png
2. https://s19.postimg.org/k5j5io1xf/Screenshot_20170212_183334.png
Now:
1. https://s19.postimg.org/4o08spkub/Screenshot_20170212_222359.png
2. https://s19.postimg.org/5p0hhu1tv/Screenshot_20170212_222406.png

Change-Id: I3137ce2648c4dda30d7bbe93245618a83e9048c0
Reviewed-on: https://gerrit.libreoffice.org/34175
Tested-by: Jenkins 
Reviewed-by: Aleksandar Stefanović 
Tested-by: Aleksandar Stefanović 

diff --git a/android/source/res/layout/file_list_item.xml 
b/android/source/res/layout/file_list_item.xml
index 7d703be..a2dcfdb 100644
--- a/android/source/res/layout/file_list_item.xml
+++ b/android/source/res/layout/file_list_item.xml
@@ -9,14 +9,19 @@
 xmlns:tools="http://schemas.android.com/tools";
 android:layout_width="match_parent"
 android:layout_height="48dp"
-android:orientation="horizontal" >
+android:orientation="horizontal"
+android:layout_marginStart="@dimen/list_item_margin"
+android:layout_marginLeft="@dimen/list_item_margin"
+android:layout_marginEnd="@dimen/list_item_margin"
+android:layout_marginRight="@dimen/list_item_margin">
 
 
+android:layout_weight="2"
+android:ellipsize="end"
+android:maxLines="1"/>
 
+android:layout_weight="2"
+android:ellipsize="end"
+android:maxLines="1"/>
 
 
diff --git a/android/source/res/layout/item_recent_files.xml 
b/android/source/res/layout/item_recent_files.xml
index fa966d8..b374ba5 100644
--- a/android/source/res/layout/item_recent_files.xml
+++ b/android/source/res/layout/item_recent_files.xml
@@ -12,23 +12,27 @@
 android:layout_height="48dp"
 android:orientation="horizontal"
 android:background="?android:attr/selectableItemBackground"
+android:layout_marginStart="@dimen/list_item_margin"
+android:layout_marginLeft="@dimen/list_item_margin"
+android:layout_marginEnd="@dimen/list_item_margin"
+android:layout_marginRight="@dimen/list_item_margin"
 tools:ignore="UseCompoundDrawables">
 
 
 
-
-
 
-
-
\ No newline at end of file
+style="@style/ListItemText"
+android:maxLines="1"
+android:ellipsize="end"/>
+
diff --git a/android/source/res/values/dimens.xml 
b/android/source/res/values/dimens.xml
index 1e5d771..7c48f2b 100644
--- a/android/source/res/values/dimens.xml
+++ b/android/source/res/values/dimens.xml
@@ -5,4 +5,7 @@
 30dp
 44dp
 2dp
+8dp
+8dp
+32dp
 
diff --git a/android/source/res/values/themes.xml 
b/android/source/res/values/themes.xml
index e5287a8..4036d97 100644
--- a/android/source/res/values/themes.xml
+++ b/android/source/res/values/themes.xml
@@ -8,7 +8,7 @@
 
 center
 @android:color/black
-15sp
+14sp
 
 
 

Support new and discontinue old compilers

2017-02-15 Thread David Ostrovsky

I'm pleased to share with you, that MSVC 15 (aka VS 2017) is up
and running on master: [1].

After fixing the VC++ runtime merge module merging problem in resulted
MSI in MSVC 14.0 and MSVC 15.0, the produced MSI can not only be
installed, but the LO can actually run after the installation. The VC++
Runtime merge module merging bug that started to show up since MSVC
14.0, is appeared to be a trivial problem, that was surprisingly hard
to track down: [2]. I don't want to enter into glory details here as
for why that was the case, but I will write a blog about that one.

That raises the question, if we are ready to move forward and left MSVC
12.0 (aka VS 2013) behind us: [3]. I know, it's always hard to get a
feedback on such questions, as you can see no reaction on this infra
issue: [4]. Needless to say that I asked on IRC too, without any
response, so I guess the only way to get a feedback on that one, is to
merge that change and see, if it's going to be reverted...

* [1] https://gerrit.libreoffice.org/#/c/31279
* [2] https://gerrit.libreoffice.org/#/c/33366/
* [3] https://gerrit.libreoffice.org/#/c/22588/
* [4] https://redmine.documentfoundation.org/issues/2147

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


[Libreoffice-commits] core.git: basic/CppunitTest_basic_macros.mk bridges/inc bridges/source configure.ac external/coinmp external/cppunit external/lcms2 external/libgltf external/python3 scp2/source

2017-02-15 Thread David Ostrovsky
 basic/CppunitTest_basic_macros.mk   |2 
 bridges/inc/except.hxx  |2 
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |2 
 configure.ac|  183 
 external/coinmp/ExternalProject_coinmp.mk   |2 
 external/cppunit/ExternalProject_cppunit.mk |4 
 external/lcms2/ExternalProject_lcms2.mk |5 
 external/libgltf/ExternalProject_libgltf.mk |2 
 external/python3/ExternalProject_python3.mk |8 
 scp2/source/ooo/vc_redist.scp   |   19 ++
 10 files changed, 192 insertions(+), 37 deletions(-)

New commits:
commit b862cbdd345ec57c2595629ded6a3969e1e65d56
Author: David Ostrovsky 
Date:   Wed Nov 23 23:53:55 2016 +0100

Support MSVC 15.0

New compiler changes quite some stuff:

* Compiler detection done based on different registry key
* .NET SDK detection done based on different registry key
* Msbuild installation directory changed
* Merge modules installation directory changed
* SDK number in registry doesn't match the directory name:
  (registry key: 10.0.14393, directory name: 10.0.14393.0)
* Compiler, include and library location directories changed
* Architecture specific directory changed: x64 instead of amd64
* Compiler own include directory must be added with -I option
* To force usage of SDK 10 (8.1 is selected per default) new
  switch WindowsTargetPlatformVersion is passed to msbuild, to
  avoid patching VC project files with this line:
/WindowsTargetPlatformVersion>

Known issues:

* Firebird is broken: http://paste.openstack.org/show/594333

Change-Id: I148d7932aff43bbbd07bd493504df974726234c2
Reviewed-on: https://gerrit.libreoffice.org/31279
Tested-by: Jenkins 
Reviewed-by: David Ostrovsky 

diff --git a/basic/CppunitTest_basic_macros.mk 
b/basic/CppunitTest_basic_macros.mk
index 8d64f40..3435224 100644
--- a/basic/CppunitTest_basic_macros.mk
+++ b/basic/CppunitTest_basic_macros.mk
@@ -42,7 +42,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_macros, \
 ifeq ($(OS),WNT)
 $(eval $(call gb_CppunitTest_use_system_win32_libs,basic_macros, \
oleaut32 \
-   $(if $(filter 140,$(VCVER)),legacy_stdio_definitions) \
+   $(if $(filter 140 150,$(VCVER)),legacy_stdio_definitions) \
odbc32 \
odbccp32 \
 ))
diff --git a/bridges/inc/except.hxx b/bridges/inc/except.hxx
index 32e9113..f1437f3 100644
--- a/bridges/inc/except.hxx
+++ b/bridges/inc/except.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_BRIDGES_INC_EXCEPT_HXX
 #define INCLUDED_BRIDGES_INC_EXCEPT_HXX
 
-#if _MSC_VER >= 1900 // VC 2015 (and later?)
+#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
 // extern "C" void** __cdecl __current_exception()
 // is defined in MSVS14.0/VC/crt/src/vcruntime/frame.cpp:
 // return &__vcrt_getptd()->_curexception;
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
index 8348014..5687c0d 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx
@@ -803,7 +803,7 @@ int mscx_filterCppException(
 if (rethrow && pRecord == pPointers->ExceptionRecord)
 {
 pRecord = *reinterpret_cast< EXCEPTION_RECORD ** >(
-#if _MSC_VER >= 1900 // VC 2015 (and later?)
+#if _MSC_VER >= 1900 // VC 2015/2017 (and later?)
 __current_exception()
 #else
 // Hack to get msvcrt internal _curexception field
diff --git a/configure.ac b/configure.ac
index 244ea87..5982240 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2112,10 +2112,10 @@ libo_FUZZ_ARG_WITH(doxygen,
 ,with_doxygen=yes)
 
 AC_ARG_WITH(visual-studio,
-AS_HELP_STRING([--with-visual-studio=<2013/2015>],
+AS_HELP_STRING([--with-visual-studio=<2013/2015/2017>],
 [Specify which Visual Studio version to use in case several are
  installed. If not specified, only 2013 is detected automatically
- because 2015 support is currently experimental.]),
+ because 2015 and 2017 support is currently experimental.]),
 ,)
 
 AC_ARG_WITH(windows-sdk,
@@ -3288,6 +3288,8 @@ map_vs_year_to_version()
 vsversion=12.0;;
 2015)
 vsversion=14.0;;
+2017)
+vsversion=15.0;;
 *)
 AC_MSG_ERROR([Assertion failure - invalid argument "$1" to 
map_vs_year_to_version()]);;
 esac
@@ -3304,16 +3306,22 @@ vs_versions_to_check()
 map_vs_year_to_version "$1"
 vsversions=$vsversion
 else
-# By default we prefer 2013/2015, in this order
-vsversions="12.0 14.0"
+# By default we prefer 2013/2015/2017, in this order
+vsversions="12.0 14.0 15.0"
 fi
 }
 
 win_get_env_from_vsvars32bat()
 {
 WRAPPERBATCHFILEPATH="`mktemp -t wrpXX.bat`"
+if test $vcnum = "150"; then
+  # Also seems to be loca

[Libreoffice-commits] core.git: 9 commits - compilerplugins/clang sdext/source sd/inc sd/source

2017-02-15 Thread Noel Grandin
 compilerplugins/clang/unusedenumconstants.py  |4 
 sd/inc/CustomAnimationEffect.hxx  |2 
 sd/inc/pres.hxx   |1 
 sd/source/core/CustomAnimationEffect.cxx  |   79 +-
 sd/source/core/sdpage.cxx |1 
 sd/source/ui/accessibility/AccessibleSlideSorterObject.cxx|2 
 sd/source/ui/animations/CustomAnimationPane.cxx   |   36 ++--
 sd/source/ui/func/fucon3d.cxx |2 
 sd/source/ui/func/fuconarc.cxx|2 
 sd/source/ui/func/fuconcs.cxx |2 
 sd/source/ui/func/fuconrec.cxx|2 
 sd/source/ui/func/fuconuno.cxx|2 
 sd/source/ui/func/fuediglu.cxx|2 
 sd/source/ui/func/futext.cxx  |4 
 sd/source/ui/inc/EventMultiplexer.hxx |4 
 sd/source/ui/inc/ToolBarManager.hxx   |   17 --
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx   |5 
 sd/source/ui/sidebar/MasterPageContainer.cxx  |   12 -
 sd/source/ui/sidebar/MasterPageContainer.hxx  |4 
 sd/source/ui/sidebar/MasterPageDescriptor.cxx |6 
 sd/source/ui/sidebar/MasterPagesSelector.cxx  |8 -
 sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx  |7 
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |4 
 sd/source/ui/slidesorter/controller/SlsFocusManager.cxx   |   12 -
 sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx  |8 -
 sd/source/ui/slidesorter/inc/controller/SlsFocusManager.hxx   |   16 --
 sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx   |6 
 sd/source/ui/slidesorter/inc/view/SlsTheme.hxx|5 
 sd/source/ui/slidesorter/view/SlsLayouter.cxx |4 
 sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx   |   21 +-
 sd/source/ui/slidesorter/view/SlsPageObjectPainter.cxx|   26 +--
 sd/source/ui/slidesorter/view/SlsTheme.cxx|   10 -
 sd/source/ui/slidesorter/view/SlsToolTip.cxx  |2 
 sd/source/ui/unoidl/unopage.cxx   |1 
 sd/source/ui/view/ToolBarManager.cxx  |   64 +++-
 sd/source/ui/view/drawview.cxx|1 
 sd/source/ui/view/drviews1.cxx|8 -
 sd/source/ui/view/sdview5.cxx |1 
 sdext/source/presenter/PresenterToolBar.cxx   |1 
 sdext/source/presenter/PresenterToolBar.hxx   |2 
 40 files changed, 149 insertions(+), 247 deletions(-)

New commits:
commit 60542769488cbf31339e86dc2688a064c6e07917
Author: Noel Grandin 
Date:   Wed Feb 15 09:45:57 2017 +0200

convert EValue to scoped enum

and drop unused enumerators

Change-Id: I22629ee4a514053030d7120ee8a8fb8145163fad

diff --git a/sd/inc/CustomAnimationEffect.hxx b/sd/inc/CustomAnimationEffect.hxx
index deda3a4..187437f 100644
--- a/sd/inc/CustomAnimationEffect.hxx
+++ b/sd/inc/CustomAnimationEffect.hxx
@@ -38,7 +38,7 @@ class SdrPathObj;
 
 namespace sd {
 
-enum EValue { VALUE_FROM, VALUE_TO, VALUE_BY, VALUE_FIRST, VALUE_LAST };
+enum class EValue { To, By };
 
 class CustomAnimationEffect;
 
diff --git a/sd/source/core/CustomAnimationEffect.cxx 
b/sd/source/core/CustomAnimationEffect.cxx
index 886700a..230900a 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1151,17 +1151,8 @@ Any CustomAnimationEffect::getProperty( sal_Int32 
nNodeType, const OUString& rAt
 {
 switch( eValue )
 {
-case VALUE_FROM: aProperty = xAnimate->getFrom(); 
break;
-case VALUE_TO:   aProperty = xAnimate->getTo(); 
break;
-case VALUE_BY:   aProperty = xAnimate->getBy(); 
break;
-case VALUE_FIRST:
-case VALUE_LAST:
-{
-Sequence aValues( 
xAnimate->getValues() );
-if( aValues.hasElements() )
-aProperty =  aValues[ eValue == 
VALUE_FIRST ? 0 : aValues.getLength() - 1 ];
-}
-break;
+case EValue::To:   aProperty = xAnimate->getTo(); 
break;
+case EValue::By:   aProperty = xAnimate->getBy(); 
break;
 }
 }
 }
@@ -1200,43 +1