summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/app.cxx36
-rw-r--r--sfx2/source/appl/app.hrc1
-rw-r--r--sfx2/source/appl/app.src7
-rw-r--r--sfx2/source/appl/appdata.cxx2
-rw-r--r--sfx2/source/appl/appopen.cxx2
-rw-r--r--sfx2/source/appl/appserv.cxx23
-rw-r--r--sfx2/source/appl/appuno.cxx5
-rw-r--r--sfx2/source/appl/imestatuswindow.cxx22
-rw-r--r--sfx2/source/appl/imestatuswindow.hxx6
-rw-r--r--sfx2/source/appl/linkmgr2.cxx8
-rw-r--r--sfx2/source/appl/newhelp.cxx18
-rw-r--r--sfx2/source/appl/newhelp.hxx4
12 files changed, 66 insertions, 68 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index a4ffed8510e7..f5862426afe0 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -56,7 +56,7 @@
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/processfactory.hxx>
-#include <com/sun/star/uri/XUriReferenceFactory.hpp>
+#include <com/sun/star/uri/UriReferenceFactory.hpp>
#include <com/sun/star/uri/XVndSunStarScriptUrl.hpp>
#include <basic/basmgr.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -527,35 +527,29 @@ sal_Bool SfxApplication::IsXScriptURL( const String& rScriptURL )
(void) rScriptURL;
#else
::com::sun::star::uno::Reference
- < ::com::sun::star::lang::XMultiServiceFactory > xSMgr =
- ::comphelper::getProcessServiceFactory();
+ < ::com::sun::star::uno::XComponentContext > xContext =
+ ::comphelper::getProcessComponentContext();
::com::sun::star::uno::Reference
< ::com::sun::star::uri::XUriReferenceFactory >
- xFactory( xSMgr->createInstance(
- ::rtl::OUString(
- "com.sun.star.uri.UriReferenceFactory" ) ),
- ::com::sun::star::uno::UNO_QUERY );
+ xFactory = ::com::sun::star::uri::UriReferenceFactory::create( xContext );
- if ( xFactory.is() )
+ try
{
- try
- {
- ::com::sun::star::uno::Reference
- < ::com::sun::star::uri::XVndSunStarScriptUrl >
- xUrl( xFactory->parse( rScriptURL ),
- ::com::sun::star::uno::UNO_QUERY );
+ ::com::sun::star::uno::Reference
+ < ::com::sun::star::uri::XVndSunStarScriptUrl >
+ xUrl( xFactory->parse( rScriptURL ),
+ ::com::sun::star::uno::UNO_QUERY );
- if ( xUrl.is() )
- {
- result = sal_True;
- }
- }
- catch (const ::com::sun::star::uno::RuntimeException&)
+ if ( xUrl.is() )
{
- // ignore, will just return FALSE
+ result = sal_True;
}
}
+ catch (const ::com::sun::star::uno::RuntimeException&)
+ {
+ // ignore, will just return FALSE
+ }
#endif
return result;
}
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index 5cbfd7fed9a8..fb322cbf3251 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -112,6 +112,7 @@
#define RID_XMLSEC_QUERY_LOSINGSIGNATURE (RID_SFX_APP_START + 186)
#define RID_XMLSEC_QUERY_SAVEBEFORESIGN (RID_SFX_APP_START + 187)
+#define RID_QUERY_CANCELCHECKOUT (RID_SFX_APP_START + 188)
#define RID_XMLSEC_INFO_WRONGDOCFORMAT (RID_SFX_APP_START + 190)
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 6eae48d2f327..d1dcccd11c9f 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -432,6 +432,13 @@ QueryBox RID_XMLSEC_QUERY_SAVEBEFORESIGN
Message [ en-US ] = "The document has to be saved before it can be signed.\nDo you want to save the document?" ;
};
+QueryBox RID_QUERY_CANCELCHECKOUT
+{
+ Buttons = WB_YES_NO ;
+ DefButton = WB_DEF_YES ;
+ Message [ en-US ] = "This will discard all changes on the server since check-out.\nDo you want to proceed?" ;
+};
+
InfoBox RID_XMLSEC_INFO_WRONGDOCFORMAT
{
Message [ en-US ] = "This document must be saved in OpenDocument file format before it can be digitally signed." ;
diff --git a/sfx2/source/appl/appdata.cxx b/sfx2/source/appl/appdata.cxx
index dc04ea6803fa..a49e7790f8e5 100644
--- a/sfx2/source/appl/appdata.cxx
+++ b/sfx2/source/appl/appdata.cxx
@@ -100,7 +100,7 @@ SfxAppData_Impl::SfxAppData_Impl( SfxApplication* )
, nAutoTabPageId(0)
, nRescheduleLocks(0)
, nInReschedule(0)
- , m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessServiceFactory()))
+ , m_xImeStatusWindow(new sfx2::appl::ImeStatusWindow(comphelper::getProcessComponentContext()))
, pTbxCtrlFac(0)
, pStbCtrlFac(0)
, pViewFrames(0)
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 1d1798ffb659..348f1c11f172 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -999,7 +999,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
try
{
// get registered protocol handlers from configuration
- Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessServiceFactory(),
+ Reference < XNameAccess > xAccess( ::comphelper::ConfigurationHelper::openConfig( ::comphelper::getProcessComponentContext(),
::rtl::OUString("org.openoffice.Office.ProtocolHandler/HandlerSet"), ::comphelper::ConfigurationHelper::E_READONLY ), UNO_QUERY );
if ( xAccess.is() )
{
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 450da3e9eebc..fc109add1382 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -351,7 +351,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
RID_SVXDLG_CUSTOMIZE,
NULL, &aSet, xFrame );
- if ( pDlg )
+ if ( pDlg )
{
const short nRet = pDlg->Execute();
@@ -528,13 +528,13 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
case SID_ABOUT:
{
- SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
+ SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
{
VclAbstractDialog* pDlg = pFact->CreateVclDialog( 0, RID_DEFAULTABOUT );
pDlg->Execute();
delete pDlg;
- bDone = true;
+ bDone = true;
}
break;
}
@@ -1002,7 +1002,7 @@ static ::rtl::OUString getConfigurationStringValue(
try
{
::comphelper::ConfigurationHelper::readDirectKey(
- comphelper::getProcessServiceFactory(),
+ comphelper::getProcessComponentContext(),
rPackage,
rRelPath,
rKey,
@@ -1039,8 +1039,8 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
{
VclAbstractDialog* pDlg =
pFact->CreateFrameDialog( NULL, xFrame, rReq.GetSlot(), sPageURL );
- short nRet = pDlg->Execute();
- delete pDlg;
+ short nRet = pDlg->Execute();
+ delete pDlg;
SfxViewFrame* pView = SfxViewFrame::GetFirst();
while ( pView )
{
@@ -1232,7 +1232,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
short nDialogResult = pDlg->Execute();
if ( !nDialogResult )
+ {
+ delete pDlg;
break;
+ }
Sequence< Any > args;
Sequence< sal_Int16 > outIndex;
@@ -1250,6 +1253,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
xScriptContext = xController;
SfxObjectShell::CallXScript( xScriptContext, pDlg->GetScriptURL(), args, ret, outIndex, outArgs );
+ delete pDlg;
}
while ( false );
rReq.Done();
@@ -1275,6 +1279,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if( pDlg )
{
pDlg->Execute();
+ delete pDlg;
}
else
{
@@ -1315,9 +1320,9 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pSet && pSet->GetItemState( pSetPool->GetWhich( SID_AUTO_CORRECT_DLG ), sal_False, &pItem ) == SFX_ITEM_SET )
aSet.Put( *pItem );
- SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
- pDlg->Execute();
- delete pDlg;
+ SfxAbstractTabDialog* pDlg = pFact->CreateTabDialog( RID_OFA_AUTOCORR_DLG, NULL, &aSet, NULL );
+ pDlg->Execute();
+ delete pDlg;
}
break;
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 36be7f935710..ffb4853e7ec1 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -131,7 +131,8 @@ SfxFormalArgument aFormalArgs[] = {
SFX_ARGUMENT(SID_DEFAULTFILENAME,"SuggestedSaveAsName",SfxStringItem),
SFX_ARGUMENT(SID_DEFAULTFILEPATH,"SuggestedSaveAsDir",SfxStringItem),
SFX_ARGUMENT(SID_DOCINFO_AUTHOR,"VersionAuthor",SfxStringItem),
- SFX_ARGUMENT(SID_DOCINFO_COMMENTS,"VersionComment",SfxStringItem),
+ SFX_ARGUMENT(SID_DOCINFO_COMMENTS,"VersionComment",SfxBoolItem),
+ SFX_ARGUMENT(SID_DOCINFO_MAJOR,"VersionMajor",SfxStringItem),
SFX_ARGUMENT(SID_FILE_FILTEROPTIONS,"FilterOptions",SfxStringItem),
SFX_ARGUMENT(SID_FILTER_NAME,"FilterName",SfxStringItem),
// SFX_ARGUMENT(SID_FILE_NAME,"FileName",SfxStringItem),
@@ -1907,7 +1908,7 @@ ErrCode SfxMacroLoader::loadMacro( const ::rtl::OUString& rURL, com::sun::star::
aQualifiedMethod.Erase( nArgsPos - nHashPos - 1 );
}
- if ( pBasMgr->HasMacro( aQualifiedMethod ) )
+ if ( pBasMgr->HasMacro( OUString(aQualifiedMethod) ) )
{
Any aOldThisComponent;
const bool bSetDocMacroMode = ( pDoc != NULL ) && bIsDocBasic;
diff --git a/sfx2/source/appl/imestatuswindow.cxx b/sfx2/source/appl/imestatuswindow.cxx
index 754e35d9d7a7..56631e9ba801 100644
--- a/sfx2/source/appl/imestatuswindow.cxx
+++ b/sfx2/source/appl/imestatuswindow.cxx
@@ -26,6 +26,7 @@
#include "com/sun/star/beans/PropertyState.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/beans/XPropertySet.hpp"
+#include "com/sun/star/configuration/theDefaultProvider.hpp"
#include "com/sun/star/lang/DisposedException.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/uno/Any.hxx"
@@ -84,9 +85,8 @@ namespace css = com::sun::star;
using sfx2::appl::ImeStatusWindow;
ImeStatusWindow::ImeStatusWindow(
- css::uno::Reference< css::lang::XMultiServiceFactory > const &
- rServiceFactory):
- m_xServiceFactory(rServiceFactory),
+ css::uno::Reference< css::uno::XComponentContext > const & rxContext):
+ m_xContext(rxContext),
m_bDisposed(false)
{}
@@ -201,24 +201,14 @@ css::uno::Reference< css::beans::XPropertySet > ImeStatusWindow::getConfig()
{
if (m_bDisposed)
throw css::lang::DisposedException();
- if (!m_xServiceFactory.is())
+ if (!m_xContext.is())
throw css::uno::RuntimeException(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"null comphelper::getProcessServiceFactory")),
0);
- css::uno::Reference< css::lang::XMultiServiceFactory > xProvider(
- m_xServiceFactory->createInstance(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.configuration.ConfigurationProvider"))),
- css::uno::UNO_QUERY);
- if (!xProvider.is())
- throw css::uno::RuntimeException(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "null com.sun.star.configuration."
- "ConfigurationProvider")),
- 0);
+ css::uno::Reference< css::lang::XMultiServiceFactory > xProvider =
+ css::configuration::theDefaultProvider::get( m_xContext );
css::beans::PropertyValue aArg(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("nodepath")), -1,
css::uno::makeAny(
diff --git a/sfx2/source/appl/imestatuswindow.hxx b/sfx2/source/appl/imestatuswindow.hxx
index 5aee577fcc54..4ab18a5841ce 100644
--- a/sfx2/source/appl/imestatuswindow.hxx
+++ b/sfx2/source/appl/imestatuswindow.hxx
@@ -47,7 +47,7 @@ ImeStatusWindow_Impl;
class ImeStatusWindow: private ImeStatusWindow_Impl
{
public:
- ImeStatusWindow( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > const& rServiceFactory );
+ ImeStatusWindow( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const& rxContext );
/** Set up VCL according to the configuration.
@@ -103,8 +103,8 @@ private:
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >
getConfig();
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
- m_xServiceFactory;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+ m_xContext;
osl::Mutex m_aMutex;
com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 4ad6a59f4f80..9564a1857208 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -304,9 +304,9 @@ bool LinkManager::GetDisplayNames(
}
void LinkManager::UpdateAllLinks(
- sal_Bool bAskUpdate,
- sal_Bool /*bCallErrHdl*/,
- sal_Bool bUpdateGrfLinks,
+ bool bAskUpdate,
+ bool /*bCallErrHdl*/,
+ bool bUpdateGrfLinks,
Window* pParentWin )
{
// First make a copy of the array in order to update links
@@ -350,7 +350,7 @@ void LinkManager::UpdateAllLinks(
int nRet = QueryBox( pParentWin, WB_YES_NO | WB_DEF_YES, SfxResId( STR_QUERY_UPDATE_LINKS ).toString() ).Execute();
if( RET_YES != nRet )
return ; // nothing should be updated
- bAskUpdate = sal_False; // once is enough
+ bAskUpdate = false; // once is enough
}
pLink->Update();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 09268a375e6c..3e39f645395c 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -296,7 +296,7 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
ContentListBox_Impl::~ContentListBox_Impl()
{
sal_uInt16 nPos = 0;
- SvLBoxEntry* pEntry = GetEntry( nPos++ );
+ SvTreeListEntry* pEntry = GetEntry( nPos++ );
while ( pEntry )
{
::rtl::OUString aTemp( GetEntryText( pEntry ) );
@@ -325,7 +325,7 @@ void ContentListBox_Impl::InitRoot()
aURL = aRow.GetToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
sal_Bool bIsFolder = ( '1' == cFolder );
- SvLBoxEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, sal_True );
+ SvTreeListEntry* pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, NULL, sal_True );
if ( bIsFolder )
pEntry->SetUserData( new ContentEntry_Impl( aURL, sal_True ) );
}
@@ -333,9 +333,9 @@ void ContentListBox_Impl::InitRoot()
// -----------------------------------------------------------------------
-void ContentListBox_Impl::ClearChildren( SvLBoxEntry* pParent )
+void ContentListBox_Impl::ClearChildren( SvTreeListEntry* pParent )
{
- SvLBoxEntry* pEntry = FirstChild( pParent );
+ SvTreeListEntry* pEntry = FirstChild( pParent );
while ( pEntry )
{
::rtl::OUString aTemp( GetEntryText( pEntry ) );
@@ -347,7 +347,7 @@ void ContentListBox_Impl::ClearChildren( SvLBoxEntry* pParent )
// -----------------------------------------------------------------------
-void ContentListBox_Impl::RequestingChildren( SvLBoxEntry* pParent )
+void ContentListBox_Impl::RequestingChildren( SvTreeListEntry* pParent )
{
try
{
@@ -370,7 +370,7 @@ void ContentListBox_Impl::RequestingChildren( SvLBoxEntry* pParent )
aURL = aRow.GetToken( 0, '\t', nIdx );
sal_Unicode cFolder = aRow.GetToken( 0, '\t', nIdx ).GetChar(0);
sal_Bool bIsFolder = ( '1' == cFolder );
- SvLBoxEntry* pEntry = NULL;
+ SvTreeListEntry* pEntry = NULL;
if ( bIsFolder )
{
pEntry = InsertEntry( aTitle, aOpenBookImage, aClosedBookImage, pParent, sal_True );
@@ -414,7 +414,7 @@ long ContentListBox_Impl::Notify( NotifyEvent& rNEvt )
String ContentListBox_Impl::GetSelectEntry() const
{
String aRet;
- SvLBoxEntry* pEntry = FirstSelected();
+ SvTreeListEntry* pEntry = FirstSelected();
if ( pEntry && !( (ContentEntry_Impl*)pEntry->GetUserData() )->bIsFolder )
aRet = ( (ContentEntry_Impl*)pEntry->GetUserData() )->aURL;
return aRet;
@@ -2170,7 +2170,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
{
sCurrentFactory = SfxHelp::GetCurrentModuleIdentifier();
- Reference< XMultiServiceFactory > xMultiServiceFac = ::comphelper::getProcessServiceFactory();
+ Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
Reference< XInterface > xConfig;
::rtl::OUString sPath( PATH_OFFICE_FACTORIES );
sPath += sCurrentFactory;
@@ -2185,7 +2185,7 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
try
{
xConfiguration = ConfigurationHelper::openConfig(
- xMultiServiceFac, PACKAGE_SETUP, ConfigurationHelper::E_STANDARD );
+ xContext, PACKAGE_SETUP, ConfigurationHelper::E_STANDARD );
if ( xConfiguration.is() )
{
Any aAny = ConfigurationHelper::readRelativeKey( xConfiguration, sPath, sKey );
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 74d73a32194c..cd69921be5b2 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -78,14 +78,14 @@ private:
Image aDocumentImage;
void InitRoot();
- void ClearChildren( SvLBoxEntry* pParent );
+ void ClearChildren( SvTreeListEntry* pParent );
public:
ContentListBox_Impl( Window* pParent, const ResId& rResId );
~ContentListBox_Impl();
- virtual void RequestingChildren( SvLBoxEntry* pParent );
+ virtual void RequestingChildren( SvTreeListEntry* pParent );
virtual long Notify( NotifyEvent& rNEvt );
inline void SetOpenHdl( const Link& rLink ) { SetDoubleClickHdl( rLink ); }