[Libreoffice-commits] core.git: 2 commits - scp2/source vcl/unx
Jesús
jcorrius at gmail.com
Tue Apr 30 03:31:28 PDT 2013
scp2/source/base/registryitem_base.scp | 2 +-
scp2/source/calc/registryitem_calc.scp | 8 ++++----
scp2/source/draw/registryitem_draw.scp | 8 ++++----
scp2/source/impress/registryitem_impress.scp | 8 ++++----
scp2/source/math/registryitem_math.scp | 4 ++--
scp2/source/writer/registryitem_writer.scp | 14 +++++++-------
vcl/unx/gtk/app/gtksys.cxx | 12 ++++++++++++
vcl/unx/gtk/window/gtksalframe.cxx | 11 +++++++++++
8 files changed, 45 insertions(+), 22 deletions(-)
New commits:
commit 8d9337326745f3cd3ade623b3c01ad6e8e3e590d
Author: Jesús <jcorrius at gmail.com>
Date: Sat Apr 27 19:26:46 2013 +0200
fdo#35785: LibreOffice is One for now
See developer mailing list for discussion, subject "LibreOffice is one or
several applications?"
Change-Id: I7a4a5a76f980eb458a2b6d4558a553b8508fd990
Reviewed-on: https://gerrit.libreoffice.org/3638
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Tor Lillqvist <tml at iki.fi>
diff --git a/scp2/source/base/registryitem_base.scp b/scp2/source/base/registryitem_base.scp
index d12ea13..bc5e23b 100644
--- a/scp2/source/base/registryitem_base.scp
+++ b/scp2/source/base/registryitem_base.scp
@@ -93,7 +93,7 @@ RegistryItem gid_Regitem_Openoffice_Databasedocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.DatabaseDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Base";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Databasedocument_1_FriendlyTypeName
diff --git a/scp2/source/calc/registryitem_calc.scp b/scp2/source/calc/registryitem_calc.scp
index d5b5af2..6b4ae4f 100644
--- a/scp2/source/calc/registryitem_calc.scp
+++ b/scp2/source/calc/registryitem_calc.scp
@@ -292,7 +292,7 @@ RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarCalcDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starcalcdocument_6_FriendlyTypeName
@@ -406,7 +406,7 @@ RegistryItem gid_Regitem_Soffice_Starcalctemplate_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarCalcTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starcalctemplate_6_FriendlyTypeName
@@ -713,7 +713,7 @@ RegistryItem gid_Regitem_Openoffice_Calcdocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.CalcDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Calcdocument_1_FriendlyTypeName
@@ -919,7 +919,7 @@ RegistryItem gid_Regitem_Openoffice_Calctemplate_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.CalcTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Calc";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Calctemplate_1_FriendlyTypeName
diff --git a/scp2/source/draw/registryitem_draw.scp b/scp2/source/draw/registryitem_draw.scp
index 4e90016..2d8a676 100644
--- a/scp2/source/draw/registryitem_draw.scp
+++ b/scp2/source/draw/registryitem_draw.scp
@@ -292,7 +292,7 @@ RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarDrawDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Stardrawdocument_6_FriendlyTypeName
@@ -406,7 +406,7 @@ RegistryItem gid_Regitem_Soffice_Stardrawtemplate_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarDrawTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Stardrawtemplate_6_FriendlyTypeName
@@ -713,7 +713,7 @@ RegistryItem gid_Regitem_Openoffice_Drawdocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.DrawDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Drawdocument_1_FriendlyTypeName
@@ -919,7 +919,7 @@ RegistryItem gid_Regitem_Openoffice_Drawtemplate_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.DrawTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Draw";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Drawtemplate_1_FriendlyTypeName
diff --git a/scp2/source/impress/registryitem_impress.scp b/scp2/source/impress/registryitem_impress.scp
index 8fa7ee9..78ab3d9 100644
--- a/scp2/source/impress/registryitem_impress.scp
+++ b/scp2/source/impress/registryitem_impress.scp
@@ -292,7 +292,7 @@ RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarImpressDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starimpressdocument_6_FriendlyTypeName
@@ -420,7 +420,7 @@ RegistryItem gid_Regitem_Soffice_Starimpresstemplate_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarImpressTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starimpresstemplate_6_FriendlyTypeName
@@ -728,7 +728,7 @@ RegistryItem gid_Regitem_Openoffice_Impressdocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.ImpressDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Impressdocument_1_FriendlyTypeName
@@ -948,7 +948,7 @@ RegistryItem gid_Regitem_Openoffice_Impresstemplate_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.ImpressTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Impress";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Impresstemplate_1_FriendlyTypeName
diff --git a/scp2/source/math/registryitem_math.scp b/scp2/source/math/registryitem_math.scp
index c4f808f..1486522 100644
--- a/scp2/source/math/registryitem_math.scp
+++ b/scp2/source/math/registryitem_math.scp
@@ -291,7 +291,7 @@ RegistryItem gid_Regitem_Soffice_Starmathdocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarMathDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Math";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starmathdocument_6_FriendlyTypeName
@@ -569,7 +569,7 @@ RegistryItem gid_Regitem_Openoffice_Mathdocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.MathDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Math";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Mathdocument_1_FriendlyTypeName
diff --git a/scp2/source/writer/registryitem_writer.scp b/scp2/source/writer/registryitem_writer.scp
index 8242f77..f1dea1e 100644
--- a/scp2/source/writer/registryitem_writer.scp
+++ b/scp2/source/writer/registryitem_writer.scp
@@ -292,7 +292,7 @@ RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarWriterDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starwriterdocument_6_FriendlyTypeName
@@ -413,7 +413,7 @@ RegistryItem gid_Regitem_Soffice_Starwriterglobaldocument_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarWriterGlobalDocument.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starwriterglobaldocument_6_FriendlyTypeName
@@ -500,7 +500,7 @@ RegistryItem gid_Regitem_Soffice_Starwritertemplate_6_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "soffice.StarWriterTemplate.6";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Soffice_Starwritertemplate_6_FriendlyTypeName
@@ -863,7 +863,7 @@ RegistryItem gid_Regitem_Openoffice_Writerdocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.WriterDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Writerdocument_1_FriendlyTypeName
@@ -1092,7 +1092,7 @@ RegistryItem gid_Regitem_Openoffice_Writertemplate_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.WriterTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Writertemplate_1_FriendlyTypeName
@@ -1244,7 +1244,7 @@ RegistryItem gid_Regitem_Openoffice_Writerglobaldocument_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.WriterGlobalDocument.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_Writerglobaldocument_1_FriendlyTypeName
@@ -1396,7 +1396,7 @@ RegistryItem gid_Regitem_Openoffice_WriterWebTemplate_1_AppUserModelID
ComponentCondition = "VersionNT >= 601";
Subkey = "LibreOffice.WriterWebTemplate.1";
Name = "AppUserModelID";
- Value = "TheDocumentFoundation.LibreOffice.Writer";
+ Value = "TheDocumentFoundation.LibreOffice";
End
RegistryItem gid_Regitem_Openoffice_WriterWebTemplate_1_FriendlyTypeName
commit c53f1d1fa8714c330528c9b872b06f3271216f83
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Apr 30 11:19:56 2013 +0100
fdo#62815 - tolerate crazy / out-of-bound ScreenNumbers for FullScreen
Thus making the gtk+ backend more similar to the generic backend
in this regard; also be more strict about invalid monitors -> empty
screens.
Change-Id: Ia4f2e1205cb1d309fb1bb01f9631167339a3478e
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index e389eb4..1d2d731 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -70,6 +70,13 @@ struct GdkRectangleEqual
}
+/**
+ * GtkSalSystem::countScreenMonitors()
+ *
+ * This method builds the vector which allows us to map from VCL's
+ * idea of linear integer ScreenNumber to to gtk+'s rather more
+ * complicated screen + monitor concept.
+ */
void
GtkSalSystem::countScreenMonitors()
{
@@ -134,6 +141,11 @@ GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
break;
}
nMonitor = nIdx;
+
+ // handle invalid monitor indexes as non-existent screens
+ if (nMonitor < 0 || (pScreen && nMonitor >= gdk_screen_get_n_monitors (pScreen)))
+ pScreen = NULL;
+
return pScreen;
}
diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx
index 8f5af1f..041a8a0 100644
--- a/vcl/unx/gtk/window/gtksalframe.cxx
+++ b/vcl/unx/gtk/window/gtksalframe.cxx
@@ -2038,7 +2038,15 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
return;
gint nMonitor;
+ bool bSameMonitor = false;
GdkScreen *pScreen = getDisplay()->getSystem()->getScreenMonitorFromIdx( nNewScreen, nMonitor );
+ if (!pScreen)
+ {
+ g_warning ("Attempt to move GtkSalFrame to invalid screen %d => "
+ "fallback to current\n", nNewScreen);
+ pScreen = gtk_widget_get_screen( m_pWindow );
+ bSameMonitor = true;
+ }
// Heavy lifting, need to move screen ...
if( pScreen != gtk_widget_get_screen( m_pWindow ))
@@ -2046,6 +2054,9 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
gint nOldMonitor = gdk_screen_get_monitor_at_window(
pScreen, widget_get_window( m_pWindow ) );
+ if (bSameMonitor)
+ nMonitor = nOldMonitor;
+
#if OSL_DEBUG_LEVEL > 1
if( nMonitor == nOldMonitor )
g_warning( "An apparently pointless SetScreen - should we elide it ?" );
More information about the Libreoffice-commits
mailing list