summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-11-12 15:40:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-11-14 10:14:57 +0100
commitb20d87f466beb38a5855350d59707f52828b9688 (patch)
tree8e4a328e3b1fff6ec3a9bd40be8fcdbc0b7e0c94 /sdext
parente0cbd673c23b7975cb5bb2bcb34b2ff1be58c974 (diff)
-Werror,-Wunused-member-function
...the whole ChooserDialogHandler class is unused since before bdc71b3e4112b5c83a6aec61403981fcdd156138 "remove non-compiled code" removed its sole, #if'ed out use. Change-Id: If94db1c98074132952dd204864a478e1e12d455d
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/filterdet.cxx130
1 files changed, 0 insertions, 130 deletions
diff --git a/sdext/source/pdfimport/filterdet.cxx b/sdext/source/pdfimport/filterdet.cxx
index 09c35e5de51e..69ba797eba8b 100644
--- a/sdext/source/pdfimport/filterdet.cxx
+++ b/sdext/source/pdfimport/filterdet.cxx
@@ -26,13 +26,6 @@
#include <osl/thread.h>
#include <rtl/digest.h>
#include <rtl/ref.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/awt/XWindow.hpp>
-#include <com/sun/star/awt/XListBox.hpp>
-#include <com/sun/star/awt/XDialogEventHandler.hpp>
-#include <com/sun/star/awt/XDialogProvider2.hpp>
-#include <com/sun/star/awt/XControlContainer.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/io/XStream.hpp>
@@ -49,129 +42,6 @@ namespace pdfi
// TODO(T3): locking/thread safety
-namespace {
- typedef ::cppu::WeakComponentImplHelper1<
- com::sun::star::awt::XDialogEventHandler > ChooserDialogHandlerBase;
- class ChooserDialogHandler : private cppu::BaseMutex,
- public ChooserDialogHandlerBase
- {
- uno::Reference<awt::XListBox> m_xListbox;
- uno::Reference<awt::XWindow> m_xWriterText;
- uno::Reference<awt::XWindow> m_xDrawText;
- uno::Reference<awt::XWindow> m_xImpressText;
-
- enum{ DRAW_INDEX=0, IMPRESS_INDEX=1, WRITER_INDEX=2 };
- void selectionChanged( sal_Int32 nIndex ) const
- {
- sal_Bool bWriterState(sal_False);
- sal_Bool bDrawState(sal_False);
- sal_Bool bImpressState(sal_False);
- switch(nIndex)
- {
- default:
- OSL_FAIL("Unexpected case!");
- break;
- case DRAW_INDEX:
- bDrawState=sal_True;
- break;
- case IMPRESS_INDEX:
- bImpressState=sal_True;
- break;
- case WRITER_INDEX:
- bWriterState=sal_True;
- break;
- }
- m_xWriterText->setVisible(bWriterState);
- m_xDrawText->setVisible(bDrawState);
- m_xImpressText->setVisible(bImpressState);
- }
- public:
- ChooserDialogHandler() :
- ChooserDialogHandlerBase(m_aMutex),
- m_xListbox(),
- m_xWriterText(),
- m_xDrawText(),
- m_xImpressText()
- {}
-
- void initControls( const uno::Reference<awt::XControlContainer>& xControls,
- const OUString& rFilename )
- {
- m_xListbox.set(xControls->getControl(
- OUString( "ListBox" )),
- uno::UNO_QUERY_THROW );
- m_xWriterText.set(xControls->getControl(
- OUString( "InfoWriter" )),
- uno::UNO_QUERY_THROW );
- m_xImpressText.set(xControls->getControl(
- OUString( "InfoImpress" )),
- uno::UNO_QUERY_THROW );
- m_xDrawText.set(xControls->getControl(
- OUString( "InfoDraw" )),
- uno::UNO_QUERY_THROW );
-
- uno::Reference<awt::XWindow> xControl;
- xControl.set(xControls->getControl(
- OUString( "ListBoxWriter" )),
- uno::UNO_QUERY_THROW );
- xControl->setVisible(sal_False);
- xControl.set(xControls->getControl(
- OUString( "ListBoxImpress" )),
- uno::UNO_QUERY_THROW );
- xControl->setVisible(sal_False);
- xControl.set(xControls->getControl(
- OUString( "ListBoxDraw" )),
- uno::UNO_QUERY_THROW );
- xControl->setVisible(sal_False);
- uno::Reference<beans::XPropertySet> xPropSet(
- xControls->getControl(
- OUString( "ComboLabel" ))->getModel(),
- uno::UNO_QUERY_THROW );
- OUString aFilename( rFilename.copy(rFilename.lastIndexOf('/')+1) );
- OUString aLabel;
- xPropSet->getPropertyValue("Label") >>= aLabel;
- const char pFileName[] = "%FILENAME";
- aLabel = aLabel.replaceAt(
- aLabel.indexOfAsciiL(pFileName,SAL_N_ELEMENTS(pFileName)-1),
- SAL_N_ELEMENTS(pFileName)-1,
- aFilename );
- xPropSet->setPropertyValue("Label",
- uno::makeAny(aLabel));
-
- uno::Sequence<OUString> aListboxItems(3);
- aListboxItems[DRAW_INDEX] = "Drawing";
- aListboxItems[IMPRESS_INDEX] = "Presentation";
- aListboxItems[WRITER_INDEX] = "Text Document";
-
- m_xListbox->addItems(aListboxItems,0);
- m_xListbox->selectItemPos(0,sal_True);
- selectionChanged(0);
- }
-
- sal_Int32 getSelectedItem() const
- {
- return m_xListbox->getSelectedItemPos();
- }
-
- virtual ::sal_Bool SAL_CALL callHandlerMethod( const uno::Reference< awt::XDialog >& /*xDialog*/,
- const uno::Any& /*EventObject*/,
- const OUString& MethodName ) throw (lang::WrappedTargetException, uno::RuntimeException)
- {
- (void)MethodName;
- OSL_ENSURE( MethodName.equalsAscii("SelectionChanged"), "Invalid event name" );
- selectionChanged(getSelectedItem());
- return sal_True;
- }
-
- virtual uno::Sequence< OUString > SAL_CALL getSupportedMethodNames( ) throw (uno::RuntimeException)
- {
- uno::Sequence< OUString > aMethods(1);
- aMethods[0] = "SelectionChanged";
- return aMethods;
- }
- };
-}
-
class FileEmitContext : public pdfparse::EmitContext
{
private: