summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
Diffstat (limited to 'uui')
-rw-r--r--uui/source/alreadyopen.cxx63
-rw-r--r--uui/source/alreadyopen.hxx43
-rw-r--r--uui/source/alreadyopen.src65
-rw-r--r--uui/source/filechanged.cxx52
-rw-r--r--uui/source/filechanged.hxx43
-rw-r--r--uui/source/filechanged.src49
-rw-r--r--uui/source/iahndl.cxx186
-rw-r--r--uui/source/iahndl.hxx23
-rw-r--r--uui/source/ids.hrc27
-rw-r--r--uui/source/lockfailed.cxx53
-rw-r--r--uui/source/lockfailed.hxx45
-rw-r--r--uui/source/lockfailed.src49
-rw-r--r--uui/source/makefile.mk12
-rw-r--r--uui/source/masterpasscrtdlg.cxx66
-rw-r--r--uui/source/masterpasscrtdlg.hrc33
-rw-r--r--uui/source/masterpasscrtdlg.hxx12
-rw-r--r--uui/source/masterpasscrtdlg.src72
-rw-r--r--uui/source/openlocked.src4
-rw-r--r--uui/source/trylater.cxx54
-rw-r--r--uui/source/trylater.hxx43
-rw-r--r--uui/source/trylater.src53
21 files changed, 983 insertions, 64 deletions
diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx
new file mode 100644
index 000000000000..1f2b170f60fc
--- /dev/null
+++ b/uui/source/alreadyopen.cxx
@@ -0,0 +1,63 @@
+/*************************************************************************
+ *
+ * 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: openlocked.cxx,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 "ids.hrc"
+#include "alreadyopen.hxx"
+
+AlreadyOpenQueryBox::AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring ) :
+ MessBox(pParent, 0,
+ String( ResId( STR_ALREADYOPEN_TITLE, *pResMgr ) ),
+ aMessage )
+{
+ SetImage( QueryBox::GetStandardImage() );
+
+ if ( bIsStoring )
+ {
+ AddButton( String( ResId( STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ AddButton( String( ResId( STR_ALREADYOPEN_SAVE_BTN, *pResMgr ) ), RET_NO, 0 );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+ }
+ else
+ {
+ AddButton( String( ResId( STR_ALREADYOPEN_READONLY_BTN, *pResMgr ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ AddButton( String( ResId( STR_ALREADYOPEN_OPEN_BTN, *pResMgr ) ), RET_NO, 0 );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+ }
+
+ SetButtonHelpText( RET_YES, String::EmptyString() );
+ SetButtonHelpText( RET_NO, String::EmptyString() );
+}
+
+AlreadyOpenQueryBox::~AlreadyOpenQueryBox()
+{
+}
+
diff --git a/uui/source/alreadyopen.hxx b/uui/source/alreadyopen.hxx
new file mode 100644
index 000000000000..2ba2db8a06b9
--- /dev/null
+++ b/uui/source/alreadyopen.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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: openlocked.hxx,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 _UUI_ALREADYOPEN_HXX
+#define _UUI_ALREADYOPEN_HXX
+
+#include <vcl/msgbox.hxx>
+
+class AlreadyOpenQueryBox : public MessBox
+{
+public:
+ AlreadyOpenQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage, sal_Bool bIsStoring );
+ ~AlreadyOpenQueryBox();
+};
+
+#endif
+
diff --git a/uui/source/alreadyopen.src b/uui/source/alreadyopen.src
new file mode 100644
index 000000000000..e4222af91dce
--- /dev/null
+++ b/uui/source/alreadyopen.src
@@ -0,0 +1,65 @@
+/*************************************************************************
+ *
+ * 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: openlocked.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.
+ *
+ ************************************************************************/
+
+#define __RSC
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+String STR_ALREADYOPEN_TITLE
+{
+ Text = "Document in Use";
+};
+String STR_ALREADYOPEN_MSG
+{
+ Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nOpen document read-only, or ignore own file locking and open the document for editing.\n\n";
+};
+String STR_ALREADYOPEN_READONLY_BTN
+{
+ Text [ en-US ] = "Open ~Read-Only";
+};
+String STR_ALREADYOPEN_OPEN_BTN
+{
+ Text [ en-US ] = "~Open";
+};
+String STR_ALREADYOPEN_SAVE_MSG
+{
+ Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nClose document on other system and retry saving or ignore own file locking and save current document.\n\n";
+};
+String STR_ALREADYOPEN_RETRY_SAVE_BTN
+{
+ Text [ en-US ] = "~Retry Saving";
+};
+String STR_ALREADYOPEN_SAVE_BTN
+{
+ Text [ en-US ] = "~Save";
+};
+
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
new file mode 100644
index 000000000000..31e942309c0d
--- /dev/null
+++ b/uui/source/filechanged.cxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * 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: openlocked.cxx,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 "ids.hrc"
+#include "filechanged.hxx"
+
+FileChangedQueryBox::FileChangedQueryBox( Window* pParent, ResMgr* pResMgr ) :
+ MessBox(pParent, 0,
+ String( ResId( STR_FILECHANGED_TITLE, *pResMgr ) ),
+ String::EmptyString() )
+{
+ SetImage( QueryBox::GetStandardImage() );
+
+ AddButton( String( ResId( STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+
+ SetButtonHelpText( RET_YES, String::EmptyString() );
+ SetMessText( String( ResId( STR_FILECHANGED_MSG, *pResMgr ) ) );
+}
+
+FileChangedQueryBox::~FileChangedQueryBox()
+{
+}
+
diff --git a/uui/source/filechanged.hxx b/uui/source/filechanged.hxx
new file mode 100644
index 000000000000..76f4ad3e8e97
--- /dev/null
+++ b/uui/source/filechanged.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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: openlocked.hxx,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 _UUI_FILECHANGED_HXX
+#define _UUI_FILECHANGED_HXX
+
+#include <vcl/msgbox.hxx>
+
+class FileChangedQueryBox : public MessBox
+{
+public:
+ FileChangedQueryBox( Window* pParent, ResMgr* pResMgr );
+ ~FileChangedQueryBox();
+};
+
+#endif
+
diff --git a/uui/source/filechanged.src b/uui/source/filechanged.src
new file mode 100644
index 000000000000..4ebf0826e0a5
--- /dev/null
+++ b/uui/source/filechanged.src
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * 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: openlocked.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.
+ *
+ ************************************************************************/
+
+#define __RSC
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+String STR_FILECHANGED_TITLE
+{
+ Text = "Document Has Been Changed by Others";
+};
+String STR_FILECHANGED_MSG
+{
+ Text [ en-US ] = "The file has been changed since it was opened for editing in %PRODUCTNAME. Saving your version of the document will overwrite changes made by others.\n\nDo you want to save anyway?\n\n";
+};
+String STR_FILECHANGED_SAVEANYWAY_BTN
+{
+ Text [ en-US ] = "~Save Anyway";
+};
+
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 7c8781979629..ca5e13fa54c3 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -48,6 +48,10 @@
#include "com/sun/star/document/NoSuchFilterRequest.hpp"
#include "com/sun/star/document/AmbigousFilterRequest.hpp"
#include "com/sun/star/document/LockedDocumentRequest.hpp"
+#include "com/sun/star/document/OwnLockOnDocumentRequest.hpp"
+#include "com/sun/star/document/LockedOnSavingRequest.hpp"
+#include "com/sun/star/document/ChangedByOthersRequest.hpp"
+#include "com/sun/star/document/LockFileIgnoreRequest.hpp"
#include "com/sun/star/document/XImporter.hpp"
#include "com/sun/star/document/XInteractionFilterOptions.hpp"
#include "com/sun/star/document/XInteractionFilterSelect.hpp"
@@ -118,6 +122,10 @@
#include "sslwarndlg.hxx"
#include "openlocked.hxx"
#include "newerverwarn.hxx"
+#include "alreadyopen.hxx"
+#include "filechanged.hxx"
+#include "trylater.hxx"
+#include "lockfailed.hxx"
#include <comphelper/processfactory.hxx>
#include <svtools/zforlist.hxx>
using namespace com::sun;
@@ -1156,8 +1164,44 @@ void UUIInteractionHelper::handleDialogRequests(
star::document::LockedDocumentRequest aLockedDocumentRequest;
if (aAnyRequest >>= aLockedDocumentRequest )
{
- handleLockedDocumentRequest( aLockedDocumentRequest,
- rRequest->getContinuations() );
+ handleLockedDocumentRequest( aLockedDocumentRequest.DocumentURL,
+ aLockedDocumentRequest.UserInfo,
+ rRequest->getContinuations(),
+ UUI_DOC_LOAD_LOCK );
+ return;
+ }
+
+ star::document::OwnLockOnDocumentRequest aOwnLockOnDocumentRequest;
+ if (aAnyRequest >>= aOwnLockOnDocumentRequest )
+ {
+ handleLockedDocumentRequest( aOwnLockOnDocumentRequest.DocumentURL,
+ aOwnLockOnDocumentRequest.TimeInfo,
+ rRequest->getContinuations(),
+ aOwnLockOnDocumentRequest.IsStoring ? UUI_DOC_OWN_SAVE_LOCK : UUI_DOC_OWN_LOAD_LOCK );
+ return;
+ }
+
+ star::document::LockedOnSavingRequest aLockedOnSavingRequest;
+ if (aAnyRequest >>= aLockedOnSavingRequest )
+ {
+ handleLockedDocumentRequest( aLockedOnSavingRequest.DocumentURL,
+ aLockedOnSavingRequest.UserInfo,
+ rRequest->getContinuations(),
+ UUI_DOC_SAVE_LOCK );
+ return;
+ }
+
+ star::document::ChangedByOthersRequest aChangedByOthersRequest;
+ if (aAnyRequest >>= aChangedByOthersRequest )
+ {
+ handleChangedByOthersRequest( rRequest->getContinuations() );
+ return;
+ }
+
+ star::document::LockFileIgnoreRequest aLockFileIgnoreRequest;
+ if (aAnyRequest >>= aLockFileIgnoreRequest )
+ {
+ handleLockFileIgnoreRequest( rRequest->getContinuations() );
return;
}
}
@@ -3306,10 +3350,12 @@ UUIInteractionHelper::handleBrokenPackageRequest(
void
UUIInteractionHelper::handleLockedDocumentRequest(
- star::document::LockedDocumentRequest const & aRequest,
+ const ::rtl::OUString& aDocumentURL,
+ const ::rtl::OUString& aInfo,
star::uno::Sequence< star::uno::Reference<
star::task::XInteractionContinuation > > const &
- rContinuations )
+ rContinuations,
+ sal_uInt16 nMode )
SAL_THROW((star::uno::RuntimeException))
{
star::uno::Reference< star::task::XInteractionApprove > xApprove;
@@ -3329,22 +3375,49 @@ UUIInteractionHelper::handleLockedDocumentRequest(
if (!xManager.get())
return;
- ::rtl::OUString aMessage = String( ResId( STR_OPENLOCKED_MSG, *xManager.get() ) );
+ ::rtl::OUString aMessage;
std::vector< rtl::OUString > aArguments;
- aArguments.push_back( aRequest.DocumentURL );
- aArguments.push_back( aRequest.UserInfo.getLength()
- ? aRequest.UserInfo
- : ::rtl::OUString( String( ResId( STR_OPENLOCKED_UNKNOWNUSER, *xManager.get() ) ) ) );
+ aArguments.push_back( aDocumentURL );
- aMessage = replaceMessageWithArguments( aMessage, aArguments );
+ sal_Int32 nResult = RET_CANCEL;
+ if ( nMode == UUI_DOC_LOAD_LOCK )
+ {
+ aArguments.push_back( aInfo.getLength()
+ ? aInfo
+ : ::rtl::OUString( String( ResId( STR_UNKNOWNUSER, *xManager.get() ) ) ) );
+ aMessage = String( ResId( STR_OPENLOCKED_MSG, *xManager.get() ) );
+ aMessage = replaceMessageWithArguments( aMessage, aArguments );
+
+ std::auto_ptr< OpenLockedQueryBox > xDialog(new OpenLockedQueryBox(
+ getParentProperty(), xManager.get(), aMessage ) );
+ nResult = xDialog->Execute();
+ }
+ else if ( nMode == UUI_DOC_SAVE_LOCK )
+ {
+ aArguments.push_back( aInfo.getLength()
+ ? aInfo
+ : ::rtl::OUString( String( ResId( STR_UNKNOWNUSER, *xManager.get() ) ) ) );
+ aMessage = String( ResId( STR_TRYLATER_MSG, *xManager.get() ) );
+ aMessage = replaceMessageWithArguments( aMessage, aArguments );
+
+ std::auto_ptr< TryLaterQueryBox > xDialog(new TryLaterQueryBox(
+ getParentProperty(), xManager.get(), aMessage ) );
+ nResult = xDialog->Execute();
+ }
+ else if ( nMode == UUI_DOC_OWN_LOAD_LOCK || nMode == UUI_DOC_OWN_SAVE_LOCK )
+ {
+ aArguments.push_back( aInfo );
+ aMessage = String( ResId( nMode == UUI_DOC_OWN_SAVE_LOCK ? STR_ALREADYOPEN_SAVE_MSG : STR_ALREADYOPEN_MSG, *xManager.get() ) );
+ aMessage = replaceMessageWithArguments( aMessage, aArguments );
- std::auto_ptr< OpenLockedQueryBox >
- xDialog(new OpenLockedQueryBox(
- getParentProperty(), xManager.get(), aMessage ) );
- sal_Int32 nResult = xDialog->Execute();
- if ( nResult == RET_YES ) // open the document readonly
+ std::auto_ptr< AlreadyOpenQueryBox > xDialog(new AlreadyOpenQueryBox(
+ getParentProperty(), xManager.get(), aMessage, nMode == UUI_DOC_OWN_SAVE_LOCK ) );
+ nResult = xDialog->Execute();
+ }
+
+ if ( nResult == RET_YES )
xApprove->select();
- else if ( nResult == RET_NO ) // open the copy of the document
+ else if ( nResult == RET_NO )
xDisapprove->select();
else
xAbort->select();
@@ -3357,3 +3430,84 @@ UUIInteractionHelper::handleLockedDocumentRequest(
}
}
+void
+UUIInteractionHelper::handleChangedByOthersRequest(
+ star::uno::Sequence< star::uno::Reference<
+ star::task::XInteractionContinuation > > const &
+ rContinuations )
+ SAL_THROW((star::uno::RuntimeException))
+{
+ star::uno::Reference< star::task::XInteractionApprove > xApprove;
+ star::uno::Reference< star::task::XInteractionAbort > xAbort;
+ getContinuations(
+ rContinuations, &xApprove, 0, 0, &xAbort, 0, 0, 0, 0);
+
+ if ( !xApprove.is() || !xAbort.is() )
+ return;
+
+ try
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ std::auto_ptr< ResMgr > xManager(
+ ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
+ if (!xManager.get())
+ return;
+
+ std::auto_ptr< FileChangedQueryBox > xDialog(new FileChangedQueryBox(
+ getParentProperty(), xManager.get() ) );
+ sal_Int32 nResult = xDialog->Execute();
+
+ if ( nResult == RET_YES )
+ xApprove->select();
+ else
+ xAbort->select();
+ }
+ catch (std::bad_alloc const &)
+ {
+ throw star::uno::RuntimeException(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ star::uno::Reference< star::uno::XInterface >());
+ }
+}
+
+void
+UUIInteractionHelper::handleLockFileIgnoreRequest(
+ star::uno::Sequence< star::uno::Reference<
+ star::task::XInteractionContinuation > > const &
+ rContinuations )
+ SAL_THROW((star::uno::RuntimeException))
+{
+ star::uno::Reference< star::task::XInteractionApprove > xApprove;
+ star::uno::Reference< star::task::XInteractionAbort > xAbort;
+ getContinuations(
+ rContinuations, &xApprove, 0, 0, &xAbort, 0, 0, 0, 0);
+
+ if ( !xApprove.is() || !xAbort.is() )
+ return;
+
+ try
+ {
+ vos::OGuard aGuard(Application::GetSolarMutex());
+ std::auto_ptr< ResMgr > xManager(
+ ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
+ if (!xManager.get())
+ return;
+
+ std::auto_ptr< LockFailedQueryBox > xDialog(new LockFailedQueryBox(
+ getParentProperty(), xManager.get() ) );
+ sal_Int32 nResult = xDialog->Execute();
+
+ if ( nResult == RET_OK )
+ xApprove->select();
+ else
+ xAbort->select();
+ }
+ catch (std::bad_alloc const &)
+ {
+ throw star::uno::RuntimeException(
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("out of memory")),
+ star::uno::Reference< star::uno::XInterface >());
+ }
+}
+
+
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index f3a82029dfad..b3257688cb8c 100644
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -60,6 +60,11 @@ struct CntHTTPCookieRequest;
#define DESCRIPTION_2 2
#define TITLE 3
+#define UUI_DOC_LOAD_LOCK 0
+#define UUI_DOC_OWN_LOAD_LOCK 1
+#define UUI_DOC_SAVE_LOCK 2
+#define UUI_DOC_OWN_SAVE_LOCK 3
+
namespace cssu = com::sun::star::uno;
namespace dcss = ::com::sun::star;
@@ -68,7 +73,6 @@ namespace com { namespace sun { namespace star {
class AmbigousFilterRequest;
class FilterOptionsRequest;
class NoSuchFilterRequest;
- class LockedDocumentRequest;
}
namespace lang {
class XMultiServiceFactory;
@@ -374,11 +378,26 @@ private:
rtl::OUString & rErrorString);
void handleLockedDocumentRequest(
- ::com::sun::star::document::LockedDocumentRequest const & aRequest,
+ const ::rtl::OUString& aDocumentURL,
+ const ::rtl::OUString& aInfo,
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::task::XInteractionContinuation > > const &
+ rContinuations,
+ sal_uInt16 nMode )
+ SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ void handleChangedByOthersRequest(
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
::com::sun::star::task::XInteractionContinuation > > const &
rContinuations )
SAL_THROW((::com::sun::star::uno::RuntimeException));
+
+ void handleLockFileIgnoreRequest(
+ ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference<
+ ::com::sun::star::task::XInteractionContinuation > > const &
+ rContinuations )
+ SAL_THROW((::com::sun::star::uno::RuntimeException));
+
};
#endif // UUI_IAHNDL_HXX
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc
index 047b96b100f4..bfe6a48aed94 100644
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
@@ -65,11 +65,28 @@
#define DLG_UUI_SSLWARN (RID_UUI_START + 28)
#define DLG_UUI_SSLWARN_CRT (RID_UUI_START + 29)
#define RID_XMLSECDLG_MACROWARN (RID_UUI_START + 30)
-#define STR_OPENLOCKED_TITLE (RID_UUI_START + 31)
-#define STR_OPENLOCKED_MSG (RID_UUI_START + 32)
-#define STR_OPENLOCKED_OPENREADONLY_BTN (RID_UUI_START + 33)
-#define STR_OPENLOCKED_OPENCOPY_BTN (RID_UUI_START + 34)
-#define STR_OPENLOCKED_UNKNOWNUSER (RID_UUI_START + 35)
+#define STR_UNKNOWNUSER (RID_UUI_START + 31)
+#define STR_OPENLOCKED_TITLE (RID_UUI_START + 32)
+#define STR_OPENLOCKED_MSG (RID_UUI_START + 33)
+#define STR_OPENLOCKED_OPENREADONLY_BTN (RID_UUI_START + 34)
+#define STR_OPENLOCKED_OPENCOPY_BTN (RID_UUI_START + 35)
+#define STR_FILECHANGED_TITLE (RID_UUI_START + 36)
+#define STR_FILECHANGED_MSG (RID_UUI_START + 37)
+#define STR_FILECHANGED_SAVEANYWAY_BTN (RID_UUI_START + 38)
+#define STR_ALREADYOPEN_TITLE (RID_UUI_START + 39)
+#define STR_ALREADYOPEN_MSG (RID_UUI_START + 40)
+#define STR_ALREADYOPEN_READONLY_BTN (RID_UUI_START + 41)
+#define STR_ALREADYOPEN_OPEN_BTN (RID_UUI_START + 42)
+#define STR_LOCKFAILED_TITLE (RID_UUI_START + 43)
+#define STR_LOCKFAILED_MSG (RID_UUI_START + 44)
+#define STR_LOCKFAILED_DONTSHOWAGAIN (RID_UUI_START + 45)
+#define STR_TRYLATER_TITLE (RID_UUI_START + 46)
+#define STR_TRYLATER_MSG (RID_UUI_START + 47)
+#define STR_TRYLATER_RETRYSAVING_BTN (RID_UUI_START + 48)
+#define STR_TRYLATER_SAVEAS_BTN (RID_UUI_START + 49)
+#define STR_ALREADYOPEN_SAVE_MSG (RID_UUI_START + 50)
+#define STR_ALREADYOPEN_RETRY_SAVE_BTN (RID_UUI_START + 51)
+#define STR_ALREADYOPEN_SAVE_BTN (RID_UUI_START + 52)
#define RID_DLG_NEWER_VERSION_WARNING (RID_UUI_START + 36)
#define ERRCODE_UUI_IO_ABORT (ERRCODE_AREA_UUI + 0)
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
new file mode 100644
index 000000000000..20a3ff4798bd
--- /dev/null
+++ b/uui/source/lockfailed.cxx
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * 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: openlocked.cxx,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 "ids.hrc"
+#include "lockfailed.hxx"
+
+#include <vcl/button.hxx>
+
+LockFailedQueryBox::LockFailedQueryBox( Window* pParent, ResMgr* pResMgr ) :
+ MessBox(pParent, 0,
+ String( ResId( STR_LOCKFAILED_TITLE, *pResMgr ) ),
+ String::EmptyString() )
+{
+ SetImage( ErrorBox::GetStandardImage() );
+
+ AddButton( BUTTON_OK, RET_OK, BUTTONDIALOG_OKBUTTON );
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+
+ SetMessText( String( ResId( STR_LOCKFAILED_MSG, *pResMgr ) ) );
+ SetCheckBoxText( String( ResId( STR_LOCKFAILED_DONTSHOWAGAIN, *pResMgr ) ) );
+}
+
+LockFailedQueryBox::~LockFailedQueryBox()
+{
+}
+
diff --git a/uui/source/lockfailed.hxx b/uui/source/lockfailed.hxx
new file mode 100644
index 000000000000..9d368037475d
--- /dev/null
+++ b/uui/source/lockfailed.hxx
@@ -0,0 +1,45 @@
+/*************************************************************************
+ *
+ * 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: openlocked.hxx,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 _UUI_LOCKFAILED_HXX
+#define _UUI_LOCKFAILED_HXX
+
+#include <vcl/msgbox.hxx>
+
+class CheckBox;
+
+class LockFailedQueryBox : public MessBox
+{
+public:
+ LockFailedQueryBox( Window* pParent, ResMgr* pResMgr );
+ ~LockFailedQueryBox();
+};
+
+#endif
+
diff --git a/uui/source/lockfailed.src b/uui/source/lockfailed.src
new file mode 100644
index 000000000000..6b21d6fc6448
--- /dev/null
+++ b/uui/source/lockfailed.src
@@ -0,0 +1,49 @@
+/*************************************************************************
+ *
+ * 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: openlocked.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.
+ *
+ ************************************************************************/
+
+#define __RSC
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+String STR_LOCKFAILED_TITLE
+{
+ Text = "Document Could Not Be Locked";
+};
+String STR_LOCKFAILED_MSG
+{
+ Text [ en-US ] = "The file could not be locked for exclusive access by %PRODUCTNAME, due to missing permission to created a lock file on that file location.";
+};
+String STR_LOCKFAILED_DONTSHOWAGAIN
+{
+ Text = "~Do not show this message again";
+};
+
diff --git a/uui/source/makefile.mk b/uui/source/makefile.mk
index 456e28ce6b75..95b998ffd36d 100644
--- a/uui/source/makefile.mk
+++ b/uui/source/makefile.mk
@@ -1,8 +1,7 @@
#*************************************************************************
-#*************************************************************************
#
# 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
@@ -53,6 +52,10 @@ SLOFILES = \
$(SLO)$/unknownauthdlg.obj\
$(SLO)$/sslwarndlg.obj\
$(SLO)$/secmacrowarnings.obj\
+ $(SLO)$/filechanged.obj\
+ $(SLO)$/alreadyopen.obj\
+ $(SLO)$/lockfailed.obj\
+ $(SLO)$/trylater.obj\
$(SLO)$/newerverwarn.obj
SRS1NAME=$(TARGET)
@@ -70,6 +73,11 @@ SRC1FILES = \
unknownauthdlg.src\
sslwarndlg.src\
secmacrowarnings.src\
+ filechanged.src\
+ alreadyopen.src\
+ lockfailed.src\
+ trylater.src\
newerverwarn.src
.INCLUDE: target.mk
+
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 65a414a88542..30e8d1c64500 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -78,17 +78,25 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
ModalDialog( pParent, ResId( DLG_UUI_MASTERPASSWORD_CRT, *pResMgr ) ),
- aFTMasterPasswordCrt ( this, ResId( FT_MASTERPASSWORD_CRT, *pResMgr ) ),
- aEDMasterPasswordCrt ( this, ResId( ED_MASTERPASSWORD_CRT, *pResMgr ) ),
+ aFTInfoText ( this, ResId( FT_INFOTEXT, *pResMgr ) ),
+ aFLInfoText ( this, ResId( FL_INFOTEXT, *pResMgr ) ),
+
+ aFTMasterPasswordCrt ( this, ResId( FT_MASTERPASSWORD_CRT, *pResMgr ) ),
+ aEDMasterPasswordCrt ( this, ResId( ED_MASTERPASSWORD_CRT, *pResMgr ) ),
aFTMasterPasswordRepeat ( this, ResId( FT_MASTERPASSWORD_REPEAT, *pResMgr ) ),
aEDMasterPasswordRepeat ( this, ResId( ED_MASTERPASSWORD_REPEAT, *pResMgr ) ),
+
+ aFTCautionText ( this, ResId( FT_CAUTIONTEXT, *pResMgr ) ),
+ aFLCautionText ( this, ResId( FL_CAUTIONTEXT, *pResMgr ) ),
+
aFTMasterPasswordWarning ( this, ResId( FT_MASTERPASSWORD_WARNING, *pResMgr ) ),
aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ),
aOKBtn ( this, ResId( BTN_MASTERPASSCRT_OK, *pResMgr ) ),
aCancelBtn ( this, ResId( BTN_MASTERPASSCRT_CANCEL, *pResMgr ) ),
aHelpBtn ( this, ResId( BTN_MASTERPASSCRT_HELP, *pResMgr ) ),
+
pResourceMgr ( pResMgr ),
- nMinLen(5)
+ nMinLen ( 5 )
{
FreeResource();
@@ -96,6 +104,8 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aOKBtn.SetClickHdl( LINK( this, MasterPasswordCreateDialog, OKHdl_Impl ) );
aEDMasterPasswordCrt.SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) );
+ CalculateTextHeight();
+
long nLableWidth = aFTMasterPasswordWarning.GetSizePixel().Width();
long nLabelHeight = aFTMasterPasswordWarning.GetSizePixel().Height();
long nTextWidth = aFTMasterPasswordWarning.GetCtrlTextWidth( aFTMasterPasswordWarning.GetText() );
@@ -128,3 +138,53 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
}
};
+void MasterPasswordCreateDialog::CalculateTextHeight()
+{
+ Size aSize = aFTInfoText.GetSizePixel();
+ Size aMinSize = aFTInfoText.CalcMinimumSize( aSize.Width() );
+ long nDelta = 0;
+
+ if ( aSize.Height() > aMinSize.Height() )
+ {
+ aFTInfoText.SetSizePixel( aMinSize );
+ nDelta = aSize.Height() - aMinSize.Height();
+ Window* pWins[] = { &aFLInfoText, &aFTMasterPasswordCrt, &aEDMasterPasswordCrt,
+ &aFTMasterPasswordRepeat, &aEDMasterPasswordRepeat, &aFTCautionText,
+ &aFLCautionText, &aOKBtn, &aCancelBtn, &aHelpBtn };
+ Window** pWindow = pWins;
+ const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[0] );
+ for ( sal_Int32 i = 0; i < nCount; ++i, ++pWindow )
+ {
+ Point aNewPos = (*pWindow)->GetPosPixel();
+ aNewPos.Y() -= nDelta;
+ (*pWindow)->SetPosPixel( aNewPos );
+ }
+ }
+
+ aSize = aFTCautionText.GetSizePixel();
+ aMinSize = aFTCautionText.CalcMinimumSize( aSize.Width() );
+
+ if ( aSize.Height() > aMinSize.Height() )
+ {
+ aFTCautionText.SetSizePixel( aMinSize );
+ long nTemp = aSize.Height() - aMinSize.Height();
+ nDelta += nTemp;
+ Window* pWins[] = { &aFLCautionText, &aOKBtn, &aCancelBtn, &aHelpBtn };
+ Window** pWindow = pWins;
+ const sal_Int32 nCount = sizeof( pWins ) / sizeof( pWins[0] );
+ for ( sal_Int32 i = 0; i < nCount; ++i, ++pWindow )
+ {
+ Point aNewPos = (*pWindow)->GetPosPixel();
+ aNewPos.Y() -= nTemp;
+ (*pWindow)->SetPosPixel( aNewPos );
+ }
+ }
+
+ if ( nDelta > 0 )
+ {
+ Size aDlgSize = GetOutputSizePixel();
+ aDlgSize.Height() -= nDelta;
+ SetSizePixel( aDlgSize );
+ }
+}
+
diff --git a/uui/source/masterpasscrtdlg.hrc b/uui/source/masterpasscrtdlg.hrc
index dec23e7edabc..1c10e849fb5b 100644
--- a/uui/source/masterpasscrtdlg.hrc
+++ b/uui/source/masterpasscrtdlg.hrc
@@ -31,16 +31,45 @@
#ifndef UUI_MASTERPASSCRT_HRC
#define UUI_MASTERPASSCRT_HRC
+#include <svtools/controldims.hrc>
+
//============================================================================
-#define FT_MASTERPASSWORD_CRT 20
-#define ED_MASTERPASSWORD_CRT 21
+
+#define FT_INFOTEXT 10
+#define FL_INFOTEXT 11
+
+#define FT_MASTERPASSWORD_CRT 20
+#define ED_MASTERPASSWORD_CRT 21
#define FT_MASTERPASSWORD_REPEAT 22
#define ED_MASTERPASSWORD_REPEAT 23
#define FT_MASTERPASSWORD_WARNING 24
#define FL_FIXED_LINE 30
+#define FT_CAUTIONTEXT 30
+#define FL_CAUTIONTEXT 31
+
#define BTN_MASTERPASSCRT_OK 50
#define BTN_MASTERPASSCRT_CANCEL 51
#define BTN_MASTERPASSCRT_HELP 52
+#define ROW_0 (RSC_SP_FLGR_INNERBORDER_TOP)
+#define ROW_1 (ROW_0+7*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_2 (ROW_1+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_3 (ROW_2+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_4 (ROW_3+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_5 (ROW_4+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_6 (ROW_5+RSC_CD_TEXTBOX_HEIGHT+RSC_SP_CTRL_X)
+#define ROW_7 (ROW_6+8*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_8 (ROW_7+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_CTRL_DESC_Y)
+#define ROW_9 (ROW_8+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_CTRL_X)
+
+#define COL_0 (RSC_SP_FLGR_INNERBORDER_LEFT)
+#define COL_2 (DLG_WIDTH-RSC_SP_FLGR_INNERBORDER_LEFT-RSC_CD_PUSHBUTTON_WIDTH)
+#define COL_1 (COL_2-RSC_SP_CTRL_GROUP_X-RSC_CD_PUSHBUTTON_WIDTH)
+
+#define DLG_WIDTH 180
+#define CTRL_WIDTH (DLG_WIDTH-2*RSC_SP_FLGR_INNERBORDER_LEFT)
+#define DLG_HEIGHT (ROW_9)
+
#endif // UUI_MASTERPASSCRT_HRC
+
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index dba9ee0f130a..26d130a7a737 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -46,14 +46,22 @@
//============================================================================
class MasterPasswordCreateDialog : public ModalDialog
{
+private:
+ FixedText aFTInfoText;
+ FixedLine aFLInfoText;
+
FixedText aFTMasterPasswordCrt;
Edit aEDMasterPasswordCrt;
FixedText aFTMasterPasswordRepeat;
Edit aEDMasterPasswordRepeat;
+
+ FixedText aFTCautionText;
+ FixedLine aFLCautionText;
+
FixedText aFTMasterPasswordWarning;
FixedLine aFL;
OKButton aOKBtn;
- CancelButton aCancelBtn;
+ CancelButton aCancelBtn;
HelpButton aHelpBtn;
@@ -68,6 +76,8 @@ public:
private:
ResMgr* pResourceMgr;
sal_uInt16 nMinLen;
+
+ void CalculateTextHeight();
};
#endif // UUI_MASTERPASSCRTDLG_HXX
diff --git a/uui/source/masterpasscrtdlg.src b/uui/source/masterpasscrtdlg.src
index cc16800feadd..e11d9abd166d 100644
--- a/uui/source/masterpasscrtdlg.src
+++ b/uui/source/masterpasscrtdlg.src
@@ -44,64 +44,74 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 175 ,135 ) ;
+ Size = MAP_APPFONT ( DLG_WIDTH , DLG_HEIGHT ) ;
+ Text [ en-US ] = "Set Master Password";
+ FixedText FT_INFOTEXT
+ {
+ Pos = MAP_APPFONT ( COL_0 , ROW_0 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , 7*RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ WordBreak = TRUE ;
+ Text [ en-US ] = "Passwords for web connections are protected by a master password. You will be asked to enter it once per session, if %PRODUCTNAME retrieves a password from the protected password list.";
+ };
+ FixedLine FL_INFOTEXT
+ {
+ Pos = MAP_APPFONT ( 0 , ROW_1 ) ;
+ Size = MAP_APPFONT ( DLG_WIDTH , RSC_CD_FIXEDLINE_HEIGHT ) ;
+ };
FixedText FT_MASTERPASSWORD_CRT
{
- Pos = MAP_APPFONT ( 3 , 4 ) ;
- Size = MAP_APPFONT ( 169 , 9 ) ;
- Text [ en-US ] = "Enter new password";
+ Pos = MAP_APPFONT ( COL_0 , ROW_2 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_FIXEDLINE_HEIGHT ) ;
+ Text [ en-US ] = "~Enter password";
};
Edit ED_MASTERPASSWORD_CRT
{
+ Pos = MAP_APPFONT ( COL_0 , ROW_3 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 3 , 17 ) ;
- Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
FixedText FT_MASTERPASSWORD_REPEAT
{
- Pos = MAP_APPFONT ( 3 , 33 ) ;
- Size = MAP_APPFONT ( 169 , 9 ) ;
+ Pos = MAP_APPFONT ( COL_0 , ROW_4 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_FIXEDLINE_HEIGHT ) ;
Text [ en-US ] = "~Reenter password";
};
Edit ED_MASTERPASSWORD_REPEAT
{
+ Pos = MAP_APPFONT ( COL_0 , ROW_5 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
- Pos = MAP_APPFONT ( 3 , 46 ) ;
- Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
- FixedText FT_MASTERPASSWORD_WARNING
+ FixedText FT_CAUTIONTEXT
{
- Pos = MAP_APPFONT ( 3 , 62 ) ;
- Size = MAP_APPFONT ( 169 , 42 ) ;
- Text [ en-US ] = "~Caution: Make sure you remember the Master Password you have set. If you forget your Master Password, you will be unable to access any of the information protected by it. Passwords are case-sensitive and at least five characters long.";
- WordBreak = TRUE;
+ Pos = MAP_APPFONT ( COL_0 , ROW_6 ) ;
+ Size = MAP_APPFONT ( CTRL_WIDTH , 8*RSC_CD_FIXEDTEXT_HEIGHT ) ;
+ WordBreak = TRUE ;
+ Text [ en-US ] = "Caution: Make sure you remember the Master Password you have set. If you forget your Master Password, you will be unable to access any of the information protected by it. Passwords are case-sensitive and at least five characters long.";
};
- FixedLine FL_FIXED_LINE
- {
- Pos = MAP_APPFONT( 0, 105 );
- Size = MAP_APPFONT( 175, 6 );
+ FixedLine FL_CAUTIONTEXT
+ {
+ Pos = MAP_APPFONT ( 0 , ROW_7 ) ;
+ Size = MAP_APPFONT ( DLG_WIDTH , RSC_CD_FIXEDLINE_HEIGHT ) ;
+ };
+ HelpButton BTN_MASTERPASSCRT_HELP
+ {
+ Pos = MAP_APPFONT ( COL_0 , ROW_8 ) ;
+ Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
};
-
-
OKButton BTN_MASTERPASSCRT_OK
{
- Pos = MAP_APPFONT ( 65 , 115 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
+ Pos = MAP_APPFONT ( COL_1 , ROW_8 ) ;
+ Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
DefButton = TRUE ;
};
CancelButton BTN_MASTERPASSCRT_CANCEL
{
- Pos = MAP_APPFONT ( 120 , 115 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
- };
- HelpButton BTN_MASTERPASSCRT_HELP
- {
- Pos = MAP_APPFONT ( 5 , 115 ) ;
- Size = MAP_APPFONT ( 51 , 13 ) ;
+ Pos = MAP_APPFONT ( COL_2 , ROW_8 ) ;
+ Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
};
- Text [ en-US ] = "Change Master Password";
};
diff --git a/uui/source/openlocked.src b/uui/source/openlocked.src
index 17f74b340fa1..58d65f54a4d3 100644
--- a/uui/source/openlocked.src
+++ b/uui/source/openlocked.src
@@ -40,7 +40,7 @@ String STR_OPENLOCKED_TITLE
};
String STR_OPENLOCKED_MSG
{
- Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.";
+ Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.\n\n";
};
String STR_OPENLOCKED_OPENREADONLY_BTN
{
@@ -50,7 +50,7 @@ String STR_OPENLOCKED_OPENCOPY_BTN
{
Text [ en-US ] = "Open ~Copy";
};
-String STR_OPENLOCKED_UNKNOWNUSER
+String STR_UNKNOWNUSER
{
Text [ en-US ] = "Unknown User";
};
diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx
new file mode 100644
index 000000000000..9e7857dfc886
--- /dev/null
+++ b/uui/source/trylater.cxx
@@ -0,0 +1,54 @@
+/*************************************************************************
+ *
+ * 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: openlocked.cxx,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 "ids.hrc"
+#include "trylater.hxx"
+
+TryLaterQueryBox::TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage ) :
+ MessBox(pParent, 0,
+ String( ResId( STR_TRYLATER_TITLE, *pResMgr ) ),
+ aMessage )
+{
+ SetImage( QueryBox::GetStandardImage() );
+
+ AddButton( String( ResId( STR_TRYLATER_RETRYSAVING_BTN, *pResMgr ) ), RET_YES,
+ BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON);
+ AddButton( String( ResId( STR_TRYLATER_SAVEAS_BTN, *pResMgr ) ), RET_NO, 0);
+ AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON );
+
+ SetButtonHelpText( RET_YES, String::EmptyString() );
+ SetButtonHelpText( RET_NO, String::EmptyString() );
+}
+
+TryLaterQueryBox::~TryLaterQueryBox()
+{
+}
+
+
diff --git a/uui/source/trylater.hxx b/uui/source/trylater.hxx
new file mode 100644
index 000000000000..64140966fb3e
--- /dev/null
+++ b/uui/source/trylater.hxx
@@ -0,0 +1,43 @@
+/*************************************************************************
+ *
+ * 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: openlocked.hxx,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 _UUI_TRYLATER_HXX
+#define _UUI_TRYLATER_HXX
+
+#include <vcl/msgbox.hxx>
+
+class TryLaterQueryBox : public MessBox
+{
+public:
+ TryLaterQueryBox( Window* pParent, ResMgr* pResMgr, const String& aMessage );
+ ~TryLaterQueryBox();
+};
+
+#endif
+
diff --git a/uui/source/trylater.src b/uui/source/trylater.src
new file mode 100644
index 000000000000..945ac8c74153
--- /dev/null
+++ b/uui/source/trylater.src
@@ -0,0 +1,53 @@
+/*************************************************************************
+ *
+ * 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: openlocked.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.
+ *
+ ************************************************************************/
+
+#define __RSC
+
+#ifndef UUI_IDS_HRC
+#include <ids.hrc>
+#endif
+
+String STR_TRYLATER_TITLE
+{
+ Text [ en-US ] = "Document in Use";
+};
+String STR_TRYLATER_MSG
+{
+ Text [ en-US ] = "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nTry again later to save document or save a copy of that document.\n\n";
+};
+String STR_TRYLATER_RETRYSAVING_BTN
+{
+ Text [ en-US ] = "~Retry Saving";
+};
+String STR_TRYLATER_SAVEAS_BTN
+{
+ Text [ en-US ] = "~Save As...";
+};
+