summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-03-04 22:35:39 +0000
committerKurt Zenker <kz@openoffice.org>2009-03-04 22:35:39 +0000
commit53ed5b28539b06d7664a80ff693259e68cd50d08 (patch)
treef62a2495dbc1b5499aa993816202f9c08d8159eb
parenta64aacd32a2837e56cc2fc91d73cdbb86691dbea (diff)
CWS-TOOLING: integrate CWS oooimprovement3
2009-02-26 16:28:11 +0100 jsk r268533 : #i99197# 2009-02-26 15:03:06 +0100 jsk r268524 : #i99197# 2009-02-26 15:00:34 +0100 jsk r268522 : i99187# 2009-02-23 13:37:17 +0100 b_michaelsen r268353 : #i99491# fixing OStringBuffer construction. thanks, tono 2009-02-18 17:31:06 +0100 b_michaelsen r268247 : cleaned mixup between base and brand layer 2009-02-17 15:00:48 +0100 b_michaelsen r268172 : fixed treeopt.cxx 2009-02-17 14:59:04 +0100 b_michaelsen r268171 : catching all exceptions 2009-02-16 14:06:33 +0100 jsk r267805 : #i99197# 2009-02-16 14:05:30 +0100 jsk r267804 : #i99197# 2009-02-16 14:04:35 +0100 jsk r267803 : #i99197# 2009-02-13 17:45:43 +0100 b_michaelsen r267735 : #i98981# ensure logging of accelerators 2009-02-13 16:53:59 +0100 b_michaelsen r267732 : #i98741# deploying usage tracking enabling xcu with BUILD SPECIAL 2009-02-13 16:52:40 +0100 b_michaelsen r267731 : #i98741# delivering usage tracking enabling xcu 2009-02-13 16:43:55 +0100 b_michaelsen r267730 : #i98981# adding abbrevation for accerators 2009-02-12 16:53:59 +0100 b_michaelsen r267678 : #i98981# diasble logging of key events 2009-02-12 16:11:23 +0100 b_michaelsen r267673 : #i98981# reliable way to toggle usage tracking 2009-02-12 16:10:13 +0100 b_michaelsen r267672 : #i98981# reliable way to toggle usage tracking
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Logging.xcs7
-rw-r--r--svx/source/dialog/treeopt.cxx64
2 files changed, 42 insertions, 29 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Logging.xcs b/officecfg/registry/schema/org/openoffice/Office/Logging.xcs
index d303c1c988..5c2f2f1b4f 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Logging.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Logging.xcs
@@ -89,11 +89,10 @@
</info>
<prop oor:name="EnablingAllowed" oor:type="xs:boolean">
<info>
- <desc>if true and the OOoImprovement Extension is installed, userinterface events (clicks on toolbars and menus for
- example) will get logged in a CSV-File. Sending these files to the
- OpenOffice.org team helps optimizing the user experience.</desc>
+ <desc>only if this is true, usage tracking is allowed and its options will be shown
+ </desc>
</info>
- <value>true</value>
+ <value>false</value>
</prop>
<prop oor:name="LogPath" oor:type="xs:string">
<info>
diff --git a/svx/source/dialog/treeopt.cxx b/svx/source/dialog/treeopt.cxx
index e79abcbf23..b51492a22b 100644
--- a/svx/source/dialog/treeopt.cxx
+++ b/svx/source/dialog/treeopt.cxx
@@ -55,6 +55,7 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
+#include <com/sun/star/oooimprovement/XCoreController.hpp>
#include <comphelper/configurationhelper.hxx>
#include <com/sun/star/awt/XDialogProvider.hpp>
#include <com/sun/star/awt/XDialogProvider2.hpp>
@@ -1892,18 +1893,15 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
for ( i = 1; i < nEnd; ++i )
{
- bool bImprovePage = false;
+ String sNewTitle = rGeneralArray.GetString(i);
nPageId = (sal_uInt16)rGeneralArray.GetValue(i);
if ( lcl_isOptionHidden( nPageId, aOptionsDlgOpt ) )
continue;
// Disable Online Update page if service not installed
- if( RID_SVXPAGE_ONLINEUPDATE == nPageId || RID_SVXPAGE_IMPROVEMENT == nPageId )
+ if( RID_SVXPAGE_ONLINEUPDATE == nPageId )
{
- bImprovePage = ( RID_SVXPAGE_IMPROVEMENT == nPageId );
- ::rtl::OUString sService = bImprovePage ?
- C2U("com.sun.star.oooimprovement.CoreController") :
- C2U("com.sun.star.setup.UpdateCheck");
+ const ::rtl::OUString sService = C2U("com.sun.star.setup.UpdateCheck");
try
{
@@ -1917,33 +1915,49 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
continue;
}
+ }
+ // Disable OOoImprovement page if not enabled
+ if( RID_SVXPAGE_IMPROVEMENT == nPageId )
+ {
+ const ::rtl::OUString sService = C2U("com.sun.star.oooimprovement.CoreController");
+
+ try
+ {
+ Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
+ Reference < ::com::sun::star::oooimprovement::XCoreController > xService( xFactory->createInstance( sService ), UNO_QUERY );
+
+ if( ! xService.is() )
+ continue;
+ if( ! xService->showBuiltinOptionsPage(1))
+ continue;
+ }
+ catch ( ::com::sun::star::loader::CannotActivateFactoryException& )
+ {
+ continue;
+ }
- if ( bImprovePage )
+ SvxEmptyPage* pTempPage = new SvxEmptyPage( this );
+ sPageTitle = pTempPage->GetText();
+ delete pTempPage;
+ xub_StrLen nPos = sPageTitle.Search( rGeneralArray.GetString(0) );
+ if ( nPos != STRING_NOTFOUND )
{
- SvxEmptyPage* pTempPage = new SvxEmptyPage( this );
- sPageTitle = pTempPage->GetText();
- delete pTempPage;
- xub_StrLen nPos = sPageTitle.Search( rGeneralArray.GetString(0) );
- if ( nPos != STRING_NOTFOUND )
+ xub_StrLen nLen = rGeneralArray.GetString(0).Len();
+ if ( sPageTitle.GetChar( nPos + nLen ) == ' ' )
+ nLen++;
+ else if ( nPos + nLen == sPageTitle.Len() &&
+ sPageTitle.GetChar( nPos + nLen ) == ' ' )
{
- xub_StrLen nLen = rGeneralArray.GetString(0).Len();
- if ( sPageTitle.GetChar( nPos + nLen ) == ' ' )
- nLen++;
- else if ( nPos + nLen == sPageTitle.Len() &&
- sPageTitle.GetChar( nPos + nLen ) == ' ' )
- {
- nPos++;
- nLen++;
- }
- sPageTitle.Erase( nPos, nLen );
+ nPos++;
+ nLen++;
}
+ sPageTitle.Erase( nPos, nLen );
}
+ if(sPageTitle.Len() > 0)
+ sNewTitle = sPageTitle;
}
-
if ( nPageId != RID_SVXPAGE_SSO || isSSOEnabled )
{
- String sNewTitle =
- ( bImprovePage && sPageTitle.Len() > 0 ) ? sPageTitle : rGeneralArray.GetString(i);
AddTabPage( nPageId, sNewTitle, nGroup );
}
}