summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:51:11 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-07-21 18:51:11 +0200
commit200bc6c582d6cf2365001f27928c1e3d1f9c9845 (patch)
tree0f27abe75bc3603341aef715372676aee8d86835 /sfx2
parent01ea92166c12fe080575f8faba4162779fb46c28 (diff)
parent1b465fcc0f5f699308c6ee5113dde6b82842c3dd (diff)
resyncing to master
Diffstat (limited to 'sfx2')
-rwxr-xr-xsfx2/CppunitTest_sfx2_metadatable.mk6
-rwxr-xr-xsfx2/Library_qstart.mk13
-rwxr-xr-xsfx2/Library_sfx.mk17
-rw-r--r--sfx2/inc/sfx2/app.hxx1
-rw-r--r--sfx2/inc/sfx2/bindings.hxx11
-rw-r--r--sfx2/inc/sfx2/childwin.hxx2
-rw-r--r--sfx2/inc/sfx2/dispatch.hxx1
-rw-r--r--sfx2/inc/sfx2/printopt.hxx21
-rw-r--r--sfx2/inc/sfx2/sfxbasecontroller.hxx2
-rw-r--r--sfx2/inc/sfx2/sfxbasemodel.hxx1
-rwxr-xr-xsfx2/inc/sfx2/sfxcommands.h2
-rwxr-xr-xsfx2/inc/sfx2/sfxsids.hrc3
-rw-r--r--sfx2/inc/sfx2/sfxuno.hxx4
-rw-r--r--sfx2/inc/sfx2/viewfrm.hxx1
-rw-r--r--sfx2/inc/srchdlg.hxx2
-rw-r--r--sfx2/prj/build.lst2
-rwxr-xr-xsfx2/qa/cppunit/version.map34
-rwxr-xr-xsfx2/sdi/appslots.sdi8
-rwxr-xr-xsfx2/sdi/sfx.sdi50
-rw-r--r--sfx2/source/appl/app.cxx29
-rw-r--r--sfx2/source/appl/appbas.cxx16
-rw-r--r--sfx2/source/appl/appserv.cxx59
-rw-r--r--sfx2/source/appl/appuno.cxx77
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx15
-rw-r--r--sfx2/source/appl/helpinterceptor.hxx1
-rw-r--r--sfx2/source/appl/newhelp.cxx21
-rw-r--r--sfx2/source/appl/newhelp.hxx5
-rw-r--r--sfx2/source/appl/sfxhelp.cxx42
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/appl/shutdowniconw32.cxx39
-rw-r--r--sfx2/source/appl/workwin.cxx141
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx16
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx41
-rw-r--r--sfx2/source/bastyp/helper.cxx486
-rw-r--r--sfx2/source/bastyp/misc.cxx16
-rw-r--r--sfx2/source/bastyp/progress.cxx16
-rw-r--r--sfx2/source/control/bindings.cxx77
-rw-r--r--sfx2/source/control/dispatch.cxx101
-rw-r--r--sfx2/source/control/objface.cxx51
-rw-r--r--sfx2/source/control/request.cxx22
-rw-r--r--sfx2/source/control/shell.cxx25
-rw-r--r--sfx2/source/control/statcach.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx4
-rwxr-xr-xsfx2/source/dialog/dialog.hrc1
-rw-r--r--sfx2/source/dialog/partwnd.cxx5
-rw-r--r--sfx2/source/dialog/passwd.cxx1
-rw-r--r--sfx2/source/dialog/printopt.cxx28
-rwxr-xr-xsfx2/source/dialog/printopt.hrc7
-rw-r--r--sfx2/source/dialog/printopt.src122
-rw-r--r--sfx2/source/dialog/srchdlg.cxx6
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx87
-rw-r--r--sfx2/source/doc/docfac.cxx11
-rw-r--r--sfx2/source/doc/docfile.cxx8
-rw-r--r--sfx2/source/doc/objmisc.cxx5
-rw-r--r--sfx2/source/doc/objstor.cxx14
-rw-r--r--sfx2/source/doc/oleprops.cxx32
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx45
-rw-r--r--sfx2/source/inc/helper.hxx19
-rw-r--r--sfx2/source/inc/partwnd.hxx3
-rw-r--r--sfx2/source/inc/sfxtypes.hxx4
-rw-r--r--sfx2/source/inc/templdgi.hxx17
-rw-r--r--sfx2/source/inc/workwin.hxx13
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx21
-rw-r--r--sfx2/source/view/viewfrm.cxx14
-rw-r--r--sfx2/source/view/viewfrm2.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx33
-rwxr-xr-xsfx2/util/sfx.component2
-rw-r--r--sfx2/workben/custompanel/ctp_services.cxx6
70 files changed, 394 insertions, 1605 deletions
diff --git a/sfx2/CppunitTest_sfx2_metadatable.mk b/sfx2/CppunitTest_sfx2_metadatable.mk
index 0824d40cfa64..09c2b320b1de 100755
--- a/sfx2/CppunitTest_sfx2_metadatable.mk
+++ b/sfx2/CppunitTest_sfx2_metadatable.mk
@@ -31,6 +31,11 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sfx2_metadatable, \
sfx2/qa/cppunit/test_metadatable \
))
+$(eval $(call gb_CppunitTest_add_api,sfx2_metadatable, \
+ udkapi \
+ offapi \
+))
+
$(eval $(call gb_CppunitTest_add_linked_libs,sfx2_metadatable, \
sal \
sfx \
@@ -39,7 +44,6 @@ $(eval $(call gb_CppunitTest_add_linked_libs,sfx2_metadatable, \
$(eval $(call gb_CppunitTest_set_include,sfx2_metadatable,\
$$(INCLUDE) \
- -I$(OUTDIR)/inc/offuh \
))
# vim: set noet sw=4 ts=4:
diff --git a/sfx2/Library_qstart.mk b/sfx2/Library_qstart.mk
index c775d21650d7..3e63dc9959c6 100755
--- a/sfx2/Library_qstart.mk
+++ b/sfx2/Library_qstart.mk
@@ -33,16 +33,27 @@ $(eval $(call gb_Library_set_include,qstart_gtk,\
-I$(SRCDIR)/sfx2/inc \
-I$(SRCDIR)/sfx2/inc/sfx2 \
-I$(SRCDIR)/sfx2/inc/pch \
- -I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc \
$(filter -I%,$(GTK_CFLAGS)) \
))
+$(eval $(call gb_Library_add_api,qstart_gtk,\
+ udkapi \
+ offapi \
+))
+
$(eval $(call gb_Library_add_defs,qstart_gtk,\
-DDLL_NAME=$(notdir $(call gb_Library_get_target,sfx2)) \
-DENABLE_QUICKSTART_APPLET \
))
+ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
+$(eval $(call gb_Library_set_defs,qstart_gtk,\
+ $$(DEFS) \
+ -DENABLE_SYSTRAY_GTK \
+))
+endif
+
$(eval $(call gb_Library_add_cflags,qstart_gtk,\
$(filter-out -I%,$(GTK_CFLAGS)) \
))
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index bb57c4d59d57..d3d294158532 100755
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -38,6 +38,11 @@ $(eval $(call gb_Library_add_sdi_headers,sfx,sfx2/sdi/sfxslots))
$(eval $(call gb_Library_set_componentfile,sfx,sfx2/util/sfx))
+$(eval $(call gb_Library_add_api,sfx,\
+ udkapi \
+ offapi \
+))
+
$(eval $(call gb_Library_set_include,sfx,\
-I$(realpath $(SRCDIR)/sfx2/inc) \
-I$(realpath $(SRCDIR)/sfx2/inc/sfx2) \
@@ -46,7 +51,6 @@ $(eval $(call gb_Library_set_include,sfx,\
-I$(WORKDIR)/SdiTarget/sfx2/sdi \
-I$(WORKDIR)/inc/ \
$$(INCLUDE) \
- -I$(OUTDIR)/inc/offuh \
-I$(OUTDIR)/inc \
))
@@ -54,6 +58,15 @@ $(eval $(call gb_Library_add_defs,sfx,\
-DSFX2_DLLIMPLEMENTATION \
))
+ifeq ($(ENABLE_SYSTRAY_GTK),TRUE)
+$(eval $(call gb_Library_set_defs,sfx,\
+ $$(DEFS) \
+ -DENABLE_QUICKSTART_APPLET \
+ -DENABLE_SYSTRAY_GTK \
+ -DPLUGIN_NAME=libqstart_gtk$(gb_Library_OOOEXT) \
+))
+endif
+
$(eval $(call gb_Library_add_linked_libs,sfx,\
comphelper \
cppu \
@@ -267,7 +280,7 @@ $(eval $(call gb_Library_add_cxxobjects,sfx,\
sfx2/source/appl/shutdowniconw32 \
sfx2/source/doc/sfxacldetect \
sfx2/source/doc/syspathw32 \
- , $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) -nologo -UPRECOMPILED_HEADERS \
+ , $(gb_LinkTarget_EXCEPTIONFLAGS) $(gb_COMPILEROPTFLAGS) -UPRECOMPILED_HEADERS \
))
$(eval $(call gb_Library_add_linked_libs,sfx,\
diff --git a/sfx2/inc/sfx2/app.hxx b/sfx2/inc/sfx2/app.hxx
index 79f08172a621..875185d75d50 100644
--- a/sfx2/inc/sfx2/app.hxx
+++ b/sfx2/inc/sfx2/app.hxx
@@ -138,7 +138,6 @@ class SfxObjectShellLock;
class SFX2_DLLPUBLIC SfxApplication: public SfxShell
{
- SAL_DLLPRIVATE static ::osl::Mutex gMutex;
SAL_DLLPRIVATE static SfxApplication* pApp;
SfxAppData_Impl* pAppData_Impl;
diff --git a/sfx2/inc/sfx2/bindings.hxx b/sfx2/inc/sfx2/bindings.hxx
index 23354d1baf06..a96a821bf0d9 100644
--- a/sfx2/inc/sfx2/bindings.hxx
+++ b/sfx2/inc/sfx2/bindings.hxx
@@ -31,6 +31,7 @@
#include "sal/config.h"
#include "sfx2/dllapi.h"
#include "sal/types.h"
+#include "rtl/strbuf.hxx"
#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/uno/Reference.h>
@@ -216,15 +217,15 @@ public:
#ifdef DBG_UTIL
#define ENTERREGISTRATIONS() EnterRegistrations(__FILE__, __LINE__)
#define LEAVEREGISTRATIONS() LeaveRegistrations(USHRT_MAX, __FILE__, __LINE__)
-#define DENTERREGISTRATIONS( ) \
- EnterRegistrations( (ByteString(__FILE__).Append('(').Append(ByteString::CreateFromInt64((sal_uIntPtr)this).Append(')'))).GetBufferAccess(), __LINE__ )
+#define DENTERREGISTRATIONS() \
+ EnterRegistrations( rtl::OStringBuffer(__FILE__).append('(').append(reinterpret_cast<sal_Int64>(this)).append(')').getStr(), __LINE__ )
#define DLEAVEREGISTRATIONS( ) \
- LeaveRegistrations( USHRT_MAX, (ByteString(__FILE__).Append('(').Append(ByteString::CreateFromInt64((sal_uIntPtr)this).Append(')'))).GetBufferAccess(), __LINE__ )
+ LeaveRegistrations( USHRT_MAX, rtl::OStringBuffer(__FILE__).append('(').append(reinterpret_cast<sal_Int64>(this)).append(')').getStr(), __LINE__ )
#else
#define ENTERREGISTRATIONS() EnterRegistrations()
#define LEAVEREGISTRATIONS() LeaveRegistrations()
-#define DENTERREGISTRATIONS( ) EnterRegistrations()
-#define DLEAVEREGISTRATIONS( ) LeaveRegistrations()
+#define DENTERREGISTRATIONS() EnterRegistrations()
+#define DLEAVEREGISTRATIONS() LeaveRegistrations()
#endif
//--------------------------------------------------------------------
diff --git a/sfx2/inc/sfx2/childwin.hxx b/sfx2/inc/sfx2/childwin.hxx
index 8aeaff3ad0ad..6f5c9b1a3359 100644
--- a/sfx2/inc/sfx2/childwin.hxx
+++ b/sfx2/inc/sfx2/childwin.hxx
@@ -67,7 +67,7 @@ struct SfxChildWinInfo
Size aSize;
sal_uInt16 nFlags;
String aExtraString;
- ByteString aWinState;
+ rtl::OString aWinState;
SfxChildWinInfo()
{
diff --git a/sfx2/inc/sfx2/dispatch.hxx b/sfx2/inc/sfx2/dispatch.hxx
index f6eb60be3755..177918c15421 100644
--- a/sfx2/inc/sfx2/dispatch.hxx
+++ b/sfx2/inc/sfx2/dispatch.hxx
@@ -248,7 +248,6 @@ public:
SAL_DLLPRIVATE void SetModalMode_Impl( sal_Bool bOn );
SAL_DLLPRIVATE sal_Bool IsReadOnlyShell_Impl( sal_uInt16 nShell ) const;
SAL_DLLPRIVATE void RemoveShell_Impl( SfxShell& rShell );
- SAL_DLLPRIVATE void InsertShell_Impl( SfxShell& rShell, sal_uInt16 nPos );
SAL_DLLPRIVATE void DoParentActivate_Impl();
SAL_DLLPRIVATE void DoParentDeactivate_Impl();
SAL_DLLPRIVATE void DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* pOld );
diff --git a/sfx2/inc/sfx2/printopt.hxx b/sfx2/inc/sfx2/printopt.hxx
index 0b25dec5dc38..f58fe53bb4ff 100644
--- a/sfx2/inc/sfx2/printopt.hxx
+++ b/sfx2/inc/sfx2/printopt.hxx
@@ -122,27 +122,6 @@ public:
static SfxTabPage* Create( Window* pParent, const SfxItemSet& rAttrSet );
};
-class TransparencyPrintWarningBox : public ModalDialog
-{
-private:
-
- FixedImage aWarnFI;
- FixedText aWarnFT;
- OKButton aYesBtn;
- PushButton aNoBtn;
- CancelButton aCancelBtn;
- CheckBox aNoWarnCB;
-
- DECL_LINK( ClickNoBtn, PushButton* );
-
-public:
-
- TransparencyPrintWarningBox( Window* pParent );
- ~TransparencyPrintWarningBox();
-
- sal_Bool IsNoWarningChecked() const { return aNoWarnCB.IsChecked(); }
-};
-
#endif // #ifndef _SFX_PRINTOPT_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/inc/sfx2/sfxbasecontroller.hxx b/sfx2/inc/sfx2/sfxbasecontroller.hxx
index cd0f1e8ce50d..b1553f1e06be 100644
--- a/sfx2/inc/sfx2/sfxbasecontroller.hxx
+++ b/sfx2/inc/sfx2/sfxbasecontroller.hxx
@@ -88,8 +88,6 @@ struct IMPL_SfxBaseController_DataContainer ; // impl. struct to hold memb
class SfxViewFrame;
sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID );
-sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup );
-sal_Int16 MapCommandGroupToGroupID( sal_Int16 nCommandGroup );
//________________________________________________________________________________________________________
// class declarations
diff --git a/sfx2/inc/sfx2/sfxbasemodel.hxx b/sfx2/inc/sfx2/sfxbasemodel.hxx
index 167618a792c3..afae566224a8 100644
--- a/sfx2/inc/sfx2/sfxbasemodel.hxx
+++ b/sfx2/inc/sfx2/sfxbasemodel.hxx
@@ -1545,7 +1545,6 @@ private:
SAL_DLLPRIVATE void postEvent_Impl( const ::rtl::OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& xController = ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >() );
SAL_DLLPRIVATE String getEventName_Impl( long nID );
- SAL_DLLPRIVATE void NotifyStorageListeners_Impl();
SAL_DLLPRIVATE bool QuerySaveSizeExceededModules( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler >& xHandler );
SAL_DLLPRIVATE css::uno::Reference< css::frame::XTitle > impl_getTitleHelper ();
diff --git a/sfx2/inc/sfx2/sfxcommands.h b/sfx2/inc/sfx2/sfxcommands.h
index 035f2f187bb8..e7a1d902b9f0 100755
--- a/sfx2/inc/sfx2/sfxcommands.h
+++ b/sfx2/inc/sfx2/sfxcommands.h
@@ -253,7 +253,6 @@
#define CMD_SID_SHOWPOPUPS ".uno:ShowPopups"
#define CMD_SID_BASICIDE_SHOWSBX ".uno:ShowSbx"
#define CMD_SID_SOURCEVIEW ".uno:SourceView"
-#define CMD_SID_ONLINE_REGISTRATION_DLG ".uno:StartRegistrationDialog"
#define CMD_SID_STATUSBARTEXT ".uno:StatusBar"
#define CMD_SID_TOGGLESTATUSBAR ".uno:StatusBarVisible"
#define CMD_SID_BASICIDE_STAT_DATE ".uno:StatusGetDate"
@@ -308,7 +307,6 @@
#define CMD_SID_ADDONHELP ".uno:AddonHelp"
#define CMD_SID_FORMATMENUSTATE ".uno:FormatMenuState"
#define CMD_SID_INET_DLG ".uno:InternetDialog"
-#define CMD_SID_ONLINE_REGISTRATION ".uno:OnlineRegistrationDlg"
#define CMD_SID_OFFICE_CHECK_PLZ ".uno:CheckPLZ"
#define CMD_SID_ADDRESS_DATA_SOURCE ".uno:AutoPilotAddressDataSource"
#define CMD_FN_BUSINESS_CARD ".uno:InsertBusinessCard"
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 594c2691d894..baf4b5615d3b 100755
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -206,9 +206,6 @@
#define SID_BASEURL (SID_SFX_START + 1518)
#define SID_TEMPLATE (SID_SFX_START + 1519)
-#define SID_ONLINE_REGISTRATION (SID_SFX_START + 1537)
-
-#define SID_ONLINE_REGISTRATION_DLG (SID_SFX_START + 1540)
#define SID_CONTENTTYPE (SID_SFX_START + 1541)
#define SID_SAVETO (SID_SFX_START + 1546)
diff --git a/sfx2/inc/sfx2/sfxuno.hxx b/sfx2/inc/sfx2/sfxuno.hxx
index d0fc3601b593..754b31bd1cb1 100644
--- a/sfx2/inc/sfx2/sfxuno.hxx
+++ b/sfx2/inc/sfx2/sfxuno.hxx
@@ -590,7 +590,7 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ
}
//************************************************************************************************************************
-// definition for "extern c component_getFactory()"
+// definition for "extern c sfx_component_getFactory()"
//************************************************************************************************************************
#define CREATEFACTORY(CLASS) \
\
@@ -598,7 +598,7 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, ::com::sun::star::uno::Sequ
xFactory = CLASS::impl_createFactory( xServiceManager );
//************************************************************************************************************************
-// definition for "extern c component_getFactory()"
+// definition for "extern c sfx_component_getFactory()"
//************************************************************************************************************************
#define IF_NAME_CREATECOMPONENTFACTORY(CLASS) \
\
diff --git a/sfx2/inc/sfx2/viewfrm.hxx b/sfx2/inc/sfx2/viewfrm.hxx
index 3c3f1472be8d..f3251802342b 100644
--- a/sfx2/inc/sfx2/viewfrm.hxx
+++ b/sfx2/inc/sfx2/viewfrm.hxx
@@ -235,7 +235,6 @@ public:
SAL_DLLPRIVATE void SetActiveChildFrame_Impl( SfxViewFrame* );
SAL_DLLPRIVATE SfxViewFrame* GetActiveChildFrame_Impl() const;
SAL_DLLPRIVATE String GetActualPresentationURL_Impl() const;
- SAL_DLLPRIVATE static void CloseHiddenFrames_Impl();
SAL_DLLPRIVATE void MiscExec_Impl(SfxRequest &);
SAL_DLLPRIVATE void MiscState_Impl(SfxItemSet &);
SAL_DLLPRIVATE SfxWorkWindow* GetWorkWindow_Impl( sal_uInt16 nId );
diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx
index 2e6d1effb4c7..11891202cc56 100644
--- a/sfx2/inc/srchdlg.hxx
+++ b/sfx2/inc/srchdlg.hxx
@@ -59,7 +59,7 @@ private:
String m_sToggleText;
::rtl::OUString m_sConfigName;
- ByteString m_sWinState;
+ ::rtl::OString m_sWinState;
bool m_bIsConstructed;
diff --git a/sfx2/prj/build.lst b/sfx2/prj/build.lst
index 1cf56d7517cd..52f145af8701 100644
--- a/sfx2/prj/build.lst
+++ b/sfx2/prj/build.lst
@@ -1,2 +1,2 @@
-sf sfx2 : TRANSLATIONS:translations idl basic xmlscript framework readlicense_oo shell sax LIBXML2:libxml2 LIBXSLT:libxslt NULL
+sf sfx2 : TRANSLATIONS:translations NATIVE:idl basic xmlscript framework readlicense_oo shell DESKTOP:setup_native sax LIBXML2:libxml2 LIBXSLT:libxslt NULL
sf sfx2\prj nmake - all sf_prj NULL
diff --git a/sfx2/qa/cppunit/version.map b/sfx2/qa/cppunit/version.map
deleted file mode 100755
index 3308588ef6f8..000000000000
--- a/sfx2/qa/cppunit/version.map
+++ /dev/null
@@ -1,34 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-UDK_3_0_0 {
- global:
- cppunitTestPlugIn;
-
- local:
- *;
-};
diff --git a/sfx2/sdi/appslots.sdi b/sfx2/sdi/appslots.sdi
index 3bd2bc8b1e02..39d26692ceb4 100755
--- a/sfx2/sdi/appslots.sdi
+++ b/sfx2/sdi/appslots.sdi
@@ -232,14 +232,6 @@ shell SfxApplication
//----------------------------------------------------------------------
- SID_ONLINE_REGISTRATION
- [
- ExecMethod = OfaExec_Impl;
- StateMethod = OfaState_Impl;
- ]
-
- //----------------------------------------------------------------------
-
SID_OFFICE_CHECK_PLZ
[
ExecMethod = OfaExec_Impl;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index e69bf590a322..b5b432fa39db 100755
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -5967,31 +5967,6 @@ SfxBoolItem SourceView SID_SOURCEVIEW
]
//--------------------------------------------------------------------------
-SfxVoidItem StartRegistrationDialog SID_ONLINE_REGISTRATION_DLG
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_SPECIAL;
-]
-
-//--------------------------------------------------------------------------
SfxStringItem StatusBar SID_STATUSBARTEXT
[
@@ -7414,31 +7389,6 @@ SfxVoidItem InternetDialog SID_INET_DLG
]
//--------------------------------------------------------------------------
-SfxVoidItem OnlineRegistrationDlg SID_ONLINE_REGISTRATION
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = TRUE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = TRUE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = TRUE,
- GroupId = GID_APPLICATION;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem CheckPLZ SID_OFFICE_CHECK_PLZ
(SfxStringItem PLZ SID_OFFICE_CHECK_PLZ)
[
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index c69b3939ee99..79994569790f 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -148,6 +148,7 @@
#include <svtools/ttprops.hxx>
#include <unotools/extendedsecurityoptions.hxx>
#include <rtl/instance.hxx>
+#include <rtl/strbuf.hxx>
using namespace ::com::sun::star;
@@ -260,6 +261,9 @@ namespace
class thePropertyHandler
: public rtl::Static<SfxPropertyHandler, thePropertyHandler> {};
+
+ class theApplicationMutex
+ : public rtl::Static<osl::Mutex, theApplicationMutex> {};
}
#include <framework/imageproducer.hxx>
@@ -268,23 +272,15 @@ namespace
#include "sfx2/imagemgr.hxx"
#include "fwkhelper.hxx"
-::osl::Mutex SfxApplication::gMutex;
-
SfxApplication* SfxApplication::GetOrCreate()
{
// SFX on demand
- ::osl::MutexGuard aGuard(SfxApplication::gMutex);
- if ( !pApp )
+ ::osl::MutexGuard aGuard(theApplicationMutex::get());
+ if (!pApp)
{
- SfxApplication *pNew = new SfxApplication;
-
- //TODO/CLEANUP
- // Is the Mutex-Handling OK?
- static ::osl::Mutex aProtector;
- ::osl::MutexGuard aGuard2( aProtector );
-
RTL_LOGFILE_CONTEXT( aLog, "sfx2 (mb93783) ::SfxApplication::SetApp" );
- pApp = pNew;
+
+ pApp = new SfxApplication;
// at the moment a bug may occur when Initialize_Impl returns FALSE,
// but this is only temporary because all code that may cause such
@@ -334,12 +330,13 @@ SfxApplication::SfxApplication()
#else
if( !InitializeDde() )
{
- ByteString aStr( "No DDE-Service possible. Error: " );
+ rtl::OStringBuffer aStr(
+ RTL_CONSTASCII_STRINGPARAM("No DDE-Service possible. Error: "));
if( GetDdeService() )
- aStr += ByteString::CreateFromInt32(GetDdeService()->GetError());
+ aStr.append(static_cast<sal_Int32>(GetDdeService()->GetError()));
else
- aStr += '?';
- DBG_ASSERT( sal_False, aStr.GetBuffer() );
+ aStr.append('?');
+ DBG_ASSERT( sal_False, aStr.getStr() );
}
#endif
#endif
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index a776e09d1f74..a0416f19bf02 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -100,22 +100,6 @@ using namespace ::com::sun::star::script;
using ::basic::BasicManagerRepository;
-//------------------------------------------------------------------------
-String lcl_GetVersionString()
-{
- ::rtl::OUString aDefault;
- String aVersion( utl::Bootstrap::getBuildIdData( aDefault ));
-
- if ( aVersion.Len() == 0 )
- {
- OSL_FAIL( "No BUILDID in bootstrap file found" );
- }
-
- aVersion.Erase( 0, aVersion.Search( ':' ) + 1 );
- aVersion.Erase( aVersion.Search( ')' ) );
- return aVersion;
-}
-
//=========================================================================
sal_uInt16 SfxApplication::SaveBasicManager() const
{
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index e3c7fd09be5c..b31203592134 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -145,16 +145,6 @@ using namespace ::com::sun::star::document;
namespace css = com::sun::star;
-//-------------------------------------------------------------------------
-long QuitAgain_Impl( void* pObj, void* pArg )
-{
- SfxApplication* pApp = (SfxApplication*)pObj;
- Timer* pTimer = (Timer*)pArg;
- delete pTimer;
- pApp->GetDispatcher_Impl()->Execute( SID_QUITAPP, SFX_CALLMODE_ASYNCHRON );
- return 0;
-}
-
/// Find the correct location of the document (LICENSE.odt, etc.), and return
/// it in rURL if found.
static sal_Bool checkURL( const char *pName, const char *pExt, rtl::OUString &rURL )
@@ -741,12 +731,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
}
}
-static const ::rtl::OUString& getProductRegistrationServiceName( )
-{
- static ::rtl::OUString s_sServiceName(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.setup.ProductRegistration"));
- return s_sServiceName;
-}
-
typedef rtl_uString* (SAL_CALL *basicide_choose_macro)(XModel*, sal_Bool, rtl_uString*);
typedef void (SAL_CALL *basicide_macro_organizer)( sal_Int16 );
@@ -991,30 +975,6 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
break;
}
- case SID_ONLINE_REGISTRATION:
- {
- try
- {
- // create the ProductRegistration component
- Reference< com::sun::star::lang::XMultiServiceFactory > xORB( ::comphelper::getProcessServiceFactory() );
- Reference< com::sun::star::task::XJobExecutor > xProductRegistration;
- if ( xORB.is() )
- xProductRegistration = xProductRegistration.query( xORB->createInstance( getProductRegistrationServiceName() ) );
- DBG_ASSERT( xProductRegistration.is(), "OfficeApplication::ExecuteApp_Impl: could not create the service!" );
-
- // tell it that the user wants to register
- if ( xProductRegistration.is() )
- {
- xProductRegistration->trigger( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegistrationRequired")) );
- }
- }
- catch( const ::com::sun::star::uno::Exception& )
- {
- OSL_FAIL( "OfficeApplication::ExecuteApp_Impl(SID_ONLINE_REGISTRATION): caught an exception!" );
- }
- }
- break;
-
case SID_BASICIDE_APPEAR:
{
SfxViewFrame* pView = lcl_getBasicIDEViewFrame( NULL );
@@ -1332,25 +1292,6 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
void SfxApplication::OfaState_Impl(SfxItemSet &rSet)
{
- const sal_uInt16 *pRanges = rSet.GetRanges();
- DBG_ASSERT(pRanges && *pRanges, "Set without Region");
- while ( *pRanges )
- {
- for(sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich)
- {
- switch(nWhich)
- {
- case SID_ONLINE_REGISTRATION:
- {
- ::utl::RegOptions aOptions;
- if ( !aOptions.allowMenu() )
- rSet.DisableItem( SID_ONLINE_REGISTRATION );
- }
- break;
- }
- }
- }
-
SvtModuleOptions aModuleOpt;
if( !aModuleOpt.IsWriter())
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 193834d44ed5..c3a545fb8935 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -218,9 +218,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
if ( !pItem )
{
#ifdef DBG_UTIL
- ByteString aStr( "No creator method for item: ");
- aStr += ByteString::CreateFromInt32( nSlotId );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "No creator method for item: "));
+ aStr.append(static_cast<sal_Int32>(nSlotId));
+ OSL_FAIL(aStr.getStr());
#endif
return;
}
@@ -267,9 +268,10 @@ void TransformParameters( sal_uInt16 nSlotId, const ::com::sun::star::uno::Seque
// so this should be notified as a warning only
if ( nCount != nSubCount )
{
- ByteString aStr( "MacroPlayer: wrong number of parameters for slot: ");
- aStr += ByteString::CreateFromInt32( nSlotId );
- DBG_WARNING( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "MacroPlayer: wrong number of parameters for slot: "));
+ aStr.append(static_cast<sal_Int32>(nSlotId));
+ DBG_WARNING(aStr.getStr());
}
#endif
// complex property; collect sub items from the parameter set and reconstruct complex item
@@ -959,9 +961,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
else
{
// we will not rely on the "toggle" ability of some property slots
- ByteString aStr( "Processing property slot without argument: ");
- aStr += ByteString::CreateFromInt32( nSlotId );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Processing property slot without argument: "));
+ aStr.append(static_cast<sal_Int32>(nSlotId));
+ OSL_FAIL(aStr.getStr());
}
#endif
@@ -1249,9 +1252,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
continue;
}
- ByteString aDbg( "Unknown item detected: ");
- aDbg += ByteString::CreateFromInt32( nId );
- DBG_ASSERT( nArg<nFormalArgs, aDbg.GetBuffer() );
+ rtl::OStringBuffer aDbg(RTL_CONSTASCII_STRINGPARAM(
+ "Unknown item detected: "));
+ aDbg.append(static_cast<sal_Int32>(nId));
+ DBG_ASSERT(nArg<nFormalArgs, aDbg.getStr());
}
}
}
@@ -1279,9 +1283,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = String( String::CreateFromAscii( pSlot->pUnoName ) ) ;
if ( !pItem->QueryValue( pValue[nActProp].Value ) )
{
- ByteString aStr( "Item not convertable: ");
- aStr += ByteString::CreateFromInt32(nSlotId);
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Item not convertable: "));
+ aStr.append(static_cast<sal_Int32>(nSlotId));
+ OSL_FAIL(aStr.getStr());
}
}
else
@@ -1300,11 +1305,14 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = aName;
if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
{
- ByteString aStr( "Sub item ");
- aStr += ByteString::CreateFromInt32( pType->aAttrib[n-1].nAID );
- aStr += " not convertable in slot: ";
- aStr += ByteString::CreateFromInt32(nSlotId);
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Sub item "));
+ aStr.append(static_cast<sal_Int32>(
+ pType->aAttrib[n-1].nAID));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(
+ " not convertable in slot: "));
+ aStr.append(static_cast<sal_Int32>(nSlotId));
+ OSL_FAIL( aStr.getStr() );
}
}
}
@@ -1328,9 +1336,10 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = String( String::CreateFromAscii( rArg.pName ) ) ;
if ( !pItem->QueryValue( pValue[nActProp++].Value ) )
{
- ByteString aStr( "Item not convertable: ");
- aStr += ByteString::CreateFromInt32(rArg.nSlotId);
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Item not convertable: "));
+ aStr.append(static_cast<sal_Int32>(rArg.nSlotId));
+ OSL_FAIL(aStr.getStr());
}
}
else
@@ -1349,11 +1358,14 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, ::com::sun::sta
pValue[nActProp].Name = aName;
if ( !pItem->QueryValue( pValue[nActProp++].Value, nSubId ) )
{
- ByteString aStr( "Sub item ");
- aStr += ByteString::CreateFromInt32( rArg.pType->aAttrib[n-1].nAID );
- aStr += " not convertable in slot: ";
- aStr += ByteString::CreateFromInt32(rArg.nSlotId);
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Sub item "));
+ aStr.append(static_cast<sal_Int32>(
+ rArg.pType->aAttrib[n-1].nAID));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(
+ " not convertable in slot: "));
+ aStr.append(static_cast<sal_Int32>(rArg.nSlotId));
+ OSL_FAIL(aStr.getStr());
}
}
}
@@ -2143,14 +2155,7 @@ SFX_IMPL_SINGLEFACTORY( TestMouseClickHandler );
extern "C" {
-SFX2_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName ,
- uno_Environment** )
-{
- *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
-}
-
-SFX2_DLLPUBLIC void* SAL_CALL component_getFactory(
+SFX2_DLLPUBLIC void* SAL_CALL sfx_component_getFactory(
const sal_Char* pImplementationName ,
void* pServiceManager ,
void* )
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 3ce4d0ee5a00..583a98456959 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -305,7 +305,7 @@ void SfxChildWindow::SaveStatus(const SfxChildWinInfo& rInfo)
}
SvtViewOptions aWinOpt( E_WINDOW, String::CreateFromInt32( nID ) );
- aWinOpt.SetWindowState( String( rInfo.aWinState, RTL_TEXTENCODING_UTF8 ) );
+ aWinOpt.SetWindowState(rtl::OStringToOUString(rInfo.aWinState, RTL_TEXTENCODING_UTF8));
::com::sun::star::uno::Sequence < ::com::sun::star::beans::NamedValue > aSeq(1);
aSeq[0].Name = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Data") );
@@ -386,7 +386,7 @@ void SfxChildWindow::InitializeChildWinFactory_Impl( sal_uInt16 nId, SfxChildWin
aSeq[0].Value >>= aTmp;
String aWinData( aTmp );
- rInfo.aWinState = ByteString( String(aWinOpt.GetWindowState()), RTL_TEXTENCODING_UTF8 );
+ rInfo.aWinState = rtl::OUStringToOString(aWinOpt.GetWindowState(), RTL_TEXTENCODING_UTF8);
if ( aWinData.Len() )
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index 26f0117aa566..367bb3a091ee 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -129,21 +129,6 @@ void HelpInterceptor_Impl::setInterception( Reference< XFrame > xFrame )
// -----------------------------------------------------------------------
-void HelpInterceptor_Impl::SetStartURL( const String& rURL )
-{
- DBG_ASSERT( !m_pHistory, "invalid history" );
- if ( !m_pHistory )
- {
- m_pHistory = new HelpHistoryList_Impl;
- Any aEmptyViewData;
- m_pHistory->insert( m_pHistory->begin(), new HelpHistoryEntry_Impl( rURL, aEmptyViewData));
- m_nCurPos = m_pHistory->size() - 1;
-
- m_pWindow->UpdateToolbox();
- }
- m_aCurrentURL = rURL;
-}
-
sal_Bool HelpInterceptor_Impl::HasHistoryPred() const
{
return m_pHistory && ( m_nCurPos > 0 );
diff --git a/sfx2/source/appl/helpinterceptor.hxx b/sfx2/source/appl/helpinterceptor.hxx
index e912fcdf2364..f610d9d94fde 100644
--- a/sfx2/source/appl/helpinterceptor.hxx
+++ b/sfx2/source/appl/helpinterceptor.hxx
@@ -85,7 +85,6 @@ public:
~HelpInterceptor_Impl();
void setInterception( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > xFrame );
- void SetStartURL( const String& rURL );
String GetCurrentURL() const { return m_aCurrentURL; }
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 1aa2e8ad6230..595d23318493 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1482,27 +1482,6 @@ void BookmarksTabPage_Impl::AddBookmarks( const String& rTitle, const String& rU
aBookmarksBox.SetEntryData( nPos, (void*)(sal_uIntPtr)( new String( rURL ) ) );
}
-// class SfxHelpIndexWindow_Impl -----------------------------------------
-
-sal_Bool SfxHelpWindow_Impl::splitHelpURL(const ::rtl::OUString& sHelpURL,
- ::rtl::OUString& sFactory,
- ::rtl::OUString& sContent,
- ::rtl::OUString& sAnchor )
-{
- Reference < XURLTransformer > xParser( ::comphelper::getProcessServiceFactory()->createInstance(
- DEFINE_CONST_UNICODE("com.sun.star.util.URLTransformer" )), UNO_QUERY_THROW );
-
- URL aURL;
- aURL.Complete = sHelpURL;
- sal_Bool bResult = xParser->parseStrict(aURL);
-
- sFactory = aURL.Server;
- sContent = aURL.Path.copy(1); // strip "/"!
- sAnchor = aURL.Mark;
-
- return bResult;
-}
-
::rtl::OUString SfxHelpWindow_Impl::buildHelpURL(const ::rtl::OUString& sFactory ,
const ::rtl::OUString& sContent ,
const ::rtl::OUString& sAnchor ,
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index ff983671fa8e..3f05a1444b01 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -580,11 +580,6 @@ public:
void openDone(const ::rtl::OUString& sURL ,
sal_Bool bSuccess);
- static sal_Bool splitHelpURL(const ::rtl::OUString& sHelpURL,
- ::rtl::OUString& sFactory,
- ::rtl::OUString& sContent,
- ::rtl::OUString& sAnchor );
-
static ::rtl::OUString buildHelpURL(const ::rtl::OUString& sFactory ,
const ::rtl::OUString& sContent ,
const ::rtl::OUString& sAnchor ,
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 7820b46eb713..c69f775dbcf2 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -327,7 +327,6 @@ private:
sal_Bool m_bIsDebug; // environment variable "help_debug=1"
SfxHelpOptions_Impl* m_pOpt; // the options
::std::vector< ::rtl::OUString > m_aModulesList; // list of all installed modules
- void Load();
public:
SfxHelp_Impl( sal_Bool bDebug );
@@ -335,8 +334,6 @@ public:
SfxHelpOptions_Impl* GetOptions();
static String GetHelpText( const rtl::OUString& aCommandURL, const String& rModule );
- sal_Bool HasModule( const ::rtl::OUString& rModule ); // module installed
- sal_Bool IsHelpInstalled(); // module list not empty
};
SfxHelp_Impl::SfxHelp_Impl( sal_Bool bDebug ) :
@@ -352,31 +349,6 @@ SfxHelp_Impl::~SfxHelp_Impl()
delete m_pOpt;
}
-void SfxHelp_Impl::Load()
-{
- // fill modules list
- // create the help url (empty, without module and helpid)
- String sHelpURL( DEFINE_CONST_UNICODE("vnd.sun.star.help://") );
- AppendConfigToken( sHelpURL, sal_True );
-
- // open ucb content and get the list of the help modules
- // the list contains strings with three tokens "ui title \t type \t url"
- Sequence< ::rtl::OUString > aAllModulesList = SfxContentHelper::GetResultSet( sHelpURL );
- sal_Int32 nLen = aAllModulesList.getLength();
- m_aModulesList.reserve( nLen + 1 );
- const ::rtl::OUString* pBegin = aAllModulesList.getConstArray();
- const ::rtl::OUString* pEnd = pBegin + nLen;
- for ( ; pBegin != pEnd; ++pBegin )
- {
- // get one module string
- String sModule( *pBegin );
- // extract the url
- String sURL = sModule.GetToken( 2, '\t' );
- // insert the module (the host part of the "vnd.sun.star.help" url)
- m_aModulesList.push_back( ::rtl::OUString( INetURLObject( sURL ).GetHost() ) );
- }
-}
-
String SfxHelp_Impl::GetHelpText( const rtl::OUString& aCommandURL, const String& rModule )
{
// create help url
@@ -395,20 +367,6 @@ SfxHelpOptions_Impl* SfxHelp_Impl::GetOptions()
return m_pOpt;
}
-sal_Bool SfxHelp_Impl::HasModule( const ::rtl::OUString& rModule )
-{
- if ( !m_aModulesList.size() )
- Load();
- return ( ::std::find( m_aModulesList.begin(), m_aModulesList.end(), rModule ) != m_aModulesList.end() );
-}
-
-sal_Bool SfxHelp_Impl::IsHelpInstalled()
-{
- if ( !m_aModulesList.size() )
- Load();
- return ( m_aModulesList.begin() != m_aModulesList.end() );
-}
-
SfxHelp::SfxHelp() :
bIsDebug( sal_False ),
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 5cd33826c6e1..32610f1fcead 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -90,7 +90,7 @@ extern "C" { static void SAL_CALL thisModule() {} }
# endif
#endif
-#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK)
+#if defined(UNX) && defined(ENABLE_SYSTRAY_GTK) && !defined(PLUGIN_NAME)
#define PLUGIN_NAME "libqstart_gtkli.so"
#endif
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx
index 57cb6ab0d926..f3bc6f0b47ef 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -50,26 +50,18 @@
#include "app.hrc"
#include <shlobj.h>
#include <objidl.h>
-#include <stdio.h>
-#include <io.h>
#include <osl/thread.h>
#include <sfx2/qswin32.h>
#include <comphelper/sequenceashashmap.hxx>
-#include <comphelper/processfactory.hxx>
-#include <com/sun/star/uno/Reference.h>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/task/XJob.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
#include <set>
using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::task;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
using namespace ::osl;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::PropertyValue;
+
#define EXECUTER_WINDOWCLASS "SO Executer Class"
#define EXECUTER_WINDOWNAME "SO Executer Window"
@@ -442,21 +434,6 @@ LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
// -------------------------------
-static sal_Bool checkOEM() {
- Reference<XMultiServiceFactory> rFactory = ::comphelper::getProcessServiceFactory();
- Reference<XJob> rOemJob(rFactory->createInstance(
- OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.OEMPreloadJob"))),
- UNO_QUERY );
- Sequence<NamedValue> args;
- sal_Bool bResult = sal_False;
- if (rOemJob.is())
- {
- Any aResult = rOemJob->execute(args);
- aResult >>= bResult;
- } else bResult = sal_True;
- return bResult;
-}
-
LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg)
@@ -471,35 +448,29 @@ LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lP
{
#if defined(USE_APP_SHORTCUTS)
case IDM_OPEN:
- if ( !ShutdownIcon::bModalMode && checkOEM() )
+ if ( !ShutdownIcon::bModalMode )
ShutdownIcon::FileOpen();
break;
case IDM_WRITER:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( WRITER_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_CALC:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( CALC_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_IMPRESS:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( IMPRESS_WIZARD_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_DRAW:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( DRAW_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_BASE:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( BASE_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_MATH:
- if (checkOEM())
ShutdownIcon::OpenURL( OUString( RTL_CONSTASCII_USTRINGPARAM( MATH_URL ) ), OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ) );
break;
case IDM_TEMPLATE:
- if ( !ShutdownIcon::bModalMode && checkOEM())
+ if ( !ShutdownIcon::bModalMode )
ShutdownIcon::FromTemplate();
break;
#endif
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index e61171a381f7..a1d9def3d7aa 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -644,14 +644,6 @@ SfxWorkWindow::~SfxWorkWindow()
m_xLayoutManagerListener->dispose();
}
-SystemWindow* SfxWorkWindow::GetTopWindow() const
-{
- Window* pRet = pWorkWin;
- while ( pRet && !pRet->IsSystemWindow() )
- pRet = pRet->GetParent();
- return (SystemWindow*) pRet;
-}
-
void SfxWorkWindow::Lock_Impl( sal_Bool bLock )
{
if ( bLock )
@@ -668,37 +660,6 @@ void SfxWorkWindow::Lock_Impl( sal_Bool bLock )
ArrangeChilds_Impl();
}
-void SfxWorkWindow::ChangeWindow_Impl( Window *pNew )
-{
- Window *pOld = pWorkWin;
- pWorkWin = pNew;
- for ( sal_uInt16 nPos = 0; nPos < pChilds->Count(); ++nPos )
- {
- SfxChild_Impl *pCli = (*pChilds)[nPos];
- if ( pCli && pCli->pWin && pCli->pWin->GetParent() == pOld )
- {
- pCli->pWin->SetParent( pNew );
- }
- }
-}
-
-void SfxWorkWindow::SaveStatus_Impl()
-{
- sal_uInt16 nCount = pChildWins->Count();
- for ( sal_uInt16 n=0; n<nCount; n++ )
- {
- SfxChildWin_Impl* pCW = (*pChildWins)[n];
- SfxChildWindow *pChild = pCW->pWin;
- if (pChild)
- {
- sal_uInt16 nFlags = pCW->aInfo.nFlags;
- pCW->aInfo = pChild->GetInfo();
- pCW->aInfo.nFlags |= nFlags;
- SaveStatus_Impl(pChild, pCW->aInfo);
- }
- }
-}
-
//--------------------------------------------------------------------
// Helper method to release the child lists. Should the destructor not be
// called after this, instead work continues, then space for the object bars
@@ -989,25 +950,6 @@ SvBorder SfxWorkWindow::Arrange_Impl()
return IsDockingAllowed() ? aBorder : SvBorder();
}
-//--------------------------------------------------------------------
-// Close-Handler: The Configuration of the ChildWindows is saved.
-
-void SfxWorkWindow::Close_Impl()
-{
- for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
- {
- SfxChildWin_Impl *pCW = (*pChildWins)[n];
- SfxChildWindow *pChild = pCW->pWin;
- if (pChild)
- {
- sal_uInt16 nFlags = pCW->aInfo.nFlags;
- pCW->aInfo = pChild->GetInfo();
- pCW->aInfo.nFlags |= nFlags;
- SaveStatus_Impl(pChild, pCW->aInfo);
- }
- }
-}
-
sal_Bool SfxWorkWindow::PrepareClose_Impl()
{
for (sal_uInt16 n=0; n<pChildWins->Count(); n++)
@@ -1047,30 +989,6 @@ SfxChild_Impl* SfxWorkWindow::RegisterChild_Impl( Window& rWindow,
//--------------------------------------------------------------------
-void SfxWorkWindow::AlignChild_Impl( Window& rWindow,
- const Size& rNewSize,
- SfxChildAlignment eAlign )
-{
- DBG_CHKTHIS(SfxWorkWindow, 0);
- DBG_ASSERT( SfxChildAlignValid(eAlign), "invalid align" );
-
- SfxChild_Impl *pChild = FindChild_Impl(rWindow);
- if ( pChild )
- {
- if (pChild->eAlign != eAlign)
- bSorted = sal_False;
-
- pChild->eAlign = eAlign;
- pChild->aSize = rNewSize;
- pChild->bResize = sal_True;
- }
- else {
- OSL_FAIL( "aligning unregistered child" );
- }
-}
-
-//--------------------------------------------------------------------
-
void SfxWorkWindow::ReleaseChild_Impl( Window& rWindow )
{
DBG_CHKTHIS(SfxWorkWindow, 0);
@@ -1224,15 +1142,6 @@ void SfxWorkWindow::ResetObjectBars_Impl()
(*pChildWins)[n]->nId = 0;
}
-void SfxWorkWindow::NextObjectBar_Impl( sal_uInt16 )
-{
-}
-
-sal_uInt16 SfxWorkWindow::HasNextObjectBar_Impl( sal_uInt16, String* )
-{
- return 0;
-}
-
//------------------------------------------------------------------------
void SfxWorkWindow::SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
@@ -1315,12 +1224,6 @@ sal_Bool SfxWorkWindow::IsVisible_Impl( sal_uInt16 nMode ) const
}
}
-Window* SfxWorkWindow::GetObjectBar_Impl( sal_uInt16, sal_uInt32 )
-{
- return NULL;
-}
-
-//------------------------------------------------------------------------
void SfxFrameWorkWin_Impl::UpdateObjectBars_Impl()
{
if ( pFrame->IsClosing_Impl() )
@@ -1731,36 +1634,6 @@ void SfxWorkWindow::SetStatusBar_Impl( sal_uInt32 nResId, SfxShell*, SfxBindings
#define SFX_ITEMTYPE_STATBAR 4
-void SfxWorkWindow::SetTempStatusBar_Impl( sal_Bool bSet )
-{
- if ( aStatBar.bTemp != bSet && bShowStatusBar && IsVisible_Impl() )
- {
- sal_Bool bOn = sal_False;
- sal_Bool bReset = sal_False;
- if ( bSet && !aStatBar.nId )
- {
- bReset = sal_True;
- SetStatusBar_Impl( SFX_ITEMTYPE_STATBAR, SFX_APP(), GetBindings() );
- }
-
- if ( aStatBar.nId && aStatBar.bOn && !bIsFullScreen )
- bOn = sal_True;
-
- aStatBar.bTemp = bSet;
- if ( !bOn || bReset || (!bSet && aStatBar.nId ) )
- {
- // Just do something if the temp settings really are causing
- // anything
- UpdateStatusBar_Impl();
- ArrangeChilds_Impl();
- ShowChilds_Impl();
- }
-
- if ( bReset )
- ResetStatusBar_Impl();
- }
-}
-
void SfxWorkWindow::UpdateStatusBar_Impl()
{
Reference< ::com::sun::star::beans::XPropertySet > xPropSet( GetFrameInterface(), UNO_QUERY );
@@ -2885,11 +2758,6 @@ SfxChildWinController_Impl::SfxChildWinController_Impl( sal_uInt16 nID, SfxWorkW
, pWorkwin( pWork )
{}
-::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SfxWorkWindow::CreateDispatch( const String& )
-{
- return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >();
-}
-
void SfxChildWinController_Impl::StateChanged(
sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* )
{
@@ -2917,11 +2785,6 @@ void SfxWorkWindow::SetActiveChild_Impl( Window *pChild )
pActiveChild = pChild;
}
-Window* SfxWorkWindow::GetActiveChild_Impl()
-{
- return pActiveChild;
-}
-
sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
{
// Sort all children under list
@@ -3036,10 +2899,6 @@ sal_Bool SfxWorkWindow::ActivateNextChild_Impl( sal_Bool bForward )
return sal_False;
}
-void SfxWorkWindow::SetObjectBarCustomizeMode_Impl( sal_Bool )
-{
-}
-
void SfxWorkWindow::DataChanged_Impl( const DataChangedEvent& )
{
sal_uInt16 n;
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 348399b34a6a..ced3dd807717 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -418,22 +418,6 @@ sal_uInt32 SfxFilterMatcher::GuessFilterIgnoringContent(
//----------------------------------------------------------------
-#define CHECKERROR() \
-if( nErr == 1 || nErr == USHRT_MAX || nErr == ULONG_MAX ) \
-{ \
- ByteString aText = "Fehler in FilterDetection: Returnwert ";\
- aText += ByteString::CreateFromInt32(nErr); \
- if( pFilter ) \
- { \
- aText += ' '; \
- aText += ByteString(U2S(pFilter->GetFilterName())); \
- } \
- OSL_FAIL( aText.GetBuffer() ); \
- nErr = ERRCODE_ABORT; \
-}
-
-//----------------------------------------------------------------
-
sal_uInt32 SfxFilterMatcher::GuessFilter( SfxMedium& rMedium, const SfxFilter**ppFilter, SfxFilterFlags nMust, SfxFilterFlags nDont ) const
{
return GuessFilterControlDefaultUI( rMedium, ppFilter, nMust, nDont, sal_True );
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index c73f595056a6..be086d13190f 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -56,6 +56,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <rtl/bootstrap.hxx>
+#include <rtl/strbuf.hxx>
// -----------------------------------------------------------------------
@@ -248,7 +249,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, const String& rBaseURL,
valstr.EraseTrailingChars();
OutMeta( rStrm, pIndent, name, valstr, sal_False,
eDestEnc, pNonConvertableChars );
- } catch (uno::Exception &) {
+ }
+ catch (const uno::Exception&)
+ {
// may happen with concurrent modification...
DBG_WARNING("SfxFrameHTMLWriter::Out_DocInfo: exception");
}
@@ -262,7 +265,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
{
try
{
- ByteString sOut;
+ rtl::OStringBuffer sOut;
::rtl::OUString aStr;
uno::Any aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameURL")) );
if ( (aAny >>= aStr) && aStr.getLength() )
@@ -272,29 +275,37 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
{
aURL = URIHelper::simpleNormalizedMakeRelative(
rBaseURL, aURL );
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_src) += "=\"";
- rOut << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src)
+ .append(RTL_CONSTASCII_STRINGPARAM("=\""));
+ rOut << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rOut, aURL, eDestEnc, pNonConvertableChars );
- sOut = '\"';
+ sOut.append('\"');
}
}
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameName")) );
if ( (aAny >>= aStr) && aStr.getLength() )
{
- ((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_name) += "=\"";
- rOut << sOut.GetBuffer();
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
+ .append(RTL_CONSTASCII_STRINGPARAM("=\""));
+ rOut << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rOut, aStr, eDestEnc, pNonConvertableChars );
- sOut = '\"';
+ sOut.append('\"');
}
sal_Int32 nVal = SIZE_NOT_SET;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginWidth")) );
if ( (aAny >>= nVal) && nVal != SIZE_NOT_SET )
- (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_marginwidth) += '=') += ByteString::CreateFromInt32( nVal );
+ {
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_marginwidth)
+ .append('=').append(nVal);
+ }
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameMarginHeight")) );
if ( (aAny >>= nVal) && nVal != SIZE_NOT_SET )
- (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_marginheight) += '=') += ByteString::CreateFromInt32( nVal );
+ {
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_marginheight)
+ .append('=').append(nVal);
+ }
sal_Bool bVal = sal_True;
aAny = xSet->getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FrameIsAutoScroll")) );
@@ -304,7 +315,8 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
if ( aAny >>= bVal )
{
const sal_Char *pStr = bVal ? sHTML_SC_yes : sHTML_SC_no;
- (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_scrolling) += '=') += pStr;
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolling)
+ .append(pStr);
}
}
@@ -316,12 +328,13 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
if ( aAny >>= bVal )
{
const char* pStr = bVal ? sHTML_SC_yes : sHTML_SC_no;
- (((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_frameborder) += '=') += pStr;
+ sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_frameborder)
+ .append('=').append(pStr);
}
}
- rOut << sOut.GetBuffer();
+ rOut << sOut.getStr();
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index b7ecb65a06fb..15d40a0d568b 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -86,56 +86,6 @@ void AppendDateTime_Impl( const util::DateTime rDT,
rRow += aDateStr;
}
-// SfxContentHelper ------------------------------------------------------
-
-sal_Bool SfxContentHelper::Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData, sal_Int32 nNameClash )
-{
- sal_Bool bRet = sal_True, bKillSource = sal_False;
- INetURLObject aSourceObj( rSource );
- DBG_ASSERT( aSourceObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
-
- INetURLObject aDestObj( rDest );
- DBG_ASSERT( aDestObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- if ( bMoveData && aSourceObj.GetProtocol() != aDestObj.GetProtocol() )
- {
- bMoveData = sal_False;
- bKillSource = sal_True;
- }
- String aName = aDestObj.getName();
- aDestObj.removeSegment();
- aDestObj.setFinalSlash();
-
- try
- {
- ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
- OUString aTransferName(RTL_CONSTASCII_USTRINGPARAM("transfer"));
- if ( xInfo->hasCommandByName( aTransferName ) )
- {
- aDestPath.executeCommand( aTransferName, uno::makeAny(
- ucb::TransferInfo( bMoveData, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, nNameClash ) ) );
- }
- else
- {
- DBG_ERRORFILE( "transfer command not available" );
- }
- }
- catch( const ucb::CommandAbortedException& )
- {
- bRet = sal_False;
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- bRet = sal_False;
- }
-
- if ( bKillSource )
- SfxContentHelper::Kill( rSource );
-
- return bRet;
-}
-
// -----------------------------------------------------------------------
sal_Bool SfxContentHelper::IsDocument( const String& rContent )
@@ -171,64 +121,6 @@ sal_Bool SfxContentHelper::IsDocument( const String& rContent )
// -----------------------------------------------------------------------
-sal_Bool SfxContentHelper::IsFolder( const String& rContent )
-{
- sal_Bool bRet = sal_False;
- INetURLObject aObj( rContent );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- try
- {
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- bRet = aCnt.isFolder();
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_WARNING( "CommandAbortedException" );
- }
- catch( const ucb::IllegalIdentifierException& )
- {
- DBG_WARNING( "IllegalIdentifierException" );
- }
- catch( const ucb::ContentCreationException& )
- {
- DBG_WARNING( "IllegalIdentifierException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- }
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SfxContentHelper::GetTitle( const String& rContent, String& rTitle )
-{
- sal_Bool bRet = sal_False;
- INetURLObject aObj( rContent );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- try
- {
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- OUString aTemp;
- aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Title")) ) >>= aTemp;
- rTitle = String( aTemp );
- bRet = sal_True;
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "CommandAbortedException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- }
- return bRet;
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool SfxContentHelper::Kill( const String& rContent )
{
sal_Bool bRet = sal_True;
@@ -256,250 +148,6 @@ sal_Bool SfxContentHelper::Kill( const String& rContent )
// -----------------------------------------------------------------------
-uno::Sequence < OUString > SfxContentHelper::GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted )
-{
- StringList_Impl* pFiles = NULL;
- INetURLObject aFolderObj( rFolder );
- DBG_ASSERT( aFolderObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- try
- {
- ::ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- uno::Reference< sdbc::XResultSet > xResultSet;
- uno::Sequence< OUString > aProps(2);
- OUString* pProps = aProps.getArray();
- pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
- pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
-
- try
- {
- ::ucbhelper::ResultSetInclude eInclude = bFolder ? ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS : ::ucbhelper::INCLUDE_DOCUMENTS_ONLY;
- if ( !bSorted )
- {
- xResultSet = aCnt.createCursor( aProps, eInclude );
- }
- else
- {
- uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
- xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
-
- uno::Reference < ucb::XAnyCompareFactory > xFactory;
- uno::Reference < lang::XMultiServiceFactory > xMgr = getProcessServiceFactory();
- uno::Reference < ucb::XSortedDynamicResultSetFactory > xSRSFac(
- xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), uno::UNO_QUERY );
-
- uno::Sequence< ucb::NumberedSortingInfo > aSortInfo( 2 );
- ucb::NumberedSortingInfo* pInfo = aSortInfo.getArray();
- pInfo[ 0 ].ColumnIndex = 2;
- pInfo[ 0 ].Ascending = sal_False;
- pInfo[ 1 ].ColumnIndex = 1;
- pInfo[ 1 ].Ascending = sal_True;
-
- uno::Reference< ucb::XDynamicResultSet > xDynamicResultSet;
- xDynamicResultSet =
- xSRSFac->createSortedDynamicResultSet( xDynResultSet, aSortInfo, xFactory );
- if ( xDynamicResultSet.is() )
- {
- xResultSet = xDynamicResultSet->getStaticResultSet();
- }
- }
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "createCursor: CommandAbortedException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "createCursor: Any other exception" );
- }
-
- if ( xResultSet.is() )
- {
- pFiles = new StringList_Impl();
- uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
- try
- {
- while ( xResultSet->next() )
- {
- OUString aId = xContentAccess->queryContentIdentifierString();
- OUString* pFile = new OUString( aId );
- pFiles->push_back( pFile );
- }
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
- }
- }
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "GetFolderContents: Any other exception" );
- }
-
- if ( pFiles )
- {
- size_t nCount = pFiles->size();
- uno::Sequence < OUString > aRet( nCount );
- OUString* pRet = aRet.getArray();
- for ( size_t i = 0; i < nCount; ++i )
- {
- OUString* pFile = pFiles->at( i );
- pRet[i] = *( pFile );
- delete pFile;
- }
- pFiles->clear();
- delete pFiles;
- return aRet;
- }
- else
- return uno::Sequence < OUString > ();
-}
-
-// -----------------------------------------------------------------------
-
-uno::Sequence < OUString > SfxContentHelper::GetFolderContentProperties( const String& rFolder, sal_Bool bIsFolder )
-{
- StringList_Impl* pProperties = NULL;
- INetURLObject aFolderObj( rFolder );
- DBG_ASSERT( aFolderObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
- uno::Reference< task::XInteractionHandler > xInteractionHandler = uno::Reference< task::XInteractionHandler > (
- xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler") ) ), uno::UNO_QUERY );
-
- ::ucbhelper::Content aCnt( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), new ::ucbhelper::CommandEnvironment( xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ) );
- uno::Reference< sdbc::XResultSet > xResultSet;
- uno::Sequence< OUString > aProps(5);
- OUString* pProps = aProps.getArray();
- pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title"));
- pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType"));
- pProps[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("Size"));
- pProps[3] = OUString(RTL_CONSTASCII_USTRINGPARAM("DateModified"));
- pProps[4] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder"));
-
- try
- {
- uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
- ::ucbhelper::ResultSetInclude eInclude = bIsFolder ? ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS : ::ucbhelper::INCLUDE_DOCUMENTS_ONLY;
- xDynResultSet = aCnt.createDynamicCursor( aProps, eInclude );
-
- uno::Reference < ucb::XAnyCompareFactory > xCmpFactory;
- uno::Reference < lang::XMultiServiceFactory > xMgr = getProcessServiceFactory();
- uno::Reference < ucb::XSortedDynamicResultSetFactory > xSRSFac(
- xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory")) ), uno::UNO_QUERY );
-
- uno::Sequence< ucb::NumberedSortingInfo > aSortInfo( 2 );
- ucb::NumberedSortingInfo* pInfo = aSortInfo.getArray();
- pInfo[ 0 ].ColumnIndex = 5;
- pInfo[ 0 ].Ascending = sal_False;
- pInfo[ 1 ].ColumnIndex = 1;
- pInfo[ 1 ].Ascending = sal_True;
-
- uno::Reference< ucb::XDynamicResultSet > xDynamicResultSet;
- xDynamicResultSet =
- xSRSFac->createSortedDynamicResultSet( xDynResultSet, aSortInfo, xCmpFactory );
- if ( xDynamicResultSet.is() )
- {
- xResultSet = xDynamicResultSet->getStaticResultSet();
- }
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "createCursor: CommandAbortedException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "createCursor: Any other exception" );
- }
-
- if ( xResultSet.is() )
- {
- LocaleDataWrapper aLocaleWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() );
- pProperties = new StringList_Impl();
- uno::Reference< sdbc::XRow > xRow( xResultSet, uno::UNO_QUERY );
- uno::Reference< ucb::XContentAccess > xContentAccess( xResultSet, uno::UNO_QUERY );
- size_t nFolderPos = size_t(-1);
-
- try
- {
- while ( xResultSet->next() )
- {
- String aTitle( xRow->getString(1) );
- String aType( xRow->getString(2) );
- sal_Int64 nSize = xRow->getLong(3);
- util::DateTime aDT = xRow->getTimestamp(4);
- sal_Bool bFolder = xRow->getBoolean(5); // true = directory, else file
-
- String aRow = aTitle;
- aRow += '\t';
- aRow += String::CreateFromInt64( nSize );
- aRow += '\t';
- AppendDateTime_Impl( aDT, aRow, aLocaleWrapper );
- aRow += '\t';
- aRow += String( xContentAccess->queryContentIdentifierString() );
- aRow += '\t';
- aRow += bFolder ? '1' : '0';
- OUString* pRow = new OUString( aRow );
- size_t nPos = size_t(-1);
- if ( bFolder ) // place the directories at the top of the listing
- {
- if ( nFolderPos == size_t(-1) )
- nFolderPos = 0;
- else
- nFolderPos++;
- nPos = nFolderPos;
- }
- if ( nPos >= pProperties->size() )
- pProperties->push_back( pRow );
- else
- {
- StringList_Impl::iterator it = pProperties->begin();
- ::std::advance( it, nPos );
- it = pProperties->insert( it, pRow );
- }
- }
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "XContentAccess::next(): CommandAbortedException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "XContentAccess::next(): Any other exception" );
- }
- }
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "GetFolderContents: Any other exception" );
- }
-
- if ( pProperties )
- {
- size_t nCount = pProperties->size();
- uno::Sequence < OUString > aRet( nCount );
- OUString* pRet = aRet.getArray();
- for ( size_t i = 0; i < nCount; ++i )
- {
- OUString* pProperty = pProperties->at(i);
- pRet[i] = *( pProperty );
- delete pProperty;
- }
- pProperties->clear();
- delete pProperties;
- return aRet;
- }
- else
- return uno::Sequence < OUString > ();
-}
-
-// -----------------------------------------------------------------------
-
uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
{
StringList_Impl* pList = NULL;
@@ -733,87 +381,6 @@ sal_Bool SfxContentHelper::IsHelpErrorDocument( const String& rURL )
// -----------------------------------------------------------------------
-sal_Bool SfxContentHelper::CopyTo( const String& rSource, const String& rDest )
-{
- return Transfer_Impl( rSource, rDest, sal_False, ucb::NameClash::ERROR );
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SfxContentHelper::MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash )
-{
- return Transfer_Impl( rSource, rDest, sal_True, nNameClash );
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SfxContentHelper::MakeFolder( const String& rFolder )
-{
- INetURLObject aURL( rFolder );
- DBG_ASSERT( aURL.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- String aTitle = aURL.getName( INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET );
- aURL.removeSegment();
- uno::Sequence < OUString > aNames(2);
- OUString* pNames = aNames.getArray();
- pNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) );
- pNames[1] = OUString( RTL_CONSTASCII_USTRINGPARAM( "IsFolder" ) );
- uno::Sequence<uno::Any> aValues(2);
- uno::Any* pValues = aValues.getArray();
- pValues[0] = uno::makeAny( OUString( aTitle ) );
- pValues[1] = uno::makeAny( sal_Bool( sal_True ) );
- uno::Reference< ucb::XCommandEnvironment > aCmdEnv;
- sal_Bool bRet = sal_False;
- try
- {
- ::ucbhelper::Content aCnt( aURL.GetMainURL( INetURLObject::NO_DECODE ), aCmdEnv );
- ::ucbhelper::Content aNewFolder;
- OUString aType( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.staroffice.fsys-folder" ) );
- bRet = aCnt.insertNewContent( aType, aNames, aValues, aNewFolder );
- }
- catch( const ucb::CommandAbortedException& )
- {
- // double name?
- }
- catch( const ucb::IllegalIdentifierException& )
- {
- DBG_ERRORFILE( "Illegal identifier" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- }
-
- return bRet;
-}
-
-// -----------------------------------------------------------------------
-
-ErrCode SfxContentHelper::QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes )
-{
- ErrCode nErr = 0;
- rFreeBytes = 0;
- INetURLObject aObj( rPath );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
- try
- {
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- aCnt.getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("FreeSpace")) ) >>= rFreeBytes;
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_ERRORFILE( "CommandAbortedException" );
- nErr = ERRCODE_IO_GENERAL;
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- nErr = ERRCODE_IO_GENERAL;
- }
- return nErr;
-}
-
-// -----------------------------------------------------------------------
-
sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
{
sal_uIntPtr nSize = 0;
@@ -837,57 +404,4 @@ sal_uIntPtr SfxContentHelper::GetSize( const String& rContent )
return nSize;
}
-// -----------------------------------------------------------------------
-// please don't use it (only used in appbas.cxx and appcfg.cxx)
-sal_Bool SfxContentHelper::Exists( const String& rContent )
-{
- sal_Bool bRet = sal_False;
- INetURLObject aObj( rContent );
- DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
-
- try
- {
- ::ucbhelper::Content aCnt( aObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
- // just try to get the property; if no exception is thrown, the content exists!
- aCnt.isDocument();
- bRet = sal_True;
- }
- catch( const ucb::CommandAbortedException& )
- {
- DBG_WARNING( "CommandAbortedException" );
- }
- catch( const ucb::IllegalIdentifierException& )
- {
- DBG_WARNING( "IllegalIdentifierException" );
- }
- catch( const ucb::ContentCreationException& )
- {
- DBG_WARNING( "IllegalIdentifierException" );
- }
- catch( const uno::Exception& )
- {
- DBG_ERRORFILE( "Any other exception" );
- }
-
- return bRet;
-
-}
-
-// -----------------------------------------------------------------------
-
-sal_Bool SfxContentHelper::Find( const String& rFolder, const String& rName, String& rFile )
-{
- sal_Bool bRet = sal_False;
- rtl::OUString aFile;
-
- if ( FileBase::searchFileURL( rName, rFolder, aFile ) == FileBase::E_None )
- {
- rFile = aFile;
- bRet = sal_True;
- }
-
- return bRet;
-}
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/bastyp/misc.cxx b/sfx2/source/bastyp/misc.cxx
index b20a23266353..036ba423d2e5 100644
--- a/sfx2/source/bastyp/misc.cxx
+++ b/sfx2/source/bastyp/misc.cxx
@@ -39,22 +39,6 @@ unsigned SfxStack::nLevel = 0;
//--------------------------------------------------------------------
-String SearchAndReplace( const String &rSource,
- const String &rToReplace,
- const String &rReplacement )
-{
- String aTarget( rSource );
- sal_uInt16 nPos = rSource.Search( rToReplace );
- if ( nPos != STRING_NOTFOUND )
- {
- aTarget.Erase( nPos, rToReplace.Len() );
- return aTarget.Insert( rReplacement, nPos );
- }
- return rSource;
-}
-
-//--------------------------------------------------------------------
-
String SfxStringEncode( const String &rSource, const char * )
{
String aRet;
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 0ad5de1fea52..8905cc9f5d39 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -59,22 +59,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::task;
-void AddNumber_Impl( String& aNumber, sal_uInt32 nArg )
-{
- if ( nArg >= 10240 )
- {
- aNumber += String::CreateFromInt32( (sal_uInt16)( ( nArg + 512 ) / 1024 ) );
- aNumber += ' ';
- aNumber += SfxResId( STR_KB );
- }
- else
- {
- aNumber += String::CreateFromInt32( nArg );
- aNumber += ' ';
- aNumber += SfxResId( STR_BYTES );
- }
-}
-
struct SfxProgress_Impl
{
Reference < XStatusIndicator > xStatusInd;
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 67152990891c..91568362a88f 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1360,19 +1360,6 @@ void SfxBindings::UpdateSlotServer_Impl()
//--------------------------------------------------------------------
-int SAL_CALL CmpUS_Impl(const void *p1, const void *p2)
-
-/* [Description]
-
- Internal Comparison function for qsort.
-*/
-
-{
- return *(sal_uInt16 *)p1 - *(sal_uInt16 *)p2;
-}
-
-//--------------------------------------------------------------------
-
SfxItemSet* SfxBindings::CreateSet_Impl
(
SfxStateCache*& pCache, // in: Status-Cache from nId
@@ -1769,20 +1756,24 @@ sal_uInt16 SfxBindings::EnterRegistrations(const char *pFile, int nLine)
(void)nLine;
DBG_MEMTEST();
#ifdef DBG_UTIL
- ByteString aMsg;
- aMsg.Fill( Min(nRegLevel, sal_uInt16(8) ) );
- aMsg += "this = ";
- aMsg += ByteString::CreateFromInt32((long)this);
- aMsg += " Level = ";
- aMsg += ByteString::CreateFromInt32(nRegLevel);
- aMsg += " SfxBindings::EnterRegistrations ";
- if(pFile) {
- aMsg += "File: ";
- aMsg += pFile;
- aMsg += " Line: ";
- aMsg += ByteString::CreateFromInt32(nLine);
- }
- DbgTrace( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg;
+ sal_uInt16 nSpaces = Min(nRegLevel, sal_uInt16(8));
+ while (nSpaces--)
+ aMsg.append(' ');
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("this = "));
+ aMsg.append(reinterpret_cast<sal_Int64>(this));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" Level = "));
+ aMsg.append(static_cast<sal_Int32>(nRegLevel));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(
+ " SfxBindings::EnterRegistrations "));
+ if (pFile)
+ {
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("File: "));
+ aMsg.append(pFile);
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" Line: "));
+ aMsg.append(static_cast<sal_Int32>(nLine));
+ }
+ DbgTrace(aMsg.getStr());
#endif
// When bindings are locked, also lock sub bindings.
@@ -1882,20 +1873,24 @@ void SfxBindings::LeaveRegistrations( sal_uInt16 nLevel, const char *pFile, int
}
#ifdef DBG_UTIL
- ByteString aMsg;
- aMsg.Fill( Min(nRegLevel, sal_uInt16(8)) );
- aMsg += "this = ";
- aMsg += ByteString::CreateFromInt32((long)this);
- aMsg += " Level = ";
- aMsg += ByteString::CreateFromInt32(nRegLevel);
- aMsg += " SfxBindings::LeaveRegistrations ";
- if(pFile) {
- aMsg += "File: ";
- aMsg += pFile;
- aMsg += " Line: ";
- aMsg += ByteString::CreateFromInt32(nLine);
- }
- DbgTrace( aMsg.GetBuffer() );
+ rtl::OStringBuffer aMsg;
+ sal_uInt16 nSpaces = Min(nRegLevel, sal_uInt16(8));
+ while (nSpaces--)
+ aMsg.append(' ');
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("this = "));
+ aMsg.append(reinterpret_cast<sal_Int64>(this));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" Level = "));
+ aMsg.append(static_cast<sal_Int32>(nRegLevel));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(
+ " SfxBindings::LeaveRegistrations "));
+ if (pFile)
+ {
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("File: "));
+ aMsg.append(pFile);
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" Line: "));
+ aMsg.append(static_cast<sal_Int32>(nLine));
+ }
+ DbgTrace(aMsg.getStr());
#endif
}
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 59dfe7fd75f0..e28e68bd183c 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -74,6 +74,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/mnumgr.hxx>
#include "workwin.hxx"
+#include <rtl/strbuf.hxx>
namespace css = ::com::sun::star;
@@ -407,9 +408,9 @@ SfxDispatcher::~SfxDispatcher()
{
#ifdef DBG_UTIL
- ByteString sTemp( "Delete Dispatcher " );
- sTemp += ByteString::CreateFromInt64( (sal_uIntPtr)this );
- OSL_TRACE( "%s", sTemp.GetBuffer() );
+ rtl::OStringBuffer sTemp(RTL_CONSTASCII_STRINGPARAM("Delete Dispatcher "));
+ sTemp.append(reinterpret_cast<sal_Int64>(this));
+ OSL_TRACE("%s", sTemp.getStr());
DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" );
#endif
@@ -478,16 +479,23 @@ void SfxDispatcher::Pop
SfxApplication *pSfxApp = SFX_APP();
#ifdef DBG_UTIL
- ByteString aMsg( "-SfxDispatcher(" );
- aMsg += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- aMsg += bPush ? ")::Push(" : ")::Pop(";
- if ( rShell.GetInterface() )
- aMsg += rShell.GetInterface()->GetClassName();
+ rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("-SfxDispatcher("));
+ aMsg.append(reinterpret_cast<sal_Int64>(this));
+ if (bPush)
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(")::Push("));
else
- aMsg += ByteString::CreateFromInt64( (sal_uIntPtr) &rShell );
- aMsg += bDelete ? ") with delete" : ")";
- if ( bUntil ) aMsg += " (up to)";
- DbgTrace( aMsg.GetBuffer() );
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(")::Pop("));
+ if (rShell.GetInterface())
+ aMsg.append(rShell.GetInterface()->GetClassName());
+ else
+ aMsg.append(reinterpret_cast<sal_Int64>(&rShell));
+ if (bDelete)
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(") with delete"));
+ else
+ aMsg.append(')');
+ if (bUntil)
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(" (up to)"));
+ DbgTrace(aMsg.getStr());
#endif
// same shell as on top of the to-do stack?
@@ -742,12 +750,13 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
SFX_STACK(SfxDispatcher::DoActivate);
if ( bMDI )
{
- #ifdef DBG_UTIL
- ByteString sTemp("Activate Dispatcher ");
- sTemp += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- OSL_TRACE( "%s", sTemp.GetBuffer());
+#ifdef DBG_UTIL
+ rtl::OStringBuffer sTemp(
+ RTL_CONSTASCII_STRINGPARAM("Activate Dispatcher "));
+ sTemp.append(reinterpret_cast<sal_Int64>(this));
+ OSL_TRACE("%s", sTemp.getStr());
DBG_ASSERT( !pImp->bActive, "Activation error" );
- #endif
+#endif
pImp->bActive = sal_True;
pImp->bUpdated = sal_False;
SfxBindings* pBindings = GetBindings();
@@ -759,11 +768,12 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
}
else
{
- #ifdef DBG_UTIL
- ByteString sTemp("Non-MDI-Activate Dispatcher");
- sTemp += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- OSL_TRACE( "%s", sTemp.GetBuffer() );
- #endif
+#ifdef DBG_UTIL
+ rtl::OStringBuffer sTemp(
+ RTL_CONSTASCII_STRINGPARAM("Non-MDI-Activate Dispatcher"));
+ sTemp.append(reinterpret_cast<sal_Int64>(this));
+ OSL_TRACE("%s", sTemp.getStr());
+#endif
}
if ( IsAppDispatcher() )
@@ -833,7 +843,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( bMDI )
{
- OSL_TRACE(ByteString("Deactivate Dispatcher ").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer());
+ OSL_TRACE(rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Deactivate Dispatcher")).append(reinterpret_cast<sal_Int64>(this)).getStr());
DBG_ASSERT( pImp->bActive, "Deactivate error" );
pImp->bActive = sal_False;
@@ -854,7 +864,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
}
}
else {
- OSL_TRACE( ByteString ("Non-MDI-DeActivate Dispatcher").Append(ByteString::CreateFromInt64( (sal_uIntPtr) this )).GetBuffer() );
+ OSL_TRACE(rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Non-MDI-DeActivate Dispatcher")).append(reinterpret_cast<sal_Int64>(this)).getStr());
}
if ( IsAppDispatcher() && !pSfxApp->IsDowning() )
@@ -1844,9 +1854,9 @@ void SfxDispatcher::FlushImpl()
OSL_TRACE("Flushing dispatcher!");
#ifdef DBG_UTIL
- ByteString aMsg( "SfxDispatcher(" );
- aMsg += ByteString::CreateFromInt64( (sal_uIntPtr) this );
- aMsg += ")::Flush()";
+ rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM("SfxDispatcher("));
+ aMsg.append(reinterpret_cast<sal_Int64>(this));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM(")::Flush()"));
#endif
pImp->aTimer.Stop();
@@ -1960,8 +1970,8 @@ void SfxDispatcher::FlushImpl()
pImp->aFixedObjBars[n].nResId = 0;
#ifdef DBG_UTIL
- aMsg += " done";
- DbgTrace( aMsg.GetBuffer() );
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("done"));
+ DbgTrace(aMsg.getStr());
#endif
}
@@ -2422,19 +2432,22 @@ sal_Bool SfxDispatcher::_FillState
for ( const SfxPoolItem *pItem = aIter.FirstItem();
pItem;
pItem = aIter.NextItem() )
+ {
if ( !IsInvalidItem(pItem) && !pItem->ISA(SfxVoidItem) )
{
sal_uInt16 nSlotId = rState.GetPool()->GetSlotId(pItem->Which());
if ( !pItem->IsA(pIF->GetSlot(nSlotId)->GetType()->Type()) )
{
- ByteString aMsg( "item-type unequal to IDL (=> no BASIC)" );
- aMsg += "\nwith SID: ";
- aMsg += ByteString::CreateFromInt32( nSlotId );
- aMsg += "\nin ";
- aMsg += pIF->GetClassName();
- DbgOut( aMsg.GetBuffer(), DBG_OUT_ERROR, __FILE__, __LINE__);
+ rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM(
+ "item-type unequal to IDL (=> no BASIC)"));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nwith SID: "));
+ aMsg.append(static_cast<sal_Int32>(nSlotId));
+ aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nin "));
+ aMsg.append(pIF->GetClassName());
+ DbgOut(aMsg.getStr(), DBG_OUT_ERROR, __FILE__, __LINE__);
}
}
+ }
}
#endif
@@ -2788,24 +2801,6 @@ sal_Bool SfxDispatcher::IsReadOnlyShell_Impl( sal_uInt16 nShell ) const
class StackAccess_Impl : public SfxShellStack_Implarr_
{};
-void SfxDispatcher::InsertShell_Impl( SfxShell& rShell, sal_uInt16 nPos )
-{
- Flush();
-
- // The cast is because SfxShellStack_Impl member has non of its own
- ((StackAccess_Impl*) (&pImp->aStack))->Insert( nPos, &rShell );
- rShell.SetDisableFlags( pImp->nDisableFlags );
- rShell.DoActivate_Impl(pImp->pFrame, sal_True);
-
- if ( !SFX_APP()->IsDowning() )
- {
- pImp->bUpdated = sal_False;
- pImp->pCachedServ1 = 0;
- pImp->pCachedServ2 = 0;
- InvalidateBindings_Impl(sal_True);
- }
-}
-
void SfxDispatcher::RemoveShell_Impl( SfxShell& rShell )
{
Flush();
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 6570a27b956e..245cc5848c03 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -41,6 +41,7 @@
#include "sfx2/sfxresid.hxx"
#include <sfx2/minarray.hxx>
#include <sfx2/objsh.hxx>
+#include <rtl/strbuf.hxx>
DBG_NAME(SfxInterface)
@@ -237,20 +238,26 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
if ( pSlave->pLinkedSlot != pMasterSlot )
{
- ByteString aStr("Wrong Master/Slave- link: ");
- aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
- aStr += " , ";
- aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
- OSL_FAIL(aStr.GetBuffer());
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Wrong Master/Slave- link: "));
+ aStr.append(static_cast<sal_Int32>(
+ pMasterSlot->GetSlotId()));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(static_cast<sal_Int32>(
+ pSlave->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
if ( pSlave->nMasterSlotId != pMasterSlot->GetSlotId() )
{
- ByteString aStr("Wrong Master/Slave-Ids: ");
- aStr += ByteString::CreateFromInt32(pMasterSlot->GetSlotId());
- aStr += " , ";
- aStr += ByteString::CreateFromInt32(pSlave->GetSlotId());
- OSL_FAIL(aStr.GetBuffer());
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Wrong Master/Slave-Ids: "));
+ aStr.append(static_cast<sal_Int32>(
+ pMasterSlot->GetSlotId()));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(static_cast<sal_Int32>(
+ pSlave->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
pSlave = pSlave->pNextSlot;
@@ -263,11 +270,13 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
if ( pIter->pLinkedSlot->GetKind() != SFX_KIND_ENUM )
{
- ByteString aStr("Slave is no enum: ");
- aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
- aStr += " , ";
- aStr += ByteString::CreateFromInt32(pIter->pLinkedSlot->GetSlotId());
- OSL_FAIL(aStr.GetBuffer());
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Slave is no enum: "));
+ aStr.append(static_cast<sal_Int32>(pIter->GetSlotId()));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(static_cast<sal_Int32>(
+ pIter->pLinkedSlot->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
}
@@ -277,11 +286,13 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
pCurSlot = pCurSlot->pNextSlot;
if ( pCurSlot->GetStateFnc() != pIter->GetStateFnc() )
{
- ByteString aStr("Linked Slots with different State Methods : ");
- aStr += ByteString::CreateFromInt32(pCurSlot->GetSlotId());
- aStr += " , ";
- aStr += ByteString::CreateFromInt32(pIter->GetSlotId());
- OSL_FAIL(aStr.GetBuffer());
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Linked Slots with different State Methods : "));
+ aStr.append(static_cast<sal_Int32>(
+ pCurSlot->GetSlotId()));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(static_cast<sal_Int32>(pIter->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
}
while ( pCurSlot != pIter );
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index c99badd04d46..bc5e03feea91 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -53,6 +53,7 @@
#include "macro.hxx"
#include <sfx2/objface.hxx>
#include <sfx2/appuno.hxx>
+#include <rtl/strbuf.hxx>
//===================================================================
@@ -219,9 +220,10 @@ SfxRequest::SfxRequest
#ifdef DBG_UTIL
else
{
- ByteString aStr( "Recording unsupported slot: ");
- aStr += ByteString::CreateFromInt32( pImp->pPool->GetSlotId(nSlotId) );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Recording unsupported slot: "));
+ aStr.append(static_cast<sal_Int32>(pImp->pPool->GetSlotId(nSlotId)));
+ OSL_FAIL(aStr.getStr());
}
#endif
}
@@ -719,9 +721,10 @@ void SfxRequest::Done_Impl
// new Recording uses UnoName!
if ( !pImp->pSlot->pUnoName )
{
- ByteString aStr( "Recording not exported slot: ");
- aStr += ByteString::CreateFromInt32( pImp->pSlot->GetSlotId() );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Recording not exported slot: "));
+ aStr.append(static_cast<sal_Int32>(pImp->pSlot->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
if ( !pImp->pSlot->pUnoName ) // playing it safe
@@ -740,9 +743,10 @@ void SfxRequest::Done_Impl
#ifdef DBG_UTIL
if ( SFX_ITEM_SET != eState )
{
- ByteString aStr( "Recording property not available: ");
- aStr += ByteString::CreateFromInt32( pImp->pSlot->GetSlotId() );
- OSL_FAIL( aStr.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "Recording property not available: "));
+ aStr.append(static_cast<sal_Int32>(pImp->pSlot->GetSlotId()));
+ OSL_FAIL(aStr.getStr());
}
#endif
uno::Sequence < beans::PropertyValue > aSeq;
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index ecebb51c40b2..f18c2e74d78b 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -93,31 +93,6 @@ struct SfxShell_Impl: public SfxBroadcaster
~SfxShell_Impl() { delete pExecuter; delete pUpdater;}
};
-//====================================================================
-#ifdef DBG_UTIL
-
-String SfxShellIdent_Impl( const SfxShell *pSh )
-
-/* [Description]
-
- Internal helper function. Returns a SfxShell 'pSh' descriptive string.
- For instance: SfxApplication [StarWriter]
-*/
-
-{
- String aIdent( pSh->ISA(SfxApplication) ? DEFINE_CONST_UNICODE("SfxApplication") :
- pSh->ISA(SfxViewFrame) ? DEFINE_CONST_UNICODE("SfxViewFrame") :
- pSh->ISA(SfxViewShell) ? DEFINE_CONST_UNICODE("SfxViewShell") :
- pSh->ISA(SfxObjectShell) ? DEFINE_CONST_UNICODE("SfxObjectShell") : DEFINE_CONST_UNICODE("SfxShell") );
- aIdent += '[';
- aIdent += pSh->GetName();
- aIdent += ']';
- return aIdent;
-}
-
-#endif
-//====================================================================
-
//=========================================================================
// SfxShell
//=========================================================================
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index 50011820f4bf..f30dbd90fe2b 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -527,7 +527,7 @@ void SfxStateCache::DeleteFloatingWindows()
SfxControllerItem *pNextCtrl=0;
for ( SfxControllerItem *pCtrl=pController; pCtrl; pCtrl=pNextCtrl )
{
- OSL_TRACE((ByteString("pCtrl: ").Append(ByteString::CreateFromInt64((sal_uIntPtr)pCtrl))).GetBuffer());
+ OSL_TRACE(rtl::OStringBuffer(RTL_CONSTASCII_STRINGPARAM("pCtrl: ")).append(reinterpret_cast<sal_Int64>(pCtrl)).getStr());
pNextCtrl = pCtrl->GetItemLink();
pCtrl->DeleteFloatingWindow();
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 8c69e1b4bbc5..81f0d6ece67f 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -127,8 +127,8 @@ void SfxModalDialog::SetDialogData_Impl()
{
// save settings (position and user data)
SvtViewOptions aDlgOpt( E_DIALOG, String::CreateFromInt32( nUniqId ) );
- aDlgOpt.SetWindowState(
- OUString::createFromAscii( GetWindowState( WINDOWSTATE_MASK_POS ).GetBuffer() ) );
+ aDlgOpt.SetWindowState(OStringToOUString(
+ GetWindowState(WINDOWSTATE_MASK_POS), RTL_TEXTENCODING_ASCII_US));
if ( aExtraData.Len() )
aDlgOpt.SetUserItem( USERITEM_NAME, makeAny( OUString( aExtraData ) ) );
}
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 08940391ac87..bc8332ca5014 100755
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -61,7 +61,6 @@
#define STR_APPLY ( RC_DIALOG_BEGIN + 87 )
#define TP_COMMONPRINTOPTIONS ( RC_DIALOG_BEGIN + 90 )
-#define RID_WARN_PRINTTRANSPARENCY ( RC_DIALOG_BEGIN + 91 )
#define RID_ERRBOX_MAIL_CONFIG ( RC_DIALOG_BEGIN + 92 )
diff --git a/sfx2/source/dialog/partwnd.cxx b/sfx2/source/dialog/partwnd.cxx
index 0b40f7c69b67..8146fb4763c1 100644
--- a/sfx2/source/dialog/partwnd.cxx
+++ b/sfx2/source/dialog/partwnd.cxx
@@ -166,11 +166,6 @@ SfxPartDockWnd_Impl::~SfxPartDockWnd_Impl()
//****************************************************************************
-Rectangle impl_Rectangle_Struct2Object( const ::com::sun::star::awt::Rectangle& aRectangleStruct )
-{
- return Rectangle(aRectangleStruct.X,aRectangleStruct.Y,aRectangleStruct.Width,aRectangleStruct.Height);
-}
-
void SfxPartDockWnd_Impl::Resize()
/* [Description]
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 41a5de5650f1..87db172258f2 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -124,6 +124,7 @@ SfxPasswordDialog::SfxPasswordDialog( Window* pParent, const String* pGroupText
maMinLenPwdStr ( SfxResId( STR_PASSWD_MIN_LEN ) ),
maEmptyPwdStr ( SfxResId( STR_PASSWD_EMPTY ) ),
maMainPwdStr ( ),
+ mnMinLen ( 5 ),
mnExtras ( 0 ),
mbAsciiOnly ( false )
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index bec9a5760c5c..df40d6d3e40d 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -461,32 +461,4 @@ IMPL_LINK( SfxCommonPrintOptionsTabPage, ToggleOutputPrintFileRBHdl, RadioButton
return 0;
}
-TransparencyPrintWarningBox::TransparencyPrintWarningBox( Window* pParent ) :
- ModalDialog( pParent, SfxResId( RID_WARN_PRINTTRANSPARENCY ) ),
- aWarnFI ( this, SfxResId( FI_PRINTTRANSWARN ) ),
- aWarnFT ( this, SfxResId( FT_PRINTTRANSWARN ) ),
- aYesBtn ( this, SfxResId( BTN_PRINTTRANS_YES ) ),
- aNoBtn ( this, SfxResId( BTN_PRINTTRANS_NO ) ),
- aCancelBtn ( this, SfxResId( BTN_PRINTTRANS_CANCEL ) ),
- aNoWarnCB ( this, SfxResId( CBX_NOPRINTTRANSWARN ) )
-{
- FreeResource();
-
- aWarnFT.SetStyle( aWarnFT.GetStyle() | WB_INFO );
- aWarnFI.SetImage( WarningBox::GetStandardImage() );
-
- aNoBtn.SetClickHdl( LINK( this, TransparencyPrintWarningBox, ClickNoBtn ) );
-}
-
-TransparencyPrintWarningBox::~TransparencyPrintWarningBox()
-{
-}
-
-IMPL_LINK( TransparencyPrintWarningBox, ClickNoBtn, PushButton*, pButton )
-{
- (void)pButton; //unused
- EndDialog( RET_NO );
- return 0;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/dialog/printopt.hrc b/sfx2/source/dialog/printopt.hrc
index 38c766c9f56a..28c4b57532ee 100755
--- a/sfx2/source/dialog/printopt.hrc
+++ b/sfx2/source/dialog/printopt.hrc
@@ -55,10 +55,3 @@
#define CB_PAPERSIZE 51
#define CB_PAPERORIENTATION 52
#define CB_TRANSPARENCY 53
-
-#define FI_PRINTTRANSWARN 60
-#define FT_PRINTTRANSWARN 61
-#define BTN_PRINTTRANS_YES 62
-#define BTN_PRINTTRANS_NO 63
-#define BTN_PRINTTRANS_CANCEL 64
-#define CBX_NOPRINTTRANSWARN 65
diff --git a/sfx2/source/dialog/printopt.src b/sfx2/source/dialog/printopt.src
index 394c0415880d..586d8a8479c3 100644
--- a/sfx2/source/dialog/printopt.src
+++ b/sfx2/source/dialog/printopt.src
@@ -251,125 +251,3 @@ TabPage TP_COMMONPRINTOPTIONS
Text [ en-US ] = "~Transparency";
};
};
-
-// --------------
-// - WarningBox -
-// --------------
-
-ModalDialog RID_WARN_PRINTTRANSPARENCY
-{
- HelpID = "sfx2:ModalDialog:RID_WARN_PRINTTRANSPARENCY";
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( 195 , 85 ) ;
- Text [ en-US ] = "Warning" ;
- Moveable = TRUE ;
- FixedImage FI_PRINTTRANSWARN
- {
- Pos = MAP_APPFONT ( 6 , 6 ) ;
- Size = MAP_APPFONT ( 20 , 20 ) ;
- };
- FixedText FT_PRINTTRANSWARN
- {
- Pos = MAP_APPFONT ( 29 , 6 ) ;
- Size = MAP_APPFONT ( 163 , 36 ) ;
- WordBreak = TRUE ;
- Text [ en-US ] = "Your document contains transparent objects.\nThis may lead to longer printing time on certain\nprinters. Should the aspect of transparency\nbe reduced?";
- };
- OKButton BTN_PRINTTRANS_YES
- {
- Pos = MAP_APPFONT ( 12 , 48 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE;
- Text [ en-US ] = "~Yes" ;
- };
- PushButton BTN_PRINTTRANS_NO
- {
- HelpID = "sfx2:PushButton:RID_WARN_PRINTTRANSPARENCY:BTN_PRINTTRANS_NO";
- Pos = MAP_APPFONT ( 68 , 48 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~No" ;
- };
- CancelButton BTN_PRINTTRANS_CANCEL
- {
- Pos = MAP_APPFONT ( 124 , 48 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- Text [ en-US ] = "~Cancel" ;
- };
- CheckBox CBX_NOPRINTTRANSWARN
- {
- HelpID = "sfx2:CheckBox:RID_WARN_PRINTTRANSPARENCY:CBX_NOPRINTTRANSWARN";
- Pos = MAP_APPFONT ( 6 , 68 ) ;
- Size = MAP_APPFONT ( 183 , 10 ) ;
- Text [ en-US ] = "~Do not show warning again" ;
- };
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index c385bad34df3..34abebc0bfd4 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -93,7 +93,7 @@ void SearchDialog::LoadConfig()
SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
if ( aViewOpt.Exists() )
{
- m_sWinState = ByteString( aViewOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US );
+ m_sWinState = rtl::OUStringToOString(aViewOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US);
Any aUserItem = aViewOpt.GetUserItem( USERITEM_NAME );
::rtl::OUString aTemp;
if ( aUserItem >>= aTemp )
@@ -120,7 +120,7 @@ void SearchDialog::LoadConfig()
void SearchDialog::SaveConfig()
{
SvtViewOptions aViewOpt( E_DIALOG, m_sConfigName );
- aViewOpt.SetWindowState( rtl::OUString::createFromAscii( m_sWinState.GetBuffer() ) );
+ aViewOpt.SetWindowState(rtl::OStringToOUString(m_sWinState, RTL_TEXTENCODING_ASCII_US));
String sUserData;
sal_uInt16 i = 0, nCount = Min( m_aSearchEdit.GetEntryCount(), MAX_SAVE_COUNT );
for ( ; i < nCount; ++i )
@@ -180,7 +180,7 @@ void SearchDialog::StateChanged( StateChangedType nStateChange )
{
if ( nStateChange == STATE_CHANGE_INITSHOW )
{
- if ( m_sWinState.Len() )
+ if (!m_sWinState.isEmpty())
SetWindowState( m_sWinState );
m_bIsConstructed = sal_True;
}
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index c9d90ae59b0b..e816322a0718 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -586,7 +586,7 @@ SfxTabDialog::~SfxTabDialog()
// save settings (screen position and current page)
SvtViewOptions aDlgOpt( E_TABDIALOG, String::CreateFromInt32( nResId ) );
#if !ENABLE_LAYOUT_SFX_TABDIALOG
- aDlgOpt.SetWindowState( OUString::createFromAscii( GetWindowState( WINDOWSTATE_MASK_POS ).GetBuffer() ) );
+ aDlgOpt.SetWindowState(OStringToOUString(GetWindowState(WINDOWSTATE_MASK_POS),RTL_TEXTENCODING_ASCII_US));
#endif /* !ENABLE_LAYOUT_SFX_TABDIALOG */
aDlgOpt.SetPageID( aTabCtrl.GetCurPageId() );
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b2aba626123f..dd2e5a8384d0 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
+#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include <vcl/menu.hxx>
@@ -118,6 +119,39 @@ SFX_IMPL_DOCKINGWINDOW(SfxTemplateDialogWrapper, SID_STYLE_DESIGNER)
//-------------------------------------------------------------------------
+class SfxCommonTemplateDialog_Impl::DeletionWatcher : private boost::noncopyable
+{
+ typedef void (DeletionWatcher::* bool_type)();
+
+public:
+ explicit DeletionWatcher(SfxCommonTemplateDialog_Impl& rDialog)
+ : m_pDialog(&rDialog)
+ {
+ m_pDialog->impl_setDeletionWatcher(this);
+ }
+
+ ~DeletionWatcher()
+ {
+ if (m_pDialog)
+ m_pDialog->impl_setDeletionWatcher(0);
+ }
+
+ // Signal that the dialog was deleted
+ void signal()
+ {
+ m_pDialog = 0;
+ }
+
+ // Return true if the dialog was deleted
+ operator bool_type() const
+ {
+ return m_pDialog ? 0 : &DeletionWatcher::signal;
+ }
+
+private:
+ SfxCommonTemplateDialog_Impl* m_pDialog;
+};
+
// Re-direct functions
SfxTemplateDialog::SfxTemplateDialog
@@ -743,7 +777,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
pCurObjShell ( NULL ),
xModuleManager ( ::comphelper::getProcessServiceFactory()->createInstance(
DEFINE_CONST_UNICODE("com.sun.star.frame.ModuleManager") ), UNO_QUERY ),
- pbDeleted ( NULL ),
+ m_pDeletionWatcher ( NULL ),
aFmtLb ( this, WB_BORDER | WB_TABSTOP | WB_SORT | WB_QUICK_SEARCH ),
aFilterLb ( pW, WB_BORDER | WB_DROPDOWN | WB_TABSTOP ),
@@ -788,7 +822,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
pStyleSheetPool ( NULL ),
pTreeBox ( NULL ),
pCurObjShell ( NULL ),
- pbDeleted ( NULL ),
+ m_pDeletionWatcher ( NULL ),
aFmtLb ( this, SfxResId( BT_VLIST ) ),
aFilterLb ( pW, SfxResId( BT_FLIST ) ),
@@ -835,18 +869,6 @@ void SfxTemplateDialog_Impl::EnableEdit(sal_Bool bEnable)
//-------------------------------------------------------------------------
-
-sal_uInt16 SfxCommonTemplateDialog_Impl::InfoOffsetToStyleNr(sal_uInt16 nId)
-{
- for ( size_t i = 0; i < pStyleFamilies->size(); i++ )
- if ( SfxFamilyIdToNId(pStyleFamilies->at( i )->GetFamily()) == nId+1 )
- return i;
- OSL_FAIL("Style Nummer not found");
- return 0;
-}
-
-//-------------------------------------------------------------------------
-
void SfxCommonTemplateDialog_Impl::ReadResource()
{
// Read global user resource
@@ -950,6 +972,11 @@ void SfxCommonTemplateDialog_Impl::ReadResource()
void SfxCommonTemplateDialog_Impl::ClearResource()
{
ClearFamilyList();
+ impl_clear();
+}
+
+void SfxCommonTemplateDialog_Impl::impl_clear()
+{
DELETEX(pStyleFamilies);
sal_uInt16 i;
for ( i = 0; i < MAX_FAMILIES; ++i )
@@ -961,6 +988,11 @@ void SfxCommonTemplateDialog_Impl::ClearResource()
DELETEZ( m_pStyleFamiliesId );
}
+void SfxCommonTemplateDialog_Impl::impl_setDeletionWatcher(DeletionWatcher* pNewWatcher)
+{
+ m_pDeletionWatcher = pNewWatcher;
+}
+
//-------------------------------------------------------------------------
void SfxCommonTemplateDialog_Impl::Initialize()
@@ -987,23 +1019,14 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl()
if ( bIsWater )
Execute_Impl(SID_STYLE_WATERCAN, aEmpty, aEmpty, 0);
GetWindow()->Hide();
- DELETEX(pStyleFamilies);
- DELETEZ( m_pStyleFamiliesId );
- sal_uInt16 i;
- for ( i = 0; i < MAX_FAMILIES; ++i )
- DELETEX(pFamilyState[i]);
- for ( i = 0; i < COUNT_BOUND_FUNC; ++i )
- delete pBoundItems[i];
+ impl_clear();
if ( pStyleSheetPool )
EndListening(*pStyleSheetPool);
pStyleSheetPool = NULL;
delete pTreeBox;
delete pTimer;
- if ( pbDeleted )
- {
- pbDeleted->bDead = true;
- pbDeleted = NULL;
- }
+ if ( m_pDeletionWatcher )
+ m_pDeletionWatcher->signal();
}
//-------------------------------------------------------------------------
@@ -1704,15 +1727,15 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
pItems[ nCount++ ] = 0;
- Deleted aDeleted;
- pbDeleted = &aDeleted;
+ DeletionWatcher aDeleted(*this);
sal_uInt16 nModi = pModifier ? *pModifier : 0;
const SfxPoolItem* pItem = rDispatcher.Execute(
nId, SFX_CALLMODE_SYNCHRON | SFX_CALLMODE_RECORD | SFX_CALLMODE_MODAL,
pItems, nModi );
- // FIXME: Dialog can be destroyed while in Execute() check stack variable for dtor flag!
- if ( !pItem || aDeleted() )
+ // Dialog can be destroyed while in Execute() because started
+ // subdialogs are not modal to it (#i97888#).
+ if ( !pItem || aDeleted )
return sal_False;
if ( nId == SID_STYLE_NEW || SID_STYLE_EDIT == nId )
@@ -1734,10 +1757,6 @@ sal_Bool SfxCommonTemplateDialog_Impl::Execute_Impl(
}
}
- // Reset destroyed flag otherwise we use the pointer in the dtor
- // where the local stack object is already destroyed. This would
- // overwrite objects on the stack!! See #i100110
- pbDeleted = NULL;
return sal_True;
}
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 071b4db032e0..a4ca93796e3e 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -61,6 +61,8 @@
#include <osl/security.hxx>
#include "doc.hrc"
+#include <rtl/strbuf.hxx>
+
#include <assert.h>
namespace css = ::com::sun::star;
@@ -166,10 +168,11 @@ void SfxObjectFactory::RegisterViewFactory
{
if ( !pImpl->aViewFactoryArr[i]->GetAPIViewName().Equals( sViewName ) )
continue;
- ByteString sMessage( "SfxObjectFactory::RegisterViewFactory: duplicate view name '" );
- sMessage += ByteString( sViewName, RTL_TEXTENCODING_ASCII_US );
- sMessage += "'!";
- OSL_FAIL( sMessage.GetBuffer() );
+ rtl::OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
+ "SfxObjectFactory::RegisterViewFactory: duplicate view name '"));
+ aStr.append(rtl::OUStringToOString(sViewName, RTL_TEXTENCODING_ASCII_US));
+ aStr.append(RTL_CONSTASCII_STRINGPARAM("'!"));
+ OSL_FAIL(aStr.getStr());
break;
}
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2a1bc48c0b5e..5c5ce9685953 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3336,7 +3336,8 @@ sal_Bool SfxMedium::SetWritableForUserOnly( const ::rtl::OUString& aURL )
osl_File_Attribute_GrpWrite |
osl_File_Attribute_OthWrite |
osl_File_Attribute_ReadOnly);
- nAttributes |= osl_File_Attribute_OwnWrite;
+ nAttributes |= (osl_File_Attribute_OwnWrite |
+ osl_File_Attribute_OwnRead);
bResult = ( osl::File::setAttributes( aURL, nAttributes ) == ::osl::FileBase::E_None );
}
@@ -3483,11 +3484,10 @@ void SfxMedium::CreateTempFileNoCopy()
::rtl::OUString aField;
aAny >>= aField;
- ::rtl::OString sContent = ::rtl::OUStringToOString( aField, RTL_TEXTENCODING_ASCII_US );
- ByteString sType, sSubType;
+ String sType, sSubType;
INetContentTypeParameterList aParameters;
- if( INetContentTypes::parse( sContent, sType, sSubType, &aParameters ) )
+ if (INetContentTypes::parse(aField, sType, sSubType, &aParameters))
{
const INetContentTypeParameter * pCharset = aParameters.find("charset");
if (pCharset != 0)
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index b43001e03c69..769328e14635 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1781,11 +1781,10 @@ void SfxHeaderAttributes_Impl::SetAttribute( const SvKeyValue& rKV )
}
else if( rKV.GetKey().CompareIgnoreCaseToAscii( "content-type" ) == COMPARE_EQUAL )
{
- ::rtl::OString sContent = ::rtl::OUStringToOString( aValue, RTL_TEXTENCODING_ASCII_US );
- ByteString sType, sSubType;
+ String sType, sSubType;
INetContentTypeParameterList aParameters;
- if( INetContentTypes::parse( sContent, sType, sSubType, &aParameters ) )
+ if (INetContentTypes::parse(aValue, sType, sSubType, &aParameters))
{
const INetContentTypeParameter * pCharset = aParameters.find("charset");
if (pCharset != 0)
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 2124c322a261..d7a59a7b3854 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1082,8 +1082,9 @@ sal_Bool SfxObjectShell::SaveTo_Impl
RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::SaveTo_Impl" );
if( RTL_LOGFILE_HASLOGFILE() )
{
- ByteString aString( rMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( aLog, "saving \"%s\"", aString.GetBuffer() );
+ rtl::OString aString(
+ rtl::OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "saving \"%s\"", aString.getStr());
}
AddLog( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Begin" ) ) );
@@ -2964,8 +2965,9 @@ sal_Bool SfxObjectShell::LoadOwnFormat( SfxMedium& rMedium )
RTL_LOGFILE_PRODUCT_CONTEXT( aLog, "PERFORMANCE SfxObjectShell::LoadOwnFormat" );
if( RTL_LOGFILE_HASLOGFILE() )
{
- ByteString aString( rMedium.GetName(), RTL_TEXTENCODING_ASCII_US );
- RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1( aLog, "loading \"%s\"", aString.GetBuffer() );
+ rtl::OString aString(
+ rtl::OUStringToOString(rMedium.GetName(), RTL_TEXTENCODING_ASCII_US));
+ RTL_LOGFILE_PRODUCT_CONTEXT_TRACE1(aLog, "loading \"%s\"", aString.getStr());
}
uno::Reference< embed::XStorage > xStorage = rMedium.GetStorage();
@@ -3203,7 +3205,7 @@ sal_Bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >&
return bResult;
}
-
+#if OSL_DEBUG_LEVEL > 0
sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::XStorage >& xSource,
const uno::Reference< embed::XStorage >& xTarget )
{
@@ -3295,7 +3297,7 @@ sal_Bool StoragesOfUnknownMediaTypeAreCopied_Impl( const uno::Reference< embed::
return sal_True;
}
-
+#endif
sal_Bool SfxObjectShell::SwitchPersistance( const uno::Reference< embed::XStorage >& xStorage )
{
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 0e6113f94f99..adf892c9848c 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -297,7 +297,7 @@ String SfxOleStringHelper::ImplLoadString8( SvStream& rStrm ) const
{
String aValue;
// read size field (signed 32-bit)
- sal_Int32 nSize;
+ sal_Int32 nSize(0);
rStrm >> nSize;
// size field includes trailing NUL character
DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF), "SfxOleStringHelper::ImplLoadString8 - invalid string" );
@@ -316,7 +316,7 @@ String SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
{
String aValue;
// read size field (signed 32-bit), may be buffer size or character count
- sal_Int32 nSize;
+ sal_Int32 nSize(0);
rStrm >> nSize;
DBG_ASSERT( (0 < nSize) && (nSize <= 0xFFFF), "SfxOleStringHelper::ImplLoadString16 - invalid string" );
// size field includes trailing NUL character
@@ -344,12 +344,12 @@ String SfxOleStringHelper::ImplLoadString16( SvStream& rStrm ) const
void SfxOleStringHelper::ImplSaveString8( SvStream& rStrm, const String& rValue ) const
{
// encode to byte string
- ByteString aEncoded( rValue, GetTextEncoding() );
+ rtl::OString aEncoded(rtl::OUStringToOString(rValue, GetTextEncoding()));
// write size field (including trailing NUL character)
- sal_Int32 nSize = static_cast< sal_Int32 >( aEncoded.Len() + 1 );
+ sal_Int32 nSize = aEncoded.getLength() + 1;
rStrm << nSize;
// write character array with trailing NUL character
- rStrm.Write( aEncoded.GetBuffer(), aEncoded.Len() );
+ rStrm.Write(aEncoded.getStr(), aEncoded.getLength());
rStrm << sal_uInt8( 0 );
}
@@ -466,7 +466,7 @@ SfxOleBoolProperty::SfxOleBoolProperty( sal_Int32 nPropId, bool bValue ) :
void SfxOleBoolProperty::ImplLoad( SvStream& rStrm )
{
- sal_Int16 nValue;
+ sal_Int16 nValue(0);
rStrm >> nValue;
mbValue = nValue != 0;
}
@@ -569,7 +569,7 @@ SfxOleFileTimeProperty::SfxOleFileTimeProperty( sal_Int32 nPropId, const util::D
void SfxOleFileTimeProperty::ImplLoad( SvStream& rStrm )
{
- sal_uInt32 nLower, nUpper;
+ sal_uInt32 nLower(0), nUpper(0);
rStrm >> nLower >> nUpper;
::DateTime aDateTime = DateTime::CreateFromWin32FileDateTime( nLower, nUpper );
// note: editing duration is stored as offset to TIMESTAMP_INVALID_DATETIME
@@ -715,7 +715,7 @@ void SfxOleDictionaryProperty::ImplLoad( SvStream& rStrm )
maPropNameMap.clear();
for( sal_Int32 nIdx = 0; (nIdx < nNameCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nIdx )
{
- sal_Int32 nPropId;
+ sal_Int32 nPropId(0);
rStrm >> nPropId;
// name always stored as byte string
maPropNameMap[ nPropId ] = LoadString8( rStrm );
@@ -937,8 +937,8 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
{
// read section header
mnStartPos = rStrm.Tell();
- sal_uInt32 nSize;
- sal_Int32 nPropCount;
+ sal_uInt32 nSize(0);
+ sal_Int32 nPropCount(0);
rStrm >> nSize >> nPropCount;
// read property ID/position pairs
@@ -946,8 +946,8 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
SfxOlePropPosMap aPropPosMap;
for( sal_Int32 nPropIdx = 0; (nPropIdx < nPropCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nPropIdx )
{
- sal_Int32 nPropId;
- sal_uInt32 nPropPos;
+ sal_Int32 nPropId(0);
+ sal_uInt32 nPropPos(0);
rStrm >> nPropId >> nPropPos;
aPropPosMap[ nPropId ] = nPropPos;
}
@@ -957,7 +957,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
if( (aCodePageIt != aPropPosMap.end()) && SeekToPropertyPos( rStrm, aCodePageIt->second ) )
{
// codepage property must be of type signed int-16
- sal_Int32 nPropType;
+ sal_Int32 nPropType(0);
rStrm >> nPropType;
if( nPropType == PROPTYPE_INT16 )
LoadObject( rStrm, maCodePageProp );
@@ -973,7 +973,7 @@ void SfxOleSection::ImplLoad( SvStream& rStrm )
if( mbSupportsDict )
{
// dictionary property contains number of pairs in property type field
- sal_Int32 nNameCount;
+ sal_Int32 nNameCount(0);
rStrm >> nNameCount;
maDictProp.SetNameCount( nNameCount );
LoadObject( rStrm, maDictProp );
@@ -1031,7 +1031,7 @@ bool SfxOleSection::SeekToPropertyPos( SvStream& rStrm, sal_uInt32 nPropPos ) co
void SfxOleSection::LoadProperty( SvStream& rStrm, sal_Int32 nPropId )
{
// property data type
- sal_Int32 nPropType;
+ sal_Int32 nPropType(0);
rStrm >> nPropType;
// create empty property object
SfxOlePropertyRef xProp;
@@ -1156,7 +1156,7 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
sal_uInt16 nOsMinor;
sal_uInt16 nOsType;
SvGlobalName aGuid;
- sal_Int32 nSectCount;
+ sal_Int32 nSectCount(0);
rStrm >> nByteOrder >> nVersion >> nOsMinor >> nOsType >> aGuid >> nSectCount;
// read sections
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index ccfa7409252a..67d26941abab 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -91,6 +91,7 @@
#include <svtools/ehdl.hxx>
#include <svtools/sfxecode.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/strbuf.hxx>
#include <framework/configimporter.hxx>
#include <framework/interaction.hxx>
#include <framework/titlehelper.hxx>
@@ -2511,36 +2512,6 @@ void addTitle_Impl( Sequence < ::com::sun::star::beans::PropertyValue >& rSeq, c
}
}
-void SfxBaseModel::NotifyStorageListeners_Impl()
-{
- uno::Reference< uno::XInterface > xSelfHold( static_cast< ::cppu::OWeakObject* >(this) );
-
- if ( m_pData->m_pObjectShell )
- {
- ::cppu::OInterfaceContainerHelper* pContainer =
- m_pData->m_aInterfaceContainer.getContainer(
- ::getCppuType( ( const uno::Reference< document::XStorageChangeListener >*) NULL ) );
- if ( pContainer != NULL )
- {
- uno::Reference< embed::XStorage > xNewStorage = m_pData->m_pObjectShell->GetStorage();
- ::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
- while ( pIterator.hasMoreElements() )
- {
- try
- {
- ((document::XStorageChangeListener*)pIterator.next())->notifyStorageChange(
- xSelfHold,
- xNewStorage );
- }
- catch( uno::RuntimeException& )
- {
- pIterator.remove();
- }
- }
- }
- }
-}
-
void SfxBaseModel::Notify( SfxBroadcaster& rBC ,
const SfxHint& rHint )
{
@@ -2999,9 +2970,10 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
if ( pIC )
{
#ifdef DBG_UTIL
- ByteString aTmp( "SfxDocumentEvent: " );
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
+ "SfxDocumentEvent: "));
+ aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
+ OSL_TRACE(aTmp.getStr());
#endif
document::DocumentEvent aDocumentEvent( (frame::XModel*)this, aName, xController, uno::Any() );
@@ -3016,9 +2988,10 @@ void SfxBaseModel::postEvent_Impl( const ::rtl::OUString& aName, const uno::Refe
if ( pIC )
{
#ifdef DBG_UTIL
- ByteString aTmp( "SfxEvent: " );
- aTmp += ByteString( String(aName), RTL_TEXTENCODING_UTF8 );
- OSL_TRACE( "%s", aTmp.GetBuffer() );
+ rtl::OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(
+ "SfxEvent: "));
+ aTmp.append(rtl::OUStringToOString(aName, RTL_TEXTENCODING_UTF8));
+ OSL_TRACE(aTmp.getStr());
#endif
document::EventObject aEvent( (frame::XModel*)this, aName );
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index ad180e067fa5..8059510bda85 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -41,37 +41,18 @@
class SfxContentHelper
{
-private:
- static sal_Bool Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
- sal_Int32 nNameClash );
-
public:
static sal_Bool IsDocument( const String& rContent );
- static sal_Bool IsFolder( const String& rContent );
- static sal_Bool GetTitle( const String& rContent, String& rTitle );
static sal_Bool Kill( const String& rContent );
static ::com::sun::star::uno::Sequence< ::rtl::OUString >
- GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted = sal_False );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString >
- GetFolderContentProperties( const String& rFolder, sal_Bool bFolder );
- static ::com::sun::star::uno::Sequence< ::rtl::OUString >
GetResultSet( const String& rURL );
static ::com::sun::star::uno::Sequence< ::rtl::OUString >
GetHelpTreeViewContents( const String& rURL );
static String GetActiveHelpString( const String& rURL );
static sal_Bool IsHelpErrorDocument( const String& rURL );
- static sal_Bool CopyTo( const String& rSource, const String& rDest );
- static sal_Bool MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR );
-
- static sal_Bool MakeFolder( const String& rFolder );
- static ErrCode QueryDiskSpace( const String& rPath, sal_Int64& rFreeBytes );
static sal_uIntPtr GetSize( const String& rContent );
-
- // please don't use this!
- static sal_Bool Exists( const String& rContent );
- static sal_Bool Find( const String& rFolder, const String& rName, String& rFile );
};
#endif // #ifndef _SFX_HELPER_HXX
diff --git a/sfx2/source/inc/partwnd.hxx b/sfx2/source/inc/partwnd.hxx
index 269d879e3414..3d84438966cc 100644
--- a/sfx2/source/inc/partwnd.hxx
+++ b/sfx2/source/inc/partwnd.hxx
@@ -68,9 +68,6 @@ public:
class SfxPartDockWnd_Impl : public SfxDockingWindow
{
-private:
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XFrame > m_xFrame;
-
protected:
virtual void Resize();
virtual long Notify( NotifyEvent& rNEvt );
diff --git a/sfx2/source/inc/sfxtypes.hxx b/sfx2/source/inc/sfxtypes.hxx
index 41f060e4fad7..5b5c6b565293 100644
--- a/sfx2/source/inc/sfxtypes.hxx
+++ b/sfx2/source/inc/sfxtypes.hxx
@@ -100,10 +100,6 @@ struct _Capper
//------------------------------------------------------------------------
-String SfxShellIdent_Impl( const SfxShell *pSh );
-
-//------------------------------------------------------------------------
-
#if defined(DBG_UTIL) && defined(WNT)
class SfxStack
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index aa4c7a05776b..461c5b82321a 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -103,18 +103,12 @@ public:
// class SfxCommonTemplateDialog_Impl ------------------------------------
-struct Deleted
-{
- bool bDead;
-
- Deleted() : bDead(false) {}
-
- inline bool operator()() { return bDead; }
-};
-
class SfxCommonTemplateDialog_Impl : public SfxListener
{
private:
+ class DeletionWatcher;
+ friend class DeletionWatcher;
+
class ISfxTemplateCommon_Impl : public ISfxTemplateCommon
{
private:
@@ -129,6 +123,8 @@ private:
void ReadResource();
void ClearResource();
+ void impl_clear();
+ void impl_setDeletionWatcher(DeletionWatcher* pNewWatcher);
protected:
#define MAX_FAMILIES 5
@@ -156,7 +152,7 @@ protected:
SfxObjectShell* pCurObjShell;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModuleManager >
xModuleManager;
- Deleted* pbDeleted;
+ DeletionWatcher* m_pDeletionWatcher;
SfxActionListBox aFmtLb;
ListBox aFilterLb;
@@ -228,7 +224,6 @@ protected:
// In which FamilyState do I have to look , in order to get the
// information of the ith Family in the pStyleFamilies.
sal_uInt16 StyleNrToInfoOffset( sal_uInt16 i );
- sal_uInt16 InfoOffsetToStyleNr( sal_uInt16 i );
void Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
diff --git a/sfx2/source/inc/workwin.hxx b/sfx2/source/inc/workwin.hxx
index 0acaf892f93b..d4b1c487fcbb 100644
--- a/sfx2/source/inc/workwin.hxx
+++ b/sfx2/source/inc/workwin.hxx
@@ -278,8 +278,6 @@ protected:
void CreateChildWin_Impl(SfxChildWin_Impl*,sal_Bool);
void RemoveChildWin_Impl(SfxChildWin_Impl*);
void Sort_Impl();
- void AlignChild_Impl( Window& rWindow, const Size& rNewSize,
- SfxChildAlignment eAlign );
SfxChild_Impl* FindChild_Impl( const Window& rWindow ) const;
virtual sal_Bool RequestTopToolSpacePixel_Impl( SvBorder aBorder );
virtual Rectangle GetTopRect_Impl();
@@ -290,7 +288,6 @@ protected:
public:
SfxWorkWindow( Window *pWin, SfxBindings& rBindings, SfxWorkWindow* pParent = NULL);
virtual ~SfxWorkWindow();
- SystemWindow* GetTopWindow() const;
SfxBindings& GetBindings()
{ return *pBindings; }
Window* GetWindow() const
@@ -306,7 +303,6 @@ public:
{ return bInternalDockingAllowed; }
SfxWorkWindow* GetParent_Impl() const
{ return pParent; }
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > CreateDispatch( const String& );
// Methods for all Child windows
void DataChanged_Impl( const DataChangedEvent& rDCEvt );
@@ -314,11 +310,9 @@ public:
SfxChild_Impl* RegisterChild_Impl( Window& rWindow, SfxChildAlignment eAlign, sal_Bool bCanGetFocus=sal_False );
void ShowChilds_Impl();
void HideChilds_Impl();
- void Close_Impl();
sal_Bool PrepareClose_Impl();
virtual void ArrangeChilds_Impl( sal_Bool bForce = sal_True );
void DeleteControllers_Impl();
- void SaveStatus_Impl();
void HidePopups_Impl(sal_Bool bHide, sal_Bool bParent=sal_False, sal_uInt16 nId=0);
void ConfigChild_Impl(SfxChildIdentifier,
SfxDockingConfig, sal_uInt16);
@@ -334,16 +328,12 @@ public:
void ResetObjectBars_Impl();
void SetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId,
SfxInterface *pIFace, const String* pName=0 );
- Window* GetObjectBar_Impl( sal_uInt16 nPos, sal_uInt32 nResId );
bool KnowsObjectBar_Impl( sal_uInt16 nPos ) const;
sal_Bool IsVisible_Impl();
void MakeVisible_Impl( sal_Bool );
void SetObjectBarVisibility_Impl( sal_uInt16 nVis );
sal_Bool IsContainer_Impl() const;
void Lock_Impl( sal_Bool );
- void NextObjectBar_Impl( sal_uInt16 nPos );
- sal_uInt16 HasNextObjectBar_Impl( sal_uInt16 nPos, String* pStr=0 );
- void SetObjectBarCustomizeMode_Impl( sal_Bool );
// Methods for ChildWindows
void UpdateChildWindows_Impl();
@@ -361,14 +351,11 @@ public:
sal_Bool IsVisible_Impl( sal_uInt16 nMode ) const;
void DisableChildWindow_Impl( sal_uInt16 nId, sal_Bool bDisable );
sal_Bool IsFloating( sal_uInt16 nId );
- void ChangeWindow_Impl( Window *pNew );
void SetActiveChild_Impl( Window *pChild );
- Window* GetActiveChild_Impl();
virtual sal_Bool ActivateNextChild_Impl( sal_Bool bForward = sal_True );
bool AllowChildWindowCreation_Impl( const SfxChildWin_Impl& i_rCW ) const;
// Methods for StatusBar
- void SetTempStatusBar_Impl( sal_Bool bSet );
void ResetStatusBar_Impl();
void SetStatusBar_Impl(sal_uInt32 nResId, SfxShell *pShell, SfxBindings& );
void UpdateStatusBar_Impl();
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 58f1cfa64676..b5209e2870a7 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -204,27 +204,6 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID )
return com::sun::star::frame::CommandGroup::INTERNAL;
}
-sal_Int16 MapCommandGroupToGroupID( sal_Int16 nCommandGroup )
-{
- sal_Int32 i = 0;
- while ( GroupIDCommandGroupMap[i].nGroupID != 0 )
- {
- if ( GroupIDCommandGroupMap[i].nCommandGroup == nCommandGroup )
- return GroupIDCommandGroupMap[i].nGroupID;
- ++i;
- }
-
- return -1;
-}
-
-sal_Bool SupportsCommandGroup( sal_Int16 nCommandGroup )
-{
- if (( nCommandGroup >= 0 ) && ( nCommandGroup <= MAX_COMMANDGROUP ))
- return sal_True;
- else
- return sal_False;
-}
-
sal_uInt32 Get10ThSec()
{
sal_uInt32 n10Ticks = 10 * (sal_uInt32)clock();
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index f7950f650e5d..e41ae1ff48c4 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1616,20 +1616,6 @@ SfxViewFrame* SfxViewFrame::GetNext
return 0;
}
-void SfxViewFrame::CloseHiddenFrames_Impl()
-{
- SfxApplication *pSfxApp = SFX_APP();
- SfxViewFrameArr_Impl &rFrames = pSfxApp->GetViewFrames_Impl();
- for ( sal_uInt16 nPos=0; nPos<rFrames.Count(); )
- {
- SfxViewFrame *pFrame = rFrames.GetObject(nPos);
- if ( !pFrame->IsVisible() )
- pFrame->DoClose();
- else
- nPos++;
- }
-}
-
//--------------------------------------------------------------------
SfxProgress* SfxViewFrame::GetProgress() const
{
diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx
index 57c64187a839..e03206919106 100644
--- a/sfx2/source/view/viewfrm2.cxx
+++ b/sfx2/source/view/viewfrm2.cxx
@@ -245,9 +245,9 @@ String SfxViewFrame::UpdateTitle()
::rtl::OUString aDocServiceName( GetObjectShell()->GetFactory().GetDocumentServiceName() );
aTitle += String( GetModuleName_Impl( aDocServiceName ) );
#ifdef DBG_UTIL
- ::rtl::OUString aDefault;
+ ::rtl::OUString aDefault(RTL_CONSTASCII_USTRINGPARAM("development"));
aTitle += DEFINE_CONST_UNICODE(" [");
- String aVerId( utl::Bootstrap::getBuildIdData( aDefault ));
+ String aVerId( utl::Bootstrap::getProductSource( aDefault ));
aTitle += aVerId;
aTitle += ']';
#endif
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index eb5f98905cbb..d676ad144a18 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -290,7 +290,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
aLabel = aStr;
}
}
- catch ( css::uno::Exception& )
+ catch (const css::uno::Exception&)
{
}
@@ -425,10 +425,13 @@ enum ETypeFamily
return sType;
}
- catch(const css::uno::RuntimeException& exRun)
- { throw exRun; }
- catch(const css::uno::Exception&)
- {}
+ catch (const css::uno::RuntimeException& exRun)
+ {
+ throw;
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
return ::rtl::OUString();
}
@@ -528,7 +531,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
}
}
- catch ( Exception& )
+ catch (const Exception&)
{
}
}
@@ -635,11 +638,11 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
aModule = xModuleManager->identify( xFrame );
}
- catch ( css::uno::RuntimeException& )
+ catch (const css::uno::RuntimeException&)
{
throw;
}
- catch ( css::uno::Exception& )
+ catch (const css::uno::Exception&)
{
}
@@ -723,7 +726,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
xStorable->storeToURL( aFileURL, aArgs );
}
- catch ( com::sun::star::io::IOException& )
+ catch (const com::sun::star::io::IOException&)
{
rReq.Done(sal_False);
return;
@@ -741,7 +744,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
xSystemShellExecute->execute(
aFileURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
SolarMutexGuard aGuard;
Window *pParent = SFX_APP()->GetTopWindow();
@@ -1883,7 +1886,7 @@ void SfxViewShell::CheckIPClient_Impl( SfxInPlaceClient *pIPClient, const Rectan
{
pIPClient->GetObject()->changeState( embed::EmbedStates::INPLACE_ACTIVE );
}
- catch ( uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
@@ -2147,7 +2150,7 @@ sal_Bool SfxViewShell::TryContextMenuInterception( Menu& rIn, const ::rtl::OUStr
continue;
}
}
- catch( uno::RuntimeException& )
+ catch (const uno::RuntimeException&)
{
aIt.remove();
}
@@ -2196,7 +2199,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
xModel->close( sal_True );
bSuccess = sal_True;
}
- catch ( util::CloseVetoException& )
+ catch (const util::CloseVetoException&)
{
}
}
@@ -2213,7 +2216,7 @@ void SfxViewShell::CheckOwnerShip_Impl()
{
xFrame->close( sal_True );
}
- catch ( util::CloseVetoException& )
+ catch (const util::CloseVetoException&)
{
}
}
@@ -2291,7 +2294,7 @@ void SfxViewShell::AddRemoveClipboardListener( const uno::Reference < datatransf
}
}
}
- catch( const uno::Exception& )
+ catch (const uno::Exception&)
{
}
}
diff --git a/sfx2/util/sfx.component b/sfx2/util/sfx.component
index dfa3d208a169..22ed1e4a9c12 100755
--- a/sfx2/util/sfx.component
+++ b/sfx2/util/sfx.component
@@ -26,7 +26,7 @@
*
**********************************************************************-->
-<component loader="com.sun.star.loader.SharedLibrary"
+<component loader="com.sun.star.loader.SharedLibrary" prefix="sfx"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="SfxDocumentMetaData">
<service name="com.sun.star.document.DocumentProperties"/>
diff --git a/sfx2/workben/custompanel/ctp_services.cxx b/sfx2/workben/custompanel/ctp_services.cxx
index 7f67b65d698c..c6c81bc71964 100644
--- a/sfx2/workben/custompanel/ctp_services.cxx
+++ b/sfx2/workben/custompanel/ctp_services.cxx
@@ -74,12 +74,6 @@ namespace sd { namespace colortoolpanel
extern "C"
{
//------------------------------------------------------------------------------------------------------------------
- SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** )
- {
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
- }
-
- //------------------------------------------------------------------------------------------------------------------
sal_Bool SAL_CALL component_writeInfo( void * pServiceManager, void * pRegistryKey )
{
return ::cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, ::sd::colortoolpanel::s_aServiceEntries );