drop old patches

f41
David Tardon 13 years ago
parent c216081825
commit 2821a7fd02

@ -1,37 +0,0 @@
From 5b28f3488a033bd38b31071463b112df1713b64b Mon Sep 17 00:00:00 2001
From: Thorsten Behrens <tbehrens@suse.com>
Date: Wed, 15 Feb 2012 16:51:52 +0100
Subject: [PATCH] Fix fdo#45177 - avoid linked undo for the while.
While I try to wrap head around subtleties for linked undo in
Impress outline view, disable that here for the while. Better than
a crash for sure.
(cherry picked from commit 57e6f04066cfddfa79eb2b79cf5c45653c79eff3)
Conflicts:
sd/source/ui/view/outlview.cxx
---
sd/source/ui/view/outlview.cxx | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 53ebbb4..cdd442d 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1672,12 +1672,6 @@ void OutlineView::EndModelChange()
DBG_ASSERT( bHasUndoActions == (mpOutliner->GetUndoManager().GetUndoActionCount() != 0), "sd::OutlineView::EndModelChange(), undo actions not in sync!" );
- if( bHasUndoActions )
- {
- SfxLinkUndoAction* pLink = new SfxLinkUndoAction(pDocUndoMgr);
- mpOutliner->GetUndoManager().AddUndoAction(pLink);
- }
-
mpOutliner->GetUndoManager().LeaveListAction();
if( bHasUndoActions && mpOutliner->GetEditEngine().HasTriedMergeOnLastAddUndo() )
--
1.7.7.6

@ -1,100 +0,0 @@
From e49275751bde6410dcd9f0c543c03f57b068e1cd Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 15 Feb 2012 15:26:43 +0100
Subject: [PATCH] Fix some apparent misuses of RTL_CONSTASCII_USTRINGPARAM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Caolán McNamara <caolanm@redhat.com>
---
extensions/source/scanner/sanedlg.cxx | 6 +++---
svtools/source/filter/sgvtext.cxx | 30 +++++++++++++++---------------
svtools/source/misc/imap2.cxx | 4 ++--
3 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index d08a175..9726f3b 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -1214,18 +1214,18 @@ sal_Bool SaneDlg::LoadState()
using comphelper::string::matchL;
- if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("BOOL=")))
+ if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("BOOL=")))
{
aValue = aValue.copy(RTL_CONSTASCII_LENGTH("BOOL="));
sal_Bool aBOOL = (sal_Bool)aValue.toInt32();
mrSane.SetOptionValue( nOption, aBOOL );
}
- else if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("STRING=")))
+ else if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("STRING=")))
{
aValue = aValue.copy(RTL_CONSTASCII_LENGTH("STRING="));
mrSane.SetOptionValue(nOption,rtl::OStringToOUString(aValue, osl_getThreadTextEncoding()) );
}
- else if (matchL(aValue, RTL_CONSTASCII_USTRINGPARAM("NUMERIC=")))
+ else if (matchL(aValue, RTL_CONSTASCII_STRINGPARAM("NUMERIC=")))
{
aValue = aValue.copy(RTL_CONSTASCII_LENGTH("NUMERIC="));
diff --git a/svtools/source/filter/sgvtext.cxx b/svtools/source/filter/sgvtext.cxx
index fbf9864..45b3a23 100644
--- a/svtools/source/filter/sgvtext.cxx
+++ b/svtools/source/filter/sgvtext.cxx
@@ -1193,21 +1193,21 @@ void SgfFontOne::ReadOne( const rtl::OString& rID, ByteString& Dsc )
{
s = s.toAsciiUpperCase();
using comphelper::string::matchL;
- if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("BOLD"))) Bold=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ITAL"))) Ital=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SERF"))) Serf=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SANS"))) Sans=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("FIXD"))) Fixd=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYSTEM"))) SVChSet = osl_getThreadTextEncoding();
+ if (matchL(s, RTL_CONSTASCII_STRINGPARAM("BOLD"))) Bold=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ITAL"))) Ital=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SERF"))) Serf=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SANS"))) Sans=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("FIXD"))) Fixd=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYSTEM"))) SVChSet = osl_getThreadTextEncoding();
else if (comphelper::string::isdigitAsciiString(s) ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.toInt32());
}
}
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index ffcf82a..851840b 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -540,8 +540,8 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
using comphelper::string::indexOfL;
if ( (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("rect")) != -1) ||
- (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("circ")) != -1) ||
- (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("poly")) != -1) )
+ (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("circ")) != -1) ||
+ (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("poly")) != -1) )
{
if ( ( aStr.indexOf('(') != -1 ) &&
( aStr.indexOf(')') != -1 ) )
--
1.7.7.6

@ -1,44 +0,0 @@
From 62bd29f398c11956983288ae6dd109147cc2c094 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 8 Feb 2012 12:38:10 +0000
Subject: [PATCH] Resolves: fdo#43644 survive registered but unavailable
binfilter
---
wizards/source/importwizard/Main.xba | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba
index 8084fda..7385c6b 100644
--- a/wizards/source/importwizard/Main.xba
+++ b/wizards/source/importwizard/Main.xba
@@ -44,7 +44,7 @@ Sub Main()
ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
ImportDialog.cmdGoOn.DefaultButton = True
ImportDialogArea.GetControl(&quot;optMSDocuments&quot;).SetFocus()
- oBinFilterComp = createUnoService( &quot;com.sun.star.comp.office.BF_MigrateFilter&quot; )
+ oBinFilterComp = createBF_MigrateFilterIfPossible()
ToggleCheckboxesWithBoolean(True)
RetValue = ImportDialogArea.Execute()
@@ -186,6 +186,17 @@ Dim i as Integer
End Sub
+Function createBF_MigrateFilterIfPossible()
+Dim oService
+ On Error Goto RTError
+ oService = createUnoService(&quot;com.sun.star.comp.office.BF_MigrateFilter&quot;)
+ getBinFilterCompIfItExists = oService
+ Exit Function
+RTError:
+ createBF_MigrateFilterIfPossible = Nothing
+End Function
+
+
Function CheckInstalledModule(Index as Integer) as Boolean
Dim ModuleName as String
Dim NameList() as String
--
1.7.7.6

@ -1,28 +0,0 @@
From bcdadc2e9f3f6a400438cbbefffc60bf02baa0f1 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 14 Feb 2012 10:32:59 +0100
Subject: [PATCH] Resolves rhbz#789622: Adapt SDK to changed paths in LO
installation
---
odk/settings/std.mk | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/odk/settings/std.mk b/odk/settings/std.mk
index 0726631..705b528 100644
--- a/odk/settings/std.mk
+++ b/odk/settings/std.mk
@@ -27,8 +27,8 @@ SDKTYPEFLAG=$(OUT_MISC)/oosdk_cpp_types.flag
URE_TYPES="$(subst \,/,$(URE_MISC)$(PS)types.rdb)"
URE_SERVICES=$(subst \\,\,$(URE_MISC)$(PS)services.rdb)
-OFFICE_TYPES="$(subst \,/,$(OFFICE_PROGRAM_PATH)$(PS)offapi.rdb)"
-OFFICE_SERVICES=$(subst \\,\,$(OFFICE_PROGRAM_PATH)$(PS)services.rdb)
+OFFICE_TYPES="$(subst \,/,$(OFFICE_PROGRAM_PATH)$(PS)types$(PS)offapi.rdb)"
+OFFICE_SERVICES=$(subst \\,\,$(OFFICE_PROGRAM_PATH)$(PS)services$(PS)services.rdb)
OFFICE_TYPE_LIBRARY="$(OFFICE_TYPES)"
--
1.7.7.6

@ -1,30 +0,0 @@
From 5df9e10d27a071f878ed160f99129a7f3c34f5ed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@suse.cz>
Date: Thu, 10 May 2012 18:29:12 +0200
Subject: [PATCH] do not prepend \n twice, it confuses KFileDialog
(rhbz#820439)
Draw -> Export -> filetype combo was broken.
Change-Id: I9349749274498d5834dd63e73f3856434b1ab8d9
---
vcl/unx/kde4/KDE4FilePicker.cxx | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 140af9c..3537bfe 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -342,9 +342,6 @@ rtl::OUString SAL_CALL KDE4FilePicker::getCurrentFilter()
void SAL_CALL KDE4FilePicker::appendFilterGroup( const rtl::OUString& , const uno::Sequence<beans::StringPair>& filters)
throw( lang::IllegalArgumentException, uno::RuntimeException )
{
- if (!_filter.isNull())
- _filter.append(QString("\n"));
-
const sal_uInt16 length = filters.getLength();
for (sal_uInt16 i = 0; i < length; ++i)
{
--
1.7.7.6

@ -1,26 +0,0 @@
From 85211f1ef30b07927d768348ce28ac34ade62f03 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 2 May 2012 14:26:11 +0200
Subject: [PATCH] fdo#49365 correctly map monitor index back to screen
Change-Id: I396b34119a2686011640d5f15de616fe2a166237
---
vcl/unx/gtk/app/gtksys.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 3927dbf..538107f 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -92,7 +92,7 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMo
pScreen = gdk_display_get_screen (pDisplay, i);
if (!pScreen)
break;
- if (nIdx > gdk_screen_get_n_monitors (pScreen))
+ if (nIdx >= gdk_screen_get_n_monitors (pScreen))
nIdx -= gdk_screen_get_n_monitors (pScreen);
else
break;
--
1.7.7.6

@ -1,25 +0,0 @@
From 9d5da4e1d12c224286f871b28b7df31215f67d31 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 26 Apr 2012 06:36:22 +0200
Subject: [PATCH] incrementing index twice in one run seems wrong
---
vcl/unx/gtk/app/gtksys.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index bf3fba7..3927dbf 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -89,7 +89,7 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMo
GdkScreen *pScreen = NULL;
for (gint i = 0; i < gdk_display_get_n_screens (pDisplay); i++)
{
- pScreen = gdk_display_get_screen (pDisplay, i++);
+ pScreen = gdk_display_get_screen (pDisplay, i);
if (!pScreen)
break;
if (nIdx > gdk_screen_get_n_monitors (pScreen))
--
1.7.7.6

@ -1,273 +0,0 @@
From 83dd316f42bcc959a533e6be2ba24bbc37417a0a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 25 Apr 2012 15:08:53 +0200
Subject: [PATCH] rhbz#809019 count mirrored monitors as one
Change-Id: I I I184541e99ab4e04b8534dd0341bc2f3630094e9c
---
vcl/inc/unx/gtk/gtkdata.hxx | 2 +
vcl/inc/unx/gtk/gtksys.hxx | 11 ++++-
vcl/unx/gtk/app/gtkdata.cxx | 2 +
vcl/unx/gtk/app/gtksys.cxx | 85 ++++++++++++++++++++++++++++++--------
vcl/unx/gtk/window/gtkframe.cxx | 4 +-
5 files changed, 81 insertions(+), 23 deletions(-)
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 63b8ae3..033bf1a 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -151,6 +151,8 @@ public:
GdkDisplay* GetGdkDisplay() const { return m_pGdkDisplay; }
bool IsX11Display() const { return m_bX11Display; }
+ GtkSalSystem* getSystem() const { return m_pSys; }
+
virtual void deregisterFrame( SalFrame* pFrame );
GdkCursor *getCursor( PointerStyle ePointerStyle );
virtual int CaptureMouse( SalFrame* pFrame );
diff --git a/vcl/inc/unx/gtk/gtksys.hxx b/vcl/inc/unx/gtk/gtksys.hxx
index df9e79e..582d4b9 100644
--- a/vcl/inc/unx/gtk/gtksys.hxx
+++ b/vcl/inc/unx/gtk/gtksys.hxx
@@ -33,10 +33,15 @@
#include "generic/gensys.h"
#include <gtk/gtk.h>
#include <unx/saltype.h>
+#include <deque>
class GtkSalSystem : public SalGenericSystem
{
+ typedef std::deque<std::pair<GdkScreen*, int> > ScreenMonitors_t;
+
GdkDisplay *mpDisplay;
+ // Number of monitors for every active screen.
+ ScreenMonitors_t maScreenMonitors;
public:
GtkSalSystem();
virtual ~GtkSalSystem();
@@ -56,10 +61,11 @@
{ return getXScreenFromDisplayScreen( GetDisplayDefaultScreen() ); }
int GetDisplayXScreenCount();
SalX11Screen getXScreenFromDisplayScreen(unsigned int nDisplayScreen);
+ void countScreenMonitors();
// We have a 'screen' number that is combined from screen-idx + monitor-idx
- static int getScreenIdxFromPtr (GdkDisplay *pDisplay, GdkScreen *pScreen);
- static int getScreenMonitorIdx (GdkDisplay *pDisplay, GdkScreen *pScreen, int nX, int nY);
- static GdkScreen *getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMonitor);
+ int getScreenIdxFromPtr (GdkScreen *pScreen);
+ int getScreenMonitorIdx (GdkScreen *pScreen, int nX, int nY);
+ GdkScreen *getScreenMonitorFromIdx (int nIdx, gint &nMonitor);
};
#endif // _VCL_GTKSYS_HXX_
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 5189174..4d58110 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -197,12 +197,14 @@ GdkFilterReturn GtkSalDisplay::filterGdkEvent( GdkXEvent* sys_event,
void GtkSalDisplay::screenSizeChanged( GdkScreen* pScreen )
{
+ m_pSys->countScreenMonitors();
if (pScreen)
emitDisplayChanged();
}
void GtkSalDisplay::monitorsChanged( GdkScreen* pScreen )
{
+ m_pSys->countScreenMonitors();
if (pScreen)
emitDisplayChanged();
}
diff --git a/vcl/unx/gtk/app/gtksys.cxx b/vcl/unx/gtk/app/gtksys.cxx
index 538107f..25578b3 100644
--- a/vcl/unx/gtk/app/gtksys.cxx
+++ b/vcl/unx/gtk/app/gtksys.cxx
@@ -49,6 +49,7 @@ SalSystem *GtkInstance::CreateSalSystem()
GtkSalSystem::GtkSalSystem() : SalGenericSystem()
{
mpDisplay = gdk_display_get_default();
+ countScreenMonitors();
}
GtkSalSystem::~GtkSalSystem()
@@ -61,6 +62,52 @@ GtkSalSystem::GetDisplayXScreenCount()
return gdk_display_get_n_screens (mpDisplay);
}
+namespace
+{
+
+struct GdkRectangleEqual
+{
+ bool operator()(GdkRectangle const& rLeft, GdkRectangle const& rRight)
+ {
+ return
+ rLeft.x == rRight.x
+ && rLeft.y == rRight.y
+ && rLeft.width == rRight.width
+ && rLeft.height == rRight.height
+ ;
+ }
+};
+
+}
+
+void
+GtkSalSystem::countScreenMonitors()
+{
+ maScreenMonitors.clear();
+ for (gint i = 0; i < gdk_display_get_n_screens(mpDisplay); i++)
+ {
+ GdkScreen* const pScreen(gdk_display_get_screen(mpDisplay, i));
+ gint nMonitors(pScreen ? gdk_screen_get_n_monitors(pScreen) : 0);
+ if (nMonitors > 1)
+ {
+ std::vector<GdkRectangle> aGeometries;
+ aGeometries.reserve(nMonitors);
+ for (gint j(0); j != nMonitors; ++j)
+ {
+ GdkRectangle aGeometry;
+ gdk_screen_get_monitor_geometry(pScreen, j, &aGeometry);
+ aGeometries.push_back(aGeometry);
+ }
+ GdkRectangleEqual aCmp;
+ std::sort(aGeometries.begin(), aGeometries.end(), aCmp);
+ const std::vector<GdkRectangle>::iterator aUniqueEnd(
+ std::unique(aGeometries.begin(), aGeometries.end(), aCmp));
+ nMonitors = std::distance(aGeometries.begin(), aUniqueEnd);
+ }
+ maScreenMonitors.push_back(std::make_pair(pScreen, nMonitors));
+ }
+}
+
// Including gdkx.h kills us with the Window / XWindow conflict
extern "C" {
GType gdk_x11_display_get_type (void);
@@ -73,7 +120,7 @@ GtkSalSystem::getXScreenFromDisplayScreen(unsigned int nScreen)
gint nMonitor;
GdkScreen *pScreen = NULL;
- pScreen = getScreenMonitorFromIdx (mpDisplay, nScreen, nMonitor);
+ pScreen = getScreenMonitorFromIdx (nScreen, nMonitor);
if (!pScreen)
return SalX11Screen (0);
#if GTK_CHECK_VERSION(3,0,0)
@@ -84,16 +131,16 @@ GtkSalSystem::getXScreenFromDisplayScreen(unsigned int nScreen)
}
GdkScreen *
-GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMonitor)
+GtkSalSystem::getScreenMonitorFromIdx (int nIdx, gint &nMonitor)
{
GdkScreen *pScreen = NULL;
- for (gint i = 0; i < gdk_display_get_n_screens (pDisplay); i++)
+ for (ScreenMonitors_t::const_iterator aIt(maScreenMonitors.begin()), aEnd(maScreenMonitors.end()); aIt != aEnd; ++aIt)
{
- pScreen = gdk_display_get_screen (pDisplay, i);
+ pScreen = aIt->first;
if (!pScreen)
break;
- if (nIdx >= gdk_screen_get_n_monitors (pScreen))
- nIdx -= gdk_screen_get_n_monitors (pScreen);
+ if (nIdx >= aIt->second)
+ nIdx -= aIt->second;
else
break;
}
@@ -102,32 +149,34 @@ GtkSalSystem::getScreenMonitorFromIdx (GdkDisplay *pDisplay, int nIdx, gint &nMo
}
int
-GtkSalSystem::getScreenIdxFromPtr (GdkDisplay *pDisplay, GdkScreen *pScreen)
+GtkSalSystem::getScreenIdxFromPtr (GdkScreen *pScreen)
{
int nIdx = 0;
- for (gint i = 0; i < gdk_display_get_n_screens (pDisplay); i++)
+ for (ScreenMonitors_t::const_iterator aIt(maScreenMonitors.begin()), aEnd(maScreenMonitors.end()); aIt != aEnd; ++aIt)
{
- GdkScreen *pCmp = gdk_display_get_screen (pDisplay, i);
- if (pCmp == pScreen)
+ if (aIt->first == pScreen)
return nIdx;
- nIdx += gdk_screen_get_n_monitors (pCmp);
+ nIdx += aIt->second;
}
g_warning ("failed to find screen %p", pScreen);
return 0;
}
-int GtkSalSystem::getScreenMonitorIdx (GdkDisplay *pDisplay,
- GdkScreen *pScreen,
+int GtkSalSystem::getScreenMonitorIdx (GdkScreen *pScreen,
int nX, int nY)
{
- return getScreenIdxFromPtr (pDisplay, pScreen) +
+ // TODO: this will fail horribly for exotic combinations like two
+ // monitors in mirror mode and one extra. Hopefully such
+ // abominations are not used (or, even better, not possible) in
+ // practice .-)
+ return getScreenIdxFromPtr (pScreen) +
gdk_screen_get_monitor_at_point (pScreen, nX, nY);
}
unsigned int GtkSalSystem::GetDisplayScreenCount()
{
gint nMonitor;
- (void)getScreenMonitorFromIdx (mpDisplay, G_MAXINT, nMonitor);
+ (void)getScreenMonitorFromIdx (G_MAXINT, nMonitor);
return G_MAXINT - nMonitor;
}
@@ -183,7 +232,7 @@ static int _get_primary_monitor (GdkScreen *pScreen)
unsigned int GtkSalSystem::GetDisplayDefaultScreen()
{
GdkScreen *pDefault = gdk_display_get_default_screen (mpDisplay);
- int idx = getScreenIdxFromPtr (mpDisplay, pDefault);
+ int idx = getScreenIdxFromPtr (pDefault);
return idx + _get_primary_monitor (pDefault);
}
@@ -192,7 +241,7 @@ Rectangle GtkSalSystem::GetDisplayScreenPosSizePixel (unsigned int nScreen)
gint nMonitor;
GdkScreen *pScreen;
GdkRectangle aRect;
- pScreen = getScreenMonitorFromIdx (mpDisplay, nScreen, nMonitor);
+ pScreen = getScreenMonitorFromIdx (nScreen, nMonitor);
if (!pScreen)
return Rectangle();
gdk_screen_get_monitor_geometry (pScreen, nMonitor, &aRect);
@@ -212,7 +261,7 @@ rtl::OUString GtkSalSystem::GetDisplayScreenName(unsigned int nScreen)
gchar *pStr;
gint nMonitor;
GdkScreen *pScreen;
- pScreen = getScreenMonitorFromIdx (mpDisplay, nScreen, nMonitor);
+ pScreen = getScreenMonitorFromIdx (nScreen, nMonitor);
if (!pScreen)
return rtl::OUString();
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 28776f1..eb77e75 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -593,7 +593,7 @@ void GtkSalFrame::updateScreenNumber()
int nScreen = 0;
GdkScreen *pScreen = gtk_widget_get_screen( m_pWindow );
if( pScreen )
- nScreen = GtkSalSystem::getScreenMonitorIdx( getGdkDisplay(), pScreen, maGeometry.nX, maGeometry.nY );
+ nScreen = getDisplay()->getSystem()->getScreenMonitorIdx( pScreen, maGeometry.nX, maGeometry.nY );
maGeometry.nDisplayScreenNumber = nScreen;
}
@@ -1862,7 +1862,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
gint nMonitor;
GdkScreen *pScreen = NULL;
- pScreen = GtkSalSystem::getScreenMonitorFromIdx( getGdkDisplay(), nNewScreen, nMonitor );
+ pScreen = getDisplay()->getSystem()->getScreenMonitorFromIdx( nNewScreen, nMonitor );
// Heavy lifting, need to move screen ...
if( pScreen != gtk_widget_get_screen( m_pWindow ))
--
1.7.7.6

@ -1,34 +0,0 @@
From ee67c55260ec7723c39606955ccdbd3e2934935a Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Thu, 8 Mar 2012 14:15:09 +0100
Subject: [PATCH] yet another clash with macro name
---
fpicker/source/unx/kde4/KDE4FilePicker.cxx | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/fpicker/source/unx/kde4/KDE4FilePicker.cxx b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
index 269deee..8e8b3e8 100644
--- a/fpicker/source/unx/kde4/KDE4FilePicker.cxx
+++ b/fpicker/source/unx/kde4/KDE4FilePicker.cxx
@@ -60,6 +60,8 @@
#undef SETTINGS_MOUSE
#define LO_SETTINGS_LOCALE SETTINGS_LOCALE
#undef SETTINGS_LOCALE
+#define LO_SETTINGS_STYLE SETTINGS_STYLE
+#undef SETTINGS_STYLE
#include <kfiledialog.h>
#include <kwindowsystem.h>
@@ -77,6 +79,8 @@
#undef LO_SETTINGS_MOUSE
#define SETTINGS_LOCALE LO_SETTINGS_LOCALE
#undef LO_SETTINGS_LOCALE
+#define SETTINGS_STYLE LO_SETTINGS_STYLE
+#undef LO_SETTINGS_STYLE
using namespace ::com::sun::star;
--
1.7.7.6

@ -1,57 +0,0 @@
From fe97bc5be1c8e9db176d55ae4347b0ffcef2a1c8 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 15 Feb 2012 15:38:04 +0100
Subject: [PATCH] Fix some apparent misuses of RTL_CONSTASCII_USTRINGPARAM
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Caolán McNamara <caolanm@redhat.com>
---
.../source/filter.vcl/filter/svt_sgvtext.cxx | 30 ++++++++++----------
1 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
index fd8bc49..6a78e9a 100644
--- a/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
+++ b/binfilter/bf_svtools/source/filter.vcl/filter/svt_sgvtext.cxx
@@ -1190,21 +1190,21 @@ void SgfFontOne::ReadOne( const rtl::OString& rID, ByteString& Dsc )
{
s = s.toAsciiUpperCase();
using comphelper::string::matchL;
- if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("BOLD"))) Bold=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ITAL"))) Ital=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SERF"))) Serf=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SANS"))) Sans=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("FIXD"))) Fixd=sal_True;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL;
- else if (matchL(s, RTL_CONSTASCII_USTRINGPARAM("SYSTEM"))) SVChSet = osl_getThreadTextEncoding();
+ if (matchL(s, RTL_CONSTASCII_STRINGPARAM("BOLD"))) Bold=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ITAL"))) Ital=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SERF"))) Serf=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SANS"))) Sans=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("FIXD"))) Fixd=sal_True;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ROMAN"))) SVFamil=FAMILY_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SWISS"))) SVFamil=FAMILY_SWISS;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MODERN"))) SVFamil=FAMILY_MODERN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SCRIPT"))) SVFamil=FAMILY_SCRIPT;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("DECORA"))) SVFamil=FAMILY_DECORATIVE;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("ANSI"))) SVChSet=RTL_TEXTENCODING_MS_1252;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("IBMPC"))) SVChSet=RTL_TEXTENCODING_IBM_850;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("MAC"))) SVChSet=RTL_TEXTENCODING_APPLE_ROMAN;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYMBOL"))) SVChSet=RTL_TEXTENCODING_SYMBOL;
+ else if (matchL(s, RTL_CONSTASCII_STRINGPARAM("SYSTEM"))) SVChSet = osl_getThreadTextEncoding();
else if (comphelper::string::isdigitAsciiString(s) ) SVWidth=sal::static_int_cast< sal_uInt16 >(s.toInt32());
}
}
--
1.7.7.6
Loading…
Cancel
Save