summaryrefslogtreecommitdiff
path: root/writerperfect
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-19 10:43:16 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-19 10:01:23 +0000
commite9af29ba8328cad918c5146e3cb1be0a72ebd791 (patch)
treebd90d8abd4bdcb3593410d845e0058745318a03f /writerperfect
parente94deb06391f516ee9c1fa019b3521e222a5615b (diff)
loplugin:unusedmethods in writerfilter to xmloff
Change-Id: If95890eff0f785111e8b511ac1d5481c6910f099 Reviewed-on: https://gerrit.libreoffice.org/25148 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'writerperfect')
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.cxx92
-rw-r--r--writerperfect/source/writer/WordPerfectImportFilter.hxx41
2 files changed, 0 insertions, 133 deletions
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.cxx b/writerperfect/source/writer/WordPerfectImportFilter.cxx
index 5b13c67dda95..82912eac4813 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.cxx
@@ -256,98 +256,6 @@ throw (RuntimeException, std::exception)
}
-WordPerfectImportFilterDialog::WordPerfectImportFilterDialog()
-{}
-
-WordPerfectImportFilterDialog::~WordPerfectImportFilterDialog()
-{
-}
-
-void SAL_CALL WordPerfectImportFilterDialog::setTitle(const OUString &)
-throw (RuntimeException, std::exception)
-{
-}
-
-sal_Int16 SAL_CALL WordPerfectImportFilterDialog::execute()
-throw (RuntimeException, std::exception)
-{
- WPXSvInputStream input(mxInputStream);
-
- OString aUtf8Passwd;
-
- libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&input);
-
- if (libwpd::WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence)
- {
- int unsuccessfulAttempts = 0;
- while (true)
- {
- ScopedVclPtrInstance< SfxPasswordDialog > aPasswdDlg(nullptr);
- aPasswdDlg->SetMinLen(0);
- if (!aPasswdDlg->Execute())
- return css::ui::dialogs::ExecutableDialogResults::CANCEL;
- msPassword = aPasswdDlg->GetPassword().getStr();
- aUtf8Passwd = OUStringToOString(msPassword, RTL_TEXTENCODING_UTF8);
- if (libwpd::WPD_PASSWORD_MATCH_OK == libwpd::WPDocument::verifyPassword(&input, aUtf8Passwd.getStr()))
- break;
- else
- unsuccessfulAttempts++;
- if (unsuccessfulAttempts == 3) // timeout after 3 password atempts
- return css::ui::dialogs::ExecutableDialogResults::CANCEL;
- }
- }
- return css::ui::dialogs::ExecutableDialogResults::OK;
-}
-
-Sequence<PropertyValue> SAL_CALL WordPerfectImportFilterDialog::getPropertyValues() throw(RuntimeException, std::exception)
-{
- Sequence<PropertyValue> aRet(1);
- PropertyValue *pArray = aRet.getArray();
-
- pArray[0].Name = "Password";
- pArray[0].Value <<= msPassword;
-
- return aRet;
-}
-
-void SAL_CALL WordPerfectImportFilterDialog::setPropertyValues(const Sequence<PropertyValue> &aProps)
-throw(css::beans::UnknownPropertyException, css::beans::PropertyVetoException,
- css::lang::IllegalArgumentException, css::lang::WrappedTargetException, RuntimeException, std::exception)
-{
- const PropertyValue *pPropArray = aProps.getConstArray();
- long nPropCount = aProps.getLength();
- for (long i = 0; i < nPropCount; i++)
- {
- const PropertyValue &rProp = pPropArray[i];
- OUString aPropName = rProp.Name;
-
- if (aPropName == "Password")
- rProp.Value >>= msPassword;
- else if (aPropName == "InputStream")
- rProp.Value >>= mxInputStream;
- }
-}
-
-// XServiceInfo
-OUString SAL_CALL WordPerfectImportFilterDialog::getImplementationName()
-throw (RuntimeException, std::exception)
-{
- return OUString("com.sun.star.comp.Writer.WordPerfectImportFilterDialog");
-}
-
-sal_Bool SAL_CALL WordPerfectImportFilterDialog::supportsService(const OUString &rServiceName)
-throw (RuntimeException, std::exception)
-{
- return cppu::supportsService(this, rServiceName);
-}
-
-Sequence< OUString > SAL_CALL WordPerfectImportFilterDialog::getSupportedServiceNames()
-throw (RuntimeException, std::exception)
-{
- Sequence < OUString > aRet { "com.sun.star.ui.dialogs.FilterOptionsDialog" };
- return aRet;
-}
-
extern "C"
SAL_DLLPUBLIC_EXPORT css::uno::XInterface *SAL_CALL
com_sun_star_comp_Writer_WordPerfectImportFilter_get_implementation(
diff --git a/writerperfect/source/writer/WordPerfectImportFilter.hxx b/writerperfect/source/writer/WordPerfectImportFilter.hxx
index a73885ec19fa..c4226026ae68 100644
--- a/writerperfect/source/writer/WordPerfectImportFilter.hxx
+++ b/writerperfect/source/writer/WordPerfectImportFilter.hxx
@@ -89,47 +89,6 @@ SAL_CALL WordPerfectImportFilter_createInstance(const css::uno::Reference< css::
throw (css::uno::Exception);
-class WordPerfectImportFilterDialog : public cppu::WeakImplHelper <
- css::ui::dialogs::XExecutableDialog,
- css::lang::XServiceInfo,
- css::beans::XPropertyAccess
- >
-{
- OUString msPassword;
- css::uno::Reference< css::io::XInputStream > mxInputStream;
-
- virtual ~WordPerfectImportFilterDialog();
-
- // XExecutableDialog
- virtual void SAL_CALL setTitle(const OUString &aTitle)
- throw (css::uno::RuntimeException, std::exception) override;
- virtual sal_Int16 SAL_CALL execute()
- throw (css::uno::RuntimeException, std::exception) override;
-
- // XServiceInfo
- virtual OUString SAL_CALL getImplementationName()
- throw (css::uno::RuntimeException, std::exception) override;
- virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName)
- throw (css::uno::RuntimeException, std::exception) override;
- virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
- throw (css::uno::RuntimeException, std::exception) override;
-
- // XPropertyAccess
- virtual css::uno::Sequence< css::beans::PropertyValue >
- SAL_CALL getPropertyValues() throw (css::uno::RuntimeException, std::exception) override;
- virtual void SAL_CALL setPropertyValues(const css::uno::Sequence<
- css::beans::PropertyValue >& aProps)
- throw (css::beans::UnknownPropertyException,
- css::beans::PropertyVetoException,
- css::lang::IllegalArgumentException,
- css::lang::WrappedTargetException,
- css::uno::RuntimeException, std::exception) override;
-
-public:
- explicit WordPerfectImportFilterDialog();
-
-};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */