summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-10 09:31:46 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-10 09:31:46 +0200
commit1d25e1de0b9498e469cb052b2d86bf7f7ae6adae (patch)
treeaadf57192d9f7fb1c38c9fb7f8f5099b04fe17cf /sfx2/source/dialog
parent4f9674beaaa51b85d8405cf5d125ca19d55c1b32 (diff)
Clean up function declarations and some unused functions
Change-Id: I9d6e9df0b686c61597aaa0e194ab321445671a20
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx3
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx33
-rw-r--r--sfx2/source/dialog/mailmodel.cxx24
-rw-r--r--sfx2/source/dialog/tabdlg.cxx52
-rw-r--r--sfx2/source/dialog/taskpane.cxx7
-rw-r--r--sfx2/source/dialog/versdlg.cxx35
7 files changed, 5 insertions, 153 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 970379e83d91..d18d0a4ecbd4 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -88,9 +88,6 @@ struct CustomProperty
CustomProperty( const OUString& sName,
const com::sun::star::uno::Any& rValue ) :
m_sName( sName ), m_aValue( rValue ) {}
-
- inline bool operator==( const CustomProperty& rProp )
- { return m_sName.equals( rProp.m_sName ) && m_aValue == rProp.m_aValue; }
};
static
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 9955c4249a25..68bc13ea63f5 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -53,10 +53,6 @@
using namespace ::com::sun::star;
-// implemented in 'sfx2/source/appl/childwin.cxx'
-extern bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize );
-extern bool GetSplitSizeFromString( const OUString& rStr, Size& rSize );
-
// If you want to change the number you also have to:
// - Add new slot ids to sfxsids.hrc
// - Add new slots to frmslots.sdi
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 8e1eb0c7124d..c04ae90ecd13 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1131,39 +1131,6 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
::comphelper::disposeComponent( mxFileDlg );
}
-#define nMagic -1
-
-class PickerThread_Impl : public ::osl::Thread
-{
- uno::Reference < XFilePicker > mxPicker;
- ::osl::Mutex maMutex;
- virtual void SAL_CALL run() SAL_OVERRIDE;
- sal_Int16 mnRet;
-public:
- PickerThread_Impl( const uno::Reference < XFilePicker >& rPicker )
- : mxPicker( rPicker ), mnRet(nMagic) {}
-
- sal_Int16 GetReturnValue()
- { ::osl::MutexGuard aGuard( maMutex ); return mnRet; }
-
- void SetReturnValue( sal_Int16 aRetValue )
- { ::osl::MutexGuard aGuard( maMutex ); mnRet = aRetValue; }
-};
-
-void SAL_CALL PickerThread_Impl::run()
-{
- try
- {
- sal_Int16 n = mxPicker->execute();
- SetReturnValue( n );
- }
- catch( const RuntimeException& )
- {
- SetReturnValue( ExecutableDialogResults::CANCEL );
- SAL_WARN( "sfx.dialog", "RuntimeException caught" );
- }
-}
-
void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
{
DBG_ASSERT( _pControlId && _pHelpId, "FileDialogHelper_Impl::setControlHelpIds: invalid array pointers!" );
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 65b558f32b4b..fcf077e47ec8 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -130,30 +130,6 @@ void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) t
static const char PDF_DOCUMENT_TYPE[] = "pdf_Portable_Document_Format";
-bool HasDocumentValidSignature( const css::uno::Reference< css::frame::XModel >& xModel )
-{
- try
- {
- css::uno::Reference< css::beans::XPropertySet > xPropSet( xModel, css::uno::UNO_QUERY );
- if ( xPropSet.is() )
- {
- Any a = xPropSet->getPropertyValue("HasValidSignatures");
- bool bReturn;
- if ( a >>= bReturn )
- return bReturn;
- }
- }
- catch ( css::uno::RuntimeException& )
- {
- throw;
- }
- catch ( css::uno::Exception& )
- {
- }
-
- return false;
-}
-
SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
uno::Reference< lang::XMultiServiceFactory > xSMGR,
uno::Reference< frame::XModel > xModel,
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index dec86be638a4..044241df4ef8 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -109,52 +109,6 @@ SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersi
return NULL;
}
-class SfxTabDialogController : public SfxControllerItem
-{
- SfxTabDialog* pDialog;
- const SfxItemSet* pSet;
-public:
- SfxTabDialogController( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
- : SfxControllerItem( nSlotId, rBindings )
- , pDialog( pDlg )
- , pSet( NULL )
- {}
-
- virtual ~SfxTabDialogController();
-
- virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
-};
-
-SfxTabDialogController::~SfxTabDialogController()
-{
- delete pSet;
-}
-
-void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
-{
- const SfxSetItem* pSetItem = PTR_CAST( SfxSetItem, pState );
- if ( pSetItem )
- {
- pSet = pDialog->pSet = pSetItem->GetItemSet().Clone();
- bool bDialogStarted = false;
- for ( sal_uInt16 n=0; n<pDialog->m_pTabCtrl->GetPageCount(); n++ )
- {
- sal_uInt16 nPageId = pDialog->m_pTabCtrl->GetPageId( n );
- SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pDialog->m_pTabCtrl->GetTabPage( nPageId ));
- if ( pTabPage )
- {
- pTabPage->Reset( pSetItem->GetItemSet() );
- bDialogStarted = true;
- }
- }
-
- if ( bDialogStarted )
- pDialog->Show();
- }
- else
- pDialog->Hide();
-}
-
typedef std::vector<Data_Impl*> SfxTabDlgData_Impl;
struct TabDlg_Impl
@@ -164,20 +118,16 @@ struct TabDlg_Impl
bHideResetBtn : 1;
SfxTabDlgData_Impl aData;
- SfxTabDialogController* pController;
-
TabDlg_Impl( sal_uInt8 nCnt ) :
bModified ( false ),
bModal ( true ),
- bHideResetBtn ( false ),
- pController ( NULL )
+ bHideResetBtn ( false )
{
aData.reserve( nCnt );
}
~TabDlg_Impl()
{
- delete pController;
}
};
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index a9378e28a4cc..7ea34759c107 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -525,7 +525,6 @@ namespace sfx2
static bool ModuleHasToolPanels( const OUString& i_rModuleIdentifier );
::svt::ToolPanelDeck& GetPanelDeck() { return m_aPanelDeck; }
- const ::svt::ToolPanelDeck& GetPanelDeck() const { return m_aPanelDeck; }
::boost::optional< size_t >
GetPanelPos( const OUString& i_rResourceURL );
@@ -828,12 +827,6 @@ namespace sfx2
::svt::PToolPanel pPanel;
bool bHidden;
- PanelDescriptor()
- :pPanel()
- ,bHidden( false )
- {
- }
-
PanelDescriptor( const ::svt::PToolPanel& i_rPanel )
:pPanel( i_rPanel )
,bHidden( false )
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 3ed9680e2334..da5f84d3e04c 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
#include <svl/eitem.hxx>
@@ -58,39 +61,21 @@ struct SfxVersionInfo
DateTime aCreationDate;
SfxVersionInfo();
- SfxVersionInfo( const SfxVersionInfo& rInfo )
- : aCreationDate( DateTime::EMPTY )
- { *this = rInfo; }
-
- SfxVersionInfo& operator=( const SfxVersionInfo &rInfo )
- {
- aName = rInfo.aName;
- aComment = rInfo.aComment;
- aAuthor = rInfo.aAuthor;
- aCreationDate = rInfo.aCreationDate;
- return *this;
- }
};
typedef vector< SfxVersionInfo* > _SfxVersionTable;
-class SfxVersionTableDtor
+class SfxVersionTableDtor: private boost::noncopyable
{
private:
_SfxVersionTable aTableList;
public:
- SfxVersionTableDtor( const SfxVersionTableDtor &rCpy )
- { *this = rCpy; }
-
SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
~SfxVersionTableDtor()
{ DelDtor(); }
- SfxVersionTableDtor& operator=( const SfxVersionTableDtor &rCpy );
void DelDtor();
- SvStream& Read( SvStream & );
- SvStream& Write( SvStream & ) const;
size_t size() const
{ return aTableList.size(); }
@@ -140,18 +125,6 @@ void SfxVersionTableDtor::DelDtor()
aTableList.clear();
}
-SfxVersionTableDtor& SfxVersionTableDtor::operator=( const SfxVersionTableDtor& rTbl )
-{
- DelDtor();
- for ( size_t i = 0, n = rTbl.size(); i < n; ++i )
- {
- SfxVersionInfo* pNew = new SfxVersionInfo( *(rTbl.at( i )) );
- aTableList.push_back( pNew );
- }
- return *this;
-}
-
-
SfxVersionInfo::SfxVersionInfo()
: aCreationDate( DateTime::EMPTY )
{