summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu3
-rw-r--r--officecfg/registry/data/org/openoffice/Office/UI/StartModuleCommands.xcu3
-rw-r--r--sfx2/inc/sfx2/objsh.hxx5
-rw-r--r--sfx2/source/appl/appopen.cxx8
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx59
-rw-r--r--sfx2/source/doc/objcont.cxx13
-rw-r--r--sfx2/source/doc/objstor.cxx21
-rw-r--r--svx/inc/optinet2.hrc5
-rw-r--r--svx/inc/svx/svdetc.hxx3
-rw-r--r--svx/inc/svx/svdoole2.hxx4
-rw-r--r--svx/source/dialog/optinet2.cxx75
-rw-r--r--svx/source/dialog/optinet2.hxx19
-rw-r--r--svx/source/dialog/treeopt.src2
-rw-r--r--svx/source/msfilter/msdffimp.cxx14
-rw-r--r--svx/source/options/optinet2.src57
-rw-r--r--svx/source/svdraw/svdetc.cxx91
-rw-r--r--svx/source/svdraw/svdoole2.cxx7
-rw-r--r--uui/source/iahndl.cxx20
-rw-r--r--uui/source/masterpasscrtdlg.cxx33
-rw-r--r--uui/source/masterpasscrtdlg.hrc2
-rw-r--r--uui/source/masterpasscrtdlg.hxx3
-rw-r--r--uui/source/masterpasscrtdlg.src49
-rw-r--r--uui/source/masterpassworddlg.cxx1
-rw-r--r--uui/source/masterpassworddlg.hrc1
-rw-r--r--uui/source/masterpassworddlg.hxx1
-rw-r--r--uui/source/masterpassworddlg.src29
-rw-r--r--uui/source/passcrtdlg.cxx64
-rw-r--r--uui/source/passcrtdlg.hrc24
-rw-r--r--uui/source/passcrtdlg.hxx16
-rw-r--r--uui/source/passcrtdlg.src81
-rw-r--r--uui/source/passworddlg.cxx66
-rw-r--r--uui/source/passworddlg.hrc21
-rw-r--r--uui/source/passworddlg.hxx15
-rw-r--r--uui/source/passworddlg.src37
-rw-r--r--uui/source/passworderrs.src6
35 files changed, 530 insertions, 328 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 669c6488ee22..54c3a74c7eaa 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -1458,9 +1458,6 @@
<prop oor:name="Label" oor:type="xs:string">
<value xml:lang="en-US">What's ~This?</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:ActiveHelp" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
diff --git a/officecfg/registry/data/org/openoffice/Office/UI/StartModuleCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/StartModuleCommands.xcu
index 58e744f04776..fd8cebf069f4 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/StartModuleCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/StartModuleCommands.xcu
@@ -82,9 +82,6 @@
<value xml:lang="en-US">What's ~This?</value>
</prop>
- <prop oor:name="Properties" oor:type="xs:int">
- <value>1</value>
- </prop>
</node>
<node oor:name=".uno:HelpIndex" oor:op="replace">
<prop oor:name="Label" oor:type="xs:string">
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 5ef3439eb9be..3f2d710cfe51 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: objsh.hxx,v $
- * $Revision: 1.14 $
+ * $Revision: 1.14.72.1 $
*
* This file is part of OpenOffice.org.
*
@@ -695,7 +695,8 @@ public:
String * pAppName,
String * pFullTypeName,
String * pShortTypeName,
- sal_Int32 nVersion ) const = 0;
+ sal_Int32 nVersion,
+ sal_Bool bTemplate = sal_False) const = 0;
// =================================
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 192da5439667..42102e1bee29 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -297,14 +297,14 @@ sal_uInt32 CheckPasswd_Impl
sal_Bool bRetry = sal_True;
sal_Bool bGotPasswd = sal_False;
::rtl::OUString aPassword;
+ ::com::sun::star::task::PasswordRequestMode nDlgMode = ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER;
while( bRetry )
{
bRetry = sal_False;
- RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword(
- ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER,
- INetURLObject( pFile->GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ) );
+ RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword( nDlgMode,
+ INetURLObject( pFile->GetOrigURL() ).GetMainURL( INetURLObject::DECODE_WITH_CHARSET ) );
Reference< XInteractionRequest > rRequest( pPasswordRequest );
xInteractionHandler->handle( rRequest );
@@ -330,7 +330,7 @@ sal_uInt32 CheckPasswd_Impl
catch( const packages::WrongPasswordException& )
{
// reask for the password
- ErrorHandler::HandleError( ERRCODE_SFX_WRONGPASSWORD );
+ nDlgMode = ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER;
bRetry = sal_True;
}
catch( const uno::Exception& )
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 09e026e2b572..7e24fdca9639 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -56,7 +56,9 @@
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/container/XContainerQuery.hpp>
+#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
+
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -84,6 +86,7 @@
#include <svtools/helpid.hrc>
#endif
#include <svtools/pickerhelper.hxx>
+#include <svtools/docpasswdrequest.hxx>
#include <ucbhelper/content.hxx>
#include <comphelper/storagehelper.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -1544,31 +1547,6 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
if( !rpSet )
rpSet = new SfxAllItemSet( SFX_APP()->GetPool() );
- // check, wether or not we have to display a password box
- if ( mbHasPassword && mbIsPwdEnabled && xCtrlAccess.is() )
- {
- try
- {
- Any aValue = xCtrlAccess->getValue( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 0 );
- sal_Bool bPassWord = sal_False;
- if ( ( aValue >>= bPassWord ) && bPassWord )
- {
- // ask for the password
- SfxPasswordDialog aPasswordDlg( NULL );
- aPasswordDlg.ShowExtras( SHOWEXTRAS_CONFIRM );
- short nRet = aPasswordDlg.Execute();
- if ( RET_OK == nRet )
- {
- String aPasswd = aPasswordDlg.GetPassword();
- rpSet->Put( SfxStringItem( SID_PASSWORD, aPasswd ) );
- }
- else
- return ERRCODE_ABORT;
- }
- }
- catch( IllegalArgumentException ){}
- }
-
// the item should remain only if it was set by the dialog
rpSet->ClearItem( SID_SELECTION );
@@ -1627,9 +1605,38 @@ ErrCode FileDialogHelper_Impl::execute( SvStringsDtor*& rpURLList,
// fill the rpURLList
implGetAndCacheFiles(mxFileDlg, rpURLList, getCurentSfxFilter());
- if ( rpURLList == NULL )
+ if ( rpURLList == NULL || rpURLList->GetObject(0) == NULL )
return ERRCODE_ABORT;
+ // check, wether or not we have to display a password box
+ if ( mbHasPassword && mbIsPwdEnabled && xCtrlAccess.is() )
+ {
+ try
+ {
+ Any aValue = xCtrlAccess->getValue( ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, 0 );
+ sal_Bool bPassWord = sal_False;
+ if ( ( aValue >>= bPassWord ) && bPassWord )
+ {
+ // ask for the password
+ uno::Reference < ::com::sun::star::task::XInteractionHandler > xInteractionHandler( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.comp.uui.UUIInteractionHandler")), UNO_QUERY );
+
+ if( xInteractionHandler.is() )
+ {
+ RequestDocumentPassword* pPasswordRequest = new RequestDocumentPassword(
+ ::com::sun::star::task::PasswordRequestMode_PASSWORD_CREATE, *(rpURLList->GetObject(0)) );
+
+ uno::Reference< com::sun::star::task::XInteractionRequest > rRequest( pPasswordRequest );
+ xInteractionHandler->handle( rRequest );
+ if ( pPasswordRequest->isPassword() )
+ rpSet->Put( SfxStringItem( SID_PASSWORD, pPasswordRequest->getPassword() ) );
+ else
+ return ERRCODE_ABORT;
+ }
+ }
+ }
+ catch( IllegalArgumentException ){}
+ }
+
SaveLastUsedFilter();
return ERRCODE_NONE;
}
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index a164f9cdf384..df77e397bf81 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -49,6 +49,7 @@
#include <svtools/rectitem.hxx>
#include <svtools/eitem.hxx>
#include <svtools/urihelper.hxx>
+#include <svtools/ctloptions.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <svtools/securityoptions.hxx>
@@ -171,6 +172,18 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig
"size of first page is 0, overload GetFirstPageSize or set vis-area!" );
pFile->Record( &aDevice );
+
+ LanguageType eLang;
+ SvtCTLOptions* pCTLOptions = new SvtCTLOptions;
+ if ( SvtCTLOptions::NUMERALS_HINDI == pCTLOptions->GetCTLTextNumerals() )
+ eLang = LANGUAGE_ARABIC;
+ else if ( SvtCTLOptions::NUMERALS_ARABIC == pCTLOptions->GetCTLTextNumerals() )
+ eLang = LANGUAGE_ENGLISH;
+ else
+ eLang = (LanguageType) Application::GetSettings().GetLanguage();
+
+ aDevice.SetDigitLanguage( eLang );
+
((SfxObjectShell*)this)->DoDraw( &aDevice, Point(0,0), aTmpSize, JobSetup(), nAspect );
pFile->Stop();
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 40b944aae1e2..36461abc44a6 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -340,7 +340,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
String aFullTypeName, aShortTypeName, aAppName;
sal_uInt32 nClipFormat=0;
- FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion );
+ FillClass( &aName, &nClipFormat, &aAppName, &aFullTypeName, &aShortTypeName, nVersion, bTemplate );
if ( nClipFormat )
{
// basic doesn't have a ClipFormat
@@ -350,30 +350,13 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
SotExchange::GetFormatDataFlavor( nClipFormat, aDataFlavor );
if ( aDataFlavor.MimeType.getLength() )
{
- if ( bTemplate )
- {
- // TODO/LATER: this is a temporary solution for BETA to avoid incompatible change
- if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_TEXT ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_TEXT_TEMPLATE;
- else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_DRAWING ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_DRAWING_TEMPLATE;
- else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_PRESENTATION_TEMPLATE;
- else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_SPREADSHEET_TEMPLATE;
- else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_CHART ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_CHART_TEMPLATE;
- else if ( aDataFlavor.MimeType.equals( MIMETYPE_OASIS_OPENDOCUMENT_FORMULA ) )
- aDataFlavor.MimeType = MIMETYPE_OASIS_OPENDOCUMENT_FORMULA_TEMPLATE;
- }
-
try
{
xProps->setPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ), uno::makeAny( aDataFlavor.MimeType ) );
}
catch( uno::Exception& )
{
- // TODO/LATER: ErrorHandling
+ const_cast<SfxObjectShell*>( this )->SetError( ERRCODE_IO_GENERAL );
}
::rtl::OUString aVersion;
diff --git a/svx/inc/optinet2.hrc b/svx/inc/optinet2.hrc
index a31c1b801544..2aa78d05bdd4 100644
--- a/svx/inc/optinet2.hrc
+++ b/svx/inc/optinet2.hrc
@@ -133,10 +133,9 @@
#define BORDER_OFFSET 8
#define COL_0 (RSC_SP_TBPG_INNERBORDER_LEFT)
#define COL_1 (COL_0+RSC_SP_FLGR_SPACE_X)
-#define COL_5 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
-#define COL_4 (COL_5-RSC_SP_FLGR_SPACE_X)
+#define COL_4 (TP_WIDTH-RSC_SP_TBPG_INNERBORDER_RIGHT)
#define COL_3 (COL_4-RSC_CD_PUSHBUTTON_WIDTH)
-#define COL_2 (COL_3-RSC_SP_CTRL_X)
+#define COL_2 (COL_3-RSC_SP_CTRL_DESC_X)
#define ROW_0 (RSC_SP_FLGR_INNERBORDER_TOP)
#define ROW_1 (ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
diff --git a/svx/inc/svx/svdetc.hxx b/svx/inc/svx/svdetc.hxx
index a72b8a4a1c0d..40ece921f6a2 100644
--- a/svx/inc/svx/svdetc.hxx
+++ b/svx/inc/svx/svdetc.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdetc.hxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.152.1 $
*
* This file is part of OpenOffice.org.
*
@@ -293,6 +293,7 @@ class OLEObjCache : public Container
ULONG nSize;
AutoTimer* pTimer;
+ void UnloadOnDemand();
BOOL UnloadObj( SdrOle2Obj* pObj );
DECL_LINK( UnloadCheckHdl, AutoTimer* );
diff --git a/svx/inc/svx/svdoole2.hxx b/svx/inc/svx/svdoole2.hxx
index bf16d781215c..6cf41fce8ac1 100644
--- a/svx/inc/svx/svdoole2.hxx
+++ b/svx/inc/svx/svdoole2.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdoole2.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.5.60.2 $
*
* This file is part of OpenOffice.org.
*
@@ -126,6 +126,8 @@ public:
void SetObjRef(const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& rNewObjRef);
com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef() const;
+ SVX_DLLPRIVATE com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetObjRef_NoInit() const;
+
void AbandonObject();
virtual void SetPage(SdrPage* pNewPage);
diff --git a/svx/source/dialog/optinet2.cxx b/svx/source/dialog/optinet2.cxx
index f60e3f4862fd..3475a4990fc1 100644
--- a/svx/source/dialog/optinet2.cxx
+++ b/svx/source/dialog/optinet2.cxx
@@ -777,6 +777,7 @@ SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) :
sModifyMsg(SVX_RES(MSG_MODIFY))
{
FreeResource();
+
SetExchangeSupport();
aCaseED.SelectEntryPos(0); // falls kein Eintrag vorhanden ist, kann es sonst "Arger geben
@@ -797,6 +798,8 @@ SvxSearchTabPage::SvxSearchTabPage(Window* pParent, const SfxItemSet& rSet ) :
aAndRB.SetClickHdl( aLink );
aOrRB.SetClickHdl( aLink );
aExactRB.SetClickHdl( aLink );
+
+ InitControls_Impl();
}
// -----------------------------------------------------------------------
@@ -921,6 +924,52 @@ BOOL SvxSearchTabPage::ConfirmLeave( const String& rStringSelection)
}
return TRUE;
}
+
+// -----------------------------------------------------------------------
+
+void SvxSearchTabPage::InitControls_Impl()
+{
+ // detect longest label text
+ sal_Int32 i = 0;
+ long nLabelTextWidth = 0;
+ Window* pLabels[] = { &aSearchNameFT, &aSearchFT, &aURLFT, &aPostFixFT, &aSeparatorFT, &aCaseFT };
+ Window** pLabel = pLabels;
+ const sal_Int32 nLabelCount = sizeof( pLabels ) / sizeof( pLabels[0] );
+ for ( ; i < nLabelCount; ++i, ++pLabel )
+ {
+ long nTemp = (*pLabel)->GetCtrlTextWidth( (*pLabel)->GetText() );
+ if ( nTemp > nLabelTextWidth )
+ nLabelTextWidth = nTemp;
+ }
+
+ // resize all labels
+ nLabelTextWidth = nLabelTextWidth * 120 / 100; // additional space looks better
+ const long nLabelWidth = aSearchNameFT.GetSizePixel().Width();
+ const long nDelta = nLabelWidth - nLabelTextWidth;
+ pLabel = pLabels;
+ for ( i = 0; i < nLabelCount; ++i, ++pLabel )
+ {
+ Size aNewSize = (*pLabel)->GetSizePixel();
+ aNewSize.Width() += nDelta;
+ (*pLabel)->SetSizePixel( aNewSize );
+ }
+
+ // resize and move the edits
+ Window* pEdits[] = { &aSearchNameED, &aAndRB, &aOrRB,
+ &aExactRB, &aURLED, &aPostFixED, &aSeparatorED, &aCaseED };
+ Window** pEdit = pEdits;
+ const sal_Int32 nCCount = sizeof( pEdits ) / sizeof( pEdits[ 0 ] );
+ for ( i = 0; i < nCCount; ++i, ++pEdit )
+ {
+ Point aNewPos = (*pEdit)->GetPosPixel();
+ aNewPos.X() -= nDelta;
+ Size aNewSize = (*pEdit)->GetSizePixel();
+ if ( (*pEdit) != &aSeparatorED && (*pEdit) != &aCaseED )
+ aNewSize.Width() += nDelta;
+ (*pEdit)->SetPosSizePixel( aNewPos, aNewSize );
+ }
+}
+
// -----------------------------------------------------------------------
IMPL_LINK( SvxSearchTabPage, NewSearchHdl_Impl, PushButton *, EMPTYARG )
@@ -1309,9 +1358,11 @@ SvxSecurityTabPage::SvxSecurityTabPage( Window* pParent, const SfxItemSet& rSet
,mpSecOptions ( new SvtSecurityOptions )
,mpSecOptDlg ( NULL )
,meRedlingMode ( RL_NONE )
- ,msProtectRecordsStr( SVX_RES( STR_SEC_PROTRECORDS ) )
- ,msUnprotectRecordsStr( SVX_RES( STR_SEC_UNPROTRECORDS ) )
+
+ ,msProtectRecordsStr( SVX_RES( STR_SEC_PROTRECORDS ) )
+ ,msUnprotectRecordsStr( SVX_RES( STR_SEC_UNPROTRECORDS ) )
,msPasswordStoringDeactivateStr( SVX_RES( STR_SEC_NOPASSWDSAVE ) )
+
{
FreeResource();
@@ -1610,21 +1661,33 @@ void SvxSecurityTabPage::InitControls()
if ( nTemp > nBtnTextWidth )
nBtnTextWidth = nTemp;
}
+
nBtnTextWidth = nBtnTextWidth * 115 / 100; // a little offset
- long nButtonWidth = maSecurityOptionsPB.GetSizePixel().Width();
- long nMaxWidth = nButtonWidth * 130 / 100;
+ const long nButtonWidth = maSecurityOptionsPB.GetSizePixel().Width();
+ const long nMaxWidth = nButtonWidth * 140 / 100;
+ long nExtra = ( nBtnTextWidth > nMaxWidth ) ? nBtnTextWidth - nMaxWidth : 0;
nBtnTextWidth = std::min( nBtnTextWidth, nMaxWidth );
+
if ( nBtnTextWidth > nButtonWidth )
{
// so make the buttons broader and its control in front of it smaller
long nDelta = nBtnTextWidth - nButtonWidth;
pButton = pButtons;
+
+ if ( nExtra > 0 )
+ {
+ long nPos = (*pButton)->GetPosPixel().X() - nDelta;
+ long nWidth = (*pButton)->GetSizePixel().Width() + nDelta;
+ long nMaxExtra = GetOutputSizePixel().Width() - ( nPos + nWidth ) - 2;
+ nExtra = ( nExtra < nMaxExtra ) ? nExtra : nMaxExtra;
+ }
+
for ( i = 0; i < nBCount; ++i, ++pButton )
{
Point aNewPos = (*pButton)->GetPosPixel();
aNewPos.X() -= nDelta;
Size aNewSize = (*pButton)->GetSizePixel();
- aNewSize.Width() += nDelta;
+ aNewSize.Width() += ( nDelta + nExtra );
(*pButton)->SetPosSizePixel( aNewPos, aNewSize );
}
@@ -1773,7 +1836,7 @@ void SvxSecurityTabPage::Reset( const SfxItemSet& )
if( pCurDocShell->HasSecurityOptOpenReadOnly() && !bIsHTMLDoc )
{
maRecommReadOnlyCB.Check( pCurDocShell->IsSecurityOptOpenReadOnly() );
-//! maRecommReadOnlyCB.Enable( !bIsReadonly );
+ maRecommReadOnlyCB.Enable( !bIsReadonly );
}
else
maRecommReadOnlyCB.Disable();
diff --git a/svx/source/dialog/optinet2.hxx b/svx/source/dialog/optinet2.hxx
index 9fb849292da3..6d08b2ec9607 100644
--- a/svx/source/dialog/optinet2.hxx
+++ b/svx/source/dialog/optinet2.hxx
@@ -191,16 +191,15 @@ private:
SvxSearchEngineData aCurrentSrchData;
#ifdef _SVX_OPTINET2_CXX
- void FillSearchBox_Impl();
- String GetSearchString_Impl();
-
- DECL_LINK( NewSearchHdl_Impl, PushButton * );
- DECL_LINK( AddSearchHdl_Impl, PushButton * );
- DECL_LINK( ChangeSearchHdl_Impl, PushButton * );
- DECL_LINK( DeleteSearchHdl_Impl, PushButton * );
- DECL_LINK( SearchEntryHdl_Impl, ListBox * );
- DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * );
- DECL_LINK( SearchPartHdl_Impl, RadioButton * );
+ void InitControls_Impl();
+
+ DECL_LINK( NewSearchHdl_Impl, PushButton * );
+ DECL_LINK( AddSearchHdl_Impl, PushButton * );
+ DECL_LINK( ChangeSearchHdl_Impl, PushButton * );
+ DECL_LINK( DeleteSearchHdl_Impl, PushButton * );
+ DECL_LINK( SearchEntryHdl_Impl, ListBox * );
+ DECL_LINK( SearchModifyHdl_Impl, SvxNoSpaceEdit * );
+ DECL_LINK( SearchPartHdl_Impl, RadioButton * );
#endif
virtual void ActivatePage( const SfxItemSet& rSet );
diff --git a/svx/source/dialog/treeopt.src b/svx/source/dialog/treeopt.src
index 69914bef6161..2bf5d0825cdc 100644
--- a/svx/source/dialog/treeopt.src
+++ b/svx/source/dialog/treeopt.src
@@ -187,7 +187,7 @@ Resource RID_OFADLG_OPTIONS_TREE_PAGES
< "Proxy" ; RID_SVXPAGE_INET_PROXY; > ;
< "Search" ; RID_SVXPAGE_INET_SEARCH; > ;
< "E-mail" ; RID_SVXPAGE_INET_MAIL; > ;
- < "Mozilla Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ;
+ < "Browser Plug-in" ; RID_SVXPAGE_INET_MOZPLUGIN; > ;
};
//modified by jmeng end
};
diff --git a/svx/source/msfilter/msdffimp.cxx b/svx/source/msfilter/msdffimp.cxx
index f13a07c4785f..821750b55e8b 100644
--- a/svx/source/msfilter/msdffimp.cxx
+++ b/svx/source/msfilter/msdffimp.cxx
@@ -7552,9 +7552,19 @@ com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > SvxMS
::rtl::OUString aName( aDstStgName );
comphelper::EmbeddedObjectContainer aCnt( rDestStorage );
xObj = aCnt.InsertEmbeddedObject( aMedium, aName );
+
if ( !xObj.is() )
- // TODO/LATER: error handling
- return xObj;
+ {
+ if( aFilterName.getLength() )
+ {
+ // throw the filter parameter away as workaround
+ aMedium.realloc( 2 );
+ xObj = aCnt.InsertEmbeddedObject( aMedium, aName );
+ }
+
+ if ( !xObj.is() )
+ return xObj;
+ }
// TODO/LATER: ViewAspect must be passed from outside!
sal_Int64 nViewAspect = embed::Aspects::MSOLE_CONTENT;
diff --git a/svx/source/options/optinet2.src b/svx/source/options/optinet2.src
index a51b506def0f..b4591a56d657 100644
--- a/svx/source/options/optinet2.src
+++ b/svx/source/options/optinet2.src
@@ -53,14 +53,14 @@ TabPage RID_SVXPAGE_INET_MOZPLUGIN
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248 , 8 ) ;
- Text[ en-US ] = "Mozilla Plug-in";
+ Text[ en-US ] = "Browser Plug-in";
};
CheckBox CB_MOZPLUGIN_CODE
{
Pos = MAP_APPFONT ( 12 , 14 ) ;
Size = MAP_APPFONT ( 236 , 10 ) ;
TabStop = TRUE ;
- Text [ en-US ] = "~Enable" ;
+ Text [ en-US ] = "~Display documents in browser" ;
};
};
@@ -319,67 +319,67 @@ TabPage RID_SVXPAGE_INET_SEARCH
RadioButton RB_AND
{
Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 26 ) ;
- Size = MAP_APPFONT ( 39 , 10 ) ;
+ Size = MAP_APPFONT ( 125 , 10 ) ;
Check = TRUE ;
Text [ en-US ] = "And" ;
};
RadioButton RB_OR
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS + 39 + 3 , GB_SEARCH_TOP + 26 ) ;
- Size = MAP_APPFONT ( 38 , 10 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ;
+ Size = MAP_APPFONT ( 125 , 10 ) ;
Text [ en-US ] = "~Or" ;
};
RadioButton RB_EXACT
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS + 39 + 3 + 38 + 3 , GB_SEARCH_TOP + 26 ) ;
- Size = MAP_APPFONT ( 42 , 10 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 52 ) ;
+ Size = MAP_APPFONT ( 125 , 10 ) ;
Text [ en-US ] = "E~xact" ;
};
FixedText FT_URL
{
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 41 ) ;
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 67 ) ;
Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
Text [ en-US ] = "~Prefix" ;
};
Edit ED_URL
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 39 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 65 ) ;
Size = MAP_APPFONT ( 125 , 12 ) ;
Border = TRUE ;
};
FixedText FT_POSTFIX
{
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 56 ) ;
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 82 ) ;
Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
Text [ en-US ] = "Su~ffix" ;
};
Edit ED_POSTFIX
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 54 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 80 ) ;
Size = MAP_APPFONT ( 125 , 12 ) ;
Border = TRUE ;
};
FixedText FT_SEPARATOR
{
- Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 71 ) ;
+ Pos = MAP_APPFONT ( LABEL_START_XPOS , GB_SEARCH_TOP + 97 ) ;
Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
Text [ en-US ] = "~Separator" ;
};
Edit ED_SEPARATOR
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 69 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS , GB_SEARCH_TOP + 95 ) ;
Size = MAP_APPFONT ( 42 , 12 ) ;
Border = TRUE ;
};
FixedText FT_CASE
{
- Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 86 ) ;
+ Pos = MAP_APPFONT ( LABEL_START_XPOS, GB_SEARCH_TOP + 112 ) ;
Size = MAP_APPFONT ( LABEL_LEN , 8 ) ;
Text [ en-US ] = "~Case match" ;
};
ListBox ED_CASE
{
- Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 84 ) ;
+ Pos = MAP_APPFONT ( EDIT_START_XPOS, GB_SEARCH_TOP + 110 ) ;
Size = MAP_APPFONT ( 42 , 48 ) ;
Border = TRUE ;
DropDown = TRUE ;
@@ -392,25 +392,25 @@ TabPage RID_SVXPAGE_INET_SEARCH
};
PushButton PB_NEW
{
- Pos = MAP_APPFONT ( 39 , 158 ) ;
+ Pos = MAP_APPFONT ( 39 , GB_SEARCH_TOP + 131 + 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "N~ew";
};
PushButton PB_ADD
{
- Pos = MAP_APPFONT ( 92 , 158 ) ;
+ Pos = MAP_APPFONT ( 92 , GB_SEARCH_TOP + 131 + 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add" ;
};
PushButton PB_CHANGE
{
- Pos = MAP_APPFONT ( 145 , 158 ) ;
+ Pos = MAP_APPFONT ( 145 , GB_SEARCH_TOP + 131 + 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Modify" ;
};
PushButton PB_DELETE
{
- Pos = MAP_APPFONT ( 198 , 158 ) ;
+ Pos = MAP_APPFONT ( 198 , GB_SEARCH_TOP + 131 + 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
};
@@ -438,7 +438,7 @@ TabPage RID_SVXPAGE_INET_SECURITY
FixedLine FL_SEC_SECURITYOPTIONS
{
Pos = MAP_APPFONT( COL_0, ROW_0 );
- Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
+ Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Security options and warnings";
};
FixedText FI_SEC_SECURITYOPTIONS
@@ -456,25 +456,26 @@ TabPage RID_SVXPAGE_INET_SECURITY
};
FixedLine FL_SEC_PASSWORDS
{
- Pos = MAP_APPFONT( COL_0, ROW_2 );
- Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
+ Pos = MAP_APPFONT( COL_0, ROW_2 - 2 );
+ Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Passwords for web connections";
};
CheckBox CB_SEC_SAVEPASSWORDS
{
- Pos = MAP_APPFONT( COL_1, ROW_3 );
- Size = MAP_APPFONT( COL_2-COL_1, RSC_CD_CHECKBOX_HEIGHT );
+ Pos = MAP_APPFONT( COL_1, ROW_3 - 4 );
+ Size = MAP_APPFONT( COL_2-COL_1, 16 );
+ Wordbreak = TRUE;
Text [ en-US ] = "Persistently save passwords protected by a master password";
};
PushButton PB_SEC_MASTERPASSWORD
{
- Pos = MAP_APPFONT( COL_3, ROW_3 - 2 );
+ Pos = MAP_APPFONT( COL_3, ROW_3 - 4 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "Master Password...";
};
FixedText FI_SEC_MASTERPASSWORD
{
- Pos = MAP_APPFONT( COL_1, ROW_4 );
+ Pos = MAP_APPFONT( COL_1, ROW_4 + 2 );
Size = MAP_APPFONT( COL_2-COL_1, 4*RSC_CD_FIXEDLINE_HEIGHT );
Wordbreak = TRUE;
Text [ en-US ] = "Passwords 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.";
@@ -488,7 +489,7 @@ TabPage RID_SVXPAGE_INET_SECURITY
FixedLine FL_SEC_MACROSEC
{
Pos = MAP_APPFONT( COL_0, ROW_5 );
- Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
+ Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "Macro security";
};
FixedText FI_SEC_MACROSEC
@@ -507,7 +508,7 @@ TabPage RID_SVXPAGE_INET_SECURITY
FixedLine FL_SEC_FILESHARING
{
Pos = MAP_APPFONT( COL_0, ROW_8 );
- Size = MAP_APPFONT( COL_5-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
+ Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
Text [ en-US ] = "File sharing options for this document";
};
CheckBox CB_SEC_RECOMMREADONLY
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 4a3e37bfc0ee..b3aa3daf522f 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -32,6 +32,9 @@
#include "precompiled_svx.hxx"
#include "forbiddencharacterstable.hxx"
+#include <com/sun/star/embed/XEmbeddedObject.hpp>
+#include <com/sun/star/embed/EmbedStates.hpp>
+
#include <svx/svdetc.hxx>
#include "svditext.hxx"
#include <svx/svdmodel.hxx>
@@ -75,6 +78,8 @@
//#i80528#
#include <svx/sdr/contact/viewcontact.hxx>
+using namespace ::com::sun::star;
+
/******************************************************************************
* Globale Daten der DrawingEngine
******************************************************************************/
@@ -126,17 +131,8 @@ OLEObjCache::~OLEObjCache()
delete pTimer;
}
-void OLEObjCache::SetSize(ULONG nNewSize)
+void OLEObjCache::UnloadOnDemand()
{
- nSize = nNewSize;
-}
-
-void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
-{
- // insert object into first position
- Remove(pObj);
- Insert(pObj, (ULONG) 0L);
-
if ( nSize < Count() )
{
// more objects than configured cache size try to remove objects
@@ -145,14 +141,65 @@ void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
ULONG nIndex = nCount2-1;
while( nIndex && nCount2 > nSize )
{
- SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(nIndex--);
- if ( UnloadObj(pCacheObj) )
- // object was successfully unloaded
- nCount2--;
+ SdrOle2Obj* pUnloadObj = (SdrOle2Obj*) GetObject(nIndex--);
+ if ( pUnloadObj )
+ {
+ try
+ {
+ sal_Bool bUnload = sal_True;
+ // it is important to get object without reinitialization to avoid reentrance
+ uno::Reference< embed::XEmbeddedObject > xUnloadObj = pUnloadObj->GetObjRef_NoInit();
+ if ( xUnloadObj.is() )
+ {
+ uno::Reference< frame::XModel > xUnloadModel( xUnloadObj->getComponent(), uno::UNO_QUERY );
+ if ( xUnloadModel.is() )
+ {
+ for ( ULONG nCheckInd = 0; nCheckInd < Count(); nCheckInd++ )
+ {
+ SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject(nCheckInd);
+ if ( pCacheObj && pCacheObj != pUnloadObj )
+ {
+ uno::Reference< frame::XModel > xParentModel = pCacheObj->GetParentXModel();
+ if ( xUnloadModel == xParentModel )
+ bUnload = sal_False; // the object has running embedded objects
+ }
+ }
+ }
+ }
+
+ if ( bUnload && UnloadObj(pUnloadObj) )
+ // object was successfully unloaded
+ nCount2--;
+ }
+ catch( uno::Exception& )
+ {}
+ }
}
}
}
+void OLEObjCache::SetSize(ULONG nNewSize)
+{
+ nSize = nNewSize;
+}
+
+void OLEObjCache::InsertObj(SdrOle2Obj* pObj)
+{
+ if ( Count() )
+ {
+ SdrOle2Obj* pExistingObj = (SdrOle2Obj*)GetObject( 0 );
+ if ( pObj == pExistingObj )
+ // the object is already on the top, nothing has to be changed
+ return;
+ }
+
+ // insert object into first position
+ Remove(pObj);
+ Insert(pObj, (ULONG) 0L);
+
+ UnloadOnDemand();
+}
+
void OLEObjCache::RemoveObj(SdrOle2Obj* pObj)
{
Remove(pObj);
@@ -184,21 +231,7 @@ BOOL OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
IMPL_LINK(OLEObjCache, UnloadCheckHdl, AutoTimer*, /*pTim*/)
{
- if ( nSize < Count() )
- {
- ULONG nCount2 = Count();
- ULONG nIndex = nCount2;
- while ( nCount2 > nSize )
- {
- SdrOle2Obj* pCacheObj = (SdrOle2Obj*) GetObject( --nIndex );
- if ( UnloadObj(pCacheObj) )
- nCount2--;
-
- if ( !nIndex )
- break;
- }
- }
-
+ UnloadOnDemand();
return 0;
}
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 4918b639a73f..60cc420716c2 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: svdoole2.cxx,v $
- * $Revision: 1.90 $
+ * $Revision: 1.89.60.2 $
*
* This file is part of OpenOffice.org.
*
@@ -2024,6 +2024,11 @@ uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef() const
return xObjRef.GetObject();
}
+uno::Reference < embed::XEmbeddedObject > SdrOle2Obj::GetObjRef_NoInit() const
+{
+ return xObjRef.GetObject();
+}
+
// -----------------------------------------------------------------------------
uno::Reference< frame::XModel > SdrOle2Obj::getXModel() const
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 62aab955150f..7c8781979629 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1623,15 +1623,6 @@ UUIInteractionHelper::executePasswordDialog(
xDialog(new PasswordCreateDialog(
getParentProperty(), xManager.get()));
- ::rtl::OUString aTitle( xDialog->GetText() );
- if( aDocName.getLength() )
- {
- aTitle += ::rtl::OUString::createFromAscii( " [" );
- aTitle += aDocName;
- aTitle += ::rtl::OUString::createFromAscii( "]" );
- xDialog->SetText( aTitle );
- }
-
rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
ERRCODE_BUTTON_CANCEL);
rInfo.SetPassword( xDialog->GetPassword() );
@@ -1640,16 +1631,7 @@ UUIInteractionHelper::executePasswordDialog(
{
std::auto_ptr< PasswordDialog >
xDialog(new PasswordDialog(
- getParentProperty(), nMode, xManager.get()));
-
- ::rtl::OUString aTitle( xDialog->GetText() );
- if( aDocName.getLength() )
- {
- aTitle += ::rtl::OUString::createFromAscii( " [" );
- aTitle += aDocName;
- aTitle += ::rtl::OUString::createFromAscii( "]" );
- xDialog->SetText( aTitle );
- }
+ getParentProperty(), nMode, xManager.get(), aDocName ));
rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
ERRCODE_BUTTON_CANCEL);
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 3a9f04aa1976..65a414a88542 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -82,6 +82,8 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aEDMasterPasswordCrt ( this, ResId( ED_MASTERPASSWORD_CRT, *pResMgr ) ),
aFTMasterPasswordRepeat ( this, ResId( FT_MASTERPASSWORD_REPEAT, *pResMgr ) ),
aEDMasterPasswordRepeat ( this, ResId( ED_MASTERPASSWORD_REPEAT, *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 ) ),
@@ -93,5 +95,36 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aOKBtn.Enable( sal_False );
aOKBtn.SetClickHdl( LINK( this, MasterPasswordCreateDialog, OKHdl_Impl ) );
aEDMasterPasswordCrt.SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) );
+
+ long nLableWidth = aFTMasterPasswordWarning.GetSizePixel().Width();
+ long nLabelHeight = aFTMasterPasswordWarning.GetSizePixel().Height();
+ long nTextWidth = aFTMasterPasswordWarning.GetCtrlTextWidth( aFTMasterPasswordWarning.GetText() );
+ long nTextHeight = aFTMasterPasswordWarning.GetTextHeight();
+
+ Rectangle aLabelRect( aFTMasterPasswordWarning.GetPosPixel(), aFTMasterPasswordWarning.GetSizePixel() );
+ Rectangle aRect = aFTMasterPasswordWarning.GetTextRect( aLabelRect, aFTMasterPasswordWarning.GetText() );
+
+ long nNewLabelHeight = 0;
+ for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight;
+ nNewLabelHeight < aRect.GetHeight();
+ nNewLabelHeight += nTextHeight );
+
+ long nDelta = nNewLabelHeight - nLabelHeight;
+ Size aNewDlgSize = GetSizePixel();
+ aNewDlgSize.Height() += nDelta;
+ SetSizePixel( aNewDlgSize );
+
+ Size aNewWarningSize = aFTMasterPasswordWarning.GetSizePixel();
+ aNewWarningSize.Height() = nNewLabelHeight;
+ aFTMasterPasswordWarning.SetPosSizePixel( aFTMasterPasswordWarning.GetPosPixel(), aNewWarningSize );
+
+ Window* pControls[] = { &aFL, &aOKBtn, &aCancelBtn, &aHelpBtn };
+ const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] );
+ for ( int i = 0; i < nCCount; ++i )
+ {
+ Point aNewPos =(*pControls[i]).GetPosPixel();
+ aNewPos.Y() += nDelta;
+ pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() );
+ }
};
diff --git a/uui/source/masterpasscrtdlg.hrc b/uui/source/masterpasscrtdlg.hrc
index 84919fa58887..dec23e7edabc 100644
--- a/uui/source/masterpasscrtdlg.hrc
+++ b/uui/source/masterpasscrtdlg.hrc
@@ -36,6 +36,8 @@
#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 BTN_MASTERPASSCRT_OK 50
#define BTN_MASTERPASSCRT_CANCEL 51
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index dce9544c9b7b..dba9ee0f130a 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -41,6 +41,7 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
//============================================================================
class MasterPasswordCreateDialog : public ModalDialog
@@ -49,6 +50,8 @@ class MasterPasswordCreateDialog : public ModalDialog
Edit aEDMasterPasswordCrt;
FixedText aFTMasterPasswordRepeat;
Edit aEDMasterPasswordRepeat;
+ FixedText aFTMasterPasswordWarning;
+ FixedLine aFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/uui/source/masterpasscrtdlg.src b/uui/source/masterpasscrtdlg.src
index a262f150d3b2..cc16800feadd 100644
--- a/uui/source/masterpasscrtdlg.src
+++ b/uui/source/masterpasscrtdlg.src
@@ -44,51 +44,64 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 265 , 64 ) ;
+ Size = MAP_APPFONT ( 175 ,135 ) ;
FixedText FT_MASTERPASSWORD_CRT
{
- Pos = MAP_APPFONT ( 12 , 17 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "Master password";
+ Pos = MAP_APPFONT ( 3 , 4 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "Enter new password";
};
Edit ED_MASTERPASSWORD_CRT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 16 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 17 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
FixedText FT_MASTERPASSWORD_REPEAT
{
- Pos = MAP_APPFONT ( 12 , 37 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "~Confirm master password";
+ Pos = MAP_APPFONT ( 3 , 33 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "~Reenter password";
};
Edit ED_MASTERPASSWORD_REPEAT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 36 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 46 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
+ FixedText FT_MASTERPASSWORD_WARNING
+ {
+ 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;
+ };
+ FixedLine FL_FIXED_LINE
+ {
+ Pos = MAP_APPFONT( 0, 105 );
+ Size = MAP_APPFONT( 175, 6 );
+ };
+
OKButton BTN_MASTERPASSCRT_OK
{
- Pos = MAP_APPFONT ( 209 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 65 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
DefButton = TRUE ;
};
CancelButton BTN_MASTERPASSCRT_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 120 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
HelpButton BTN_MASTERPASSCRT_HELP
{
- Pos = MAP_APPFONT ( 209 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
- Text [ en-US ] = "Enter Master Password";
+ Text [ en-US ] = "Change Master Password";
};
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index c5fb7389658a..0f2b8018d8ad 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -62,6 +62,7 @@ MasterPasswordDialog::MasterPasswordDialog
aFTMasterPassword ( this, ResId( FT_MASTERPASSWORD, *pResMgr ) ),
aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ),
+ aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ),
aOKBtn ( this, ResId( BTN_MASTERPASSWORD_OK, *pResMgr ) ),
aCancelBtn ( this, ResId( BTN_MASTERPASSWORD_CANCEL, *pResMgr ) ),
aHelpBtn ( this, ResId( BTN_MASTERPASSWORD_HELP, *pResMgr ) ),
diff --git a/uui/source/masterpassworddlg.hrc b/uui/source/masterpassworddlg.hrc
index 6c8eb9163ff1..7732d0cf1189 100644
--- a/uui/source/masterpassworddlg.hrc
+++ b/uui/source/masterpassworddlg.hrc
@@ -36,6 +36,7 @@
#define ED_MASTERPASSWORD 21
#define FT_MASTERPASSWORD_REPEAT 22
#define ED_MASTERPASSWORD_REPEAT 23
+#define FL_FIXED_LINE 30
#define BTN_MASTERPASSWORD_OK 50
#define BTN_MASTERPASSWORD_CANCEL 51
diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx
index 9466d6deb9aa..3dcabbabb1b0 100644
--- a/uui/source/masterpassworddlg.hxx
+++ b/uui/source/masterpassworddlg.hxx
@@ -47,6 +47,7 @@ class MasterPasswordDialog : public ModalDialog
{
FixedText aFTMasterPassword;
Edit aEDMasterPassword;
+ FixedLine aFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/uui/source/masterpassworddlg.src b/uui/source/masterpassworddlg.src
index 67da86366852..88e0993b8a2d 100644
--- a/uui/source/masterpassworddlg.src
+++ b/uui/source/masterpassworddlg.src
@@ -44,36 +44,41 @@ ModalDialog DLG_UUI_MASTERPASSWORD
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 265 , 64 ) ;
+ Size = MAP_APPFONT ( 175 , 66 ) ;
FixedText FT_MASTERPASSWORD
{
- Pos = MAP_APPFONT ( 12 , 27 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "Master password";
+ Pos = MAP_APPFONT ( 3 , 4 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "Enter password";
};
Edit ED_MASTERPASSWORD
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 26 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 17 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
+ FixedLine FL_FIXED_LINE
+ {
+ Pos = MAP_APPFONT( 0, 35 );
+ Size = MAP_APPFONT( 175, 6 );
+ };
OKButton BTN_MASTERPASSWORD_OK
{
- Pos = MAP_APPFONT ( 209 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 65 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
DefButton = TRUE ;
};
CancelButton BTN_MASTERPASSWORD_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 120 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
HelpButton BTN_MASTERPASSWORD_HELP
{
- Pos = MAP_APPFONT ( 209 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
Text [ en-US ] = "Enter Master Password";
};
diff --git a/uui/source/passcrtdlg.cxx b/uui/source/passcrtdlg.cxx
index 93e221c13c1d..e9af0645619b 100644
--- a/uui/source/passcrtdlg.cxx
+++ b/uui/source/passcrtdlg.cxx
@@ -61,7 +61,6 @@ IMPL_LINK( PasswordCreateDialog, OKHdl_Impl, OKButton *, EMPTYARG )
String aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr ));
ErrorBox aErrorBox( this, WB_OK, aErrorMsg );
aErrorBox.Execute();
- aEDPasswordCrt.SetText( String() );
aEDPasswordRepeat.SetText( String() );
aEDPasswordCrt.GrabFocus();
}
@@ -70,23 +69,19 @@ IMPL_LINK( PasswordCreateDialog, OKHdl_Impl, OKButton *, EMPTYARG )
// -----------------------------------------------------------------------
-PasswordCreateDialog::PasswordCreateDialog
-(
- Window* pParent,
- ResMgr* pResMgr
-) :
-
- ModalDialog( pParent, ResId( DLG_UUI_PASSWORD_CRT, *pResMgr ) ),
-
- aFTPasswordCrt ( this, ResId( FT_PASSWORD_CRT, *pResMgr ) ),
- aEDPasswordCrt ( this, ResId( ED_PASSWORD_CRT, *pResMgr ) ),
- aFTPasswordRepeat ( this, ResId( FT_PASSWORD_REPEAT, *pResMgr ) ),
- aEDPasswordRepeat ( this, ResId( ED_PASSWORD_REPEAT, *pResMgr ) ),
- aOKBtn ( this, ResId( BTN_PASSCRT_OK, *pResMgr ) ),
- aCancelBtn ( this, ResId( BTN_PASSCRT_CANCEL, *pResMgr ) ),
- aHelpBtn ( this, ResId( BTN_PASSCRT_HELP, *pResMgr ) ),
- pResourceMgr ( pResMgr ),
- nMinLen(5)
+PasswordCreateDialog::PasswordCreateDialog( Window* _pParent, ResMgr * pResMgr )
+ :ModalDialog( _pParent, ResId( DLG_UUI_PASSWORD_CRT, *pResMgr ) )
+ ,aFTPasswordCrt ( this, ResId( FT_PASSWORD_CRT, *pResMgr ) )
+ ,aEDPasswordCrt ( this, ResId( ED_PASSWORD_CRT, *pResMgr ) )
+ ,aFTPasswordRepeat ( this, ResId( FT_PASSWORD_REPEAT, *pResMgr ) )
+ ,aEDPasswordRepeat ( this, ResId( ED_PASSWORD_REPEAT, *pResMgr ) )
+ ,aFTWarning ( this, ResId( FT_PASSWORD_WARNING, *pResMgr ) )
+ ,aFixedLine1 ( this, ResId( FL_FIXED_LINE_1, *pResMgr ) )
+ ,aOKBtn ( this, ResId( BTN_PASSCRT_OK, *pResMgr ) )
+ ,aCancelBtn ( this, ResId( BTN_PASSCRT_CANCEL, *pResMgr ) )
+ ,aHelpBtn ( this, ResId( BTN_PASSCRT_HELP, *pResMgr ) )
+ ,pResourceMgr ( pResMgr )
+ ,nMinLen(5)
{
FreeResource();
@@ -94,5 +89,36 @@ PasswordCreateDialog::PasswordCreateDialog
aEDPasswordCrt.SetModifyHdl( LINK( this, PasswordCreateDialog, EditHdl_Impl ) );
aOKBtn.Enable( sal_False );
-};
+ long nLabelWidth = aFTWarning.GetSizePixel().Width();
+ long nLabelHeight = aFTWarning.GetSizePixel().Height();
+ long nTextWidth = aFTWarning.GetCtrlTextWidth( aFTWarning.GetText() );
+ long nTextHeight = aFTWarning.GetTextHeight();
+
+ Rectangle aLabelRect( aFTWarning.GetPosPixel(), aFTWarning.GetSizePixel() );
+ Rectangle aRect = aFTWarning.GetTextRect( aLabelRect, aFTWarning.GetText() );
+
+ long nNewLabelHeight = 0;
+ for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight;
+ nNewLabelHeight < aRect.GetHeight();
+ nNewLabelHeight += nTextHeight );
+
+ long nDelta = nNewLabelHeight - nLabelHeight;
+
+ Size aNewDlgSize = GetSizePixel();
+ aNewDlgSize.Height() += nDelta;
+ SetSizePixel( aNewDlgSize );
+
+ Size aNewWarningSize = aFTWarning.GetSizePixel();
+ aNewWarningSize.Height() = nNewLabelHeight;
+ aFTWarning.SetPosSizePixel( aFTWarning.GetPosPixel(), aNewWarningSize );
+
+ Window* pControls[] = { &aFixedLine1, &aOKBtn, &aCancelBtn, &aHelpBtn };
+ const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] );
+ for ( int i = 0; i < nCCount; ++i )
+ {
+ Point aNewPos =(*pControls[i]).GetPosPixel();
+ aNewPos.Y() += nDelta;
+ pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() );
+ }
+}
diff --git a/uui/source/passcrtdlg.hrc b/uui/source/passcrtdlg.hrc
index f3f202a3cc43..4c10fa92fddd 100644
--- a/uui/source/passcrtdlg.hrc
+++ b/uui/source/passcrtdlg.hrc
@@ -28,17 +28,19 @@
*
************************************************************************/
-#ifndef UUI_PASSCRT_HRC
-#define UUI_PASSCRT_HRC
+#ifndef UUI_PASSCRTDLG_HRC
+#define UUI_PASSCRTDLG_HRC
-//============================================================================
-#define FT_PASSWORD_CRT 20
-#define ED_PASSWORD_CRT 21
-#define FT_PASSWORD_REPEAT 22
-#define ED_PASSWORD_REPEAT 23
+// local identifiers
+#define BTN_PASSCRT_CANCEL 1
+#define ED_PASSWORD_CRT 2
+#define FT_PASSWORD_REPEAT 3
+#define FT_PASSWORD_WARNING 4
+#define ED_PASSWORD_REPEAT 5
+#define FL_FIXED_LINE_1 6
+#define BTN_PASSCRT_OK 7
+#define BTN_PASSCRT_HELP 8
+#define FT_PASSWORD_CRT 9
-#define BTN_PASSCRT_OK 50
-#define BTN_PASSCRT_CANCEL 51
-#define BTN_PASSCRT_HELP 52
-#endif // UUI_PASSCRT_HRC
+#endif // UUI_PASSCRTDLG_HRC
diff --git a/uui/source/passcrtdlg.hxx b/uui/source/passcrtdlg.hxx
index 7689ae4ad821..0fefc10d09ba 100644
--- a/uui/source/passcrtdlg.hxx
+++ b/uui/source/passcrtdlg.hxx
@@ -31,16 +31,12 @@
#ifndef UUI_PASSCRTDLG_HXX
#define UUI_PASSCRTDLG_HXX
-#ifndef _COM_SUN_STAR_TASK_PASSWORDREQUESTMODE_HPP
#include <com/sun/star/task/PasswordRequestMode.hpp>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
-#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
//============================================================================
class PasswordCreateDialog : public ModalDialog
@@ -49,10 +45,14 @@ class PasswordCreateDialog : public ModalDialog
Edit aEDPasswordCrt;
FixedText aFTPasswordRepeat;
Edit aEDPasswordRepeat;
+ FixedText aFTWarning;
+ FixedLine aFixedLine1;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
+ ResMgr* pResourceMgr;
+ sal_uInt16 nMinLen;
DECL_LINK( OKHdl_Impl, OKButton * );
DECL_LINK( EditHdl_Impl, Edit * );
@@ -61,10 +61,6 @@ public:
PasswordCreateDialog( Window* pParent, ResMgr * pResMgr );
String GetPassword() const { return aEDPasswordCrt.GetText(); }
-
-private:
- ResMgr* pResourceMgr;
- sal_uInt16 nMinLen;
};
#endif // UUI_PASSCRTDLG_HXX
diff --git a/uui/source/passcrtdlg.src b/uui/source/passcrtdlg.src
index 28eeacfddfd1..cdfc9d380079 100644
--- a/uui/source/passcrtdlg.src
+++ b/uui/source/passcrtdlg.src
@@ -34,7 +34,7 @@
#include <ids.hrc>
#endif
#ifndef UUI_PASSCRTDLG_HRC
-#include <passcrtdlg.hrc>
+#include "passcrtdlg.hrc"
#endif
ModalDialog DLG_UUI_PASSWORD_CRT
@@ -44,74 +44,61 @@ ModalDialog DLG_UUI_PASSWORD_CRT
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 165 , 67 ) ;
+ Size = MAP_APPFONT( 145, 129 );
FixedText FT_PASSWORD_CRT
{
- Pos = MAP_APPFONT ( 6 , 5 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "~Enter password";
+ Pos = MAP_APPFONT( 3, 4 );
+ Size = MAP_APPFONT( 139, 9 );
+ Text [ en-US ] = "Enter password";
};
Edit ED_PASSWORD_CRT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT( 3, 17 );
+ Size = MAP_APPFONT( 139, 13 );
PassWord = TRUE ;
};
- FixedText FT_PASSWORD_REPEAT
- {
- Pos = MAP_APPFONT ( 6 , 34 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "~Confirm password";
- };
Edit ED_PASSWORD_REPEAT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT( 3, 47 );
+ Size = MAP_APPFONT( 139, 13 );
PassWord = TRUE ;
};
-
OKButton BTN_PASSCRT_OK
{
- Pos = MAP_APPFONT ( 109 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 27, 110 );
+ Size = MAP_APPFONT( 37, 15 );
DefButton = TRUE ;
};
CancelButton BTN_PASSCRT_CANCEL
{
- Pos = MAP_APPFONT ( 109 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 66, 110 );
+ Size = MAP_APPFONT( 37, 15 );
};
HelpButton BTN_PASSCRT_HELP
{
- Pos = MAP_APPFONT ( 109 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 105, 110 );
+ Size = MAP_APPFONT( 37, 15 );
+ };
+ FixedText FT_PASSWORD_REPEAT
+ {
+ Pos = MAP_APPFONT( 3, 34 );
+ Size = MAP_APPFONT( 139, 9 );
+ Text [ en-US ] = "Reenter password";
+ };
+ FixedText FT_PASSWORD_WARNING
+ {
+ Pos = MAP_APPFONT( 4, 64 );
+ Size = MAP_APPFONT( 137, 40 );
+ Text [ en-US ] = "WARNING: If you lose or forget the password, it cannot be recovered. It is advisable to keep passwords in a safe place. Passwords are case-sensitive and at least five characters long.";
+ WordBreak = TRUE;
+ };
+ FixedLine FL_FIXED_LINE_1
+ {
+ Pos = MAP_APPFONT( 0, 104 );
+ Size = MAP_APPFONT( 145, 6 );
};
- Text [ en-US ] = "Password";
+ Text [ en-US ] = "Enter Password";
};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index ad756df246f7..0ac4f34869af 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -53,30 +53,64 @@ IMPL_LINK( PasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
PasswordDialog::PasswordDialog
(
- Window* pParent,
- ::com::sun::star::task::PasswordRequestMode aDialogMode,
- ResMgr* pResMgr
-) :
-
- ModalDialog( pParent, ResId( DLG_UUI_PASSWORD, *pResMgr ) ),
-
- aFTPassword ( this, ResId( FT_PASSWORD, *pResMgr ) ),
- aEDPassword ( this, ResId( ED_PASSWORD, *pResMgr ) ),
- aOKBtn ( this, ResId( BTN_PASSWORD_OK, *pResMgr ) ),
- aCancelBtn ( this, ResId( BTN_PASSWORD_CANCEL, *pResMgr ) ),
- aHelpBtn ( this, ResId( BTN_PASSWORD_HELP, *pResMgr ) ),
- nDialogMode ( aDialogMode ),
- pResourceMgr ( pResMgr )
+ Window* _pParent,
+ ::com::sun::star::task::PasswordRequestMode nDlgMode,
+ ResMgr * pResMgr,
+ rtl::OUString& aDocURL
+ )
+ :ModalDialog( _pParent, ResId( DLG_UUI_PASSWORD, *pResMgr ) )
+ ,aFTPassword ( this, ResId( FT_PASSWORD, *pResMgr ) )
+ ,aEDPassword ( this, ResId( ED_PASSWORD, *pResMgr ) )
+ ,aOKBtn ( this, ResId( BTN_PASSWORD_OK, *pResMgr ) )
+ ,aCancelBtn ( this, ResId( BTN_PASSWORD_CANCEL, *pResMgr ) )
+ ,aHelpBtn ( this, ResId( BTN_PASSWORD_HELP, *pResMgr ) )
+ ,aFixedLine1 ( this, ResId( FL_FIXED_LINE_1, *pResMgr ) )
+ ,nDialogMode ( nDlgMode )
+ ,pResourceMgr ( pResMgr )
{
if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
{
String aErrorMsg( ResId( STR_ERROR_PASSWORD_WRONG, *pResourceMgr ));
- ErrorBox aErrorBox( pParent, WB_OK, aErrorMsg );
+ ErrorBox aErrorBox( _pParent, WB_OK, aErrorMsg );
aErrorBox.Execute();
}
FreeResource();
+ aFTPassword.SetText( aFTPassword.GetText() + aDocURL );
+
aOKBtn.SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
-};
+ long nLabelWidth = aFTPassword.GetSizePixel().Width();
+ long nLabelHeight = aFTPassword.GetSizePixel().Height();
+ long nTextWidth = aFTPassword.GetCtrlTextWidth( aFTPassword.GetText() );
+ long nTextHeight = aFTPassword.GetTextHeight();
+
+ Rectangle aLabelRect( aFTPassword.GetPosPixel(), aFTPassword.GetSizePixel() );
+ Rectangle aRect = aFTPassword.GetTextRect( aLabelRect, aFTPassword.GetText() );
+
+ long nNewLabelHeight = 0;
+ for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight;
+ nNewLabelHeight < aRect.GetHeight();
+ nNewLabelHeight += nTextHeight );
+
+ long nDelta = nNewLabelHeight - nLabelHeight;
+
+ Size aNewDlgSize = GetSizePixel();
+ aNewDlgSize.Height() += nDelta;
+ SetSizePixel( aNewDlgSize );
+
+ Size aNewLabelSize = aFTPassword.GetSizePixel();
+ aNewLabelSize.Height() = nNewLabelHeight;
+ aFTPassword.SetPosSizePixel( aFTPassword.GetPosPixel(), aNewLabelSize );
+
+ Window* pControls[] = { &aEDPassword, &aFixedLine1, &aOKBtn, &aCancelBtn, &aHelpBtn };
+ const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] );
+ for ( int i = 0; i < nCCount; ++i )
+ {
+ Point aNewPos =(*pControls[i]).GetPosPixel();
+ aNewPos.Y() += nDelta;
+ pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() );
+ }
+
+}
diff --git a/uui/source/passworddlg.hrc b/uui/source/passworddlg.hrc
index 43f354e55eaa..37938b0228ae 100644
--- a/uui/source/passworddlg.hrc
+++ b/uui/source/passworddlg.hrc
@@ -28,17 +28,16 @@
*
************************************************************************/
-#ifndef UUI_PASSWORD_HRC
-#define UUI_PASSWORD_HRC
+#ifndef PASSWORDDLG_HRC
+#define PASSWORDDLG_HRC
-//============================================================================
-#define FT_PASSWORD 20
-#define ED_PASSWORD 21
-#define FT_PASSWORD_REPEAT 22
-#define ED_PASSWORD_REPEAT 23
+// local identifiers
+#define BTN_PASSWORD_OK 1
+#define ED_PASSWORD 2
+#define FT_PASSWORD 3
+#define FL_FIXED_LINE_1 4
+#define BTN_PASSWORD_HELP 5
+#define BTN_PASSWORD_CANCEL 6
-#define BTN_PASSWORD_OK 50
-#define BTN_PASSWORD_CANCEL 51
-#define BTN_PASSWORD_HELP 52
-#endif // UUI_PASSWORD_HRC
+#endif // PASSWORDDLG_HRC
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index b31f1b25a214..75f65b456ac7 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -28,19 +28,16 @@
*
************************************************************************/
-#ifndef UUI_PASSWORDDLG_HXX
-#define UUI_PASSWORDDLG_HXX
+#ifndef PASSWORDDLG_HXX
+#define PASSWORDDLG_HXX
-#ifndef _COM_SUN_STAR_TASK_PASSWORDREQUESTMODE_HPP
#include <com/sun/star/task/PasswordRequestMode.hpp>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
//============================================================================
class PasswordDialog : public ModalDialog
@@ -50,12 +47,13 @@ class PasswordDialog : public ModalDialog
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
+ FixedLine aFixedLine1;
DECL_LINK( OKHdl_Impl, OKButton * );
public:
- PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr );
+ PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, ::rtl::OUString& aDocURL );
String GetPassword() const { return aEDPassword.GetText(); }
@@ -64,5 +62,4 @@ private:
ResMgr* pResourceMgr;
};
-#endif // UUI_PASSWORDDLG_HXX
-
+#endif // PASSWORDDLG_HXX
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
index e31f663c9a77..d03814e81a41 100644
--- a/uui/source/passworddlg.src
+++ b/uui/source/passworddlg.src
@@ -44,37 +44,46 @@ ModalDialog DLG_UUI_PASSWORD
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 165 , 64 ) ;
- Text [ en-US ] = "Password";
+ Size = MAP_APPFONT( 145, 75 );
+ Text [ en-US ] = "Enter password";
FixedText FT_PASSWORD
{
- Pos = MAP_APPFONT ( 6 , 5 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "Enter password";
+ Pos = MAP_APPFONT( 3, 4 );
+ Size = MAP_APPFONT( 139, 28 );
+ Text [ en-US ] = "Enter password to open the file: \n";
+ WordBreak = TRUE;
};
+
Edit ED_PASSWORD
{
+ Pos = MAP_APPFONT( 3, 35 );
+ Size = MAP_APPFONT( 139, 13 );
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
PassWord = TRUE ;
};
OKButton BTN_PASSWORD_OK
{
- Pos = MAP_APPFONT ( 109 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
+ Pos = MAP_APPFONT( 27, 56 );
+ Size = MAP_APPFONT( 37, 15 );
};
+
CancelButton BTN_PASSWORD_CANCEL
{
- Pos = MAP_APPFONT ( 109 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 66, 56 );
+ Size = MAP_APPFONT( 37, 15 );
};
+
HelpButton BTN_PASSWORD_HELP
{
- Pos = MAP_APPFONT ( 109 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 105, 56 );
+ Size = MAP_APPFONT( 37, 15 );
+ };
+
+ FixedLine FL_FIXED_LINE_1
+ {
+ Pos = MAP_APPFONT( 0, 50 );
+ Size = MAP_APPFONT( 145, 6 );
};
};
diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src
index 51c5b90a1973..90aa5688610e 100644
--- a/uui/source/passworderrs.src
+++ b/uui/source/passworderrs.src
@@ -36,17 +36,17 @@
String STR_ERROR_PASSWORD_WRONG
{
- Text [ en-US ] = "An incorrect password was entered. Please enter it again.";
+ Text [ en-US ] = "The password is incorrect. The document cannot be opened.";
};
String STR_ERROR_MASTERPASSWORD_WRONG
{
- Text [ en-US ] = "An incorrect master password was entered. Please enter it again.";
+ Text [ en-US ] = "The wrong Master Password has been entered. %PRODUCTNAME could not access web login information protected by Master Password.\n\nNote: Passwords are case-sensitive and at least five characters long.";
};
String STR_ERROR_PASSWORDS_NOT_IDENTICAL
{
- Text [ en-US ] = "The passwords do not match. Please enter the password again.";
+ Text [ en-US ] = "The password confirmation does not match.";
};