[Libreoffice-commits] core.git: connectivity/source include/connectivity include/sfx2 include/sot include/svx sfx2/source sot/source svx/source sw/inc sw/source unusedcode.easy
Caolán McNamara
caolanm at redhat.com
Fri May 8 01:48:41 PDT 2015
connectivity/source/commontools/dbtools.cxx | 5 -
include/connectivity/dbtools.hxx | 2
include/sfx2/mnuitem.hxx | 24 +-----
include/sot/stg.hxx | 2
include/svx/dlgctrl.hxx | 1
sfx2/source/menu/mnuitem.cxx | 93 --------------------------
sfx2/source/sidebar/Deck.cxx | 5 -
sfx2/source/sidebar/Deck.hxx | 1
sfx2/source/sidebar/SidebarController.cxx | 1
sot/source/sdstor/ucbstorage.cxx | 97 ----------------------------
svx/source/dialog/dlgctrl.cxx | 17 ----
sw/inc/unotxdoc.hxx | 1
sw/source/uibase/uno/unotxdoc.cxx | 9 --
unusedcode.easy | 3
14 files changed, 10 insertions(+), 251 deletions(-)
New commits:
commit efdd215124df0ab98a33525ac01a9d8ff4a542d4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 8 09:21:42 2015 +0100
callcatcher: update unused code
Change-Id: I8563922204d3ec93bf138cbd1aaba620c0215bf7
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index adbb61f..f49bdc6 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -737,11 +737,6 @@ Sequence< OUString > getFieldNamesByCommandDescriptor( const Reference< XConnect
return aNames;
}
-SQLContext prependContextInfo(const SQLException& _rException, const Reference< XInterface >& _rxContext, const OUString& _rContextDescription, const OUString& _rContextDetails)
-{
- return SQLContext( _rContextDescription, _rxContext, OUString(), 0, makeAny( _rException ), _rContextDetails );
-}
-
SQLException prependErrorInfo( const SQLException& _rChainedException, const Reference< XInterface >& _rxContext,
const OUString& _rAdditionalError, const StandardSQLState _eSQLState, const sal_Int32 _nErrorCode )
{
diff --git a/include/connectivity/dbtools.hxx b/include/connectivity/dbtools.hxx
index 77ed4fd..02b3f06 100644
--- a/include/connectivity/dbtools.hxx
+++ b/include/connectivity/dbtools.hxx
@@ -302,8 +302,6 @@ namespace dbtools
/** create a new ::com::sun::star::sdbc::SQLContext, fill it with the given descriptions and the given source,
and <i>append</i> _rException (i.e. put it into the NextException member of the SQLContext).
*/
- OOO_DLLPUBLIC_DBTOOLS ::com::sun::star::sdb::SQLContext prependContextInfo(const ::com::sun::star::sdbc::SQLException& _rException, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContext, const OUString& _rContextDescription, const OUString& _rContextDetails );
-
OOO_DLLPUBLIC_DBTOOLS
::com::sun::star::sdbc::SQLException prependErrorInfo(
const ::com::sun::star::sdbc::SQLException& _rChainedException,
diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx
index 0d40854..8e5e0cd 100644
--- a/include/sfx2/mnuitem.hxx
+++ b/include/sfx2/mnuitem.hxx
@@ -120,27 +120,13 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
{ SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \
Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
-class SfxAppMenuControl_Impl : public SfxMenuControl
+struct ExecuteInfo
{
- PopupMenu* pMenu;
- OUString m_sIconTheme;
- bool m_bShowMenuImages;
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
+ ::com::sun::star::util::URL aTargetURL;
+ ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
-protected:
- DECL_LINK_TYPED( Activate, Menu *, bool ); // Needed to support high contrast images
-
-public:
- SfxAppMenuControl_Impl( sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings );
- virtual ~SfxAppMenuControl_Impl();
-
- struct ExecuteInfo
- {
- ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > xDispatch;
- ::com::sun::star::util::URL aTargetURL;
- ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aArgs;
- };
-
- DECL_STATIC_LINK( SfxAppMenuControl_Impl, ExecuteHdl_Impl, ExecuteInfo* );
+ DECL_STATIC_LINK( ExecuteInfo, ExecuteHdl_Impl, ExecuteInfo* );
};
#endif
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index a6be7ce..5f4ba36 100644
--- a/include/sot/stg.hxx
+++ b/include/sot/stg.hxx
@@ -284,9 +284,7 @@ protected:
virtual ~UCBStorage();
public:
static bool IsStorageFile( SvStream* );
- static bool IsDiskSpannedFile( SvStream* );
static OUString GetLinkedFile( SvStream& );
- static OUString CreateLinkFile( const OUString& rName );
UCBStorage( const ::ucbhelper::Content& rContent, const OUString& rName, StreamMode nMode, bool bDirect = true, bool bIsRoot = true );
UCBStorage( const OUString& rName,
diff --git a/include/svx/dlgctrl.hxx b/include/svx/dlgctrl.hxx
index 076f4c1..1c8e71a 100644
--- a/include/svx/dlgctrl.hxx
+++ b/include/svx/dlgctrl.hxx
@@ -303,7 +303,6 @@ private:
public:
FillAttrLB( vcl::Window* pParent, WinBits aWB );
- void Fill( const XColorListRef &pList );
void Fill( const XHatchListRef &pList );
void Fill( const XGradientListRef &pList );
void Fill( const XBitmapListRef &pList );
diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx
index 7c56da1..c3daef0 100644
--- a/sfx2/source/menu/mnuitem.cxx
+++ b/sfx2/source/menu/mnuitem.cxx
@@ -301,93 +301,6 @@ PopupMenu* SfxMenuControl::GetPopup () const
sal_IntPtr Select_Impl( void* pHdl, void* pVoid );
-SfxAppMenuControl_Impl::SfxAppMenuControl_Impl(
- sal_uInt16 nPos, Menu& rMenu, SfxBindings& rBindings )
- : SfxMenuControl( nPos, rBindings ), pMenu(0)
-{
- // Determine the current background color setting for menus
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- m_sIconTheme = rSettings.DetermineIconTheme();
- m_bShowMenuImages = rSettings.GetUseImagesInMenus();
-
- ::framework::MenuConfiguration aConf( ::comphelper::getProcessComponentContext() );
- Reference<com::sun::star::frame::XFrame> aXFrame( GetBindings().GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
- pMenu = aConf.CreateBookmarkMenu( aXFrame, GetId() == SID_NEWDOCDIRECT ? OUString(BOOKMARK_NEWMENU) : OUString(BOOKMARK_WIZARDMENU) );
- if( pMenu )
- {
- pMenu->SetSelectHdl( Link<>( &(this->GetBindings()), Select_Impl ) );
- pMenu->SetActivateHdl( LINK(this, SfxAppMenuControl_Impl, Activate) );
- rMenu.SetPopupMenu( nPos, pMenu );
- }
-}
-
-SfxAppMenuControl_Impl::~SfxAppMenuControl_Impl()
-{
- delete pMenu;
-}
-
-IMPL_LINK_TYPED( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu, bool )
-{
- if ( pActMenu )
- {
- const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
- OUString sIconTheme = rSettings.DetermineIconTheme();
- bool bShowMenuImages = rSettings.GetUseImagesInMenus();
-
- if (( sIconTheme != m_sIconTheme ) ||
- ( bShowMenuImages != m_bShowMenuImages ))
- {
- m_sIconTheme = sIconTheme;
- m_bShowMenuImages = bShowMenuImages;
-
- sal_uInt16 nCount = pActMenu->GetItemCount();
- for ( sal_uInt16 nSVPos = 0; nSVPos < nCount; nSVPos++ )
- {
- sal_uInt16 nItemId = pActMenu->GetItemId( nSVPos );
- if ( pActMenu->GetItemType( nSVPos ) != MenuItemType::SEPARATOR )
- {
- if ( bShowMenuImages )
- {
- bool bImageSet = false;
- OUString aImageId;
- ::framework::MenuAttributes* pMenuAttributes =
- reinterpret_cast< ::framework::MenuAttributes*>(pMenu->GetUserValue( nItemId ));
-
- if ( pMenuAttributes )
- aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes
-
- if ( aImageId.getLength() > 0 )
- {
- Reference< ::com::sun::star::frame::XFrame > xFrame;
- Image aImage = GetImage( xFrame, aImageId, false );
- if ( !!aImage )
- {
- bImageSet = true;
- pActMenu->SetItemImage( nItemId, aImage );
- }
- }
-
- OUString aCmd( pActMenu->GetItemCommand( nItemId ) );
- if ( !bImageSet && !aCmd.isEmpty() )
- {
- Image aImage = SvFileInformationManager::GetImage(
- INetURLObject(aCmd), false );
- if ( !!aImage )
- pActMenu->SetItemImage( nItemId, aImage );
- }
- }
- else
- pActMenu->SetItemImage( nItemId, Image() );
- }
- }
- }
-
- return true;
- }
-
- return false;
-}
-
SfxUnoMenuControl* SfxMenuControl::CreateControl( const OUString& rCmd,
sal_uInt16 nId, Menu& rMenu, const OUString& sItemText,
SfxBindings& rBindings, SfxVirtualMenu* pVirt)
@@ -447,17 +360,17 @@ sal_IntPtr Select_Impl( void* /*pHdl*/, void* pVoid )
if ( xDisp.is() )
{
- SfxAppMenuControl_Impl::ExecuteInfo* pExecuteInfo = new SfxAppMenuControl_Impl::ExecuteInfo;
+ ExecuteInfo* pExecuteInfo = new ExecuteInfo;
pExecuteInfo->xDispatch = xDisp;
pExecuteInfo->aTargetURL = aTargetURL;
pExecuteInfo->aArgs = Sequence< PropertyValue >();
- Application::PostUserEvent( LINK( 0, SfxAppMenuControl_Impl, ExecuteHdl_Impl), pExecuteInfo );
+ Application::PostUserEvent( LINK( 0, ExecuteInfo, ExecuteHdl_Impl), pExecuteInfo );
}
return sal_IntPtr(true);
}
-IMPL_STATIC_LINK_NOINSTANCE( SfxAppMenuControl_Impl, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo )
+IMPL_STATIC_LINK_NOINSTANCE( ExecuteInfo, ExecuteHdl_Impl, ExecuteInfo*, pExecuteInfo )
{
pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, pExecuteInfo->aArgs );
delete pExecuteInfo;
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 633def0..fe68160 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -302,11 +302,6 @@ void Deck::PrintWindowSubTree (vcl::Window* pRoot, int nIndentation)
PrintWindowSubTree(pRoot->GetChild(nIndex), nIndentation+1);
}
-void Deck::PrintWindowTree()
-{
- PrintWindowSubTree(this, 0);
-}
-
IMPL_LINK(Deck, HandleVerticalScrollBarChange,void*, EMPTYARG)
{
const sal_Int32 nYOffset (-mpVerticalScrollBar->GetThumbPos());
diff --git a/sfx2/source/sidebar/Deck.hxx b/sfx2/source/sidebar/Deck.hxx
index 9da5a25..5db1729 100644
--- a/sfx2/source/sidebar/Deck.hxx
+++ b/sfx2/source/sidebar/Deck.hxx
@@ -67,7 +67,6 @@ public:
virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
virtual bool Notify (NotifyEvent& rEvent) SAL_OVERRIDE;
- void PrintWindowTree();
static void PrintWindowSubTree (vcl::Window* pRoot, int nIndentation);
sal_Int32 GetMinimalWidth() const { return mnMinimalWidth; }
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 690d6f9..d71718e 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -204,7 +204,6 @@ void SAL_CALL SidebarController::disposing()
if (mpCurrentDeck)
{
mpCurrentDeck.disposeAndClear();
-// mpCurrentDeck->PrintWindowTree();
}
mpTabBar.disposeAndClear();
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 1a4eb96..3f10601 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -3101,32 +3101,6 @@ bool UCBStorage::IsStorageFile( SvStream* pFile )
return bRet;
}
-bool UCBStorage::IsDiskSpannedFile( SvStream* pFile )
-{
- if ( !pFile )
- return false;
-
- sal_uLong nPos = pFile->Tell();
- pFile->Seek( STREAM_SEEK_TO_END );
- if ( !pFile->Tell() )
- return false;
-
- pFile->Seek(0);
- sal_uInt32 nBytes;
- pFile->ReadUInt32( nBytes );
-
- // disk spanned file have an additional header in front of the usual one
- bool bRet = ( nBytes == 0x08074b50 );
- if ( bRet )
- {
- pFile->ReadUInt32( nBytes );
- bRet = ( nBytes == 0x04034b50 );
- }
-
- pFile->Seek( nPos );
- return bRet;
-}
-
OUString UCBStorage::GetLinkedFile( SvStream &rStream )
{
OUString aString;
@@ -3151,75 +3125,4 @@ OUString UCBStorage::GetLinkedFile( SvStream &rStream )
return aString;
}
-OUString UCBStorage::CreateLinkFile( const OUString& rName )
-{
- // create a stream to write the link file - use a temp file, because it may be no file content
- INetURLObject aFolderObj( rName );
- OUString aName = aFolderObj.GetName();
- aFolderObj.removeSegment();
- OUString aFolderURL( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ) );
- boost::scoped_ptr< ::utl::TempFile> pTempFile(new ::utl::TempFile( &aFolderURL ));
-
- // get the stream from the temp file
- SvStream* pStream = pTempFile->GetStream( STREAM_STD_READWRITE | StreamMode::TRUNC );
-
- // write header
- pStream->WriteUInt32( 0x04034b50 );
-
- // assemble a new folder name in the destination folder
- INetURLObject aObj( rName );
- OUString aTmpName = aObj.GetName();
- OUString aTitle = "content." + aTmpName;
-
- // create a folder and store its URL
- Content aFolder( aFolderURL, Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- Content aNewFolder;
- bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
- if ( !bRet )
- {
- aFolderObj.insertName( aTitle );
- if ( ::utl::UCBContentHelper::Exists( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
- {
- // Hack, because already existing files give the same CommandAbortedException as any other error !
- // append a number until the name can be used for a new folder
- aTitle += ".";
- for ( sal_Int32 i=0; !bRet; i++ )
- {
- OUString aTmp = aTitle + OUString::number( i );
- bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTmp, aNewFolder );
- if ( bRet )
- aTitle = aTmp;
- else
- {
- aFolderObj.SetName( aTmp );
- if ( !::utl::UCBContentHelper::Exists( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ) ) )
- // Hack, because already existing files give the same CommandAbortedException as any other error !
- break;
- }
- }
- }
- }
-
- if ( bRet )
- {
- // get the URL
- aObj.SetName( aTitle );
- OUString aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
-
- // store it as key/value pair
- OUString aLink = "ContentURL=" + aURL;
- write_uInt16_lenPrefixed_uInt8s_FromOUString(*pStream, aLink, RTL_TEXTENCODING_UTF8);
- pStream->Flush();
-
- // move the stream to its desired location
- Content aSource( pTempFile->GetURL(), Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- pTempFile.reset();
- aFolder.transferContent( aSource, InsertOperation_MOVE, aName, NameClash::OVERWRITE );
- return aURL;
- }
-
- pTempFile->EnableKillingFile( true );
- return OUString();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 94e6aaa..7f97061 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1187,23 +1187,6 @@ void ColorLB::Modify( const XColorEntry& rEntry, sal_Int32 nPos )
InsertEntry( rEntry.GetColor(), rEntry.GetName(), nPos );
}
-// Fills the Listbox with color and strings
-
-void FillAttrLB::Fill( const XColorListRef &pColorTab )
-{
- long nCount = pColorTab->Count();
- SetUpdateMode( false );
-
- for( long i = 0; i < nCount; i++ )
- {
- XColorEntry* pEntry = pColorTab->GetColor( i );
- InsertEntry( pEntry->GetColor(), pEntry->GetName() );
- }
-
- AdaptDropDownLineCountToMaximum();
- SetUpdateMode( true );
-}
-
// Fills the listbox (provisional) with strings
HatchingLB::HatchingLB( vcl::Window* pParent, WinBits nWinStyle)
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 7d80339..b7fb3d0 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -438,7 +438,6 @@ public:
sal_Int32& nResult,
css::uno::Reference< css::uno::XInterface > xLastResult);
- SwXDrawPage* GetDrawPage();
SwDocShell* GetDocShell() {return pDocShell;}
void * SAL_CALL operator new( size_t ) throw();
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 18308a5..59c5230 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -1389,15 +1389,6 @@ Reference< drawing::XDrawPage > SwXTextDocument::getDrawPage() throw( RuntimeEx
return *pxXDrawPage;
}
-SwXDrawPage* SwXTextDocument::GetDrawPage()
-{
- if(!IsValid())
- return 0;
- if(!pDrawPage)
- getDrawPage();
- return pDrawPage;
-}
-
void SwXTextDocument::Invalidate()
{
bObjectValid = false;
diff --git a/unusedcode.easy b/unusedcode.easy
index 2ea49e2..282a1dd 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -1,6 +1,8 @@
BigInt::BigInt(unsigned int)
BitmapFilterStackBlur::filter(BitmapEx&)
+Color::ApplyTintOrShade(short)
FontCharMap::GetDefaultMap(bool)
+NotifyEvent::NotifyEvent()
OpenGLContext::init(_XDisplay*, unsigned long, unsigned int, unsigned int, int)
OpenGLContext::renderToFile()
OpenGLContext::requestSingleBufferedRendering()
@@ -97,7 +99,6 @@ sc::FormulaGroupAreaListener::getRange() const
sc::FormulaGroupAreaListener::getTopCellPos() const
sd::LeftDrawPaneShell::RegisterInterface(SfxModule*)
sd::LeftImpressPaneShell::RegisterInterface(SfxModule*)
-std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >::_Rb_tree(std::_Rb_tree<rtl::OUString, std::pair<rtl::OUString const, (anonymous namespace)::TemplateId>, std::_Select1st<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> >, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, (anonymous namespace)::TemplateId> > >&&)
std::__cxx1998::vector<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread>, std::allocator<rtl::Reference<oox::xls::(anonymous namespace)::WorkerThread> > >::reserve(unsigned long)
vcl::IsWindowSystemAvailable()
vcl::MapChar(vcl::_TrueTypeFont*, unsigned short, bool)
More information about the Libreoffice-commits
mailing list