summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sfx2/inc/sfx2/doctempl.hxx14
-rw-r--r--sfx2/source/doc/doctempl.cxx302
-rw-r--r--unusedcode.easy7
3 files changed, 2 insertions, 321 deletions
diff --git a/sfx2/inc/sfx2/doctempl.hxx b/sfx2/inc/sfx2/doctempl.hxx
index cfd7e02a3027..df1d9f0c71bf 100644
--- a/sfx2/inc/sfx2/doctempl.hxx
+++ b/sfx2/inc/sfx2/doctempl.hxx
@@ -67,7 +67,6 @@ public:
sal_Bool IsConstructed() { return pImp != NULL; }
void Construct();
- static sal_Bool SaveDir( /*SfxTemplateDir &rEntry */ ) ;
const SfxDocumentTemplates &operator=(const SfxDocumentTemplates &);
sal_Bool Rescan( );
@@ -77,20 +76,12 @@ public:
sal_uInt16 GetRegionCount() const;
const String& GetRegionName(sal_uInt16 nIdx) const; //dv!
String GetFullRegionName(sal_uInt16 nIdx) const;
- sal_uInt16 GetRegionNo( const String &rRegionName ) const;
sal_uInt16 GetCount(sal_uInt16 nRegion) const;
- sal_uInt16 GetCount( const String &rName) const;
const String& GetName(sal_uInt16 nRegion, sal_uInt16 nIdx) const; //dv!
String GetFileName(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
String GetPath(sal_uInt16 nRegion, sal_uInt16 nIdx) const;
- String GetDefaultTemplatePath(const String &rLongName);
-
- // Path to the template; the logical name must be given in order to find
- // the correct file name when overwriting a template
- String GetTemplatePath(sal_uInt16 nRegion, const String &rLongName) const;
-
// Allows to retrieve the target template URL from the UCB
::rtl::OUString GetTemplateTargetURLFromComponent( const ::rtl::OUString& aGroupName,
const ::rtl::OUString& aTitle );
@@ -102,11 +93,6 @@ public:
int nCount,
const ::rtl::OUString& rString);
- // Speichern als Vorlage hat geklappt -> Aktualisieren
- void NewTemplate(sal_uInt16 nRegion,
- const String &rLongName,
- const String &rFileName);
-
sal_Bool Copy(sal_uInt16 nTargetRegion,
sal_uInt16 nTargetIdx,
sal_uInt16 nSourceRegion,
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 640c645a91df..a1fb5fc73fe5 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -265,10 +265,6 @@ public:
{ return maRegions.size(); }
RegionData_Impl* GetRegion( const OUString& rName ) const;
RegionData_Impl* GetRegion( size_t nIndex ) const;
- void GetTemplates( Content& rTargetFolder,
- Content& rParentFolder,
- RegionData_Impl* pRegion );
-
size_t GetRegionPos( const OUString& rTitle, sal_Bool& rFound ) const;
sal_Bool GetTitleFromURL( const OUString& rURL, OUString& aTitle );
@@ -387,39 +383,6 @@ const String& SfxDocumentTemplates::GetRegionName
return maTmpString;
}
-
-//------------------------------------------------------------------------
-
-sal_uInt16 SfxDocumentTemplates::GetRegionNo
-(
- const String &rRegion // Region Name
-) const
-
-/* [Description]
-
- Returns the Index for a logical Region Name.
-
- [Return value]
-
- sal_uInt16 Index of 'rRegion' or USHRT_MAX if unknown
-
-*/
-{
- DocTemplLocker_Impl aLocker( *pImp );
-
- if ( !pImp->Construct() )
- return USHRT_MAX;
-
- sal_Bool bFound;
- size_t nIndex = pImp->GetRegionPos( rRegion, bFound );
-
- if ( bFound )
- return (sal_uInt16) nIndex;
- else
- return USHRT_MAX;
-}
-
-
//------------------------------------------------------------------------
sal_uInt16 SfxDocumentTemplates::GetRegionCount() const
@@ -464,39 +427,6 @@ sal_Bool SfxDocumentTemplates::IsRegionLoaded( sal_uInt16 nIdx ) const
sal_uInt16 SfxDocumentTemplates::GetCount
(
- const String& rName /* Region Name, for which the entries
- should be counted */
-
-) const
-
-/* [Description]
-
- Number of entries in Region
-
- [Return value]
-
- sal_uInt16 Number of entries
-*/
-
-{
- DocTemplLocker_Impl aLocker( *pImp );
-
- if ( !pImp->Construct() )
- return 0;
-
- RegionData_Impl *pData = pImp->GetRegion( rName );
- sal_uIntPtr nCount = 0;
-
- if ( pData )
- nCount = pData->GetCount();
-
- return (sal_uInt16) nCount;
-}
-
-//------------------------------------------------------------------------
-
-sal_uInt16 SfxDocumentTemplates::GetCount
-(
sal_uInt16 nRegion /* Region index whose number is
to be determined */
@@ -637,114 +567,6 @@ String SfxDocumentTemplates::GetPath
//------------------------------------------------------------------------
-String SfxDocumentTemplates::GetTemplatePath
-(
- sal_uInt16 nRegion, // Region Index, in which the entry lies
- const String& rLongName // logical Entry Name
-) const
-
-/* [Description]
-
- Returns the file name with full path to the file assigned to an entry
-
- [Return value]
-
- String File name with full path
-*/
-{
- DocTemplLocker_Impl aLocker( *pImp );
-
- if ( !pImp->Construct() )
- return String();
-
- DocTempl_EntryData_Impl *pEntry = NULL;
- RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
-
- if ( pRegion )
- pEntry = pRegion->GetEntry( rLongName );
-
- if ( pEntry )
- return pEntry->GetTargetURL();
- else if ( pRegion )
- {
- // a new template is going to be inserted, generate a new URL
- // TODO/LATER: if the title is localized, use minimized URL in future
-
- // --**-- extension handling will become more complicated, because
- // every new document type will have it's own extension
- // e.g.: .stw or .stc instead of .vor
- INetURLObject aURLObj( pRegion->GetTargetURL() );
- aURLObj.insertName( rLongName, false,
- INetURLObject::LAST_SEGMENT, true,
- INetURLObject::ENCODE_ALL );
-
- OUString aExtension = aURLObj.getExtension();
-
- if ( ! aExtension.getLength() )
- aURLObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM( "vor" ) ) );
-
- return aURLObj.GetMainURL( INetURLObject::NO_DECODE );
- }
- else
- return String();
-}
-
-//------------------------------------------------------------------------
-
-String SfxDocumentTemplates::GetDefaultTemplatePath
-(
- const String& rLongName
-)
-
-/* [Description]
-
- Returns the default location for templates
-
- [Return value]
-
- String Default location for templates
-*/
-{
- DocTemplLocker_Impl aLocker( *pImp );
-
- if ( ! pImp->Construct() )
- return String();
-
- // the first region in the list should always be the standard
- // group
- // --**-- perhaps we have to create it ???
- RegionData_Impl *pRegion = pImp->GetRegion( 0L );
- DocTempl_EntryData_Impl *pEntry = NULL;
-
- if ( pRegion )
- pEntry = pRegion->GetEntry( rLongName );
-
- if ( pEntry )
- return pEntry->GetTargetURL();
- else if ( pRegion )
- {
- // a new template is going to be inserted, generate a new URL
- // TODO/LATER: if the title is localized, use minimized URL in future
-
- INetURLObject aURLObj( pRegion->GetTargetURL() );
- aURLObj.insertName( rLongName, false,
- INetURLObject::LAST_SEGMENT, true,
- INetURLObject::ENCODE_ALL );
-
- OUString aExtension = aURLObj.getExtension();
-
- if ( ! aExtension.getLength() )
- aURLObj.setExtension( OUString( RTL_CONSTASCII_USTRINGPARAM( "vor" ) ) );
-
- return aURLObj.GetMainURL( INetURLObject::NO_DECODE );
- }
- else
- return String();
-
-}
-
-//------------------------------------------------------------------------
-
::rtl::OUString SfxDocumentTemplates::GetTemplateTargetURLFromComponent( const ::rtl::OUString& aGroupName,
const ::rtl::OUString& aTitle )
{
@@ -801,69 +623,6 @@ OUString SfxDocumentTemplates::ConvertResourceString (
//------------------------------------------------------------------------
-sal_Bool SfxDocumentTemplates::SaveDir
-(
-// SfxTemplateDir& rDir // Save Directory
-)
-
-/* [Description]
-
- Saves the Directory rDir
-
- [Return value]
-
- sal_Bool sal_False, Write error
- sal_True, Saved
-*/
-
-{
- return sal_True;
-}
-
-//------------------------------------------------------------------------
-
-void SfxDocumentTemplates::NewTemplate
-(
- sal_uInt16 nRegion, /* Region Index, in which the template
- should be applied */
-
- const String& rLongName, // logical name of the new template
- const String& rFileName // File name of the new template
-)
-
-/* [Description]
-
- Submit a new template in the administrative structures
- overwriting a template of the same name is prevented (! Error message)
-*/
-
-{
- DocTemplLocker_Impl aLocker( *pImp );
-
- if ( ! pImp->Construct() )
- return;
-
- DocTempl_EntryData_Impl *pEntry;
- RegionData_Impl *pRegion = pImp->GetRegion( nRegion );
-
- // do nothing if there is no region with that index
- if ( !pRegion )
- return;
-
- pEntry = pRegion->GetEntry( rLongName );
-
- // do nothing if there is already an entry with that name
- if ( pEntry )
- return;
-
- uno::Reference< XDocumentTemplates > xTemplates = pImp->getDocTemplates();
-
- if ( xTemplates->addTemplate( pRegion->GetTitle(), rLongName, rFileName ) )
- pRegion->AddEntry( rLongName, rFileName );
-}
-
-//------------------------------------------------------------------------
-
sal_Bool SfxDocumentTemplates::CopyOrMove
(
sal_uInt16 nTargetRegion, // Target Region Index
@@ -1273,7 +1032,6 @@ sal_Bool SfxDocumentTemplates::Delete
<SfxDocumentTemplates::InsertDir(const String&,sal_uInt16)>
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
- <SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
*/
{
@@ -1336,7 +1094,6 @@ sal_Bool SfxDocumentTemplates::InsertDir
[Cross-references]
<SfxDocumentTemplates::KillDir(SfxTemplateDir&)>
- <SfxDocumentTemplates::SaveDir(SfxTemplateDir&)>
*/
{
DocTemplLocker_Impl aLocker( *pImp );
@@ -2383,65 +2140,6 @@ void SfxDocTemplate_Impl::ReInitFromComponent()
}
// -----------------------------------------------------------------------
-void SfxDocTemplate_Impl::GetTemplates( Content& rTargetFolder,
- Content& /*rParentFolder*/,
- RegionData_Impl* pRegion )
-{
- uno::Reference< XResultSet > xResultSet;
- Sequence< OUString > aProps(1);
-
- aProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( TITLE ));
-
- try
- {
- ResultSetInclude eInclude = INCLUDE_DOCUMENTS_ONLY;
- Sequence< NumberedSortingInfo > aSortingInfo(1);
- aSortingInfo.getArray()->ColumnIndex = 1;
- aSortingInfo.getArray()->Ascending = sal_True;
- xResultSet = rTargetFolder.createSortedCursor( aProps, aSortingInfo, m_rCompareFactory, eInclude );
- }
- catch ( Exception& ) {}
-
- if ( xResultSet.is() )
- {
- uno::Reference< XContentAccess > xContentAccess( xResultSet, UNO_QUERY );
- uno::Reference< XRow > xRow( xResultSet, UNO_QUERY );
-
- try
- {
- while ( xResultSet->next() )
- {
- OUString aTitle( xRow->getString(1) );
-
- if ( aTitle.compareToAscii( "sfx.tlx" ) == 0 )
- continue;
-
- OUString aId = xContentAccess->queryContentIdentifierString();
-
- DocTempl_EntryData_Impl* pEntry = pRegion->GetByTargetURL( aId );
-
- if ( ! pEntry )
- {
- OUString aFullTitle;
- if( !GetTitleFromURL( aId, aFullTitle ) )
- {
- DBG_ERRORFILE( "GetTemplates(): template of alien format" );
- continue;
- }
-
- if ( aFullTitle.getLength() )
- aTitle = aFullTitle;
-
- pRegion->AddEntry( aTitle, aId );
- }
- }
- }
- catch ( Exception& ) {}
- }
-}
-
-
-// -----------------------------------------------------------------------
size_t SfxDocTemplate_Impl::GetRegionPos( const OUString& rTitle, sal_Bool& rFound ) const
{
int nCompVal = 1;
diff --git a/unusedcode.easy b/unusedcode.easy
index 7aead6e2e85e..091f61a1932f 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -924,11 +924,7 @@ SfxDispatcher::GetSlotId(String const&)
SfxDispatcher::HasSlot_Impl(unsigned short)
SfxDispatcher::SetModalMode_Impl(unsigned char)
SfxDispatcher::_Execute(SfxSlotServer const&)
-SfxDocTemplate_Impl::GetTemplates(ucbhelper::Content&, ucbhelper::Content&, RegionData_Impl*)
SfxDockingWrapper::GetChildWindowId()
-SfxDocumentTemplates::GetCount(String const&) const
-SfxDocumentTemplates::GetRegionNo(String const&) const
-SfxDocumentTemplates::SaveDir()
SfxEnumMenu::SfxEnumMenu(unsigned short, SfxBindings*, SfxEnumItem const&)
SfxExecuteItem::SfxExecuteItem(unsigned short, unsigned short, unsigned short)
SfxExecuteItem::SfxExecuteItem(unsigned short, unsigned short, unsigned short, SfxPoolItem const*, ...)
@@ -2266,6 +2262,7 @@ binfilter::ScMultipleWriteHeader::~ScMultipleWriteHeader()
binfilter::ScMyContentAction::~ScMyContentAction()
binfilter::ScMyDelAction::~ScMyDelAction()
binfilter::ScMyMoveAction::~ScMyMoveAction()
+binfilter::ScMySharedData::~ScMySharedData()
binfilter::ScRangeFindList::~ScRangeFindList()
binfilter::ScValidationEntries_Impl::Insert(binfilter::ScValidationData* const&, unsigned short&)
binfilter::ScValidationEntries_Impl::Insert(binfilter::ScValidationData* const*, unsigned short)
@@ -2280,6 +2277,7 @@ binfilter::ScriptTypePosInfos::Replace(binfilter::ScriptTypePosInfo const&, unsi
binfilter::ScriptTypePosInfos::Replace(binfilter::ScriptTypePosInfo const*, unsigned short, unsigned short)
binfilter::ScriptTypePosInfos::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::ScriptTypePosInfo const&, void*), void*)
binfilter::SdXMLFilter::SdXMLFilter(binfilter::SfxMedium&, binfilter::SdDrawDocShell&, unsigned char, binfilter::SdXMLFilterMode)
+binfilter::SdrMarkList::InsertEntry(binfilter::SdrMark const&, bool)
binfilter::SdrUnoControlAccessArr::DeleteAndDestroy(unsigned short, unsigned short)
binfilter::SdrUnoControlAccessArr::Insert(binfilter::SdrUnoControlAccess* const&, unsigned short&)
binfilter::SdrUnoControlAccessArr::Insert(binfilter::SdrUnoControlAccess* const*, unsigned short)
@@ -2291,7 +2289,6 @@ binfilter::SfxItemModifyArr_Impl::Replace(binfilter::SfxItemModifyImpl const&, u
binfilter::SfxItemModifyArr_Impl::Replace(binfilter::SfxItemModifyImpl const*, unsigned short, unsigned short)
binfilter::SfxItemModifyArr_Impl::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::SfxItemModifyImpl const&, void*), void*)
binfilter::SfxMultiVarRecordWriter::SfxMultiVarRecordWriter(unsigned char, SvStream*, unsigned short, unsigned char)
-binfilter::SfxPSPropertyArr_Impl::DeleteAndDestroy(unsigned short, unsigned short)
binfilter::SfxPtrArr::Insert(unsigned short, void*)
binfilter::SfxPtrArr::Remove(void*)
binfilter::SfxPtrArr::Replace(void*, void*)