drop integrated patches

f41
Caolán McNamara 14 years ago
parent a852bd4a25
commit bad44c964f

@ -1,24 +0,0 @@
From 72244e6e6035ffc211ea7a4fce9aa96de8bc1f76 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 3 Nov 2010 10:16:06 +0000
Subject: [PATCH] abort doesn't gain us anything here.
abort doesn't gain us anything here except to force abrt automatic bugreports kick
in, and XIOErrors can't be worked around
---
vcl/unx/source/plugadapt/salplug.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcl/unx/source/plugadapt/salplug.cxx b/vcl/unx/source/plugadapt/salplug.cxx
index 54f9752..ba6bf4a 100644
--- a/vcl/unx/source/plugadapt/salplug.cxx
+++ b/vcl/unx/source/plugadapt/salplug.cxx
@@ -281,7 +281,7 @@
std::fprintf( stderr, "Application Error" );
else
std::fprintf( stderr, ByteString( rErrorText, gsl_getSystemTextEncoding() ).GetBuffer() );
- abort();
+ exit(-1);
}
const OUString& SalGetDesktopEnvironment()

@ -1,25 +0,0 @@
From cd10b146b67f7329f699e48e74d2961dbcceb123 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 4 Nov 2010 14:44:14 +0000
Subject: [PATCH] latest libX11 changed header guards
---
vcl/unx/inc/dtint.hxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/vcl/unx/inc/dtint.hxx b/vcl/unx/inc/dtint.hxx
index 724dad6..b173830 100644
--- a/vcl/unx/inc/dtint.hxx
+++ b/vcl/unx/inc/dtint.hxx
@@ -37,7 +37,7 @@ class SalBitmap;
class SalDisplay;
class AllSettings;
-#ifndef _XLIB_H_
+#if !defined(_XLIB_H_) && !defined(_X11_XLIB_H_)
// forwards from X
struct Display;
struct XEvent;
--
1.7.3.1

@ -1,25 +0,0 @@
From 0bf9733c6e8d40a5d327e754b44c7e540cdada7e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sun, 31 Oct 2010 19:07:44 +0000
Subject: [PATCH] strcpy cannot be used with overlapping src and dest
---
soltools/mkdepend/parse.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c
index 6d6e079..ec7e7d4 100644
--- a/soltools/mkdepend/parse.c
+++ b/soltools/mkdepend/parse.c
@@ -347,7 +347,7 @@ int deftype (line, filep, file_red, file, parse_it, symbols)
/*
* copy the definition back to the beginning of the line.
*/
- strcpy (line, p);
+ memmove (line, p, strlen(p));
break;
case ELSE:
case ENDIF:
--
1.7.3.1

@ -1,83 +0,0 @@
--- a/solenv/inc/postset.mk 2010-09-29 12:55:57.000000000 +0100
+++ b/solenv/inc/postset.mk 2010-09-29 12:58:29.000000000 +0100
@@ -33,15 +33,13 @@
# Complete list of all supported ISO codes
completelangiso=af \
ar \
-as-IN \
+as \
be-BY \
bo \
bg \
br \
brx \
bn \
-bn-BD \
-bn-IN \
bs \
ca \
cs \
@@ -65,7 +63,6 @@
gd \
gl \
gu \
-gu-IN \
he \
hi \
hr \
@@ -91,8 +88,8 @@
mn \
mni \
ms \
-ml-IN \
-mr-IN \
+ml \
+mr \
my \
ne \
nb \
@@ -102,7 +99,7 @@
ns \
om \
oc \
-or-IN \
+or \
pap \
pa-IN \
pl \
@@ -126,16 +123,16 @@
sv \
sw \
sw-TZ \
-te-IN \
-ti-ER \
-ta-IN \
+te \
+ti \
+ta \
th \
tn \
tr \
ts \
tg \
ug \
-ur-IN \
+ur \
uk \
uz \
ve \
--- a/configure.in
+++ b/configure.in
@@ -3815,12 +3815,6 @@ if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \
SYSTEM_CPPUNIT=YES
# might work for earlier, too but go sure
PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 )
- AC_MSG_CHECKING([STL compatibility])
- if test "$WITH_STLPORT" != "no"; then
- AC_MSG_ERROR([to use system cppunit you need to use --without-stlport])
- else
- AC_MSG_RESULT([OK])
- fi
else
AC_MSG_RESULT([internal])
SYSTEM_CPPUNIT=NO

@ -1,401 +0,0 @@
diff -ru framework/inc/helper/titlebarupdate.hxx framework/inc/helper/titlebarupdate.hxx
--- framework/inc/helper/titlebarupdate.hxx 2010-10-14 21:54:22.000000000 +0100
+++ framework/inc/helper/titlebarupdate.hxx 2010-10-22 12:52:13.000000000 +0100
@@ -212,6 +212,7 @@
*/
void impl_updateTitle(const css::uno::Reference< css::frame::XFrame >& xFrame);
+ void impl_updateWM_CLASSS(const css::uno::Reference< css::frame::XFrame >& xFrame);
}; // class TitleBarUpdate
} // namespace framework
diff -ru framework/source/helper/titlebarupdate.cxx framework/source/helper/titlebarupdate.cxx
--- framework/source/helper/titlebarupdate.cxx 2010-10-14 21:54:22.000000000 +0100
+++ framework/source/helper/titlebarupdate.cxx 2010-10-22 15:00:16.000000000 +0100
@@ -199,6 +201,88 @@
// nothing todo here - because we hold the frame as weak reference only
}
+//http://live.gnome.org/GnomeShell/ApplicationBased
+void TitleBarUpdate::impl_updateWM_CLASSS(const css::uno::Reference< css::frame::XFrame >& xFrame)
+{
+ css::uno::Reference< css::awt::XWindow > xWindow = xFrame->getContainerWindow ();
+ if ( ! xWindow.is() )
+ return;
+
+ ::rtl::OUString sWM_CLASS;
+ try
+ {
+ ::rtl::OUString aProductName;
+ ::utl::ConfigManager::GetDirectConfigProperty(::utl::ConfigManager::PRODUCTNAME) >>= aProductName;
+
+ // SYNCHRONIZED ->
+ ReadGuard aReadLock(m_aLock);
+ css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = m_xSMGR;
+ aReadLock.unlock();
+ // <- SYNCHRONIZED
+
+ css::uno::Reference< css::frame::XModuleManager > xModuleManager(
+ xSMGR->createInstance(SERVICENAME_MODULEMANAGER),
+ css::uno::UNO_QUERY_THROW);
+
+ css::uno::Reference< css::container::XNameAccess > xConfig(
+ xModuleManager,
+ css::uno::UNO_QUERY_THROW);
+
+ rtl::OUString aModuleId = xModuleManager->identify(xFrame);
+ rtl::OUString sDesktopName;
+
+ if ( aModuleId.equalsAscii( "com.sun.star.text.TextDocument" ) ||
+ aModuleId.equalsAscii( "com.sun.star.text.GlobalDocument" ) ||
+ aModuleId.equalsAscii( "com.sun.star.text.WebDocument" ) ||
+ aModuleId.equalsAscii( "com.sun.star.xforms.XMLFormDocument" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("writer");
+ else if ( aModuleId.equalsAscii( "com.sun.star.sheet.SpreadsheetDocument" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("calc");
+ else if ( aModuleId.equalsAscii( "com.sun.star.presentation.PresentationDocument" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("impress");
+ else if ( aModuleId.equalsAscii( "com.sun.star.drawing.DrawingDocument" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("draw");
+ else if ( aModuleId.equalsAscii( "com.sun.star.formula.FormulaProperties" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("math");
+ else if ( aModuleId.equalsAscii( "com.sun.star.sdb.DatabaseDocument" ) ||
+ aModuleId.equalsAscii( "com.sun.star.sdb.OfficeDatabaseDocument" ) ||
+ aModuleId.equalsAscii( "com.sun.star.sdb.RelationDesign" ) ||
+ aModuleId.equalsAscii( "com.sun.star.sdb.QueryDesign" ) ||
+ aModuleId.equalsAscii( "com.sun.star.sdb.TableDesign" ) ||
+ aModuleId.equalsAscii( "com.sun.star.sdb.DataSourceBrowser" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("base");
+ else if ( aModuleId.equalsAscii( "com.sun.star.frame.StartModule" ) )
+ sDesktopName = ::rtl::OUString::createFromAscii("startcenter");
+ else
+ sDesktopName = ::rtl::OUString::createFromAscii("startcenter");
+ sWM_CLASS = aProductName.toAsciiLowerCase();
+ sWM_CLASS += ::rtl::OUString(sal_Unicode('-'));
+ sWM_CLASS += sDesktopName;
+ }
+ catch(const css::uno::Exception&)
+ {
+ }
+
+ // VCL SYNCHRONIZED ->
+ ::vos::OClearableGuard aSolarLock( Application::GetSolarMutex() );
+
+ Window* pWindow = (VCLUnoHelper::GetWindow( xWindow ));
+ if (
+ ( pWindow ) &&
+ ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ )
+ {
+ WorkWindow* pWorkWindow = (WorkWindow*)pWindow;
+#ifdef COPY_TO_TITLE_FOR_DEBUG
+ pWorkWindow->SetText( sWM_CLASS );
+#endif
+ pWorkWindow->SetWMClass( sWM_CLASS );
+ }
+
+ aSolarLock.clear();
+}
+
+
//*****************************************************************************************************************
::sal_Bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::frame::XFrame >& xFrame,
TModuleInfo& rInfo )
@@ -260,6 +347,9 @@
impl_updateIcon (xFrame);
impl_updateTitle (xFrame);
+#if defined(UNX) && !defined(MACOSX)
+ impl_updateWM_CLASSS (xFrame);
+#endif
}
//*****************************************************************************************************************
diff -ru vcl/aqua/inc/salframe.h vcl/aqua/inc/salframe.h
--- vcl/aqua/inc/salframe.h 2010-10-14 21:43:20.000000000 +0100
+++ vcl/aqua/inc/salframe.h 2010-10-22 13:26:26.000000000 +0100
@@ -159,6 +159,7 @@
virtual void SetExtendedFrameStyle( SalExtStyle );
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber(unsigned int);
+ virtual void SetWMClass( const rtl::OUString &rWMClass );
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
diff -ru vcl/aqua/source/window/salframe.cxx vcl/aqua/source/window/salframe.cxx
--- vcl/aqua/source/window/salframe.cxx 2010-10-18 17:01:44.000000000 +0100
+++ vcl/aqua/source/window/salframe.cxx 2010-10-22 13:17:50.000000000 +0100
@@ -664,6 +664,10 @@
}
}
+void AquaSalFrame::SetWMClass( const rtl::OUString &/*rWMClass*/ )
+{
+}
+
// -----------------------------------------------------------------------
void AquaSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )
diff -ru vcl/inc/vcl/salframe.hxx vcl/inc/vcl/salframe.hxx
--- vcl/inc/vcl/salframe.hxx 2010-10-14 21:43:20.000000000 +0100
+++ vcl/inc/vcl/salframe.hxx 2010-10-22 13:26:05.000000000 +0100
@@ -266,6 +266,8 @@
// move the frame to a new screen
virtual void SetScreenNumber( unsigned int nScreen ) = 0;
+ virtual void SetWMClass( const rtl::OUString &rWMClass ) = 0;
+
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
virtual void ResetClipRegion() = 0;
diff -ru vcl/inc/vcl/syswin.hxx vcl/inc/vcl/syswin.hxx
--- vcl/inc/vcl/syswin.hxx 2010-10-14 21:43:20.000000000 +0100
+++ vcl/inc/vcl/syswin.hxx 2010-10-22 13:14:48.000000000 +0100
@@ -277,6 +277,8 @@
@see GetScreenNumber
*/
void SetScreenNumber( unsigned int nNewScreen );
+
+ void SetWMClass( const rtl::OUString &rWMClass );
};
#endif // _SV_SYSWIN_HXX
diff -ru vcl/source/window/syswin.cxx vcl/source/window/syswin.cxx
--- vcl/source/window/syswin.cxx 2010-10-14 21:43:20.000000000 +0100
+++ vcl/source/window/syswin.cxx 2010-10-22 13:29:21.000000000 +0100
@@ -1082,3 +1082,8 @@
{
mpWindowImpl->mpFrame->SetScreenNumber( nScreen );
}
+
+void SystemWindow::SetWMClass( const rtl::OUString &rWMClass )
+{
+ mpWindowImpl->mpFrame->SetWMClass( rWMClass );
+}
diff -ru vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkframe.cxx
--- vcl/unx/gtk/window/gtkframe.cxx 2010-10-22 08:55:43.000000000 +0100
+++ vcl/unx/gtk/window/gtkframe.cxx 2010-10-22 14:12:08.000000000 +0100
@@ -981,25 +981,10 @@
if( nStyle != m_nExtStyle && ! isChild() )
{
m_nExtStyle = nStyle;
- if( GTK_WIDGET_REALIZED( m_pWindow ) )
- {
- XClassHint* pClass = XAllocClassHint();
- rtl::OString aResHint = X11SalData::getFrameResName( m_nExtStyle );
- pClass->res_name = const_cast<char*>(aResHint.getStr());
- pClass->res_class = const_cast<char*>(X11SalData::getFrameClassName());
- XSetClassHint( getDisplay()->GetDisplay(),
- GDK_WINDOW_XWINDOW(m_pWindow->window),
- pClass );
- XFree( pClass );
- }
- else
- gtk_window_set_wmclass( GTK_WINDOW(m_pWindow),
- X11SalData::getFrameResName( m_nExtStyle ),
- X11SalData::getFrameClassName() );
+ updateWMClass();
}
}
-
SalGraphics* GtkSalFrame::GetGraphics()
{
if( m_pWindow )
@@ -1792,6 +1777,39 @@
}
}
+void GtkSalFrame::updateWMClass()
+{
+ fprintf(stderr, "%p GtkSalFrame::SetWMClass with %s\n", this, rtl::OUStringToOString(m_sWMClass, RTL_TEXTENCODING_UTF8).getStr());
+
+ rtl::OString aResClass = rtl::OUStringToOString(m_sWMClass, RTL_TEXTENCODING_ASCII_US);
+ const char *pResClass = aResClass.getLength() ? aResClass.getStr() : X11SalData::getFrameClassName();
+
+ if( GTK_WIDGET_REALIZED( m_pWindow ) )
+ {
+ XClassHint* pClass = XAllocClassHint();
+ rtl::OString aResName = X11SalData::getFrameResName( m_nExtStyle );
+ pClass->res_name = const_cast<char*>(aResName.getStr());
+ pClass->res_class = const_cast<char*>(pResClass);
+ XSetClassHint( getDisplay()->GetDisplay(),
+ GDK_WINDOW_XWINDOW(m_pWindow->window),
+ pClass );
+ XFree( pClass );
+ }
+ else
+ gtk_window_set_wmclass( GTK_WINDOW(m_pWindow),
+ X11SalData::getFrameResName( m_nExtStyle ),
+ pResClass );
+}
+
+void GtkSalFrame::SetWMClass( const rtl::OUString &rWMClass )
+{
+ if( rWMClass != m_sWMClass && ! isChild() )
+ {
+ m_sWMClass = rWMClass;
+ updateWMClass();
+ }
+}
+
void GtkSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
{
if( m_pWindow && ! isChild() )
diff -ru vcl/unx/headless/svpframe.hxx vcl/unx/headless/svpframe.hxx
--- vcl/unx/headless/svpframe.hxx 2010-10-14 21:43:20.000000000 +0100
+++ vcl/unx/headless/svpframe.hxx 2010-10-22 13:27:19.000000000 +0100
@@ -125,6 +125,7 @@
/*TODO: functional implementation */
virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
+ virtual void SetWMClass( const rtl::OUString &rWMClass ) { (void) rWMClass; }
};
#endif // _SVP_SVPFRAME_HXX
diff -ru vcl/unx/inc/plugins/gtk/gtkframe.hxx vcl/unx/inc/plugins/gtk/gtkframe.hxx
--- vcl/unx/inc/plugins/gtk/gtkframe.hxx 2010-10-22 08:55:43.000000000 +0100
+++ vcl/unx/inc/plugins/gtk/gtkframe.hxx 2010-10-22 14:10:08.000000000 +0100
@@ -192,6 +192,7 @@
bool m_bWindowIsGtkPlug;
bool m_bSetFocusOnMap;
String m_aTitle;
+ rtl::OUString m_sWMClass;
IMHandler* m_pIMHandler;
@@ -269,6 +270,8 @@
void setMinMaxSize();
void createNewWindow( XLIB_Window aParent, bool bXEmbed, int nScreen );
void askForXEmbedFocus( sal_Int32 nTimecode );
+
+ void updateWMClass();
DECL_LINK( ImplDelayedFullScreenHdl, void* );
public:
@@ -387,6 +390,7 @@
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber( unsigned int );
+ virtual void SetWMClass( const rtl::OUString &rWMClass );
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
diff -ru vcl/unx/inc/salframe.h vcl/unx/inc/salframe.h
--- vcl/unx/inc/salframe.h 2010-10-14 21:43:20.000000000 +0100
+++ vcl/unx/inc/salframe.h 2010-10-22 14:22:35.000000000 +0100
@@ -128,6 +128,8 @@
int mnIconID;
String m_aTitle;
+
+ rtl::OUString m_sWMClass;
SystemChildData maSystemChildData;
@@ -171,6 +173,8 @@
void setXEmbedInfo();
void askForXEmbedFocus( sal_Int32 i_nTimeCode );
+
+ void updateWMClass();
public:
X11SalFrame( SalFrame* pParent, ULONG nSalFrameStyle, SystemParentData* pSystemParent = NULL );
virtual ~X11SalFrame();
@@ -261,6 +265,7 @@
virtual void SetBackgroundBitmap( SalBitmap* pBitmap );
virtual void SetScreenNumber( unsigned int );
+ virtual void SetWMClass( const rtl::OUString &rWMClass );
// shaped system windows
// set clip region to none (-> rectangular windows, normal state)
diff -ru vcl/unx/source/window/salframe.cxx vcl/unx/source/window/salframe.cxx
--- vcl/unx/source/window/salframe.cxx 2010-10-18 12:39:42.000000000 +0100
+++ vcl/unx/source/window/salframe.cxx 2010-10-22 14:23:44.000000000 +0100
@@ -542,11 +542,9 @@
a[n++] = pDisplay_->getWMAdaptor()->getAtom( WMAdaptor::WM_TAKE_FOCUS );
XSetWMProtocols( GetXDisplay(), GetShellWindow(), a, n );
- XClassHint* pClass = XAllocClassHint();
- pClass->res_name = const_cast<char*>(X11SalData::getFrameResName());
- pClass->res_class = const_cast<char*>(X11SalData::getFrameClassName());
- XSetClassHint( GetXDisplay(), GetShellWindow(), pClass );
- XFree( pClass );
+ // force wm class hint
+ mnExtStyle = ~0;
+ SetExtendedFrameStyle( 0 );
XSizeHints* pHints = XAllocSizeHints();
pHints->flags = PWinGravity | PPosition;
@@ -849,13 +847,7 @@
if( nStyle != mnExtStyle && ! IsChildWindow() )
{
mnExtStyle = nStyle;
-
- XClassHint* pClass = XAllocClassHint();
- rtl::OString aResHint = X11SalData::getFrameResName( mnExtStyle );
- pClass->res_name = const_cast<char*>(aResHint.getStr());
- pClass->res_class = const_cast<char*>(X11SalData::getFrameClassName());
- XSetClassHint( GetXDisplay(), GetShellWindow(), pClass );
- XFree( pClass );
+ updateWMClass();
}
}
@@ -2192,6 +2184,30 @@
}
}
+void X11SalFrame::SetWMClass( const rtl::OUString &rWMClass )
+{
+ if( rWMClass != m_sWMClass && ! IsChildWindow() )
+ {
+ m_sWMClass = rWMClass;
+ updateWMClass();
+ }
+}
+
+void X11SalFrame::updateWMClass()
+{
+ XClassHint* pClass = XAllocClassHint();
+ rtl::OString aResName = X11SalData::getFrameResName( mnExtStyle );
+ pClass->res_name = const_cast<char*>(aResName.getStr());
+
+ rtl::OString aResClass = rtl::OUStringToOString(m_sWMClass, RTL_TEXTENCODING_ASCII_US);
+ const char *pResClass = aResClass.getLength() ? aResClass.getStr() : X11SalData::getFrameClassName();
+
+ pClass->res_class = const_cast<char*>(pResClass);
+ XSetClassHint( GetXDisplay(), GetShellWindow(), pClass );
+ XFree( pClass );
+}
+
+
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
void X11SalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nScreen )
diff -ru vcl/win/inc/salframe.h vcl/win/inc/salframe.h
--- vcl/win/inc/salframe.h 2010-10-14 21:43:21.000000000 +0100
+++ vcl/win/inc/salframe.h 2010-10-22 13:26:23.000000000 +0100
@@ -141,6 +141,7 @@
virtual bool SetPluginParent( SystemParentData* pNewParent );
virtual void SetBackgroundBitmap( SalBitmap* );
virtual void SetScreenNumber( unsigned int );
+ virtual void SetWMClass( const rtl::OUString &rWMClass );
virtual void ResetClipRegion();
virtual void BeginSetClipRegion( ULONG nRects );
virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
diff -ru vcl/win/source/window/salframe.cxx vcl/win/source/window/salframe.cxx
--- vcl/win/source/window/salframe.cxx 2010-10-14 21:43:21.000000000 +0100
+++ vcl/win/source/window/salframe.cxx 2010-10-22 13:18:05.000000000 +0100
@@ -2036,6 +2036,10 @@
}
}
+void WinSalFrame::SetWMClass( const rtl::OUString &/*rWMClass*/ )
+{
+}
+
// -----------------------------------------------------------------------
void WinSalFrame::ShowFullScreen( BOOL bFullScreen, sal_Int32 nDisplay )

@ -81,27 +81,18 @@ BuildRequires: jakarta-commons-lang, poppler-devel, fontpackages-devel, junit4
BuildRequires: pentaho-reporting-flow-engine, libXinerama-devel, mythes-devel BuildRequires: pentaho-reporting-flow-engine, libXinerama-devel, mythes-devel
BuildRequires: silgraphite-devel, libwpg-devel, libwps-devel, vigra-devel BuildRequires: silgraphite-devel, libwpg-devel, libwps-devel, vigra-devel
Patch1: openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch Patch1: openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch
Patch2: openoffice.org-1.9.123.ooo53397.prelinkoptimize.desktop.patch Patch2: openoffice.org-2.0.2.rh188467.printingdefaults.patch
Patch3: openoffice.org-2.0.2.rh188467.printingdefaults.patch Patch3: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch
Patch4: openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch Patch4: openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch
Patch5: openoffice.org-2.4.0.ooo86080.unopkg.bodge.patch Patch5: openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch
Patch6: openoffice.org-3.0.0.ooo88341.sc.verticalboxes.patch Patch6: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch
Patch7: openoffice.org-2.2.0.gccXXXXX.solenv.javaregistration.patch Patch7: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch
Patch8: openoffice.org-3.1.0.oooXXXXX.solenv.allowmissing.patch Patch8: openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch
Patch9: openoffice.org-3.1.0.ooo101274.opening-a-directory.patch Patch9: openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch
Patch10: openoffice.org-3.1.0.ooo102061.sc.cellanchoring.patch Patch10: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch
Patch11: openoffice.org-3.1.1.ooo105784.vcl.sniffscriptforsubs.patch Patch11: openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
Patch12: openoffice.org-3.3.0.ooo108637.sfx2.uisavedir.patch Patch12: turn-script-providers-into-extensions.patch
Patch13: openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
Patch14: openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
Patch15: openoffice.org-3.3.0.ooo113273.desktop.resolvelinks.patch
Patch16: libreoffice-buildfix.patch
Patch17: libreoffice-xdg632229.gnomeshell.patch
Patch18: 0001-strcpy-cannot-be-used-with-overlapping-src-and-dest.patch
Patch19: 0001-abort-doesn-t-gain-us-anything-here.patch
Patch20: 0001-latest-libX11-changed-header-guards.patch
Patch21: turn-script-providers-into-extensions.patch
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%define instdir %{_libdir} %define instdir %{_libdir}
@ -699,27 +690,18 @@ rm -rf l10n/source/kid
mv -f redhat.soc extras/source/palettes/standard.soc mv -f redhat.soc extras/source/palettes/standard.soc
cp -p %{SOURCE19} extras/source/database/evolocal.odb cp -p %{SOURCE19} extras/source/database/evolocal.odb
cp -p %{SOURCE20} external/unowinreg/unowinreg.dll cp -p %{SOURCE20} external/unowinreg/unowinreg.dll
%patch1 -p1 -b .rhXXXXXX.extensions.defaulttoevo2.patch %patch1 -p1 -b .ooo53397.prelinkoptimize.desktop.patch
%patch2 -p1 -b .ooo53397.prelinkoptimize.desktop.patch %patch2 -p1
%patch3 -p1 %patch3 -p1 -b .ooo86080.unopkg.bodge.patch
%patch4 -p1 -b .ooo7065.sw.titlepagedialog.patch %patch4 -p1 -b .ooo88341.sc.verticalboxes.patch
%patch5 -p1 -b .ooo86080.unopkg.bodge.patch %patch5 -p0 -b .gccXXXXX.solenv.javaregistration.patch
%patch6 -p1 -b .ooo88341.sc.verticalboxes.patch %patch6 -p1 -b .oooXXXXX.solenv.allowmissing.patch
%patch7 -p0 -b .gccXXXXX.solenv.javaregistration.patch %patch7 -p0 -b .ooo101274.opening-a-directory.patch
%patch8 -p1 -b .oooXXXXX.solenv.allowmissing.patch %patch8 -p0 -b .ooo102061.sc.cellanchoring.patch
%patch9 -p0 -b .ooo101274.opening-a-directory.patch %patch9 -p0 -b .ooo105784.vcl.sniffscriptforsubs.patch
%patch10 -p0 -b .ooo102061.sc.cellanchoring.patch %patch10 -p1 -b .ooo108637.sfx2.uisavedir.patch
%patch11 -p0 -b .ooo105784.vcl.sniffscriptforsubs.patch %patch11 -p0 -b .ooo113273.desktop.resolvelinks.patch
%patch12 -p1 -b .ooo108637.sfx2.uisavedir.patch %patch12 -p1 -b .turn-script-providers-into-extensions.patch
%patch13 -p1 -b .ooo108846.sfx2.qstartfixes.patch
%patch14 -p0 -b .ooo107490.cppu.lifecycle.patch
%patch15 -p0 -b .ooo113273.desktop.resolvelinks.patch
%patch16 -p1 -b .libreoffice-buildfix.patch
%patch17 -p0 -b .xdg632229.gnomeshell.patch
%patch18 -p1 -b .strcpy-cannot-be-used-with-overlapping-src-and-dest
%patch19 -p1 -b .abort-doesn-t-gain-us-anything-here.patch
%patch20 -p1 -b .latest-libX11-changed-header-guards.patch
%patch21 -p1 -b .turn-script-providers-into-extensions.patch
touch scripting/source/pyprov/delzip touch scripting/source/pyprov/delzip
touch scripting/util/provider/beanshell/delzip touch scripting/util/provider/beanshell/delzip
touch scripting/util/provider/javascript/delzip touch scripting/util/provider/javascript/delzip
@ -2022,6 +2004,15 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
%changelog %changelog
* Thu Nov 18 2010 Caolán McNamara <caolanm@redhat.com 3.2.99.3-1 * Thu Nov 18 2010 Caolán McNamara <caolanm@redhat.com 3.2.99.3-1
- next Libreoffice milestone - next Libreoffice milestone
- drop integrated openoffice.org-2.0.1.rhXXXXXX.extensions.defaulttoevo2.patch
- drop integrated openoffice.org-2.2.1.ooo7065.sw.titlepagedialog.patch
- drop integrated openoffice.org-3.2.0.ooo108846.sfx2.qstartfixes.patch
- drop integrated openoffice.org-3.3.0.ooo107490.cppu.lifecycle.patch
- drop integrated libreoffice-buildfix.patch
- drop integrated libreoffice-xdg632229.gnomeshell.patch
- drop integrated 0001-strcpy-cannot-be-used-with-overlapping-src-and-dest.patch
- drop integrated 0001-abort-doesn-t-gain-us-anything-here.patch
- drop integrated 0001-latest-libX11-changed-header-guards.patch
* Sat Nov 06 2010 David Tardon <dtardon@redhat.com 3.2.99.2-6 * Sat Nov 06 2010 David Tardon <dtardon@redhat.com 3.2.99.2-6
- turn script providers into extensions - turn script providers into extensions

@ -10,9 +10,9 @@ diff -r a92d0bd6747b desktop/prj/build.lst
diff -r a92d0bd6747b desktop/scripts/soffice.sh diff -r a92d0bd6747b desktop/scripts/soffice.sh
--- a/desktop/scripts/soffice.sh Mon Dec 28 16:11:17 2009 +0100 --- a/desktop/scripts/soffice.sh Mon Dec 28 16:11:17 2009 +0100
+++ b/desktop/scripts/soffice.sh Wed Dec 30 09:34:10 2009 +0100 +++ b/desktop/scripts/soffice.sh Wed Dec 30 09:34:10 2009 +0100
@@ -73,30 +73,26 @@ @@ -90,30 +90,26 @@
esac fi
done fi
-# pagein -# pagein
-sd_pagein_args=@pagein-common -sd_pagein_args=@pagein-common

@ -1,82 +0,0 @@
--- openoffice.org/officecfg/registry/data/org/openoffice/Office/Writer.xcu.orig 2005-04-18 20:39:35.000000000 +0530
+++ openoffice.org/officecfg/registry/data/org/openoffice/Office/Writer.xcu 2005-05-10 17:30:14.000000000 +0530
@@ -40,6 +40,32 @@
<prop oor:name="IsHideEmptyParagraphs" >
<value>true</value>
</prop>
+ <node oor:name="DataSource">
+ <prop oor:name="DataSourceName" oor:type="xs:string">
+ <value>EvolutionLocal</value>
+ </prop>
+ <prop oor:name="DataTableName" oor:type="xs:string">
+ <value>Personal</value>
+ </prop>
+ </node>
+ <node oor:name="AddressDataAssignments">
+ <node oor:name="_0" oor:op="replace">
+ <prop oor:name="DBColumnAssignments" oor:type="oor:string-list">
+ <value oor:separator=",">title,full_name,family_name,org,addr_line1,addr_line2,city,state,zip,country,home_phone,business_phone,email_1,</value>
+ </prop>
+ <node oor:name="DataSource">
+ <prop oor:name="DataCommandType" oor:type="xs:short">
+ <value>0</value>
+ </prop>
+ <prop oor:name="DataSourceName" oor:type="xs:string">
+ <value>EvolutionLocal</value>
+ </prop>
+ <prop oor:name="DataTableName" oor:type="xs:string">
+ <value>Personal</value>
+ </prop>
+ </node>
+ </node>
+ </node>
<prop oor:name="EMailSupported">
<value>true</value>
</prop>
--- openoffice.org/extras/source/database/makefile.mk.bakj 2005-03-16 18:49:33.251075928 +0530
+++ openoffice.org/extras/source/database/makefile.mk 2005-03-16 18:50:38.651285353 +0530
@@ -72,8 +72,8 @@
ZIP1TARGET = $(DATABASE_USER_TARGET)
-ZIP1LIST = biblio.odb
-
+ZIP1LIST = biblio.odb \
+ evolocal.odb
ZIP2TARGET = $(DATABASE_USER_BIBLIO_TARGET)
ZIP2LIST = biblio.dbf biblio.dbt
--- openoffice.org/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu.bakj 2005-03-16 18:51:43.777536725 +0530
+++ openoffice.org/officecfg/registry/data/org/openoffice/Office/DataAccess.xcu 2005-03-16 18:52:51.471404727 +0530
@@ -161,6 +161,14 @@
<value>Bibliography</value>
</prop>
</node>
+ <node oor:name="EvolutionLocal" oor:op="replace">
+ <prop oor:name="Location" oor:type="xs:string">
+ <value>$(userurl)/database/evolocal.odb</value>
+ </prop>
+ <prop oor:name="Name" oor:type="xs:string">
+ <value>EvolutionLocal</value>
+ </prop>
+ </node>
</node>
<node oor:name="Bibliography">
<node oor:name="CurrentDataSource">
--- openoffice.org.orig/extensions/source/abpilot/abspilot.cxx 19 Dec 2005 17:26:24 -0000 1.13
+++ openoffice.org/extensions/source/abpilot/abspilot.cxx 16 Feb 2006 12:45:38 -0000
@@ -124,12 +124,8 @@
// some initial settings
#ifdef MACOSX
m_aSettings.eType = AST_MACAB;
-#elif WITH_MOZILLA
-#ifdef UNX
- m_aSettings.eType = AST_MORK;
-#else
- m_aSettings.eType = AST_OE;
-#endif
+#elif UNX
+ m_aSettings.eType = AST_EVOLUTION;
#else
m_aSettings.eType = AST_OTHER;
#endif

File diff suppressed because it is too large Load Diff

@ -20,7 +20,7 @@ retrieving revision 1.54.216.1
diff -u -r1.54.216.1 output2.cxx diff -u -r1.54.216.1 output2.cxx
--- openoffice.org.orig/sc/source/ui/view/output2.cxx 18 Jan 2008 12:02:36 -0000 1.54.216.1 --- openoffice.org.orig/sc/source/ui/view/output2.cxx 18 Jan 2008 12:02:36 -0000 1.54.216.1
+++ openoffice.org/sc/source/ui/view/output2.cxx 16 Apr 2008 12:19:34 -0000 +++ openoffice.org/sc/source/ui/view/output2.cxx 16 Apr 2008 12:19:34 -0000
@@ -2378,6 +2378,22 @@ @@ -2369,6 +2369,22 @@
} }
@ -43,7 +43,7 @@ diff -u -r1.54.216.1 output2.cxx
void ScOutputData::DrawEdit(BOOL bPixelToLogic) void ScOutputData::DrawEdit(BOOL bPixelToLogic)
{ {
vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() ); vcl::PDFExtOutDevData* pPDFData = PTR_CAST( vcl::PDFExtOutDevData, pDev->GetExtOutDevData() );
@@ -2892,13 +2908,8 @@ @@ -2878,13 +2894,8 @@
(ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE); (ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1; BOOL bMerged = pMerge->GetColMerge() > 1 || pMerge->GetRowMerge() > 1;
@ -59,26 +59,27 @@ diff -u -r1.54.216.1 output2.cxx
bClip = TRUE; bClip = TRUE;
else else
bSimClip = TRUE; bSimClip = TRUE;
@@ -2948,6 +2959,18 @@ @@ -2920,6 +2931,19 @@
#endif }
Rectangle aLogicClip; Rectangle aLogicClip;
+ if ( + if (
+ ((nAttrRotate == 9000) || (nAttrRotate == 27000)) && + ((nAttrRotate == 9000) || (nAttrRotate == 27000)) &&
+ (!(aAlignParam.meOrient==SVX_ORIENTATION_STANDARD && !aAlignParam.mbAsianVertical)) && + (!(aAlignParam.meOrient==SVX_ORIENTATION_STANDARD &&
+ (!(bClip || bSimClip)) + !aAlignParam.mbAsianVertical)) &&
+ ) + (!(bClip || bSimClip))
+ { + )
+ if (UseNormalClip(nCellY, pCondSet)) + {
+ bClip = TRUE; + if (UseNormalClip(nCellY, pCondSet))
+ else + bClip = TRUE;
+ bSimClip = TRUE; + else
+ } + bSimClip = TRUE;
+ }
+ +
if (bClip || bSimClip) if (bClip || bSimClip)
{ {
// Clip marks are already handled in GetOutputArea // Clip marks are already handled in GetOutputArea
@@ -3776,11 +3799,21 @@ @@ -3734,11 +3758,21 @@
else else
{ {
// bei gedrehtem Text ist Standard zentriert // bei gedrehtem Text ist Standard zentriert

@ -955,7 +955,7 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeImportHelper.cxx sc/source/filte
diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml/XMLTableShapeResizer.cxx diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml/XMLTableShapeResizer.cxx
--- sc.orig/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 12:39:13.000000000 +0100 --- sc.orig/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 12:39:13.000000000 +0100
+++ sc/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 15:27:39.000000000 +0100 +++ sc/source/filter/xml/XMLTableShapeResizer.cxx 2009-06-04 15:27:39.000000000 +0100
@@ -51,38 +51,38 @@ @@ -49,38 +49,38 @@
using ::std::vector; using ::std::vector;
using ::rtl::OUString; using ::rtl::OUString;
@ -963,7 +963,7 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
+ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport) +ScMyOLEFixer::ScMyOLEFixer(ScXMLImport& rTempImport)
: rImport(rTempImport), : rImport(rTempImport),
aShapes(), aShapes(),
pCollection(NULL) pCollection(NULL)
{ {
} }
@ -975,13 +975,13 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
-sal_Bool ScMyShapeResizer::IsOLE(uno::Reference< drawing::XShape >& rShape) const -sal_Bool ScMyShapeResizer::IsOLE(uno::Reference< drawing::XShape >& rShape) const
+sal_Bool ScMyOLEFixer::IsOLE(uno::Reference< drawing::XShape >& rShape) +sal_Bool ScMyOLEFixer::IsOLE(uno::Reference< drawing::XShape >& rShape)
{ {
return rShape->getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"))); return rShape->getShapeType().equals(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape")));
} }
-void ScMyShapeResizer::CreateChartListener(ScDocument* pDoc, -void ScMyShapeResizer::CreateChartListener(ScDocument* pDoc,
+void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, +void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc,
const rtl::OUString& rName, const rtl::OUString& rName,
- const rtl::OUString* pRangeList) - const rtl::OUString* pRangeList)
+ const rtl::OUString& rRangeList) + const rtl::OUString& rRangeList)
{ {
- if (!pDoc || !pRangeList) - if (!pDoc || !pRangeList)
@ -1003,27 +1003,29 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
if (!aRangeStr.getLength()) if (!aRangeStr.getLength())
{ {
pDoc->AddOLEObjectToCollection(rName); pDoc->AddOLEObjectToCollection(rName);
@@ -112,271 +112,45 @@ @@ -116,272 +116,45 @@
} }
} }
-void ScMyShapeResizer::AddShape(uno::Reference <drawing::XShape>& rShape, -void ScMyShapeResizer::AddShape(uno::Reference <drawing::XShape>& rShape,
- rtl::OUString* pRangeList, - rtl::OUString* pRangeList,
- table::CellAddress& rStartAddress, table::CellAddress& rEndAddress, - table::CellAddress& rStartAddress, table::CellAddress& rEndAddress,
- sal_Int32 nEndX, sal_Int32 nEndY) - sal_Int32 nEndX, sal_Int32 nEndY)
+void ScMyOLEFixer::AddOLE(uno::Reference <drawing::XShape>& rShape, +void ScMyOLEFixer::AddOLE(uno::Reference <drawing::XShape>& rShape,
+ const rtl::OUString &rRangeList) + const rtl::OUString &rRangeList)
{ {
- ScMyToResizeShape aShape; - ScMyToResizeShape aShape;
+ ScMyToFixupOLE aShape; - aShape.xShape.set(rShape);
aShape.xShape.set(rShape); - aShape.pRangeList = pRangeList;
- aShape.pRangeList = pRangeList; - aShape.aEndCell = rEndAddress;
- aShape.aEndCell = rEndAddress; - aShape.aStartCell = rStartAddress;
- aShape.aStartCell = rStartAddress; - aShape.nEndY = nEndY;
- aShape.nEndY = nEndY; - aShape.nEndX = nEndX;
- aShape.nEndX = nEndX; - aShapes.push_back(aShape);
+ aShape.sRangeList = rRangeList; + ScMyToFixupOLE aShape;
aShapes.push_back(aShape); + aShape.xShape.set(rShape);
+ aShape.sRangeList = rRangeList;
+ aShapes.push_back(aShape);
} }
-void ScMyShapeResizer::GetNewShapeSizePos(ScDocument* pDoc, const Rectangle& rStartRect, -void ScMyShapeResizer::GetNewShapeSizePos(ScDocument* pDoc, const Rectangle& rStartRect,
@ -1031,124 +1033,124 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
- awt::Point& rPoint, awt::Size& rSize, - awt::Point& rPoint, awt::Size& rSize,
- sal_Int32& rEndX, sal_Int32& rEndY) const - sal_Int32& rEndX, sal_Int32& rEndY) const
-{ -{
- awt::Point aRefPoint; - awt::Point aRefPoint;
- BOOL bNegativePage(pDoc->IsNegativePage(rEndCell.Sheet)); - BOOL bNegativePage(pDoc->IsNegativePage(rEndCell.Sheet));
- if (bNegativePage) - if (bNegativePage)
- aRefPoint.X = rStartRect.Right(); - aRefPoint.X = rStartRect.Right();
- else - else
- aRefPoint.X = rStartRect.Left(); - aRefPoint.X = rStartRect.Left();
- aRefPoint.Y = rStartRect.Top(); - aRefPoint.Y = rStartRect.Top();
- Rectangle aRect(pDoc->GetMMRect( - Rectangle aRect(pDoc->GetMMRect(
- static_cast<SCCOL>(rEndCell.Column), static_cast<SCROW>(rEndCell.Row), - static_cast<SCCOL>(rEndCell.Column), static_cast<SCROW>(rEndCell.Row),
- static_cast<SCCOL>(rEndCell.Column), static_cast<SCROW>(rEndCell.Row), rEndCell.Sheet )); - static_cast<SCCOL>(rEndCell.Column), static_cast<SCROW>(rEndCell.Row), rEndCell.Sheet ));
- if (bNegativePage) - if (bNegativePage)
- rEndX = -rEndX + aRect.Right(); - rEndX = -rEndX + aRect.Right();
- else - else
- rEndX += aRect.Left(); - rEndX += aRect.Left();
- rEndY += aRect.Top(); - rEndY += aRect.Top();
- rPoint.X += aRefPoint.X; - rPoint.X += aRefPoint.X;
- if (bNegativePage) - if (bNegativePage)
- { - {
- if (rPoint.X < rStartRect.Left()) - if (rPoint.X < rStartRect.Left())
- rPoint.X = rStartRect.Left() + 2; // increment by 2 100th_mm because the cellwidth is internal in twips - rPoint.X = rStartRect.Left() + 2; // increment by 2 100th_mm because the cellwidth is internal in twips
- } - }
- else - else
- { - {
- if (rPoint.X > rStartRect.Right()) - if (rPoint.X > rStartRect.Right())
- rPoint.X = rStartRect.Right() - 2; // decrement by 2 100th_mm because the cellwidth is internal in twips - rPoint.X = rStartRect.Right() - 2; // decrement by 2 100th_mm because the cellwidth is internal in twips
- } - }
- rPoint.Y += aRefPoint.Y; - rPoint.Y += aRefPoint.Y;
- if (rPoint.Y > rStartRect.Bottom()) - if (rPoint.Y > rStartRect.Bottom())
- rPoint.Y = rStartRect.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips - rPoint.Y = rStartRect.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
- if (bNegativePage) - if (bNegativePage)
- { - {
- rSize.Width = -(rEndX - rPoint.X); - rSize.Width = -(rEndX - rPoint.X);
- } - }
- else - else
- rSize.Width = rEndX - rPoint.X; - rSize.Width = rEndX - rPoint.X;
- rSize.Height = rEndY - rPoint.Y; - rSize.Height = rEndY - rPoint.Y;
-} -}
- -
-void ScMyShapeResizer::ResizeShapes() -void ScMyShapeResizer::ResizeShapes()
+void ScMyOLEFixer::FixupOLEs() +void ScMyOLEFixer::FixupOLEs
{ {
if (!aShapes.empty() && rImport.GetModel().is()) if (!aShapes.empty() && rImport.GetModel().is())
{ {
- rtl::OUString sRowHeight(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLHGT)); - rtl::OUString sRowHeight(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLHGT));
rtl::OUString sPersistName (RTL_CONSTASCII_USTRINGPARAM("PersistName")); rtl::OUString sPersistName (RTL_CONSTASCII_USTRINGPARAM("PersistName"));
- rtl::OUString sCaptionPoint( RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" )); - rtl::OUString sCaptionPoint( RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" ));
- rtl::OUString sConnectorShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape") ); - rtl::OUString sConnectorShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ConnectorShape") );
- rtl::OUString sCaptionShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape") ); - rtl::OUString sCaptionShape( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CaptionShape") );
- rtl::OUString sStartShape(RTL_CONSTASCII_USTRINGPARAM("StartShape")); - rtl::OUString sStartShape(RTL_CONSTASCII_USTRINGPARAM("StartShape"));
- rtl::OUString sEndShape(RTL_CONSTASCII_USTRINGPARAM("EndShape")); - rtl::OUString sEndShape(RTL_CONSTASCII_USTRINGPARAM("EndShape"));
- rtl::OUString sStartPosition(RTL_CONSTASCII_USTRINGPARAM("StartPosition")); - rtl::OUString sStartPosition(RTL_CONSTASCII_USTRINGPARAM("StartPosition"));
- rtl::OUString sEndPosition(RTL_CONSTASCII_USTRINGPARAM("EndPosition")); - rtl::OUString sEndPosition(RTL_CONSTASCII_USTRINGPARAM("EndPosition"));
- uno::Reference<table::XCellRange> xTableRow; - uno::Reference<table::XCellRange> xTableRow;
- uno::Reference<sheet::XSpreadsheet> xSheet; - uno::Reference<sheet::XSpreadsheet> xSheet;
- uno::Reference<table::XTableRows> xTableRows; - uno::Reference<table::XTableRows> xTableRows;
- sal_Int32 nOldRow(-1); - sal_Int32 nOldRow(-1);
- sal_Int32 nOldSheet(-1); - sal_Int32 nOldSheet(-1);
- ScMyToResizeShapes::iterator aItr(aShapes.begin()); - ScMyToResizeShapes::iterator aItr(aShapes.begin());
- ScMyToResizeShapes::iterator aEndItr(aShapes.end()); - ScMyToResizeShapes::iterator aEndItr(aShapes.end());
- uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( rImport.GetModel(), uno::UNO_QUERY ); - uno::Reference <sheet::XSpreadsheetDocument> xSpreadDoc( rImport.GetModel(), uno::UNO_QUERY );
- if ( xSpreadDoc.is() ) - if ( xSpreadDoc.is() )
+ ScMyToFixupOLEs::iterator aItr(aShapes.begin()); + ScMyToFixupOLEs::iterator aItr(aShapes.begin());
+ ScMyToFixupOLEs::iterator aEndItr(aShapes.end()); + ScMyToFixupOLEs::iterator aEndItr(aShapes.end());
+ ScDocument* pDoc(rImport.GetDocument()); + ScDocument* pDoc(rImport.GetDocument());
+ +
+ rImport.LockSolarMutex(); + rImport.LockSolarMutex();
+ +
+ while (aItr != aEndItr) + while (aItr != aEndItr)
{ {
- uno::Reference<container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY ); - uno::Reference<container::XIndexAccess> xIndex( xSpreadDoc->getSheets(), uno::UNO_QUERY );
- ScDocument* pDoc(rImport.GetDocument()); - ScDocument* pDoc(rImport.GetDocument());
- if ( pDoc && xIndex.is() ) - if ( pDoc && xIndex.is() )
+ // #i78086# also call CreateChartListener for invalid position (anchored to sheet) + // #i78086# also call CreateChartListener for invalid position (anchored to sheet)
+ if (!IsOLE(aItr->xShape)) + if (!IsOLE(aItr->xShape))
+ DBG_ERROR("Only OLEs should be in here now"); + DBG_ERROR("Only OLEs should be in here now");
+ +
+ if (IsOLE(aItr->xShape)) + if (IsOLE(aItr->xShape))
{ {
- rImport.LockSolarMutex(); - rImport.LockSolarMutex();
- while (aItr != aEndItr) - while (aItr != aEndItr)
- { - {
- // #i78086# invalid cell position is used to call CreateChartListener only - // #i78086# invalid cell position is used to call CreateChartListener only
- if ( aItr->aEndCell.Sheet >= 0 ) - if ( aItr->aEndCell.Sheet >= 0 )
- { - {
- if ((nOldSheet != aItr->aEndCell.Sheet) || !xSheet.is()) - if ((nOldSheet != aItr->aEndCell.Sheet) || !xSheet.is())
- { - {
- nOldSheet = aItr->aEndCell.Sheet; - nOldSheet = aItr->aEndCell.Sheet;
- xSheet.set(xIndex->getByIndex(nOldSheet), uno::UNO_QUERY); - xSheet.set(xIndex->getByIndex(nOldSheet), uno::UNO_QUERY);
- if (xSheet.is()) - if (xSheet.is())
- { - {
- uno::Reference<table::XColumnRowRange> xColumnRowRange (xSheet, uno::UNO_QUERY); - uno::Reference<table::XColumnRowRange> xColumnRowRange (xSheet, uno::UNO_QUERY);
- if (xColumnRowRange.is()) - if (xColumnRowRange.is())
- xTableRows = xColumnRowRange->getRows(); - xTableRows = xColumnRowRange->getRows();
- } - }
- } - }
- if (xTableRows.is()) - if (xTableRows.is())
- { - {
- if (nOldRow != aItr->aEndCell.Row || !xTableRow.is()) - if (nOldRow != aItr->aEndCell.Row || !xTableRow.is())
- { - {
- nOldRow = aItr->aEndCell.Row; - nOldRow = aItr->aEndCell.Row;
- xTableRows->getByIndex(nOldRow) >>= xTableRow; - xTableRows->getByIndex(nOldRow) >>= xTableRow;
- } - }
- if (xTableRow.is()) - if (xTableRow.is())
- { - {
- uno::Reference <beans::XPropertySet> xRowProperties(xTableRow, uno::UNO_QUERY); - uno::Reference <beans::XPropertySet> xRowProperties(xTableRow, uno::UNO_QUERY);
- if (xRowProperties.is()) - if (xRowProperties.is())
- { - {
- sal_Int32 nHeight; - sal_Int32 nHeight;
- if (xRowProperties->getPropertyValue(sRowHeight) >>= nHeight) - if (xRowProperties->getPropertyValue(sRowHeight) >>= nHeight)
- { - {
- Rectangle aRec = pDoc->GetMMRect(static_cast<SCCOL>(aItr->aStartCell.Column), static_cast<SCROW>(aItr->aStartCell.Row), - Rectangle aRec = pDoc->GetMMRect(static_cast<SCCOL>(aItr->aStartCell.Column), static_cast<SCROW>(aItr->aStartCell.Row),
- static_cast<SCCOL>(aItr->aStartCell.Column), static_cast<SCROW>(aItr->aStartCell.Row), aItr->aStartCell.Sheet); - static_cast<SCCOL>(aItr->aStartCell.Column), static_cast<SCROW>(aItr->aStartCell.Row), aItr->aStartCell.Sheet);
- awt::Point aPoint(aItr->xShape->getPosition()); - awt::Point aPoint(aItr->xShape->getPosition());
- awt::Size aSize(aItr->xShape->getSize()); - awt::Size aSize(aItr->xShape->getSize());
- if (pDoc->IsNegativePage(static_cast<SCTAB>(nOldSheet))) - if (pDoc->IsNegativePage(static_cast<SCTAB>(nOldSheet)))
- aPoint.X += aSize.Width; - aPoint.X += aSize.Width;
- if (aItr->nEndY >= 0 && aItr->nEndX >= 0) - if (aItr->nEndY >= 0 && aItr->nEndX >= 0)
- { - {
- if (aItr->xShape->getShapeType().equals(sConnectorShape)) - if (aItr->xShape->getShapeType().equals(sConnectorShape))
- { - {
- //#103122#; handle connected Connectorshapes - //#103122#; handle connected Connectorshapes
@ -1159,12 +1161,12 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
- uno::Reference<drawing::XShape> xEndShape(xShapeProps->getPropertyValue( sEndShape ), uno::UNO_QUERY); - uno::Reference<drawing::XShape> xEndShape(xShapeProps->getPropertyValue( sEndShape ), uno::UNO_QUERY);
- if (!xStartShape.is() && !xEndShape.is()) - if (!xStartShape.is() && !xEndShape.is())
- { - {
- awt::Size aOldSize(aSize); - awt::Size aOldSize(aSize);
- GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY); - GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY);
- aItr->xShape->setPosition(aPoint); - aItr->xShape->setPosition(aPoint);
- if( (aSize.Width != aOldSize.Width) || - if( (aSize.Width != aOldSize.Width) ||
- (aSize.Height != aOldSize.Height) ) - (aSize.Height != aOldSize.Height) )
- aItr->xShape->setSize(aSize); - aItr->xShape->setSize(aSize);
- } - }
- else if (xStartShape.is() && xEndShape.is()) - else if (xStartShape.is() && xEndShape.is())
- { - {
@ -1197,111 +1199,111 @@ diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.cxx sc/source/filter/xml
- } - }
- else - else
- { - {
- awt::Size aOldSize(aSize); - awt::Size aOldSize(aSize);
- GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY); - GetNewShapeSizePos(pDoc, aRec, aItr->aEndCell, aPoint, aSize, aItr->nEndX, aItr->nEndY);
- if (pDoc->IsNegativePage(static_cast<SCTAB>(nOldSheet))) - if (pDoc->IsNegativePage(static_cast<SCTAB>(nOldSheet)))
- aPoint.X -= aSize.Width; - aPoint.X -= aSize.Width;
- aItr->xShape->setPosition(aPoint); - aItr->xShape->setPosition(aPoint);
- if( (aSize.Width != aOldSize.Width) || - if( (aSize.Width != aOldSize.Width) ||
- (aSize.Height != aOldSize.Height) ) - (aSize.Height != aOldSize.Height) )
- aItr->xShape->setSize(aSize); - aItr->xShape->setSize(aSize);
- } - }
- } - }
- else - else
- { - {
- if (aItr->xShape->getShapeType().equals(sCaptionShape)) - if (aItr->xShape->getShapeType().equals(sCaptionShape))
- { - {
- Rectangle aRectangle(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height); - Rectangle aRectangle(aPoint.X, aPoint.Y, aPoint.X + aSize.Width, aPoint.Y + aSize.Height);
- -
- awt::Point aCaptionPoint; - awt::Point aCaptionPoint;
- uno::Reference< beans::XPropertySet > xShapeProps(aItr->xShape, uno::UNO_QUERY); - uno::Reference< beans::XPropertySet > xShapeProps(aItr->xShape, uno::UNO_QUERY);
- if (xShapeProps.is()) - if (xShapeProps.is())
- { - {
- try - try
- { - {
- xShapeProps->getPropertyValue( sCaptionPoint ) >>= aCaptionPoint; - xShapeProps->getPropertyValue( sCaptionPoint ) >>= aCaptionPoint;
- } - }
- catch ( uno::Exception& ) - catch ( uno::Exception& )
- { - {
- DBG_ERROR("This Captionshape has no CaptionPoint property."); - DBG_ERROR("This Captionshape has no CaptionPoint property.");
- } - }
- } - }
- Point aCorePoint(aPoint.X, aPoint.Y); - Point aCorePoint(aPoint.X, aPoint.Y);
- Point aCoreCaptionPoint(aCaptionPoint.X, aCaptionPoint.Y); - Point aCoreCaptionPoint(aCaptionPoint.X, aCaptionPoint.Y);
- aCoreCaptionPoint += aCorePoint; - aCoreCaptionPoint += aCorePoint;
- aRectangle.Union(Rectangle(aCoreCaptionPoint, aCoreCaptionPoint)); - aRectangle.Union(Rectangle(aCoreCaptionPoint, aCoreCaptionPoint));
- -
- Point aBeforeRightBottomPoint(aRectangle.BottomRight()); - Point aBeforeRightBottomPoint(aRectangle.BottomRight());
- -
- aRectangle += aRec.TopLeft(); - aRectangle += aRec.TopLeft();
- if (aRectangle.Left() > aRec.Right()) - if (aRectangle.Left() > aRec.Right())
- aRectangle -= (Point(aRectangle.Left() - aRec.Right() + 2, 0)); - aRectangle -= (Point(aRectangle.Left() - aRec.Right() + 2, 0));
- if (aRectangle.Top() > aRec.Bottom()) - if (aRectangle.Top() > aRec.Bottom())
- aRectangle -= (Point(0, aRectangle.Top() - aRec.Bottom() + 2)); - aRectangle -= (Point(0, aRectangle.Top() - aRec.Bottom() + 2));
- -
- Point aDifferencePoint(aRectangle.BottomRight() - aBeforeRightBottomPoint); - Point aDifferencePoint(aRectangle.BottomRight() - aBeforeRightBottomPoint);
- aPoint.X += aDifferencePoint.X(); - aPoint.X += aDifferencePoint.X();
- aPoint.Y += aDifferencePoint.Y(); - aPoint.Y += aDifferencePoint.Y();
- -
- aItr->xShape->setPosition(aPoint); - aItr->xShape->setPosition(aPoint);
- } - }
- else - else
- { - {
- // #96159# it is possible, that shapes have a negative position - // #96159# it is possible, that shapes have a negative position
- // this is now handled here - // this is now handled here
- DBG_ERROR("no or negative end address of this shape"); - DBG_ERROR("no or negative end address of this shape");
- awt::Point aRefPoint; - awt::Point aRefPoint;
- aRefPoint.X = aRec.Left(); - aRefPoint.X = aRec.Left();
- aRefPoint.Y = aRec.Top(); - aRefPoint.Y = aRec.Top();
- aPoint.X += aRefPoint.X; - aPoint.X += aRefPoint.X;
- if (aPoint.X > aRec.Right()) - if (aPoint.X > aRec.Right())
- aPoint.X = aRec.Right() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips - aPoint.X = aRec.Right() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
- aPoint.Y += aRefPoint.Y; - aPoint.Y += aRefPoint.Y;
- if (aPoint.Y > aRec.Bottom()) - if (aPoint.Y > aRec.Bottom())
- aPoint.Y = aRec.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips - aPoint.Y = aRec.Bottom() - 2; // decrement by 2 100th_mm because the cellheight is internal in twips
- aItr->xShape->setPosition(aPoint); - aItr->xShape->setPosition(aPoint);
- } - }
- } - }
- } - }
- } - }
- } - }
- } - }
- else - else
- { - {
- DBG_ERROR("something wents wrong"); - DBG_ERROR("something wents wrong");
- } - }
- } - }
- // #i78086# call CreateChartListener also for invalid position (anchored to sheet) - // #i78086# call CreateChartListener also for invalid position (anchored to sheet)
- if (IsOLE(aItr->xShape)) - if (IsOLE(aItr->xShape))
- { - {
- uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY ); - uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
- uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo()); - uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
- rtl::OUString sName; - rtl::OUString sName;
- if (xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) && - if (xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
- (xShapeProps->getPropertyValue(sPersistName) >>= sName)) - (xShapeProps->getPropertyValue(sPersistName) >>= sName))
- CreateChartListener(pDoc, sName, aItr->pRangeList); - CreateChartListener(pDoc, sName, aItr->pRangeList);
- } - }
- if (aItr->pRangeList) - if (aItr->pRangeList)
- delete aItr->pRangeList; - delete aItr->pRangeList;
- aItr = aShapes.erase(aItr); - aItr = aShapes.erase(aItr);
- } - }
- rImport.UnlockSolarMutex(); - rImport.UnlockSolarMutex();
-// if (pCollection) -// if (pCollection)
-// pDoc->SetChartListenerCollection(pCollection); -// pDoc->SetChartListenerCollection(pCollection);
+ uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY ); + uno::Reference < beans::XPropertySet > xShapeProps ( aItr->xShape, uno::UNO_QUERY );
+ uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo()); + uno::Reference < beans::XPropertySetInfo > xShapeInfo(xShapeProps->getPropertySetInfo());
+ rtl::OUString sName;
+
+ if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
+ (xShapeProps->getPropertyValue(sPersistName) >>= sName))
+ CreateChartListener(pDoc, sName, aItr->sRangeList);
}
+ aItr = aShapes.erase(aItr);
}
+ +
+ rImport.UnlockSolarMutex(); + rtl::OUString sName;
} + if (pDoc && xShapeProps.is() && xShapeInfo.is() && xShapeInfo->hasPropertyByName(sPersistName) &&
++ (xShapeProps->getPropertyValue(sPersistName) >>= sName))
+ CreateChartListener(pDoc, sName, aItr->sRangeList);
}
+ aItr = aShapes.erase(aItr);
}
+ rImport.UnlockSolarMutex();
}
} }
diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.hxx sc/source/filter/xml/XMLTableShapeResizer.hxx diff -ru sc.orig/source/filter/xml/XMLTableShapeResizer.hxx sc/source/filter/xml/XMLTableShapeResizer.hxx
--- sc.orig/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 12:39:13.000000000 +0100 --- sc.orig/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 12:39:13.000000000 +0100
+++ sc/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 15:22:38.000000000 +0100 +++ sc/source/filter/xml/XMLTableShapeResizer.hxx 2009-06-04 15:22:38.000000000 +0100

@ -1,87 +0,0 @@
diff -r 3c24aa9a7810 desktop/source/app/cmdlineargs.cxx
--- a/desktop/source/app/cmdlineargs.cxx Sat Jan 23 16:31:03 2010 +0000
+++ b/desktop/source/app/cmdlineargs.cxx Tue Feb 02 13:59:39 2010 +0000
@@ -396,7 +396,7 @@
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart" )) == sal_True )
{
-#if defined(WNT) || defined(OS2) || defined(QUARTZ)
+#if defined(ENABLE_QUICKSTART_APPLET)
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
#endif
SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
diff -r 3c24aa9a7810 desktop/source/app/makefile.mk
--- a/desktop/source/app/makefile.mk Sat Jan 23 16:31:03 2010 +0000
+++ b/desktop/source/app/makefile.mk Tue Feb 02 13:59:39 2010 +0000
@@ -53,6 +53,10 @@
# DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
# .ENDIF
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
+CFLAGS+=-DENABLE_QUICKSTART_APPLET
+.ENDIF
+
SHL1TARGET = sofficeapp
SHL1OBJS = \
$(SLO)$/app.obj \
diff -r 3c24aa9a7810 sfx2/source/appl/shutdownicon.cxx
--- a/sfx2/source/appl/shutdownicon.cxx Sat Jan 23 16:31:03 2010 +0000
+++ b/sfx2/source/appl/shutdownicon.cxx Tue Feb 02 13:59:39 2010 +0000
@@ -555,8 +555,8 @@
return;
// always remove ourselves as listener
+ pInst->m_bListenForTermination = true;
xDesktop->removeTerminateListener( pInst );
- pInst->m_bListenForTermination = true;
// terminate desktop only if no tasks exist
Reference< XFramesSupplier > xSupplier( xDesktop, UNO_QUERY );
diff -r 3c24aa9a7810 sfx2/source/appl/shutdowniconunx.cxx
--- a/sfx2/source/appl/shutdowniconunx.cxx Sat Jan 23 16:31:03 2010 +0000
+++ b/sfx2/source/appl/shutdowniconunx.cxx Tue Feb 02 13:59:39 2010 +0000
@@ -39,6 +39,7 @@
static EggTrayIcon *pTrayIcon;
static GtkWidget *pExitMenuItem = NULL;
static GtkWidget *pOpenMenuItem = NULL;
+static GtkWidget *pDisableMenuItem = NULL;
static void open_url_cb( GtkWidget *, gpointer data )
{
@@ -67,8 +68,10 @@
static void exit_quickstarter_cb( GtkWidget * )
{
egg_tray_icon_cancel_message (pTrayIcon, 1 );
- ShutdownIcon::getInstance()->terminateDesktop();
plugin_shutdown_sys_tray();
+ //terminate may cause this .so to be unloaded. So we must be hands off
+ //all calls into this .so after this call
+ ShutdownIcon::terminateDesktop();
}
static void menu_deactivate_cb( GtkWidget *pMenu )
@@ -265,7 +268,7 @@
pMenuItem = gtk_separator_menu_item_new();
gtk_menu_shell_append( pMenuShell, pMenuItem );
- (void) add_image_menu_item
+ pDisableMenuItem = add_image_menu_item
( pMenuShell, GTK_STOCK_CLOSE,
pShutdownIcon->GetResString( STR_QUICKSTART_PRELAUNCH_UNX ),
G_CALLBACK( systray_disable_cb ) );
@@ -289,6 +292,7 @@
bool bModal = ShutdownIcon::bModalMode;
gtk_widget_set_sensitive( pExitMenuItem, !bModal);
gtk_widget_set_sensitive( pOpenMenuItem, !bModal);
+ gtk_widget_set_sensitive( pDisableMenuItem, !bModal);
}
extern "C" {
@@ -404,6 +409,7 @@
pTrayIcon = NULL;
pExitMenuItem = NULL;
pOpenMenuItem = NULL;
+ pDisableMenuItem = NULL;
}
#endif // ENABLE_QUICKSTART_APPLET

@ -1,644 +0,0 @@
--- cppu/source/threadpool/jobqueue.cxx 2008-04-11 11:33:02.000000000 +0100
+++ cppu/source/threadpool/jobqueue.cxx 2009-12-02 16:14:26.000000000 +0000
@@ -45,6 +45,7 @@
m_cndWait( osl_createCondition() )
{
osl_resetCondition( m_cndWait );
+ m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
}
JobQueue::~JobQueue()
@@ -71,7 +72,7 @@
{
// synchronize with the dispose calls
MutexGuard guard( m_mutex );
- if( DisposedCallerAdmin::getInstance()->isDisposed( nDisposeId ) )
+ if( m_DisposedCallerAdmin->isDisposed( nDisposeId ) )
{
return 0;
}
--- cppu/source/threadpool/jobqueue.hxx 2008-04-11 11:33:18.000000000 +0100
+++ cppu/source/threadpool/jobqueue.hxx 2009-12-02 16:15:49.000000000 +0000
@@ -37,6 +37,8 @@
#include <osl/conditn.h>
#include <osl/mutex.hxx>
+#include <boost/shared_ptr.hpp>
+
namespace cppu_threadpool
{
extern "C" typedef void (SAL_CALL RequestFun)(void *);
@@ -51,6 +53,9 @@
typedef ::std::list < sal_Int64 > CallStackList;
+ class DisposedCallerAdmin;
+ typedef boost::shared_ptr<DisposedCallerAdmin> DisposedCallerAdminHolder;
+
class JobQueue
{
public:
@@ -76,6 +81,7 @@
sal_Int32 m_nToDo;
sal_Bool m_bSuspended;
oslCondition m_cndWait;
+ DisposedCallerAdminHolder m_DisposedCallerAdmin;
};
}
--- cppu/source/threadpool/thread.cxx 2008-04-11 11:34:00.000000000 +0100
+++ cppu/source/threadpool/thread.cxx 2009-12-03 16:15:02.000000000 +0000
@@ -31,6 +31,8 @@
#include <osl/diagnose.h>
#include <uno/threadpool.h>
+#include <rtl/instance.hxx>
+
#include "thread.hxx"
#include "jobqueue.hxx"
#include "threadpool.hxx"
@@ -98,20 +100,17 @@
} while( pCurrent );
}
- ThreadAdmin* ThreadAdmin::getInstance()
+ struct theThreadAdmin : public rtl::StaticWithInit< ThreadAdminHolder, theThreadAdmin >
{
- static ThreadAdmin *pThreadAdmin = 0;
- if( ! pThreadAdmin )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pThreadAdmin )
- {
- static ThreadAdmin admin;
- pThreadAdmin = &admin;
- }
+ ThreadAdminHolder operator () () {
+ ThreadAdminHolder aRet(new ThreadAdmin());
+ return aRet;
}
- return pThreadAdmin;
+ };
+ ThreadAdminHolder& ThreadAdmin::getInstance()
+ {
+ return theThreadAdmin::get();
}
// ----------------------------------------------------------------------------------
@@ -119,12 +118,13 @@
const ByteSequence &aThreadId,
sal_Bool bAsynchron )
: m_thread( 0 )
+ , m_aThreadAdmin( ThreadAdmin::getInstance() )
, m_pQueue( pQueue )
, m_aThreadId( aThreadId )
, m_bAsynchron( bAsynchron )
, m_bDeleteSelf( sal_True )
{
- ThreadAdmin::getInstance()->add( this );
+ m_aThreadAdmin->add( this );
}
@@ -166,7 +166,7 @@
void ORequestThread::onTerminated()
{
- ThreadAdmin::getInstance()->remove( this );
+ m_aThreadAdmin->remove( this );
if( m_bDeleteSelf )
{
delete this;
@@ -175,6 +175,8 @@
void ORequestThread::run()
{
+ ThreadPoolHolder theThreadPool = cppu_threadpool::ThreadPool::getInstance();
+
while ( m_pQueue )
{
if( ! m_bAsynchron )
@@ -197,7 +199,7 @@
if( m_pQueue->isEmpty() )
{
- ThreadPool::getInstance()->revokeQueue( m_aThreadId , m_bAsynchron );
+ theThreadPool->revokeQueue( m_aThreadId , m_bAsynchron );
// Note : revokeQueue might have failed because m_pQueue.isEmpty()
// may be false (race).
}
@@ -211,7 +213,7 @@
uno_releaseIdFromCurrentThread();
}
- cppu_threadpool::ThreadPool::getInstance()->waitInPool( this );
+ theThreadPool->waitInPool( this );
}
}
}
--- cppu/source/threadpool/thread.hxx 2008-04-11 11:34:18.000000000 +0100
+++ cppu/source/threadpool/thread.hxx 2009-12-02 15:58:34.000000000 +0000
@@ -37,6 +37,8 @@
namespace cppu_threadpool {
class JobQueue;
+ class ThreadAdmin;
+ typedef boost::shared_ptr<ThreadAdmin> ThreadAdminHolder;
//-----------------------------------------
// private thread class for the threadpool
@@ -61,6 +63,7 @@
private:
oslThread m_thread;
+ ThreadAdminHolder m_aThreadAdmin;
JobQueue *m_pQueue;
::rtl::ByteSequence m_aThreadId;
sal_Bool m_bAsynchron;
@@ -71,7 +74,7 @@
{
public:
~ThreadAdmin ();
- static ThreadAdmin *getInstance();
+ static ThreadAdminHolder &getInstance();
void add( ORequestThread * );
void remove( ORequestThread * );
void join();
--- cppu/source/threadpool/threadpool.cxx 2008-04-11 11:34:54.000000000 +0100
+++ cppu/source/threadpool/threadpool.cxx 2009-12-03 16:14:56.000000000 +0000
@@ -33,6 +33,7 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <osl/thread.h>
+#include <rtl/instance.hxx>
#include <uno/threadpool.h>
@@ -44,19 +45,17 @@
namespace cppu_threadpool
{
- DisposedCallerAdmin *DisposedCallerAdmin::getInstance()
+ struct theDisposedCallerAdmin :
+ public rtl::StaticWithInit< DisposedCallerAdminHolder, theDisposedCallerAdmin >
{
- static DisposedCallerAdmin *pDisposedCallerAdmin = 0;
- if( ! pDisposedCallerAdmin )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pDisposedCallerAdmin )
- {
- static DisposedCallerAdmin admin;
- pDisposedCallerAdmin = &admin;
- }
+ DisposedCallerAdminHolder operator () () {
+ return DisposedCallerAdminHolder(new DisposedCallerAdmin());
}
- return pDisposedCallerAdmin;
+ };
+
+ DisposedCallerAdminHolder DisposedCallerAdmin::getInstance()
+ {
+ return theDisposedCallerAdmin::get();
}
DisposedCallerAdmin::~DisposedCallerAdmin()
@@ -107,6 +106,21 @@
//-------------------------------------------------------------------------------
+
+ struct theThreadPool :
+ public rtl::StaticWithInit< ThreadPoolHolder, theThreadPool >
+ {
+ ThreadPoolHolder operator () () {
+ ThreadPoolHolder aRet(new ThreadPool());
+ return aRet;
+ }
+ };
+
+ ThreadPool::ThreadPool()
+ {
+ m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance();
+ }
+
ThreadPool::~ThreadPool()
{
#if OSL_DEBUG_LEVEL > 1
@@ -116,19 +130,9 @@
}
#endif
}
- ThreadPool *ThreadPool::getInstance()
+ ThreadPoolHolder ThreadPool::getInstance()
{
- static ThreadPool *pThreadPool = 0;
- if( ! pThreadPool )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pThreadPool )
- {
- static ThreadPool pool;
- pThreadPool = &pool;
- }
- }
- return pThreadPool;
+ return theThreadPool::get();
}
@@ -136,7 +140,7 @@
{
if( nDisposeId )
{
- DisposedCallerAdmin::getInstance()->dispose( nDisposeId );
+ m_DisposedCallerAdmin->dispose( nDisposeId );
MutexGuard guard( m_mutex );
for( ThreadIdHashMap::iterator ii = m_mapQueue.begin() ;
@@ -171,7 +175,7 @@
void ThreadPool::stopDisposing( sal_Int64 nDisposeId )
{
- DisposedCallerAdmin::getInstance()->stopDisposing( nDisposeId );
+ m_DisposedCallerAdmin->stopDisposing( nDisposeId );
}
/******************
@@ -400,7 +404,7 @@
-typedef ::std::hash_set< uno_ThreadPool, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
+typedef ::std::hash_map< uno_ThreadPool, ThreadPoolHolder, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet;
static ThreadpoolHashSet *g_pThreadpoolHashSet;
@@ -420,7 +424,7 @@
// Just ensure that the handle is unique in the process (via heap)
uno_ThreadPool h = new struct _uno_ThreadPool;
- g_pThreadpoolHashSet->insert( h );
+ g_pThreadpoolHashSet->insert( ThreadpoolHashSet::value_type(h, ThreadPool::getInstance()) );
return h;
}
--- cppu/source/threadpool/threadpool.hxx 2008-04-11 11:35:13.000000000 +0100
+++ cppu/source/threadpool/threadpool.hxx 2009-12-02 16:12:13.000000000 +0000
@@ -33,6 +33,8 @@
#include <rtl/byteseq.hxx>
+#include <boost/shared_ptr.hpp>
+
#include "jobqueue.hxx"
@@ -78,13 +80,16 @@
};
typedef ::std::list < struct ::cppu_threadpool::WaitingThread * > WaitingThreadList;
+
+ class DisposedCallerAdmin;
+ typedef boost::shared_ptr<DisposedCallerAdmin> DisposedCallerAdminHolder;
class DisposedCallerAdmin
{
public:
~DisposedCallerAdmin();
- static DisposedCallerAdmin *getInstance();
+ static DisposedCallerAdminHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@@ -95,11 +100,15 @@
DisposedCallerList m_lst;
};
+ class ThreadPool;
+ typedef boost::shared_ptr<ThreadPool> ThreadPoolHolder;
+
class ThreadPool
{
public:
+ ThreadPool();
~ThreadPool();
- static ThreadPool *getInstance();
+ static ThreadPoolHolder getInstance();
void dispose( sal_Int64 nDisposeId );
void stopDisposing( sal_Int64 nDisposeId );
@@ -127,6 +136,8 @@
::osl::Mutex m_mutexWaitingThreadList;
WaitingThreadList m_lstThreads;
+
+ DisposedCallerAdminHolder m_DisposedCallerAdmin;
};
} // end namespace cppu_threadpool
--- cppu/source/uno/lbenv.cxx 2009-02-12 10:18:09.000000000 +0000
+++ cppu/source/uno/lbenv.cxx 2009-12-03 16:14:26.000000000 +0000
@@ -142,6 +142,7 @@
::osl::Mutex mutex;
OUString2EnvironmentMap aName2EnvMap;
+ EnvironmentsData() : isDisposing(false) {}
~EnvironmentsData();
inline void getEnvironment(
@@ -150,6 +151,8 @@
inline void getRegisteredEnvironments(
uno_Environment *** pppEnvs, sal_Int32 * pnLen,
uno_memAlloc memAlloc, const OUString & rEnvDcp );
+
+ bool isDisposing;
};
namespace
@@ -598,9 +601,14 @@
*ppHardEnv = 0;
}
+ EnvironmentsData & rData = theEnvironmentsData::get();
+
+ if (rData.isDisposing)
+ return;
+
uno_DefaultEnvironment * that = (uno_DefaultEnvironment *)pEnv;
{
- ::osl::MutexGuard guard( theEnvironmentsData::get().mutex );
+ ::osl::MutexGuard guard( rData.mutex );
if (1 == ::osl_incrementInterlockedCount( &that->nRef )) // is dead
{
that->nRef = 0;
@@ -917,6 +925,7 @@
EnvironmentsData::~EnvironmentsData()
{
::osl::MutexGuard guard( mutex );
+ isDisposing = true;
for ( OUString2EnvironmentMap::const_iterator iPos( aName2EnvMap.begin() );
iPos != aName2EnvMap.end(); ++iPos )
--- cppu/util/target.pmk 2008-04-11 12:07:15.000000000 +0100
+++ cppu/util/target.pmk 2009-12-02 15:50:08.000000000 +0000
@@ -55,12 +55,3 @@
.ENDIF
.ENDIF
-
-# other stuff
-
-.IF "$(cppu_no_leak)" == ""
-.IF "$(bndchk)" == ""
-CFLAGS += -DCPPU_LEAK_STATIC_DATA
-.ENDIF
-.ENDIF
-
--- package/inc/ZipPackageFolder.hxx 2010-06-22 11:49:17.000000000 +0100
+++ package/inc/ZipPackageFolder.hxx 2010-06-22 12:50:26.000000000 +0100
@@ -53,8 +53,6 @@
::com::sun::star::container::XEnumerationAccess
>
{
- static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
-
protected:
ContentHash maContents;
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
@@ -82,10 +80,7 @@
throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
static void copyZipEntry( ZipEntry &rDest, const ZipEntry &rSource);
- static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId()
- {
- return aImplementationId;
- }
+ static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; }
void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
--- package/source/xstor/owriteablestream.cxx 2010-06-22 11:49:15.000000000 +0100
+++ package/source/xstor/owriteablestream.cxx 2010-06-22 12:13:20.000000000 +0100
@@ -53,6 +53,7 @@
#include <rtl/digest.h>
#include <rtl/logfile.hxx>
+#include <rtl/instance.hxx>
// since the copying uses 32000 blocks usually, it makes sense to have a smaller size
#define MAX_STORCACHE_SIZE 30000
@@ -2169,25 +2170,14 @@
return m_pData->m_pTypeCollection->getTypes() ;
}
+namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
+
//-----------------------------------------------
uno::Sequence< sal_Int8 > SAL_CALL OWriteStream::getImplementationId()
throw( uno::RuntimeException )
{
- static ::cppu::OImplementationId* pID = NULL ;
-
- if ( pID == NULL )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
-
- if ( pID == NULL )
- {
- static ::cppu::OImplementationId aID( sal_False ) ;
- pID = &aID ;
- }
- }
-
- return pID->getImplementationId() ;
-
+ ::cppu::OImplementationId &rId = lcl_ImplId::get();
+ return rId.getImplementationId();
}
//-----------------------------------------------
--- package/source/xstor/xstorage.cxx 2010-06-22 11:49:15.000000000 +0100
+++ package/source/xstor/xstorage.cxx 2010-06-22 12:11:45.000000000 +0100
@@ -48,6 +48,7 @@
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/instance.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx>
@@ -2367,25 +2368,14 @@
return m_pData->m_pTypeCollection->getTypes() ;
}
+namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
+
//-----------------------------------------------
uno::Sequence< sal_Int8 > SAL_CALL OStorage::getImplementationId()
throw( uno::RuntimeException )
{
- static ::cppu::OImplementationId* pID = NULL ;
-
- if ( pID == NULL )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ) ;
-
- if ( pID == NULL )
- {
- static ::cppu::OImplementationId aID( sal_False ) ;
- pID = &aID ;
- }
- }
-
- return pID->getImplementationId() ;
-
+ ::cppu::OImplementationId &rID = lcl_ImplId::get();
+ return rID.getImplementationId();
}
//____________________________________________________________________________________________________
--- package/source/zippackage/ZipPackage.cxx 2010-06-22 11:49:16.000000000 +0100
+++ package/source/zippackage/ZipPackage.cxx 2010-06-22 12:12:00.000000000 +0100
@@ -68,6 +68,7 @@
#include <rtl/uri.hxx>
#include <rtl/random.h>
#include <rtl/logfile.hxx>
+#include <rtl/instance.hxx>
#include <osl/time.h>
#include <osl/file.hxx>
#include "com/sun/star/io/XAsyncOutputMonitor.hpp"
@@ -1585,21 +1586,14 @@
static_getSupportedServiceNames());
}
+namespace { struct lcl_ImplId : public rtl::Static< ::cppu::OImplementationId, lcl_ImplId > {}; }
+
// XUnoTunnel
Sequence< sal_Int8 > ZipPackage::getUnoTunnelImplementationId( void )
throw (RuntimeException)
{
- static ::cppu::OImplementationId * pId = 0;
- if (! pId)
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if (! pId)
- {
- static ::cppu::OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ ::cppu::OImplementationId &rId = lcl_ImplId::get();
+ return rId.getImplementationId();
}
sal_Int64 SAL_CALL ZipPackage::getSomething( const Sequence< sal_Int8 >& aIdentifier )
--- package/source/zippackage/ZipPackageFolder.cxx 2010-06-22 11:49:16.000000000 +0100
+++ package/source/zippackage/ZipPackageFolder.cxx 2010-06-22 12:50:00.000000000 +0100
@@ -43,6 +43,7 @@
#include <com/sun/star/io/XSeekable.hpp>
#include <EncryptedDataHeader.hxx>
#include <rtl/random.h>
+#include <rtl/instance.hxx>
#include <memory>
using namespace com::sun::star::packages::zip::ZipConstants;
@@ -59,7 +60,7 @@
using namespace ::com::sun::star;
using vos::ORef;
-Sequence < sal_Int8 > ZipPackageFolder::aImplementationId = Sequence < sal_Int8 > ();
+namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
ZipPackageFolder::ZipPackageFolder ( const Reference< XMultiServiceFactory >& xFactory,
sal_Int32 nFormat,
@@ -80,10 +81,9 @@
aEntry.nCompressedSize = 0;
aEntry.nSize = 0;
aEntry.nOffset = -1;
- if ( !aImplementationId.getLength() )
- {
- aImplementationId = getImplementationId();
- }
+ Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
+ if ( !rCachedImplId.getLength() )
+ rCachedImplId = getImplementationId();
}
@@ -187,6 +187,11 @@
rDest.nExtraLen = rSource.nExtraLen;
}
+const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageFolder::static_getImplementationId()
+{
+ return lcl_CachedImplId::get();
+}
+
// XNameContainer
void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const Any& aElement )
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
--- package/source/zippackage/ZipPackageStream.cxx 2010-06-22 11:49:16.000000000 +0100
+++ package/source/zippackage/ZipPackageStream.cxx 2010-06-22 12:53:32.000000000 +0100
@@ -45,6 +45,8 @@
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
+#include <rtl/instance.hxx>
+
#include <PackageConstants.hxx>
using namespace com::sun::star::packages::zip::ZipConstants;
@@ -55,8 +57,12 @@
using namespace cppu;
using namespace rtl;
-Sequence < sal_Int8 > ZipPackageStream::aImplementationId = Sequence < sal_Int8 > ();
+namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; }
+const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageStream::static_getImplementationId()
+{
+ return lcl_CachedImplId::get();
+}
ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
const Reference< XMultiServiceFactory >& xFactory,
@@ -91,10 +97,9 @@
aEntry.nPathLen = -1;
aEntry.nExtraLen = -1;
- if ( !aImplementationId.getLength() )
- {
- aImplementationId = getImplementationId();
- }
+ Sequence < sal_Int8 > &rCachedImplId = lcl_CachedImplId::get();
+ if ( !rCachedImplId.getLength() )
+ rCachedImplId = getImplementationId();
}
ZipPackageStream::~ZipPackageStream( void )
--- package/source/zippackage/ZipPackageStream.hxx 2010-06-22 11:49:16.000000000 +0100
+++ package/source/zippackage/ZipPackageStream.hxx 2010-06-22 12:51:18.000000000 +0100
@@ -55,7 +55,6 @@
::com::sun::star::packages::XDataSinkEncrSupport
>
{
- static com::sun::star::uno::Sequence < sal_Int8 > aImplementationId;
protected:
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > m_xFactory;
@@ -146,10 +145,7 @@
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData()
throw(::com::sun::star::uno::RuntimeException);
- static ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId()
- {
- return aImplementationId;
- }
+ static const ::com::sun::star::uno::Sequence < sal_Int8 >& static_getImplementationId();
// XActiveDataSink
virtual void SAL_CALL setInputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& aStream )

@ -49,12 +49,13 @@ diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python
index e586876..0876b53 100644 index e586876..0876b53 100644
--- a/scp2/source/python/file_python.scp --- a/scp2/source/python/file_python.scp
+++ b/scp2/source/python/file_python.scp +++ b/scp2/source/python/file_python.scp
@@ -104,16 +104,6 @@ End @@ -104,18 +104,6 @@
#endif #endif
#endif #endif
-// Scripting Framework Python script proxy -// Scripting Framework Python script proxy
- -
-#ifndef AIX
-File gid_File_Py_Pythonscript -File gid_File_Py_Pythonscript
- TXT_FILE_BODY; - TXT_FILE_BODY;
- Dir = gid_Dir_Program; - Dir = gid_Dir_Program;
@ -62,6 +63,7 @@ index e586876..0876b53 100644
- RegistryID = gid_Starregistry_Services_Rdb; - RegistryID = gid_Starregistry_Services_Rdb;
- Styles = (PACKED,UNO_COMPONENT); - Styles = (PACKED,UNO_COMPONENT);
-End -End
-#endif
- -
//Scripting Framework Python example scripts //Scripting Framework Python example scripts

Loading…
Cancel
Save