summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/app/app.cxx1
-rw-r--r--lotuswordpro/source/filter/lwpdoc.cxx33
-rw-r--r--lotuswordpro/source/filter/lwpdoc.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpfootnote.cxx24
-rw-r--r--lotuswordpro/source/filter/lwpfootnote.hxx2
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.cxx5
-rw-r--r--lotuswordpro/source/filter/lwpfribtable.hxx1
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsection.cxx5
-rw-r--r--lotuswordpro/source/filter/xfilter/xfsection.hxx2
-rw-r--r--sfx2/inc/inettbc.hxx1
-rw-r--r--sfx2/inc/pch/precompiled_sfx2.hxx1
-rw-r--r--sfx2/source/appl/appserv.cxx1
-rw-r--r--sfx2/source/inet/inettbc.cxx16
-rw-r--r--unotools/Library_utl.mk1
-rw-r--r--unotools/Package_inc.mk1
-rw-r--r--unotools/inc/unotools/regoptions.hxx113
-rw-r--r--unotools/source/config/itemholder1.cxx1
-rw-r--r--unotools/source/config/regoptions.cxx473
-rw-r--r--unusedcode.easy5
-rw-r--r--vcl/inc/vcl/svapp.hxx1
-rw-r--r--vcl/source/app/svapp.cxx22
21 files changed, 3 insertions, 708 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 786ca4d1a511..611234f3d80b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -152,7 +152,6 @@
#include <svtools/apearcfg.hxx>
#include <unotools/misccfg.hxx>
#include <svtools/filter.hxx>
-#include <unotools/regoptions.hxx>
#include "langselect.hxx"
diff --git a/lotuswordpro/source/filter/lwpdoc.cxx b/lotuswordpro/source/filter/lwpdoc.cxx
index 60db658f9d9f..1a4b46676ccc 100644
--- a/lotuswordpro/source/filter/lwpdoc.cxx
+++ b/lotuswordpro/source/filter/lwpdoc.cxx
@@ -406,32 +406,13 @@ void LwpDocument::ParseDocContent(IXFStream* pOutputStream)
LwpObject* pLayoutObj = pDivInfo->GetInitialLayoutID()->obj();
if(pLayoutObj==NULL)
{
- //Cause crash when parsing master document, master document not supported now.
- //ParseMasterDoc(pOutputStream);
+ //master document not supported now.
return;
}
pLayoutObj->SetFoundry(m_pFoundry);
pLayoutObj->Parse(pOutputStream);
}
-/**
- * @descr Parse master doc in this division to IXFStream
- *
- */
-void LwpDocument::ParseMasterDoc(IXFStream* pOutputStream)
-{
- LwpDivInfo* pDivInfo = dynamic_cast<LwpDivInfo*> (m_DivInfo.obj());
- if(pDivInfo==NULL) return;
- LwpAtomHolder* pExternal = pDivInfo->GetExternalName();
- if(pExternal && pExternal->HasValue())
- {
- OUString linkedfilepath = pExternal->str();
- OUString fileURL = LwpTools::convertToFileUrl(OUStringToOString(linkedfilepath, osl_getThreadTextEncoding()));
- XFSection* pSection = new XFSection();
- pSection->SetSourceLink( fileURL);
- pSection->ToXml(pOutputStream);
- delete pSection;
- }
-}
+
/**
* @descr Get the footnoteoptions from the root document
*/
@@ -712,15 +693,7 @@ sal_uInt16 LwpDocument::GetNumberOfPagesBefore()
pRoot->GetNumberOfPages(this,nPageNumber);
return nPageNumber;
}
- /**
- * @descr Get the numbers of page before this division
- */
- sal_uInt16 LwpDocument::GetMaxNumberOfPages()
-{
- sal_uInt16 nPageNumber = 0;
- MaxNumberOfPages(nPageNumber);
- return nPageNumber;
-}
+
/**
* @descr Get Max number of pages
*/
diff --git a/lotuswordpro/source/filter/lwpdoc.hxx b/lotuswordpro/source/filter/lwpdoc.hxx
index 92b41c327a81..a920e648f4d2 100644
--- a/lotuswordpro/source/filter/lwpdoc.hxx
+++ b/lotuswordpro/source/filter/lwpdoc.hxx
@@ -141,7 +141,6 @@ protected:
void RegisterLinenumberStyles();
void RegisterFootnoteStyles();
void RegisterDefaultParaStyles();
- void ParseMasterDoc(IXFStream* pOutputStream);
public:
void Parse(IXFStream* pOutputStream);
@@ -178,7 +177,6 @@ public:
LwpDocument* GetFirstDivision();
LwpVirtualLayout* GetEnSuperTableLayout();
sal_Bool GetNumberOfPages(LwpDocument* pEndDivision, sal_uInt16& nCount);
- sal_uInt16 GetMaxNumberOfPages();
sal_uInt16 GetNumberOfPagesBefore();
void ParseFrameInPage(IXFStream* pOutputStream);
diff --git a/lotuswordpro/source/filter/lwpfootnote.cxx b/lotuswordpro/source/filter/lwpfootnote.cxx
index 686c7d34d5c7..dd399c221952 100644
--- a/lotuswordpro/source/filter/lwpfootnote.cxx
+++ b/lotuswordpro/source/filter/lwpfootnote.cxx
@@ -382,30 +382,6 @@ LwpEnSuperTableLayout* LwpFootnote::FindFootnoteTableLayout()
}
/**
- * @descr Find footnote table, not used now
- */
-LwpTable* LwpFootnote::FindFootnoteTable()
-{
- LwpEnSuperTableLayout* pLayout = FindFootnoteTableLayout();
- //if (!ShouldBeInTable(Footnote)) return NULL;
- return GetFootnoteTable(pLayout);
-}
-
-/**
- * @descr Find footnote table, not used now
- */
-LwpTable* LwpFootnote::GetFootnoteTable(LwpEnSuperTableLayout * pLayout)
-{
- if(pLayout)
- {
- LwpEndnoteLayout* pEndnoteLayout = static_cast<LwpEndnoteLayout*>(pLayout->GetMainTableLayout());
- if(pEndnoteLayout)
- return dynamic_cast<LwpTable*>(pEndnoteLayout->GetContent()->obj());
- }
- return NULL;
-}
-
-/**
* @descr Find footnote contents
*/
LwpContent* LwpFootnote::FindFootnoteContent()
diff --git a/lotuswordpro/source/filter/lwpfootnote.hxx b/lotuswordpro/source/filter/lwpfootnote.hxx
index 054b126f6b7a..8eb8b54964f2 100644
--- a/lotuswordpro/source/filter/lwpfootnote.hxx
+++ b/lotuswordpro/source/filter/lwpfootnote.hxx
@@ -145,8 +145,6 @@ private:
LwpDocument* GetFootnoteTableDivision();
LwpDocument* GetEndnoteDivision(LwpDocument* pPossible);
LwpEnSuperTableLayout* FindFootnoteTableLayout();
- LwpTable* FindFootnoteTable();
- LwpTable* GetFootnoteTable(LwpEnSuperTableLayout* pLayout);
LwpContent* FindFootnoteContent();
OUString GetTableClass();
};
diff --git a/lotuswordpro/source/filter/lwpfribtable.cxx b/lotuswordpro/source/filter/lwpfribtable.cxx
index 67c320fa1cd0..33e3cfe1c6b5 100644
--- a/lotuswordpro/source/filter/lwpfribtable.cxx
+++ b/lotuswordpro/source/filter/lwpfribtable.cxx
@@ -94,11 +94,6 @@ void LwpFribTable::RegisterNewStyle()
}
}
-void LwpFribTable::Parse(IXFStream* pOutputStream)
-{
- GetSuperTable()->Parse(pOutputStream);
-}
-
void LwpFribTable::XFConvert(XFContentContainer* pCont)
{
XFContentContainer* pXFContentContainer = pCont;
diff --git a/lotuswordpro/source/filter/lwpfribtable.hxx b/lotuswordpro/source/filter/lwpfribtable.hxx
index 20f312292577..5d624fe76018 100644
--- a/lotuswordpro/source/filter/lwpfribtable.hxx
+++ b/lotuswordpro/source/filter/lwpfribtable.hxx
@@ -67,7 +67,6 @@ public:
void Read(LwpObjectStream* pObjStrm, sal_uInt16 len);
LwpSuperTableLayout* GetSuperTable();
void RegisterNewStyle();
- void Parse(IXFStream* pOutputStream);
virtual void XFConvert(XFContentContainer* pCont);
private:
LwpObjectID m_objTable;
diff --git a/lotuswordpro/source/filter/xfilter/xfsection.cxx b/lotuswordpro/source/filter/xfilter/xfsection.cxx
index 2702677fed79..dc3182285625 100644
--- a/lotuswordpro/source/filter/xfilter/xfsection.cxx
+++ b/lotuswordpro/source/filter/xfilter/xfsection.cxx
@@ -75,11 +75,6 @@ void XFSection::SetSectionName(rtl::OUString name)
m_strSectionName = name;
}
-void XFSection::SetSourceLink( rtl::OUString link)
-{
- m_strSourceLink = link;
-}
-
void XFSection::SetProtected(sal_Bool bProtected)
{
m_bProtected = bProtected;
diff --git a/lotuswordpro/source/filter/xfilter/xfsection.hxx b/lotuswordpro/source/filter/xfilter/xfsection.hxx
index cc700a9b3468..e2ae2e9aef97 100644
--- a/lotuswordpro/source/filter/xfilter/xfsection.hxx
+++ b/lotuswordpro/source/filter/xfilter/xfsection.hxx
@@ -82,8 +82,6 @@ public:
*/
void SetSectionName(rtl::OUString name);
- void SetSourceLink(rtl::OUString link);
-
/**
* @descr Set protected.
*/
diff --git a/sfx2/inc/inettbc.hxx b/sfx2/inc/inettbc.hxx
index f0a73404320c..abc2e55d2339 100644
--- a/sfx2/inc/inettbc.hxx
+++ b/sfx2/inc/inettbc.hxx
@@ -51,7 +51,6 @@ private:
DECL_LINK( OpenHdl, void* );
DECL_LINK( SelectHdl, void* );
- DECL_LINK( WindowEventListener, VclSimpleEvent* );
struct ExecuteInfo
{
diff --git a/sfx2/inc/pch/precompiled_sfx2.hxx b/sfx2/inc/pch/precompiled_sfx2.hxx
index f5a7c5a4187e..6fcc0d0ac1c1 100644
--- a/sfx2/inc/pch/precompiled_sfx2.hxx
+++ b/sfx2/inc/pch/precompiled_sfx2.hxx
@@ -548,7 +548,6 @@
#include "svtools/printoptions.hxx"
#include "unotools/printwarningoptions.hxx"
#include "svl/rectitem.hxx"
-#include "unotools/regoptions.hxx"
#include "unotools/saveopt.hxx"
#include "unotools/searchopt.hxx"
#include "unotools/securityoptions.hxx"
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index b31203592134..d0b0ba7d23f6 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -77,7 +77,6 @@
#include <unotools/pathoptions.hxx>
#include <unotools/moduleoptions.hxx>
-#include <unotools/regoptions.hxx>
#include <svtools/helpopt.hxx>
#include <svtools/miscopt.hxx>
#include <toolkit/helper/vclunohelper.hxx>
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 9504049e5ec5..2986de1fdc27 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -211,22 +211,6 @@ IMPL_LINK( SfxURLToolBoxControl_Impl, OpenHdl, void*, EMPTYARG )
return 1L;
}
-IMPL_LINK( SfxURLToolBoxControl_Impl, WindowEventListener, VclSimpleEvent*, pEvent )
-{
- if ( pAccExec &&
- pEvent &&
- pEvent->ISA( VclWindowEvent ) &&
- ( pEvent->GetId() == VCLEVENT_WINDOW_KEYINPUT ))
- {
- VclWindowEvent* pWinEvent = static_cast< VclWindowEvent* >( pEvent );
- KeyEvent* pKeyEvent = static_cast< KeyEvent* >( pWinEvent->GetData() );
-
- pAccExec->execute( pKeyEvent->GetKeyCode() );
- }
-
- return 1;
-}
-
//***************************************************************************
void SfxURLToolBoxControl_Impl::StateChanged
diff --git a/unotools/Library_utl.mk b/unotools/Library_utl.mk
index 617169f64d9d..54b22c75f58d 100644
--- a/unotools/Library_utl.mk
+++ b/unotools/Library_utl.mk
@@ -108,7 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,utl,\
unotools/source/config/optionsdlg \
unotools/source/config/pathoptions \
unotools/source/config/printwarningoptions \
- unotools/source/config/regoptions \
unotools/source/config/saveopt \
unotools/source/config/searchopt \
unotools/source/config/securityoptions \
diff --git a/unotools/Package_inc.mk b/unotools/Package_inc.mk
index a616cf92c2ab..d5958aa5578d 100644
--- a/unotools/Package_inc.mk
+++ b/unotools/Package_inc.mk
@@ -87,7 +87,6 @@ $(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/propertysethelper.hx
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/propertysetinfo.hxx,unotools/propertysetinfo.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/querydeep.hxx,unotools/querydeep.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/readwritemutexguard.hxx,unotools/readwritemutexguard.hxx))
-$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/regoptions.hxx,unotools/regoptions.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/regpathhelper.hxx,unotools/regpathhelper.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/saveopt.hxx,unotools/saveopt.hxx))
$(eval $(call gb_Package_add_file,unotools_inc,inc/unotools/searchopt.hxx,unotools/searchopt.hxx))
diff --git a/unotools/inc/unotools/regoptions.hxx b/unotools/inc/unotools/regoptions.hxx
deleted file mode 100644
index 639e08ad836c..000000000000
--- a/unotools/inc/unotools/regoptions.hxx
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef unotools_REGOPTIONS_HXX
-#define unotools_REGOPTIONS_HXX
-
-#include "unotools/unotoolsdllapi.h"
-#include <tools/string.hxx>
-
-//........................................................................
-namespace utl
-{
-//........................................................................
-
- //====================================================================
- //= RegOptions
- //====================================================================
- class RegOptionsImpl;
- /** encapsulates access to the configuration settings for registering the product
- */
- class UNOTOOLS_DLLPUBLIC RegOptions
- {
- private:
- RegOptionsImpl* m_pImpl;
-
- // the impl class is constructed upon need only (as this is expensive)
- UNOTOOLS_DLLPRIVATE void ensureImpl( );
-
- public:
- RegOptions( );
- ~RegOptions( );
-
- // retrieves the URL which should be used for online registration
- String getRegistrationURL( ) const;
-
- enum DialogPermission
- { // the registration dialog shall be executed ....
- dpDisabled, // ... never - it has been disabled
- dpNotThisSession, // ... later - no statement when, but _not now_
- dpRemindLater, // ... later at a reminder date
- dpThisSession // ... during this session
- };
-
- /** checks if the registration dialog is allowed
- <p>A return value of <TRUE/> does not mean that during this session, the dialog is allowed to
- be executed. It simply means executing it is allowed <em>in general</em></p>
- */
- DialogPermission getDialogPermission( ) const;
-
- /** claims that the current session is done with respect to the registration dialog.
-
- <p>This is not to be called if <method>getDialogPermission</method> returned dpDisabled previously<p>
- <p>The behaviour changes as follows:
- <ul>
- <li>any subsequent calls to <method>getDialogPermission</method> will return dpNotThisSession, given
- that it previously returned dpNotThisSession</li>
- <li>any subsequent calls to <method>getDialogPermission</method> will return dpDisabled, given
- that it previously returned dpThisSession</li>
- <li>an internal (persistent) session counter is updated, so that during the next session,
- <method>getDialogPermission</method> <em>may</em> return dpThisSession</li>
- </ul></p>
- */
- void markSessionDone( );
-
- /** activates the reminder
-
- <p>If this method is called, the reminder for the dialog will be activated.
- This means that during the next <arg>_nDaysFromNow</arg>-1 days,
- <method>getDialogPermission</method> will return dpRemindLater</p>,
- at the <arg>_nDaysFromNow</arg>th day from today onwards it will
- return dpThisSession.</p>
-
- <p>It is not allowed to call this method if the dialog is currently disabled.</p>
-
- <p>If the current session has not been marked as done already
- (i.e., <method>markSessionDone</method> has not been called, yet), this is
- done implicitly when you call <method>activateReminder</method>.</p>
- */
- void activateReminder( sal_Int32 _nDaysFromNow );
- };
-
-//........................................................................
-} // namespace utl
-//........................................................................
-
-#endif // unotools_REGOPTIONS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 298144cfcb7e..ee96bc83e322 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -57,7 +57,6 @@
#include <unotools/moduleoptions.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/printwarningoptions.hxx>
-#include <unotools/regoptions.hxx>
#include <unotools/optionsdlg.hxx>
#include <unotools/saveopt.hxx>
#include <unotools/searchopt.hxx>
diff --git a/unotools/source/config/regoptions.cxx b/unotools/source/config/regoptions.cxx
deleted file mode 100644
index cb6134a3d097..000000000000
--- a/unotools/source/config/regoptions.cxx
+++ /dev/null
@@ -1,473 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_unotools.hxx"
-#include <unotools/regoptions.hxx>
-#include <unotools/confignode.hxx>
-#include <tools/date.hxx>
-#include <comphelper/processfactory.hxx>
-#include <osl/mutex.hxx>
-#include <unotools/bootstrap.hxx>
-#include <rtl/ustring.hxx>
-#include <rtl/instance.hxx>
-
-//........................................................................
-namespace utl
-{
-//........................................................................
-
- using namespace ::com::sun::star::uno;
-
- //====================================================================
- //= local helpers
- //====================================================================
- //--------------------------------------------------------------------
- /** converts a string representation of a date into a integer representation
- <p>No semantic check is made, i.e. if the string describes the 40.12, this is not recognized. In opposite,
- the string must have a valid structure (DD.MM.YYYY).</p>
- @return
- the integer representation of the date which can be used with the Date class,
- or 0 if the given string was no valid date representation
- */
- static sal_Int32 lcl_convertString2Date( const ::rtl::OUString& _rStringRep )
- {
- sal_Int32 nDateIntRep = 0;
- if ( _rStringRep.getLength() == 2 + 1 + 2 + 1 + 4 ) // DD.MM.YYYY
- {
- // validate the string
- sal_Bool bValid = sal_True;
-
- const sal_Unicode* pStringRep = _rStringRep.getStr();
- sal_Int32 nLen = _rStringRep.getLength();
- for ( sal_Int32 nPos = 0;
- bValid && ( nPos < nLen );
- ++nPos, ++pStringRep
- )
- {
- if ( ( 2 == nPos ) || ( 5 == nPos ) )
- bValid = '.' == *pStringRep; // the number separators
- else
- bValid = ( *pStringRep >= '0' ) && ( *pStringRep <= '9' );
- }
-
- // passed the test?
- if ( bValid )
- {
- Date aDate;
- aDate.SetDay ( (sal_uInt16)_rStringRep.copy( 0, 2 ).toInt32( ) );
- aDate.SetMonth ( (sal_uInt16)_rStringRep.copy( 3, 2 ).toInt32( ) );
- aDate.SetYear ( (sal_uInt16)_rStringRep.copy( 6, 4 ).toInt32( ) );
- nDateIntRep = aDate.GetDate();
- }
- }
-
- return nDateIntRep;
- }
-
- //--------------------------------------------------------------------
- static const ::rtl::OUString& lcl_fillToken( const sal_Int32 /* [in] */ _nToken, const sal_Int16 /* [in] */ _nDigits, ::rtl::OUString& /* [out] */ _rToken )
- {
- // convert into string
- ::rtl::OUString sLeanToken = ::rtl::OUString::valueOf( _nToken );
- // check length
- if ( sLeanToken.getLength() < _nDigits )
- { // fill
- OSL_ENSURE( _nDigits <= 4, "lcl_fillToken: invalid digit number!" );
- _rToken = ::rtl::OUString( "0000", _nDigits - sLeanToken.getLength(), RTL_TEXTENCODING_ASCII_US );
- _rToken += sLeanToken;
- }
- else
- _rToken = sLeanToken;
-
- return _rToken;
- }
-
- //--------------------------------------------------------------------
- /** converts a integer representation of a date into a string representation
- */
- static ::rtl::OUString lcl_ConvertDate2String( const Date& _rDate )
- {
- OSL_ENSURE( _rDate.IsValid(), "lcl_ConvertDate2String: invalid integer representation!" );
-
- sal_Unicode cSeparator( '.' );
- ::rtl::OUString sSeparator( &cSeparator, 1 );
-
- ::rtl::OUString sStringRep;
- ::rtl::OUString sToken;
- sStringRep += lcl_fillToken( (sal_Int32)_rDate.GetDay(), 2, sToken );
- sStringRep += sSeparator;
- sStringRep += lcl_fillToken( (sal_Int32)_rDate.GetMonth(), 2, sToken );
- sStringRep += sSeparator;
- sStringRep += lcl_fillToken( (sal_Int32)_rDate.GetYear(), 4, sToken );
-
- return sStringRep;
- }
-
- //--------------------------------------------------------------------
- /// checks whether a given trigger date is reached (i.e. is _before_ the current date)
- static sal_Bool lcl_reachedTriggerDate( const Date& _rTriggerDate )
- {
- return _rTriggerDate <= Date();
- }
-
- //--------------------------------------------------------------------
- #define DECLARE_STATIC_LAZY_USTRING( name ) \
- static const ::rtl::OUString& lcl_get##name##Name() \
- { \
- static const ::rtl::OUString sName(RTL_CONSTASCII_USTRINGPARAM( #name )); \
- return sName; \
- }
-
- DECLARE_STATIC_LAZY_USTRING( ReminderDate );
- DECLARE_STATIC_LAZY_USTRING( RequestDialog );
- DECLARE_STATIC_LAZY_USTRING( ShowMenuItem );
- DECLARE_STATIC_LAZY_USTRING( Patch );
-
- //====================================================================
- //= RegOptionsImpl
- //====================================================================
- class RegOptionsImpl
- {
- private:
- OConfigurationTreeRoot m_aRegistrationNode; // the configuration node we need to access our persistent data
-
- String m_sRegistrationURL; // the URL to use when doing an online registration
- Date m_aReminderDate; // the reminder date as found in the configuration
- sal_Int32 m_nDialogCounter; // the dialog counter - see getDialogPermission
- sal_Bool m_bShowMenuItem; // the flag indicating if the registration menu item is allowed
-
- static RegOptionsImpl* s_pSingleInstance; // the one and only instance of this class
- static sal_Int32 s_nInstanceCount; // reference counter for the instances
- static sal_Bool s_bThisSessionDone; // the flag indicating if for this session, everything beeing relevant has already been done
-
- private:
- RegOptionsImpl( );
-
- static ::osl::Mutex& getStaticMutex(); // get the mutex used to protect the static members of this class
-
- void commit( );
- sal_Int32 getBuildId() const;
-
- private:
- RegOptions::DialogPermission implGetDialogPermission( ) const;
-
- public:
- static RegOptionsImpl* registerClient( );
- static void revokeClient( );
-
- inline sal_Bool hasURL( ) const { return ( 0 != m_sRegistrationURL.Len() ); }
- inline String getRegistrationURL( ) const { return m_sRegistrationURL; }
-
- RegOptions::DialogPermission getDialogPermission( ) const;
- void markSessionDone( );
- void activateReminder( sal_Int32 _nDaysFromNow );
- void removeReminder();
- };
-
- //--------------------------------------------------------------------
- RegOptionsImpl* RegOptionsImpl::s_pSingleInstance = NULL;
- sal_Bool RegOptionsImpl::s_bThisSessionDone = sal_False;
- sal_Int32 RegOptionsImpl::s_nInstanceCount = 0;
-
- namespace
- {
- class theRegOptionsImplMutex : public rtl::Static<osl::Mutex, theRegOptionsImplMutex>{};
- }
-
- //--------------------------------------------------------------------
- ::osl::Mutex& RegOptionsImpl::getStaticMutex()
- {
- return theRegOptionsImplMutex::get();
- }
-
- //--------------------------------------------------------------------
- void RegOptionsImpl::commit( )
- {
- m_aRegistrationNode.commit( );
- }
-
- //--------------------------------------------------------------------
- RegOptionsImpl* RegOptionsImpl::registerClient( )
- {
- ::osl::MutexGuard aGuard( getStaticMutex() );
-
- if ( !s_pSingleInstance )
- s_pSingleInstance = new RegOptionsImpl;
-
- ++s_nInstanceCount;
- return s_pSingleInstance;
- }
-
- //--------------------------------------------------------------------
- void RegOptionsImpl::revokeClient( )
- {
- ::osl::MutexGuard aGuard( getStaticMutex() );
- OSL_ENSURE( s_nInstanceCount, "RegOptionsImpl::revokeClient: there are no clients alive!" );
- OSL_ENSURE( s_pSingleInstance || !s_nInstanceCount, "RegOptionsImpl::revokeClient: invalid instance pointer!" );
-
- if ( s_nInstanceCount )
- {
- if ( s_pSingleInstance )
- // commit the changes done by this client
- s_pSingleInstance->commit();
-
- if ( 0 == --s_nInstanceCount )
- {
- delete s_pSingleInstance;
- s_pSingleInstance = NULL;
- }
- }
- }
-
- //--------------------------------------------------------------------
- RegOptionsImpl::RegOptionsImpl( )
- :m_nDialogCounter ( 0 )
- ,m_bShowMenuItem ( sal_False )
- {
- // create the config node for all our registration information
- m_aRegistrationNode = OConfigurationTreeRoot::createWithServiceFactory(
- ::comphelper::getProcessServiceFactory(),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Help/Registration"))
- );
-
- // cache some data
- //the URL to use for online registration
- ::rtl::OUString sStringValue;
- m_aRegistrationNode.getNodeValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) ) >>= sStringValue;
- m_sRegistrationURL = sStringValue;
-
- // the state of the dialog
- m_aRegistrationNode.getNodeValue( lcl_getRequestDialogName() ) >>= m_nDialogCounter;
-
- // the flag for showing the menu item
- sal_Bool bBoolValue = sal_False;
- m_aRegistrationNode.getNodeValue( lcl_getShowMenuItemName() ) >>= bBoolValue;
- m_bShowMenuItem = bBoolValue;
-
- // the reminder date (if any)
- sal_Int32 nIntDate = 0;
- sStringValue = ::rtl::OUString();
- m_aRegistrationNode.getNodeValue( lcl_getReminderDateName() ) >>= sStringValue;
- bool bIsPatchDate = ( sStringValue.equals( lcl_getPatchName() ) != sal_False );
- if ( !bIsPatchDate && sStringValue.getLength() )
- nIntDate = lcl_convertString2Date( sStringValue );
- m_aReminderDate.SetDate( nIntDate );
- }
-
- //--------------------------------------------------------------------
- RegOptions::DialogPermission RegOptionsImpl::implGetDialogPermission( ) const
- {
- RegOptions::DialogPermission eResult = RegOptions::dpDisabled;
- // no URL or a counter already decreased to zero means the dialog is disabled
- if ( hasURL() && ( m_nDialogCounter > 0 ) )
- {
- // during every session, the counter will be decreased
- // If it reaches zero, the dialog shall be executed
- if ( 1 == m_nDialogCounter )
- {
- if ( m_aReminderDate.IsValid( ) )
- { // valid reminder date
- // assume remind later
- eResult = RegOptions::dpRemindLater;
- // and check if we reached the reminder date
- if ( lcl_reachedTriggerDate( m_aReminderDate ) )
- eResult = RegOptions::dpThisSession;
- }
- else
- eResult = RegOptions::dpThisSession; // execute in this session
- }
- else
- eResult = RegOptions::dpNotThisSession; // first trigger session not reached
-
- // a last check ....
- if ( ( s_bThisSessionDone ) // this session is already marked as "done"
- && ( RegOptions::dpThisSession == eResult )// but without this, the state would be "now"
- )
- eResult = RegOptions::dpDisabled; // -> change state to "disabled"
- }
-
- return eResult;
- }
-
- //--------------------------------------------------------------------
- RegOptions::DialogPermission RegOptionsImpl::getDialogPermission( ) const
- {
- OSL_ENSURE( !s_bThisSessionDone, "RegOptionsImpl::getDialogPermission: should never be asked in this session, again!" );
- // Somebody already marked this session as "everything relevant happened". So why sombody (else?) asks
- // me again?
-
- return implGetDialogPermission( );
- }
-
- //--------------------------------------------------------------------
- void RegOptionsImpl::activateReminder( sal_Int32 _nDaysFromNow )
- {
- OSL_ENSURE( s_bThisSessionDone || ( implGetDialogPermission( ) != RegOptions::dpDisabled ), "RegOptionsImpl::activateReminder: invalid call!" );
- OSL_ENSURE( _nDaysFromNow > 0, "RegOptionsImpl::activateReminder: invalid argument!" );
-
- // calc the reminder
- m_aReminderDate = Date() + _nDaysFromNow; // today (default ctor) + days
-
- // remember the date
- m_aRegistrationNode.setNodeValue(
- lcl_getReminderDateName(),
- makeAny( lcl_ConvertDate2String( m_aReminderDate ) )
- );
- // to be on the save side, write the counter
- m_aRegistrationNode.setNodeValue(
- lcl_getRequestDialogName(),
- makeAny( (sal_Int32)1 )
- );
-
- // mark this session as done
- if ( !s_bThisSessionDone )
- markSessionDone( );
- }
-
- //--------------------------------------------------------------------
- void RegOptionsImpl::removeReminder()
- {
- ::rtl::OUString aDefault;
- ::rtl::OUString aReminderValue( lcl_getPatchName() );
- aReminderValue += ::rtl::OUString::valueOf(getBuildId());
-
- m_aRegistrationNode.setNodeValue(
- lcl_getReminderDateName(),
- Any( aReminderValue )
- );
- }
-
- //--------------------------------------------------------------------
- sal_Int32 RegOptionsImpl::getBuildId() const
- {
- sal_Int32 nBuildId( 0 );
- ::rtl::OUString aDefault;
- ::rtl::OUString aBuildIdData = utl::Bootstrap::getBuildIdData( aDefault );
- sal_Int32 nIndex1 = aBuildIdData.indexOf(':');
- sal_Int32 nIndex2 = aBuildIdData.indexOf(')');
- if (( nIndex1 > 0 ) && ( nIndex2 > 0 ) && ( nIndex2-1 > nIndex1+1 ))
- {
- ::rtl::OUString aBuildId = aBuildIdData.copy( nIndex1+1, nIndex2-nIndex1-1 );
- nBuildId = aBuildId.toInt32();
- }
-
- return nBuildId;
- }
-
- //--------------------------------------------------------------------
- void RegOptionsImpl::markSessionDone( )
- {
- OSL_ENSURE( !s_bThisSessionDone, "RegOptionsImpl::markSessionDone: already marked!" );
- OSL_ENSURE( implGetDialogPermission( ) != RegOptions::dpDisabled, "RegOptionsImpl::markSessionDone: invalid call!" );
- if ( !s_bThisSessionDone )
- {
- RegOptions::DialogPermission eOldPermission = implGetDialogPermission( );
-
- s_bThisSessionDone = sal_True;
-
- if ( RegOptions::dpRemindLater == eOldPermission )
- { // no action required. If we shall remind later, the counter is already at 1, we should not change this,
- // as the next smaller number (which is 0 :) means that the dialog would be disabled
- OSL_ENSURE( 1 == m_nDialogCounter, "RegOptionsImpl::markSessionDone: invalid session counter (1)!" );
- }
- else
- {
- OSL_ENSURE( m_nDialogCounter > 0, "RegOptionsImpl::markSessionDone: invalid session counter (2)!" );
- --m_nDialogCounter;
-
- // decrease the session counter
- m_aRegistrationNode.setNodeValue(
- lcl_getRequestDialogName(),
- makeAny( (sal_Int32)m_nDialogCounter )
- );
-
- // and clear the reminder date
- removeReminder();
- }
- }
- }
-
- //====================================================================
- //= RegOptions
- //====================================================================
- //--------------------------------------------------------------------
- RegOptions::RegOptions()
- :m_pImpl( NULL )
- {
- }
-
- //--------------------------------------------------------------------
- void RegOptions::ensureImpl( )
- {
- if ( !m_pImpl )
- m_pImpl = RegOptionsImpl::registerClient();
- }
-
- //--------------------------------------------------------------------
- RegOptions::~RegOptions()
- {
- if ( m_pImpl )
- {
- RegOptionsImpl::revokeClient();
- m_pImpl = NULL;
- }
- }
-
- //--------------------------------------------------------------------
- String RegOptions::getRegistrationURL( ) const
- {
- const_cast< RegOptions* >( this )->ensureImpl( );
- return m_pImpl->getRegistrationURL();
- }
-
- //--------------------------------------------------------------------
- RegOptions::DialogPermission RegOptions::getDialogPermission( ) const
- {
- const_cast< RegOptions* >( this )->ensureImpl( );
- return m_pImpl->getDialogPermission();
- }
-
- //--------------------------------------------------------------------
- void RegOptions::markSessionDone( )
- {
- const_cast< RegOptions* >( this )->ensureImpl( );
- m_pImpl->markSessionDone();
- }
-
- //--------------------------------------------------------------------
- void RegOptions::activateReminder( sal_Int32 _nDaysFromNow )
- {
- const_cast< RegOptions* >( this )->ensureImpl( );
- m_pImpl->activateReminder( _nDaysFromNow );
- }
-//........................................................................
-} // namespace utl
-//........................................................................
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index cbce2632d017..a979058b9159 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -343,10 +343,6 @@ LwpCharacterBorderOverride::Override(LwpCharacterBorderOverride*)
LwpDLList::LwpDLList(LwpDLList*, LwpDLList*)
LwpDocData::SkipAtomHandler(LwpSvStream*)
LwpDocData::SkipExtra(LwpSvStream*)
-LwpDocument::GetMaxNumberOfPages()
-LwpDocument::ParseMasterDoc(IXFStream*)
-LwpFootnote::FindFootnoteTable()
-LwpFribTable::Parse(IXFStream*)
MSDffImportRecords::Insert(MSDffImportRecords const*, unsigned short, unsigned short)
MSDffImportRecords::Insert(SvxMSDffImportRec* const&, unsigned short&)
MSDffImportRecords::Insert(SvxMSDffImportRec* const*, unsigned short)
@@ -1017,7 +1013,6 @@ SfxULongRanges::SfxULongRanges(int, int, int, ...)
SfxULongRanges::SfxULongRanges(unsigned long const*)
SfxULongRanges::SfxULongRanges(unsigned long, unsigned long)
SfxULongRangesItem::SfxULongRangesItem(unsigned short, unsigned int const*)
-SfxURLToolBoxControl_Impl::LinkStubWindowEventListener(void*, void*)
SfxUShortRanges::Contains(unsigned short) const
SfxUShortRanges::Intersects(SfxUShortRanges const&) const
SfxUShortRanges::SfxUShortRanges(int, int, int, ...)
diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx
index aca31df7aea4..07f75f549dda 100644
--- a/vcl/inc/vcl/svapp.hxx
+++ b/vcl/inc/vcl/svapp.hxx
@@ -297,7 +297,6 @@ public:
static sal_Bool IsProcessedMouseOrKeyEvent( sal_uLong nEventId );
static sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL );
- static sal_Bool PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData = NULL );
static sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL );
static void RemoveUserEvent( sal_uLong nUserEvent );
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 9af5f08bdbfa..df0625c93c9b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1030,28 +1030,6 @@ sal_uLong Application::PostUserEvent( const Link& rLink, void* pCaller )
// -----------------------------------------------------------------------
-sal_Bool Application::PostUserEvent( sal_uLong& rEventId, sal_uLong nEvent, void* pEventData )
-{
- ImplSVEvent* pSVEvent = new ImplSVEvent;
- pSVEvent->mnEvent = nEvent;
- pSVEvent->mpData = pEventData;
- pSVEvent->mpLink = NULL;
- pSVEvent->mpWindow = NULL;
- pSVEvent->mbCall = sal_True;
- rEventId = (sal_uLong)pSVEvent;
- Window* pDefWindow = ImplGetDefaultWindow();
- if ( pDefWindow && pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) )
- return sal_True;
- else
- {
- rEventId = 0;
- delete pSVEvent;
- return sal_False;
- }
-}
-
-// -----------------------------------------------------------------------
-
sal_Bool Application::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller )
{
ImplSVEvent* pSVEvent = new ImplSVEvent;