diff options
30 files changed, 53 insertions, 387 deletions
diff --git a/bin/findunusedcode b/bin/findunusedcode index d1ff0f9a92ab..5b2205602d75 100755 --- a/bin/findunusedcode +++ b/bin/findunusedcode @@ -57,6 +57,7 @@ grep ::.*\( unusedcode.all \ | grep -v ^Dde \ | grep -v ^graphite2:: \ | grep -v ^jvmaccess:: \ + | grep -v ^Json:: \ | grep -v ^libcdr:: \ | grep -v ^libcmis:: \ | grep -v ^libgltf:: \ diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx index e35cc45c3fde..0dd63c3537c3 100644 --- a/idl/inc/basobj.hxx +++ b/idl/inc/basobj.hxx @@ -43,7 +43,6 @@ public: SvMetaObject(); static void WriteTab( SvStream & rOutStm, sal_uInt16 nTab ); - static bool TestAndSeekSpaceOnly( SvStream &, sal_uLong nBegPos ); static void Back2Delemitter( SvStream & ); static void WriteStars( SvStream & ); diff --git a/idl/inc/bastype.hxx b/idl/inc/bastype.hxx index e8da2c4b5af9..2252f9ad6d1f 100644 --- a/idl/inc/bastype.hxx +++ b/idl/inc/bastype.hxx @@ -65,7 +65,6 @@ public: friend SvStream& operator >> (SvStream &, SvBOOL &); bool ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ); - OString GetSvIdlString( SvStringHashEntry * pName ); }; diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx index aaecabe82d0c..4836138e8a27 100644 --- a/idl/inc/hash.hxx +++ b/idl/inc/hash.hxx @@ -114,8 +114,6 @@ public: SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string SvStringHashEntry & operator []( sal_uInt32 nPos ) const { return pEntries[ nPos ]; } - - void FillHashList( SvStringHashList * rList ) const; }; #endif // INCLUDED_IDL_INC_HASH_HXX diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx index 92c11d6942ec..a82493f56c97 100644 --- a/idl/inc/module.hxx +++ b/idl/inc/module.hxx @@ -54,7 +54,6 @@ protected: virtual void ReadContextSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; public: TYPEINFO_OVERRIDE(); - SvMetaModule(); const OUString & GetIdlFileName() const { return aIdlFileName; } const OString& GetModulePrefix() const { return aModulePrefix.getString(); } diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx index f53fb3156d28..2ce04f62d7ca 100644 --- a/idl/inc/types.hxx +++ b/idl/inc/types.hxx @@ -45,7 +45,6 @@ class SvMetaAttribute : public SvMetaReference bool bNewAttr; protected: - sal_uLong MakeSlotValue( SvIdlDataBase & rBase, bool bVariable ) const; virtual void ReadAttributesSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) SAL_OVERRIDE; public: @@ -177,7 +176,6 @@ public: { aBasicName.setString(rName); } const OString& GetBasicName() const; - OString GetBasicPostfix() const; const OString& GetSvName() const; const OString& GetSbxName() const; const OString& GetOdlName() const; @@ -188,7 +186,6 @@ public: virtual bool ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm ) SAL_OVERRIDE; - OString GetCString() const; sal_uLong MakeSfx( OStringBuffer& rAtrrArray ); virtual void WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm ); diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index dc513e402d83..dc6e27cebf98 100644 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -188,14 +188,4 @@ bool SvStringHashTable::equals( const OString& rElement, return rElement.equals( pEntries[ nIndex ].GetName() ); } -void SvStringHashTable::FillHashList( SvStringHashList * pList ) const -{ - for( sal_uInt32 n = 0; n < GetMax(); n++ ) - { - if( IsEntry( n ) ) - pList->push_back( Get( n ) ); - } - // hash order, sort now -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx index 465bd8cb35b7..54a11cdde242 100644 --- a/idl/source/objects/basobj.cxx +++ b/idl/source/objects/basobj.cxx @@ -47,27 +47,6 @@ void SvMetaObject::WriteStars( SvStream & rOutStm ) rOutStm.WriteChar( '/' ) << endl; } -bool SvMetaObject::TestAndSeekSpaceOnly( SvStream & rOutStm, sal_uLong nBegPos ) -{ - // write no empty brackets - sal_uLong nPos = rOutStm.Tell(); - rOutStm.Seek( nBegPos ); - bool bOnlySpace = true; - while( bOnlySpace && rOutStm.Tell() < nPos ) - { - char c; - rOutStm.ReadChar( c ); - if( !isspace( c ) ) - bOnlySpace = false; - } - if( bOnlySpace ) - // nothing written - rOutStm.Seek( nBegPos ); - else - rOutStm.Seek( nPos ); - return bOnlySpace; -} - void SvMetaObject::Back2Delemitter( SvStream & rOutStm ) { // write no empty brackets diff --git a/idl/source/objects/bastype.cxx b/idl/source/objects/bastype.cxx index a8a3a0a64e37..f83f901b17de 100644 --- a/idl/source/objects/bastype.cxx +++ b/idl/source/objects/bastype.cxx @@ -147,16 +147,6 @@ bool SvBOOL::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) return false; } -OString SvBOOL::GetSvIdlString( SvStringHashEntry * pName ) -{ - if( nVal ) - return pName->GetName(); - - return OStringBuffer(pName->GetName()). - append("(FALSE)"). - makeStringAndClear(); -} - bool SvIdentifier::ReadSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm ) { sal_uInt32 nTokPos = rInStm.Tell(); diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx index 9d0ee8ba1ce9..7246ca25a858 100644 --- a/idl/source/objects/module.cxx +++ b/idl/source/objects/module.cxx @@ -29,12 +29,6 @@ TYPEINIT1( SvMetaModule, SvMetaExtern ); -SvMetaModule::SvMetaModule() - : bImported( false ) - , bIsModified( false ) -{ -} - SvMetaModule::SvMetaModule( const OUString & rIdlFileName, bool bImp ) : aIdlFileName( rIdlFileName ) , bImported( bImp ), bIsModified( false ) diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx index 3f8ab37b28a2..fa2f50d34db3 100644 --- a/idl/source/objects/types.cxx +++ b/idl/source/objects/types.cxx @@ -204,24 +204,6 @@ void SvMetaAttribute::ReadAttributesSvIdl( SvIdlDataBase & rBase, } } -sal_uLong SvMetaAttribute::MakeSlotValue( SvIdlDataBase & rBase, bool bVar ) const -{ - const SvNumberIdentifier & rId = GetSlotId(); - sal_uLong n = rId.GetValue(); - if( !rBase.aStructSlotId.getString().isEmpty() ) - { - n = n << 20; - n += rBase.aStructSlotId.GetValue(); - } - if (dynamic_cast<const SvMetaSlot*>(this)) - n |= 0x20000; - if( !bVar ) - n += 0x10000; - else if ( GetIsCollection() ) - n += 0x40000; - return n; -} - sal_uLong SvMetaAttribute::MakeSfx( OStringBuffer& rAttrArray ) { SvMetaType * pType = GetType(); @@ -336,14 +318,6 @@ const OString& SvMetaType::GetBasicName() const return static_cast<SvMetaType*>(GetRef())->GetBasicName(); } -OString SvMetaType::GetBasicPostfix() const -{ - // MBN and Co always want "As xxx" - return OStringBuffer(" As "). - append(GetBasicName()). - makeStringAndClear(); -} - bool SvMetaType::GetIn() const { if( aIn.IsSet() || !GetRef() ) @@ -450,20 +424,6 @@ bool SvMetaType::SetName( const OString& rName, SvIdlDataBase * pBase ) return SvMetaReference::SetName( rName, pBase ); } -OString SvMetaType::GetCString() const -{ - OStringBuffer out( GetSvName() ); - if( aCall0 == (int)CALL_POINTER ) - out.append(" *"); - else if( aCall0 == (int)CALL_REFERENCE ) - out.append(" &"); - if( aCall1 == (int)CALL_POINTER ) - out.append('*'); - else if( aCall1 == (int)CALL_REFERENCE ) - out.append('&'); - return out.makeStringAndClear(); -} - bool SvMetaType::ReadHeaderSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm ) { diff --git a/include/rsc/rscsfx.hxx b/include/rsc/rscsfx.hxx index 43f6149ef450..cc6a23fea579 100644 --- a/include/rsc/rscsfx.hxx +++ b/include/rsc/rscsfx.hxx @@ -37,7 +37,7 @@ enum SfxStyleFamily { SFX_STYLE_FAMILY_CHAR = 1, }; -// SfxTemplateDialog +// SfxTemplate #define RSC_SFX_STYLE_ITEM_LIST 0x1 #define RSC_SFX_STYLE_ITEM_BITMAP 0x2 #define RSC_SFX_STYLE_ITEM_TEXT 0x4 diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx index 5993561ac0fe..ee63e4043487 100644 --- a/include/sfx2/app.hxx +++ b/include/sfx2/app.hxx @@ -71,7 +71,6 @@ class SfxProgress; class SfxSlotPool; typedef boost::ptr_vector<SfxStbCtrlFactory> SfxStbCtrlFactArr_Impl; typedef boost::ptr_vector<SfxTbxCtrlFactory> SfxTbxCtrlFactArr_Impl; -class SfxTemplateDialog; class SfxViewFrame; typedef ::std::vector<SfxViewFrame*> SfxViewFrameArr_Impl; class SfxViewShell; diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index 6e6ed778ddb1..91fbb9af50b2 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -28,36 +28,17 @@ #include <sfx2/childwin.hxx> #include <sfx2/basedlgs.hxx> -class SfxTemplateDialog_Impl; - -// class SfxTemplateDialog ----------------------------------------------- -class SfxTemplateDialog : public SfxDockingWindow +namespace SfxTemplate { -private: -friend class SfxTemplateDialog_Impl; - - SfxTemplateDialog_Impl* pImpl; - - virtual void DataChanged( const DataChangedEvent& _rDCEvt ) SAL_OVERRIDE; - virtual void Resize() SAL_OVERRIDE; - virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ) SAL_OVERRIDE; - virtual void StateChanged( StateChangedType nStateChange ) SAL_OVERRIDE; - -public: - SfxTemplateDialog( SfxBindings*, SfxChildWindow*, vcl::Window* ); - virtual ~SfxTemplateDialog(); - - virtual void Update(); - // converts from SFX_STYLE_FAMILY Ids to 1-5 - static sal_uInt16 SFX2_DLLPUBLIC SfxFamilyIdToNId(SfxStyleFamily nFamily); + sal_uInt16 SFX2_DLLPUBLIC SfxFamilyIdToNId(SfxStyleFamily nFamily); // converts from 1-5 to SFX_STYLE_FAMILY Ids - static SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId); -}; + SfxStyleFamily SFX2_DLLPUBLIC NIdToSfxFamilyId(sal_uInt16 nId); +} +class SfxTemplateDialog_Impl; // class SfxTemplatePanelControl ----------------------------------------- - class SFX2_DLLPUBLIC SfxTemplatePanelControl : public DockingWindow { public: @@ -76,7 +57,6 @@ private: SfxBindings* mpBindings; }; - #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/svx/dbtoolsclient.hxx b/include/svx/dbtoolsclient.hxx index 7888b0ac876b..5905ecd30680 100644 --- a/include/svx/dbtoolsclient.hxx +++ b/include/svx/dbtoolsclient.hxx @@ -108,16 +108,6 @@ namespace svxform const ::com::sun::star::lang::Locale& _rLocale ) const; - OUString quoteName( - const OUString& _rQuote, - const OUString& _rName - ) const; - - OUString composeTableNameForSelect( - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xTable - ) const; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > getDataSource( const OUString& _rsRegisteredName, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxContext diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx index b4bf4ab1d673..70e03372811b 100644 --- a/sc/source/ui/view/formatsh.cxx +++ b/sc/source/ui/view/formatsh.cxx @@ -215,7 +215,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet ) pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()); + bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()); delete pItem; if ( bProtected || bPage ) @@ -231,7 +231,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet ) SfxPoolItem* pItem = NULL; pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()); + bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()); delete pItem; if ( bProtected && !bPage ) diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx index 3a06f3c583fc..0770ed23857e 100644 --- a/sd/source/ui/view/drviewsf.cxx +++ b/sd/source/ui/view/drviewsf.cxx @@ -486,7 +486,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxPoolItem* pItem = NULL; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - if (pFamilyItem && SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) rSet.Put(SfxBoolItem(nWhich,false)); else { @@ -502,7 +502,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxPoolItem* pItem = NULL; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - if (pFamilyItem && SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) { rSet.DisableItem(nWhich); } @@ -515,7 +515,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxPoolItem* pItem = NULL; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - if (pFamilyItem && SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) rSet.DisableItem(nWhich); delete pItem; } @@ -531,11 +531,11 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet ) SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); if (pFamilyItem) { - if (SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) { rSet.DisableItem(nWhich); } - else if (SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_GRAPHICS) + else if (SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_GRAPHICS) { if (!mpDrawView->AreObjectsMarked()) { diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 87bb4ad0f668..46dc77e9d85b 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1553,7 +1553,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet ) SfxPoolItem* pItem = NULL; GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem); SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); - if (pFamilyItem && SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) + if (pFamilyItem && SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue()) == SD_STYLE_FAMILY_PSEUDO) { SfxItemSet aSet(*rSet.GetPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT); GetStatusBarState(aSet); diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 84916c7cae70..4aa64ba48ec4 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -105,7 +105,7 @@ void ViewShell::GetMenuState( SfxItemSet &rSet ) if( pStyleSheet ) { SfxStyleFamily eFamily = pStyleSheet->GetFamily(); - nFamily = SfxTemplateDialog::SfxFamilyIdToNId(eFamily); + nFamily = SfxTemplate::SfxFamilyIdToNId(eFamily); GetDocSh()->SetStyleFamily(nFamily); } } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 3eef6a97548a..0aaf37bc4b04 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -127,87 +127,6 @@ private: DeletionWatcher *const m_pPrevious; /// let's add more epicycles! }; -// Re-direct functions - -SfxTemplateDialog::SfxTemplateDialog -( - SfxBindings *pBind, - SfxChildWindow *pCW, - vcl::Window *pParent -) - -/* [Description] - Designer class. -*/ - : SfxDockingWindow( pBind, pCW, pParent, SfxResId(DLG_STYLE_DESIGNER) ), - - pImpl( new SfxTemplateDialog_Impl( pBind, this ) ) - -{ - pImpl->updateNonFamilyImages(); -} - -SfxTemplateDialog::~SfxTemplateDialog() -{ - delete pImpl; -} - -void SfxTemplateDialog::DataChanged( const DataChangedEvent& _rDCEvt ) -{ - if ( ( DATACHANGED_SETTINGS == _rDCEvt.GetType() ) && - ( 0 != ( SETTINGS_STYLE & _rDCEvt.GetFlags() ) ) ) - { - pImpl->updateFamilyImages(); - pImpl->updateNonFamilyImages(); - } - - SfxDockingWindow::DataChanged( _rDCEvt ); -} - -void SfxTemplateDialog::Update() -{ - pImpl->Update(); -} - - - -void SfxTemplateDialog::Resize() -{ - if(pImpl) - pImpl->Resize(); - SfxDockingWindow::Resize(); -} - - - - -SfxChildAlignment SfxTemplateDialog::CheckAlignment(SfxChildAlignment eActAlign,SfxChildAlignment eAlign) -{ - switch (eAlign) - { - case SFX_ALIGN_TOP: - case SFX_ALIGN_HIGHESTTOP: - case SFX_ALIGN_LOWESTTOP: - case SFX_ALIGN_BOTTOM: - case SFX_ALIGN_LOWESTBOTTOM: - case SFX_ALIGN_HIGHESTBOTTOM: - return eActAlign; - - case SFX_ALIGN_LEFT: - case SFX_ALIGN_RIGHT: - case SFX_ALIGN_FIRSTLEFT: - case SFX_ALIGN_LASTLEFT: - case SFX_ALIGN_FIRSTRIGHT: - case SFX_ALIGN_LASTRIGHT: - return eAlign; - - default: - return eAlign; - } -} - - - void DropListBox_Impl::MouseButtonDown( const MouseEvent& rMEvt ) { nModifier = rMEvt.GetModifier(); @@ -775,7 +694,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, vcl sal_uInt16 SfxCommonTemplateDialog_Impl::StyleNrToInfoOffset(sal_uInt16 nId) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nId ); - return SfxTemplateDialog::SfxFamilyIdToNId(pItem->GetFamily())-1; + return SfxTemplate::SfxFamilyIdToNId(pItem->GetFamily())-1; } void SfxTemplateDialog_Impl::EnableEdit(bool bEnable) @@ -870,7 +789,7 @@ void SfxCommonTemplateDialog_Impl::ReadResource() for( ; nCount--; ) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nCount ); - sal_uInt16 nId = SfxTemplateDialog::SfxFamilyIdToNId( pItem->GetFamily() ); + sal_uInt16 nId = SfxTemplate::SfxFamilyIdToNId( pItem->GetFamily() ); InsertFamilyItem( nId, pItem ); } @@ -959,29 +878,32 @@ SfxCommonTemplateDialog_Impl::~SfxCommonTemplateDialog_Impl() m_pDeletionWatcher->signal(); } -sal_uInt16 SfxTemplateDialog::SfxFamilyIdToNId(SfxStyleFamily nFamily) +namespace SfxTemplate { - switch ( nFamily ) + sal_uInt16 SfxFamilyIdToNId(SfxStyleFamily nFamily) { - case SFX_STYLE_FAMILY_CHAR: return 1; - case SFX_STYLE_FAMILY_PARA: return 2; - case SFX_STYLE_FAMILY_FRAME: return 3; - case SFX_STYLE_FAMILY_PAGE: return 4; - case SFX_STYLE_FAMILY_PSEUDO: return 5; - default: return 0; + switch ( nFamily ) + { + case SFX_STYLE_FAMILY_CHAR: return 1; + case SFX_STYLE_FAMILY_PARA: return 2; + case SFX_STYLE_FAMILY_FRAME: return 3; + case SFX_STYLE_FAMILY_PAGE: return 4; + case SFX_STYLE_FAMILY_PSEUDO: return 5; + default: return 0; + } } -} -SfxStyleFamily SfxTemplateDialog::NIdToSfxFamilyId(sal_uInt16 nId) -{ - switch (nId) + SfxStyleFamily NIdToSfxFamilyId(sal_uInt16 nId) { - case 1: return SFX_STYLE_FAMILY_CHAR; - case 2: return SFX_STYLE_FAMILY_PARA; - case 3: return SFX_STYLE_FAMILY_FRAME; - case 4: return SFX_STYLE_FAMILY_PAGE; - case 5: return SFX_STYLE_FAMILY_PSEUDO; - default: return SFX_STYLE_FAMILY_ALL; + switch (nId) + { + case 1: return SFX_STYLE_FAMILY_CHAR; + case 2: return SFX_STYLE_FAMILY_PARA; + case 3: return SFX_STYLE_FAMILY_FRAME; + case 4: return SFX_STYLE_FAMILY_PAGE; + case 5: return SFX_STYLE_FAMILY_PSEUDO; + default: return SFX_STYLE_FAMILY_ALL; + } } } @@ -992,7 +914,7 @@ const SfxStyleFamilyItem *SfxCommonTemplateDialog_Impl::GetFamilyItem_Impl() con for(size_t i = 0; i < nCount; ++i) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( i ); - sal_uInt16 nId = SfxTemplateDialog::SfxFamilyIdToNId(pItem->GetFamily()); + sal_uInt16 nId = SfxTemplate::SfxFamilyIdToNId(pItem->GetFamily()); if(nId == nActFamily) return pItem; } @@ -2324,24 +2246,6 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu( void ) return pMenu; } - - - -SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( - SfxBindings* pB, SfxTemplateDialog* pDlgWindow ) : - - SfxCommonTemplateDialog_Impl( pB, pDlgWindow, true ), - - m_pFloat ( pDlgWindow ), - m_bZoomIn ( false ), - m_aActionTbL ( pDlgWindow, this ), - m_aActionTbR ( pDlgWindow, SfxResId( TB_ACTION ) ) - -{ - pDlgWindow->FreeResource(); - Initialize(); -} - SfxTemplateDialog_Impl::SfxTemplateDialog_Impl( SfxBindings* pB, SfxTemplatePanelControl* pDlgWindow ) : SfxCommonTemplateDialog_Impl( pB, pDlgWindow, true ), @@ -2419,7 +2323,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() for( ; nLoop--; ) { const SfxStyleFamilyItem *pItem = pStyleFamilies->at( nLoop ); - sal_uInt16 nId = SfxTemplateDialog::SfxFamilyIdToNId( pItem->GetFamily() ); + sal_uInt16 nId = SfxTemplate::SfxFamilyIdToNId( pItem->GetFamily() ); m_aActionTbL.SetItemImage( nId, pItem->GetImage() ); } } @@ -2777,25 +2681,6 @@ void SfxCommonTemplateDialog_Impl::ReplaceUpdateButtonByMenu() //does nothing } -void SfxTemplateDialog::StateChanged( StateChangedType nStateChange ) -{ - if ( nStateChange == StateChangedType::INITSHOW ) - { - SfxViewFrame *pFrame = GetBindings().GetDispatcher_Impl()->GetFrame(); - vcl::Window* pEditWin = pFrame->GetViewShell()->GetWindow(); - - Size aSize = pEditWin->GetSizePixel(); - Point aPoint = pEditWin->OutputToScreenPixel( pEditWin->GetPosPixel() ); - aPoint = GetParent()->ScreenToOutputPixel( aPoint ); - Size aWinSize = GetSizePixel(); - aPoint.X() += aSize.Width() - aWinSize.Width() - 20; - aPoint.Y() += aSize.Height() / 2 - aWinSize.Height() / 2; - SetFloatingPos( aPoint ); - } - - SfxDockingWindow::StateChanged( nStateChange ); -} - DropToolBox_Impl::DropToolBox_Impl(vcl::Window* pParent, SfxTemplateDialog_Impl* pTemplateDialog) : ToolBox(pParent), DropTargetHelper(this), @@ -2818,7 +2703,7 @@ sal_Int8 DropToolBox_Impl::AcceptDrop( const AcceptDropEvent& rEvt ) } // special case: page styles are allowed to create new styles by example // but not allowed to be created by drag and drop - if ( nItemId != SfxTemplateDialog::SfxFamilyIdToNId( SFX_STYLE_FAMILY_PAGE )&& + if ( nItemId != SfxTemplate::SfxFamilyIdToNId( SFX_STYLE_FAMILY_PAGE )&& IsDropFormatSupported( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ) && !rParent.bNewByExampleDisabled ) { diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index fe7cf61affab..b6ca268a6ad6 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -344,11 +344,10 @@ public: friend class SfxTemplateDialog; TYPEINFO_OVERRIDE(); - SfxTemplateDialog_Impl( SfxBindings*, SfxTemplateDialog* pDlgWindow ); SfxTemplateDialog_Impl( SfxBindings*, SfxTemplatePanelControl* pDlgWindow ); virtual ~SfxTemplateDialog_Impl(); - void Initialize (void); + void Initialize(); }; #endif // INCLUDED_SFX2_SOURCE_INC_TEMPLDGI_HXX diff --git a/svgio/inc/svgio/svgreader/svgdocument.hxx b/svgio/inc/svgio/svgreader/svgdocument.hxx index cbc651b3b99c..46df2542faad 100644 --- a/svgio/inc/svgio/svgreader/svgdocument.hxx +++ b/svgio/inc/svgio/svgreader/svgdocument.hxx @@ -65,7 +65,6 @@ namespace svgio /// add/remove styles to mapper void addSvgStyleAttributesToMapper(const OUString& rStr, const SvgStyleAttributes& rSvgStyleAttributes); - void removeSvgStyleAttributesFromMapper(const OUString& rStr); /// find a style by it's Id bool hasGlobalCssStyleAttributes() const { return !maIdStyleTokenMapperList.empty(); } diff --git a/svgio/source/svgreader/svgdocument.cxx b/svgio/source/svgreader/svgdocument.cxx index 6f4e0a56746d..60bd2c6a8284 100644 --- a/svgio/source/svgreader/svgdocument.cxx +++ b/svgio/source/svgreader/svgdocument.cxx @@ -85,14 +85,6 @@ namespace svgio } } - void SvgDocument::removeSvgStyleAttributesFromMapper(const OUString& rStr) - { - if(!rStr.isEmpty()) - { - maIdStyleTokenMapperList.erase(rStr); - } - } - const SvgStyleAttributes* SvgDocument::findGlobalCssStyleAttributes(const OUString& rStr) const { const IdStyleTokenMapper::const_iterator aResult(maIdStyleTokenMapperList.find(rStr)); diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx index d19635bb79aa..c01974ab966b 100644 --- a/svx/source/form/dbtoolsclient.cxx +++ b/svx/source/form/dbtoolsclient.cxx @@ -219,7 +219,6 @@ namespace svxform return xReturn; } - void OStaticDataAccessTools::TransferFormComponentProperties(const Reference< XPropertySet>& _rxOld, const Reference< XPropertySet>& _rxNew, const Locale& _rLocale) const { @@ -227,25 +226,6 @@ namespace svxform m_xDataAccessTools->TransferFormComponentProperties(_rxOld, _rxNew, _rLocale); } - - OUString OStaticDataAccessTools::quoteName(const OUString& _rQuote, const OUString& _rName) const - { - OUString sReturn; - if ( ensureLoaded() ) - sReturn = m_xDataAccessTools->quoteName(_rQuote, _rName); - return sReturn; - } - - - OUString OStaticDataAccessTools::composeTableNameForSelect( const Reference< XConnection >& _rxConnection, const Reference< XPropertySet>& _xTable ) const - { - OUString sReturn; - if ( ensureLoaded() ) - sReturn = m_xDataAccessTools->composeTableNameForSelect( _rxConnection, _xTable ); - return sReturn; - } - - Reference< XDataSource > OStaticDataAccessTools::getDataSource( const OUString& _rsRegisteredName, const Reference< XComponentContext>& _rxContext ) const { Reference< XDataSource > xReturn; @@ -254,7 +234,6 @@ namespace svxform return xReturn; } - bool OStaticDataAccessTools::canInsert(const Reference< XPropertySet>& _rxCursorSet) const { bool bRet = false; @@ -263,7 +242,6 @@ namespace svxform return bRet; } - bool OStaticDataAccessTools::canUpdate(const Reference< XPropertySet>& _rxCursorSet) const { bool bRet = false; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 65b533bbba59..3bbf5462bef2 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -903,9 +903,6 @@ public: */ void ReplaceUserDefinedDocumentProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentProperties > xSourceDocProps ); - // Replace all user defined document properties with those from rSource. - void ReplaceUserDefinedDocumentProperties( const SwDoc& rSource ); - /** Replace document properties with those from rSource. This includes the user defined document properties! diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx index 375443459076..119713902973 100644 --- a/sw/inc/iodetect.hxx +++ b/sw/inc/iodetect.hxx @@ -57,8 +57,6 @@ struct SwIoDetect { return rNm.startsWith(sName); } - - OUString IsReader(const sal_Char* pHeader, sal_uLong nLen_) const; }; enum ReaderWriterEnum { diff --git a/sw/source/core/doc/docglos.cxx b/sw/source/core/doc/docglos.cxx index 150783227f05..9b61f83c5e99 100644 --- a/sw/source/core/doc/docglos.cxx +++ b/sw/source/core/doc/docglos.cxx @@ -78,16 +78,6 @@ void SwDoc::ReplaceUserDefinedDocumentProperties( } } -void SwDoc::ReplaceUserDefinedDocumentProperties(const SwDoc& rSource) -{ - uno::Reference<document::XDocumentPropertiesSupplier> xSourceDPS( - rSource.GetDocShell()->GetModel(), uno::UNO_QUERY_THROW); - uno::Reference<document::XDocumentProperties> xSourceDocProps( - xSourceDPS->getDocumentProperties() ); - - ReplaceUserDefinedDocumentProperties( xSourceDocProps ); -} - void SwDoc::ReplaceDocumentProperties(const SwDoc& rSource, bool mailMerge) { uno::Reference<document::XDocumentPropertiesSupplier> xSourceDPS( diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index c97cdc0472bb..bd3876f81466 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -48,51 +48,6 @@ SwIoDetect aFilterDetect[] = SwIoDetect( FILTER_TEXT ) }; -OUString SwIoDetect::IsReader(const sal_Char* pHeader, sal_uLong nLen_) const -{ - // Filter recognition - struct W1_FIB - { - SVBT16 wIdent; // 0x0 int magic number - SVBT16 nFib; // 0x2 FIB version written - SVBT16 nProduct; // 0x4 product version written by - SVBT16 nlocale; // 0x6 language stamp---localized version; - SVBT16 pnNext; // 0x8 - SVBT16 fFlags; - - sal_uInt16 nFibGet() { return SVBT16ToShort(nFib); } - sal_uInt16 wIdentGet() { return SVBT16ToShort(wIdent); } - sal_uInt16 fFlagsGet() { return SVBT16ToShort(fFlags); } - // SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format. - bool fComplexGet() { return static_cast< bool >((fFlagsGet() >> 2) & 1); } - }; - - bool bRet = false; - if ( sHTML == sName ) - bRet = HTMLParser::IsHTMLFormat( pHeader, true, RTL_TEXTENCODING_DONTKNOW ); - else if ( FILTER_RTF == sName ) - bRet = 0 == strncmp( "{\\rtf", pHeader, 5 ); - else if ( sWW5 == sName ) - { - W1_FIB *pW1Header = (W1_FIB*)pHeader; - if (pW1Header->wIdentGet() == 0xA5DC && pW1Header->nFibGet() == 0x65) - bRet = true; /*WW5*/ - else if (pW1Header->wIdentGet() == 0xA5DB && pW1Header->nFibGet() == 0x2D) - bRet = true; /*WW2*/ - } - else if ( sWW1 == sName ) - { - bRet = (( ((W1_FIB*)pHeader)->wIdentGet() == 0xA59C - && ((W1_FIB*)pHeader)->nFibGet() == 0x21) - && ((W1_FIB*)pHeader)->fComplexGet() == false); - } - else if ( FILTER_TEXT == sName ) - bRet = SwIoSystem::IsDetectableText(pHeader, nLen_); - else if ( FILTER_TEXT_DLG == sName) - bRet = SwIoSystem::IsDetectableText( pHeader, nLen_, 0, 0, 0, true); - return bRet ? sName : OUString(); -} - const OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr ) { // for StorageFilters also set the SubStorageName diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx index b8413cd0da12..8307399540e2 100644 --- a/sw/source/uibase/app/docst.cxx +++ b/sw/source/uibase/app/docst.cxx @@ -113,7 +113,7 @@ void SwDocShell::StateStyleSheet(SfxItemSet& rSet, SwWrtShell* pSh) SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem); if (pFamilyItem) { - nActualFamily = static_cast<sal_uInt16>(SfxTemplateDialog::NIdToSfxFamilyId(pFamilyItem->GetValue())); + nActualFamily = static_cast<sal_uInt16>(SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue())); } delete pItem; } diff --git a/unusedcode.easy b/unusedcode.easy index c60f235edb91..b1302f22b60e 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,24 +1,21 @@ BigInt::BigInt(unsigned int) CalcUnoApiTest::CalcUnoApiTest(rtl::OUString const&) +FontCharMap::GetDefaultMap(bool) GDriveDocument::GDriveDocument(GDriveSession*) GDriveFolder::GDriveFolder(GDriveSession*) GDriveProperty::GDriveProperty() GDriveSession::GDriveSession() -Json::Json(std::__debug::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, Json, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, Json> > > const&) -Json::Json(std::__debug::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, boost::shared_ptr<libcmis::Property>, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, boost::shared_ptr<libcmis::Property> > > > const&) -Json::swap(Json&) MetaAction::TypeName(unsigned short) OpenGLContext::renderToFile() -OpenGLRender::CreateTextTexture(rtl::OUString const&, Font, long, com::sun::star::awt::Point, com::sun::star::awt::Size, long) +OpenGLRender::CreateTextTexture(rtl::OUString const&, vcl::Font, long, com::sun::star::awt::Point, com::sun::star::awt::Size, long) OutputDevice::GetCanvas() const OutputDevice::HasAlpha() OutputDevice::LogicHeightToDeviceCoordinate(long) const OutputDevice::LogicToLogic(basegfx::B2DPolyPolygon const&, MapMode const&, MapMode const&) -OutputDevice::LogicToPixel(Region const&, MapMode const&) const OutputDevice::LogicToPixel(basegfx::B2DPolygon const&) const OutputDevice::LogicToPixel(basegfx::B2DPolygon const&, MapMode const&) const -OutputDevice::PixelToLogic(Region const&, MapMode const&) const -PaletteManager::GetPaletteName() +OutputDevice::LogicToPixel(vcl::Region const&, MapMode const&) const +OutputDevice::PixelToLogic(vcl::Region const&, MapMode const&) const Primitive2dXmlDump::filterActionType(unsigned short, bool) Primitive2dXmlDump::filterAllActionTypes() SalGraphics::drawTransformedBitmap(basegfx::B2DPoint const&, basegfx::B2DPoint const&, basegfx::B2DPoint const&, SalBitmap const&, SalBitmap const*) @@ -36,9 +33,11 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) SfxAppMenuControl_Impl::RegisterControl(unsigned short, SfxModule*) SfxInt64Item::SetValue(long) +StyleSettings::SetAlternatingRowColor(Color const&) StyleSettings::SetCursorSize(long) StyleSettings::SetFloatTitleHeight(long) StyleSettings::SetHideDisabledMenuItems(bool) +StyleSettings::SetRowColor(Color const&) StyleSettings::SetSpinSize(long) StyleSettings::SetTitleHeight(long) StyleSettings::SetUseFlatBorders(bool) @@ -51,7 +50,6 @@ SvxOpenGLObject::setRenderer(IOpenGLRenderer*) Test::testCopyPasteSkipEmptyConditionalFormatting() Test::testPerf() Test::testSharedFormulaMoveBlock() -UnoApiTest::closeDocument(com::sun::star::uno::Reference<com::sun::star::lang::XComponent>) VCLXGraphics::getFillColor() VCLXGraphics::getFont() VCLXGraphics::getLineColor() @@ -60,6 +58,7 @@ VCLXGraphics::getTextColor() VCLXGraphics::getTextFillColor() XclXmlUtils::ToOString(XclRange const&) XmlTestTools::parseXml(utl::TempFile&) +ZipUtils::Deflater::setLevel(int) apitest::CellProperties::testRotateReference() apitest::CellProperties::testVertJustify() apitest::DataPilotField::testAutoShowInfo() @@ -177,6 +176,7 @@ basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon c calc::OCellListSource::checkConsistency_static(void const*) calc::OCellValueBinding::checkConsistency_static(void const*) canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&) +chart::BaseGFXHelper::B2IRectangleToAWTRectangle(basegfx::B2IRange const&) chart::ChartTypeUnoDlg::Create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) chart::InternalData::isDefaultData() chart::ShapeToolbarController::create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) @@ -185,6 +185,7 @@ comphelper::detail::ConfigurationWrapper::getGroupReadWrite(boost::shared_ptr<co comphelper::detail::ConfigurationWrapper::getLocalizedPropertyValue(rtl::OUString const&) const comphelper::detail::ConfigurationWrapper::setLocalizedPropertyValue(boost::shared_ptr<comphelper::ConfigurationChanges> const&, rtl::OUString const&, com::sun::star::uno::Any const&) const connectivity::firebird::release(int&, cppu::OBroadcastHelperVar<cppu::OMultiTypeInterfaceContainerHelper, com::sun::star::uno::Type>&, com::sun::star::uno::Reference<com::sun::star::uno::XInterface>&, com::sun::star::lang::XComponent*) +connectivity::odbc::appendSQLWCHARs(rtl::OUStringBuffer&, wchar_t const*, int) connectivity::sdbcx::OGroup::OGroup(bool) connectivity::sdbcx::OGroup::OGroup(rtl::OUString const&, bool) dbaccess::ORowSetCacheIterator::getMutex() const @@ -203,7 +204,4 @@ sd::framework::FrameworkHelper::Instance(com::sun::star::uno::Reference<com::sun sfx2::SvBaseLink::SvBaseLink(rtl::OUString const&, unsigned short, sfx2::SvLinkSource*) 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) -std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr<formula::FormulaTokenArray>&) -std::auto_ptr<formula::FormulaTokenArray>::auto_ptr(std::auto_ptr_ref<formula::FormulaTokenArray>) -svgio::svgreader::SvgDocument::removeSvgStyleAttributesFromMapper(rtl::OUString const&) vcl::MapChar(vcl::_TrueTypeFont*, unsigned short, bool) |