[Libreoffice-commits] core.git: Branch 'feature/gsoc-tiled-rendering' - 153 commits - accessibility/inc avmedia/Library_avmediavlc.mk avmedia/source basegfx/source basic/qa basic/source bin/lo-commit-stat bridges/source chart2/inc chart2/Library_chartcontroller.mk chart2/source chart2/uiconfig chart2/UIConfig_chart2.mk cli_ure/source compilerplugins/clang configmgr/inc configmgr/qa configmgr/source configure.ac connectivity/source cppu/source cui/source dbaccess/CppunitTest_dbaccess_RowSetClones.mk dbaccess/source dictionaries dtrans/source editeng/source extensions/source external/jfreereport external/libcmis filter/CppunitTest_filter_utils.mk filter/Module_filter.mk filter/qa filter/source forms/source fpicker/source framework/inc framework/Library_fwk.mk framework/source framework/util helpcontent2 icon-themes/sifr include/avmedia include/basic include/connectivity include/drawinglayer include/editeng include/framework include/LibreOfficeKit include/linguistic include/osl include/rtl include/s fx2 include/svtools include/svx include/toolkit include/tools include/vcl include/xmloff instsetoo_native/CustomTarget_setup.mk libreofficekit/qa libreofficekit/source linguistic/source offapi/com officecfg/registry package/source postprocess/qa reportdesign/inc reportdesign/source sal/osl sax/source sc/inc sc/Library_sc.mk scp2/source sc/sdi sc/source sd/CppunitTest_sd_export_tests.mk sd/inc sd/source sfx2/source shell/source sot/source svl/source svtools/inc svtools/source svx/Library_svx.mk svx/sdi svx/source sw/inc sw/Library_sw.mk sw/qa sw/sdi sw/source toolkit/inc toolkit/source tools/source UnoControls/source unotools/source uui/source vcl/generic vcl/inc vcl/qa vcl/source vcl/unx vcl/win wizards/com xmloff/inc xmloff/source
Pranav Kant
pranavk at gnome.org
Wed Jul 15 10:51:06 PDT 2015
Rebased ref, commits from common ancestor:
commit d784278cac5d38b92b74640a9d41f070b16220ad
Author: Pranav Kant <pranavk at gnome.org>
Date: Wed Jul 15 23:14:56 2015 +0530
lokdocview: postKeyEvent goes async
Change-Id: I0486fdb5a96b960ebde29d726693acf3d4a02b16
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 50339d7..0a5eca4 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -225,6 +225,35 @@ isEmptyRectangle(const GdkRectangle& rRectangle)
return rRectangle.x == 0 && rRectangle.y == 0 && rRectangle.width == 0 && rRectangle.height == 0;
}
+struct PostKeyCallbackData
+{
+ int m_nType;
+ int m_nCharCode;
+ int m_nKeyCode;
+
+ PostKeyCallbackData(int nType, int nCharCode, int nKeyCode)
+ : m_nType(nType),
+ m_nCharCode(nCharCode),
+ m_nKeyCode(nKeyCode) {}
+};
+
+static void
+postKeyEventFunc(GTask*,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable*)
+{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+
+ PostKeyCallbackData* pCallback = static_cast<PostKeyCallbackData*>(task_data);
+
+ priv->m_pDocument->pClass->postKeyEvent(priv->m_pDocument,
+ pCallback->m_nType,
+ pCallback->m_nCharCode,
+ pCallback->m_nKeyCode);
+}
+
static gboolean
signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
{
@@ -281,10 +310,27 @@ signalKey (GtkWidget* pWidget, GdkEventKey* pEvent)
if (pEvent->state & GDK_SHIFT_MASK)
nKeyCode |= KEY_SHIFT;
+
if (pEvent->type == GDK_KEY_RELEASE)
- priv->m_pDocument->pClass->postKeyEvent(priv->m_pDocument, LOK_KEYEVENT_KEYUP, nCharCode, nKeyCode);
+ {
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
+ PostKeyCallbackData* pCallback = new PostKeyCallbackData(LOK_KEYEVENT_KEYUP,
+ nCharCode,
+ nKeyCode);
+ g_task_set_task_data(task, pCallback, g_free);
+ g_task_run_in_thread(task, postKeyEventFunc);
+ g_object_unref(task);
+ }
else
- priv->m_pDocument->pClass->postKeyEvent(priv->m_pDocument, LOK_KEYEVENT_KEYINPUT, nCharCode, nKeyCode);
+ {
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
+ PostKeyCallbackData* pCallback = new PostKeyCallbackData(LOK_KEYEVENT_KEYINPUT,
+ nCharCode,
+ nKeyCode);
+ g_task_set_task_data(task, pCallback, g_free);
+ g_task_run_in_thread(task, postKeyEventFunc);
+ g_object_unref(task);
+ }
return FALSE;
}
commit 5c586b3a5a9ceab5baf482b02df9e9ac005ccc57
Author: Pranav Kant <pranavk at gnome.org>
Date: Wed Jul 15 22:55:13 2015 +0530
lokdocview: *_set_part() goes async
Change-Id: I172b06ff8054a4d51f93764936071691005f8289
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 9a448fd..50339d7 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1569,11 +1569,28 @@ lok_doc_view_get_part (LOKDocView* pDocView)
return priv->m_pDocument->pClass->getPart( priv->m_pDocument );
}
+static void
+lok_doc_view_set_part_func(GTask*,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable*)
+{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+ int* pPart = static_cast<int*>(task_data);
+
+ priv->m_pDocument->pClass->setPart( priv->m_pDocument, *pPart );
+}
+
SAL_DLLPUBLIC_EXPORT void
lok_doc_view_set_part (LOKDocView* pDocView, int nPart)
{
- LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
- priv->m_pDocument->pClass->setPart( priv->m_pDocument, nPart );
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
+ int* pPart = new int(nPart);
+ g_task_set_task_data(task, pPart, g_free);
+ g_task_run_in_thread(task, lok_doc_view_set_part_func);
+ g_object_unref(task);
+
}
SAL_DLLPUBLIC_EXPORT char*
commit 691193c54a88b28742b4b6080aec9e36264799ca
Author: Pranav Kant <pranavk at gnome.org>
Date: Wed Jul 15 22:46:45 2015 +0530
lokdocview: *_set_partmode() goes async
Change-Id: I1beac707ee5cbf92f2c22493d488106dfde77f31
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index acd4fe1..9a448fd 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1583,12 +1583,28 @@ lok_doc_view_get_part_name (LOKDocView* pDocView, int nPart)
return priv->m_pDocument->pClass->getPartName( priv->m_pDocument, nPart );
}
+static void
+lok_doc_view_set_partmode_func(GTask*,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable*)
+{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+ int* pPartMode = static_cast<int*>(task_data);
+
+ priv->m_pDocument->pClass->setPartMode( priv->m_pDocument, *pPartMode );
+}
+
SAL_DLLPUBLIC_EXPORT void
lok_doc_view_set_partmode(LOKDocView* pDocView,
int nPartMode)
{
- LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
- priv->m_pDocument->pClass->setPartMode( priv->m_pDocument, nPartMode );
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
+ int* pPartMode = new int(nPartMode);
+ g_task_set_task_data(task, pPartMode, g_free);
+ g_task_run_in_thread(task, lok_doc_view_set_partmode_func);
+ g_object_unref(task);
}
static void
commit dfb98bffd606dac701ec93eb9d405d21f57bf1b9
Author: Pranav Kant <pranavk at gnome.org>
Date: Wed Jul 15 22:25:24 2015 +0530
lokdocview: Make *_set_edit() async
Change-Id: I6dd396709f2099d93717a8b78fe8172d84d64494
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 6df8fa0..acd4fe1 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1591,33 +1591,48 @@ lok_doc_view_set_partmode(LOKDocView* pDocView,
priv->m_pDocument->pClass->setPartMode( priv->m_pDocument, nPartMode );
}
-/**
- * lok_doc_view_set_edit:
- * @pDocView: The #LOKDocView instance
- * @bEdit: %TRUE if the pDocView should go in edit mode, %FALSE otherwise
- *
- * Sets the edit-mode for pDocView
- */
-SAL_DLLPUBLIC_EXPORT void
-lok_doc_view_set_edit(LOKDocView* pDocView,
- gboolean bEdit)
+static void
+lok_doc_view_set_edit_func(GTask*,
+ gpointer source_object,
+ gpointer task_data,
+ GCancellable*)
{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
gboolean bWasEdit = priv->m_bEdit;
+ gboolean* pEdit = static_cast<gboolean*>(task_data);
- if (!priv->m_bEdit && bEdit)
+ if (!priv->m_bEdit && *pEdit)
g_info("lok_doc_view_set_edit: entering edit mode");
- else if (priv->m_bEdit && !bEdit)
+ else if (priv->m_bEdit && !*pEdit)
{
g_info("lok_doc_view_set_edit: leaving edit mode");
priv->m_pDocument->pClass->resetSelection(priv->m_pDocument);
}
- priv->m_bEdit = bEdit;
+ priv->m_bEdit = *pEdit;
g_signal_emit(pDocView, doc_view_signals[EDIT_CHANGED], 0, bWasEdit);
gtk_widget_queue_draw(GTK_WIDGET(pDocView));
}
/**
+ * lok_doc_view_set_edit:
+ * @pDocView: The #LOKDocView instance
+ * @bEdit: %TRUE if the pDocView should go in edit mode, %FALSE otherwise
+ *
+ * Sets the edit-mode for pDocView
+ */
+SAL_DLLPUBLIC_EXPORT void
+lok_doc_view_set_edit(LOKDocView* pDocView,
+ gboolean bEdit)
+{
+ GTask* task = g_task_new(pDocView, NULL, NULL, NULL);
+ gboolean* pEdit = new gboolean(bEdit);
+ g_task_set_task_data(task, pEdit, g_free);
+ g_task_run_in_thread(task, lok_doc_view_set_edit_func);
+ g_object_unref(task);
+}
+
+/**
* lok_doc_view_get_edit:
* @pDocView: The #LOKDocView instance
*
@@ -1641,7 +1656,7 @@ struct PostCommandCallbackData
};
static void
-lok_doc_view_post_command_func (GTask* task, gpointer source_object, gpointer task_data, GCancellable*)
+lok_doc_view_post_command_func (GTask*, gpointer source_object, gpointer task_data, GCancellable*)
{
LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
@@ -1664,12 +1679,11 @@ lok_doc_view_post_command (LOKDocView* pDocView,
const char* pCommand,
const char* pArguments)
{
- LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
GTask* task;
PostCommandCallbackData* pCallback = new PostCommandCallbackData(pCommand, pArguments);
task = g_task_new(pDocView, NULL, NULL, NULL);
- g_task_set_task_data(task, pCallback, NULL);
+ g_task_set_task_data(task, pCallback, g_free);
g_task_run_in_thread(task, lok_doc_view_post_command_func);
g_object_unref(task);
}
commit 214080160b09858b3c33bf93802c4e98bf61e40e
Author: Pranav Kant <pranavk at gnome.org>
Date: Sun Jul 12 23:22:51 2015 +0530
lokdocview: Run post_command in another thread
Change-Id: I53871265e4846be61c1e80ef48fc2af59cd4f45d
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 0ab7f6e..6df8fa0 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1630,6 +1630,27 @@ lok_doc_view_get_edit (LOKDocView* pDocView)
return priv->m_bEdit;
}
+struct PostCommandCallbackData
+{
+ const char* m_pCommand;
+ const char* m_pArguments;
+
+ PostCommandCallbackData(const char* pCommand, const char* pArguments)
+ : m_pCommand(pCommand),
+ m_pArguments(pArguments) {}
+};
+
+static void
+lok_doc_view_post_command_func (GTask* task, gpointer source_object, gpointer task_data, GCancellable*)
+{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+
+ PostCommandCallbackData* pCallback = static_cast<PostCommandCallbackData*>(task_data);
+
+ priv->m_pDocument->pClass->postUnoCommand(priv->m_pDocument, pCallback->m_pCommand, pCallback->m_pArguments);
+}
+
/**
* lok_doc_view_post_command:
* @pDocView: the #LOKDocView instance
@@ -1644,7 +1665,13 @@ lok_doc_view_post_command (LOKDocView* pDocView,
const char* pArguments)
{
LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
- priv->m_pDocument->pClass->postUnoCommand(priv->m_pDocument, pCommand, pArguments);
+ GTask* task;
+ PostCommandCallbackData* pCallback = new PostCommandCallbackData(pCommand, pArguments);
+
+ task = g_task_new(pDocView, NULL, NULL, NULL);
+ g_task_set_task_data(task, pCallback, NULL);
+ g_task_run_in_thread(task, lok_doc_view_post_command_func);
+ g_object_unref(task);
}
/**
commit ab66939c92511bf2cfca9d1994e673eae46f0618
Author: Pranav Kant <pranavk at gnome.org>
Date: Sat Jul 11 21:29:53 2015 +0530
gtktiledviewer: Fill whole statusbar with progressbar
We don't have anything yet to put in statusbar. Let progressbar
fill the whole width of statusbar for now.
Change-Id: I4cd8745e997a0d2b917bc5baf358b097174d0df9
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 3b30e53..c6a6817 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -369,6 +369,11 @@ static void changePart( GtkWidget* pSelector, gpointer /* pItem */ )
}
}
+static void removeChildrenFromStatusbar(GtkWidget* children, gpointer)
+{
+ gtk_container_remove(GTK_CONTAINER(pStatusBar), children);
+}
+
static void populatePartModeSelector( GtkComboBoxText* pSelector )
{
gtk_combo_box_text_append_text( pSelector, "Standard" );
@@ -576,8 +581,10 @@ int main( int argc, char* argv[] )
g_signal_connect(pDocView, "load-changed", G_CALLBACK(loadChanged), pProgressBar);
pStatusBar = gtk_statusbar_new ();
+ gtk_container_forall(GTK_CONTAINER(pStatusBar), removeChildrenFromStatusbar, NULL);
gtk_container_add (GTK_CONTAINER(pVBox), pStatusBar);
gtk_container_add (GTK_CONTAINER(pStatusBar), pProgressBar);
+ gtk_widget_set_hexpand(pProgressBar, true);
gtk_widget_show_all( pWindow );
// Hide the findbar by default.
commit fbf5a37fd3352dd1aeac3fd7297bca1afb6b55c7
Author: Pranav Kant <pranavk at gnome.org>
Date: Tue Jul 7 21:16:45 2015 +0530
lokdocview: Emit load-changed signal showing load progress
Change-Id: I69b4c05d12c0c0b2ca6b7d1ad76ed74cc1f4346a
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index af3ba41..3b30e53 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -30,6 +30,7 @@ static int help()
}
static GtkWidget* pDocView;
+static GtkWidget* pStatusBar;
static GtkToolItem* pEnableEditing;
static GtkToolItem* pBold;
static GtkToolItem* pItalic;
@@ -286,6 +287,12 @@ static void signalCommand(LOKDocView* /*pLOKDocView*/, char* pPayload, gpointer
}
}
+static void loadChanged(LOKDocView* /*pLOKDocView*/, gdouble fValue, gpointer pData)
+{
+ GtkWidget* pProgressBar = GTK_WIDGET (pData);
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(pProgressBar), fValue);
+}
+
/// LOKDocView found no search matches -> set the search label accordingly.
static void signalSearch(LOKDocView* /*pLOKDocView*/, char* /*pPayload*/, gpointer /*pData*/)
{
@@ -402,6 +409,8 @@ static void openDocumentCallback (GObject* source_object, GAsyncResult* res, gpo
focusChain = g_list_append( focusChain, pDocView1 );
gtk_container_set_focus_chain ( GTK_CONTAINER (pVBox), focusChain );
+
+ gtk_widget_hide (pStatusBar);
}
int main( int argc, char* argv[] )
@@ -554,6 +563,7 @@ int main( int argc, char* argv[] )
g_signal_connect(pDocView, "part-changed", G_CALLBACK(signalPart), NULL);
g_signal_connect(pDocView, "hyperlink-clicked", G_CALLBACK(signalHyperlink), NULL);
+
// Scrolled window for DocView
pScrolledWindow = gtk_scrolled_window_new(0, 0);
gtk_widget_set_hexpand (pScrolledWindow, TRUE);
@@ -562,6 +572,13 @@ int main( int argc, char* argv[] )
gtk_container_add(GTK_CONTAINER(pScrolledWindow), pDocView);
+ GtkWidget* pProgressBar = gtk_progress_bar_new ();
+ g_signal_connect(pDocView, "load-changed", G_CALLBACK(loadChanged), pProgressBar);
+
+ pStatusBar = gtk_statusbar_new ();
+ gtk_container_add (GTK_CONTAINER(pVBox), pStatusBar);
+ gtk_container_add (GTK_CONTAINER(pStatusBar), pProgressBar);
+
gtk_widget_show_all( pWindow );
// Hide the findbar by default.
gtk_widget_hide(pFindbar);
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index 2812ca0..0ab7f6e 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -40,7 +40,7 @@ struct _LOKDocViewPrivate
{
gchar* m_aLOPath;
gchar* m_aDocPath;
- guint m_nLoadProgress;
+ gdouble m_nLoadProgress;
gboolean m_bIsLoading;
gboolean m_bCanZoomIn;
gboolean m_bCanZoomOut;
@@ -108,6 +108,7 @@ struct _LOKDocViewPrivate
enum
{
+ LOAD_CHANGED,
EDIT_CHANGED,
COMMAND_CHANGED,
SEARCH_NOT_FOUND,
@@ -341,17 +342,20 @@ globalCallback (gpointer pData)
{
case LOK_CALLBACK_STATUS_INDICATOR_START:
{
- priv->m_nLoadProgress = 0;
+ priv->m_nLoadProgress = 0.0;
+ g_signal_emit (pCallback->m_pDocView, doc_view_signals[LOAD_CHANGED], 0, 0.0);
}
break;
case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
{
- priv->m_nLoadProgress = std::stoi(pCallback->m_aPayload);
+ priv->m_nLoadProgress = static_cast<gdouble>(std::stoi(pCallback->m_aPayload)/100.0);
+ g_signal_emit (pCallback->m_pDocView, doc_view_signals[LOAD_CHANGED], 0, priv->m_nLoadProgress);
}
break;
case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
{
- priv->m_nLoadProgress = 100;
+ priv->m_nLoadProgress = 1.0;
+ g_signal_emit (pCallback->m_pDocView, doc_view_signals[LOAD_CHANGED], 0, 1.0);
}
break;
default:
@@ -1069,7 +1073,7 @@ static void lok_doc_view_get_property (GObject* object, guint propId, GValue *va
g_value_set_boolean (value, priv->m_bEdit);
break;
case PROP_LOAD_PROGRESS:
- g_value_set_uint (value, priv->m_nLoadProgress);
+ g_value_set_double (value, priv->m_nLoadProgress);
break;
case PROP_ZOOM:
g_value_set_float (value, priv->m_fZoom);
@@ -1210,11 +1214,11 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
*/
g_object_class_install_property (pGObjectClass,
PROP_LOAD_PROGRESS,
- g_param_spec_int("load-progress",
- "Estimated Load Progress",
- "Whether the content is in edit mode or not",
- 0, 100, 0,
- G_PARAM_READABLE));
+ g_param_spec_double("load-progress",
+ "Estimated Load Progress",
+ "Shows the progress of the document load operation",
+ 0.0, 1.0, 0.0,
+ G_PARAM_READABLE));
/**
* LOKDocView:zoom-level:
@@ -1300,6 +1304,21 @@ static void lok_doc_view_class_init (LOKDocViewClass* pClass)
| G_PARAM_STATIC_STRINGS)));
/**
+ * LOKDocView::load-changed:
+ * @pDocView: the #LOKDocView on which the signal is emitted
+ * @fLoadProgress: the new progress value
+ */
+ doc_view_signals[LOAD_CHANGED] =
+ g_signal_new("load-changed",
+ G_TYPE_FROM_CLASS (pGObjectClass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL,
+ g_cclosure_marshal_VOID__DOUBLE,
+ G_TYPE_NONE, 1,
+ G_TYPE_DOUBLE);
+
+ /**
* LOKDocView::edit-changed:
* @pDocView: the #LOKDocView on which the signal is emitted
* @bEdit: the new edit value of the view
@@ -1403,16 +1422,16 @@ lok_doc_view_open_document_finish (LOKDocView* pDocView, GAsyncResult* res, GErr
{
GTask* task = G_TASK(res);
- g_return_val_if_fail(g_task_is_valid(res, pDocView), NULL);
+ g_return_val_if_fail(g_task_is_valid(res, pDocView), false);
//FIXME: make source_tag workx
//g_return_val_if_fail(g_task_get_source_tag(task) == lok_doc_view_open_document, NULL);
- g_return_val_if_fail(error == NULL || *error == NULL, NULL);
+ g_return_val_if_fail(error == NULL || *error == NULL, false);
return g_task_propagate_boolean(task, error);
}
static void
-lok_doc_view_open_document_func (GTask* task, gpointer source_object, gpointer task_data, GCancellable* cancellable)
+lok_doc_view_open_document_func (GTask* task, gpointer source_object, gpointer /*task_data*/, GCancellable* /*cancellable*/)
{
LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
commit 180c8d83e86f31db47b96786f4de24d16aeae361
Author: Pranav Kant <pranavk at gnome.org>
Date: Mon Jul 6 22:01:30 2015 +0530
lokdocview: Call open_document in another thread
This is to keep the widget responsive during document load.
Change-Id: I81acaffc75ca7deddd6cc2de6abae22d009d40cd
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index 962f9d9..ec28348 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -45,8 +45,15 @@ GtkWidget* lok_doc_view_new (const gchar*
GCancellable *cancellable,
GError **error);
-gboolean lok_doc_view_open_document (LOKDocView* pDocView,
- const gchar* pPath);
+void lok_doc_view_open_document (LOKDocView* pDocView,
+ const gchar* pPath,
+ GCancellable* cancellable,
+ GAsyncReadyCallback callback,
+ gpointer userdata);
+
+gboolean lok_doc_view_open_document_finish (LOKDocView* pDocView,
+ GAsyncResult* res,
+ GError** error);
/// Gets the document the viewer displays.
LibreOfficeKitDocument* lok_doc_view_get_document (LOKDocView* pDocView);
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index ec70a88..af3ba41 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -41,6 +41,7 @@ std::map<std::string, GtkToolItem*> g_aCommandNameToolItems;
bool g_bToolItemBroadcast = true;
static GtkWidget* pVBox;
static GtkComboBoxText* pPartSelector;
+static GtkWidget* pPartModeComboBox;
/// Should the part selector avoid calling lok::Document::setPart()?
static bool g_bPartSelectorBroadcast = true;
GtkWidget* pFindbar;
@@ -291,6 +292,7 @@ static void signalSearch(LOKDocView* /*pLOKDocView*/, char* /*pPayload*/, gpoint
gtk_label_set_text(GTK_LABEL(pFindbarLabel), "Search key not found");
}
+
static void signalPart(LOKDocView* /*pLOKDocView*/, int nPart, gpointer /*pData*/)
{
g_bPartSelectorBroadcast = false;
@@ -380,6 +382,28 @@ static void changePartMode( GtkWidget* pSelector, gpointer /* pItem */ )
}
}
+static void openDocumentCallback (GObject* source_object, GAsyncResult* res, gpointer /*userdata*/)
+{
+ LOKDocView* pDocView1 = LOK_DOC_VIEW (source_object);
+ GError* error = NULL;
+ GList *focusChain = NULL;
+
+ if (!lok_doc_view_open_document_finish(pDocView1, res, &error))
+ {
+ g_warning ("Error occurred while opening the document : %s", error->message);
+ g_error_free (error);
+ }
+
+ populatePartSelector();
+ populatePartModeSelector( GTK_COMBO_BOX_TEXT(pPartModeComboBox) );
+ // Connect these signals after populating the selectors, to avoid re-rendering on setting the default part/partmode.
+ g_signal_connect(G_OBJECT(pPartModeComboBox), "changed", G_CALLBACK(changePartMode), 0);
+ g_signal_connect(G_OBJECT(pPartSelector), "changed", G_CALLBACK(changePart), 0);
+
+ focusChain = g_list_append( focusChain, pDocView1 );
+ gtk_container_set_focus_chain ( GTK_CONTAINER (pVBox), focusChain );
+}
+
int main( int argc, char* argv[] )
{
if( argc < 3 ||
@@ -435,7 +459,7 @@ int main( int argc, char* argv[] )
gtk_toolbar_insert( GTK_TOOLBAR(pToolbar), pSeparator2, -1);
GtkToolItem* pPartModeSelectorToolItem = gtk_tool_item_new();
- GtkWidget* pPartModeComboBox = gtk_combo_box_text_new();
+ pPartModeComboBox = gtk_combo_box_text_new();
gtk_container_add( GTK_CONTAINER(pPartModeSelectorToolItem), pPartModeComboBox );
gtk_toolbar_insert( GTK_TOOLBAR(pToolbar), pPartModeSelectorToolItem, -1 );
@@ -542,21 +566,7 @@ int main( int argc, char* argv[] )
// Hide the findbar by default.
gtk_widget_hide(pFindbar);
- int bOpened = lok_doc_view_open_document( LOK_DOC_VIEW(pDocView), argv[2] );
- if (!bOpened)
- g_error("main: lok_doc_view_open_document() failed");
- assert(lok_doc_view_get_document(LOK_DOC_VIEW(pDocView)));
-
- populatePartSelector();
- populatePartModeSelector( GTK_COMBO_BOX_TEXT(pPartModeComboBox) );
- // Connect these signals after populating the selectors, to avoid re-rendering on setting the default part/partmode.
- g_signal_connect(G_OBJECT(pPartModeComboBox), "changed", G_CALLBACK(changePartMode), 0);
- g_signal_connect(G_OBJECT(pPartSelector), "changed", G_CALLBACK(changePart), 0);
-
- // Make only LOKDocView widget as focussable
- GList *focusChain = NULL;
- focusChain = g_list_append( focusChain, pDocView );
- gtk_container_set_focus_chain ( GTK_CONTAINER (pVBox), focusChain );
+ lok_doc_view_open_document( LOK_DOC_VIEW(pDocView), argv[2], NULL, openDocumentCallback, pDocView );
gtk_main();
diff --git a/libreofficekit/source/gtk/lokdocview.cxx b/libreofficekit/source/gtk/lokdocview.cxx
index bf12ca0..2812ca0 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -108,8 +108,6 @@ struct _LOKDocViewPrivate
enum
{
- LOAD_CHANGED,
- LOAD_FAILED,
EDIT_CHANGED,
COMMAND_CHANGED,
SEARCH_NOT_FOUND,
@@ -337,19 +335,23 @@ static gboolean
globalCallback (gpointer pData)
{
CallbackData* pCallback = static_cast<CallbackData*>(pData);
+ LOKDocViewPrivate* priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pCallback->m_pDocView));
switch (pCallback->m_nType)
{
case LOK_CALLBACK_STATUS_INDICATOR_START:
{
+ priv->m_nLoadProgress = 0;
}
break;
case LOK_CALLBACK_STATUS_INDICATOR_SET_VALUE:
{
+ priv->m_nLoadProgress = std::stoi(pCallback->m_aPayload);
}
break;
case LOK_CALLBACK_STATUS_INDICATOR_FINISH:
{
+ priv->m_nLoadProgress = 100;
}
break;
default:
@@ -1389,15 +1391,30 @@ lok_doc_view_new (const gchar* pPath, GCancellable *cancellable, GError **error)
}
/**
- * lok_doc_view_open_document:
+ * lok_doc_view_open_document_finish:
* @pDocView: The #LOKDocView instance
- * @pPath: The path of the document that #LOKDocView widget should try to open
+ * @res:
+ * @error:
*
* Returns: %TRUE if the document is loaded succesfully, %FALSE otherwise
*/
SAL_DLLPUBLIC_EXPORT gboolean
-lok_doc_view_open_document (LOKDocView* pDocView, const gchar* pPath)
+lok_doc_view_open_document_finish (LOKDocView* pDocView, GAsyncResult* res, GError** error)
+{
+ GTask* task = G_TASK(res);
+
+ g_return_val_if_fail(g_task_is_valid(res, pDocView), NULL);
+ //FIXME: make source_tag workx
+ //g_return_val_if_fail(g_task_get_source_tag(task) == lok_doc_view_open_document, NULL);
+ g_return_val_if_fail(error == NULL || *error == NULL, NULL);
+
+ return g_task_propagate_boolean(task, error);
+}
+
+static void
+lok_doc_view_open_document_func (GTask* task, gpointer source_object, gpointer task_data, GCancellable* cancellable)
{
+ LOKDocView* pDocView = LOK_DOC_VIEW(source_object);
LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
if ( priv->m_pDocument )
@@ -1407,13 +1424,13 @@ lok_doc_view_open_document (LOKDocView* pDocView, const gchar* pPath)
}
priv->m_pOffice->pClass->registerCallback(priv->m_pOffice, globalCallbackWorker, pDocView);
- priv->m_pDocument = priv->m_pOffice->pClass->documentLoad( priv->m_pOffice, pPath );
+ priv->m_pDocument = priv->m_pOffice->pClass->documentLoad( priv->m_pOffice, priv->m_aDocPath );
if ( !priv->m_pDocument )
{
// FIXME: should have a GError parameter and populate it.
char *pError = priv->m_pOffice->pClass->getError( priv->m_pOffice );
fprintf( stderr, "Error opening document '%s'\n", pError );
- return FALSE;
+ g_task_return_new_error(task, 0, 0, pError);
}
else
{
@@ -1438,8 +1455,34 @@ lok_doc_view_open_document (LOKDocView* pDocView, const gchar* pPath)
nDocumentHeightPixels);
gtk_widget_set_can_focus(GTK_WIDGET(pDocView), TRUE);
gtk_widget_grab_focus(GTK_WIDGET(pDocView));
+ g_task_return_boolean (task, true);
}
- return TRUE;
+}
+
+/**
+ * lok_doc_view_open_document:
+ * @pDocView: The #LOKDocView instance
+ * @pPath: The path of the document that #LOKDocView widget should try to open
+ *
+ * Returns: %TRUE if the document is loaded succesfully, %FALSE otherwise
+ */
+SAL_DLLPUBLIC_EXPORT void
+lok_doc_view_open_document (LOKDocView* pDocView,
+ const gchar* pPath,
+ GCancellable* cancellable,
+ GAsyncReadyCallback callback,
+ gpointer userdata)
+{
+ GTask *task;
+ LOKDocViewPrivate *priv = static_cast<LOKDocViewPrivate*>(lok_doc_view_get_instance_private (pDocView));
+ priv->m_aDocPath = g_strdup(pPath);
+
+ task = g_task_new(pDocView, cancellable, callback, userdata);
+ // FIXME: Use source_tag to check the task.
+ //g_task_set_source_tag(task, lok_doc_view_open_document);
+
+ g_task_run_in_thread(task, lok_doc_view_open_document_func);
+ g_object_unref(task);
}
/**
commit bcb1f81668d9b6a6d807ae32d60ccfce0b36ceb5
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 15 18:38:38 2015 +0200
svx, sd, sw: GetPoolDefaultItem() can actually return nullptr
...if you call ResetPoolDefaultItem() first. Crash found by Varun Dhall.
Change-Id: I409484c172fb5843270aee2425844076a008b4df
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index f4eee39..a45bbaa 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -1127,7 +1127,10 @@ void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
case HID_PSEUDOSHEET_SUBTITLE :
{
// Subtitle template
- SvxNumRule* pDefaultRule = static_cast<const SvxNumBulletItem*>( rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
+ SvxNumBulletItem const*const pItem(
+ static_cast<const SvxNumBulletItem*>(
+ rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET)));
+ SvxNumRule *const pDefaultRule = (pItem) ? pItem->GetNumRule() : nullptr;
DBG_ASSERT( pDefaultRule, "Where is my default template? [CL]" );
if(pDefaultRule)
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index bc4f253..dccdbad 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -321,7 +321,10 @@ uno::Any SvxUnoDrawPool::_getPropertyDefault( const comphelper::PropertyMapEntry
SfxItemPool* pPool = getModelPool( true );
const sal_uInt16 nWhich = pPool->GetWhich( (sal_uInt16)pEntry->mnHandle );
const SfxPoolItem *pItem = pPool->GetPoolDefaultItem ( nWhich );
- pItem->QueryValue( aAny, pEntry->mnMemberId );
+ if (pItem)
+ {
+ pItem->QueryValue( aAny, pEntry->mnMemberId );
+ }
return aAny;
}
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 9955b44..5c6e256 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -219,8 +219,11 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName
throw UnknownPropertyException( "Unknown property: " + rPropertyName, static_cast < cppu::OWeakObject * > ( this ) );
Any aRet;
SfxItemPool& rSet (m_pDoc->GetAttrPool());
- const SfxPoolItem *pItem = rSet.GetPoolDefaultItem ( pMap->nWID );
- pItem->QueryValue( aRet, pMap->nMemberId );
+ SfxPoolItem const*const pItem = rSet.GetPoolDefaultItem(pMap->nWID);
+ if (pItem)
+ {
+ pItem->QueryValue( aRet, pMap->nMemberId );
+ }
return aRet;
}
commit 9fb8b3968670645b257982773ece9d9413f404c6
Author: Andrea Gelmini <andrea.gelmini at gelma.net>
Date: Wed Jul 1 08:40:19 2015 +0200
xmloff: ODF import: fix spelling of "extrusion-first-light-level"
The attribute is not imported currently due to the typo, but is exported
with the correct spelling from shapeexport.cxx:4377 with
XML_EXTRUSION_FIRST_LIGHT_LEVEL.
Change-Id: I83d77e7eabbbc961fa4f7faf8e20b47601ba071b
Reviewed-on: https://gerrit.libreoffice.org/16641
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/xmloff/source/draw/EnhancedCustomShapeToken.cxx b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
index c8fa8a8..6803556 100644
--- a/xmloff/source/draw/EnhancedCustomShapeToken.cxx
+++ b/xmloff/source/draw/EnhancedCustomShapeToken.cxx
@@ -57,7 +57,7 @@ static const TokenTable pTokenTableArray[] =
{ "extrusion-light-face", EAS_extrusion_light_face },
{ "extrusion-first-light-harsh", EAS_extrusion_first_light_harsh },
{ "extrusion-second-light-harsh", EAS_extrusion_second_light_harsh },
- { "extrusion-first-light-livel", EAS_extrusion_first_light_level },
+ { "extrusion-first-light-level", EAS_extrusion_first_light_level },
{ "extrusion-second-light-level", EAS_extrusion_second_light_level },
{ "extrusion-first-light-direction", EAS_extrusion_first_light_direction },
{ "extrusion-second-light-direction", EAS_extrusion_second_light_direction },
commit 76772c8016f22eebaee94b190152461a5772405b
Author: Vasily Melenchuk <vasily.melenchuk at cib.de>
Date: Wed Jul 15 13:55:00 2015 +0200
cmis: allow http authentication even when password is empty
Test environment for CMIS server using Apache Chemistry and by
default it has just username without password for authentication.
But libcmis uses authentication only if both username and password
are given.
Corresponding patch is already applied to libcmis master.
Using default patch level 1 for libcmis patches, updated existing patches.
Change-Id: Id77b59324002e47258b6315d7383496fa1e9c6ae
Reviewed-on: https://gerrit.libreoffice.org/17070
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk
index b4b596b..78f11a1 100644
--- a/external/libcmis/UnpackedTarball_cmis.mk
+++ b/external/libcmis/UnpackedTarball_cmis.mk
@@ -11,11 +11,12 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,cmis))
$(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
-$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
+$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,1))
$(eval $(call gb_UnpackedTarball_add_patches,cmis, \
external/libcmis/libcmis-libxml2_compatibility.patch \
external/libcmis/tdf90351.patch \
+ external/libcmis/http_auth.patch \
))
ifeq ($(OS)$(COM),WNTMSC)
diff --git a/external/libcmis/boost-win.patch b/external/libcmis/boost-win.patch
index 7d9508b..33e0aa6 100644
--- a/external/libcmis/boost-win.patch
+++ b/external/libcmis/boost-win.patch
@@ -1,7 +1,7 @@
diff --git src/libcmis/atom-object.cxx src/libcmis/atom-object.cxx
index ce21384..eef8102 100644
---- src/libcmis/atom-object.cxx
-+++ src/libcmis/atom-object.cxx
+--- a/src/libcmis/atom-object.cxx
++++ b/src/libcmis/atom-object.cxx
@@ -30,6 +30,9 @@
#include <locale>
#include <sstream>
@@ -14,8 +14,8 @@ index ce21384..eef8102 100644
#include "atom-document.hxx"
diff --git src/libcmis/object.hxx src/libcmis/object.hxx
index 449bb22..c320f06 100644
---- src/libcmis/object.hxx
-+++ src/libcmis/object.hxx
+--- a/src/libcmis/object.hxx
++++ b/src/libcmis/object.hxx
@@ -36,6 +36,9 @@
#include <stdbool.h>
#endif
@@ -28,8 +28,8 @@ index 449bb22..c320f06 100644
#include <libxml/tree.h>
diff --git src/libcmis/property-type.hxx src/libcmis/property-type.hxx
index 1a8bee9..6ac946c 100644
---- src/libcmis/property-type.hxx
-+++ src/libcmis/property-type.hxx
+--- a/src/libcmis/property-type.hxx
++++ b/src/libcmis/property-type.hxx
@@ -28,6 +28,9 @@
#ifndef _PROPERTY_TYPE_HXX_
#define _PROPERTY_TYPE_HXX_
@@ -42,8 +42,8 @@ index 1a8bee9..6ac946c 100644
diff --git src/libcmis/property.hxx src/libcmis/property.hxx
index f9be04a..2977fb3 100644
---- src/libcmis/property.hxx
-+++ src/libcmis/property.hxx
+--- a/src/libcmis/property.hxx
++++ b/src/libcmis/property.hxx
@@ -31,6 +31,9 @@
#include <libxml/tree.h>
#include <libxml/xmlwriter.h>
@@ -56,8 +56,8 @@ index f9be04a..2977fb3 100644
diff --git src/libcmis/ws-session.cxx src/libcmis/ws-session.cxx
index b906a5a..bf50644 100644
---- src/libcmis/ws-session.cxx
-+++ src/libcmis/ws-session.cxx
+--- a/src/libcmis/ws-session.cxx
++++ b/src/libcmis/ws-session.cxx
@@ -28,6 +28,9 @@
#include <sstream>
@@ -70,8 +70,8 @@ index b906a5a..bf50644 100644
#include <libxml/tree.h>
diff --git src/libcmis/xml-utils.hxx src/libcmis/xml-utils.hxx
index 52853e2..2f80b91 100644
---- src/libcmis/xml-utils.hxx
-+++ src/libcmis/xml-utils.hxx
+--- a/src/libcmis/xml-utils.hxx
++++ b/src/libcmis/xml-utils.hxx
@@ -33,6 +33,9 @@
#include <sstream>
#include <string>
diff --git a/external/libcmis/http_auth.patch b/external/libcmis/http_auth.patch
new file mode 100644
index 0000000..ac5bf0c
--- /dev/null
+++ b/external/libcmis/http_auth.patch
@@ -0,0 +1,26 @@
+From eca14219ea6f63ae10630ee5b4e246eb77db3ccd Mon Sep 17 00:00:00 2001
+From: Vasily Melenchuk <vasily.melenchuk at cib.de>
+Date: Wed, 15 Jul 2015 11:54:52 +0200
+Subject: [PATCH] do not require password to be not empty to use http
+ authentication credentials
+
+---
+ src/libcmis/http-session.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libcmis/http-session.cxx b/src/libcmis/http-session.cxx
+index 49ff258..d3122ea 100644
+--- a/src/libcmis/http-session.cxx
++++ b/src/libcmis/http-session.cxx
+@@ -522,7 +522,7 @@ void HttpSession::httpRunRequest( string url, vector< string > headers, bool red
+ headers_slist = curl_slist_append( headers_slist,
+ m_oauth2Handler->getHttpHeader( ).c_str( ) );
+ }
+- else if ( !getUsername().empty() && !getPassword().empty() )
++ else if ( !getUsername().empty() )
+ {
+ curl_easy_setopt( m_curlHandle, CURLOPT_HTTPAUTH, m_authMethod );
+ #if LIBCURL_VERSION_VALUE >= 0x071301
+--
+1.9.5.msysgit.0
+
diff --git a/external/libcmis/libcmis-libxml2_compatibility.patch b/external/libcmis/libcmis-libxml2_compatibility.patch
index aeb492b..6c4525e 100644
--- a/external/libcmis/libcmis-libxml2_compatibility.patch
+++ b/external/libcmis/libcmis-libxml2_compatibility.patch
@@ -1,6 +1,6 @@
# -*- Mode: Diff -*-
---- src/libcmis/oauth2-providers.cxx
-+++ src/libcmis/oauth2-providers.cxx
+--- a/src/libcmis/oauth2-providers.cxx
++++ b/src/libcmis/oauth2-providers.cxx
@@ -34,6 +34,10 @@
using namespace std;
diff --git a/external/libcmis/tdf90351.patch b/external/libcmis/tdf90351.patch
index 65d630a..0a6156e 100644
--- a/external/libcmis/tdf90351.patch
+++ b/external/libcmis/tdf90351.patch
@@ -14,8 +14,8 @@ response to tell us.
diff --git a/src/libcmis/atom-document.cxx b/src/libcmis/atom-document.cxx
index b7f28b3..49cfd45 100644
---- src/libcmis/atom-document.cxx
-+++ src/libcmis/atom-document.cxx
+--- a/src/libcmis/atom-document.cxx
++++ b/src/libcmis/atom-document.cxx
@@ -280,7 +280,7 @@ libcmis::DocumentPtr AtomDocument::checkOut( ) throw ( libcmis::Exception )
if ( NULL == doc )
throw libcmis::Exception( "Failed to parse object infos" );
@@ -36,8 +36,8 @@ index b7f28b3..49cfd45 100644
refreshImpl( doc );
diff --git a/src/libcmis/atom-folder.cxx b/src/libcmis/atom-folder.cxx
index 7947883..55ac2a9 100644
---- src/libcmis/atom-folder.cxx
-+++ src/libcmis/atom-folder.cxx
+--- a/src/libcmis/atom-folder.cxx
++++ b/src/libcmis/atom-folder.cxx
@@ -170,7 +170,7 @@ libcmis::FolderPtr AtomFolder::createFolder( const PropertyPtrMap& properties )
if ( NULL == doc )
throw libcmis::Exception( "Failed to parse object infos" );
@@ -58,8 +58,8 @@ index 7947883..55ac2a9 100644
libcmis::DocumentPtr newDocument = boost::dynamic_pointer_cast< libcmis::Document >( created );
diff --git a/src/libcmis/atom-session.cxx b/src/libcmis/atom-session.cxx
index ffa93a7..e470884 100644
---- src/libcmis/atom-session.cxx
-+++ src/libcmis/atom-session.cxx
+--- a/src/libcmis/atom-session.cxx
++++ b/src/libcmis/atom-session.cxx
@@ -201,7 +201,7 @@ bool AtomPubSession::setRepository( string repositoryId )
return found;
}
@@ -85,8 +85,8 @@ index ffa93a7..e470884 100644
}
diff --git a/src/libcmis/atom-session.hxx b/src/libcmis/atom-session.hxx
index c887b6d..953aa17 100644
---- src/libcmis/atom-session.hxx
-+++ src/libcmis/atom-session.hxx
+--- a/src/libcmis/atom-session.hxx
++++ b/src/libcmis/atom-session.hxx
@@ -37,6 +37,7 @@ class AtomPubSession : public BaseSession
AtomRepositoryPtr m_repository;
commit fdd391f54e63f5aa4021c5e4156bd29d183b316a
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 15 16:21:41 2015 +0200
xmloff: document that AOO 4.1 has fixed the svg:d 'z' relative bug
Change-Id: I0f62101b7bc9de2281ade3eaaa0a38b16f4ccede
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index e2caee5..e5eb4a6 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1855,8 +1855,8 @@ bool SvXMLImport::needFixPositionAfterZ() const
( ( ( nUPD == 641 ) || ( nUPD == 645 ) || ( nUPD == 680 ) || ( nUPD == 300 ) ||
( nUPD == 310 ) || ( nUPD == 320 ) || ( nUPD == 330 ) || ( nUPD == 340 ) ||
( nUPD == 350 && nBuildId < 202 ) )
- || ( getGeneratorVersion() >= SvXMLImport::AOO_40x // test if AOO 4.x
- && getGeneratorVersion() < SvXMLImport::AOO_4x ) ) )
+ || (getGeneratorVersion() == SvXMLImport::AOO_40x))) // test if AOO 4.0.x
+ // apparently bug was fixed in AOO by i#123433 f15874d8f976f3874bdbcb53429eeefa65c28841
{
bWrongPositionAfterZ = true;
}
commit 0789a1f8d62c2d9859f41473459252e706426c3a
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date: Wed Jul 15 15:33:40 2015 +0200
Make SvxFillAttrBox available outside svx too
Change-Id: I44a4d59cdccaa3bc42e14ca95984f7334e269ea8
diff --git a/include/svx/itemwin.hxx b/include/svx/itemwin.hxx
index 7c03abd..646d646 100644
--- a/include/svx/itemwin.hxx
+++ b/include/svx/itemwin.hxx
@@ -116,7 +116,7 @@ private:
// class SvxFillAttrBox --------------------------------------------------
-class SvxFillAttrBox : public FillAttrLB
+class SVX_DLLPUBLIC SvxFillAttrBox : public FillAttrLB
{
public:
SvxFillAttrBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN | WB_AUTOHSCROLL );
commit 6de7d32df11efe35a3bb6b242ae6197f977af67a
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jul 15 15:18:32 2015 +0200
-Werror,-Wunused-private-field
Change-Id: I7dc6c1db75d38d0fe5ee333d4f6a8697abf59e4b
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
index e1827ae..3f27bf5 100644
--- a/xmloff/inc/XMLChartPropertySetMapper.hxx
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -45,9 +45,6 @@ public:
class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
{
private:
- const OUString msTrue;
- const OUString msFalse;
-
SvXMLExport& mrExport;
com::sun::star::uno::Reference< com::sun::star::chart2::XChartDocument > mxChartDoc;
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 41577bb..bdf6af6 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -195,8 +195,6 @@ XMLChartPropertySetMapper::~XMLChartPropertySetMapper()
XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const rtl::Reference< XMLPropertySetMapper >& rMapper,
SvXMLExport& rExport) :
SvXMLExportPropertyMapper( rMapper ),
- msTrue( GetXMLToken( XML_TRUE )),
- msFalse( GetXMLToken( XML_FALSE )),
mrExport( rExport )
{
// chain draw properties
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index 59a3b42..8945815 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -408,11 +408,6 @@ SdXMLExport::SdXMLExport(
mpPropertySetMapper(0L),
mpPresPagePropsMapper(0L),
mbIsDraw(bIsDraw),
- msZIndex( GetXMLToken(XML_ZINDEX) ),
- msEmptyPres( "IsEmptyPresentationObject" ),
- msModel( "Model" ),
- msStartShape( "StartShape" ),
- msEndShape( "EndShape" ),
msPageLayoutNames( "PageLayoutNames" )
{
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index 7b27f8c..d8311e1 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -115,11 +115,6 @@ class SdXMLExport : public SvXMLExport
bool mbIsDraw;
- const OUString msZIndex;
- const OUString msEmptyPres;
- const OUString msModel;
- const OUString msStartShape;
- const OUString msEndShape;
const OUString msPageLayoutNames;
virtual void _ExportStyles(bool bUsed) SAL_OVERRIDE;
commit f466347a5a054c1705a0a3a453e825f16a01a85d
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jul 15 14:58:27 2015 +0200
sw: remove unused SwUnoTableCrsr::Clone()
Change-Id: Ic41c9fb96bf0d3dc429f1de18b8ce93c50885827
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 32006a4..5506369 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -95,8 +95,6 @@ public:
nsSwCursorSelOverFlags::SELOVER_TOGGLE |
nsSwCursorSelOverFlags::SELOVER_CHANGEPOS )) SAL_OVERRIDE;
- std::shared_ptr<SwUnoCrsr> Clone() const;
-
void MakeBoxSels();
SwCursor& GetSelRing() { return m_aTableSel; }
diff --git a/sw/source/core/unocore/unocrsr.cxx b/sw/source/core/unocore/unocrsr.cxx
index 04f30ce..3aae518 100644
--- a/sw/source/core/unocore/unocrsr.cxx
+++ b/sw/source/core/unocore/unocrsr.cxx
@@ -57,17 +57,6 @@ SwUnoCrsr::~SwUnoCrsr()
}
}
-std::shared_ptr<SwUnoCrsr> SwUnoTableCrsr::Clone() const
-{
- auto pNewCrsr(GetDoc()->CreateUnoCrsr(*GetPoint(), true));
- if(HasMark())
- {
- pNewCrsr->SetMark();
- *pNewCrsr->GetMark() = *GetMark();
- }
- return pNewCrsr;
-}
-
bool SwUnoCrsr::IsReadOnlyAvailable() const
{
return true;
commit a111044babf3ee929baf548b7ad29df0a419293b
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 15 10:49:17 2015 +0200
loplugin:unusedmethods linguistic
Change-Id: I0a2aac4965c444dbd868515549dcc9b1571166cb
Reviewed-on: https://gerrit.libreoffice.org/17067
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/linguistic/hyphdta.hxx b/include/linguistic/hyphdta.hxx
index 5909451..c080f47 100644
--- a/include/linguistic/hyphdta.hxx
+++ b/include/linguistic/hyphdta.hxx
@@ -69,12 +69,6 @@ public:
isAlternativeSpelling()
throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- OUString GetWord() { return aWord; }
- OUString GetHyphenatedWord() { return aHyphenatedWord; }
- sal_Int16 GetLanguage() { return nLanguage; }
- void SetWord( OUString &rTxt ) { aWord = rTxt; }
- void SetHyphenatedWord( OUString &rTxt ) { aHyphenatedWord = rTxt; }
- void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
static com::sun::star::uno::Reference <com::sun::star::linguistic2::XHyphenatedWord> LNG_DLLPUBLIC CreateHyphenatedWord(
const OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos,
const OUString &rHyphenatedWord, sal_Int16 nHyphenPos );
@@ -115,11 +109,6 @@ public:
getHyphenationPositions()
throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
- OUString GetWord() { return aWord; }
- sal_Int16 GetLanguage() { return nLanguage; }
- void SetWord( OUString &rTxt ) { aWord = rTxt; }
- void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
-
static com::sun::star::uno::Reference < com::sun::star::linguistic2::XPossibleHyphens > LNG_DLLPUBLIC CreatePossibleHyphens
(const OUString &rWord, sal_Int16 nLang,
const OUString &rHyphWord,
diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx
index 60556d9..ce618d4 100644
--- a/include/linguistic/lngprophelp.hxx
+++ b/include/linguistic/lngprophelp.hxx
@@ -140,9 +140,6 @@ public:
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface > &
GetEvtObj() const { return xMyEvtObj; }
-
- bool IsIgnoreControlCharacters() const { return bResIsIgnoreControlCharacters; }
- bool IsUseDictionaryList() const { return bResIsUseDictionaryList; }
};
@@ -229,7 +226,6 @@ public:
static sal_Int16 GetDefaultNumberOfSuggestions() { return 16; }
- sal_Int16 GetMaxNumberOfSuggestions() const { return nResMaxNumberOfSuggestions; }
bool IsSpellUpperCase() const { return bResIsSpellUpperCase; }
bool IsSpellWithDigits() const { return bResIsSpellWithDigits; }
bool IsSpellCapitalization() const { return bResIsSpellCapitalization; }
diff --git a/linguistic/source/convdicxml.hxx b/linguistic/source/convdicxml.hxx
index 4276aa5..3828130 100644
--- a/linguistic/source/convdicxml.hxx
+++ b/linguistic/source/convdicxml.hxx
@@ -104,9 +104,8 @@ public:
const com::sun::star::uno::Reference < com::sun::star::xml::sax::XAttributeList > &rxAttrList ) SAL_OVERRIDE;
ConvDic * GetDic() { return pDic; }
- sal_Int16 GetLanguage() const { return nLanguage; }
+ sal_Int16 GetLanguage() const { return nLanguage; }
sal_Int16 GetConversionType() const { return nConversionType; }
- bool GetSuccess() const { return bSuccess; }
void SetLanguage( sal_Int16 nLang ) { nLanguage = nLang; }
void SetConversionType( sal_Int16 nType ) { nConversionType = nType; }
diff --git a/linguistic/source/defs.hxx b/linguistic/source/defs.hxx
index b6eca65..ba67076 100644
--- a/linguistic/source/defs.hxx
+++ b/linguistic/source/defs.hxx
@@ -56,11 +56,6 @@ struct LangSvcEntries
aSvcImplNames[0] = rSvcImplName;
}
- bool IsAlreadyWarned() const { return bAlreadyWarned; }
- void SetAlreadyWarned( bool bVal ) { bAlreadyWarned = bVal; }
- bool IsDoWarnAgain() const { return bDoWarnAgain; }
- void SetDoWarnAgain( bool bVal ) { bDoWarnAgain = bVal; }
-
inline void Clear()
{
aSvcImplNames.realloc(0);
@@ -111,7 +106,6 @@ public:
virtual void SetServiceList( const css::lang::Locale &rLocale, const css::uno::Sequence< OUString > &rSvcImplNames ) = 0;
virtual css::uno::Sequence< OUString > GetServiceList( const css::lang::Locale &rLocale ) const = 0;
- virtual DspType GetDspType() const = 0;
protected:
~LinguDispatcher() {}
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index a489f35..b15acb1 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -1132,14 +1132,6 @@ uno::Sequence< OUString > GrammarCheckingIterator::GetServiceList(
}
-LinguDispatcher::DspType GrammarCheckingIterator::GetDspType() const
-{
- return DSP_GRAMMAR;
-}
-
-
-
-
static OUString GrammarCheckingIterator_getImplementationName() throw()
{
return OUString( "com.sun.star.lingu2.ProofreadingIterator" );
diff --git a/linguistic/source/gciterator.hxx b/linguistic/source/gciterator.hxx
index bb744c1..824b04af 100644
--- a/linguistic/source/gciterator.hxx
+++ b/linguistic/source/gciterator.hxx
@@ -180,7 +180,6 @@ public:
// LinguDispatcher
virtual void SetServiceList( const ::com::sun::star::lang::Locale &rLocale, const ::com::sun::star::uno::Sequence< OUString > &rSvcImplNames ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > GetServiceList( const ::com::sun::star::lang::Locale &rLocale ) const SAL_OVERRIDE;
- virtual DspType GetDspType() const SAL_OVERRIDE;
};
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index 1bf78a3..fc93d5d 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -712,11 +712,4 @@ Sequence< OUString >
}
-LinguDispatcher::DspType HyphenatorDispatcher::GetDspType() const
-{
- return DSP_HYPH;
-}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/hyphdsp.hxx b/linguistic/source/hyphdsp.hxx
index 1c32f83..abb3ed7 100644
--- a/linguistic/source/hyphdsp.hxx
+++ b/linguistic/source/hyphdsp.hxx
@@ -131,8 +131,6 @@ public:
OUString > &rSvcImplNames ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString >
GetServiceList( const ::com::sun::star::lang::Locale &rLocale ) const SAL_OVERRIDE;
- virtual DspType
- GetDspType() const SAL_OVERRIDE;
};
diff --git a/linguistic/source/lngopt.hxx b/linguistic/source/lngopt.hxx
index a026d79..47c95d2 100644
--- a/linguistic/source/lngopt.hxx
+++ b/linguistic/source/lngopt.hxx
@@ -61,9 +61,6 @@ public:
const ::com::sun::star::uno::Sequence< OUString >
GetActiveDics() const { return pData->aActiveDics; }
-
- const ::com::sun::star::uno::Sequence< OUString >
- GetActiveConvDics() const { return pData->aActiveConvDics; }
};
typedef cppu::OMultiTypeInterfaceContainerHelperVar<sal_Int32>
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index a238465..83bfbad 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -846,11 +846,6 @@ Sequence< OUString >
}
-LinguDispatcher::DspType SpellCheckerDispatcher::GetDspType() const
-{
- return DSP_SPELL;
-}
-
void SpellCheckerDispatcher::FlushSpellCache()
{
if (pCache)
diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx
index c88ed24..18ddf27 100644
--- a/linguistic/source/spelldsp.hxx
+++ b/linguistic/source/spelldsp.hxx
@@ -116,7 +116,6 @@ public:
// LinguDispatcher
virtual void SetServiceList( const ::com::sun::star::lang::Locale &rLocale, const ::com::sun::star::uno::Sequence< OUString > &rSvcImplNames ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString > GetServiceList( const ::com::sun::star::lang::Locale &rLocale ) const SAL_OVERRIDE;
- virtual DspType GetDspType() const SAL_OVERRIDE;
void FlushSpellCache();
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 4386f40..2ccb855 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -252,11 +252,4 @@ Sequence< OUString >
}
-LinguDispatcher::DspType ThesaurusDispatcher::GetDspType() const
-{
- return DSP_THES;
-}
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/linguistic/source/thesdsp.hxx b/linguistic/source/thesdsp.hxx
index a633f18..40832d8 100644
--- a/linguistic/source/thesdsp.hxx
+++ b/linguistic/source/thesdsp.hxx
@@ -98,8 +98,6 @@ public:
OUString > &rSvcImplNames ) SAL_OVERRIDE;
virtual ::com::sun::star::uno::Sequence< OUString >
GetServiceList( const ::com::sun::star::lang::Locale &rLocale ) const SAL_OVERRIDE;
- virtual DspType
- GetDspType() const SAL_OVERRIDE;
};
commit d1046e7c3f66e5f3384ee1ef534ef28346702fc6
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 15 10:10:25 2015 +0100
Resolves: tdf#63955 clip 19km long line to some sane limit
Change-Id: If9757a5fa2bb93b56b9cf9f566972f687a4a3a45
Reviewed-on: https://gerrit.libreoffice.org/17036
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
index c0e48b9..b86a9f4 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx
@@ -20,13 +20,14 @@
#include <sdr/contact/viewcontactofsdrpathobj.hxx>
#include <svx/svdopath.hxx>
+#include <svx/svdpage.hxx>
#include <svx/sdr/primitive2d/sdrattributecreator.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
+#include <basegfx/polygon/b2dpolygonclipper.hxx>
#include <sdr/primitive2d/sdrpathprimitive2d.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
-
namespace sdr
{
namespace contact
@@ -82,13 +83,40 @@ namespace sdr
// prepare object transformation and unit polygon (direct model data)
basegfx::B2DHomMatrix aObjectMatrix;
- const bool bIsLine(
+ bool bIsLine(
!aUnitPolyPolygon.areControlPointsUsed()
&& 1 == nPolyCount
&& 2 == aUnitPolyPolygon.getB2DPolygon(0).count());
if(bIsLine)
{
+ const SdrPage* pPage = GetPathObj().GetPage();
+ if (pPage)
+ {
+ //tdf#63955 if we have an extremely long line then clip it
+ //to a very generous range of -1 page width/height vs +1
+ //page width/height to avoid oom and massive churn
+ //generating a huge polygon chain to cover the length in
+ //applyLineDashing if this line is dashed
+ double fPageWidth = pPage->GetWdt();
+ double fPageHeight = pPage->GetHgt();
+ basegfx::B2DRange aClipRange(-fPageWidth, -fPageHeight,
+ fPageWidth*2, fPageHeight*2);
+ aUnitPolyPolygon = basegfx::tools::clipPolyPolygonOnRange(aUnitPolyPolygon,
+ aClipRange, true, true);
+ nPolyCount = ensureGeometry(aUnitPolyPolygon);
+
+ // re-check that we have't been clipped out to oblivion
+ bIsLine =
+ !aUnitPolyPolygon.areControlPointsUsed()
+ && 1 == nPolyCount
+ && 2 == aUnitPolyPolygon.getB2DPolygon(0).count();
+ }
+ }
+
+ if(bIsLine)
+ {
+
// special handling for single line mode (2 points)
const basegfx::B2DPolygon aSubPolygon(aUnitPolyPolygon.getB2DPolygon(0));
const basegfx::B2DPoint aStart(aSubPolygon.getB2DPoint(0));
commit 536051f8862203e0e115a5394a6379acd83cc8fe
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 15 14:04:01 2015 +0200
fix Windows build
after commit 22b094f5d8e1e82375b135abd3a6f99a9a555244
"loplugin:unusedmethods basic"
Change-Id: I7586d2487e47731db93335c3d9969626bf2eb6ab
diff --git a/basic/source/runtime/dllmgr-x64.cxx b/basic/source/runtime/dllmgr-x64.cxx
index 90b2094..d71d9d8 100644
--- a/basic/source/runtime/dllmgr-x64.cxx
+++ b/basic/source/runtime/dllmgr-x64.cxx
@@ -311,7 +311,7 @@ SbError marshal(
case SbxDOUBLE:
case SbxBOOL:
case SbxBYTE:
- add(blob, variable->data(), 8, offset);
+ add(blob, variable->GetValues_Impl(), 8, offset);
break;
case SbxSTRING:
{
commit dffb58131f06fbe1aaeaa7b0d3ebe049d8384593
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Jul 15 15:00:55 2015 +0300
WaE: 'HAVE_FEATURE_GLTF' is not defined, evaluates to 0
Change-Id: I8fec50dcd380fd6bb77672a898c107483298c027
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index f42c05d..0f5699e 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_XMLOFF_SOURCE_DRAW_XIMPSHAP_HXX
#define INCLUDED_XMLOFF_SOURCE_DRAW_XIMPSHAP_HXX
+#include <config_features.h>
+
#include <com/sun/star/io/XOutputStream.hpp>
#include <com/sun/star/document/XActionLockable.hpp>
#include <com/sun/star/container/XIdentifierContainer.hpp>
commit 5325c5b2bd8bae328f57bfda4f1e242b5133c79d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Mon Jul 13 23:33:53 2015 +0200
getFiles refactoring: kde4 part
before:
getFiles retrieves all files with their url
getSelectedFiles just returns getFiles result
after:
getSelectedFiles retrieves all files with their url
getFiles uses getSelectedFiles and truncates to 1 entry if necessary
See http://nabble.documentfoundation.org/Dev-f1639786.html for discussion
Conflicts:
vcl/unx/kde4/KDE4FilePicker.cxx
Change-Id: I56a0e2bc877f93e28f08d5ebaafd1826a92cef8b
Reviewed-on: https://gerrit.libreoffice.org/17025
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/vcl/unx/kde4/KDE4FilePicker.cxx b/vcl/unx/kde4/KDE4FilePicker.cxx
index 9758253..0480189 100644
--- a/vcl/unx/kde4/KDE4FilePicker.cxx
+++ b/vcl/unx/kde4/KDE4FilePicker.cxx
@@ -333,15 +333,9 @@ uno::Sequence< OUString > SAL_CALL KDE4FilePicker::getFiles()
SalYieldMutexReleaser release;
return Q_EMIT getFilesSignal();
}
-
- KUrl::List urls = _dialog->selectedUrls();
- uno::Sequence< OUString > seq( urls.size());
- // multiselection doesn't really work
- // so just retrieve the first url
+ uno::Sequence< OUString > seq = getSelectedFiles();
if (seq.getLength() > 1)
seq.realloc(1);
- if (seq.getLength() == 1)
- seq[0] = toOUString(urls.front().url());
return seq;
}
@@ -352,8 +346,12 @@ uno::Sequence< OUString > SAL_CALL KDE4FilePicker::getSelectedFiles()
SalYieldMutexReleaser release;
return Q_EMIT getSelectedFilesSignal();
}
-
- return getFiles();
+ KUrl::List urls = _dialog->selectedUrls();
+ uno::Sequence< OUString > seq( urls.size());
+ int i = 0;
+ foreach( const KUrl& url, urls )
+ seq[ i++ ]= toOUString( url.url());
+ return seq;
}
void SAL_CALL KDE4FilePicker::appendFilter( const OUString &title, const OUString &filter )
commit adfa89b5ffc3589b3a19a32e707a134cee232429
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jul 15 11:31:18 2015 +0100
check stream state more often for failures
Change-Id: Ie45d858021c3123ec21829cbf4742cf30ce46665
diff --git a/filter/qa/cppunit/data/ras/pass/CVE-2008-1097-1.ras b/filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras
similarity index 100%
rename from filter/qa/cppunit/data/ras/pass/CVE-2008-1097-1.ras
rename to filter/qa/cppunit/data/ras/fail/CVE-2008-1097-1.ras
diff --git a/filter/source/graphicfilter/iras/iras.cxx b/filter/source/graphicfilter/iras/iras.cxx
index 6916daa..5877fa2 100644
--- a/filter/source/graphicfilter/iras/iras.cxx
+++ b/filter/source/graphicfilter/iras/iras.cxx
@@ -54,7 +54,7 @@ private:
bool ImplReadBody(BitmapWriteAccess * pAcc);
bool ImplReadHeader();
- sal_uInt8 ImplGetByte();
+ sal_uInt8 ImplGetByte();
public:
RASReader(SvStream &rRAS);
@@ -174,13 +174,11 @@ bool RASReader::ReadRAS(Graphic & rGraphic)
return mbStatus;
}
-
-
bool RASReader::ImplReadHeader()
{
m_rRAS.ReadInt32(mnWidth).ReadInt32(mnHeight).ReadInt32(mnDepth).ReadInt32(mnImageDatSize).ReadInt32(mnType).ReadInt32(mnColorMapType).ReadInt32(mnColorMapSize);
- if ( mnWidth <= 0 || mnHeight <= 0 || mnImageDatSize <= 0 )
+ if (mnWidth <= 0 || mnHeight <= 0 || mnImageDatSize <= 0 || !m_rRAS.good())
mbStatus = false;
switch ( mnDepth )
@@ -222,7 +220,7 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
switch ( mnDstBitsPerPix )
{
case 1 :
- for ( y = 0; y < mnHeight; y++ )
+ for (y = 0; y < mnHeight && mbStatus; ++y)
{
for ( x = 0; x < mnWidth; x++ )
{
@@ -233,11 +231,13 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
nDat >> ( ( x & 7 ) ^ 7 )) );
}
if (!( ( x - 1 ) & 0x8 ) ) ImplGetByte(); // WORD ALIGNMENT ???
+ if (!m_rRAS.good())
+ mbStatus = false;
}
break;
case 8 :
- for ( y = 0; y < mnHeight; y++ )
+ for (y = 0; y < mnHeight && mbStatus; ++y)
{
for ( x = 0; x < mnWidth; x++ )
{
@@ -245,6 +245,8 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
pAcc->SetPixelIndex( y, x, nDat );
}
if ( x & 1 ) ImplGetByte(); // WORD ALIGNMENT ???
+ if (!m_rRAS.good())
+ mbStatus = false;
}
break;
@@ -253,7 +255,7 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
{
case 24 :
- for ( y = 0; y < mnHeight; y++ )
+ for (y = 0; y < mnHeight && mbStatus; ++y)
{
for ( x = 0; x < mnWidth; x++ )
{
@@ -272,11 +274,13 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
pAcc->SetPixel ( y, x, BitmapColor( nRed, nGreen, nBlue ) );
}
if ( x & 1 ) ImplGetByte(); // WORD ALIGNMENT ???
+ if (!m_rRAS.good())
+ mbStatus = false;
}
break;
case 32 :
- for ( y = 0; y < mnHeight; y++ )
+ for (y = 0; y < mnHeight && mbStatus; ++y)
{
for ( x = 0; x < mnWidth; x++ )
{
@@ -295,6 +299,8 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
}
pAcc->SetPixel ( y, x, BitmapColor( nRed, nGreen, nBlue ) );
}
+ if (!m_rRAS.good())
+ mbStatus = false;
}
break;
}
@@ -307,8 +313,6 @@ bool RASReader::ImplReadBody(BitmapWriteAccess * pAcc)
return mbStatus;
}
-
-
sal_uInt8 RASReader::ImplGetByte()
{
sal_uInt8 nRetVal;
commit 23a0fe78733e6e2598f9267af0da6bf9767c3f73
Author: Tor Lillqvist <tml at collabora.com>
Date: Wed Jul 15 14:51:22 2015 +0300
Clarify documentation of (mis)features of osl_getExecutableFile()
Change-Id: I106b14a8ce2709c11f23eb1d49924c9c5ab51b50
diff --git a/include/osl/process.h b/include/osl/process.h
index ca30046..f1fec50 100644
--- a/include/osl/process.h
+++ b/include/osl/process.h
@@ -335,6 +335,12 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getProcessInfo(
@param strFile [out] the string that receives the executable file path.
@return osl_Process_E_None or does not return.
@see osl_executeProcess
+
+ Ideally this will return the true executable file path as a file:
+ URL, but actually in case something else happens to have been
+ passed as argv[0] to osl_setCommandArgs(), it will return that
+ either as a file URL, or as such in case it doesn't look like an
+ absolute pathname.
*/
SAL_DLLPUBLIC oslProcessError SAL_CALL osl_getExecutableFile(
rtl_uString **strFile);
commit d0090009711cd323678e44323706faf72cba6b7d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 15 13:52:08 2015 +0200
fix Android build
I removed the method in commit
a62129aa632c2d574a6560efc19f9de84aed1670
"loplugin:unusedmethods xmloff"
Change-Id: I0e543b4b9b572f843f68023396d9344c455c2bc1
diff --git a/xmloff/source/draw/ximpshap.hxx b/xmloff/source/draw/ximpshap.hxx
index 08cc0ff..f42c05d 100644
--- a/xmloff/source/draw/ximpshap.hxx
+++ b/xmloff/source/draw/ximpshap.hxx
@@ -530,6 +530,10 @@ public:
// this is called from the parent group for each unparsed attribute in the attribute list
virtual void processAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ) SAL_OVERRIDE;
+
+#if !HAVE_FEATURE_GLTF
+ const OUString& getMimeType() const { return maMimeType; }
+#endif
};
// draw:floating-frame
commit b303f274ab385887bd1e57c6a4e608c8d075b551
Author: Noel Grandin <noel at peralex.com>
Date: Wed Jul 15 10:37:10 2015 +0200
loplugin:unusedmethods drawinglayer
Change-Id: If28de80a09fbc8e72df9e919cce66cf425134d4c
Reviewed-on: https://gerrit.libreoffice.org/17062
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/drawinglayer/attribute/fontattribute.hxx b/include/drawinglayer/attribute/fontattribute.hxx
index 001aa0b..d053e42 100644
--- a/include/drawinglayer/attribute/fontattribute.hxx
+++ b/include/drawinglayer/attribute/fontattribute.hxx
@@ -72,9 +72,6 @@ namespace drawinglayer
FontAttribute& operator=(const FontAttribute& rCandidate);
~FontAttribute();
- // checks if the incarnation is default constructed
- bool isDefault() const;
-
// compare operator
bool operator==(const FontAttribute& rCandidate) const;
diff --git a/include/drawinglayer/attribute/materialattribute3d.hxx b/include/drawinglayer/attribute/materialattribute3d.hxx
index 69dfbc6..7ab2432 100644
--- a/include/drawinglayer/attribute/materialattribute3d.hxx
+++ b/include/drawinglayer/attribute/materialattribute3d.hxx
@@ -63,9 +63,6 @@ namespace drawinglayer
// assignment operator
MaterialAttribute3D& operator=(const MaterialAttribute3D& rCandidate);
- // checks if the incarnation is default constructed
- bool isDefault() const;
-
// compare operator
bool operator==(const MaterialAttribute3D& rCandidate) const;
diff --git a/include/drawinglayer/attribute/sdrlightattribute3d.hxx b/include/drawinglayer/attribute/sdrlightattribute3d.hxx
index a05343c..2db3690 100644
--- a/include/drawinglayer/attribute/sdrlightattribute3d.hxx
+++ b/include/drawinglayer/attribute/sdrlightattribute3d.hxx
@@ -62,9 +62,6 @@ namespace drawinglayer
// assignment operator
Sdr3DLightAttribute& operator=(const Sdr3DLightAttribute& rCandidate);
- // checks if the incarnation is default constructed
- bool isDefault() const;
-
// compare operator
bool operator==(const Sdr3DLightAttribute& rCandidate) const;
diff --git a/include/drawinglayer/attribute/sdrobjectattribute3d.hxx b/include/drawinglayer/attribute/sdrobjectattribute3d.hxx
index 8728235..f1fee75 100644
--- a/include/drawinglayer/attribute/sdrobjectattribute3d.hxx
+++ b/include/drawinglayer/attribute/sdrobjectattribute3d.hxx
@@ -70,9 +70,6 @@ namespace drawinglayer
// assignment operator
Sdr3DObjectAttribute& operator=(const Sdr3DObjectAttribute& rCandidate);
- // checks if the incarnation is default constructed
- bool isDefault() const;
-
// compare operator
bool operator==(const Sdr3DObjectAttribute& rCandidate) const;
diff --git a/include/drawinglayer/geometry/viewinformation2d.hxx b/include/drawinglayer/geometry/viewinformation2d.hxx
index 2358c75..967959f 100644
--- a/include/drawinglayer/geometry/viewinformation2d.hxx
+++ b/include/drawinglayer/geometry/viewinformation2d.hxx
@@ -118,9 +118,6 @@ namespace drawinglayer
/// destructor
~ViewInformation2D();
- // checks if the incarnation is default constructed
- bool isDefault() const;
-
/// assignment operator
ViewInformation2D& operator=(const ViewInformation2D& rCandidate);
diff --git a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
index 91cc44e..8546c6b 100644
--- a/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/graphicprimitive2d.hxx
@@ -77,7 +77,6 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const GraphicObject& getGraphicObject() const { return maGraphicObject; }
const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; }
- bool isTransparent() const;
/// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const SAL_OVERRIDE;
diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
index b511e94..1f6d598 100644
--- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx
+++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx
@@ -63,7 +63,6 @@ namespace drawinglayer
/// allow read access to evtl. useful local parts
const TextLayouterDevice& getTextLayouter() const { return maTextLayouter; }
- const basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& getDecTrans() const { return maDecTrans; }
const TextSimplePortionPrimitive2D& getSource() const { return mrSource; }
public:
diff --git a/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
index a321d90..6b4c922 100644
--- a/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
+++ b/include/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -75,18 +75,6 @@ namespace drawinglayer
const Slice3DVector& getSlices() const;
protected:
- /// local helpers
- void impCreateOutlines(
- const geometry::ViewInformation3D& rViewInformation,
- const basegfx::B3DPolygon& rLoopA,
- const basegfx::B3DPolygon& rLoopB,
- basegfx::B3DPolyPolygon& rTarget) const;
-
- bool impHasCutWith(
- const basegfx::B2DPolygon& rPoly,
- const basegfx::B2DPoint& rStart,
- const basegfx::B2DPoint& rEnd) const;
-
/// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const SAL_OVERRIDE;
diff --git a/include/drawinglayer/processor2d/hittestprocessor2d.hxx b/include/drawinglayer/processor2d/hittestprocessor2d.hxx
index 66bd119..b79187c 100644
--- a/include/drawinglayer/processor2d/hittestprocessor2d.hxx
+++ b/include/drawinglayer/processor2d/hittestprocessor2d.hxx
@@ -83,17 +83,10 @@ namespace drawinglayer
bool bTiledRendering);
virtual ~HitTestProcessor2D();
- /// data write access
- void setUseInvisiblePrimitiveContent(bool bNew)
- {
- if((bool)mbUseInvisiblePrimitiveContent != bNew) mbUseInvisiblePrimitiveContent = bNew;
- }
-
/// data read access
const basegfx::B2DPoint& getDiscreteHitPosition() const { return maDiscreteHitPosition; }
double getDiscreteHitTolerance() const { return mfDiscreteHitTolerance; }
bool getHit() const { return mbHit; }
- bool getHitToleranceUsed() const { return mbHitToleranceUsed; }
bool getUseInvisiblePrimitiveContent() const { return mbUseInvisiblePrimitiveContent;}
bool getHitTextOnly() const { return mbHitTextOnly; }
};
diff --git a/include/drawinglayer/processor3d/cutfindprocessor3d.hxx b/include/drawinglayer/processor3d/cutfindprocessor3d.hxx
index 1d6b76a..23cd58a 100644
--- a/include/drawinglayer/processor3d/cutfindprocessor3d.hxx
+++ b/include/drawinglayer/processor3d/cutfindprocessor3d.hxx
@@ -70,12 +70,6 @@ namespace drawinglayer
const basegfx::B3DPoint& rBack,
bool bAnyHit);
- /// data write access
- void setUseInvisiblePrimitiveContent(bool bNew)
- {
- if((bool)mbUseInvisiblePrimitiveContent != bNew) mbUseInvisiblePrimitiveContent = bNew;
- }
-
/// data read access
const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
bool getAnyHit() const { return mbAnyHit; }
diff --git a/include/drawinglayer/processor3d/geometry2dextractor.hxx b/include/drawinglayer/processor3d/geometry2dextractor.hxx
index 194f38c..a09d5e7 100644
--- a/include/drawinglayer/processor3d/geometry2dextractor.hxx
+++ b/include/drawinglayer/processor3d/geometry2dextractor.hxx
@@ -65,7 +65,6 @@ namespace drawinglayer
// data read access
const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
- const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; }
};
} // end of namespace processor3d
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/texture/texture.hxx b/include/drawinglayer/texture/texture.hxx
index daa0348..69289e1 100644
--- a/include/drawinglayer/texture/texture.hxx
+++ b/include/drawinglayer/texture/texture.hxx
@@ -97,10 +97,6 @@ namespace drawinglayer
virtual void appendTransformationsAndColors(
std::vector< B2DHomMatrixAndBColor >& rEntries,
basegfx::BColor& rOuterColor) = 0;
-
- // data access
- const basegfx::BColor& getStart() const { return maStart; }
- const basegfx::BColor& getEnd() const { return maEnd; }
};
} // end of namespace texture
} // end of namespace drawinglayer
diff --git a/include/drawinglayer/texture/texture3d.hxx b/include/drawinglayer/texture/texture3d.hxx
index 9a033c7..e92eb78 100644
--- a/include/drawinglayer/texture/texture3d.hxx
+++ b/include/drawinglayer/texture/texture3d.hxx
@@ -142,9 +142,6 @@ namespace drawinglayer
virtual ~GeoTexSvxMultiHatch();
virtual void modifyBColor(const basegfx::B2DPoint& rUV, basegfx::BColor& rBColor, double& rfOpacity) const SAL_OVERRIDE;
virtual void modifyOpacity(const basegfx::B2DPoint& rUV, double& rfOpacity) const SAL_OVERRIDE;
-
- // dada access
- bool getFillBackground() const { return mbFillBackground; }
};
} // end of namespace texture
} // end of namespace drawinglayer
commit 269bf161e6904f33dda21e319982bfb119f24592
Author: Noel Grandin <noel at peralex.com>
Date: Tue Jul 14 15:55:09 2015 +0200
loplugin:unusedmethods framework
Change-Id: Ibfeb0ef753a083f458c84f446f0729f05c73e2d6
Reviewed-on: https://gerrit.libreoffice.org/17060
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/framework/inc/classes/filtercache.hxx b/framework/inc/classes/filtercache.hxx
index f194385..f8f1da2 100644
--- a/framework/inc/classes/filtercache.hxx
+++ b/framework/inc/classes/filtercache.hxx
@@ -79,207 +79,6 @@ class FilterCache : private TransactionBase
virtual ~FilterCache();
- void flush( DataContainer::ECFGType eType );
-
- /*-****************************************************************************************************
- @short get the current state of the cache
- @descr Call this methods to get information about the state of the current cache.
- *//*-*****************************************************************************************************/
-
- bool isValidOrRepairable() const;
- bool hasTypes () const;
- bool hasFilters () const;
- bool hasDetectors () const;
- bool hasLoaders () const;
- bool hasContentHandlers () const;
-
- /*-****************************************************************************************************
- @short search routines to find items which match given parameter
- @descr Mostly we search for a type first and get all information about filter, detector and loader
- services from the other configuration tables which are registered for this type.
- These operations support a FindFirst/Next mechanism.
- If you call search...( ... nStartEntry=0 ... ) we search for
- the first entry. If these return a value different from <empty> you can work with these value.
- If found value isn't the right one - you can call search method again.
- DONT'T CHANGE THE VALUE OF "rStartEntry" between two search calls!
- You can use returned value as parameter for getBy...Name() functions of this implementation too!
-
- @attention returned type name is an internal name
- returned filter name is an internal name
- returned loader name is an implementation name of a service
- returned detector name is an implementation name of a service
- @param "sResult", name of found type, filter, ...
- @return true, if search was successful,
- false, otherwise.
-
- @onerror We return false.
- *//*-*****************************************************************************************************/
-
- bool searchType ( const OUString& sURL ,
- const OUString& sMediaType ,
- const OUString& sClipboardFormat ,
- CheckedTypeIterator& aStartEntry ,
- OUString& sResult ) const;
-
- bool searchFilterForType ( const OUString& sInternalTypeName ,
- CheckedStringListIterator& aStartEntry ,
- OUString& sResult ) const;
-
- bool searchDetectorForType ( const OUString& sInternalTypeName ,
- CheckedStringListIterator& aStartEntry ,
- OUString& sResult ) const;
-
- bool searchLoaderForType ( const OUString& sInternalTypeName ,
- CheckedStringListIterator& aStartEntry ,
- OUString& sResult ) const;
-
- bool searchContentHandlerForType ( const OUString& sInternalTypeName ,
- CheckedStringListIterator& aStartEntry ,
- OUString& sResult ) const;
-
- /*-****************************************************************************************************
- @short get all properties of a cache entry by given name
- @descr If you need additional information about our internal cache values
- you can use these methods to get a list of all cached config values
- and subkeys of specified entry.
- @param "sName", name of suspected entry in cache
- @return A structure with valid information if item exists! An empty Any otherwise.
-
- @onerror We return an empty Any.
- *//*-*****************************************************************************************************/
-
- css::uno::Sequence< OUString > getAllTypeNames () const;
- css::uno::Sequence< OUString > getAllFilterNames () const;
- css::uno::Sequence< OUString > getAllDetectorNames () const; // without default detector!
- css::uno::Sequence< OUString > getAllLoaderNames () const; // without default loader!
- css::uno::Sequence< OUString > getAllContentHandlerNames () const;
- css::uno::Sequence< OUString > getAllDetectorNamesWithDefault () const; // default detector is last one!
- css::uno::Sequence< OUString > getAllLoaderNamesWithDefault () const; // default loader is last one!
- OUString getDefaultLoader () const;
-
- css::uno::Sequence< css::beans::PropertyValue > getTypeProperties ( const OUString& sName ) const;
- css::uno::Sequence< css::beans::PropertyValue > getFilterProperties ( const OUString& sName ) const;
- css::uno::Sequence< css::beans::PropertyValue > getDetectorProperties ( const OUString& sName ) const;
- css::uno::Sequence< css::beans::PropertyValue > getLoaderProperties ( const OUString& sName ) const;
- css::uno::Sequence< css::beans::PropertyValue > getContentHandlerProperties ( const OUString& sName ) const;
-
- FileType getType ( const OUString& sName ) const;
- Filter getFilter ( const OUString& sName ) const;
- Detector getDetector ( const OUString& sName ) const;
- Loader getLoader ( const OUString& sName ) const;
- ContentHandler getContentHandler ( const OUString& sName ) const;
-
- bool existsType ( const OUString& sName ) const;
- bool existsFilter ( const OUString& sName ) const;
- bool existsDetector ( const OUString& sName ) const;
- bool existsLoader ( const OUString& sName ) const;
- bool existsContentHandler ( const OUString& sName ) const;
-
- /*-****************************************************************************************************
- @short support special query modes
- @descr Our owner services need sometimes a special mode to query for subsets of our configuration!
- They give us a special query string - we return right values.
-
- @seealso file queries.h
- @seealso class FilterFactory
- @seealso class FrameLoaderFactory
- @seealso class TypeDetection
-
- @param "sName", name of query
- @return A structure with valid information!
-
- @onerror We return an empty result set.
- *//*-*****************************************************************************************************/
-
- css::uno::Any queryFilters( const OUString& sQuery ) const;
-
- /*-****************************************************************************************************
- @short support registration of elements in current configuration
- @descr Use this methods to add or remove items in our configuration files.
- We use the globale configuration to do that ... in fat office "share/config/registry/..."!
-
- *** structure of type properties **********************************************************
-
- PropertyValue.Name PropertyValue.Value Description
- ---------------------------------------------------------------------------------------
- ...
-
- *** structure of filter properties ********************************************************
-
- PropertyValue.Name PropertyValue.Value Description
- ---------------------------------------------------------------------------------------
- "Name" [string] internal name
- "Type" [string] registered for these type
- "UIName" [string] localized name for UI (valid for current locale at runtime!)
- "UINames" [stringlist] assignment of all supported localized names to right locales
- "DocumentService" [string] uno servicename of document services
- "FilterService" [string] uno servicename of filter implementation
- "Flags" [long] describe filter
- "UserData" [stringlist] additional user data (format not fixed!)
- "FileFormatVersion" [long] version numbher of supported files
- "TemplateName" [string] name of template
-
- *** structure of detector properties ******************************************************
-
- PropertyValue.Name PropertyValue.Value Description
- ---------------------------------------------------------------------------------------
- ...
-
- *** structure of loader properties ********************************************************
-
- PropertyValue.Name PropertyValue.Value Description
- ---------------------------------------------------------------------------------------
- ...
- @param "sName" , name of type, filter ...
- @param "lProperties" , values of new type, filter
- @return state of operation as bool
-
- @onerror We return false then.
- *//*-*****************************************************************************************************/
-
- bool addFilter ( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::ElementExistException ,
- css::registry::InvalidRegistryException);
- bool replaceFilter( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
- bool removeFilter ( const OUString& sName ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
-
- bool addType ( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::ElementExistException ,
- css::registry::InvalidRegistryException);
- bool replaceType ( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
- bool removeType ( const OUString& sName ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
-
- bool addDetector ( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::ElementExistException ,
- css::registry::InvalidRegistryException);
- bool replaceDetector( const OUString& sName ,
- const css::uno::Sequence< css::beans::PropertyValue >& lProperties ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
- bool removeDetector ( const OUString& sName ,
- bool bException ) throw(css::container::NoSuchElementException ,
- css::registry::InvalidRegistryException);
-
- bool validateAndRepair();
- bool validateAndRepairTypes();
- bool validateAndRepairFilter();
- bool validateAndRepairDetectors();
- bool validateAndRepairLoader();
- bool validateAndRepairHandler();
-
// private variables
private:
diff --git a/framework/inc/classes/filtercachedata.hxx b/framework/inc/classes/filtercachedata.hxx
index e8d231c..538f683 100644
--- a/framework/inc/classes/filtercachedata.hxx
+++ b/framework/inc/classes/filtercachedata.hxx
@@ -77,8 +77,6 @@ struct FileType
inline FileType ( const FileType& rCopy ) { impl_copy( rCopy ); }
inline ~FileType ( ) { impl_clear(); }
inline FileType& operator= ( const FileType& rCopy ) { return impl_copy( rCopy ); }
- inline void free ( ) { impl_clear(); }
-
private:
@@ -137,8 +135,6 @@ struct Filter
inline Filter ( const Filter& rCopy ) { impl_copy( rCopy ); }
inline ~Filter ( ) { impl_clear(); }
inline Filter& operator= ( const Filter& rCopy ) { return impl_copy( rCopy ); }
- inline void free ( ) { impl_clear(); }
-
private:
@@ -205,8 +201,6 @@ struct Detector
inline Detector ( const Detector& rCopy ) { impl_copy( rCopy ); }
inline ~Detector ( ) { impl_clear(); }
inline Detector& operator= ( const Detector& rCopy ) { return impl_copy( rCopy ); }
- inline void free ( ) { impl_clear(); }
-
private:
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list