Files
libreoffice/cui/source/customize/cfgutil.cxx

1234 lines
45 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: clarify Option->Language UI option Patch contributed by Herbert Duerr http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1173991 cws mba34issues01: #i117709#: add missing string resource Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172348 cws mba34issues01: #i117716#: fix missing resources my removing unused code Patch contributed by Mathias Bauer http://svn.apache.org/viewvc?view=revision&revision=1172345 re-add Crystal, Tango, Oxygen icon theme listings. correct method signature Patch contributed by Jean-Louis 'Hans' Fuchs http://svn.apache.org/viewvc?view=revision&revision=1306725 i#119063 - correct serf integration Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1300521 i#119036 - adapt serf integration -- use transfer-encoding 'chunked' on HTTPS -- switch transfer-encoding between 'chunked' and none on 413 HTTP status code -- refactoring -- improve user experience of certification dialog - only shown once Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1299727 118569: Use whole certification chain for verification. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1295493 serf integration: improve credential input handling Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1294557 warning-free ucb/source/ucp/webdav Patch contributed by Pavel Janik http://svn.apache.org/viewvc?view=revision&revision=1294086 some refactoring to PROPPATCH and PROPFIND requests Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1293281 i#118569: Replace neon with serf Patch contributed by Oliver-Rainer Wittmann http://svn.apache.org/viewvc?view=revision&revision=1292832 http://svn.apache.org/viewvc?view=revision&revision=1292794 remove OS/2 conditionals for now. re-enable webdav unit tests.
2012-10-04 11:25:41 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2009-10-31 00:36:06 +01:00
#include "cfgutil.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
#include <com/sun/star/container/XEnumeration.hpp>
#include <com/sun/star/document/XScriptInvocationContext.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/UICommandDescription.hpp>
2009-10-31 00:36:06 +01:00
#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
#include <com/sun/star/script/browse/XBrowseNode.hpp>
#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
#include <com/sun/star/script/browse/theBrowseNodeFactory.hpp>
2009-10-31 00:36:06 +01:00
#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
#include <com/sun/star/script/provider/XScriptProvider.hpp>
2009-10-31 00:36:06 +01:00
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/ui/UICategoryDescription.hpp>
2009-10-31 00:36:06 +01:00
#include "acccfg.hrc"
#include "helpid.hrc"
#include <basic/sbx.hxx>
#include <basic/basicmanagerrepository.hxx>
#include <basic/sbstar.hxx>
#include <basic/sbxmeth.hxx>
#include <basic/sbmod.hxx>
#include <basic/basmgr.hxx>
#include <tools/urlobj.hxx>
#include "cuires.hrc"
2009-10-31 00:36:06 +01:00
#include <sfx2/app.hxx>
#include <sfx2/minfitem.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/string.hxx>
2009-10-31 00:36:06 +01:00
#include <svtools/imagemgr.hxx>
#include "svtools/treelistentry.hxx"
2009-10-31 00:36:06 +01:00
#include <rtl/ustrbuf.hxx>
#include <unotools/configmgr.hxx>
#include "dialmgr.hxx"
2009-10-31 00:36:06 +01:00
#include <svl/stritem.hxx>
#include <vcl/builder.hxx>
2009-10-31 00:36:06 +01:00
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::script;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::document;
SfxStylesInfo_Impl::SfxStylesInfo_Impl()
{}
void SfxStylesInfo_Impl::setModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel)
{
m_xDoc = xModel;
}
static OUString CMDURL_SPART (".uno:StyleApply?Style:string=");
static OUString CMDURL_FPART2 ("&FamilyName:string=");
2009-10-31 00:36:06 +01:00
static OUString CMDURL_STYLEPROT_ONLY (".uno:StyleApply?");
static OUString CMDURL_SPART_ONLY ("Style:string=");
static OUString CMDURL_FPART_ONLY ("FamilyName:string=");
2009-10-31 00:36:06 +01:00
static OUString STYLEPROP_UINAME ("DisplayName");
2009-10-31 00:36:06 +01:00
OUString SfxStylesInfo_Impl::generateCommand(const OUString& sFamily, const OUString& sStyle)
2009-10-31 00:36:06 +01:00
{
OUStringBuffer sCommand(1024);
2009-10-31 00:36:06 +01:00
sCommand.append(CMDURL_SPART );
sCommand.append(sStyle );
sCommand.append(CMDURL_FPART2);
sCommand.append(sFamily );
return sCommand.makeStringAndClear();
}
sal_Bool SfxStylesInfo_Impl::parseStyleCommand(SfxStyleInfo_Impl& aStyle)
{
static sal_Int32 LEN_STYLEPROT = CMDURL_STYLEPROT_ONLY.getLength();
static sal_Int32 LEN_SPART = CMDURL_SPART_ONLY.getLength();
static sal_Int32 LEN_FPART = CMDURL_FPART_ONLY.getLength();
if (!aStyle.sCommand.startsWith(CMDURL_STYLEPROT_ONLY))
2009-10-31 00:36:06 +01:00
return sal_False;
aStyle.sFamily = OUString();
aStyle.sStyle = OUString();
2009-10-31 00:36:06 +01:00
sal_Int32 nCmdLen = aStyle.sCommand.getLength();
OUString sCmdArgs = aStyle.sCommand.copy(LEN_STYLEPROT, nCmdLen-LEN_STYLEPROT);
2009-10-31 00:36:06 +01:00
sal_Int32 i = sCmdArgs.indexOf('&');
if (i<0)
return sal_False;
OUString sArg = sCmdArgs.copy(0, i);
if (sArg.startsWith(CMDURL_SPART_ONLY))
2009-10-31 00:36:06 +01:00
aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART);
else if (sArg.startsWith(CMDURL_FPART_ONLY))
2009-10-31 00:36:06 +01:00
aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART);
sArg = sCmdArgs.copy(i+1, sCmdArgs.getLength()-i-1);
if (sArg.startsWith(CMDURL_SPART_ONLY))
2009-10-31 00:36:06 +01:00
aStyle.sStyle = sArg.copy(LEN_SPART, sArg.getLength()-LEN_SPART);
else if (sArg.startsWith(CMDURL_FPART_ONLY))
2009-10-31 00:36:06 +01:00
aStyle.sFamily = sArg.copy(LEN_FPART, sArg.getLength()-LEN_FPART);
if (!(aStyle.sFamily.isEmpty() || aStyle.sStyle.isEmpty()))
2009-10-31 00:36:06 +01:00
return sal_True;
return sal_False;
}
void SfxStylesInfo_Impl::getLabel4Style(SfxStyleInfo_Impl& aStyle)
{
try
{
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY);
css::uno::Reference< css::container::XNameAccess > xFamilies;
if (xModel.is())
xFamilies = xModel->getStyleFamilies();
css::uno::Reference< css::container::XNameAccess > xStyleSet;
if (xFamilies.is())
xFamilies->getByName(aStyle.sFamily) >>= xStyleSet;
css::uno::Reference< css::beans::XPropertySet > xStyle;
if (xStyleSet.is())
xStyleSet->getByName(aStyle.sStyle) >>= xStyle;
aStyle.sLabel = OUString();
2009-10-31 00:36:06 +01:00
if (xStyle.is())
xStyle->getPropertyValue(STYLEPROP_UINAME) >>= aStyle.sLabel;
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(const css::uno::Exception&)
{ aStyle.sLabel = OUString(); }
2009-10-31 00:36:06 +01:00
if (aStyle.sLabel.isEmpty())
2009-10-31 00:36:06 +01:00
{
aStyle.sLabel = aStyle.sCommand;
}
}
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyleFamilies()
{
// Its an optional interface!
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY);
if (!xModel.is())
return ::std::vector< SfxStyleInfo_Impl >();
css::uno::Reference< css::container::XNameAccess > xCont = xModel->getStyleFamilies();
css::uno::Sequence< OUString > lFamilyNames = xCont->getElementNames();
2009-10-31 00:36:06 +01:00
::std::vector< SfxStyleInfo_Impl > lFamilies;
sal_Int32 c = lFamilyNames.getLength();
sal_Int32 i = 0;
for(i=0; i<c; ++i)
{
SfxStyleInfo_Impl aFamilyInfo;
aFamilyInfo.sFamily = lFamilyNames[i];
try
{
css::uno::Reference< css::beans::XPropertySet > xFamilyInfo;
xCont->getByName(aFamilyInfo.sFamily) >>= xFamilyInfo;
if (!xFamilyInfo.is())
{
// TODO_AS currently there is no support for an UIName property .. use internal family name instead
aFamilyInfo.sLabel = aFamilyInfo.sFamily;
}
else
xFamilyInfo->getPropertyValue(STYLEPROP_UINAME) >>= aFamilyInfo.sLabel;
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(const css::uno::Exception&)
{ return ::std::vector< SfxStyleInfo_Impl >(); }
lFamilies.push_back(aFamilyInfo);
}
return lFamilies;
}
::std::vector< SfxStyleInfo_Impl > SfxStylesInfo_Impl::getStyles(const OUString& sFamily)
2009-10-31 00:36:06 +01:00
{
static OUString PROP_UINAME ("DisplayName");
2009-10-31 00:36:06 +01:00
css::uno::Sequence< OUString > lStyleNames;
2009-10-31 00:36:06 +01:00
css::uno::Reference< css::style::XStyleFamiliesSupplier > xModel(m_xDoc, css::uno::UNO_QUERY_THROW);
css::uno::Reference< css::container::XNameAccess > xFamilies = xModel->getStyleFamilies();
css::uno::Reference< css::container::XNameAccess > xStyleSet;
try
{
xFamilies->getByName(sFamily) >>= xStyleSet;
lStyleNames = xStyleSet->getElementNames();
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(const css::uno::Exception&)
{ return ::std::vector< SfxStyleInfo_Impl >(); }
::std::vector< SfxStyleInfo_Impl > lStyles;
sal_Int32 c = lStyleNames.getLength();
sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
SfxStyleInfo_Impl aStyleInfo;
aStyleInfo.sFamily = sFamily;
aStyleInfo.sStyle = lStyleNames[i];
aStyleInfo.sCommand = SfxStylesInfo_Impl::generateCommand(aStyleInfo.sFamily, aStyleInfo.sStyle);
try
{
css::uno::Reference< css::beans::XPropertySet > xStyle;
xStyleSet->getByName(aStyleInfo.sStyle) >>= xStyle;
if (!xStyle.is())
continue;
xStyle->getPropertyValue(PROP_UINAME) >>= aStyleInfo.sLabel;
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(const css::uno::Exception&)
{ continue; }
lStyles.push_back(aStyleInfo);
}
return lStyles;
}
SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, const ResId& rResId)
2009-10-31 00:36:06 +01:00
: SvTreeListBox( pParent, rResId )
, pCurEntry( 0 )
, pStylesInfo( 0 )
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
2009-10-31 00:36:06 +01:00
GetModel()->SetSortMode( SortAscending );
// Timer for the BallonHelp
2009-10-31 00:36:06 +01:00
aTimer.SetTimeout( 200 );
aTimer.SetTimeoutHdl(
LINK( this, SfxConfigFunctionListBox, TimerHdl ) );
2009-10-31 00:36:06 +01:00
}
SfxConfigFunctionListBox::SfxConfigFunctionListBox(Window* pParent, WinBits nStyle)
: SvTreeListBox( pParent, nStyle )
, pCurEntry( 0 )
, pStylesInfo( 0 )
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_SORT );
GetModel()->SetSortMode( SortAscending );
// Timer for the BallonHelp
aTimer.SetTimeout( 200 );
aTimer.SetTimeoutHdl(
LINK( this, SfxConfigFunctionListBox, TimerHdl ) );
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigFunctionListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinBits = WB_TABSTOP;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
return new SfxConfigFunctionListBox(pParent, nWinBits);
}
SfxConfigFunctionListBox::~SfxConfigFunctionListBox()
2009-10-31 00:36:06 +01:00
{
ClearAll();
}
void SfxConfigFunctionListBox::MouseMove( const MouseEvent& )
2009-10-31 00:36:06 +01:00
{
}
IMPL_LINK( SfxConfigFunctionListBox, TimerHdl, Timer*, pTimer)
/* Description
Timer-handler for showing a help-text. If the mouse pointer is
still on the currently selected entry after the timer has run out,
the entry's help-text is shown as a balloon-help.
2009-10-31 00:36:06 +01:00
*/
{
(void)pTimer; // unused
return 0L;
}
void SfxConfigFunctionListBox::ClearAll()
/* Description
Deletes all entries in the FunctionListBox, all UserData and all
possibly existing MacroInfo.
2009-10-31 00:36:06 +01:00
*/
{
sal_uInt16 nCount = aArr.size();
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
for ( sal_uInt16 i=0; i<nCount; ++i )
2009-10-31 00:36:06 +01:00
{
SfxGroupInfo_Impl *pData = &aArr[i];
2009-10-31 00:36:06 +01:00
if ( pData->nKind == SFX_CFGFUNCTION_SCRIPT )
2009-10-31 00:36:06 +01:00
{
OUString* pScriptURI = (OUString*)pData->pObject;
delete pScriptURI;
2009-10-31 00:36:06 +01:00
}
if ( pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER )
2009-10-31 00:36:06 +01:00
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
if (xi != NULL)
{
xi->release();
}
}
}
aArr.clear();
2009-10-31 00:36:06 +01:00
Clear();
}
OUString SfxConfigFunctionListBox::GetSelectedScriptURI()
2009-10-31 00:36:06 +01:00
{
SvTreeListEntry *pEntry = FirstSelected();
2009-10-31 00:36:06 +01:00
if ( pEntry )
{
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
if ( pData && ( pData->nKind == SFX_CFGFUNCTION_SCRIPT ) )
return *(OUString*)pData->pObject;
2009-10-31 00:36:06 +01:00
}
return OUString();
2009-10-31 00:36:06 +01:00
}
OUString SfxConfigFunctionListBox::GetCurCommand()
2009-10-31 00:36:06 +01:00
{
SvTreeListEntry *pEntry = FirstSelected();
2009-10-31 00:36:06 +01:00
if (!pEntry)
return OUString();
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
if (!pData)
return OUString();
2009-10-31 00:36:06 +01:00
return pData->sCommand;
}
OUString SfxConfigFunctionListBox::GetCurLabel()
2009-10-31 00:36:06 +01:00
{
SvTreeListEntry *pEntry = FirstSelected();
2009-10-31 00:36:06 +01:00
if (!pEntry)
return OUString();
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pData = (SfxGroupInfo_Impl*) pEntry->GetUserData();
if (!pData)
return OUString();
if (!pData->sLabel.isEmpty())
2009-10-31 00:36:06 +01:00
return pData->sLabel;
return pData->sCommand;
}
void SfxConfigFunctionListBox::FunctionSelected()
/* Description
Resets the balloon-help because it shall
always show the help-text of the selected entry.
2009-10-31 00:36:06 +01:00
*/
{
}
void SfxConfigFunctionListBox::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
2009-10-31 00:36:06 +01:00
{
pStylesInfo = pStyles;
}
struct SvxConfigGroupBoxResource_Impl : public Resource
{
Image m_hdImage;
Image m_libImage;
Image m_macImage;
Image m_docImage;
OUString m_sMyMacros;
OUString m_sProdMacros;
OUString m_sMacros;
OUString m_sDlgMacros;
OUString m_aHumanAppName;
OUString m_aStrGroupStyles;
2009-10-31 00:36:06 +01:00
Image m_collapsedImage;
Image m_expandedImage;
SvxConfigGroupBoxResource_Impl();
};
SvxConfigGroupBoxResource_Impl::SvxConfigGroupBoxResource_Impl() :
Resource(CUI_RES(RID_SVXPAGE_CONFIGGROUPBOX)),
m_hdImage(CUI_RES(RID_CUIIMG_HARDDISK)),
m_libImage(CUI_RES(RID_CUIIMG_LIB)),
m_macImage(CUI_RES(RID_CUIIMG_MACRO)),
m_docImage(CUI_RES(RID_CUIIMG_DOC)),
m_sMyMacros(CUI_RESSTR(RID_SVXSTR_MYMACROS)),
m_sProdMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS)),
m_sMacros(CUI_RESSTR(STR_BASICMACROS)),
m_sDlgMacros(CUI_RESSTR(RID_SVXSTR_PRODMACROS)),
m_aHumanAppName(CUI_RESSTR(STR_HUMAN_APPNAME)),
m_aStrGroupStyles(CUI_RESSTR(STR_GROUP_STYLES)),
m_collapsedImage(CUI_RES(BMP_COLLAPSED)),
m_expandedImage(CUI_RES(BMP_EXPANDED))
2009-10-31 00:36:06 +01:00
{
FreeResource();
}
SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, const ResId& rResId)
: SvTreeListBox( pParent, rResId )
, pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0)
2009-10-31 00:36:06 +01:00
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
2009-10-31 00:36:06 +01:00
}
SfxConfigGroupListBox::SfxConfigGroupListBox(Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
, pImp(new SvxConfigGroupBoxResource_Impl()), pFunctionListBox(0), pStylesInfo(0)
{
SetStyle( GetStyle() | WB_CLIPCHILDREN | WB_HSCROLL | WB_HASBUTTONS | WB_HASLINES | WB_HASLINESATROOT | WB_HASBUTTONSATROOT );
SetNodeBitmaps( pImp->m_collapsedImage, pImp->m_expandedImage );
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSfxConfigGroupListBox(Window *pParent, VclBuilder::stringmap &rMap)
{
WinBits nWinBits = WB_TABSTOP;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinBits |= WB_BORDER;
return new SfxConfigGroupListBox(pParent, nWinBits);
}
2009-10-31 00:36:06 +01:00
SfxConfigGroupListBox::~SfxConfigGroupListBox()
2009-10-31 00:36:06 +01:00
{
ClearAll();
}
void SfxConfigGroupListBox::ClearAll()
2009-10-31 00:36:06 +01:00
{
sal_uInt16 nCount = aArr.size();
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
for ( sal_uInt16 i=0; i<nCount; ++i )
2009-10-31 00:36:06 +01:00
{
SfxGroupInfo_Impl *pData = &aArr[i];
if (pData->nKind == SFX_CFGGROUP_SCRIPTCONTAINER)
2009-10-31 00:36:06 +01:00
{
XInterface* xi = static_cast<XInterface *>(pData->pObject);
if (xi != NULL)
{
xi->release();
}
}
}
aArr.clear();
2009-10-31 00:36:06 +01:00
Clear();
}
void SfxConfigGroupListBox::SetStylesInfo(SfxStylesInfo_Impl* pStyles)
2009-10-31 00:36:06 +01:00
{
pStylesInfo = pStyles;
}
//-----------------------------------------------
void SfxConfigGroupListBox::InitModule()
2009-10-31 00:36:06 +01:00
{
try
{
css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider(m_xFrame, css::uno::UNO_QUERY_THROW);
css::uno::Sequence< sal_Int16 > lGroups = xProvider->getSupportedCommandGroups();
sal_Int32 c1 = lGroups.getLength();
sal_Int32 i1 = 0;
for (i1=0; i1<c1; ++i1)
{
sal_Int16& rGroupID = lGroups[i1];
OUString sGroupID = OUString::number(rGroupID);
OUString sGroupName ;
2009-10-31 00:36:06 +01:00
try
{
m_xModuleCategoryInfo->getByName(sGroupID) >>= sGroupName;
if (sGroupName.isEmpty())
2009-10-31 00:36:06 +01:00
continue;
}
catch(const css::container::NoSuchElementException&)
{ continue; }
SvTreeListEntry* pEntry = InsertEntry(sGroupName, NULL);
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl* pInfo = new SfxGroupInfo_Impl(SFX_CFGGROUP_FUNCTION, rGroupID);
pEntry->SetUserData(pInfo);
}
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(const css::uno::Exception&)
{}
}
//-----------------------------------------------
void SfxConfigGroupListBox::InitBasic()
2009-10-31 00:36:06 +01:00
{
}
//-----------------------------------------------
void SfxConfigGroupListBox::InitStyles()
2009-10-31 00:36:06 +01:00
{
}
//-----------------------------------------------
namespace
{
//...........................................
/** examines a component whether it supports XEmbeddedScripts, or provides access to such a
component by implementing XScriptInvocationContext.
@return
the model which supports the embedded scripts, or <NULL/> if it cannot find such a
model
*/
static Reference< XModel > lcl_getDocumentWithScripts_throw( const Reference< XInterface >& _rxComponent )
{
Reference< XEmbeddedScripts > xScripts( _rxComponent, UNO_QUERY );
if ( !xScripts.is() )
{
Reference< XScriptInvocationContext > xContext( _rxComponent, UNO_QUERY );
if ( xContext.is() )
xScripts.set( xContext->getScriptContainer(), UNO_QUERY );
}
return Reference< XModel >( xScripts, UNO_QUERY );
}
//...........................................
static Reference< XModel > lcl_getScriptableDocument_nothrow( const Reference< XFrame >& _rxFrame )
{
Reference< XModel > xDocument;
// examine our associated frame
try
{
OSL_ENSURE( _rxFrame.is(), "lcl_getScriptableDocument_nothrow: you need to pass a frame to this dialog/tab page!" );
if ( _rxFrame.is() )
{
// first try the model in the frame
Reference< XController > xController( _rxFrame->getController(), UNO_SET_THROW );
xDocument = lcl_getDocumentWithScripts_throw( xController->getModel() );
if ( !xDocument.is() )
{
// if there is no suitable document in the frame, try the controller
xDocument = lcl_getDocumentWithScripts_throw( _rxFrame->getController() );
}
}
}
catch( const Exception& )
{
}
return xDocument;
}
}
//-----------------------------------------------
void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
const css::uno::Reference< css::frame::XFrame >& xFrame,
const OUString& sModuleLongName,
bool bEventMode)
2009-10-31 00:36:06 +01:00
{
SetUpdateMode(sal_False);
2009-10-31 00:36:06 +01:00
ClearAll(); // Remove all old entries from treelist box
m_xFrame = xFrame;
if( xContext.is() )
2009-10-31 00:36:06 +01:00
{
m_xContext = xContext;
2009-10-31 00:36:06 +01:00
m_sModuleLongName = sModuleLongName;
m_xGlobalCategoryInfo = css::ui::UICategoryDescription::create( m_xContext );
m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName), css::uno::UNO_QUERY_THROW);
m_xUICmdDescription = css::frame::UICommandDescription::create( m_xContext );
2009-10-31 00:36:06 +01:00
InitModule();
InitBasic();
InitStyles();
}
OSL_TRACE("** ** About to initialise SF Scripts");
// Add Scripting Framework entries
Reference< browse::XBrowseNode > rootNode;
Reference< XComponentContext > xCtx(
comphelper::getProcessComponentContext() );
try
2009-10-31 00:36:06 +01:00
{
Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( xCtx );
rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
2009-10-31 00:36:06 +01:00
}
catch( Exception& e )
2009-10-31 00:36:06 +01:00
{
OSL_TRACE(" Caught some exception whilst retrieving browse nodes from factory... Exception: %s",
OUStringToOString( e.Message , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
// TODO exception handling
2009-10-31 00:36:06 +01:00
}
if ( rootNode.is() )
2009-10-31 00:36:06 +01:00
{
if ( bEventMode )
2009-10-31 00:36:06 +01:00
{
//We call acquire on the XBrowseNode so that it does not
//get autodestructed and become invalid when accessed later.
rootNode->acquire();
SfxGroupInfo_Impl *pInfo =
new SfxGroupInfo_Impl( SFX_CFGGROUP_SCRIPTCONTAINER, 0,
static_cast<void *>(rootNode.get()));
OUString aTitle(pImp->m_sDlgMacros);
SvTreeListEntry *pNewEntry = InsertEntry( aTitle, NULL );
pNewEntry->SetUserData( pInfo );
2011-12-07 02:33:51 -08:00
pNewEntry->EnableChildrenOnDemand( sal_True );
aArr.push_back( pInfo );
2009-10-31 00:36:06 +01:00
}
else
2009-10-31 00:36:06 +01:00
{
//We are only showing scripts not slot APIs so skip
//Root node and show location nodes
try {
if ( rootNode->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > children =
rootNode->getChildNodes();
2011-02-07 13:06:08 +01:00
sal_Bool bIsRootNode = sal_False;
2009-10-31 00:36:06 +01:00
OUString user("user");
OUString share("share");
2012-04-06 14:09:04 +02:00
if ( rootNode->getName() == "Root" )
2009-10-31 00:36:06 +01:00
{
2011-02-07 13:06:08 +01:00
bIsRootNode = sal_True;
}
2009-10-31 00:36:06 +01:00
//To mimic current starbasic behaviour we
//need to make sure that only the current document
//is displayed in the config tree. Tests below
//set the bDisplay flag to FALSE if the current
//node is a first level child of the Root and is NOT
//either the current document, user or share
OUString currentDocTitle;
Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) );
if ( xDocument.is() )
{
currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument );
}
2009-10-31 00:36:06 +01:00
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
for ( sal_Int32 n = 0; n < children.getLength(); ++n )
{
Reference< browse::XBrowseNode >& theChild = children[n];
2011-02-07 13:06:08 +01:00
sal_Bool bDisplay = sal_True;
OUString uiName = theChild->getName();
if ( bIsRootNode )
2009-10-31 00:36:06 +01:00
{
if ( ! ((theChild->getName().equals( user ) || theChild->getName().equals( share ) ||
theChild->getName().equals( currentDocTitle ) ) ) )
2009-10-31 00:36:06 +01:00
{
2011-02-07 13:06:08 +01:00
bDisplay=sal_False;
}
else
2009-10-31 00:36:06 +01:00
{
if ( uiName.equals( user ) )
2009-10-31 00:36:06 +01:00
{
uiName = pImp->m_sMyMacros;
2009-10-31 00:36:06 +01:00
}
else if ( uiName.equals( share ) )
2009-10-31 00:36:06 +01:00
{
uiName = pImp->m_sProdMacros;
2009-10-31 00:36:06 +01:00
}
}
}
if (children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay )
{
2010-11-16 18:59:15 -08:00
// We call acquire on the XBrowseNode so that it does not
// get autodestructed and become invalid when accessed later.
theChild->acquire();
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl* pInfo =
new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER,
0, static_cast<void *>( theChild.get()));
2009-10-31 00:36:06 +01:00
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
Image aImage = GetImage( theChild, xCtx, bIsRootNode );
SvTreeListEntry* pNewEntry =
InsertEntry( uiName, NULL);
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
SetExpandedEntryBmp( pNewEntry, aImage );
SetCollapsedEntryBmp( pNewEntry, aImage );
2009-10-31 00:36:06 +01:00
pNewEntry->SetUserData( pInfo );
aArr.push_back( pInfo );
2009-10-31 00:36:06 +01:00
if ( children[n]->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > grandchildren =
children[n]->getChildNodes();
2009-10-31 00:36:06 +01:00
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101 * commit 'ooo/DEV300_m101': (185 commits) masterfix DEV300: #i10000# usage of L10N build_type masterfix: #i10000# INT16 -> sal_Int16 fixed compile errors after resync to m100, part2 gridsort: post-rebase fixes CWS gnumake3: found another tools integer type removetooltypes01: Fix build problems after rebase to DEV300m99 in basctl, cui, reportdesign, sw native359: #i114398# changing mac langpack icon native359: #i115669# fixing package description for solaris packages gnumake3: remove comphelper version; fix including extract.hxx locales34: #i106785# add Haitian_Haiti [ht-HT] to language list and locale data; locale data contributed by <jcpoulard> sb138: #i116659# timely termination of OnLogRotateThread accfixes: removed include of obsolete header file accfixes: removed obsolete file removetooltypes01: #i112600# Fix build problems on non-pro accfixes: moved some shared strings to svx part2 accfixes: moved some shared strings to svx accfixes: added more accessibility information and fixed tab orders in multiple dialogs (cui module) removetooltypes01: #i112600# Remove tools types for Mac specific parts fixed tab order in BasicIDE, Library dialog tab page added some accessible names in BasicIDE ... Conflicts: UnoControls/source/base/registercontrols.cxx accessibility/inc/accessibility/standard/vclxaccessiblelistboxlist.hxx automation/inc/automation/communi.hxx automation/inc/automation/simplecm.hxx automation/source/communi/communi.cxx automation/source/inc/rcontrol.hxx automation/source/miniapp/servuid.hxx automation/source/server/XMLParser.cxx automation/source/server/cmdbasestream.cxx automation/source/server/profiler.hxx automation/source/server/recorder.cxx automation/source/server/retstrm.hxx automation/source/server/server.cxx automation/source/server/sta_list.cxx automation/source/server/statemnt.cxx automation/source/server/statemnt.hxx automation/source/simplecm/packethandler.cxx automation/source/simplecm/simplecm.cxx automation/source/simplecm/tcpio.cxx automation/source/simplecm/tcpio.hxx automation/source/testtool/comm_bas.hxx automation/source/testtool/cretstrm.hxx automation/source/testtool/httprequest.cxx automation/source/testtool/httprequest.hxx automation/source/testtool/objtest.cxx automation/source/testtool/objtest.hxx basctl/source/basicide/baside2.cxx basctl/source/basicide/baside2.hxx basctl/source/basicide/baside2b.cxx basctl/source/basicide/baside3.cxx basctl/source/basicide/basides1.cxx basctl/source/basicide/basides2.cxx basctl/source/basicide/basidesh.cxx basctl/source/basicide/basidesh.src basctl/source/basicide/basobj3.cxx basctl/source/basicide/bastype2.cxx basctl/source/basicide/bastype3.cxx basctl/source/basicide/bastypes.cxx basctl/source/basicide/brkdlg.cxx basctl/source/basicide/iderdll.cxx basctl/source/basicide/macrodlg.cxx basctl/source/basicide/moduldl2.cxx basctl/source/basicide/moduldlg.cxx basctl/source/basicide/objdlg.cxx basctl/source/basicide/scriptdocument.cxx basctl/source/basicide/tbxctl.cxx basctl/source/basicide/tbxctl.hxx basctl/source/basicide/tbxctl.src basctl/source/dlged/dlged.cxx basctl/source/dlged/dlgedfunc.cxx basctl/source/dlged/dlgedobj.cxx basctl/source/inc/basidesh.hxx basctl/source/inc/bastypes.hxx basctl/source/inc/dlgedmod.hxx basctl/source/inc/dlgedpage.hxx crashrep/prj/build.lst cui/inc/pch/precompiled_cui.hxx cui/source/customize/acccfg.cxx cui/source/customize/acccfg.hrc cui/source/customize/acccfg.src cui/source/customize/cfg.cxx cui/source/customize/cfgutil.cxx cui/source/customize/macropg.cxx cui/source/customize/macropg.src cui/source/customize/selector.cxx cui/source/dialogs/SpellDialog.cxx cui/source/dialogs/commonlingui.cxx cui/source/dialogs/cuicharmap.cxx cui/source/dialogs/cuifmsearch.cxx cui/source/dialogs/cuigaldlg.cxx cui/source/dialogs/cuigrfflt.cxx cui/source/dialogs/hldocntp.cxx cui/source/dialogs/hldoctp.cxx cui/source/dialogs/hlinettp.cxx cui/source/dialogs/hlmailtp.cxx cui/source/dialogs/hlmarkwn.cxx cui/source/dialogs/hlmarkwn.src cui/source/dialogs/hltpbase.cxx cui/source/dialogs/iconcdlg.cxx cui/source/dialogs/passwdomdlg.cxx cui/source/dialogs/pastedlg.cxx cui/source/dialogs/scriptdlg.cxx cui/source/dialogs/thesdlg.cxx cui/source/dialogs/zoom.cxx cui/source/factory/dlgfact.hxx cui/source/inc/SpellDialog.hxx cui/source/inc/autocdlg.hxx cui/source/inc/backgrnd.hxx cui/source/inc/bbdlg.hxx cui/source/inc/cfg.hxx cui/source/inc/cfgutil.hxx cui/source/inc/cuigaldlg.hxx cui/source/inc/cuigrfflt.hxx cui/source/inc/cuitabarea.hxx cui/source/inc/cuitabline.hxx cui/source/inc/hldocntp.hxx cui/source/inc/hltpbase.hxx cui/source/inc/iconcdlg.hxx cui/source/inc/numpages.hxx cui/source/inc/page.hxx cui/source/inc/postdlg.hxx cui/source/inc/scriptdlg.hxx cui/source/inc/transfrm.hxx cui/source/inc/zoom.hxx cui/source/options/cfgchart.cxx cui/source/options/cuisrchdlg.cxx cui/source/options/dbregister.cxx cui/source/options/dbregister.src cui/source/options/fontsubs.cxx cui/source/options/internationaloptions.cxx cui/source/options/optasian.cxx cui/source/options/optchart.cxx cui/source/options/optcolor.cxx cui/source/options/optcolor.src cui/source/options/optfltr.cxx cui/source/options/optfltr.src cui/source/options/optgdlg.cxx cui/source/options/optgdlg.src cui/source/options/optgenrl.cxx cui/source/options/opthtml.cxx cui/source/options/optimprove.cxx cui/source/options/optinet2.cxx cui/source/options/optinet2.hxx cui/source/options/optjava.cxx cui/source/options/optlingu.cxx cui/source/options/optsave.cxx cui/source/options/optsave.hxx cui/source/options/treeopt.cxx cui/source/options/webconninfo.cxx cui/source/tabpages/autocdlg.cxx cui/source/tabpages/backgrnd.cxx cui/source/tabpages/border.cxx cui/source/tabpages/chardlg.cxx cui/source/tabpages/dstribut.cxx cui/source/tabpages/grfpage.cxx cui/source/tabpages/macroass.cxx cui/source/tabpages/measure.cxx cui/source/tabpages/numfmt.cxx cui/source/tabpages/numpages.cxx cui/source/tabpages/page.cxx cui/source/tabpages/paragrph.cxx cui/source/tabpages/swpossizetabpage.cxx cui/source/tabpages/tabarea.src cui/source/tabpages/textanim.cxx cui/source/tabpages/textattr.cxx cui/source/tabpages/tparea.cxx cui/source/tabpages/tpbitmap.cxx cui/source/tabpages/tpcolor.cxx cui/source/tabpages/tpgradnt.cxx cui/source/tabpages/tphatch.cxx cui/source/tabpages/tpline.cxx cui/source/tabpages/tplnedef.cxx cui/source/tabpages/tplneend.cxx cui/source/tabpages/tpshadow.cxx cui/source/tabpages/transfrm.cxx embedserv/source/embed/register.cxx extensions/inc/pch/precompiled_extensions.hxx extensions/inc/propctrlr.hrc extensions/source/abpilot/abpservices.cxx extensions/source/bibliography/bibload.cxx extensions/source/bibliography/datman.cxx extensions/source/bibliography/general.cxx extensions/source/dbpilots/dbpservices.cxx extensions/source/inc/componentmodule.cxx extensions/source/nsplugin/source/so_env.cxx extensions/source/ole/oleobjw.cxx extensions/source/ole/oleobjw.hxx extensions/source/oooimprovement/invite_job.cxx extensions/source/oooimprovement/onlogrotate_job.cxx extensions/source/plugin/base/service.cxx extensions/source/plugin/inc/plugin/unx/mediator.hxx extensions/source/plugin/inc/plugin/unx/plugcon.hxx extensions/source/plugin/unx/mediator.cxx extensions/source/plugin/unx/nppapi.cxx extensions/source/plugin/unx/plugcon.cxx extensions/source/preload/services.cxx extensions/source/propctrlr/formmetadata.cxx extensions/source/propctrlr/pcrservices.cxx extensions/source/resource/resource.cxx extensions/source/scanner/sane.hxx extensions/source/scanner/sanedlg.cxx extensions/source/scanner/scanunx.cxx extensions/source/scanner/scanwin.cxx extensions/source/scanner/twain.cxx extensions/source/scanner/twain.hxx extensions/source/update/check/updatecheckconfig.cxx extensions/test/stm/datatest.cxx extensions/test/stm/marktest.cxx extensions/test/stm/pipetest.cxx extensions/test/stm/testfactreg.cxx extensions/workben/testpgp.cxx forms/qa/complex/forms/CheckOGroupBoxModel.java forms/qa/makefile.mk forms/source/component/Button.cxx forms/source/component/Button.hxx forms/source/component/ListBox.cxx forms/source/inc/forms_module_impl.hxx forms/source/misc/services.cxx forms/source/solar/control/navtoolbar.cxx javainstaller2/prj/build.lst javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java lingucomponent/prj/build.lst lingucomponent/source/hyphenator/altlinuxhyph/hyphen/hyphenimp.cxx lingucomponent/source/spellcheck/spell/sreg.cxx lingucomponent/source/spellcheck/spell/sspellimp.cxx package/source/manifest/ManifestExport.cxx package/source/manifest/UnoRegister.cxx package/source/xstor/owriteablestream.cxx package/source/xstor/owriteablestream.hxx package/source/xstor/xstorage.hxx package/source/zippackage/ZipPackageFolder.cxx package/source/zippackage/ZipPackageStream.cxx setup_native/source/mac/ooo/DS_Store setup_native/source/win32/customactions/shellextensions/registerextensions.cxx xmlsecurity/prj/build.lst xmlsecurity/source/component/registerservices.cxx xmlsecurity/source/dialogs/stbcontrl.cxx xmlsecurity/source/framework/xsec_framework.cxx xmlsecurity/source/xmlsec/xsec_xmlsec.cxx xmlsecurity/tools/demo/util.hxx xmlsecurity/workben/signaturetest.cxx
2011-03-09 16:20:50 -06:00
for ( sal_Int32 m = 0; m < grandchildren.getLength(); ++m )
{
if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER )
2009-10-31 00:36:06 +01:00
{
2011-12-07 02:33:51 -08:00
pNewEntry->EnableChildrenOnDemand( sal_True );
m = grandchildren.getLength();
2009-10-31 00:36:06 +01:00
}
}
}
}
}
}
}
catch (RuntimeException&) {
// do nothing, the entry will not be displayed in the UI
2009-10-31 00:36:06 +01:00
}
}
}
// add styles
if ( m_xContext.is() )
2009-10-31 00:36:06 +01:00
{
OUString sStyle( pImp->m_aStrGroupStyles );
SvTreeListEntry *pEntry = InsertEntry( sStyle, 0 );
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, 0 ); // TODO last parameter should contain user data
aArr.push_back( pInfo );
2009-10-31 00:36:06 +01:00
pEntry->SetUserData( pInfo );
2011-12-07 02:33:51 -08:00
pEntry->EnableChildrenOnDemand( sal_True );
2009-10-31 00:36:06 +01:00
}
MakeVisible( GetEntry( 0,0 ) );
SetUpdateMode( sal_True );
2009-10-31 00:36:06 +01:00
}
Image SfxConfigGroupListBox::GetImage(
2010-11-16 18:59:15 -08:00
Reference< browse::XBrowseNode > node,
Reference< XComponentContext > xCtx,
bool bIsRootNode
)
2009-10-31 00:36:06 +01:00
{
Image aImage;
if ( bIsRootNode )
{
OUString user("user");
OUString share("share");
2009-10-31 00:36:06 +01:00
if (node->getName().equals( user ) || node->getName().equals(share ) )
{
2010-11-16 14:32:13 +00:00
aImage = pImp->m_hdImage;
2009-10-31 00:36:06 +01:00
}
else
{
OUString factoryURL;
OUString nodeName = node->getName();
2009-10-31 00:36:06 +01:00
Reference<XInterface> xDocumentModel = getDocumentModel(xCtx, nodeName );
if ( xDocumentModel.is() )
{
Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xCtx) );
2009-10-31 00:36:06 +01:00
// get the long name of the document:
OUString appModule( xModuleManager->identify(
2009-10-31 00:36:06 +01:00
xDocumentModel ) );
Sequence<beans::PropertyValue> moduleDescr;
Any aAny = xModuleManager->getByName(appModule);
if( !( aAny >>= moduleDescr ) )
2009-10-31 00:36:06 +01:00
{
throw RuntimeException("SFTreeListBox::Init: failed to get PropertyValue", Reference< XInterface >());
2009-10-31 00:36:06 +01:00
}
beans::PropertyValue const * pmoduleDescr =
moduleDescr.getConstArray();
for ( sal_Int32 pos = moduleDescr.getLength(); pos--; )
{
if ( pmoduleDescr[ pos ].Name == "ooSetupFactoryEmptyDocumentURL" )
2009-10-31 00:36:06 +01:00
{
pmoduleDescr[ pos ].Value >>= factoryURL;
OSL_TRACE("factory url for doc images is %s",
OUStringToOString( factoryURL , RTL_TEXTENCODING_ASCII_US ).pData->buffer );
2009-10-31 00:36:06 +01:00
break;
}
}
}
if( !factoryURL.isEmpty() )
2009-10-31 00:36:06 +01:00
{
2010-11-16 18:59:15 -08:00
aImage = SvFileInformationManager::GetFileImage( INetURLObject(factoryURL), false );
2009-10-31 00:36:06 +01:00
}
else
{
2010-11-16 14:32:13 +00:00
aImage = pImp->m_docImage;
2009-10-31 00:36:06 +01:00
}
}
}
else
{
if( node->getType() == browse::BrowseNodeTypes::SCRIPT )
2010-11-16 14:32:13 +00:00
aImage = pImp->m_macImage;
2009-10-31 00:36:06 +01:00
else
2010-11-16 14:32:13 +00:00
aImage = pImp->m_libImage;
2009-10-31 00:36:06 +01:00
}
return aImage;
}
Reference< XInterface >
SfxConfigGroupListBox::getDocumentModel( Reference< XComponentContext >& xCtx, OUString& docName )
2009-10-31 00:36:06 +01:00
{
Reference< XInterface > xModel;
Reference< frame::XDesktop2 > desktop = frame::Desktop::create( xCtx );
2009-10-31 00:36:06 +01:00
Reference< container::XEnumerationAccess > componentsAccess =
desktop->getComponents();
Reference< container::XEnumeration > components =
componentsAccess->createEnumeration();
while (components->hasMoreElements())
{
Reference< frame::XModel > model(
components->nextElement(), UNO_QUERY );
if ( model.is() )
{
OUString sTdocUrl =
2009-10-31 00:36:06 +01:00
::comphelper::DocumentInfo::getDocumentTitle( model );
if( sTdocUrl.equals( docName ) )
{
xModel = model;
break;
}
}
}
return xModel;
}
//-----------------------------------------------
OUString SfxConfigGroupListBox::MapCommand2UIName(const OUString& sCommand)
2009-10-31 00:36:06 +01:00
{
OUString sUIName;
2009-10-31 00:36:06 +01:00
try
{
css::uno::Reference< css::container::XNameAccess > xModuleConf;
m_xUICmdDescription->getByName(m_sModuleLongName) >>= xModuleConf;
if (xModuleConf.is())
{
::comphelper::SequenceAsHashMap lProps(xModuleConf->getByName(sCommand));
sUIName = lProps.getUnpackedValueOrDefault("Name", OUString());
2009-10-31 00:36:06 +01:00
}
}
2012-02-05 10:49:59 +01:00
catch(const css::uno::RuntimeException&)
{ throw; }
2009-10-31 00:36:06 +01:00
catch(css::uno::Exception&)
{ sUIName = OUString(); }
2009-10-31 00:36:06 +01:00
// fallback for missing UINames !?
if (sUIName.isEmpty())
2009-10-31 00:36:06 +01:00
{
sUIName = sCommand;
}
return sUIName;
}
//-----------------------------------------------
void SfxConfigGroupListBox::GroupSelected()
/* Description
A function group or a basic module has been selected.
All functions/macros are displayed in the functionlistbox.
2009-10-31 00:36:06 +01:00
*/
{
SvTreeListEntry *pEntry = FirstSelected();
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
pFunctionListBox->SetUpdateMode(sal_False);
2009-10-31 00:36:06 +01:00
pFunctionListBox->ClearAll();
if ( pInfo->nKind != SFX_CFGGROUP_FUNCTION &&
pInfo->nKind != SFX_CFGGROUP_SCRIPTCONTAINER &&
pInfo->nKind != SFX_CFGGROUP_STYLES )
{
pFunctionListBox->SetUpdateMode(sal_True);
2009-10-31 00:36:06 +01:00
return;
}
switch ( pInfo->nKind )
{
case SFX_CFGGROUP_FUNCTION :
{
2011-02-07 13:06:08 +01:00
sal_uInt16 nGroup = pInfo->nUniqueID;
2009-10-31 00:36:06 +01:00
css::uno::Reference< css::frame::XDispatchInformationProvider > xProvider (m_xFrame, css::uno::UNO_QUERY_THROW);
css::uno::Sequence< css::frame::DispatchInformation > lCommands = xProvider->getConfigurableDispatchInformation(nGroup);
sal_Int32 c = lCommands.getLength();
sal_Int32 i = 0;
for (i=0; i<c; ++i)
{
const css::frame::DispatchInformation& rInfo = lCommands[i];
OUString sUIName = MapCommand2UIName(rInfo.Command);
SvTreeListEntry* pFuncEntry = pFunctionListBox->InsertEntry(sUIName, NULL);
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl(SFX_CFGFUNCTION_SLOT, 0);
pGrpInfo->sCommand = rInfo.Command;
pGrpInfo->sLabel = sUIName;
pFuncEntry->SetUserData(pGrpInfo);
}
break;
}
case SFX_CFGGROUP_SCRIPTCONTAINER:
{
if ( !GetChildCount( pEntry ) )
{
Reference< browse::XBrowseNode > rootNode(
reinterpret_cast< browse::XBrowseNode* >( pInfo->pObject ) ) ;
try {
if ( rootNode->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > children =
rootNode->getChildNodes();
2010-12-27 09:29:07 +01:00
for ( sal_Int32 n = 0; n < children.getLength(); ++n )
2009-10-31 00:36:06 +01:00
{
if (children[n]->getType() == browse::BrowseNodeTypes::SCRIPT)
{
OUString uri;
2009-10-31 00:36:06 +01:00
Reference < beans::XPropertySet >xPropSet( children[n], UNO_QUERY );
if (!xPropSet.is())
{
continue;
}
Any value =
xPropSet->getPropertyValue("URI");
2009-10-31 00:36:06 +01:00
value >>= uri;
OUString* pScriptURI = new OUString( uri );
SfxGroupInfo_Impl* pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGFUNCTION_SCRIPT, 0, pScriptURI );
2009-10-31 00:36:06 +01:00
2010-11-16 14:32:13 +00:00
Image aImage = GetImage( children[n], Reference< XComponentContext >(), sal_False );
SvTreeListEntry* pNewEntry =
2009-10-31 00:36:06 +01:00
pFunctionListBox->InsertEntry( children[n]->getName(), NULL );
pFunctionListBox->SetExpandedEntryBmp( pNewEntry, aImage );
pFunctionListBox->SetCollapsedEntryBmp(pNewEntry, aImage );
2009-10-31 00:36:06 +01:00
pGrpInfo->sCommand = uri;
pGrpInfo->sLabel = children[n]->getName();
pNewEntry->SetUserData( pGrpInfo );
pFunctionListBox->aArr.push_back( pGrpInfo );
2009-10-31 00:36:06 +01:00
}
}
}
}
catch (RuntimeException&) {
// do nothing, the entry will not be displayed in the UI
}
}
break;
}
case SFX_CFGGROUP_STYLES :
{
SfxStyleInfo_Impl* pFamily = (SfxStyleInfo_Impl*)(pInfo->pObject);
if (pFamily)
{
const ::std::vector< SfxStyleInfo_Impl > lStyles = pStylesInfo->getStyles(pFamily->sFamily);
::std::vector< SfxStyleInfo_Impl >::const_iterator pIt;
for ( pIt = lStyles.begin();
pIt != lStyles.end() ;
++pIt )
{
SfxStyleInfo_Impl* pStyle = new SfxStyleInfo_Impl(*pIt);
SvTreeListEntry* pFuncEntry = pFunctionListBox->InsertEntry( pStyle->sLabel, NULL );
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pStyle );
pFunctionListBox->aArr.push_back( pGrpInfo );
2009-10-31 00:36:06 +01:00
pGrpInfo->sCommand = pStyle->sCommand;
pGrpInfo->sLabel = pStyle->sLabel;
pFuncEntry->SetUserData( pGrpInfo );
}
}
break;
}
default:
return;
}
if ( pFunctionListBox->GetEntryCount() )
pFunctionListBox->Select( pFunctionListBox->GetEntry( 0, 0 ) );
pFunctionListBox->SetUpdateMode(sal_True);
2009-10-31 00:36:06 +01:00
}
sal_Bool SfxConfigGroupListBox::Expand( SvTreeListEntry* pParent )
2009-10-31 00:36:06 +01:00
{
sal_Bool bRet = SvTreeListBox::Expand( pParent );
2009-10-31 00:36:06 +01:00
if ( bRet )
{
sal_uLong nEntries = GetOutputSizePixel().Height() / GetEntryHeight();
2009-10-31 00:36:06 +01:00
sal_uLong nChildCount = GetVisibleChildCount( pParent );
2009-10-31 00:36:06 +01:00
if ( nChildCount+1 > nEntries )
{
MakeVisible( pParent, sal_True );
2009-10-31 00:36:06 +01:00
}
else
{
SvTreeListEntry *pEntry = GetFirstEntryInView();
sal_uLong nParentPos = 0;
2009-10-31 00:36:06 +01:00
while ( pEntry && pEntry != pParent )
{
2010-12-27 09:29:07 +01:00
++nParentPos;
2009-10-31 00:36:06 +01:00
pEntry = GetNextEntryInView( pEntry );
}
if ( nParentPos + nChildCount + 1 > nEntries )
ScrollOutputArea( (short)( nEntries - ( nParentPos + nChildCount + 1 ) ) );
}
}
return bRet;
}
void SfxConfigGroupListBox::RequestingChildren( SvTreeListEntry *pEntry )
/* Description
A basic or a library is opened.
2009-10-31 00:36:06 +01:00
*/
{
SfxGroupInfo_Impl *pInfo = (SfxGroupInfo_Impl*) pEntry->GetUserData();
pInfo->bWasOpened = sal_True;
2009-10-31 00:36:06 +01:00
switch ( pInfo->nKind )
{
case SFX_CFGGROUP_SCRIPTCONTAINER:
{
if ( !GetChildCount( pEntry ) )
{
Reference< browse::XBrowseNode > rootNode(
reinterpret_cast< browse::XBrowseNode* >( pInfo->pObject ) ) ;
try {
if ( rootNode->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > children =
rootNode->getChildNodes();
sal_Bool bIsRootNode = sal_False;
2009-10-31 00:36:06 +01:00
OUString user("user");
OUString share("share" );
2012-04-06 14:09:04 +02:00
if ( rootNode->getName() == "Root" )
2009-10-31 00:36:06 +01:00
{
bIsRootNode = sal_True;
2009-10-31 00:36:06 +01:00
}
/* To mimic current starbasic behaviour we
need to make sure that only the current document
is displayed in the config tree. Tests below
set the bDisplay flag to sal_False if the current
2009-10-31 00:36:06 +01:00
node is a first level child of the Root and is NOT
either the current document, user or share */
OUString currentDocTitle;
2009-10-31 00:36:06 +01:00
Reference< XModel > xDocument( lcl_getScriptableDocument_nothrow( m_xFrame ) );
if ( xDocument.is() )
{
currentDocTitle = ::comphelper::DocumentInfo::getDocumentTitle( xDocument );
}
sal_Int32 nLen = children.getLength();
2010-12-27 09:29:07 +01:00
for ( sal_Int32 n = 0; n < nLen; ++n )
2009-10-31 00:36:06 +01:00
{
Reference< browse::XBrowseNode >& theChild = children[n];
OUString aName( theChild->getName() );
sal_Bool bDisplay = sal_True;
2009-10-31 00:36:06 +01:00
if ( bIsRootNode )
{
if ( !( (aName.equals(user) || aName.equals(share) || aName.equals(currentDocTitle) ) ) )
bDisplay=sal_False;
2009-10-31 00:36:06 +01:00
}
if ( children[n].is() && children[n]->getType() != browse::BrowseNodeTypes::SCRIPT && bDisplay )
{
/*
We call acquire on the XBrowseNode so that it does not
get autodestructed and become invalid when accessed later.
*/
theChild->acquire();
SfxGroupInfo_Impl* pGrpInfo =
new SfxGroupInfo_Impl(SFX_CFGGROUP_SCRIPTCONTAINER,
0, static_cast<void *>( theChild.get()));
2010-11-16 14:32:13 +00:00
Image aImage = GetImage( theChild, Reference< XComponentContext >(), sal_False );
SvTreeListEntry* pNewEntry =
2009-10-31 00:36:06 +01:00
InsertEntry( theChild->getName(), pEntry );
SetExpandedEntryBmp( pNewEntry, aImage );
SetCollapsedEntryBmp(pNewEntry, aImage );
2009-10-31 00:36:06 +01:00
pNewEntry->SetUserData( pGrpInfo );
aArr.push_back( pGrpInfo );
2009-10-31 00:36:06 +01:00
if ( children[n]->hasChildNodes() )
{
Sequence< Reference< browse::XBrowseNode > > grandchildren =
children[n]->getChildNodes();
2010-12-27 09:29:07 +01:00
for ( sal_Int32 m = 0; m < grandchildren.getLength(); ++m )
2009-10-31 00:36:06 +01:00
{
if ( grandchildren[m]->getType() == browse::BrowseNodeTypes::CONTAINER )
{
2011-12-07 02:33:51 -08:00
pNewEntry->EnableChildrenOnDemand( sal_True );
2009-10-31 00:36:06 +01:00
m = grandchildren.getLength();
}
}
}
}
}
}
}
catch (RuntimeException&) {
// do nothing, the entry will not be displayed in the UI
}
}
break;
}
case SFX_CFGGROUP_STYLES:
{
if ( !GetChildCount( pEntry ) )
{
const ::std::vector< SfxStyleInfo_Impl > lStyleFamilies = pStylesInfo->getStyleFamilies();
::std::vector< SfxStyleInfo_Impl >::const_iterator pIt;
for ( pIt = lStyleFamilies.begin();
pIt != lStyleFamilies.end() ;
++pIt )
{
SfxStyleInfo_Impl* pFamily = new SfxStyleInfo_Impl(*pIt);
SvTreeListEntry* pStyleEntry = InsertEntry( pFamily->sLabel, pEntry );
2009-10-31 00:36:06 +01:00
SfxGroupInfo_Impl *pGrpInfo = new SfxGroupInfo_Impl( SFX_CFGGROUP_STYLES, 0, pFamily );
aArr.push_back( pGrpInfo );
2009-10-31 00:36:06 +01:00
pStyleEntry->SetUserData( pGrpInfo );
2011-12-07 02:33:51 -08:00
pStyleEntry->EnableChildrenOnDemand( sal_False );
2009-10-31 00:36:06 +01:00
}
}
break;
}
default:
2011-03-01 17:55:09 +01:00
OSL_FAIL( "Falscher Gruppentyp!" );
2009-10-31 00:36:06 +01:00
break;
}
}
void SfxConfigGroupListBox::SelectMacro( const SfxMacroInfoItem *pItem )
2009-10-31 00:36:06 +01:00
{
SelectMacro( pItem->GetBasicManager()->GetName(),
pItem->GetQualifiedName() );
}
void SfxConfigGroupListBox::SelectMacro( const OUString& rBasic,
const OUString& rMacro )
2009-10-31 00:36:06 +01:00
{
OUString aBasicName( rBasic );
aBasicName += " ";
2009-10-31 00:36:06 +01:00
aBasicName += pImp->m_sMacros;
OUString aLib, aModule, aMethod;
sal_uInt16 nCount = comphelper::string::getTokenCount(rMacro, '.');
aMethod = rMacro.getToken( nCount-1, '.' );
2009-10-31 00:36:06 +01:00
if ( nCount > 2 )
{
aLib = rMacro.getToken( 0, '.' );
aModule = rMacro.getToken( nCount-2, '.' );
2009-10-31 00:36:06 +01:00
}
SvTreeListEntry *pEntry = FirstChild(0);
2009-10-31 00:36:06 +01:00
while ( pEntry )
{
OUString aEntryBas = GetEntryText( pEntry );
2009-10-31 00:36:06 +01:00
if ( aEntryBas == aBasicName )
{
Expand( pEntry );
SvTreeListEntry *pLib = FirstChild( pEntry );
2009-10-31 00:36:06 +01:00
while ( pLib )
{
OUString aEntryLib = GetEntryText( pLib );
2009-10-31 00:36:06 +01:00
if ( aEntryLib == aLib )
{
Expand( pLib );
SvTreeListEntry *pMod = FirstChild( pLib );
2009-10-31 00:36:06 +01:00
while ( pMod )
{
OUString aEntryMod = GetEntryText( pMod );
2009-10-31 00:36:06 +01:00
if ( aEntryMod == aModule )
{
Expand( pMod );
MakeVisible( pMod );
Select( pMod );
SvTreeListEntry *pMethod = pFunctionListBox->First();
2009-10-31 00:36:06 +01:00
while ( pMethod )
{
OUString aEntryMethod = GetEntryText( pMethod );
2009-10-31 00:36:06 +01:00
if ( aEntryMethod == aMethod )
{
pFunctionListBox->Select( pMethod );
pFunctionListBox->MakeVisible( pMethod );
return;
}
pMethod = pFunctionListBox->Next( pMethod );
}
}
pMod = NextSibling( pMod );
}
}
pLib = NextSibling( pLib );
}
}
pEntry = NextSibling( pEntry );
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */