summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2008-11-19 17:43:08 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2008-11-19 17:43:08 +0000
commitc43ea4ea87ffb1c7f9a8528b77c32e2d9d568197 (patch)
tree69a22c5dfb4cfe773af8f34d2165b164b49743f2 /sfx2
parent35fadd14797672ecfa650dd6b7a50c5cc88c4d3d (diff)
CWS-TOOLING: integrate CWS dba301a_DEV300
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/dialog.hrc4
-rw-r--r--sfx2/source/dialog/makefile.mk6
-rw-r--r--sfx2/source/dialog/newerverwarn.cxx168
-rw-r--r--sfx2/source/dialog/newerverwarn.hrc60
-rw-r--r--sfx2/source/dialog/newerverwarn.src84
-rw-r--r--sfx2/source/doc/objstor.cxx42
-rw-r--r--sfx2/source/inc/helpid.hrc1
-rw-r--r--sfx2/source/inc/newerverwarn.hxx62
8 files changed, 40 insertions, 387 deletions
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index ff3dece1e6..aa9ccd9982 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: dialog.hrc,v $
- * $Revision: 1.32 $
+ * $Revision: 1.32.70.1 $
*
* This file is part of OpenOffice.org.
*
@@ -70,8 +70,6 @@
//#define TP_CONFIG_EVENT ( RC_DIALOG_BEGIN + 32)
//#define DLG_CONFIG ( RC_DIALOG_BEGIN + 23)
-#define RID_DLG_NEWER_VERSION_WARNING ( RC_DIALOG_BEGIN + 21)
-
#define IBX_MNUCFG_ALREADY_INCLUDED ( RC_DIALOG_BEGIN + 24)
#define QBX_MNUCFG_UNDEFINED_FUNCTIONS ( RC_DIALOG_BEGIN + 25)
#define QBX_MNUCFG_POPUP_FUNCTIONS ( RC_DIALOG_BEGIN + 26)
diff --git a/sfx2/source/dialog/makefile.mk b/sfx2/source/dialog/makefile.mk
index 442e7654ac..69cc0bb4c5 100644
--- a/sfx2/source/dialog/makefile.mk
+++ b/sfx2/source/dialog/makefile.mk
@@ -50,8 +50,7 @@ EXCEPTIONSFILES=\
$(SLO)$/partwnd.obj \
$(SLO)$/recfloat.obj \
$(SLO)$/templdlg.obj \
- $(SLO)$/dinfdlg.obj \
- $(SLO)$/newerverwarn.obj
+ $(SLO)$/dinfdlg.obj
SLOFILES =\
$(EXCEPTIONSFILES) \
@@ -95,8 +94,7 @@ SRC1FILES =\
templdlg.src \
versdlg.src \
printopt.src \
- srchdlg.src \
- newerverwarn.src
+ srchdlg.src
.IF "$(BUILD_VER_STRING)"!=""
.IF "$(GUI)"=="UNX"
diff --git a/sfx2/source/dialog/newerverwarn.cxx b/sfx2/source/dialog/newerverwarn.cxx
deleted file mode 100644
index dcacf8b9e7..0000000000
--- a/sfx2/source/dialog/newerverwarn.cxx
+++ /dev/null
@@ -1,168 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: newerverwarn.cxx,v $
- * $Revision: 1.5 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_sfx2.hxx"
-
-#include "newerverwarn.hxx"
-#include "sfxresid.hxx"
-#include "sfx2/app.hxx"
-#include "appdata.hxx"
-
-#include "newerverwarn.hrc"
-#include "dialog.hrc"
-
-#include <com/sun/star/frame/XDesktop.hpp>
-#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <com/sun/star/system/XSystemShellExecute.hpp>
-#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
-#include <com/sun/star/util/XURLTransformer.hpp>
-
-#include <comphelper/processfactory.hxx>
-#include <comphelper/configurationhelper.hxx>
-#include <rtl/bootstrap.hxx>
-#include <vcl/msgbox.hxx>
-#include <vos/process.hxx>
-
-namespace beans = ::com::sun::star::beans;
-namespace frame = ::com::sun::star::frame;
-namespace lang = ::com::sun::star::lang;
-namespace uno = ::com::sun::star::uno;
-namespace util = ::com::sun::star::util;
-
-using namespace com::sun::star::system;
-
-namespace sfx2
-{
-
-NewerVersionWarningDialog::NewerVersionWarningDialog(
- Window* pParent, const ::rtl::OUString& rVersion ) :
-
- SfxModalDialog( pParent, SfxResId( RID_DLG_NEWER_VERSION_WARNING ) ),
-
- m_aImage ( this, SfxResId( FI_IMAGE ) ),
- m_aInfoText ( this, SfxResId( FT_INFO ) ),
- m_aButtonLine ( this, SfxResId( FL_BUTTON ) ),
- m_aUpdateBtn ( this, SfxResId( PB_UPDATE ) ),
- m_aLaterBtn ( this, SfxResId( PB_LATER ) ),
- m_sVersion ( rVersion )
-
-{
- FreeResource();
-
- m_aUpdateBtn.SetClickHdl( LINK( this, NewerVersionWarningDialog, UpdateHdl ) );
- m_aLaterBtn.SetClickHdl( LINK( this, NewerVersionWarningDialog, LaterHdl ) );
-
- InitButtonWidth();
-}
-
-NewerVersionWarningDialog::~NewerVersionWarningDialog()
-{
-}
-
-IMPL_LINK( NewerVersionWarningDialog, UpdateHdl, PushButton*, EMPTYARG )
-{
- // detect execute path
- ::rtl::OUString sProgramPath;
- ::vos::OStartupInfo().getExecutableFile( sProgramPath );
- sal_uInt32 nLastIndex = sProgramPath.lastIndexOf( '/' );
- if ( nLastIndex > 0 )
- sProgramPath = sProgramPath.copy( 0, nLastIndex + 1 );
-
- // read keys from soffice.ini (sofficerc)
- ::rtl::OUString sIniFileName = sProgramPath;
- sIniFileName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SAL_CONFIGFILE( "version" ) ) );
- ::rtl::Bootstrap aIniFile( sIniFileName );
- ::rtl::OUString sNotifyURL;
- aIniFile.getFrom( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ODFNotifyURL" ) ), sNotifyURL );
-
- if ( sNotifyURL.getLength() > 0 )
- {
- try
- {
- uno::Reference< lang::XMultiServiceFactory > xSMGR =
- ::comphelper::getProcessServiceFactory();
- uno::Reference< XSystemShellExecute > xSystemShell(
- xSMGR->createInstance( ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.system.SystemShellExecute" ) ) ),
- uno::UNO_QUERY_THROW );
- sNotifyURL += m_sVersion;
- if ( xSystemShell.is() && sNotifyURL.getLength() )
- {
- xSystemShell->execute(
- sNotifyURL, ::rtl::OUString(), SystemShellExecuteFlags::DEFAULTS );
- }
- }
- catch( const uno::Exception& e )
- {
- OSL_TRACE( "Caught exception: %s\n thread terminated.\n",
- rtl::OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
- }
- }
-
- EndDialog( RET_OK );
- return 0;
-}
-
-IMPL_LINK( NewerVersionWarningDialog, LaterHdl, CancelButton*, EMPTYARG )
-{
- SFX_APP()->Get_Impl()->bODFVersionWarningLater = sal_True;
- EndDialog( RET_CANCEL );
- return 0;
-}
-
-void NewerVersionWarningDialog::InitButtonWidth()
-{
- // one button too small for its text?
- long nBtnTextWidth = m_aUpdateBtn.GetCtrlTextWidth( m_aUpdateBtn.GetText() );
- long nTemp = m_aLaterBtn.GetCtrlTextWidth( m_aLaterBtn.GetText() );
- if ( nTemp > nBtnTextWidth )
- nBtnTextWidth = nTemp;
- nBtnTextWidth = nBtnTextWidth * 115 / 100; // a little offset
- long nMaxBtnWidth = LogicToPixel( Size( MAX_BUTTON_WIDTH, 0 ), MAP_APPFONT ).Width();
- nBtnTextWidth = std::min( nBtnTextWidth, nMaxBtnWidth );
- long nButtonWidth = m_aUpdateBtn .GetSizePixel().Width();
-
- if ( nBtnTextWidth > nButtonWidth )
- {
- long nDelta = nBtnTextWidth - nButtonWidth;
- Point aNewPos = m_aUpdateBtn.GetPosPixel();
- aNewPos.X() -= 2*nDelta;
- Size aNewSize = m_aUpdateBtn.GetSizePixel();
- aNewSize.Width() += nDelta;
- m_aUpdateBtn.SetPosSizePixel( aNewPos, aNewSize );
- aNewPos = m_aLaterBtn.GetPosPixel();
- aNewPos.X() -= nDelta;
- m_aLaterBtn.SetPosSizePixel( aNewPos, aNewSize );
- }
-}
-
-} // end of namespace sfx2
-
diff --git a/sfx2/source/dialog/newerverwarn.hrc b/sfx2/source/dialog/newerverwarn.hrc
deleted file mode 100644
index 8e0667aa29..0000000000
--- a/sfx2/source/dialog/newerverwarn.hrc
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: newerverwarn.hrc,v $
- * $Revision: 1.3 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SFX2_NEWERVERSIONWARNING_HRC
-#define _SFX2_NEWERVERSIONWARNING_HRC
-
-#include <svtools/controldims.hrc>
-
-#define FI_IMAGE 10
-#define FT_INFO 11
-#define FL_BUTTON 12
-#define PB_UPDATE 13
-#define PB_LATER 14
-
-#define IMAGE_WIDTH 20
-#define IMAGE_HEIGHT IMAGE_WIDTH
-#define INFO_WIDTH 180
-#define INFO_LINES 7
-#define DLG_WIDTH (RSC_SP_DLG_INNERBORDER_LEFT + IMAGE_WIDTH + RSC_SP_CTRL_X + INFO_WIDTH + RSC_SP_DLG_INNERBORDER_RIGHT)
-
-#define COL_1 RSC_SP_DLG_INNERBORDER_LEFT
-#define COL_2 (COL_1 + IMAGE_WIDTH + RSC_SP_CTRL_X)
-#define COL_4 (DLG_WIDTH - RSC_SP_DLG_INNERBORDER_LEFT - RSC_CD_PUSHBUTTON_WIDTH)
-#define COL_3 (COL_4 - RSC_SP_CTRL_GROUP_X - RSC_CD_PUSHBUTTON_WIDTH)
-
-#define ROW_1 RSC_SP_DLG_INNERBORDER_TOP
-#define ROW_2 (ROW_1 + INFO_LINES * RSC_CD_FIXEDTEXT_HEIGHT + RSC_SP_CTRL_GROUP_Y)
-#define ROW_3 (ROW_2 + RSC_CD_FIXEDLINE_HEIGHT + RSC_SP_CTRL_GROUP_Y)
-
-#define DLG_HEIGHT (ROW_3 + RSC_CD_PUSHBUTTON_HEIGHT + RSC_SP_DLG_INNERBORDER_BOTTOM)
-#define MAX_BUTTON_WIDTH (DLG_WIDTH - RSC_SP_DLG_INNERBORDER_LEFT - RSC_SP_DLG_INNERBORDER_RIGHT - RSC_SP_CTRL_GROUP_X) / 2
-
-#endif // #ifndef _SFX2_NEWERVERSIONWARNING_HRC
-
diff --git a/sfx2/source/dialog/newerverwarn.src b/sfx2/source/dialog/newerverwarn.src
deleted file mode 100644
index 1a6768a440..0000000000
--- a/sfx2/source/dialog/newerverwarn.src
+++ /dev/null
@@ -1,84 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: newerverwarn.src,v $
- * $Revision: 1.3 $
- *
- * 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.
- *
- ************************************************************************/
-
-#include "newerverwarn.hrc"
-#include "dialog.hrc"
-#include "helpid.hrc"
-
-#define STD_MASKCOLOR Color { Red=0xffff; Green=0x0000; Blue=0xffff; }
-
-ModalDialog RID_DLG_NEWER_VERSION_WARNING
-{
- HelpId = HID_DLG_NEWERVERSIONWARNING;
- OutputSize = TRUE ;
- Size = MAP_APPFONT ( DLG_WIDTH , DLG_HEIGHT ) ;
- SvLook = TRUE ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "%PRODUCTNAME Update Available" ;
- FixedImage FI_IMAGE
- {
- Pos = MAP_APPFONT ( COL_1 , ROW_1 );
- Size = MAP_APPFONT ( IMAGE_WIDTH , IMAGE_HEIGHT );
- Hide = FALSE;
- Fixed = Image
- {
- ImageBitmap = Bitmap { File = "versionwarning.bmp"; };
- MaskColor = STD_MASKCOLOR;
- };
- };
- FixedText FT_INFO
- {
- Pos = MAP_APPFONT( COL_2, ROW_1 );
- Size = MAP_APPFONT( INFO_WIDTH, INFO_LINES * RSC_CD_FIXEDTEXT_HEIGHT );
- Wordbreak = TRUE;
- Text [ en-US ] = "This document was created by a newer version of %PRODUCTNAME. It may contain features not supported by your current version.\n\nClick 'Update Now...' to run online update and get the latest version of %PRODUCTNAME.";
- };
- FixedLine FL_BUTTON
- {
- Pos = MAP_APPFONT ( 0 , ROW_2 ) ;
- Size = MAP_APPFONT ( DLG_WIDTH , RSC_CD_FIXEDLINE_HEIGHT ) ;
- };
- PushButton PB_UPDATE
- {
- Pos = MAP_APPFONT ( COL_3 , ROW_3 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Update Now..." ;
- };
- CancelButton PB_LATER
- {
- Pos = MAP_APPFONT ( COL_4 , ROW_3 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Later" ;
- };
-};
-
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index c37fa706d4..adb4a59624 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -46,6 +46,9 @@
#include <com/sun/star/document/FilterOptionsRequest.hpp>
#include <com/sun/star/document/XInteractionFilterOptions.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/task/XInteractionAskLater.hpp>
+#include <com/sun/star/task/FutureDocumentVersionProductUpdateRequest.hpp>
+#include <com/sun/star/task/InteractionClassification.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
@@ -74,6 +77,7 @@
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
+#include <comphelper/interaction.hxx>
#include <svtools/sfxecode.hxx>
#include <svtools/securityoptions.hxx>
#include <cppuhelper/weak.hxx>
@@ -86,6 +90,7 @@
#include <svtools/useroptions.hxx>
#include <svtools/pathoptions.hxx>
#include <tools/urlobj.hxx>
+#include <tools/diagnose_ex.h>
#include <unotools/localfilehelper.hxx>
#include <unotools/ucbhelper.hxx>
#include <unotools/tempfile.hxx>
@@ -103,6 +108,7 @@
#include <svtools/embedhlp.hxx>
#include <rtl/logfile.hxx>
#include <basic/modsizeexceeded.hxx>
+#include <osl/file.hxx>
#include <sfx2/signaturestate.hxx>
#include <sfx2/app.hxx>
@@ -128,7 +134,6 @@
#include <sfx2/viewfrm.hxx>
#include "graphhelp.hxx"
#include "appbaslib.hxx"
-#include "newerverwarn.hxx"
#include "appdata.hxx"
#include "../appl/app.hrc"
@@ -839,7 +844,8 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
}
}
- if ( pMedium->GetInteractionHandler().is() && !SFX_APP()->Get_Impl()->bODFVersionWarningLater )
+ uno::Reference< XInteractionHandler > xHandler( pMedium->GetInteractionHandler() );
+ if ( xHandler.is() && !SFX_APP()->Get_Impl()->bODFVersionWarningLater )
{
// scan the generator string (within meta.xml)
uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
@@ -866,10 +872,36 @@ sal_Bool SfxObjectShell::DoLoad( SfxMedium *pMed )
{
double nVersion = sVersion.toDouble();
if ( nVersion > 1.20001 )
- {
// ODF version greater than 1.2 - added some decimal places to be safe against floating point conversion errors (hack)
- sfx2::NewerVersionWarningDialog aDlg( NULL, sVersion );
- aDlg.Execute();
+ {
+
+ ::rtl::OUString sDocumentURL( pMedium->GetOrigURL() );
+ ::rtl::OUString aSystemFileURL;
+ if ( osl::FileBase::getSystemPathFromFileURL( sDocumentURL, aSystemFileURL ) == osl::FileBase::E_None )
+ sDocumentURL = aSystemFileURL;
+
+ FutureDocumentVersionProductUpdateRequest aUpdateRequest;
+ aUpdateRequest.Classification = InteractionClassification_QUERY;
+ aUpdateRequest.DocumentURL = sDocumentURL;
+
+ ::rtl::Reference< ::comphelper::OInteractionRequest > pRequest = new ::comphelper::OInteractionRequest( makeAny( aUpdateRequest ) );
+ pRequest->addContinuation( new ::comphelper::OInteractionApprove );
+ pRequest->addContinuation( new ::comphelper::OInteractionDisapprove );
+
+ typedef ::comphelper::OInteraction< XInteractionAskLater > OInteractionAskLater;
+ OInteractionAskLater* pLater = new OInteractionAskLater;
+ pRequest->addContinuation( pLater );
+
+ try
+ {
+ xHandler->handle( pRequest.get() );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+ if ( pLater->wasSelected() )
+ SFX_APP()->Get_Impl()->bODFVersionWarningLater = true;
}
}
}
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index aeff5597d4..5965ec622a 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -359,7 +359,6 @@
#define HID_WARNING_ALIENFORMAT (HID_SFX_START + 320)
#define HID_HELP_ONSTARTUP_BOX (HID_SFX_START + 321)
#define HID_DLG_CHECKFORONLINEUPDATE (HID_SFX_START + 322)
-#define HID_DLG_NEWERVERSIONWARNING (HID_SFX_START + 323)
#define HID_TP_CUSTOMPROPERTIES (HID_SFX_START + 324)
#define HID_CTRL_CUSTOMPROPERTIES (HID_SFX_START + 325)
#define HID_CTRL_CUSTOMPROPS_YES_NO (HID_SFX_START + 326)
diff --git a/sfx2/source/inc/newerverwarn.hxx b/sfx2/source/inc/newerverwarn.hxx
deleted file mode 100644
index 2597656bc9..0000000000
--- a/sfx2/source/inc/newerverwarn.hxx
+++ /dev/null
@@ -1,62 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: newerverwarn.hxx,v $
- * $Revision: 1.4 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SFX2_NEWERVERSIONWARNING_HXX
-#define _SFX2_NEWERVERSIONWARNING_HXX
-
-#include <vcl/button.hxx>
-#include <vcl/fixed.hxx>
-#include <sfx2/basedlgs.hxx>
-
-namespace sfx2
-{
- class NewerVersionWarningDialog : public SfxModalDialog
- {
- private:
- FixedImage m_aImage;
- FixedText m_aInfoText;
- FixedLine m_aButtonLine;
- PushButton m_aUpdateBtn;
- CancelButton m_aLaterBtn;
-
- ::rtl::OUString m_sVersion;
-
- DECL_LINK( UpdateHdl, PushButton* );
- DECL_LINK( LaterHdl, CancelButton* );
-
- void InitButtonWidth();
-
- public:
- NewerVersionWarningDialog( Window* pParent, const ::rtl::OUString& rVersion );
- ~NewerVersionWarningDialog();
- };
-} // namespace sfx2
-
-#endif // #ifndef _SFX2_NEWERVERSIONWARNING_HXX
-