lok: make properties>change password dialog async
* We now can set a password through properties->change password
without having to have a password initially only for online
because it needs a created file already, online works with files
that are created before loading but the desktop does not need this.
* The same dialog is still used as non-async for desktop version
because it goes through an InteractionHandler and the result is
expected not from the dialog but from the interaction handler.
Therefore, making it async there did not make sense.
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I3d02822be0b71836b1592abca191b3b1c5f6374e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139884
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142991
Tested-by: Jenkins
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index 8a8fcb3..163f396 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -29,10 +29,10 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void)
m_xPasswdToModifyED->get_text().isEmpty();
if (bInvalidState)
{
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(m_xDialog.get(),
m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Warning, VclButtonsType::Ok,
m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2));
xErrorBox->run();
m_xErrorBox->runAsync(m_xErrorBox, [](sal_Int32 /*nResult*/) {});
}
else // check for mismatched passwords...
{
@@ -41,26 +41,27 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void)
const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
if (nMismatch > 0)
{
std::unique_ptr<weld::MessageDialog> xErrorBox(Application::CreateMessageDialog(m_xDialog.get(),
m_xErrorBox.reset(Application::CreateMessageDialog(m_xDialog.get(),
VclMessageType::Warning, VclButtonsType::Ok,
nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch));
xErrorBox->run();
weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get();
weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get();
if (nMismatch == 1)
m_xErrorBox->runAsync(m_xErrorBox, [this, bToOpenMatch, nMismatch](sal_Int32 /*nResult*/)
{
pEdit->set_text( "" );
pRepeatEdit->set_text( "" );
}
else if (nMismatch == 2)
{
m_xPasswdToOpenED->set_text( "" );
m_xReenterPasswdToOpenED->set_text( "" );
m_xPasswdToModifyED->set_text( "" );
m_xReenterPasswdToModifyED->set_text( "" );
}
pEdit->grab_focus();
weld::Entry* pEdit = !bToOpenMatch ? m_xPasswdToOpenED.get() : m_xPasswdToModifyED.get();
weld::Entry* pRepeatEdit = !bToOpenMatch? m_xReenterPasswdToOpenED.get() : m_xReenterPasswdToModifyED.get();
if (nMismatch == 1)
{
pEdit->set_text( "" );
pRepeatEdit->set_text( "" );
}
else if (nMismatch == 2)
{
m_xPasswdToOpenED->set_text( "" );
m_xReenterPasswdToOpenED->set_text( "" );
m_xPasswdToModifyED->set_text( "" );
m_xReenterPasswdToModifyED->set_text( "" );
}
pEdit->grab_focus();
});
}
else
{
@@ -136,6 +137,14 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s
ReadonlyOnOffHdl(*m_xOpenReadonlyCB);
}
PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
{
if (m_xErrorBox)
{
m_xErrorBox->response(RET_CANCEL);
}
}
OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const
{
const bool bPasswdOk =
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 0cd8d39..9bd3f02 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -114,7 +114,6 @@ IMPL_ABSTDLG_CLASS(AbstractGraphicFilterDialog)
IMPL_ABSTDLG_CLASS(AbstractHangulHanjaConversionDialog)
IMPL_ABSTDLG_CLASS(AbstractInsertObjectDialog)
IMPL_ABSTDLG_CLASS(AbstractLinksDialog)
IMPL_ABSTDLG_CLASS(AbstractPasswordToOpenModifyDialog)
IMPL_ABSTDLG_CLASS(AbstractQrCodeGenDialog)
IMPL_ABSTDLG_CLASS(AbstractScreenshotAnnotationDlg)
IMPL_ABSTDLG_CLASS(AbstractSignatureLineDialog)
@@ -133,6 +132,7 @@ IMPL_ABSTDLG_CLASS(AbstractSvxSearchSimilarityDialog)
IMPL_ABSTDLG_CLASS(AbstractSvxZoomDialog)
IMPL_ABSTDLG_CLASS(AbstractTitleDialog)
IMPL_ABSTDLG_CLASS(AbstractURLDlg)
IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasswordToOpenModifyDialog,weld::DialogController)
IMPL_ABSTDLG_CLASS_ASYNC(AbstractPasteDialog,SfxDialogController)
IMPL_ABSTDLG_CLASS_ASYNC(AbstractScriptSelectorDialog,SfxDialogController)
IMPL_ABSTDLG_CLASS_ASYNC(AbstractSpellDialog,SfxDialogController)
@@ -804,6 +804,11 @@ bool AbstractPasswordToOpenModifyDialog_Impl::IsRecommendToOpenReadonly() const
return m_xDlg->IsRecommendToOpenReadonly();
}
void AbstractPasswordToOpenModifyDialog_Impl::Response(sal_Int32 nResult)
{
m_xDlg->response(nResult);
}
// Create dialogs with simplest interface
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
{
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index eb52630..071c715 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -383,10 +383,11 @@ private:
};
// AbstractPasswordToOpenModifyDialog_Impl
DECL_ABSTDLG_CLASS(AbstractPasswordToOpenModifyDialog,PasswordToOpenModifyDialog)
DECL_ABSTDLG_CLASS_SHARED_ASYNC(AbstractPasswordToOpenModifyDialog,AbstractPasswordToOpenModifyDialog, PasswordToOpenModifyDialog)
virtual OUString GetPasswordToOpen() const override;
virtual OUString GetPasswordToModify() const override;
virtual bool IsRecommendToOpenReadonly() const override;
virtual void Response(sal_Int32) override;
};
// AbstractSvxCharacterMapDialog_Impl
diff --git a/cui/source/inc/passwdomdlg.hxx b/cui/source/inc/passwdomdlg.hxx
index 2e13cc1..9b1cd46 100644
--- a/cui/source/inc/passwdomdlg.hxx
+++ b/cui/source/inc/passwdomdlg.hxx
@@ -36,6 +36,7 @@ class PasswordToOpenModifyDialog : public SfxDialogController
std::unique_ptr<weld::Label> m_xReenterPasswdToModifyFT;
std::unique_ptr<weld::Entry> m_xReenterPasswdToModifyED;
std::unique_ptr<weld::Label> m_xReenterPasswdToModifyInd;
std::shared_ptr<weld::MessageDialog> m_xErrorBox;
OUString m_aOneMismatch;
OUString m_aTwoMismatch;
@@ -57,6 +58,7 @@ public:
PasswordToOpenModifyDialog(weld::Window* pParent,
sal_uInt16 nMaxPasswdLen /* 0 -> no max len enforced */,
bool bIsPasswordToModify );
~PasswordToOpenModifyDialog();
// AbstractPasswordToOpenModifyDialog
OUString GetPasswordToOpen() const;
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 7cbf543..4d7487f 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -39,6 +39,7 @@
#include <optional>
#include <memory>
#include <vcl/abstdlg.hxx>
namespace com::sun::star::beans { struct PropertyValue; }
@@ -197,6 +198,7 @@ private:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
VclPtr<AbstractPasswordToOpenModifyDialog> m_xPasswordDialog;
public:
SfxDocumentPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet&);
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 13593ba..c89da31 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -306,6 +306,10 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent,
css::uno::Reference<css::ui::dialogs::XFolderPicker2> SFX2_DLLPUBLIC createFolderPicker(const css::uno::Reference<css::uno::XComponentContext>& rContext, weld::Window* pPreferredParent);
ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString const & aURL, SfxItemSet* pSet, const css::uno::Reference<css::awt::XWindow>& rParent);
ErrCode SetPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter,
SfxItemSet* pSet, const OUString& rPasswordToOpen, std::u16string_view rPasswordToModify);
bool IsOOXML(const std::shared_ptr<const SfxFilter>& pCurrentFilter);
bool IsMSType(const std::shared_ptr<const SfxFilter>& pCurrentFilter);
}
#endif
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 79b2b32..cb4de91 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -99,6 +99,7 @@ public:
virtual OUString GetPasswordToOpen() const = 0;
virtual OUString GetPasswordToModify() const = 0;
virtual bool IsRecommendToOpenReadonly() const = 0;
virtual void Response(sal_Int32) = 0;
};
class VCL_DLLPUBLIC AbstractScreenshotAnnotationDlg : public VclAbstractDialog
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 3dd14c4..3d1ee1d 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -70,6 +70,7 @@
#include <helper.hxx>
#include <sfx2/objsh.hxx>
#include <sfx2/docfile.hxx>
#include <vcl/abstdlg.hxx>
#include <documentfontsdialog.hxx>
#include <dinfdlg.hrc>
@@ -723,6 +724,11 @@ SfxDocumentPage::SfxDocumentPage(weld::Container* pPage, weld::DialogController*
SfxDocumentPage::~SfxDocumentPage()
{
if (m_xPasswordDialog)
{
m_xPasswordDialog->Response(RET_CANCEL);
m_xPasswordDialog.clear();
}
}
IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl, weld::Button&, void)
@@ -772,9 +778,26 @@ IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, weld::Button&, void)
std::shared_ptr<const SfxFilter> pFilter = pShell->GetMedium()->GetFilter();
if (!pFilter)
break;
sfx2::RequestPassword(pFilter, OUString(), pMedSet, GetFrameWeld()->GetXWindow());
pShell->SetModified();
if (comphelper::LibreOfficeKit::isActive())
{
// MS Types support max len of 15 characters while OOXML is "unlimited"
const sal_uInt16 maxPwdLen = sfx2::IsMSType(pFilter) && !sfx2::IsOOXML(pFilter) ? 15 : 0;
// handle the pwd dialog asynchronously
VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create();
m_xPasswordDialog = pFact->CreatePasswordToOpenModifyDialog(GetFrameWeld(), maxPwdLen, false);
m_xPasswordDialog->StartExecuteAsync([this, pFilter, pMedSet, pShell](sal_Int32 nResult)
{
if (nResult == RET_OK)
{
sfx2::SetPassword(pFilter, pMedSet, m_xPasswordDialog->GetPasswordToOpen(), m_xPasswordDialog->GetPasswordToOpen());
pShell->SetModified();
}
m_xPasswordDialog->disposeOnce();
});
} else {
sfx2::RequestPassword(pFilter, OUString(), pMedSet, GetFrameWeld()->GetXWindow());
pShell->SetModified();
}
}
while (false);
}
@@ -838,7 +861,7 @@ void SfxDocumentPage::ImplCheckPasswordState()
return;
}
while (false);
m_xChangePassBtn->set_sensitive(false);
m_xChangePassBtn->set_sensitive(comphelper::LibreOfficeKit::isActive());
}
std::unique_ptr<SfxTabPage> SfxDocumentPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rItemSet)
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 0f9f473..9350505 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2865,21 +2865,109 @@ ErrCode FileOpenDialog_Impl( weld::Window* pParent,
return nRet;
}
bool IsMSType(const std::shared_ptr<const SfxFilter>& pCurrentFilter)
{
// TODO: need a save way to distinguish MS filters from other filters
// for now MS-filters are the only alien filters that support encryption
return !pCurrentFilter->IsOwnFormat();
}
bool IsOOXML(const std::shared_ptr<const SfxFilter>& pCurrentFilter)
{
// For OOXML we can use the standard password ("unlimited" characters)
return IsMSType(pCurrentFilter) && lclSupportsOOXMLEncryption( pCurrentFilter->GetFilterName());
}
ErrCode SetPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, SfxItemSet* pSet, const OUString& rPasswordToOpen, std::u16string_view rPasswordToModify)
{
const bool bMSType = IsMSType(pCurrentFilter);
const bool bOOXML = IsOOXML(pCurrentFilter);
if ( rPasswordToOpen.getLength() )
{
css::uno::Sequence< css::beans::NamedValue > aEncryptionData;
if ( bMSType )
{
if (bOOXML)
{
::comphelper::SequenceAsHashMap aHashData;
aHashData[ OUString( "OOXPassword" ) ] <<= rPasswordToOpen;
aHashData[ OUString( "CryptoType" ) ] <<= OUString( "Standard" );
aEncryptionData = aHashData.getAsConstNamedValueList();
}
else
{
uno::Sequence< sal_Int8 > aUniqueID = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 );
uno::Sequence< sal_Int8 > aEncryptionKey = ::comphelper::DocPasswordHelper::GenerateStd97Key( rPasswordToOpen, aUniqueID );
if ( aEncryptionKey.hasElements() )
{
::comphelper::SequenceAsHashMap aHashData;
aHashData[ OUString( "STD97EncryptionKey" ) ] <<= aEncryptionKey;
aHashData[ OUString( "STD97UniqueID" ) ] <<= aUniqueID;
aEncryptionData = aHashData.getAsConstNamedValueList();
}
else
{
return ERRCODE_IO_NOTSUPPORTED;
}
}
}
// tdf#118639: We need ODF encryption data for autorecovery where password will already
// be unavailable, even for non-ODF documents, so append it here unconditionally
pSet->Put(SfxUnoAnyItem(
SID_ENCRYPTIONDATA,
uno::Any(comphelper::concatSequences(
aEncryptionData, comphelper::OStorageHelper::CreatePackageEncryptionData(
rPasswordToOpen)))));
}
if ( bMSType )
{
if (bOOXML)
{
uno::Sequence<beans::PropertyValue> aModifyPasswordInfo
= ::comphelper::DocPasswordHelper::GenerateNewModifyPasswordInfoOOXML(
rPasswordToModify);
if (aModifyPasswordInfo.hasElements() && pSet)
pSet->Put(
SfxUnoAnyItem(SID_MODIFYPASSWORDINFO, uno::Any(aModifyPasswordInfo)));
}
else
{
// the empty password has 0 as Hash
sal_Int32 nHash = SfxMedium::CreatePasswordToModifyHash(
rPasswordToModify,
pCurrentFilter->GetServiceName() == "com.sun.star.text.TextDocument");
if (nHash && pSet)
pSet->Put(SfxUnoAnyItem(SID_MODIFYPASSWORDINFO, uno::Any(nHash)));
}
}
else
{
uno::Sequence< beans::PropertyValue > aModifyPasswordInfo = ::comphelper::DocPasswordHelper::GenerateNewModifyPasswordInfo( rPasswordToModify );
if ( aModifyPasswordInfo.hasElements() && pSet)
pSet->Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, uno::Any( aModifyPasswordInfo ) ) );
}
return ERRCODE_NONE;
}
ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OUString const & aURL, SfxItemSet* pSet, const css::uno::Reference<css::awt::XWindow>& rParent)
{
uno::Reference<task::XInteractionHandler2> xInteractionHandler = task::InteractionHandler::createWithParent(::comphelper::getProcessComponentContext(), rParent);
// TODO: need a save way to distinguish MS filters from other filters
// for now MS-filters are the only alien filters that support encryption
const bool bMSType = !pCurrentFilter->IsOwnFormat();
// For OOXML we can use the standard password ("unlimited" characters)
// request, otherwise the MS limited password request is needed.
const bool bOOXML = bMSType && lclSupportsOOXMLEncryption( pCurrentFilter->GetFilterName());
const ::comphelper::DocPasswordRequestType eType = bMSType && !bOOXML ?
const auto eType = IsMSType(pCurrentFilter) && !IsOOXML(pCurrentFilter) ?
::comphelper::DocPasswordRequestType::MS :
::comphelper::DocPasswordRequestType::Standard;
::rtl::Reference< ::comphelper::DocPasswordRequest > pPasswordRequest( new ::comphelper::DocPasswordRequest( eType, css::task::PasswordRequestMode_PASSWORD_CREATE, aURL, bool( pCurrentFilter->GetFilterFlags() & SfxFilterFlags::PASSWORDTOMODIFY ) ) );
const bool bMSType = IsMSType(pCurrentFilter);
uno::Reference< css::task::XInteractionRequest > rRequest( pPasswordRequest );
do
{
@@ -2902,85 +2990,15 @@ ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter,
xBox->run();
}
while (true);
if ( pPasswordRequest->isPassword() )
{
if ( pPasswordRequest->getPassword().getLength() )
{
css::uno::Sequence< css::beans::NamedValue > aEncryptionData;
// TODO/LATER: The filters should show the password dialog themself in future
if ( bMSType )
{
if (bOOXML)
{
::comphelper::SequenceAsHashMap aHashData;
aHashData[ OUString( "OOXPassword" ) ] <<= pPasswordRequest->getPassword();
aHashData[ OUString( "CryptoType" ) ] <<= OUString( "Standard" );
aEncryptionData = aHashData.getAsConstNamedValueList();
}
else
{
uno::Sequence< sal_Int8 > aUniqueID = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 );
uno::Sequence< sal_Int8 > aEncryptionKey = ::comphelper::DocPasswordHelper::GenerateStd97Key( pPasswordRequest->getPassword(), aUniqueID );
if ( aEncryptionKey.hasElements() )
{
::comphelper::SequenceAsHashMap aHashData;
aHashData[ OUString( "STD97EncryptionKey" ) ] <<= aEncryptionKey;
aHashData[ OUString( "STD97UniqueID" ) ] <<= aUniqueID;
aEncryptionData = aHashData.getAsConstNamedValueList();
}
else
{
return ERRCODE_IO_NOTSUPPORTED;
}
}
}
// tdf#118639: We need ODF encryption data for autorecovery where password will already
// be unavailable, even for non-ODF documents, so append it here unconditionally
pSet->Put(SfxUnoAnyItem(
SID_ENCRYPTIONDATA,
uno::Any(comphelper::concatSequences(
aEncryptionData, comphelper::OStorageHelper::CreatePackageEncryptionData(
pPasswordRequest->getPassword())))));
}
if ( pPasswordRequest->getRecommendReadOnly() )
pSet->Put( SfxBoolItem( SID_RECOMMENDREADONLY, true ) );
if ( bMSType )
{
if (bOOXML)
{
uno::Sequence<beans::PropertyValue> aModifyPasswordInfo
= ::comphelper::DocPasswordHelper::GenerateNewModifyPasswordInfoOOXML(
pPasswordRequest->getPasswordToModify());
if (aModifyPasswordInfo.hasElements())
pSet->Put(
SfxUnoAnyItem(SID_MODIFYPASSWORDINFO, uno::Any(aModifyPasswordInfo)));
}
else
{
// the empty password has 0 as Hash
sal_Int32 nHash = SfxMedium::CreatePasswordToModifyHash(
pPasswordRequest->getPasswordToModify(),
pCurrentFilter->GetServiceName() == "com.sun.star.text.TextDocument");
if (nHash)
pSet->Put(SfxUnoAnyItem(SID_MODIFYPASSWORDINFO, uno::Any(nHash)));
}
}
else
{
uno::Sequence< beans::PropertyValue > aModifyPasswordInfo = ::comphelper::DocPasswordHelper::GenerateNewModifyPasswordInfo( pPasswordRequest->getPasswordToModify() );
if ( aModifyPasswordInfo.hasElements() )
pSet->Put( SfxUnoAnyItem( SID_MODIFYPASSWORDINFO, uno::Any( aModifyPasswordInfo ) ) );
}
}
else
if ( !pPasswordRequest->isPassword() )
return ERRCODE_ABORT;
return ERRCODE_NONE;
const auto result = SetPassword(pCurrentFilter, pSet, pPasswordRequest->getPassword(), pPasswordRequest->getPasswordToModify());
if ( result != ERRCODE_IO_NOTSUPPORTED && pPasswordRequest->getRecommendReadOnly() )
pSet->Put( SfxBoolItem( SID_RECOMMENDREADONLY, true ) );
return result;
}
OUString EncodeSpaces_Impl( const OUString& rSource )
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index ca93062..3750236 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -72,7 +72,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile)
|| rUIFile == u"sfx/ui/linefragment.ui" || rUIFile == u"sfx/ui/editdurationdialog.ui"
|| rUIFile == u"modules/swriter/ui/insertcaption.ui"
|| rUIFile == u"modules/swriter/ui/captionoptions.ui"
|| rUIFile == u"cui/ui/formatnumberdialog.ui"
|| rUIFile == u"cui/ui/formatnumberdialog.ui" || rUIFile == u"cui/ui/password.ui"
|| rUIFile == u"cui/ui/numberingformatpage.ui")
{
return true;