Merge branch 'master' into feature/killsdf

Conflicts:
	Makefile.top
	Module_tail_build.mk
	RepositoryExternal.mk
	RepositoryFixes.mk
	accessibility/source/standard/vclxaccessibletoolbox.cxx
	basic/source/uno/dlgcont.cxx
	connectivity/Library_ado.mk
	cross_tail_build/prj/build.lst
	desktop/source/offacc/acceptor.cxx
	filter/Library_PptImporter.mk
	filter/source/t602/filterenv.cxx
	i18npool/Library_textconv_dict.mk
	ooo.lst.in
	saxon/ExternalProject_saxon.mk
	saxon/build.xml
	sc/sdi/scalc.sdi
	sc/source/filter/xml/xmlstyli.cxx
	sc/source/ui/condformat/condformatdlg.cxx
	sc/source/ui/condformat/condformatmgr.cxx
	sc/source/ui/view/cellsh1.cxx
	sdext/source/pdfimport/misc/pwdinteract.cxx
	shell/qa/zip/makefile.mk
	shell/qa/zip/testimpl/makefile.mk
	solenv/gbuild/CppunitTest.mk
	solenv/gbuild/gbuild.mk
	solenv/gbuild/platform/android.mk
	solenv/gbuild/platform/com_GCC_defs.mk
	solenv/gbuild/platform/macosx.mk
	soltools/Executable_adjustvisibility.mk
	soltools/Executable_checkdll.mk
	soltools/Executable_cpp.mk
	soltools/Executable_javadep.mk
	soltools/Executable_makedepend.mk
	sw/qa/extras/rtfimport/rtfimport.cxx
	tail_build/prj/build.lst
	tomcat/ExternalProject_tomcat.mk
	ucb/source/ucp/webdav/webdavcontent.cxx
	xml2cmp/Executable_xml2cmp.mk
This commit is contained in:
Andras Timar
2012-10-13 17:41:05 +02:00
4373 changed files with 78397 additions and 68892 deletions
+13 -1
View File
@@ -45,7 +45,6 @@ $(eval $(call gb_Library_use_libraries,merged,\
$(eval $(call gb_Library_use_externals,merged,\
cups \
icui18n \
icule \
icuuc \
jpeg \
@@ -117,11 +116,24 @@ $(eval $(call gb_Library_use_system_win32_libs,merged,\
oleaut32 \
shell32 \
user32 \
usp10 \
uuid \
version \
winmm \
winspool \
))
# prevent warning spamming
$(eval $(call gb_Library_add_ldflags,merged,\
/ignore:4049 \
/ignore:4217 \
))
$(eval $(call gb_Library_use_externals,merged,\
icuin \
))
else
$(eval $(call gb_Library_use_externals,merged,\
icui18n \
))
endif
ifeq ($(OS),MACOSX)
+21 -12
View File
@@ -44,6 +44,7 @@ basebmp\
basegfx\
basic\
bean\
beanshell\
binaryurp\
bluez_bluetooth\
boost\
@@ -88,15 +89,19 @@ idl\
idlc\
io\
javaunohelper\
jfreereport\
jpeg\
jurt\
jvmaccess\
jvmfwk\
l10ntools\
languagetool\
libcdr\
libcmis\
libmspub\
liborcus\
libpng\
librsvg\
libvisio\
libwpd\
libwpg\
@@ -120,13 +125,14 @@ padmin\
psprint_config\
pyuno\
qadevOOo\
rdbmaker\
readlicense_oo\
regexp\
registry\
remotebridges\
reportbuilder\
reportdesign\
rdbmaker\
rhino\
ridljar\
rsc\
sal\
@@ -187,7 +193,6 @@ writerfilter\
writerperfect\
x11_extensions\
xmerge\
xml2cmp\
xmlhelp\
xmloff\
xmlreader\
@@ -196,7 +201,6 @@ xmlsecurity\
xsltml\
dmake_modules:=\
beanshell\
berkeleydb\
binfilter \
cairo\
@@ -218,14 +222,10 @@ hunspell\
hyphen\
icu\
instsetoo_native\
jfreereport\
jpeg\
languagetool\
libcroco\
libexttextcat\
libgsf\
liblangtag\
librsvg\
libxml2\
libxmlsec\
libxslt\
@@ -245,7 +245,6 @@ postgresql\
postprocess\
python\
redland\
rhino\
setup_native\
stax\
stlport\
@@ -256,7 +255,7 @@ zlib\
export gb_TAILBUILDTARGET=all slowcheck
define gbuild_module_rules
.PHONY: $(1) $(1).all $(1).clean $(1).deliver
.PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).subsequentcheck $(1).deliver
$(1): bootstrap fetch
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) gb_PARTIALBUILD=T
@@ -270,6 +269,12 @@ $(1).all: bootstrap fetch
) \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM)
$(1).build:
cd $(1) && $(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) build gb_PARTIALBUILD=T
$(1).check:
cd $(1) && $(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) check gb_PARTIALBUILD=T
$(1).clean:
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean gb_PARTIALBUILD=T
@@ -337,6 +342,7 @@ endif
rm -fr $(OUTDIR)
rm -fr $(WORKDIR)
rm -fr $(SRCDIR)/*/$(INPATH)
rm -fr $(SRCDIR)/solenv/$(OUTPATH)
rm -fr install
clean-build:
@@ -345,10 +351,12 @@ ifeq ($(CROSS_COMPILING),YES)
rm -rf $(SRCDIR)/*/$(INPATH_FOR_BUILD)
endif
include $(SRCDIR)/compilerplugins/Makefile.mk
#
# Distclean
#
distclean : clean
distclean : clean compilerplugins-clean
ifeq ($(BUILD_DMAKE),YES)
(if [ -f dmake/Makefile ] ; then $(GNUMAKE) -j $(GMAKE_PARALLELISM) -C dmake distclean; fi) && \
rm -f solenv/*/bin/dmake*
@@ -356,7 +364,8 @@ endif
rm -fr config_host.mk config_build.mk aclocal.m4 autom4te.cache \
bin/repo-list config.log config.status configure \
ooo.lst post_download post_download.log \
config_host.mk.last set_soenv.stamp src.downloaded warn
config_host.mk.last set_soenv.stamp src.downloaded warn \
solenv/bin/concat-deps.exe solenv/bin/concat-deps
find $(SOLARENV)/gdb -name "*.pyc" -exec rm {} \;
#
@@ -384,7 +393,7 @@ endif
#
# Bootstap
#
bootstrap: $(WORKDIR)/bootstrap
bootstrap: $(WORKDIR)/bootstrap compilerplugins
$(WORKDIR)/bootstrap: solenv/bin/concat-deps.c
@cd $(SRCDIR) && ./bootstrap
+4
View File
@@ -37,6 +37,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
basegfx \
basic \
bean \
$(call gb_Helper_optional,BSH,beanshell) \
binaryurp \
$(call gb_Helper_optional,BLUEZ,bluez_bluetooth) \
bridges \
@@ -80,6 +81,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
$(call gb_Helper_optional,DESKTOP,idlc) \
io \
javaunohelper \
$(call gb_Helper_optional,JFREEREPORT,jfreereport) \
jurt \
jvmaccess \
jvmfwk \
@@ -87,6 +89,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
libcmis \
libmspub \
liborcus \
$(call gb_Helper_optional,LIBRSVG,librsvg) \
libvisio \
libwpd \
libwpg \
@@ -119,6 +122,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
remotebridges \
reportbuilder \
reportdesign \
$(call gb_Helper_optional,RHINO,rhino) \
ridljar \
rsc \
salhelper \
+2 -8
View File
@@ -76,7 +76,6 @@ $(eval $(call gb_Helper_register_executables,NONE, \
uiex \
ulfconv \
ulfex \
xml2cmp \
xpdfimport \
xrmex \
))
@@ -219,7 +218,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
endif
$(eval $(call gb_Helper_register_libraries,OOOLIBS, \
PptImporter \
abp \
acc \
adabas \
@@ -469,6 +467,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
pyuno \
pyuno_wrapper \
recentfile \
librsvg-2-2 \
scriptframe \
sdbc2 \
smoketest \
@@ -523,12 +522,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
))
endif
ifeq ($(OS),IOS)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
gcc3_uno \
))
endif
$(eval $(call gb_Helper_register_libraries,RTLIBS, \
comphelper \
i18nisolang1 \
@@ -661,6 +654,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
codemaker_java \
cosv \
dtobj \
findsofficepath \
headless \
libeay32 \
npsoenv \
+189 -4
View File
@@ -200,7 +200,7 @@ endef
else # !SYSTEM_JPEG
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
jpeglib \
jpeg \
))
define gb_LinkTarget__use_jpeg
@@ -210,7 +210,7 @@ $(call gb_LinkTarget_set_include,$(1),\
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
jpeglib \
jpeg \
)
endef
@@ -940,12 +940,15 @@ endef
else # !SYSTEM_LIBCDR
$(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
cdrlib \
cdr-0.0 \
))
define gb_LinkTarget__use_cdr
$(call gb_LinkTarget_use_package,$(1),\
libcdr \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
cdrlib \
cdr-0.0 \
)
endef
@@ -1017,6 +1020,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPD_LIBS))
endef
gb_ExternalProject__use_wpd :=
else # !SYSTEM_LIBWPD
@@ -1032,6 +1036,10 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
wpd-0.9 \
)
endef
define gb_ExternalProject__use_wpd
$(call gb_ExternalProject_use_package,$(1),libwpd)
endef
endif # SYSTEM_LIBWPD
@@ -1047,6 +1055,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPG_LIBS))
endef
gb_ExternalProject__use_wpg :=
else # !SYSTEM_LIBWPG
@@ -1055,10 +1064,18 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
))
define gb_LinkTarget__use_wpg
$(call gb_LinkTarget_use_package,$(1),\
libwpg_inc \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
wpglib \
)
endef
define gb_ExternalProject__use_wpg
$(call gb_ExternalProject_use_package,$(1),libwpg_inc)
$(call gb_ExternalProject_use_static_libraries,$(1),wpglib)
endef
endif # SYSTEM_LIBWPG
@@ -1074,6 +1091,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$(call gb_LinkTarget_add_libs,$(1),$(WPS_LIBS))
endef
gb_ExternalProject__use_wps :=
else # !SYSTEM_LIBWPS
@@ -1086,6 +1104,11 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
wpslib \
)
endef
define gb_ExternalProject__use_wps
$(call gb_ExternalProject_use_package,$(1),libwps_inc)
$(call gb_ExternalProject_use_static_libraries,$(1),wpslib)
endef
endif # SYSTEM_LIBWPS
@@ -1182,10 +1205,25 @@ endef
else # ENABLE_GIO
ifeq ($(SYSTEM_GLIB),YES)
gb_LinkTarget__use_gio :=
else # !SYSTEM_GLIB
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
gio-2.0 \
))
define gb_LinkTarget__use_gio
$(call gb_LinkTarget_use_libraries,$(1),\
gio-2.0 \
)
endef
endif # SYSTEM_GLIB
endif # ENABLE_GIO
define gb_LinkTarget__use_gtk
@@ -1211,11 +1249,27 @@ endif
endef
ifeq ($(SYSTEM_GLIB),YES)
define gb_LinkTarget__use_gthread
$(call gb_LinkTarget_add_libs,$(1),$(GTHREAD_LIBS))
endef
else # !SYSTEM_GLIB
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
gthread-2.0 \
))
define gb_LinkTarget__use_gthread
$(call gb_LinkTarget_use_libraries,$(1),\
gthread-2.0 \
)
endef
endif # SYSTEM_GLIB
ifeq ($(ENABLE_CUPS),TRUE)
define gb_LinkTarget__use_cups
@@ -1301,6 +1355,107 @@ gb_LinkTarget__use_telepathy :=
endif # ENABLE_TELEPATHY
ifeq ($(SYSTEM_LIBCROCO),NO)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
croco-0.6-3 \
))
define gb_LinkTarget__use_croco
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
-I$(OUTDIR)/inc/external/libcroco-0.6 \
)
$(call gb_LinkTarget_use_libraries,$(1),\
croco-0.6-3 \
)
endef
else # !SYSTEM_LIBCROCO
gb_LinkTarget__use_croco :=
endif # SYSTEM_LIBCROCO
ifeq ($(SYSTEM_PANGO),NO)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
pango-1.0 \
pangocairo-1.0 \
))
define gb_LinkTarget__use_pango
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
-I$(OUTDIR)/inc/external/pango-1.0 \
)
$(call gb_LinkTarget_use_libraries,$(1),\
pango-1.0 \
pangocairo-1.0 \
)
endef
else # !SYSTEM_PANGO
gb_LinkTarget__use_pango :=
endif # SYSTEM_PANGO
ifeq ($(SYSTEM_LIBGSF),NO)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
gsf-1 \
))
define gb_LinkTarget__use_gsf
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
-I$(OUTDIR)/inc/external/libgsf-1 \
)
$(call gb_LinkTarget_use_libraries,$(1),\
gsf-1 \
)
endef
else # !SYSTEM_LIBGSF
gb_LinkTarget__use_gsf :=
endif # SYSTEM_LIBGSF
ifeq ($(SYSTEM_GDKPIXBUF),NO)
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
gdk_pixbuf-2.0 \
))
define gb_LinkTarget__use_pixbuf
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
-I$(OUTDIR)/inc/external/gdk-pixbuf-2.0 \
)
$(call gb_LinkTarget_use_libraries,$(1),\
gdk_pixbuf-2.0 \
)
endef
else # !SYSTEM_GDKPIXBUF
gb_LinkTarget__use_pixbuf :=
endif # SYSTEM_GDKPIXBUF
ifeq ($(SYSTEM_DB),YES)
@@ -1513,6 +1668,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
endif # SYSTEM_CLUCENE
ifeq ($(SYSTEM_GLIB),YES)
define gb_LinkTarget__use_gobject
$(call gb_LinkTarget_add_libs,$(1),\
$(GOBJECT_LIBS) \
@@ -1524,6 +1680,19 @@ $(call gb_LinkTarget_set_include,$(1),\
)
endef
else # !SYSTEM_GLIB
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
gobject-2.0 \
))
define gb_LinkTarget__use_gobject
$(call gb_LinkTarget_use_libraries,$(1),\
gobject-2.0 \
)
endef
endif # !SYSTEM_GLIB
ifeq ($(SYSTEM_HSQLDB),YES)
@@ -2155,18 +2324,22 @@ ifeq ($(SYSTEM_APACHE_COMMONS),YES)
define gb_Jar__use_commons-codec
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_CODEC_JAR))
endef
gb_ExternalProject__use_commons-codec :=
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_HTTPCLIENT_JAR))
endef
gb_ExternalProject__use_commons-httpclient :=
define gb_Jar__use_commons-lang
$(call gb_Jar_usadd_linked_libse_system_jar,$(1),$(COMMONS_LANG_JAR))
endef
gb_ExternalProject__use_commons-lang :=
define gb_Jar__use_commons-logging
$(call gb_Jar_use_system_jar,$(1),$(COMMONS_LOGGING_JAR))
endef
gb_ExternalProject__use_commons-logging :=
else # !SYSTEM_APACHE_COMMONS
@@ -2180,18 +2353,30 @@ $(eval $(call gb_Helper_register_jars,OXT,\
define gb_Jar__use_commons-codec
$(call gb_Jar_use_jar,$(1),commons-codec-1.3)
endef
define gb_ExternalProject__use_commons-codec
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_codec)
endef
define gb_Jar__use_commons-httpclient
$(call gb_Jar_use_jar,$(1),commons-httpclient-3.1)
endef
define gb_ExternalProject__use_commons-httpclient
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_httpclient)
endef
define gb_Jar__use_commons-lang
$(call gb_Jar_use_jar,$(1),commons-lang-2.3)
endef
define gb_ExternalProject__use_commons-lang
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_lang)
endef
define gb_Jar__use_commons-logging
$(call gb_Jar_use_jar,$(1),commons-logging-1.1.1)
endef
define gb_ExternalProject__use_commons-logging
$(call gb_ExternalProject_use_external_project,$(1),apache_commons_logging)
endef
endif # SYSTEM_APACHE_COMMONS
+7
View File
@@ -111,6 +111,7 @@ gb_Library_DLLFILENAMES := $(patsubst ssl:ssl%,ssl:ssleay32%,$(gb_Library_DLLFIL
else # $(COM) != GCC
gb_Library_FILENAMES := $(patsubst cairo:icairo%,cairo:cairo%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst croco-0.6-3:icroco-0.6-3%,croco-0.6-3:libcroco-0.6-3%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst comphelper:icomphelper%,comphelper:icomphelp%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst cppunit:icppunit%,cppunit:icppunit_dll%,$(gb_Library_FILENAMES))
gb_Library_FILENAMES := $(patsubst crypto:icrypto%,crypto:libeay32%,$(gb_Library_FILENAMES))
@@ -133,12 +134,18 @@ gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
# change the names of all import libraries that don't have an "i" prefix as in our standard naming schema
gb_Library_NOILIBFILENAMES := \
gdk_pixbuf-2.0 \
gio-2.0 \
glib-2.0 \
gmodule-2.0 \
gobject-2.0 \
gthread-2.0 \
graphite2_off \
icudt icuin icule icuuc \
langtag \
lcms2 \
pango-1.0 \
pangocairo-1.0 \
nspr4 \
nss3 \
smime3 \
+34 -19
View File
@@ -30,25 +30,31 @@ $(eval $(call gb_Module_Module,ooo))
$(eval $(call gb_Module_add_moduledirs,ooo,\
accessibility \
$(call gb_Helper_optional,AFMS,afms) \
animations \
autodoc \
$(call gb_Helper_optional,APACHE_COMMONS,apache-commons) \
apple_remote \
autodoc \
avmedia \
basctl \
basebmp \
basegfx \
basic \
bean \
$(call gb_Helper_optional,BSH,beanshell) \
binaryurp \
bluez_bluetooth \
$(call gb_Helper_optional,BLUEZ,bluez_bluetooth) \
boost \
bridges \
canvas \
chart2 \
clucene \
codemaker \
cli_ure \
$(call gb_Helper_optional,CLUCENE,clucene) \
$(call gb_Helper_optional,DESKTOP,codemaker) \
comphelper \
configmgr \
connectivity \
cosv \
cppcanvas \
cppu \
cppuhelper \
@@ -56,6 +62,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
cui \
dbaccess \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
drawinglayer \
dtrans \
editeng \
@@ -70,23 +77,28 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
formula \
fpicker \
framework \
hsqldb \
$(call gb_Helper_optional,DESKTOP,helpcompiler) \
$(call gb_Helper_optional,HSQLDB,hsqldb) \
hwpfilter \
i18npool \
i18nutil \
idl \
idlc \
$(call gb_Helper_optional,DESKTOP,idlc) \
io \
javaunohelper \
$(call gb_Helper_optional,JFREEREPORT,jfreereport) \
jurt \
$(call gb_Helper_optional,JPEG,jpeg) \
jvmaccess \
jvmfwk \
l10ntools \
$(call gb_Helper_optional,DESKTOP,l10ntools) \
$(call gb_Helper_optional,LANGUAGETOOL,languagetool) \
libcdr \
libcmis \
libmspub \
liborcus \
libpng \
$(call gb_Helper_optional,LIBRSVG,librsvg) \
libvisio \
libwpd \
libwpg \
@@ -97,8 +109,9 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
MathMLDTD \
mdds \
Mesa \
neon \
nlpsolver \
$(call gb_Helper_optional,MORE_FONTS,more_fonts) \
$(call gb_Helper_optional,NEON,neon) \
$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
np_sdk \
o3tl \
offapi \
@@ -109,25 +122,29 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
packimages \
padmin \
psprint_config \
$(call gb_Helper_optional,PYUNO,pyuno) \
$(if $(strip $(OOO_JUNIT_JAR)),\
qadevOOo \
) \
rdbmaker \
$(call gb_Helper_optional,DESKTOP,rdbmaker) \
readlicense_oo \
regexp \
registry \
remotebridges \
reportbuilder \
reportdesign \
$(call gb_Helper_optional,RHINO,rhino) \
ridljar \
rsc \
sal \
salhelper \
sane \
sax \
$(call gb_Helper_optional,SAXON,saxon) \
sc \
scaddins \
sccomp \
scp2 \
$(call gb_Helper_optional,DESKTOP,scp2) \
scripting \
sd \
sdext \
@@ -147,17 +164,18 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
swext \
test \
testtools \
$(call gb_Helper_optional,TOMCAT,tomcat) \
toolkit \
tools \
touch \
$(if $(filter TRANSLATIONS,$(BUILD_TYPE)),\
translations \
) \
$(call gb_Helper_optional,TRANSLATIONS,translations) \
tubes \
twain \
ucb \
ucbhelper \
$(call gb_Helper_optional,UCPP,ucpp) \
udkapi \
udm \
unixODBC \
UnoControls \
unodevtools \
@@ -173,12 +191,9 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
wizards \
writerfilter \
writerperfect \
$(if $(filter X11_EXTENSIONS,$(BUILD_TYPE)),\
x11_extensions \
) \
$(call gb_Helper_optional,X11_EXTENSIONS,x11_extensions) \
xmerge \
xml2cmp \
xmlhelp \
$(call gb_Helper_optional,DESKTOP,xmlhelp) \
xmloff \
xmlreader \
xmlscript \
@@ -19,7 +19,7 @@
#include <accessibility/extended/accessiblelistbox.hxx>
#include <accessibility/extended/accessiblelistboxentry.hxx>
#include <svtools/svtreebx.hxx>
#include <svtools/treelistbox.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
#include <com/sun/star/awt/Size.hpp>
@@ -18,7 +18,7 @@
*/
#include "accessibility/extended/accessiblelistboxentry.hxx"
#include <svtools/svtreebx.hxx>
#include <svtools/treelistbox.hxx>
#include <svtools/stringtransfer.hxx>
#include <com/sun/star/awt/Point.hpp>
#include <com/sun/star/awt/Rectangle.hpp>
@@ -18,7 +18,7 @@
*/
#include <accessibility/extended/listboxaccessible.hxx>
#include <svtools/svtreebx.hxx>
#include <svtools/treelistbox.hxx>
//........................................................................
namespace accessibility
@@ -16,6 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <string.h>
#include <accessibility/standard/vclxaccessibletoolbox.hxx>
#include <accessibility/standard/vclxaccessibletoolboxitem.hxx>
@@ -164,7 +165,7 @@ namespace
sal_Int64 SAL_CALL OToolBoxWindowItem::getSomething( const Sequence< sal_Int8 >& _rId ) throw (RuntimeException)
{
if ( ( 16 == _rId.getLength() )
&& ( 0 == rtl_compareMemory( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) )
&& ( 0 == memcmp( getUnoTunnelImplementationId().getConstArray(), _rId.getConstArray(), 16 ) )
)
return reinterpret_cast< sal_Int64>( this );
+1 -2
View File
@@ -15,8 +15,7 @@ SODEST=libs/$(ANDROID_APP_ABI)
OBJLOCAL=obj/local/$(ANDROID_APP_ABI)
define COPYSO
cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
$(error COPYSO should not be used now with DISABLE_DYNLOADING)
endef
define COPYJAR
@@ -62,21 +62,9 @@ public class Bootstrap extends NativeActivity
String apkFile,
String[] ld_library_path);
public static native boolean setup(int lo_main_ptr,
Object lo_main_argument,
public static native boolean setup(Object lo_main_argument,
int lo_main_delay);
// This is not just a wrapper for the C library dlopen(), but also
// loads recursively dependent libraries.
public static native int dlopen(String library);
// This is just a wrapper for the C library dlsym().
public static native int dlsym(int handle, String symbol);
// To be called after you are sure libgnustl_shared.so
// has been loaded
static native void patch_libgnustl_shared();
// Extracts files in the .apk that need to be extraced into the app's tree
static native void extract_files();
@@ -148,11 +136,6 @@ public class Bootstrap extends NativeActivity
if (!setup(dataDir, activity.getApplication().getPackageResourcePath(), llpa))
return;
// We build LO code against the shared GNU C++ library
dlopen("libgnustl_shared.so");
// and need to patch it.
patch_libgnustl_shared();
// Extract files from the .apk that can't be used mmapped directly from it
extract_files();
@@ -224,35 +207,8 @@ public class Bootstrap extends NativeActivity
System.arraycopy(argv, 0, newargv, 1, argv.length);
argv = newargv;
// Load the LO "program" here and look up lo_main
int loLib = dlopen(mainLibrary);
if (loLib == 0) {
Log.i(TAG, String.format("Error: could not load %s", mainLibrary));
mainLibrary = "libmergedlo.so";
loLib = dlopen(mainLibrary);
if (loLib == 0) {
Log.i(TAG, String.format("Error: could not load fallback %s", mainLibrary));
return;
}
}
int lo_main = dlsym(loLib, "lo_main");
if (lo_main == 0) {
Log.i(TAG, String.format("No lo_main in %s", mainLibrary));
return;
}
// Get extra libraries to load early, so that it's easier to debug
// them even with a buggy ndk-gdb that doesn't grok debugging
// information from libraries loaded after it has been attached to the
// process.
String extraLibs = getIntent().getStringExtra("lo-extra-libs");
if (extraLibs != null) {
for (String lib : extraLibs.split(":")) {
dlopen(lib);
}
}
// Load the LO "program" here
System.loadLibrary(mainLibrary);
// Start a strace on ourself if requested.
@@ -272,7 +228,7 @@ public class Bootstrap extends NativeActivity
delay = Integer.parseInt(sdelay);
// Tell lo-bootstrap.c the stuff it needs to know
if (!setup(lo_main, argv, delay))
if (!setup(argv, delay))
return;
// Finally, call our super-class, NativeActivity's onCreate(),
@@ -286,14 +242,12 @@ public class Bootstrap extends NativeActivity
super.onCreate(savedInstanceState);
}
// This is used to load the 'lo-bootstrap' library on application
// startup. The library has already been unpacked into
// /data/data/<app name>/lib/liblo-bootstrap.so at installation
// time by the package manager.
// Now with static loading we always have all native code in one native
// library which we always call liblo-native-code.so, regardless of the
// app. The library has already been unpacked into /data/data/<app
// name>/lib at installation time by the package manager.
static {
System.loadLibrary("lo-bootstrap");
System.loadLibrary("gnustl_shared");
System.loadLibrary("libotouchlo");
System.loadLibrary("lo-native-code");
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -35,8 +35,6 @@ import com.actionbarsherlock.view.MenuItem;
* <p>This class will manage interaction with a custom action bar based on the
* Android 4.0 source code. The exposed API mirrors that of its native
* counterpart and you should refer to its documentation for instruction.</p>
*
* @author Jake Wharton <jakewharton@gmail.com>
*/
public abstract class ActionBarSherlock {
protected static final String TAG = "ActionBarSherlock";
+23 -87
View File
@@ -19,15 +19,22 @@ APP_DATA_PATH=/data/data/$(APP_PACKAGE)
SODEST=libs/$(ANDROID_APP_ABI)
OBJLOCAL=obj/local/$(ANDROID_APP_ABI)
define COPYSO
cp $(1) $(SODEST)$(if $(2),/$(2)) && $(STRIP) --strip-debug $(SODEST)$(if $(2),/$(2),/$(notdir $(1))) && \
cp $(1) $(OBJLOCAL)$(if $(2),/$(2))
endef
define COPYJAR
cp $(1) libs
endef
LIBS = \
-Wl,--start-group \
$(wildcard $(OUTDIR)/lib/lib*.a) \
-Wl,--end-group
WHOLELIBS = \
-Wl,--whole-archive \
$(addprefix -l,$(strip \
juh \
)) \
-Wl,--no-whole-archive
# The default target just builds.
all: build-ant
@@ -39,87 +46,16 @@ properties:
echo "APP_ABI := $(ANDROID_APP_ABI)" >>jni/Application.mk
echo "APP_PLATFORM := android-14" >>jni/Application.mk
link-so:
# Build the single .so for this app
mkdir -p $(OBJLOCAL)
$(CXX) -Wl,--stats -Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx -L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
copy-stuff:
# First always clean
rm -rf libs $(OBJLOCAL)
mkdir -p $(SODEST) $(OBJLOCAL)
#
# Copy shared libraries (including UNO components) we need to
# libs/$(ANDROID_APP_ABI) so that ant will include them in the .apk.
#
# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for
# them.
#
for F in $(strip \
basegfxlo \
bootstrap.uno \
comphelpgcc3 \
dbaxmllo \
dbtoolslo \
expwrap.uno \
frmlo \
gcc3_uno \
i18nisolang1gcc3 \
icudatalo \
icui18nlo \
iculelo \
icuuclo \
introspection.uno \
java_uno \
juh \
juhx \
jvmaccessgcc3 \
jvmfwk \
libotouchlo \
lo-bootstrap \
localedata_en \
localedata_others \
lwpftlo \
mergedlo \
msfilterlo \
mswordlo \
ooxlo \
reflection.uno \
reg \
sclo \
scdlo \
scfiltlo \
sddlo \
smdlo \
stocservices.uno \
store \
svgfilterlo \
swdlo \
swlo \
t602filterlo \
textinstream.uno \
tllo \
ucbhelper4gcc3 \
ucppkg1 \
uno_cppu \
uno_cppuhelpergcc3 \
uno_sal \
uno_salhelpergcc3 \
uno_cppuhelpergcc3 \
unordflo \
unoxmllo \
vbahelperlo \
vbaswobj.uno \
wpftdrawlo \
wpftwriterlo \
xml2 \
xmlfdlo \
xmlreader \
xmlsecurity \
xslt \
); do \
$(call COPYSO,$(OUTDIR)/lib/lib$${F}.so); \
done
#
# Then the shared GNU C++ library
$(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so)
#
# Then other "assets". Let the directory structure under assets mimic
# Then "assets". Let the directory structure under assets mimic
# that under solver for now.
#
# Please note that I have no idea what all of this is really necessary and for
@@ -216,10 +152,11 @@ copy-stuff:
#
# Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
#
mkdir -p $(SODEST)
cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup
build-ant: copy-stuff properties
build-ant: copy-stuff link-so properties
#
# Copy jar files we need
#
@@ -246,7 +183,6 @@ uninstall:
$(ANDROID_SDK_HOME)/platform-tools/adb uninstall $(APP_PACKAGE)
run:
# /data/local/tmp/sample-document.odt
adb shell am start -n org.libreoffice.android.examples/.DocumentLoader -e input /assets/test1.odt
@@ -0,0 +1,100 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include "osl/detail/android-bootstrap.h"
extern "C"
{
extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fileacc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * hwp_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * hyphen_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lng_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lnth_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lotuswordpro_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * oox_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sb_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * scd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * scfilt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * wpftdraw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * wpftwriter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
}
extern "C"
__attribute__ ((visibility("default")))
const lib_to_component_mapping *
lo_get_libmap(void)
{
static lib_to_component_mapping map[] = {
{ "libavmedialo.a", avmedia_component_getFactory },
{ "libdbaxmllo.a", dbaxml_component_getFactory },
{ "libevtattlo.a", evtatt_component_getFactory },
{ "libfileacc.a", fileacc_component_getFactory },
{ "libfrmlo.a", frm_component_getFactory },
{ "libfsstorage.uno.a", fsstorage_component_getFactory },
{ "libfwklo.a", fwk_component_getFactory },
{ "libfwllo.a", fwl_component_getFactory },
{ "libfwmlo.a", fwm_component_getFactory },
{ "libhwplo.a", hwp_component_getFactory },
{ "libhyphenlo.a", hyphen_component_getFactory },
{ "liblnglo.a", lng_component_getFactory },
{ "liblnthlo.a", lnth_component_getFactory },
{ "liblwpftlo.a", lotuswordpro_component_getFactory },
{ "libooxlo.a", oox_component_getFactory },
{ "libscdlo.a", scd_component_getFactory },
{ "libscfiltlo.a", scfilt_component_getFactory },
{ "libsblo.a", sb_component_getFactory },
{ "libsclo.a", sc_component_getFactory },
{ "libsddlo.a", sdd_component_getFactory },
{ "libsdlo.a", sd_component_getFactory },
{ "libsmdlo.a", smd_component_getFactory },
{ "libsmlo.a", sm_component_getFactory },
{ "libsvgfilterlo.a", svgfilter_component_getFactory },
{ "libswdlo.a", swd_component_getFactory },
{ "libswlo.a", sw_component_getFactory },
{ "libt602filterlo.a", t602filter_component_getFactory },
{ "libtextfdlo.a", textfd_component_getFactory },
{ "libunordflo.a", unordf_component_getFactory },
{ "libunoxmllo.a", unoxml_component_getFactory },
{ "libwpftdrawlo.a", wpftdraw_component_getFactory },
{ "libwpftwriterlo.a", wpftwriter_component_getFactory },
{ "libxmlfdlo.a", xmlfd_component_getFactory },
{ "libxmlsecurity.a", xmlsecurity_component_getFactory },
{ "libxoflo.a", xof_component_getFactory },
{ "libxolo.a", xo_component_getFactory },
{ NULL, NULL }
};
return map;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface Animation {
/**
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class Animator extends Thread {
private GestureImageView view;
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class FlingAnimation implements Animation {
private float velocityX;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface FlingAnimationListener {
public void onMove(float x, float y);
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author jasonpolites
*
*/
public interface GestureImageViewListener {
public void onTouch(float x, float y);
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class MoveAnimation implements Animation {
private boolean firstFrame = true;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface MoveAnimationListener {
public void onMove(float x, float y);
@@ -17,11 +17,6 @@ package com.polites.android;
import android.graphics.PointF;
/**
* @author Jason Polites
*
*/
public class ZoomAnimation implements Animation {
private boolean firstFrame = true;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface ZoomAnimationListener {
public void onZoom(float scale, float x, float y);
public void onComplete();
@@ -597,6 +597,7 @@ public class DocumentLoader
final int level,
final int location)
{
Log.i(TAG, "renderPage(" + number + ", " + level + ", " + location + ")");
try {
// Use dummySmallDevice with no scale or offset just to find out
// the paper size of this page.
@@ -727,6 +728,8 @@ public class DocumentLoader
{
int number = params[0];
Log.i(TAG, "doInBackground(" + number + ")");
if (number >= pageCount)
return -1;
@@ -929,13 +932,7 @@ public class DocumentLoader
Bootstrap.setup(this);
// Avoid all the old style OSL_TRACE calls especially in vcl
Bootstrap.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
// Load a lot of shlibs here explicitly in advance because that
// makes debugging work better, sigh
Bootstrap.dlopen("libmergedlo.so");
Bootstrap.dlopen("libswdlo.so");
Bootstrap.dlopen("libswlo.so");
Bootstrap.putenv("SAL_LOG=+WARN+INFO");
// Log.i(TAG, "Sleeping NOW");
// Thread.sleep(20000);
@@ -30,9 +30,6 @@ import android.util.Log;
/**
* Mesh is a base class for 3D objects making it easier to create and maintain
* new primitives.
*
* @author Per-Erik Bergman (per-erik.bergman@jayway.com)
*
*/
public class Mesh {
// Our vertex buffer.
@@ -259,4 +256,4 @@ public class Mesh {
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, mBitmap, 0);
Log.d("gl-load-texture", Integer.toString(mTextureId) );
}
}
}
@@ -1,102 +1,36 @@
include ../../../config_host.mk
include ../../Bootstrap/Makefile.shared
# The package of this app
APP_PACKAGE=org.libreoffice
LIBS = \
-Wl,--start-group \
$(wildcard $(OUTDIR)/lib/lib*.a) \
-Wl,--end-group
WHOLELIBS = \
-Wl,--whole-archive \
$(addprefix -l,$(strip \
juh \
)) \
-Wl,--no-whole-archive
# The default target just builds.
all: build-ant
include ../../Bootstrap/Makefile.shared
# The package of this app
APP_PACKAGE=org.libreoffice
link-so:
# Build the single .so for this app
mkdir -p $(OBJLOCAL)
$(CXX) -Wl,--stats -Wl,--no-keep-files-mapped -Wl,--no-undefined -DANDROID -DDISABLE_DYNLOADING -shared -o $(OBJLOCAL)/liblo-native-code.so -I$(OUTDIR)/inc native-code.cxx -L$(OUTDIR)/lib $(WHOLELIBS) $(LIBS) -lgnustl_static -landroid -llog -lz
mkdir -p $(SODEST)
cp $(OBJLOCAL)/liblo-native-code.so $(SODEST)
$(STRIP) --strip-debug $(SODEST)/liblo-native-code.so
copy-stuff:
# First always clean
rm -rf libs $(OBJLOCAL)
mkdir -p $(SODEST) $(OBJLOCAL)
#
# Copy shared libraries (including UNO components) we need to
# libs/$(ANDROID_APP_ABI) so that ant will include them in the .apk.
#
# Copy them to obj/local/$(ANDROID_APP_ABI), too, where gdb will look for
# them.
#
for F in $(strip \
basegfxlo \
bootstrap.uno \
chartcontrollerlo \
chartcorelo \
comphelpgcc3 \
dbaxmllo \
dbtoolslo \
expwrap.uno \
frmlo \
gcc3_uno \
i18nisolang1gcc3 \
icudatalo \
icui18nlo \
iculelo \
icuuclo \
introspection.uno \
java_uno \
juh \
juhx \
jvmaccessgcc3 \
jvmfwk \
libotouchlo \
lo-bootstrap \
localedata_en \
localedata_es \
localedata_euro \
localedata_others \
lwpftlo \
mergedlo \
msfilterlo \
mswordlo \
ooxlo \
reflection.uno \
reg \
sclo \
sclo \
scdlo \
scfiltlo \
sdlo \
sddlo \
smdlo \
stocservices.uno \
store \
svgfilterlo \
swdlo \
swlo \
swdlo \
t602filterlo \
textinstream.uno \
tllo \
ucbhelper4gcc3 \
ucppkg1 \
uno_cppu \
uno_cppuhelpergcc3 \
uno_sal \
uno_salhelpergcc3 \
uno_cppuhelpergcc3 \
unordflo \
unoxmllo \
vbahelperlo \
vbaswobj.uno \
wpftdrawlo \
wpftwriterlo \
xml2 \
xmlfdlo \
xmlreader \
xmlsecurity \
xoflo \
xslt \
); do \
$(call COPYSO,$(OUTDIR)/lib/lib$${F}.so); \
done
#
# Then the shared GNU C++ library
$(call COPYSO,$(ANDROID_NDK_HOME)/sources/cxx-stl/gnu-libstdc++/$(ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR)libs/$(ANDROID_APP_ABI)/libgnustl_shared.so)
#
# Then other "assets". Let the directory structure under assets mimic
# Then "assets". Let the directory structure under assets mimic
# that under solver for now.
#
# Please note that I have no idea what all of this is really necessary and for
@@ -195,10 +129,11 @@ copy-stuff:
#
# Then gdbserver and gdb.setup so that we can debug with ndk-gdb.
#
mkdir -p $(SODEST)
cp $(ANDROID_NDK_GDBSERVER) $(SODEST)
echo set solib-search-path ./obj/local/$(ANDROID_APP_ABI) >$(SODEST)/gdb.setup
build-ant: copy-stuff properties
build-ant: copy-stuff link-so properties
echo sdk.dir=$(ANDROID_SDK_HOME) >../../abs-lib/local.properties
# ActionBarSherlock uses the v4 support library, apparently one needs to copy
# it like this for it to be found
@@ -221,6 +156,4 @@ build-ant: copy-stuff properties
unset JAVA_HOME && $(ANT) debug
run:
# /data/local/tmp/sample-document.odt
# add -e lo-strace to strace
adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity -e lo-strace -e input /assets/test1.odt
adb shell am start -n $(APP_PACKAGE)/.ui.LibreOfficeUIActivity -e input /assets/test1.odt
@@ -0,0 +1,100 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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/.
*/
#include "osl/detail/android-bootstrap.h"
extern "C"
{
extern void * avmedia_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * dbaxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * evtatt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fileacc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * frm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fsstorage_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwk_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwl_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * fwm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * hwp_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * hyphen_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lng_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lnth_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * lotuswordpro_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * oox_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sb_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sc_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * scd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * scfilt_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sdd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sm_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * smd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * svgfilter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * sw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * swd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * t602filter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * textfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * unoxml_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * unordf_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * wpftdraw_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * wpftwriter_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xmlfd_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xmlsecurity_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xo_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
extern void * xof_component_getFactory( const char * pImplName, void * pServiceManager, void * pRegistryKey );
}
extern "C"
__attribute__ ((visibility("default")))
const lib_to_component_mapping *
lo_get_libmap(void)
{
static lib_to_component_mapping map[] = {
{ "libavmedialo.a", avmedia_component_getFactory },
{ "libdbaxmllo.a", dbaxml_component_getFactory },
{ "libevtattlo.a", evtatt_component_getFactory },
{ "libfileacc.a", fileacc_component_getFactory },
{ "libfrmlo.a", frm_component_getFactory },
{ "libfsstorage.uno.a", fsstorage_component_getFactory },
{ "libfwklo.a", fwk_component_getFactory },
{ "libfwllo.a", fwl_component_getFactory },
{ "libfwmlo.a", fwm_component_getFactory },
{ "libhwplo.a", hwp_component_getFactory },
{ "libhyphenlo.a", hyphen_component_getFactory },
{ "liblnglo.a", lng_component_getFactory },
{ "liblnthlo.a", lnth_component_getFactory },
{ "liblwpftlo.a", lotuswordpro_component_getFactory },
{ "libooxlo.a", oox_component_getFactory },
{ "libscdlo.a", scd_component_getFactory },
{ "libscfiltlo.a", scfilt_component_getFactory },
{ "libsblo.a", sb_component_getFactory },
{ "libsclo.a", sc_component_getFactory },
{ "libsddlo.a", sdd_component_getFactory },
{ "libsdlo.a", sd_component_getFactory },
{ "libsmdlo.a", smd_component_getFactory },
{ "libsmlo.a", sm_component_getFactory },
{ "libsvgfilterlo.a", svgfilter_component_getFactory },
{ "libswdlo.a", swd_component_getFactory },
{ "libswlo.a", sw_component_getFactory },
{ "libt602filterlo.a", t602filter_component_getFactory },
{ "libtextfdlo.a", textfd_component_getFactory },
{ "libunordflo.a", unordf_component_getFactory },
{ "libunoxmllo.a", unoxml_component_getFactory },
{ "libwpftdrawlo.a", wpftdraw_component_getFactory },
{ "libwpftwriterlo.a", wpftwriter_component_getFactory },
{ "libxmlfdlo.a", xmlfd_component_getFactory },
{ "libxmlsecurity.a", xmlsecurity_component_getFactory },
{ "libxoflo.a", xof_component_getFactory },
{ "libxolo.a", xo_component_getFactory },
{ NULL, NULL }
};
return map;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface Animation {
/**
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class Animator extends Thread {
private GestureImageView view;
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class FlingAnimation implements Animation {
private float velocityX;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface FlingAnimationListener {
public void onMove(float x, float y);
@@ -18,11 +18,6 @@ package com.polites.android;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
/**
* @author Jason Polites
*
*/
public class FlingListener extends SimpleOnGestureListener {
private float velocityX;
@@ -15,10 +15,6 @@
*/
package com.polites.android;
/**
* @author jasonpolites
*
*/
public interface GestureImageViewListener {
public void onTouch(float x, float y);
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public class MoveAnimation implements Animation {
private boolean firstFrame = true;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface MoveAnimationListener {
public void onMove(float x, float y);
@@ -17,11 +17,6 @@ package com.polites.android;
import android.graphics.PointF;
/**
* @author Jason Polites
*
*/
public class ZoomAnimation implements Animation {
private boolean firstFrame = true;
@@ -15,11 +15,6 @@
*/
package com.polites.android;
/**
* @author Jason Polites
*
*/
public interface ZoomAnimationListener {
public void onZoom(float scale, float x, float y);
public void onComplete();
@@ -961,12 +961,6 @@ public class DocumentLoader
// Avoid all the old style OSL_TRACE calls especially in vcl
Bootstrap.putenv("SAL_LOG=+WARN+INFO-INFO.legacy.osl");
// Load a lot of shlibs here explicitly in advance because that
// makes debugging work better, sigh
Bootstrap.dlopen("libmergedlo.so");
Bootstrap.dlopen("libswdlo.so");
Bootstrap.dlopen("libswlo.so");
// Log.i(TAG, "Sleeping NOW");
// Thread.sleep(20000);
@@ -139,11 +139,6 @@ public class LibreOfficeUIActivity extends SherlockActivity implements ActionBar
Bootstrap.putenv("SAL_LOG=yes");
// Load a lot of shlibs here explicitly in advance because that
// makes debugging work better, sigh
Bootstrap.dlopen("libmergedlo.so");
Bootstrap.dlopen("libswdlo.so");
Bootstrap.dlopen("libswlo.so");
}
public void createUI(){
@@ -21,8 +21,6 @@ import android.support.v4.content.LocalBroadcastManager;
/**
* Standard Network client. Connects to a server using Sockets.
*
* @author Andrzej J.R. Hunt
*/
public class BluetoothClient extends Client {
@@ -88,4 +86,4 @@ public class BluetoothClient extends Client {
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -22,8 +22,6 @@ import android.content.Intent;
* transport medium you must provide input and output streams (
* <code>mInputStream</code> and <code>mOutputStream</code> before calling any
* methods.
*
* @author Andrzej J.R. Hunt
*/
public abstract class Client {
@@ -139,4 +137,4 @@ public abstract class Client {
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -22,8 +22,6 @@ import android.support.v4.content.LocalBroadcastManager;
/**
* Standard Network client. Connects to a server using Sockets.
*
* @author Andrzej J.R. Hunt
*/
public class NetworkClient extends Client {
@@ -133,4 +131,4 @@ public class NetworkClient extends Client {
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -12,8 +12,6 @@ import android.graphics.Color;
/**
* Interface to send commands to the server.
*
* @author Andrzej J.R. Hunt
*/
public class Transmitter {
@@ -68,4 +66,4 @@ public class Transmitter {
mClient.sendCommand("presentation_stop\n\n");
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@@ -16,7 +16,6 @@
* This code is base on the Android Gallery widget and was Created
* by Neil Davies neild001 'at' gmail dot com to be a Coverflow widget
*
* @author Neil Davies
*/
package pl.polidea.coverflow;
@@ -385,4 +384,4 @@ public class CoverFlow extends Gallery {
}
}
}
}
@@ -32,9 +32,6 @@ import android.graphics.Shader.TileMode;
/**
* This adapter provides reflected images from linked adapter.
*
* @author potiuk
*
*/
public class ReflectingImageAdapter extends AbstractCoverFlowImageAdapter {
+2 -1
View File
@@ -52,6 +52,7 @@
#include <osl/mutex.hxx>
#include <list>
#include <algorithm>
#include <string.h>
using ::osl::Mutex;
using ::osl::Guard;
@@ -2018,7 +2019,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis
// XUnoTunnel
::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId ) throw (RuntimeException)
{
if( rId.getLength() == 16 && 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
{
return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this));
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_codec,\
$(call gb_ExternalProject_get_state_target,apache_commons_codec,build) :
cd "$(call gb_UnpackedTarball_get_dir,apache_commons_codec)" && \
ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
"$(ANT)" \
$(ICECREAM_RUN) "$(ANT)" \
-q \
-f build.xml \
-Dbuild.label="build-$(RSCREVISION)" \
@@ -14,8 +14,8 @@ $(eval $(call gb_ExternalProject_ExternalProject,apache_commons_httpclient))
$(eval $(call gb_ExternalProject_use_unpacked,apache_commons_codec,apache_commons_httpclient))
$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_codec))
$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,apache_commons_logging))
$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-codec))
$(eval $(call gb_ExternalProject_use_external,apache_commons_httpclient,commons-logging))
$(eval $(call gb_ExternalProject_register_targets,apache_commons_httpclient,\
build \
@@ -24,7 +24,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_httpclient,\
$(call gb_ExternalProject_get_state_target,apache_commons_httpclient,build) :
cd "$(call gb_UnpackedTarball_get_dir,apache_commons_httpclient)" && \
ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
"$(ANT)" \
$(ICECREAM_RUN) "$(ANT)" \
-q \
-f build.xml \
-Dbuild.label="build-$(RSCREVISION)" \
@@ -21,7 +21,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_lang,\
$(call gb_ExternalProject_get_state_target,apache_commons_lang,build) :
cd "$(call gb_UnpackedTarball_get_dir,apache_commons_lang)" && \
ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
"$(ANT)" \
$(ICECREAM_RUN) "$(ANT)" \
-q \
-f build.xml \
-Dbuild.label="build-$(RSCREVISION)" \
@@ -14,6 +14,13 @@ $(eval $(call gb_ExternalProject_ExternalProject,apache_commons_logging))
$(eval $(call gb_ExternalProject_use_unpacked,apache_commons_logging,apache_commons_logging))
# TODO: this should go into RepositoryExternal.mk
ifneq ($(SYSTEM_TOMCAT),YES)
$(eval $(call gb_ExternalProject_use_packages,apache_commons_logging,\
tomcat_inc \
))
endif
$(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
build \
))
@@ -21,7 +28,7 @@ $(eval $(call gb_ExternalProject_register_targets,apache_commons_logging,\
$(call gb_ExternalProject_get_state_target,apache_commons_logging,build) :
cd "$(call gb_UnpackedTarball_get_dir,apache_commons_logging)" && \
ANT_OPTS="$$ANT_OPTS -Dfile.encoding=ISO-8859-1" \
"$(ANT)" \
$(ICECREAM_RUN) "$(ANT)" \
-q \
-f build.xml \
-Dbuild.label="build-$(RSCREVISION)" \
@@ -11,6 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,apache_commons_codec))
$(eval $(call gb_UnpackedTarball_set_tarball,apache_commons_codec,$(APACHE_COMMONS_CODEC_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,apache_commons_codec,3))
$(eval $(call gb_UnpackedTarball_fix_end_of_line,apache_commons_codec,\
build.xml \
))
+1 -1
View File
@@ -446,7 +446,7 @@ IMPL_LINK_NOARG(SoundHandler, implts_PlayerNotify)
} // namespace framework
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ )
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmedia_component_getFactory(const sal_Char* pImplementationName, void* pServiceManager, void* /*pRegistryKey*/ )
{
void* pReturn = NULL;
if (pServiceManager != NULL )
@@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
<component loader="com.sun.star.loader.SharedLibrary" xmlns="http://openoffice.org/2010/uno-components">
<component loader="com.sun.star.loader.SharedLibrary" prefix="avmediagst" xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.media.Manager_GStreamer">
<service name="com.sun.star.comp.avmedia.Manager_GStreamer"/>
</implementation>
+1 -1
View File
@@ -21,7 +21,7 @@
#define _FRAMEGRABBER_HXX
#include "gstplayer.hxx"
#include "com/sun/star/media/XFrameGrabber.hdl"
#include <com/sun/star/media/XFrameGrabber.hpp>
#include <cppuhelper/implbase2.hxx>
namespace avmedia { namespace gstreamer {
+1 -1
View File
@@ -39,7 +39,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
return uno::Reference< uno::XInterface >( *new ::avmedia::gstreamer::Manager( rxFact ) );
}
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediagst_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /*pRegistryKey*/ )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0;
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary"
<component loader="com.sun.star.loader.SharedLibrary" prefix="avmediaQuickTime"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.avmedia.Manager_QuickTime">
<service name="com.sun.star.media.Manager_QuickTime"/>
+1 -1
View File
@@ -31,7 +31,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
return uno::Reference< uno::XInterface >( *new ::avmedia::quicktime::Manager( rxFact ) );
}
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaQuickTime_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0;
+1 -1
View File
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary"
<component loader="com.sun.star.loader.SharedLibrary" prefix="avmediawin"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.avmedia.Manager_DirectX">
<service name="com.sun.star.media.Manager_DirectX"/>
+1 -1
View File
@@ -31,7 +31,7 @@ static uno::Reference< uno::XInterface > SAL_CALL create_MediaPlayer( const uno:
return uno::Reference< uno::XInterface >( *new ::avmedia::win::Manager( rxFact ) );
}
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* )
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediawin_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* )
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
void* pRet = 0;
+1 -1
View File
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary"
<component loader="com.sun.star.loader.SharedLibrary" prefix="avmedia"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.framework.SoundHandler">
<service name="com.sun.star.frame.ContentHandler"/>
+2 -2
View File
@@ -237,9 +237,9 @@ void LibBox::FillBox()
void LibBox::InsertEntries( const ScriptDocument& rDocument, LibraryLocation eLocation )
{
// get a sorted list of library names
Sequence< ::rtl::OUString > aLibNames = rDocument.getLibraryNames();
Sequence< OUString > aLibNames = rDocument.getLibraryNames();
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; ++i )
{
+18 -18
View File
@@ -46,31 +46,31 @@ Renderable::Renderable (BaseWindow* pWin)
// show Subgroup for print range
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) );
aPrintRangeOpt.maGroupHint = "PrintRange" ;
aPrintRangeOpt.mbInternalOnly = true;
m_aUIProperties[0].Value = setSubgroupControlOpt("printrange",
rtl::OUString(aStrings.GetString(0)), rtl::OUString(), aPrintRangeOpt);
OUString(aStrings.GetString(0)), OUString(), aPrintRangeOpt);
// create a choice for the range to print
rtl::OUString aPrintContentName( RTL_CONSTASCII_USTRINGPARAM( "PrintContent" ) );
Sequence< rtl::OUString > aChoices( 2 );
Sequence< rtl::OUString > aHelpIds( 2 );
Sequence< rtl::OUString > aWidgetIds( 2 );
OUString aPrintContentName( "PrintContent" );
Sequence< OUString > aChoices( 2 );
Sequence< OUString > aHelpIds( 2 );
Sequence< OUString > aWidgetIds( 2 );
aChoices[0] = aStrings.GetString( 1 );
aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ) );
aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0" ;
aChoices[1] = aStrings.GetString( 2 );
aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ) );
aWidgetIds[0] = rtl::OUString("printallpages");
aWidgetIds[1] = rtl::OUString("printpages");
m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, rtl::OUString(),
aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1" ;
aWidgetIds[0] = "printallpages" ;
aWidgetIds[1] = "printpages" ;
m_aUIProperties[1].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
aHelpIds, aPrintContentName,
aChoices, 0);
// create a an Edit dependent on "Pages" selected
vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true);
m_aUIProperties[2].Value = setEditControlOpt("pagerange", rtl::OUString(),
rtl::OUString(), "PageRange",
rtl::OUString(), aPageRangeOpt);
m_aUIProperties[2].Value = setEditControlOpt("pagerange", OUString(),
OUString(), "PageRange",
OUString(), aPageRangeOpt);
}
Renderable::~Renderable()
@@ -80,7 +80,7 @@ Renderable::~Renderable()
Printer* Renderable::getPrinter()
{
Printer* pPrinter = NULL;
Any aValue( getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "RenderDevice" ) ) ) );
Any aValue( getValue( "RenderDevice" ) );
Reference<awt::XDevice> xRenderDevice;
if( aValue >>= xRenderDevice )
@@ -107,7 +107,7 @@ sal_Int32 SAL_CALL Renderable::getRendererCount (
sal_Int64 nContent = getIntValue( "PrintContent", -1 );
if( nContent == 1 )
{
rtl::OUString aPageRange( getStringValue( "PageRange" ) );
OUString aPageRange( getStringValue( "PageRange" ) );
if( !aPageRange.isEmpty() )
{
StringRangeEnumerator aRangeEnum( aPageRange, 0, nCount-1 );
@@ -139,7 +139,7 @@ Sequence<beans::PropertyValue> SAL_CALL Renderable::getRenderer (
Size aPageSize( pPrinter->PixelToLogic( pPrinter->GetPaperSizePixel(), MapMode( MAP_100TH_MM ) ) );
aVals.realloc( 1 );
aVals[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
aVals[0].Name = "PageSize" ;
awt::Size aSize;
aSize.Width = aPageSize.Width();
aSize.Height = aPageSize.Height();
@@ -165,7 +165,7 @@ void SAL_CALL Renderable::render (
sal_Int64 nContent = getIntValue( "PrintContent", -1 );
if( nContent == 1 )
{
rtl::OUString aPageRange( getStringValue( "PageRange" ) );
OUString aPageRange( getStringValue( "PageRange" ) );
if( !aPageRange.isEmpty() )
{
sal_Int32 nPageCount = mpWindow->countPages( pPrinter );
+28 -28
View File
@@ -90,7 +90,7 @@ TYPEINIT1( ModulWindow , BaseWindow );
namespace
{
void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const ::rtl::OUString& rTitle, bool bOutput )
void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage, const OUString& rTitle, bool bOutput )
{
Size const aSz = pPrinter->GetOutputSize();
@@ -133,8 +133,8 @@ void lcl_PrintHeader( Printer* pPrinter, sal_uInt16 nPages, sal_uInt16 nCurPage,
if( bOutput )
{
::rtl::OUStringBuffer aPageStr;
aPageStr.appendAscii( RTL_CONSTASCII_STRINGPARAM( " [" ) );
OUStringBuffer aPageStr;
aPageStr.appendAscii( " [" );
aPageStr.append(IDE_RESSTR(RID_STR_PAGE));
aPageStr.append(' ');
aPageStr.append( nCurPage );
@@ -190,7 +190,7 @@ bool bSourceLinesEnabled = false;
ModulWindow::ModulWindow (
ModulWindowLayout* pParent,
ScriptDocument const& rDocument,
rtl::OUString aLibName, rtl::OUString aName, rtl::OUString& aModule
OUString aLibName, OUString aName, OUString& aModule
) :
BaseWindow(pParent, rDocument, aLibName, aName),
rLayout(*pParent),
@@ -358,7 +358,7 @@ bool ModulWindow::BasicExecute()
if ( !pMethod )
{
// If not in a method then prompt the user
return ( !ChooseMacro( uno::Reference< frame::XModel >(), false, rtl::OUString() ).isEmpty() );
return ( !ChooseMacro( uno::Reference< frame::XModel >(), false, OUString() ).isEmpty() );
}
if ( pMethod )
{
@@ -442,20 +442,20 @@ bool ModulWindow::LoadBasic()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
xFltMgr->appendFilter( "BASIC" , "*.bas" );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFltMgr->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
SfxMedium aMedium( aCurPath, STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE );
SvStream* pStream = aMedium.GetInStream();
@@ -496,7 +496,7 @@ bool ModulWindow::SaveBasicSource()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
@@ -509,13 +509,13 @@ bool ModulWindow::SaveBasicSource()
xFP->setDisplayDirectory ( aCurPath );
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.bas" ) ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
xFltMgr->setCurrentFilter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BASIC" ) ) );
xFltMgr->appendFilter( "BASIC", "*.bas" );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), OUString( FilterMask_All ) );
xFltMgr->setCurrentFilter( "BASIC" );
if( xFP->execute() == RET_OK )
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
SfxMedium aMedium( aCurPath, STREAM_WRITE | STREAM_SHARE_DENYWRITE | STREAM_TRUNC );
SvStream* pStream = aMedium.GetOutStream();
@@ -539,12 +539,12 @@ bool ModulWindow::SaveBasicSource()
return bDone;
}
extern bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName ); // defined in baside3.cxx
extern bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName ); // defined in baside3.cxx
bool ModulWindow::ImportDialog()
{
const ScriptDocument& rDocument = GetDocument();
::rtl::OUString aLibName = GetLibName();
OUString aLibName = GetLibName();
return implImportDialog( this, aCurPath, rDocument, aLibName );
}
@@ -671,7 +671,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
// ReturnWert: BOOL
// FALSE: cancel
// TRUE: go on....
::rtl::OUString aErrorText( pBasic->GetErrorText() );
OUString aErrorText( pBasic->GetErrorText() );
sal_uInt16 nErrorLine = pBasic->GetLine() - 1;
sal_uInt16 nErrCol1 = pBasic->GetCol1();
sal_uInt16 nErrCol2 = pBasic->GetCol2();
@@ -681,7 +681,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
AssertValidEditEngine();
GetEditView()->SetSelection( TextSelection( TextPaM( nErrorLine, nErrCol1 ), TextPaM( nErrorLine, nErrCol2 ) ) );
::rtl::OUStringBuffer aErrorTextPrefixBuf;
OUStringBuffer aErrorTextPrefixBuf;
if( pBasic->IsCompilerError() )
aErrorTextPrefixBuf.append(IDE_RESSTR(RID_STR_COMPILEERROR));
else
@@ -691,7 +691,7 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
aErrorTextPrefixBuf.append(' ');
rLayout.UpdateDebug(false);
}
::rtl::OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear());
OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear());
// if other basic, the IDE should try to display the correct module
bool const bMarkError = pBasic == GetBasic();
if ( bMarkError )
@@ -766,7 +766,7 @@ void ModulWindow::BasicAddWatch()
if ( !GetEditView()->HasSelection() )
{
TextPaM aWordStart;
::rtl::OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart );
OUString aWord = GetEditEngine()->GetWord( GetEditView()->GetSelection().GetEnd(), &aWordStart );
if ( !aWord.isEmpty() )
{
TextSelection aSel( aWordStart );
@@ -918,7 +918,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
// nLinepPage is not correct if there's a line break
sal_uInt16 nLinespPage = (sal_uInt16) (aPaperSz.Height()/nLineHeight);
sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth(rtl::OUString('X')) );
sal_uInt16 nCharspLine = (sal_uInt16) (aPaperSz.Width() / pPrinter->GetTextWidth( 'X' ) );
sal_uLong nParas = GetEditEngine()->GetParagraphCount();
sal_uInt16 nPages = (sal_uInt16) (nParas/nLinespPage+1 );
@@ -1161,7 +1161,7 @@ void ModulWindow::GetState( SfxItemSet &rSet )
String aPos( IDEResId( RID_STR_LINE ) );
aPos += ' ';
aPos += String::CreateFromInt32( aSel.GetEnd().GetPara()+1 );
aPos += String( RTL_CONSTASCII_USTRINGPARAM( ", " ) );
aPos += String( ", " );
aPos += String( IDEResId( RID_STR_COLUMN ) );
aPos += ' ';
aPos += String::CreateFromInt32( aSel.GetEnd().GetIndex()+1 );
@@ -1217,15 +1217,15 @@ void ModulWindow::GoOnTop()
GetShell()->GetViewFrame()->ToTop();
}
::rtl::OUString ModulWindow::GetSbModuleName()
OUString ModulWindow::GetSbModuleName()
{
::rtl::OUString aModuleName;
OUString aModuleName;
if ( XModule().Is() )
aModuleName = xModule->GetName();
return aModuleName;
}
::rtl::OUString ModulWindow::GetTitle()
OUString ModulWindow::GetTitle()
{
return GetSbModuleName();
}
@@ -1381,7 +1381,7 @@ EntryDescriptor ModulWindow::CreateEntryDescriptor()
uno::Reference< container::XNameContainer > xLib = aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
if( xLib.is() )
{
::rtl::OUString sObjName;
OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() )
{
@@ -1461,7 +1461,7 @@ bool ModulWindow::HasActiveEditor () const
void ModulWindow::UpdateModule ()
{
rtl::OUString const aModule = getTextEngineText(*GetEditEngine());
OUString const aModule = getTextEngineText(*GetEditEngine());
// update module in basic
assert(xModule);
+10 -10
View File
@@ -64,8 +64,8 @@ DBG_NAMEEX( ModulWindow )
// using the stream interface (get/setText() only supports
// tools Strings limited to 64K).
// defined in baside2b.cxx
rtl::OUString getTextEngineText (ExtTextEngine&);
void setTextEngineText (ExtTextEngine&, rtl::OUString const&);
OUString getTextEngineText (ExtTextEngine&);
void setTextEngineText (ExtTextEngine&, OUString const&);
class EditorWindow : public Window, public SfxListener
@@ -192,7 +192,7 @@ class WatchTreeListBox : public SvHeaderTabListBox
protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText );
virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewText );
bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult );
SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
@@ -294,8 +294,8 @@ private:
ComplexEditorWindow aXEditorWindow;
BasicStatus aStatus;
SbModuleRef xModule;
::rtl::OUString aCurPath;
::rtl::OUString m_aModule;
OUString aCurPath;
OUString m_aModule;
void CheckCompileBasic();
bool BasicExecute();
@@ -314,7 +314,7 @@ protected:
public:
TYPEINFO();
ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName, ::rtl::OUString& aModule );
ModulWindow( ModulWindowLayout* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName, OUString& aModule );
~ModulWindow();
@@ -328,7 +328,7 @@ public:
virtual sal_Int32 countPages( Printer* pPrinter );
// print page
virtual void printPage( sal_Int32 nPage, Printer* pPrinter );
virtual ::rtl::OUString GetTitle();
virtual OUString GetTitle();
virtual EntryDescriptor CreateEntryDescriptor();
virtual bool AllowUndo();
virtual void SetReadOnly (bool bReadOnly);
@@ -338,7 +338,7 @@ public:
SbModule* GetSbModule() { return xModule; }
void SetSbModule( SbModule* pModule ) { xModule = pModule; }
::rtl::OUString GetSbModuleName();
OUString GetSbModuleName();
bool CompileBasic();
bool BasicRun();
@@ -391,8 +391,8 @@ public:
virtual ::svl::IUndoManager*
GetUndoManager();
const ::rtl::OUString& GetModule() const { return m_aModule; }
void SetModule( const ::rtl::OUString& aModule ) { m_aModule = aModule; }
const OUString& GetModule() const { return m_aModule; }
void SetModule( const OUString& aModule ) { m_aModule = aModule; }
virtual void Activating ();
virtual void Deactivating ();
+45 -45
View File
@@ -77,7 +77,7 @@ TYPEINIT1( DialogWindow, BaseWindow );
DialogWindow::DialogWindow (
DialogWindowLayout* pParent,
ScriptDocument const& rDocument,
rtl::OUString aLibName, rtl::OUString aName,
OUString aLibName, OUString aName,
com::sun::star::uno::Reference<com::sun::star::container::XNameContainer> const& xDialogModel
) :
BaseWindow(pParent, rDocument, aLibName, aName),
@@ -256,7 +256,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
if ( xModel.is() )
{
Reference< lang::XServiceInfo > xServiceInfo ( xModel, UNO_QUERY );
if ( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument") ) ) )
if ( xServiceInfo.is() && xServiceInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
bIsCalc = true;
}
}
@@ -662,7 +662,7 @@ Reference< container::XNameContainer > DialogWindow::GetDialog() const
return pEditor->GetDialog();
}
bool DialogWindow::RenameDialog( const ::rtl::OUString& rNewName )
bool DialogWindow::RenameDialog( const OUString& rNewName )
{
if ( !basctl::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) )
return false;
@@ -683,7 +683,7 @@ void DialogWindow::UpdateBrowser()
rLayout.UpdatePropertyBrowser();
}
static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
static OUString aResourceResolverPropName( "ResourceResolver" );
bool DialogWindow::SaveDialog()
{
@@ -697,7 +697,7 @@ bool DialogWindow::SaveDialog()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_AUTOEXTENSION_PASSWORD;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
@@ -709,17 +709,17 @@ bool DialogWindow::SaveDialog()
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
xFP->setDefaultName( ::rtl::OUString( GetName() ) );
xFP->setDefaultName( OUString( GetName() ) );
::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
xFltMgr->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
// export dialog model to xml
@@ -782,29 +782,29 @@ bool DialogWindow::SaveDialog()
{
INetURLObject aURLObj( aCurPath );
aURLObj.removeExtension();
::rtl::OUString aDialogName( aURLObj.getName() );
OUString aDialogName( aURLObj.getName() );
aURLObj.removeSegment();
::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
bool bReadOnly = false;
::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " ));
OUString aComment( "# " );
aComment += aDialogName;
aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" ));
aComment += " strings" ;
Reference< task::XInteractionHandler > xDummyHandler;
// Remove old properties files in case of overwriting Dialog files
if( xSFI->isFolder( aURL ) )
{
Sequence< ::rtl::OUString > aContentSeq = xSFI->getFolderContents( aURL, false );
Sequence< OUString > aContentSeq = xSFI->getFolderContents( aURL, false );
::rtl::OUString aDialogName_( aDialogName );
aDialogName_ += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_" ));
OUString aDialogName_( aDialogName );
aDialogName_ += "_" ;
sal_Int32 nCount = aContentSeq.getLength();
const ::rtl::OUString* pFiles = aContentSeq.getConstArray();
const OUString* pFiles = aContentSeq.getConstArray();
for( int i = 0 ; i < nCount ; i++ )
{
::rtl::OUString aCompleteName = pFiles[i];
rtl::OUString aPureName;
rtl::OUString aExtension;
OUString aCompleteName = pFiles[i];
OUString aPureName;
OUString aExtension;
sal_Int32 iDot = aCompleteName.lastIndexOf( '.' );
sal_Int32 iSlash = aCompleteName.lastIndexOf( '/' );
if( iDot != -1 )
@@ -946,7 +946,7 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent,
}
bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const ScriptDocument& rDocument, const ::rtl::OUString& aLibName )
bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocument& rDocument, const OUString& aLibName )
{
bool bDone = false;
@@ -957,7 +957,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
@@ -966,23 +966,23 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
aValue <<= sal_True;
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
::rtl::OUString aCurPath( rCurPath );
OUString aCurPath( rCurPath );
if ( !aCurPath.isEmpty() )
xFP->setDisplayDirectory ( aCurPath );
::rtl::OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
OUString aDialogStr(IDE_RESSTR(RID_STR_STDDIALOGNAME));
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aDialogStr, String( RTL_CONSTASCII_USTRINGPARAM( "*.xdl" ) ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( RTL_CONSTASCII_USTRINGPARAM( FilterMask_All ) ) );
xFltMgr->appendFilter( aDialogStr, String( "*.xdl" ) );
xFltMgr->appendFilter( IDE_RESSTR(RID_STR_FILTER_ALLFILES), String( FilterMask_All ) );
xFltMgr->setCurrentFilter( aDialogStr );
if( xFP->execute() == RET_OK )
{
Sequence< ::rtl::OUString > aPaths = xFP->getFiles();
Sequence< OUString > aPaths = xFP->getFiles();
aCurPath = aPaths[0];
::rtl::OUString aBasePath;
::rtl::OUString aOUCurPath( aCurPath );
OUString aBasePath;
OUString aOUCurPath( aCurPath );
sal_Int32 iSlash = aOUCurPath.lastIndexOf( '/' );
if( iSlash != -1 )
aBasePath = aOUCurPath.copy( 0, iSlash + 1 );
@@ -991,7 +991,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
{
// create dialog model
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY_THROW );
( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY_THROW );
Reference< XSimpleFileAccess2 > xSFI( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
@@ -1003,14 +1003,14 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
comphelper::getComponentContext( xMSF ) );
::xmlscript::importDialogModel( xInput, xDialogModel, xContext, rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() );
::rtl::OUString aXmlDlgName;
OUString aXmlDlgName;
Reference< beans::XPropertySet > xDialogModelPropSet( xDialogModel, UNO_QUERY );
if( xDialogModelPropSet.is() )
{
try
{
Any aXmlDialogNameAny = xDialogModelPropSet->getPropertyValue( DLGED_PROP_NAME );
::rtl::OUString aOUXmlDialogName;
OUString aOUXmlDialogName;
aXmlDialogNameAny >>= aOUXmlDialogName;
aXmlDlgName = aOUXmlDialogName;
}
@@ -1024,7 +1024,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
bool bDialogAlreadyExists = rDocument.hasDialog( aLibName, aXmlDlgName );
::rtl::OUString aNewDlgName = aXmlDlgName;
OUString aNewDlgName = aXmlDlgName;
enum NameClashMode
{
NO_CLASH,
@@ -1034,8 +1034,8 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
NameClashMode eNameClashMode = NO_CLASH;
if( bDialogAlreadyExists )
{
::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE));
::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TITLE));
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_CLASH_TEXT));
aQueryBoxText = aQueryBoxText.replaceAll("$(ARG1)", aXmlDlgName);
NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
@@ -1071,7 +1071,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
bool bReadOnly = true;
Reference< XStringResourceWithLocation > xImportStringResource =
StringResourceWithLocation::create( xContext, aBasePath, bReadOnly,
aLocale, aXmlDlgName, ::rtl::OUString(), xDummyHandler );
aLocale, aXmlDlgName, OUString(), xDummyHandler );
Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength();
@@ -1098,8 +1098,8 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
bool bAddDialogLanguagesToLib = false;
if( nOnlyInImportLanguageCount > 0 )
{
::rtl::OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
::rtl::OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
OUString aQueryBoxTitle(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TITLE));
OUString aQueryBoxText(IDE_RESSTR(RID_STR_DLGIMP_MISMATCH_TEXT));
LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText );
sal_uInt16 nRet = aQueryBox.Execute();
if( RET_YES == nRet )
@@ -1207,7 +1207,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
try
{
Any aXmlDialogNameAny;
aXmlDialogNameAny <<= ::rtl::OUString( aNewDlgName );
aXmlDialogNameAny <<= OUString( aNewDlgName );
xDialogModelPropSet->setPropertyValue( DLGED_PROP_NAME, aXmlDialogNameAny );
bRenamed = true;
}
@@ -1250,7 +1250,7 @@ bool DialogWindow::ImportDialog()
DBG_CHKTHIS( DialogWindow, 0 );
const ScriptDocument& rDocument = GetDocument();
::rtl::OUString aLibName = GetLibName();
OUString aLibName = GetLibName();
return implImportDialog( this, aCurPath, rDocument, aLibName );
}
@@ -1279,7 +1279,7 @@ bool DialogWindow::IsModified()
return pUndoMgr.get();
}
::rtl::OUString DialogWindow::GetTitle()
OUString DialogWindow::GetTitle()
{
return GetName();
}
@@ -1287,8 +1287,8 @@ bool DialogWindow::IsModified()
EntryDescriptor DialogWindow::CreateEntryDescriptor()
{
ScriptDocument aDocument( GetDocument() );
::rtl::OUString aLibName( GetLibName() );
::rtl::OUString aLibSubName;
OUString aLibName( GetLibName() );
OUString aLibSubName;
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG );
}
@@ -1325,7 +1325,7 @@ void DialogWindow::StoreData()
Reference< XComponentContext > xContext(
comphelper::getProcessComponentContext() );
Reference< XInputStreamProvider > xISP = ::xmlscript::exportDialogModel( xDialogModel, xContext, GetDocument().isDocument() ? GetDocument().getDocument() : Reference< frame::XModel >() );
xLib->replaceByName( ::rtl::OUString( GetName() ), makeAny( xISP ) );
xLib->replaceByName( OUString( GetName() ), makeAny( xISP ) );
}
}
}
+1 -1
View File
@@ -38,7 +38,7 @@ namespace
{
int const nPropertyIconId = 1;
rtl::OUString const sPropertyIconId("IconId");
OUString const sPropertyIconId("IconId");
}
+37 -37
View File
@@ -114,8 +114,8 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
else
nFound = pCurWin->StartSearchAndReplace(rSearchItem);
rtl::OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES));
aReplStr = aReplStr.replaceAll("XX", rtl::OUString::valueOf(nFound));
OUString aReplStr(IDE_RESSTR(RID_STR_SEARCHREPLACES));
aReplStr = aReplStr.replaceAll("XX", OUString::valueOf(nFound));
InfoBox( pCurWin, aReplStr ).Execute();
}
else
@@ -272,7 +272,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
break;
case SID_BASICIDE_CHOOSEMACRO:
{
ChooseMacro( NULL, false, ::rtl::OUString() );
ChooseMacro( NULL, false, OUString() );
}
break;
case SID_BASICIDE_CREATEMACRO:
@@ -286,9 +286,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
StartListening( *pBasMgr, true /* log on only once */ );
::rtl::OUString aLibName( rInfo.GetLib() );
OUString aLibName( rInfo.GetLib() );
if ( aLibName.isEmpty() )
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
aLibName = "Standard" ;
StarBASIC* pBasic = pBasMgr->GetLib( aLibName );
if ( !pBasic )
{
@@ -310,9 +310,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
{
if ( rInfo.GetModule().Len() || !pBasic->GetModules()->Count() )
{
::rtl::OUString aModName = rInfo.GetModule();
OUString aModName = rInfo.GetModule();
::rtl::OUString sModuleCode;
OUString sModuleCode;
if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) )
pModule = pBasic->FindModule( aModName );
}
@@ -351,14 +351,14 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
if ( aWindowTable.find( rTabId.GetValue() ) != aWindowTable.end() )
{
BaseWindow* pWin = aWindowTable[ rTabId.GetValue() ];
::rtl::OUString aNewName( rModName.GetValue() );
::rtl::OUString aOldName( pWin->GetName() );
OUString aNewName( rModName.GetValue() );
OUString aOldName( pWin->GetName() );
if ( aNewName != aOldName )
{
bool bRenameOk = false;
if (ModulWindow* pModWin = dynamic_cast<ModulWindow*>(pWin))
{
rtl::OUString aLibName = pModWin->GetLibName();
OUString aLibName = pModWin->GetLibName();
ScriptDocument aDocument( pWin->GetDocument() );
if (RenameModule(pModWin, aDocument, aLibName, aOldName, aNewName))
@@ -437,7 +437,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
uno::Reference< frame::XModel > xModel( rShellItem.GetValue(), UNO_QUERY );
ScriptDocument aDocument( xModel.is() ? ScriptDocument( xModel ) : ScriptDocument::getApplicationScriptDocument() );
const SfxStringItem& rLibNameItem = (const SfxStringItem&)rReq.GetArgs()->Get( SID_BASICIDE_ARG_LIBNAME );
::rtl::OUString aLibName( rLibNameItem.GetValue() );
OUString aLibName( rLibNameItem.GetValue() );
if ( nSlot == SID_BASICIDE_LIBSELECTED )
{
@@ -453,7 +453,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
::rtl::OUString aPassword;
OUString aPassword;
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
}
}
@@ -512,8 +512,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
ScriptDocument aDocument( rSbxItem.GetDocument() );
::rtl::OUString aLibName( rSbxItem.GetLibName() );
::rtl::OUString aName( rSbxItem.GetName() );
OUString aLibName( rSbxItem.GetLibName() );
OUString aName( rSbxItem.GetName() );
if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
{
if ( rSbxItem.GetType() == TYPE_MODULE )
@@ -538,8 +538,8 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
const SbxItem& rSbxItem = (const SbxItem&)rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX );
ScriptDocument aDocument( rSbxItem.GetDocument() );
::rtl::OUString aLibName( rSbxItem.GetLibName() );
::rtl::OUString aName( rSbxItem.GetName() );
OUString aLibName( rSbxItem.GetLibName() );
OUString aName( rSbxItem.GetName() );
SetCurLib( aDocument, aLibName );
BaseWindow* pWin = 0;
if ( rSbxItem.GetType() == TYPE_DIALOG )
@@ -567,7 +567,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
SFX_REQUEST_ARG( rReq, pDocumentItem, SfxStringItem, SID_BASICIDE_ARG_DOCUMENT, false );
if ( pDocumentItem )
{
::rtl::OUString sDocumentCaption = pDocumentItem->GetValue();
OUString sDocumentCaption = pDocumentItem->GetValue();
if ( !sDocumentCaption.isEmpty() )
pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) );
}
@@ -587,16 +587,16 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
if ( !pLibNameItem )
break;
::rtl::OUString aLibName( pLibNameItem->GetValue() );
OUString aLibName( pLibNameItem->GetValue() );
pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName );
SetCurLib( *pDocument, aLibName );
SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_BASICIDE_ARG_NAME, false );
if ( pNameItem )
{
::rtl::OUString aName( pNameItem->GetValue() );
::rtl::OUString aModType(RTL_CONSTASCII_USTRINGPARAM("Module"));
::rtl::OUString aDlgType(RTL_CONSTASCII_USTRINGPARAM("Dialog"));
::rtl::OUString aType( aModType );
OUString aName( pNameItem->GetValue() );
OUString aModType( "Module" );
OUString aDlgType( "Dialog" );
OUString aType( aModType );
SFX_REQUEST_ARG( rReq, pTypeItem, SfxStringItem, SID_BASICIDE_ARG_TYPE, false );
if ( pTypeItem )
aType = pTypeItem->GetValue();
@@ -839,7 +839,7 @@ void Shell::GetState(SfxItemSet &rSet)
break;
case SID_BASICIDE_LIBSELECTOR:
{
::rtl::OUString aName;
OUString aName;
if ( !m_aCurLibName.isEmpty() )
{
LibraryLocation eLocation = m_aCurDocument.getLibraryLocation( m_aCurLibName );
@@ -851,7 +851,7 @@ void Shell::GetState(SfxItemSet &rSet)
break;
case SID_SEARCH_ITEM:
{
::rtl::OUString aSelected = GetSelectionText(true);
OUString aSelected = GetSelectionText(true);
SvxSearchItem& rItem = GetExtraData()->GetSearchItem();
rItem.SetSearchString( aSelected );
rSet.Put( rItem );
@@ -859,7 +859,7 @@ void Shell::GetState(SfxItemSet &rSet)
break;
case SID_BASICIDE_STAT_DATE:
{
::rtl::OUString aDate(RTL_CONSTASCII_USTRINGPARAM("Datum?!"));
OUString aDate( "Datum?!" );
SfxStringItem aItem( SID_BASICIDE_STAT_DATE, aDate );
rSet.Put( aItem );
}
@@ -887,7 +887,7 @@ void Shell::GetState(SfxItemSet &rSet)
{
if ( pCurWin )
{
::rtl::OUString aTitle = pCurWin->CreateQualifiedName();
OUString aTitle = pCurWin->CreateQualifiedName();
SfxStringItem aItem( SID_BASICIDE_STAT_TITLE, aTitle );
rSet.Put( aItem );
}
@@ -910,7 +910,7 @@ void Shell::GetState(SfxItemSet &rSet)
rSet.DisableItem( nWh );
else
{
::rtl::OUString aItemStr;
OUString aItemStr;
boost::shared_ptr<LocalizationMgr> pCurMgr(GetCurLocalizationMgr());
if ( pCurMgr->isLibraryLocalized() )
{
@@ -919,7 +919,7 @@ void Shell::GetState(SfxItemSet &rSet)
sal_Int32 i, nCount = aLocaleSeq.getLength();
// Force different results for any combination of locales and default locale
::rtl::OUString aLangStr;
OUString aLangStr;
for ( i = 0; i <= nCount; ++i )
{
lang::Locale aLocale;
@@ -1051,11 +1051,11 @@ void Shell::SetCurWindow( BaseWindow* pNewWin, bool bUpdateTabBar, bool bRemembe
void Shell::ManageToolbars()
{
static ::rtl::OUString aLayoutManagerName( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ));
static ::rtl::OUString aMacroBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/macrobar" ));
static ::rtl::OUString aDialogBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/dialogbar" ));
static ::rtl::OUString aInsertControlsBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/insertcontrolsbar" ));
static ::rtl::OUString aFormControlsBarResName( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/formcontrolsbar" ));
static OUString aLayoutManagerName( "LayoutManager" );
static OUString aMacroBarResName( "private:resource/toolbar/macrobar" );
static OUString aDialogBarResName( "private:resource/toolbar/dialogbar" );
static OUString aInsertControlsBarResName( "private:resource/toolbar/insertcontrolsbar" );
static OUString aFormControlsBarResName( "private:resource/toolbar/formcontrolsbar" );
(void)aInsertControlsBarResName;
if( !pCurWin )
@@ -1099,7 +1099,7 @@ BaseWindow* Shell::FindApplicationWindow()
BaseWindow* Shell::FindWindow(
ScriptDocument const& rDocument,
rtl::OUString const& rLibName, rtl::OUString const& rName,
OUString const& rLibName, OUString const& rName,
ItemType eType, bool bFindSuspended
)
{
@@ -1153,7 +1153,7 @@ long Shell::CallBasicBreakHdl( StarBASIC* pBasic )
ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic )
{
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false );
SbModule* pActiveModule = StarBASIC::GetActiveModule();
if (SbClassModuleObject* pCMO = dynamic_cast<SbClassModuleObject*>(pActiveModule))
@@ -1169,7 +1169,7 @@ ModulWindow* Shell::ShowActiveModuleWindow( StarBASIC* pBasic )
if (BasicManager* pBasMgr = FindBasicManager(pLib))
{
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
::rtl::OUString aLibName = pLib->GetName();
OUString aLibName = pLib->GetName();
pWin = FindBasWin( aDocument, aLibName, pActiveModule->GetName(), true );
DBG_ASSERT( pWin, "Error/Step-Hdl: Fenster wurde nicht erzeugt/gefunden!" );
SetCurLib( aDocument, aLibName );
@@ -1260,7 +1260,7 @@ void Shell::Deactivate( sal_Bool bMDI )
if ( /* !pWin->IsSuspended() && */ !pWin->CanClose() )
{
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false );
SetCurWindow( pWin, true );
break;
}
+9 -9
View File
@@ -126,7 +126,7 @@ void Shell::SetMDITitle()
aTitleBuf.append(IDE_RESSTR(RID_STR_SIGNED));
aTitleBuf.append(' ');
}
::rtl::OUString aTitle(aTitleBuf.makeStringAndClear());
OUString aTitle(aTitleBuf.makeStringAndClear());
SfxViewFrame* pViewFrame = GetViewFrame();
if ( pViewFrame )
@@ -145,18 +145,18 @@ void Shell::SetMDITitle()
}
}
ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
{
bCreatingWindow = true;
sal_uLong nKey = 0;
ModulWindow* pWin = 0;
::rtl::OUString aLibName( rLibName );
::rtl::OUString aModName( rModName );
OUString aLibName( rLibName );
OUString aModName( rModName );
if ( aLibName.isEmpty() )
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
aLibName = "Standard" ;
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
@@ -168,7 +168,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
if ( !pWin )
{
::rtl::OUString aModule;
OUString aModule;
bool bSuccess = false;
if ( rDocument.hasModule( aLibName, aModName ) )
bSuccess = rDocument.getModule( aLibName, aModName, aModule );
@@ -200,11 +200,11 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
{
// display a nice friendly name in the ObjectModule tab,
// combining the objectname and module name, e.g. Sheet1 ( Financials )
::rtl::OUString sObjName;
OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, rModName, sObjName );
if( !sObjName.isEmpty() )
{
::rtl::OUStringBuffer aModNameBuf(aModName);
OUStringBuffer aModNameBuf(aModName);
aModNameBuf.append(' ');
aModNameBuf.append('(');
aModNameBuf.append(sObjName);
@@ -224,7 +224,7 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const ::rtl::
ModulWindow* Shell::FindBasWin (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName, rtl::OUString const& rName,
OUString const& rLibName, OUString const& rName,
bool bCreateIfNotExist, bool bFindSuspended
)
{
+6 -6
View File
@@ -44,17 +44,17 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::io;
DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
{
bCreatingWindow = true;
sal_uLong nKey = 0;
DialogWindow* pWin = 0;
::rtl::OUString aLibName( rLibName );
::rtl::OUString aDlgName( rDlgName );
OUString aLibName( rLibName );
OUString aDlgName( rDlgName );
if ( aLibName.isEmpty() )
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
aLibName = "Standard" ;
rDocument.getOrCreateLibrary( E_DIALOGS, aLibName );
@@ -79,7 +79,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
// create dialog model
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
Reference< container::XNameContainer > xDialogModel( xMSF->createInstance
( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.awt.UnoControlDialogModel" ) ) ), UNO_QUERY );
( "com.sun.star.awt.UnoControlDialogModel" ), UNO_QUERY );
Reference< XInputStream > xInput( xISP->createInputStream() );
Reference< XComponentContext > xContext(
comphelper::getComponentContext( xMSF ) );
@@ -120,7 +120,7 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const ::rtl:
DialogWindow* Shell::FindDlgWin (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName, rtl::OUString const& rName,
OUString const& rLibName, OUString const& rName,
bool bCreateIfNotExist, bool bFindSuspended
)
{
+20 -21
View File
@@ -65,7 +65,6 @@ namespace basctl
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using ::rtl::OUString;
typedef ::cppu::WeakImplHelper1< container::XContainerListener > ContainerListenerBASE;
@@ -79,7 +78,7 @@ public:
~ContainerListenerImpl()
{ }
void addContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName )
void addContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName )
{
try
{
@@ -92,7 +91,7 @@ public:
}
catch(const uno::Exception& ) {}
}
void removeContainerListener( const ScriptDocument& rScriptDocument, const ::rtl::OUString& aLibName )
void removeContainerListener( const ScriptDocument& rScriptDocument, const OUString& aLibName )
{
try
{
@@ -112,14 +111,14 @@ public:
// XContainerListener
virtual void SAL_CALL elementInserted( const container::ContainerEvent& Event ) throw( uno::RuntimeException )
{
rtl::OUString sModuleName;
OUString sModuleName;
if( mpShell && ( Event.Accessor >>= sModuleName ) )
mpShell->FindBasWin( mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, true, false );
}
virtual void SAL_CALL elementReplaced( const container::ContainerEvent& ) throw( com::sun::star::uno::RuntimeException ) { }
virtual void SAL_CALL elementRemoved( const container::ContainerEvent& Event ) throw( com::sun::star::uno::RuntimeException )
{
rtl::OUString sModuleName;
OUString sModuleName;
if( mpShell && ( Event.Accessor >>= sModuleName ) )
{
ModulWindow* pWin = mpShell->FindBasWin(mpShell->m_aCurDocument, mpShell->m_aCurLibName, sModuleName, false, true);
@@ -186,7 +185,7 @@ void Shell::Init()
GetExtraData()->ShellInCriticalSection() = true;
SetName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicIDE" ) ) );
SetName( OUString( "BasicIDE" ) );
SetHelpId( SVX_INTERFACE_BASIDE_VIEWSH );
LibBoxControl::RegisterControl( SID_BASICIDE_LIBSELECTOR );
@@ -208,7 +207,7 @@ void Shell::Init()
InitScrollBars();
InitTabBar();
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), false, false );
SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", false, false );
ShellCreated(this);
@@ -330,7 +329,7 @@ void Shell::onDocumentClosed( const ScriptDocument& _rDocument )
pData->GetLibInfos().RemoveInfoFor( _rDocument );
if ( bSetCurLib )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")), true, false );
SetCurLib( ScriptDocument::getApplicationScriptDocument(), "Standard", true, false );
else if ( bSetCurWindow )
SetCurWindow( FindApplicationWindow(), true );
}
@@ -401,7 +400,7 @@ sal_uInt16 Shell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
if ( !pWin->CanClose() )
{
if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
SetCurLib( ScriptDocument::getApplicationScriptDocument(), OUString(), false );
SetCurWindow( pWin, true );
bCanClose = false;
}
@@ -626,7 +625,7 @@ void Shell::CheckWindows()
void Shell::RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, bool bDestroy )
void Shell::RemoveWindows( const ScriptDocument& rDocument, const OUString& rLibName, bool bDestroy )
{
bool bChangeCurWindow = pCurWin ? false : true;
std::vector<BaseWindow*> aDeleteVec;
@@ -693,13 +692,13 @@ void Shell::UpdateWindows()
StartListening( *doc->getBasicManager(), true /* log on only once */ );
// libraries
Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
Sequence< OUString > aLibNames( doc->getLibraryNames() );
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
::rtl::OUString aLibName = pLibNames[ i ];
OUString aLibName = pLibNames[ i ];
if ( m_aCurLibName.isEmpty() || ( *doc == m_aCurDocument && aLibName == m_aCurLibName ) )
{
@@ -730,13 +729,13 @@ void Shell::UpdateWindows()
try
{
Sequence< ::rtl::OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) );
Sequence< OUString > aModNames( doc->getObjectNames( E_SCRIPTS, aLibName ) );
sal_Int32 nModCount = aModNames.getLength();
const ::rtl::OUString* pModNames = aModNames.getConstArray();
const OUString* pModNames = aModNames.getConstArray();
for ( sal_Int32 j = 0 ; j < nModCount ; j++ )
{
::rtl::OUString aModName = pModNames[ j ];
OUString aModName = pModNames[ j ];
ModulWindow* pWin = FindBasWin( *doc, aLibName, aModName, false );
if ( !pWin )
pWin = CreateBasWin( *doc, aLibName, aModName );
@@ -759,13 +758,13 @@ void Shell::UpdateWindows()
{
try
{
Sequence< ::rtl::OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName );
Sequence< OUString > aDlgNames = doc->getObjectNames( E_DIALOGS, aLibName );
sal_Int32 nDlgCount = aDlgNames.getLength();
const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
const OUString* pDlgNames = aDlgNames.getConstArray();
for ( sal_Int32 j = 0 ; j < nDlgCount ; j++ )
{
::rtl::OUString aDlgName = pDlgNames[ j ];
OUString aDlgName = pDlgNames[ j ];
// this find only looks for non-suspended windows;
// suspended windows are handled in CreateDlgWin
DialogWindow* pWin = FindDlgWin( *doc, aLibName, aDlgName, false );
@@ -907,7 +906,7 @@ void Shell::EnableScrollbars( bool bEnable )
aVScrollBar.Enable(bEnable);
}
void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName, bool bUpdateWindows, bool bCheck )
void Shell::SetCurLib( const ScriptDocument& rDocument, OUString aLibName, bool bUpdateWindows, bool bCheck )
{
if ( !bCheck || ( rDocument != m_aCurDocument || aLibName != m_aCurLibName ) )
{
@@ -938,7 +937,7 @@ void Shell::SetCurLib( const ScriptDocument& rDocument, ::rtl::OUString aLibName
}
}
void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, ::rtl::OUString aLibName )
void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, OUString aLibName )
{
// Create LocalizationMgr
Reference< resource::XStringResourceManager > xStringResourceManager;
+26 -26
View File
@@ -56,9 +56,9 @@ using namespace ::com::sun::star::container;
extern "C" {
SAL_DLLPUBLIC_EXPORT rtl_uString* basicide_choose_macro( void* pOnlyInDocument_AsXModel, sal_Bool bChooseOnly, rtl_uString* pMacroDesc )
{
::rtl::OUString aMacroDesc( pMacroDesc );
OUString aMacroDesc( pMacroDesc );
Reference< frame::XModel > aDocument( static_cast< frame::XModel* >( pOnlyInDocument_AsXModel ) );
::rtl::OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc );
OUString aScriptURL = basctl::ChooseMacro( aDocument, bChooseOnly, aMacroDesc );
rtl_uString* pScriptURL = aScriptURL.pData;
rtl_uString_acquire( pScriptURL );
@@ -112,15 +112,15 @@ static bool StringCompareLessThan( const String& rStr1, const String& rStr2 )
//----------------------------------------------------------------------------
Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer )
Sequence< OUString > GetMergedLibraryNames( const Reference< script::XLibraryContainer >& xModLibContainer, const Reference< script::XLibraryContainer >& xDlgLibContainer )
{
// create a sorted list of module library names
::std::vector<String> aModLibList;
if ( xModLibContainer.is() )
{
Sequence< ::rtl::OUString > aModLibNames = xModLibContainer->getElementNames();
Sequence< OUString > aModLibNames = xModLibContainer->getElementNames();
sal_Int32 nModLibCount = aModLibNames.getLength();
const ::rtl::OUString* pModLibNames = aModLibNames.getConstArray();
const OUString* pModLibNames = aModLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nModLibCount ; i++ )
aModLibList.push_back( pModLibNames[ i ] );
::std::sort( aModLibList.begin() , aModLibList.end() , StringCompareLessThan );
@@ -130,9 +130,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib
::std::vector<String> aDlgLibList;
if ( xDlgLibContainer.is() )
{
Sequence< ::rtl::OUString > aDlgLibNames = xDlgLibContainer->getElementNames();
Sequence< OUString > aDlgLibNames = xDlgLibContainer->getElementNames();
sal_Int32 nDlgLibCount = aDlgLibNames.getLength();
const ::rtl::OUString* pDlgLibNames = aDlgLibNames.getConstArray();
const OUString* pDlgLibNames = aDlgLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nDlgLibCount ; i++ )
aDlgLibList.push_back( pDlgLibNames[ i ] );
::std::sort( aDlgLibList.begin() , aDlgLibList.end() , StringCompareLessThan );
@@ -146,7 +146,7 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib
// copy to sequence
sal_Int32 nLibCount = aLibList.size();
Sequence< ::rtl::OUString > aSeqLibNames( nLibCount );
Sequence< OUString > aSeqLibNames( nLibCount );
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
aSeqLibNames.getArray()[ i ] = aLibList[ i ];
@@ -158,9 +158,9 @@ Sequence< ::rtl::OUString > GetMergedLibraryNames( const Reference< script::XLib
bool RenameModule (
Window* pErrorParent,
const ScriptDocument& rDocument,
const ::rtl::OUString& rLibName,
const ::rtl::OUString& rOldName,
const ::rtl::OUString& rNewName
const OUString& rLibName,
const OUString& rOldName,
const OUString& rNewName
)
{
if ( !rDocument.hasModule( rLibName, rOldName ) )
@@ -259,7 +259,7 @@ namespace
//----------------------------------------------------------------------------
::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const ::rtl::OUString& rMacroDesc )
OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const OUString& rMacroDesc )
{
(void)rMacroDesc;
@@ -324,15 +324,15 @@ namespace
aName += pMethod->GetName();
// language
rtl::OUString aLanguage("Basic");
OUString aLanguage("Basic");
// location
rtl::OUString aLocation;
OUString aLocation;
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
if ( aDocument.isDocument() )
{
// document basic
aLocation = rtl::OUString("document");
aLocation = "document" ;
if ( rxLimitToDocument.is() )
{
@@ -366,17 +366,17 @@ namespace
else
{
// application basic
aLocation = rtl::OUString("application");
aLocation = "application" ;
}
// script URL
if ( !bError )
{
aScriptURL = rtl::OUString("vnd.sun.star.script:");
aScriptURL = "vnd.sun.star.script:" ;
aScriptURL += aName;
aScriptURL += rtl::OUString("?language=");
aScriptURL += "?language=" ;
aScriptURL += aLanguage;
aScriptURL += rtl::OUString("&location=");
aScriptURL += "&location=" ;
aScriptURL += aLocation;
}
@@ -396,13 +396,13 @@ namespace
//----------------------------------------------------------------------------
Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )
Sequence< OUString > GetMethodNames( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rModName )
throw(NoSuchElementException )
{
Sequence< ::rtl::OUString > aSeqMethods;
Sequence< OUString > aSeqMethods;
// get module
::rtl::OUString aOUSource;
OUString aOUSource;
if ( rDocument.getModule( rLibName, rModName, aOUSource ) )
{
SbModuleRef xModule = new SbModule( rModName );
@@ -435,14 +435,14 @@ Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, con
bool HasMethod (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName,
rtl::OUString const& rModName,
rtl::OUString const& rMethName
OUString const& rLibName,
OUString const& rModName,
OUString const& rMethName
)
{
bool bHasMethod = false;
::rtl::OUString aOUSource;
OUString aOUSource;
if ( rDocument.hasModule( rLibName, rModName ) && rDocument.getModule( rLibName, rModName, aOUSource ) )
{
SbModuleRef xModule = new SbModule( rModName );
+19 -19
View File
@@ -83,20 +83,20 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
if ( pModule->GetMethods()->Find( rMacroName, SbxCLASS_METHOD ) )
return 0;
String aMacroName( rMacroName );
if ( aMacroName.Len() == 0 )
OUString aMacroName( rMacroName );
if ( aMacroName.getLength() == 0 )
{
if ( !pModule->GetMethods()->Count() )
aMacroName = String( RTL_CONSTASCII_USTRINGPARAM( "Main" ) );
aMacroName = "Main" ;
else
{
bool bValid = false;
String aStdMacroText( RTL_CONSTASCII_USTRINGPARAM( "Macro" ) );
sal_uInt16 nMacro = 1;
OUString aStdMacroText( "Macro" );
sal_Int32 nMacro = 1;
while ( !bValid )
{
aMacroName = aStdMacroText;
aMacroName += String::CreateFromInt32( nMacro );
aMacroName += OUString::valueOf( nMacro );
// test whether existing...
bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) ? false : true;
nMacro++;
@@ -104,7 +104,7 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
}
}
::rtl::OUString aOUSource( pModule->GetSource32() );
OUString aOUSource( pModule->GetSource32() );
// don't produce too many empty lines...
sal_Int32 nSourceLen = aOUSource.getLength();
@@ -112,17 +112,17 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
{
const sal_Unicode* pStr = aOUSource.getStr();
if ( pStr[ nSourceLen - 1 ] != LINE_SEP )
aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\n" ) );
aOUSource += "\n\n" ;
else if ( pStr[ nSourceLen - 2 ] != LINE_SEP )
aOUSource += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n" ) );
aOUSource += "\n" ;
else if ( pStr[ nSourceLen - 3 ] == LINE_SEP )
aOUSource = aOUSource.copy( 0, nSourceLen-1 );
}
::rtl::OUString aSubStr;
aSubStr = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Sub " ) );
OUString aSubStr;
aSubStr = "Sub " ;
aSubStr += aMacroName;
aSubStr += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "\n\nEnd Sub" ) );
aSubStr += "\n\nEnd Sub" ;
aOUSource += aSubStr;
@@ -165,9 +165,9 @@ SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
bool RenameDialog (
Window* pErrorParent,
ScriptDocument const& rDocument,
rtl::OUString const& rLibName,
rtl::OUString const& rOldName,
rtl::OUString const& rNewName
OUString const& rLibName,
OUString const& rOldName,
OUString const& rNewName
)
throw(ElementExistException, NoSuchElementException)
{
@@ -228,7 +228,7 @@ bool RenameDialog (
//----------------------------------------------------------------------------
bool RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rDlgName )
bool RemoveDialog( const ScriptDocument& rDocument, const OUString& rLibName, const OUString& rDlgName )
{
if (Shell* pShell = GetShell())
{
@@ -267,9 +267,9 @@ BasicManager* FindBasicManager( StarBASIC* pLib )
if ( !pBasicMgr )
continue;
Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
Sequence< OUString > aLibNames( doc->getLibraryNames() );
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -431,7 +431,7 @@ long HandleBasicError( StarBASIC* pBasic )
OSL_ENSURE( aDocument.isValid(), "basctl::HandleBasicError: no document for the given BasicManager!" );
if ( aDocument.isValid() )
{
::rtl::OUString aOULibName( pBasic->GetName() );
OUString aOULibName( pBasic->GetName() );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
+58 -58
View File
@@ -54,7 +54,7 @@ namespace basctl
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName )
void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName )
{
try
{
@@ -64,7 +64,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
script::ModuleInfo aModuleInfo = xVBAModuleInfo->getModuleInfo( rModName );
uno::Any aObject( aModuleInfo.ModuleObject );
uno::Reference< lang::XServiceInfo > xServiceInfo( aObject, uno::UNO_QUERY );
if( xServiceInfo.is() && xServiceInfo->supportsService( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ooo.vba.excel.Worksheet" )) ) )
if( xServiceInfo.is() && xServiceInfo->supportsService( "ooo.vba.excel.Worksheet" ) )
{
uno::Reference< container::XNamed > xNamed( aObject, uno::UNO_QUERY );
if( xNamed.is() )
@@ -77,7 +77,7 @@ void ModuleInfoHelper::getObjectName( const uno::Reference< container::XNameCont
}
}
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const ::rtl::OUString& rModName )
sal_Int32 ModuleInfoHelper::getModuleType( const uno::Reference< container::XNameContainer >& rLib, const OUString& rModName )
{
sal_Int32 nType = script::ModuleType::NORMAL;
uno::Reference< script::vba::XVBAModuleInfo > xVBAModuleInfo( rLib, uno::UNO_QUERY );
@@ -110,7 +110,7 @@ DocumentEntry::~DocumentEntry()
LibEntry::LibEntry (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
OUString const& rLibName,
EntryType eType
) :
DocumentEntry(rDocument, eLocation, eType),
@@ -129,9 +129,9 @@ EntryDescriptor::EntryDescriptor () :
EntryDescriptor::EntryDescriptor (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
rtl::OUString const& rLibSubName,
rtl::OUString const& rName,
OUString const& rLibName,
OUString const& rLibSubName,
OUString const& rName,
EntryType eType
) :
m_aDocument(rDocument),
@@ -147,10 +147,10 @@ EntryDescriptor::EntryDescriptor (
EntryDescriptor::EntryDescriptor (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
rtl::OUString const& rLibSubName,
rtl::OUString const& rName,
rtl::OUString const& rMethodName,
OUString const& rLibName,
OUString const& rLibSubName,
OUString const& rName,
OUString const& rMethodName,
EntryType eType
) :
m_aDocument(rDocument),
@@ -223,7 +223,7 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
ImpCreateLibEntries( pDocumentRootEntry, rDocument, eLocation );
if ( !pDocumentRootEntry )
{
::rtl::OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
OUString aRootName( GetRootEntryName( rDocument, eLocation ) );
Image aImage;
GetRootEntryBitmaps( rDocument, aImage );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
@@ -242,19 +242,19 @@ void TreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocation eL
void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation )
{
// get a sorted list of library names
Sequence< ::rtl::OUString > aLibNames( rDocument.getLibraryNames() );
Sequence< OUString > aLibNames( rDocument.getLibraryNames() );
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
::rtl::OUString aLibName = pLibNames[ i ];
OUString aLibName = pLibNames[ i ];
if ( eLocation == rDocument.getLibraryLocation( aLibName ) )
{
// check, if the module library is loaded
bool bModLibLoaded = false;
::rtl::OUString aOULibName( aLibName );
OUString aOULibName( aLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLoaded( aOULibName ) )
bModLibLoaded = true;
@@ -303,7 +303,7 @@ void TreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const Sc
}
}
void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
// modules
if ( nMode & BROWSEMODE_MODULES )
@@ -319,13 +319,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
else
{
// get a sorted list of module names
Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
sal_Int32 nModCount = aModNames.getLength();
const ::rtl::OUString* pModNames = aModNames.getConstArray();
const OUString* pModNames = aModNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
{
::rtl::OUString aModName = pModNames[ i ];
OUString aModName = pModNames[ i ];
SvLBoxEntry* pModuleEntry = FindEntry( pLibRootEntry, aModName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
pModuleEntry = AddEntry(
@@ -338,13 +338,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
// methods
if ( nMode & BROWSEMODE_SUBS )
{
Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
sal_Int32 nCount = aNames.getLength();
const ::rtl::OUString* pNames = aNames.getConstArray();
const OUString* pNames = aNames.getConstArray();
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
{
::rtl::OUString aName = pNames[ j ];
OUString aName = pNames[ j ];
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
pEntry = AddEntry(
@@ -375,13 +375,13 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
try
{
// get a sorted list of dialog names
Sequence< ::rtl::OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) );
Sequence< OUString > aDlgNames( rDocument.getObjectNames( E_DIALOGS, rLibName ) );
sal_Int32 nDlgCount = aDlgNames.getLength();
const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
const OUString* pDlgNames = aDlgNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
{
::rtl::OUString aDlgName = pDlgNames[ i ];
OUString aDlgName = pDlgNames[ i ];
SvLBoxEntry* pDialogEntry = FindEntry( pLibRootEntry, aDlgName, OBJ_TYPE_DIALOG );
if ( !pDialogEntry )
pDialogEntry = AddEntry(
@@ -400,20 +400,20 @@ void TreeListBox::ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const Scri
}
}
void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
std::vector<std::pair<EntryType, rtl::OUString> > aEntries;
std::vector<std::pair<EntryType, OUString> > aEntries;
aEntries.push_back( ::std::make_pair( OBJ_TYPE_DOCUMENT_OBJECTS, IDE_RESSTR(RID_STR_DOCUMENT_OBJECTS) ) );
aEntries.push_back( ::std::make_pair( OBJ_TYPE_USERFORMS, IDE_RESSTR(RID_STR_USERFORMS) ) );
aEntries.push_back( ::std::make_pair( OBJ_TYPE_NORMAL_MODULES, IDE_RESSTR(RID_STR_NORMAL_MODULES) ) );
aEntries.push_back( ::std::make_pair( OBJ_TYPE_CLASS_MODULES, IDE_RESSTR(RID_STR_CLASS_MODULES) ) );
std::vector<std::pair<EntryType, rtl::OUString> >::iterator iter;
std::vector<std::pair<EntryType, OUString> >::iterator iter;
for( iter = aEntries.begin(); iter != aEntries.end(); ++iter )
{
EntryType eType = iter->first;
rtl::OUString aEntryName = iter->second;
OUString aEntryName = iter->second;
SvLBoxEntry* pLibSubRootEntry = FindEntry( pLibRootEntry, aEntryName, eType );
if( pLibSubRootEntry )
{
@@ -433,7 +433,7 @@ void TreeListBox::ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, c
}
}
void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName )
void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName )
{
uno::Reference< container::XNameContainer > xLib = rDocument.getOrCreateLibrary( E_SCRIPTS, rLibName );
if( !xLib.is() )
@@ -442,16 +442,16 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
try
{
// get a sorted list of module names
Sequence< ::rtl::OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
Sequence< OUString > aModNames = rDocument.getObjectNames( E_SCRIPTS, rLibName );
sal_Int32 nModCount = aModNames.getLength();
const ::rtl::OUString* pModNames = aModNames.getConstArray();
const OUString* pModNames = aModNames.getConstArray();
EntryDescriptor aDesc( GetEntryDescriptor( pLibSubRootEntry ) );
EntryType eCurrentType( aDesc.GetType() );
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
{
::rtl::OUString aModName = pModNames[ i ];
OUString aModName = pModNames[ i ];
EntryType eType = OBJ_TYPE_UNKNOWN;
switch( ModuleInfoHelper::getModuleType( xLib, aModName ) )
{
@@ -473,19 +473,19 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
// display a nice friendly name in the ObjectModule tab,
// combining the objectname and module name, e.g. Sheet1 ( Financials )
::rtl::OUStringBuffer aEntryNameBuf( aModName );
OUStringBuffer aEntryNameBuf( aModName );
if( eType == OBJ_TYPE_DOCUMENT_OBJECTS )
{
::rtl::OUString sObjName;
OUString sObjName;
ModuleInfoHelper::getObjectName( xLib, aModName, sObjName );
if( !sObjName.isEmpty() )
{
aEntryNameBuf.appendAscii(RTL_CONSTASCII_STRINGPARAM(" ("));
aEntryNameBuf.append( " (" );
aEntryNameBuf.append(sObjName);
aEntryNameBuf.append(')');
}
}
::rtl::OUString aEntryName(aEntryNameBuf.makeStringAndClear());
OUString aEntryName(aEntryNameBuf.makeStringAndClear());
SvLBoxEntry* pModuleEntry = FindEntry( pLibSubRootEntry, aEntryName, OBJ_TYPE_MODULE );
if ( !pModuleEntry )
pModuleEntry = AddEntry(
@@ -498,13 +498,13 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
// methods
if ( nMode & BROWSEMODE_SUBS )
{
Sequence< ::rtl::OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
Sequence< OUString > aNames = GetMethodNames( rDocument, rLibName, aModName );
sal_Int32 nCount = aNames.getLength();
const ::rtl::OUString* pNames = aNames.getConstArray();
const OUString* pNames = aNames.getConstArray();
for ( sal_Int32 j = 0 ; j < nCount ; j++ )
{
::rtl::OUString aName = pNames[ j ];
OUString aName = pNames[ j ];
SvLBoxEntry* pEntry = FindEntry( pModuleEntry, aName, OBJ_TYPE_METHOD );
if ( !pEntry )
pEntry = AddEntry(
@@ -523,7 +523,7 @@ void TreeListBox::ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEn
}
}
SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText )
SvLBoxEntry* TreeListBox::ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText )
{
sal_uLong nRootPos = 0;
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
@@ -640,7 +640,7 @@ SvLBoxEntry* TreeListBox::CloneEntry( SvLBoxEntry* pSource )
return pNew;
}
SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, EntryType eType )
SvLBoxEntry* TreeListBox::FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType )
{
sal_uLong nRootPos = 0;
SvLBoxEntry* pEntry = pParent ? FirstChild( pParent ) : GetEntry( nRootPos );
@@ -668,10 +668,10 @@ long TreeListBox::ExpandingHdl()
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::ExpandingHdl: no document, or document is dead!" );
if ( aDocument.isAlive() )
{
::rtl::OUString aLibName( aDesc.GetLibName() );
::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
::rtl::OUString aName( aDesc.GetName() );
::rtl::OUString aMethodName( aDesc.GetMethodName() );
OUString aLibName( aDesc.GetLibName() );
OUString aLibSubName( aDesc.GetLibSubName() );
OUString aName( aDesc.GetName() );
OUString aMethodName( aDesc.GetMethodName() );
if ( !aLibName.isEmpty() && aLibSubName.isEmpty() && aName.isEmpty() && aMethodName.isEmpty() )
{
@@ -682,7 +682,7 @@ long TreeListBox::ExpandingHdl()
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
::rtl::OUString aPassword;
OUString aPassword;
bOK = QueryPassword( xModLibContainer, aLibName, aPassword );
}
}
@@ -702,7 +702,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
OSL_ENSURE( aDocument.isAlive(), "TreeListBox::IsEntryProtected: no document, or document is dead!" );
if ( aDocument.isAlive() )
{
::rtl::OUString aOULibName( aDesc.GetLibName() );
OUString aOULibName( aDesc.GetLibName() );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
@@ -719,7 +719,7 @@ bool TreeListBox::IsEntryProtected( SvLBoxEntry* pEntry )
SAL_WNODEPRECATED_DECLARATIONS_PUSH
SvLBoxEntry* TreeListBox::AddEntry(
rtl::OUString const& rText,
OUString const& rText,
const Image& rImage,
SvLBoxEntry* pParent,
bool bChildrenOnDemand,
@@ -750,7 +750,7 @@ LibraryType TreeListBox::GetLibraryType() const
return eType;
}
::rtl::OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
OUString TreeListBox::GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const
{
return rDocument.getTitle( eLocation, GetLibraryType() );
}
@@ -763,12 +763,12 @@ void TreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& r
if ( rDocument.isDocument() )
{
::rtl::OUString sFactoryURL;
OUString sFactoryURL;
Reference<uno::XComponentContext> xContext( ::comphelper::getProcessComponentContext() );
Reference< frame::XModuleManager2 > xModuleManager( frame::ModuleManager::create(xContext) );
try
{
::rtl::OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
OUString sModule( xModuleManager->identify( rDocument.getDocument() ) );
Reference< container::XNameAccess > xModuleConfig( xModuleManager, UNO_QUERY );
if ( xModuleConfig.is() )
{
@@ -816,7 +816,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
aDesc = EntryDescriptor(
ScriptDocument::getApplicationScriptDocument(),
LIBRARY_LOCATION_USER, "Standard",
::rtl::OUString(), ".", OBJ_TYPE_UNKNOWN
OUString(), ".", OBJ_TYPE_UNKNOWN
);
}
ScriptDocument aDocument = aDesc.GetDocument();
@@ -826,7 +826,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if ( pRootEntry )
{
pCurEntry = pRootEntry;
::rtl::OUString aLibName( aDesc.GetLibName() );
OUString aLibName( aDesc.GetLibName() );
if ( !aLibName.isEmpty() )
{
Expand( pRootEntry );
@@ -834,7 +834,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if ( pLibEntry )
{
pCurEntry = pLibEntry;
::rtl::OUString aLibSubName( aDesc.GetLibSubName() );
OUString aLibSubName( aDesc.GetLibSubName() );
if( !aLibSubName.isEmpty() )
{
Expand( pLibEntry );
@@ -844,7 +844,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
pCurEntry = pLibSubEntry;
}
}
::rtl::OUString aName( aDesc.GetName() );
OUString aName( aDesc.GetName() );
if ( !aName.isEmpty() )
{
Expand( pCurEntry );
@@ -855,7 +855,7 @@ void TreeListBox::SetCurrentEntry (EntryDescriptor& rDesc)
if ( pEntry )
{
pCurEntry = pEntry;
::rtl::OUString aMethodName( aDesc.GetMethodName() );
OUString aMethodName( aDesc.GetMethodName() );
if ( !aMethodName.isEmpty() )
{
Expand( pEntry );
+32 -32
View File
@@ -24,7 +24,7 @@
#include <memory>
#include "tools/solar.h"
#include <svtools/svtreebx.hxx>
#include <svtools/treelistbox.hxx>
#include <svl/lstner.hxx>
#include <basic/sbstar.hxx>
#include <sbxitem.hxx>
@@ -91,28 +91,28 @@ public:
class LibEntry : public DocumentEntry
{
private:
rtl::OUString m_aLibName;
OUString m_aLibName;
public:
LibEntry (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
OUString const& rLibName,
EntryType eType = OBJ_TYPE_LIBRARY
);
virtual ~LibEntry ();
rtl::OUString const& GetLibName () const { return m_aLibName; }
OUString const& GetLibName () const { return m_aLibName; }
};
class EntryDescriptor
{
ScriptDocument m_aDocument;
LibraryLocation m_eLocation;
rtl::OUString m_aLibName;
rtl::OUString m_aLibSubName; // for vba entry: Document Objects, Class Modules, Forms and Normal Modules
rtl::OUString m_aName;
rtl::OUString m_aMethodName;
OUString m_aLibName;
OUString m_aLibSubName; // for vba entry: Document Objects, Class Modules, Forms and Normal Modules
OUString m_aName;
OUString m_aMethodName;
EntryType m_eType;
public:
@@ -120,41 +120,41 @@ public:
EntryDescriptor (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
rtl::OUString const& rLibSubName,
rtl::OUString const& rName,
OUString const& rLibName,
OUString const& rLibSubName,
OUString const& rName,
EntryType eType
);
EntryDescriptor (
ScriptDocument const& rDocument,
LibraryLocation eLocation,
rtl::OUString const& rLibName,
rtl::OUString const& rLibSubName,
rtl::OUString const& rName,
rtl::OUString const& rMethodName,
OUString const& rLibName,
OUString const& rLibSubName,
OUString const& rName,
OUString const& rMethodName,
EntryType eType
);
virtual ~EntryDescriptor ();
bool operator == (EntryDescriptor const& rDesc) const;
ScriptDocument const& GetDocument() const { return m_aDocument; }
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
ScriptDocument const& GetDocument() const { return m_aDocument; }
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
LibraryLocation GetLocation() const { return m_eLocation; }
void SetLocation( LibraryLocation eLocation ) { m_eLocation = eLocation; }
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
void SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; }
const OUString& GetLibName() const { return m_aLibName; }
void SetLibName( const OUString& aLibName ) { m_aLibName = aLibName; }
const ::rtl::OUString& GetLibSubName() const { return m_aLibSubName; }
void SetLibSubName( const ::rtl::OUString& aLibSubName ) { m_aLibSubName = aLibSubName; }
const OUString& GetLibSubName() const { return m_aLibSubName; }
void SetLibSubName( const OUString& aLibSubName ) { m_aLibSubName = aLibSubName; }
const ::rtl::OUString& GetName() const { return m_aName; }
void SetName( const ::rtl::OUString& aName ) { m_aName = aName; }
const OUString& GetName() const { return m_aName; }
void SetName( const OUString& aName ) { m_aName = aName; }
const ::rtl::OUString& GetMethodName() const { return m_aMethodName; }
void SetMethodName( const ::rtl::OUString& aMethodName ) { m_aMethodName = aMethodName; }
const OUString& GetMethodName() const { return m_aMethodName; }
void SetMethodName( const OUString& aMethodName ) { m_aMethodName = aMethodName; }
EntryType GetType() const { return m_eType; }
void SetType( EntryType eType ) { m_eType = eType; }
@@ -188,10 +188,10 @@ protected:
virtual long ExpandingHdl();
void ImpCreateLibEntries( SvLBoxEntry* pShellRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation );
void ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
void ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
void ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const ::rtl::OUString& rLibName );
SvLBoxEntry* ImpFindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText );
void ImpCreateLibSubEntries( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
void ImpCreateLibSubEntriesInVBAMode( SvLBoxEntry* pLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
void ImpCreateLibSubSubEntriesInVBAMode( SvLBoxEntry* pLibSubRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
SvLBoxEntry* ImpFindEntry( SvLBoxEntry* pParent, const OUString& rText );
// DocumentEventListener
virtual void onDocumentCreated( const ScriptDocument& _rDocument );
@@ -220,7 +220,7 @@ public:
SbModule* FindModule( SvLBoxEntry* pEntry );
SbxVariable* FindVariable( SvLBoxEntry* pEntry );
SvLBoxEntry* FindRootEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const ::rtl::OUString& rText, EntryType eType );
SvLBoxEntry* FindEntry( SvLBoxEntry* pParent, const OUString& rText, EntryType eType );
EntryDescriptor GetEntryDescriptor( SvLBoxEntry* pEntry );
@@ -228,14 +228,14 @@ public:
bool IsValidEntry( SvLBoxEntry* pEntry );
SvLBoxEntry* AddEntry(
const ::rtl::OUString& rText, const Image& rImage,
const OUString& rText, const Image& rImage,
SvLBoxEntry* pParent, bool bChildrenOnDemand,
std::auto_ptr<Entry> aUserData
);
void RemoveEntry (SvLBoxEntry*);
void RemoveEntry (ScriptDocument const&);
::rtl::OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
OUString GetRootEntryName( const ScriptDocument& rDocument, LibraryLocation eLocation ) const;
void GetRootEntryBitmaps( const ScriptDocument& rDocument, Image& rImage );
void SetCurrentEntry (EntryDescriptor&);
+5 -5
View File
@@ -58,7 +58,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
}
else if ( eType == OBJ_TYPE_LIBRARY )
{
::rtl::OUString aOULibName( aDesc.GetLibName() );
OUString aOULibName( aDesc.GetLibName() );
// check password
bool bOK = true;
@@ -68,7 +68,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
::rtl::OUString aPassword;
OUString aPassword;
bOK = QueryPassword( xModLibContainer, aOULibName, aPassword );
}
}
@@ -123,7 +123,7 @@ void TreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
|| eType == OBJ_TYPE_NORMAL_MODULES
|| eType == OBJ_TYPE_CLASS_MODULES )
{
::rtl::OUString aLibName( aDesc.GetLibName() );
OUString aLibName( aDesc.GetLibName() );
ImpCreateLibSubSubEntriesInVBAMode( pEntry, aDocument, aLibName );
}
else {
@@ -452,9 +452,9 @@ SvLBoxEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, Librar
return 0;
}
::rtl::OUString CreateMgrAndLibStr( const ::rtl::OUString& rMgrName, const ::rtl::OUString& rLibName )
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName )
{
::rtl::OUStringBuffer aName;
OUStringBuffer aName;
aName.append('[');
aName.append(rMgrName);
aName.append(']');
+27 -27
View File
@@ -54,7 +54,7 @@ DBG_NAME( BaseWindow )
TYPEINIT0( BaseWindow )
TYPEINIT1( SbxItem, SfxPoolItem );
BaseWindow::BaseWindow( Window* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName )
BaseWindow::BaseWindow( Window* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName )
:Window( pParent, WinBits( WB_3DLOOK ) )
,m_aDocument( rDocument )
,m_aLibName( aLibName )
@@ -176,14 +176,14 @@ void BaseWindow::UpdateData()
{
}
::rtl::OUString BaseWindow::GetTitle()
OUString BaseWindow::GetTitle()
{
return ::rtl::OUString();
return OUString();
}
::rtl::OUString BaseWindow::CreateQualifiedName()
OUString BaseWindow::CreateQualifiedName()
{
::rtl::OUStringBuffer aName;
OUStringBuffer aName;
if ( !m_aLibName.isEmpty() )
{
LibraryLocation eLocation = m_aDocument.getLibraryLocation( m_aLibName );
@@ -250,7 +250,7 @@ void BaseWindow::InsertLibInfo () const
bool BaseWindow::Is (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName, rtl::OUString const& rName,
OUString const& rLibName, OUString const& rName,
ItemType eType, bool bFindSuspended
)
{
@@ -521,7 +521,7 @@ void TabBar::Command( const CommandEvent& rCEvt )
if (Shell* pShell = GetShell())
{
ScriptDocument aDocument( pShell->GetCurDocument() );
::rtl::OUString aOULibName( pShell->GetCurLibName() );
OUString aOULibName( pShell->GetCurLibName() );
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
@@ -651,7 +651,7 @@ void TabBar::Sort()
}
}
void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines )
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines )
{
sal_Int32 nStartPos = 0;
sal_Int32 nLine = 0;
@@ -678,7 +678,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bo
else
nEndPos++;
::rtl::OUString aEndStr = rStr.copy( nEndPos );
OUString aEndStr = rStr.copy( nEndPos );
rStr = rStr.copy( 0, nStartPos );
rStr += aEndStr;
}
@@ -694,7 +694,7 @@ void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bo
if ( n > nStartPos )
{
::rtl::OUString aEndStr = rStr.copy( n );
OUString aEndStr = rStr.copy( n );
rStr = rStr.copy( 0, nStartPos );
rStr += aEndStr;
}
@@ -737,8 +737,8 @@ LibInfos::~LibInfos ()
void LibInfos::InsertInfo (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName,
rtl::OUString const& rCurrentName,
OUString const& rLibName,
OUString const& rCurrentName,
ItemType eCurrentType
)
{
@@ -758,14 +758,14 @@ void LibInfos::RemoveInfoFor (ScriptDocument const& rDocument)
}
LibInfos::Item const* LibInfos::GetInfo (
ScriptDocument const& rDocument, rtl::OUString const& rLibName
ScriptDocument const& rDocument, OUString const& rLibName
)
{
Map::iterator it = m_aMap.find(Key(rDocument, rLibName));
return it != m_aMap.end() ? &it->second : 0;
}
LibInfos::Key::Key (ScriptDocument const& rDocument, rtl::OUString const& rLibName) :
LibInfos::Key::Key (ScriptDocument const& rDocument, OUString const& rLibName) :
m_aDocument(rDocument), m_aLibName(rLibName)
{ }
@@ -784,8 +784,8 @@ size_t LibInfos::Key::Hash::operator () (Key const& rKey) const
LibInfos::Item::Item (
ScriptDocument const& rDocument,
rtl::OUString const& rLibName,
rtl::OUString const& rCurrentName,
OUString const& rLibName,
OUString const& rCurrentName,
ItemType eCurrentType
) :
m_aDocument(rDocument),
@@ -797,10 +797,10 @@ LibInfos::Item::Item (
LibInfos::Item::~Item ()
{ }
bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
bool QueryDel( const OUString& rName, const ResId& rId, Window* pParent )
{
::rtl::OUString aQuery(rId.toString());
::rtl::OUStringBuffer aNameBuf( rName );
OUString aQuery(rId.toString());
OUStringBuffer aNameBuf( rName );
aNameBuf.append('\'');
aNameBuf.insert(sal_Int32(0), sal_Unicode('\''));
aQuery = aQuery.replaceAll("XX", aNameBuf.makeStringAndClear());
@@ -808,32 +808,32 @@ bool QueryDel( const ::rtl::OUString& rName, const ResId& rId, Window* pParent )
return ( aQueryBox.Execute() == RET_YES );
}
bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent )
bool QueryDelMacro( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMACRO ), pParent );
}
bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent )
bool QueryReplaceMacro( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYREPLACEMACRO ), pParent );
}
bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent )
bool QueryDelDialog( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELDIALOG ), pParent );
}
bool QueryDelLib( const ::rtl::OUString& rName, bool bRef, Window* pParent )
bool QueryDelLib( const OUString& rName, bool bRef, Window* pParent )
{
return QueryDel( rName, IDEResId( bRef ? RID_STR_QUERYDELLIBREF : RID_STR_QUERYDELLIB ), pParent );
}
bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent )
bool QueryDelModule( const OUString& rName, Window* pParent )
{
return QueryDel( rName, IDEResId( RID_STR_QUERYDELMODULE ), pParent );
}
bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat, bool bNewTitle )
bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat, bool bNewTitle )
{
bool bOK = false;
sal_uInt16 nRet = 0;
@@ -847,7 +847,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
// set new title
if ( bNewTitle )
{
::rtl::OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD));
OUString aTitle(IDE_RESSTR(RID_STR_ENTERPASSWORD));
aTitle = aTitle.replaceAll("XX", rLibName);
aDlg.SetText( aTitle );
}
@@ -864,7 +864,7 @@ bool QueryPassword( const Reference< script::XLibraryContainer >& xLibContainer,
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( rLibName ) && !xPasswd->isLibraryPasswordVerified( rLibName ) )
{
rPassword = aDlg.GetPassword();
// ::rtl::OUString aOUPassword( rPassword );
// OUString aOUPassword( rPassword );
bOK = xPasswd->verifyLibraryPassword( rLibName, rPassword );
if ( !bOK )
+6 -6
View File
@@ -38,15 +38,15 @@ namespace basctl
namespace
{
bool lcl_ParseText(rtl::OUString const &rText, size_t& rLineNr )
bool lcl_ParseText(OUString const &rText, size_t& rLineNr )
{
// aText should look like "# n" where
// n > 0 && n < std::numeric_limits< sal_uInt16 >::max().
// All spaces are ignored, so there can even be spaces within the
// number n. (Maybe it would be better to ignore all whitespace instead
// of just spaces.)
rtl::OUString aText(
rText.replaceAll(" ", rtl::OUString()));
OUString aText(
rText.replaceAll(" ", OUString()));
sal_Unicode cFirst = aText[0];
if (cFirst != '#' && !(cFirst >= '0' && cFirst <= '9'))
return false;
@@ -82,7 +82,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i )
{
BreakPoint* pBrk = m_aModifiedBreakPointList.at( i );
String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
OUString aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
}
@@ -111,7 +111,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
void BreakPointDialog::SetCurrentBreakPoint( BreakPoint* pBrk )
{
String aStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
String aStr( "# " );
aStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.SetText( aStr );
UpdateFields( pBrk );
@@ -200,7 +200,7 @@ IMPL_LINK( BreakPointDialog, ButtonHdl, Button *, pButton )
pBrk->bEnabled = aCheckBox.IsChecked();
pBrk->nStopAfter = (size_t) aNumericField.GetValue();
m_aModifiedBreakPointList.InsertSorted( pBrk );
String aEntryStr( RTL_CONSTASCII_USTRINGPARAM( "# " ) );
OUString aEntryStr( "# " );
aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
if (SfxDispatcher* pDispatcher = GetDispatcher())
+3 -4
View File
@@ -46,7 +46,6 @@
namespace basctl
{
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -71,7 +70,7 @@ public:
class DllInstance : public comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>
{
public:
DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>(::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), ::com::sun::star::uno::UNO_QUERY_THROW), new Dll)
DllInstance() : comphelper::scoped_disposing_solar_mutex_reset_ptr<Dll>(::com::sun::star::uno::Reference<com::sun::star::lang::XComponent>(comphelper::getProcessServiceFactory()->createInstance(OUString("com.sun.star.frame.Desktop")), ::com::sun::star::uno::UNO_QUERY_THROW), new Dll)
{ }
};
@@ -137,7 +136,7 @@ Dll::Dll () :
SfxModule* pMod = Module::Get();
SfxObjectFactory& rFactory = DocShell::Factory();
rFactory.SetDocumentServiceName( rtl::OUString("com.sun.star.script.BasicIDE") );
rFactory.SetDocumentServiceName( "com.sun.star.script.BasicIDE" );
DocShell::RegisterInterface( pMod );
Shell::RegisterFactory( SVX_INTERFACE_BASIDE_VIEWSH );
@@ -198,7 +197,7 @@ IMPL_LINK(ExtraData, GlobalBasicBreakHdl, StarBASIC *, pBasic )
OSL_ENSURE( aDocument.isValid(), "basctl::ExtraData::GlobalBasicBreakHdl: no document for the basic manager!" );
if ( aDocument.isValid() )
{
::rtl::OUString aOULibName( pBasic->GetName() );
OUString aOULibName( pBasic->GetName() );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
+3 -3
View File
@@ -41,7 +41,7 @@ LineNumberWindow::LineNumberWindow (Window* pParent, ModulWindow* pModulWindow)
m_nCurYOffset(0)
{
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
m_nBaseWidth = GetTextWidth(rtl::OUString('8'));
m_nBaseWidth = GetTextWidth('8');
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
}
@@ -75,7 +75,7 @@ void LineNumberWindow::Paint( const Rectangle& )
// FIXME: it would be best if we could get notified of a font change
// rather than doing that re-calculation at each Paint event
m_nBaseWidth = GetTextWidth(rtl::OUString('8'));
m_nBaseWidth = GetTextWidth(OUString('8'));
// reserve enough for 3 sigit minimum, with a bit to spare for confort
m_nWidth = m_nBaseWidth * 3 + m_nBaseWidth / 2;
@@ -88,7 +88,7 @@ void LineNumberWindow::Paint( const Rectangle& )
sal_Int64 y = (nStartLine - 1) * nLineHeight;
for(sal_Int32 n = nStartLine; n <= nEndLine; ++n, y += nLineHeight)
DrawText(Point(0, y - m_nCurYOffset), rtl::OUString::valueOf(n));
DrawText(Point(0, y - m_nCurYOffset), OUString::valueOf(n));
}
void LineNumberWindow::DataChanged(DataChangedEvent const & rDCEvt)
+114 -114
View File
@@ -41,16 +41,16 @@ using namespace ::com::sun::star::resource;
namespace
{
rtl::OUString const aDot(".");
rtl::OUString const aEsc("&");
rtl::OUString const aSemi(";");
OUString const aDot(".");
OUString const aEsc("&");
OUString const aSemi(";");
} // namespace
LocalizationMgr::LocalizationMgr(
Shell* pShell,
ScriptDocument const& rDocument,
rtl::OUString const& aLibName,
OUString const& aLibName,
Reference<XStringResourceManager> const& xStringResourceManager
) :
m_xStringResourceManager(xStringResourceManager),
@@ -68,8 +68,8 @@ bool LocalizationMgr::isLibraryLocalized ()
void LocalizationMgr::handleTranslationbar ()
{
static rtl::OUString const aLayoutManagerName("LayoutManager");
static rtl::OUString const aToolBarResName("private:resource/toolbar/translationbar");
static OUString const aLayoutManagerName("LayoutManager");
static OUString const aToolBarResName("private:resource/toolbar/translationbar");
Reference< beans::XPropertySet > xFrameProps
( m_pShell->GetViewFrame()->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
@@ -102,7 +102,7 @@ namespace
}
bool isLanguageDependentProperty( ::rtl::OUString aName )
bool isLanguageDependentProperty( OUString aName )
{
static struct Prop
{
@@ -129,9 +129,9 @@ bool isLanguageDependentProperty( ::rtl::OUString aName )
void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResourceMode eMode )
{
Sequence< ::rtl::OUString > aDlgNames = m_aDocument.getObjectNames( E_DIALOGS, m_aLibName );
Sequence< OUString > aDlgNames = m_aDocument.getObjectNames( E_DIALOGS, m_aLibName );
sal_Int32 nDlgCount = aDlgNames.getLength();
const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
const OUString* pDlgNames = aDlgNames.getConstArray();
Reference< XStringResourceResolver > xDummyStringResolver;
for( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
@@ -146,15 +146,15 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
Any aDialogCtrl;
aDialogCtrl <<= xDialog;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
::rtl::OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
OUString(), m_xStringResourceManager, xDummyStringResolver, eMode );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialog->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialog->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 j = 0 ; j < nCtrls ; ++j )
{
::rtl::OUString aCtrlName( pNames[j] );
OUString aCtrlName( pNames[j] );
Any aCtrl = xDialog->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, m_xStringResourceManager, xDummyStringResolver, eMode );
@@ -165,13 +165,13 @@ void LocalizationMgr::implEnableDisableResourceForAllLibraryDialogs( HandleResou
}
::rtl::OUString implCreatePureResourceId
( const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
const ::rtl::OUString& aPropName,
OUString implCreatePureResourceId
( const OUString& aDialogName, const OUString& aCtrlName,
const OUString& aPropName,
Reference< XStringResourceManager > xStringResourceManager )
{
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aDot;
aPureIdStr += aDialogName;
aPureIdStr += aDot;
@@ -191,7 +191,7 @@ extern bool localesAreEqual( const ::com::sun::star::lang::Locale& rLocaleLeft,
// anyway only one language should exist when calling this method then,
// either the first one for mode SET_IDS or the last one for mode RESET_IDS
sal_Int32 LocalizationMgr::implHandleControlResourceProperties
( Any aControlAny, const ::rtl::OUString& aDialogName, const ::rtl::OUString& aCtrlName,
( Any aControlAny, const OUString& aDialogName, const OUString& aCtrlName,
Reference< XStringResourceManager > xStringResourceManager,
Reference< XStringResourceResolver > xSourceStringResolver, HandleResourceMode eMode )
{
@@ -218,7 +218,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 j = 0 ; j < nCtrlProps ; ++j )
{
const Property& rProp = pProps[j];
::rtl::OUString aPropName = rProp.Name;
OUString aPropName = rProp.Name;
TypeClass eType = rProp.Type.getTypeClass();
bool bLanguageDependentProperty =
(eType == TypeClass_STRING || eType == TypeClass_SEQUENCE)
@@ -229,7 +229,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
if( eType == TypeClass_STRING )
{
Any aPropAny = xPropertySet->getPropertyValue( aPropName );
::rtl::OUString aPropStr;
OUString aPropStr;
aPropAny >>= aPropStr;
// Replace string by id, add id+string to StringResource
@@ -239,7 +239,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
if( bEscAlreadyExisting )
continue;
::rtl::OUString aPureIdStr = implCreatePureResourceId
OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
// Set Id for all locales
@@ -250,7 +250,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -262,8 +262,8 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
if( aPropStr.getLength() > 1 )
{
::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
::rtl::OUString aNewPropStr = aPropStr;
OUString aPureIdStr = aPropStr.copy( 1 );
OUString aNewPropStr = aPropStr;
try
{
aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
@@ -280,7 +280,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
if( aPropStr.getLength() > 1 )
{
::rtl::OUString aPureIdStr = aPropStr.copy( 1 );
OUString aPureIdStr = aPropStr.copy( 1 );
const Locale* pLocales = aLocaleSeq.getConstArray();
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
@@ -299,10 +299,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Rename resource id
else if( eMode == RENAME_DIALOG_IDS || eMode == RENAME_CONTROL_IDS )
{
::rtl::OUString aSourceIdStr = aPropStr;
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = aPropStr;
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
::rtl::OUString aPureIdStr = implCreatePureResourceId
OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
// Set new Id and remove old one for all locales
@@ -310,7 +310,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xStringResourceManager->resolveStringForLocale
@@ -322,7 +322,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{}
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -332,10 +332,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
{
::rtl::OUString aSourceIdStr = aPropStr;
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = aPropStr;
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
::rtl::OUString aPureIdStr = implCreatePureResourceId
OUString aPureIdStr = implCreatePureResourceId
( aDialogName, aCtrlName, aPropName, xStringResourceManager );
const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
@@ -345,7 +345,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -359,7 +359,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
// TODO?: Change here and in toolkit
(void)aSemi;
@@ -369,8 +369,8 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Copy string from source to target resource
else if( eMode == COPY_RESOURCES && xSourceStringResolver.is() )
{
::rtl::OUString aSourceIdStr = aPropStr;
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = aPropStr;
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
const Locale& rDefaultLocale = xSourceStringResolver->getDefaultLocale();
@@ -379,7 +379,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for( sal_Int32 i = 0 ; i < nLocaleCount ; i++ )
{
const Locale& rLocale = pLocales[ i ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -400,10 +400,10 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
else if( eType == TypeClass_SEQUENCE )
{
Any aPropAny = xPropertySet->getPropertyValue( aPropName );
Sequence< ::rtl::OUString > aPropStrings;
Sequence< OUString > aPropStrings;
aPropAny >>= aPropStrings;
const ::rtl::OUString* pPropStrings = aPropStrings.getConstArray();
const OUString* pPropStrings = aPropStrings.getConstArray();
sal_Int32 nPropStringCount = aPropStrings.getLength();
if( nPropStringCount == 0 )
continue;
@@ -411,11 +411,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by id, add id+string to StringResource
if( eMode == SET_IDS )
{
Sequence< ::rtl::OUString > aIdStrings;
Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
::rtl::OUString* pIdStrings = aIdStrings.getArray();
OUString* pIdStrings = aIdStrings.getArray();
::rtl::OUString aIdStrBase = aDot;
OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -424,7 +424,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aPropStr = pPropStrings[i];
OUString aPropStr = pPropStrings[i];
bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
if( bEscAlreadyExisting )
{
@@ -433,7 +433,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
}
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -443,7 +443,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aPropStr, rLocale );
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -453,18 +453,18 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace id by string from StringResource
else if( eMode == RESET_IDS )
{
Sequence< ::rtl::OUString > aNewPropStrings;
Sequence< OUString > aNewPropStrings;
aNewPropStrings.realloc( nPropStringCount );
::rtl::OUString* pNewPropStrings = aNewPropStrings.getArray();
OUString* pNewPropStrings = aNewPropStrings.getArray();
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aIdStr = pPropStrings[i];
::rtl::OUString aNewPropStr = aIdStr;
OUString aIdStr = pPropStrings[i];
OUString aNewPropStr = aIdStr;
if( aIdStr.getLength() > 1 )
{
::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
OUString aPureIdStr = aIdStr.copy( 1 );
try
{
aNewPropStr = xStringResourceManager->resolveString( aPureIdStr );
@@ -481,17 +481,17 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Remove Id for all locales
else if( eMode == REMOVE_IDS_FROM_RESOURCE )
{
Sequence< ::rtl::OUString > aNewPropStrings;
Sequence< OUString > aNewPropStrings;
aNewPropStrings.realloc( nPropStringCount );
const Locale* pLocales = aLocaleSeq.getConstArray();
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aIdStr = pPropStrings[i];
OUString aIdStr = pPropStrings[i];
if( aIdStr.getLength() > 1 )
{
::rtl::OUString aPureIdStr = aIdStr.copy( 1 );
OUString aPureIdStr = aIdStr.copy( 1 );
for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
{
@@ -510,11 +510,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Rename resource id
else if( eMode == RENAME_CONTROL_IDS )
{
Sequence< ::rtl::OUString > aIdStrings;
Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
::rtl::OUString* pIdStrings = aIdStrings.getArray();
OUString* pIdStrings = aIdStrings.getArray();
::rtl::OUString aIdStrBase = aDot;
OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -523,11 +523,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aSourceIdStr = pPropStrings[i];
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = pPropStrings[i];
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -535,7 +535,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
const Locale& rLocale = pLocales[ iLocale ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xStringResourceManager->resolveStringForLocale
@@ -547,7 +547,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{}
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -557,11 +557,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by string from source StringResourceResolver
else if( eMode == MOVE_RESOURCES && xSourceStringResolver.is() )
{
Sequence< ::rtl::OUString > aIdStrings;
Sequence< OUString > aIdStrings;
aIdStrings.realloc( nPropStringCount );
::rtl::OUString* pIdStrings = aIdStrings.getArray();
OUString* pIdStrings = aIdStrings.getArray();
::rtl::OUString aIdStrBase = aDot;
OUString aIdStrBase = aDot;
aIdStrBase += aCtrlName;
aIdStrBase += aDot;
aIdStrBase += aPropName;
@@ -572,11 +572,11 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aSourceIdStr = pPropStrings[i];
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = pPropStrings[i];
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
::rtl::OUString aPureIdStr = ::rtl::OUString::valueOf( nUniqueId );
OUString aPureIdStr = OUString::valueOf( nUniqueId );
aPureIdStr += aIdStrBase;
// Set Id for all locales
@@ -584,7 +584,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
{
const Locale& rLocale = pLocales[ iLocale ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -598,7 +598,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
xStringResourceManager->setStringForLocale( aPureIdStr, aResStr, rLocale );
}
::rtl::OUString aPropIdStr = aEsc;
OUString aPropIdStr = aEsc;
aPropIdStr += aPureIdStr;
pIdStrings[i] = aPropIdStr;
}
@@ -614,15 +614,15 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
sal_Int32 i;
for ( i = 0; i < nPropStringCount; ++i )
{
::rtl::OUString aSourceIdStr = pPropStrings[i];
::rtl::OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
OUString aSourceIdStr = pPropStrings[i];
OUString aPureSourceIdStr = aSourceIdStr.copy( 1 );
// Set Id for all locales
for( sal_Int32 iLocale = 0 ; iLocale < nLocaleCount ; iLocale++ )
{
const Locale& rLocale = pLocales[ iLocale ];
::rtl::OUString aResStr;
OUString aResStr;
try
{
aResStr = xSourceStringResolver->resolveStringForLocale
@@ -818,7 +818,7 @@ DialogWindow* FindDialogWindowForEditor( DlgEditor* pEditor )
void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEditor,
Any aControlAny, const ::rtl::OUString& aCtrlName )
Any aControlAny, const OUString& aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -837,7 +837,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
::rtl::OUString aDialogName = pDlgWin->GetName();
OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
sal_Int32 nChangedCount = implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
@@ -848,7 +848,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
}
void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEditor,
::com::sun::star::uno::Any aControlAny, const ::rtl::OUString& aNewCtrlName )
::com::sun::star::uno::Any aControlAny, const OUString& aNewCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -867,7 +867,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
::rtl::OUString aDialogName = pDlgWin->GetName();
OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties
( aControlAny, aDialogName, aNewCtrlName, xStringResourceManager,
@@ -876,7 +876,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* pEditor,
Any aControlAny, const ::rtl::OUString& aCtrlName )
Any aControlAny, const OUString& aCtrlName )
{
// Get library for DlgEditor
DialogWindow* pDlgWin = FindDialogWindowForEditor( pEditor );
@@ -891,7 +891,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
::rtl::OUString aDialogName = pDlgWin->GetName();
OUString aDialogName = pDlgWin->GetName();
Reference< XStringResourceResolver > xDummyStringResolver;
sal_Int32 nChangedCount = implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
@@ -901,10 +901,10 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
MarkDocumentModified( aDocument );
}
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument, const OUString& aLibName,
const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
static OUString aResourceResolverPropName( "ResourceResolver" );
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -922,7 +922,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
::rtl::OUString(), xStringResourceManager,
OUString(), xStringResourceManager,
xDummyStringResolver, SET_IDS );
}
@@ -933,8 +933,8 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
}
}
void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const OUString& aLibName,
const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -947,16 +947,16 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
::rtl::OUString(), xStringResourceManager,
OUString(), xStringResourceManager,
xDummyStringResolver, RENAME_DIALOG_IDS );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, xStringResourceManager,
@@ -964,8 +964,8 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
}
}
void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aLibName,
const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const OUString& aLibName,
const OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{
// Get library
Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) );
@@ -978,16 +978,16 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
implHandleControlResourceProperties( aDialogCtrl, aDlgName,
::rtl::OUString(), xStringResourceManager,
OUString(), xStringResourceManager,
xDummyStringResolver, REMOVE_IDS_FROM_RESOURCE );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDlgName,
aCtrlName, xStringResourceManager,
@@ -1002,7 +1002,7 @@ void LocalizationMgr::resetResourceForDialog( Reference< container::XNameContain
return;
// Dialog as control
::rtl::OUString aDummyName;
OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1010,12 +1010,12 @@ void LocalizationMgr::resetResourceForDialog( Reference< container::XNameContain
aDummyName, xStringResourceManager, xDummyStringResolver, RESET_IDS );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName,
aCtrlName, xStringResourceManager, xDummyStringResolver, RESET_IDS );
@@ -1029,7 +1029,7 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
return;
// Dialog as control
::rtl::OUString aDummyName;
OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
Reference< XStringResourceResolver > xDummyStringResolver;
@@ -1037,12 +1037,12 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
aDummyName, xStringResourceManager, xDummyStringResolver, SET_IDS );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName,
aCtrlName, xStringResourceManager, xDummyStringResolver, SET_IDS );
@@ -1050,7 +1050,7 @@ void LocalizationMgr::setResourceIDsForDialog( Reference< container::XNameContai
}
void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
Any aControlAny, const ::rtl::OUString& aCtrlName,
Any aControlAny, const OUString& aCtrlName,
Reference< XStringResourceResolver > xSourceStringResolver )
{
// Get library for DlgEditor
@@ -1070,33 +1070,33 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
if( !xStringResourceManager.is() || xStringResourceManager->getLocales().getLength() == 0 )
return;
::rtl::OUString aDialogName = pDlgWin->GetName();
OUString aDialogName = pDlgWin->GetName();
implHandleControlResourceProperties
( aControlAny, aDialogName, aCtrlName, xStringResourceManager,
xSourceStringResolver, MOVE_RESOURCES );
}
void LocalizationMgr::copyResourceForDroppedDialog( Reference< container::XNameContainer > xDialogModel,
const ::rtl::OUString& aDialogName, Reference< XStringResourceManager > xStringResourceManager,
const OUString& aDialogName, Reference< XStringResourceManager > xStringResourceManager,
Reference< XStringResourceResolver > xSourceStringResolver )
{
if( !xStringResourceManager.is() )
return;
// Dialog as control
::rtl::OUString aDummyName;
OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
implHandleControlResourceProperties( aDialogCtrl, aDialogName,
aDummyName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDialogName,
aCtrlName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
@@ -1111,7 +1111,7 @@ void LocalizationMgr::copyResourceForDialog(
if( !xDialogModel.is() || !xSourceStringResolver.is() || !xTargetStringResourceManager.is() )
return;
::rtl::OUString aDummyName;
OUString aDummyName;
Any aDialogCtrl;
aDialogCtrl <<= xDialogModel;
implHandleControlResourceProperties
@@ -1119,12 +1119,12 @@ void LocalizationMgr::copyResourceForDialog(
xSourceStringResolver, COPY_RESOURCES );
// Handle all controls
Sequence< ::rtl::OUString > aNames = xDialogModel->getElementNames();
const ::rtl::OUString* pNames = aNames.getConstArray();
Sequence< OUString > aNames = xDialogModel->getElementNames();
const OUString* pNames = aNames.getConstArray();
sal_Int32 nCtrls = aNames.getLength();
for( sal_Int32 i = 0 ; i < nCtrls ; ++i )
{
::rtl::OUString aCtrlName( pNames[i] );
OUString aCtrlName( pNames[i] );
Any aCtrl = xDialogModel->getByName( aCtrlName );
implHandleControlResourceProperties( aCtrl, aDummyName, aDummyName,
xTargetStringResourceManager, xSourceStringResolver, COPY_RESOURCES );
+5 -5
View File
@@ -303,7 +303,7 @@ void MacroChooser::DeleteMacro()
SbModule* pModule = pMethod->GetModule();
DBG_ASSERT( pModule, "DeleteMacro: Kein Modul?!" );
::rtl::OUString aSource( pModule->GetSource32() );
OUString aSource( pModule->GetSource32() );
sal_uInt16 nStart, nEnd;
pMethod->GetLineRange( nStart, nEnd );
pModule->GetMethods()->Remove( pMethod );
@@ -335,11 +335,11 @@ SbMethod* MacroChooser::CreateMacro()
String aLibName( aDesc.GetLibName() );
if ( !aLibName.Len() )
aLibName = rtl::OUString("Standard");
aLibName = "Standard" ;
aDocument.getOrCreateLibrary( E_SCRIPTS, aLibName );
::rtl::OUString aOULibName( aLibName );
OUString aOULibName( aLibName );
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
xModLibContainer->loadLibrary( aOULibName );
@@ -405,7 +405,7 @@ void MacroChooser::CheckButtons()
if ( nDepth == 1 || nDepth == 2 )
{
ScriptDocument aDocument( aDesc.GetDocument() );
::rtl::OUString aOULibName( aDesc.GetLibName() );
OUString aOULibName( aDesc.GetLibName() );
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
@@ -504,7 +504,7 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
if ( pModule )
{
String aStr = aMacrosInTxtBaseStr;
aStr += rtl::OUString(" ");
aStr += " " ;
aStr += pModule->GetName();
aMacrosInTxt.SetText( aStr );
+106 -114
View File
@@ -40,6 +40,7 @@
#include <sfx2/request.hxx>
#include <tools/urlobj.hxx>
#include <tools/diagnose_ex.h>
#include <svtools/svlbitm.hxx>
#include <sot/storage.hxx>
#include <com/sun/star/io/Pipe.hpp>
@@ -50,6 +51,7 @@
#include <com/sun/star/script/XLibraryContainer2.hpp>
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/script/XLibraryContainerExport.hpp>
#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/ucb/XSimpleFileAccess2.hpp>
#include "com/sun/star/ucb/XCommandEnvironment.hpp"
@@ -66,7 +68,6 @@
namespace basctl
{
using ::rtl::OUString;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -81,9 +82,9 @@ namespace
class DummyInteractionHandler : public HandlerImpl_BASE
{
Reference< task::XInteractionHandler > m_xHandler;
Reference< task::XInteractionHandler2 > m_xHandler;
public:
DummyInteractionHandler( const Reference< task::XInteractionHandler >& xHandler ) : m_xHandler( xHandler ){}
DummyInteractionHandler( const Reference< task::XInteractionHandler2 >& xHandler ) : m_xHandler( xHandler ){}
virtual void SAL_CALL handle( const Reference< task::XInteractionRequest >& rRequest ) throw (::com::sun::star::uno::RuntimeException)
{
@@ -121,12 +122,12 @@ public:
LibLBoxString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const String& rTxt ) :
SvLBoxString( pEntry, nFlags, rTxt ) {}
virtual void Paint( const Point& rPos, SvLBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
virtual void Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry );
};
//----------------------------------------------------------------------------
void LibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
void LibLBoxString::Paint( const Point& rPos, SvTreeListBox& rDev, sal_uInt16, SvLBoxEntry* pEntry )
{
// Change text color if library is read only:
bool bReadOnly = false;
@@ -136,7 +137,7 @@ void LibLBoxString::Paint( const Point& rPos, SvLBox& rDev, sal_uInt16, SvLBoxEn
static_cast<LibUserData*>(pEntry->GetUserData())->
GetDocument() );
rtl::OUString aLibName(
OUString aLibName(
static_cast< SvLBoxString * >(pEntry->GetItem(1))->GetText());
Reference< script::XLibraryContainer2 > xModLibContainer(
aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY);
@@ -286,7 +287,7 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
DBG_ASSERT( pEntry, "Kein Eintrag?" );
// check, if Standard library
::rtl::OUString aLibName = GetEntryText( pEntry, 0 );
OUString aLibName = GetEntryText( pEntry, 0 );
if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute();
@@ -311,7 +312,7 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) )
{
::rtl::OUString aPassword;
OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
@@ -326,10 +327,10 @@ sal_Bool CheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
//----------------------------------------------------------------------------
sal_Bool CheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewName )
sal_Bool CheckBox::EditedEntry( SvLBoxEntry* pEntry, const OUString& rNewName )
{
bool bValid = rNewName.getLength() <= 30 && IsValidSbxName(rNewName);
rtl::OUString aOldName( GetEntryText( pEntry, 0 ) );
OUString aOldName( GetEntryText( pEntry, 0 ) );
if ( bValid && ( aOldName != rNewName ) )
{
try
@@ -450,7 +451,7 @@ GotoLineDialog::GotoLineDialog(Window * pParent )
sal_Int32 GotoLineDialog::GetLineNumber()
{
return rtl::OUString( aEdit.GetText() ).toInt32();
return OUString( aEdit.GetText() ).toInt32();
}
IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
@@ -560,7 +561,7 @@ void LibPage::CheckButtons()
SvLBoxEntry* pCur = aLibBox.GetCurEntry();
if ( pCur )
{
::rtl::OUString aLibName = aLibBox.GetEntryText( pCur, 0 );
OUString aLibName = aLibBox.GetEntryText( pCur, 0 );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
@@ -681,7 +682,7 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
else if ( pButton == &aPasswordButton )
{
SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
::rtl::OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// load module library (if not loaded)
Reference< script::XLibraryContainer > xModLibContainer = m_aCurDocument.getLibraryContainer( E_SCRIPTS );
@@ -748,15 +749,15 @@ IMPL_LINK_INLINE_START( LibPage, CheckPasswordHdl, SvxPasswordDialog *, pDlg )
long nRet = 0;
SvLBoxEntry* pCurEntry = aLibBox.GetCurEntry();
::rtl::OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
OUString aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
Reference< script::XLibraryContainerPassword > xPasswd( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xPasswd.is() )
{
try
{
::rtl::OUString aOldPassword( pDlg->GetOldPassword() );
::rtl::OUString aNewPassword( pDlg->GetNewPassword() );
OUString aOldPassword( pDlg->GetOldPassword() );
OUString aNewPassword( pDlg->GetNewPassword() );
xPasswd->changeLibraryPassword( aLibName, aOldPassword, aNewPassword );
nRet = 1;
}
@@ -788,30 +789,30 @@ void LibPage::InsertLib()
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILEOPEN_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
}
xFP->setTitle( String( IDEResId( RID_STR_APPENDLIBS ) ) );
// filter
::rtl::OUString aTitle = String( IDEResId( RID_STR_BASIC ) );
::rtl::OUString aFilter;
aFilter = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.sbl;*.xlc;*.xlb" ) ); // library files
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdw;*.sxw;*.odt" ) ); // text
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.vor;*.stw;*.ott" ) ); // text template
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sgl;*.sxg;*.odm" ) ); // master document
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.oth" ) ); // html document template
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdc;*.sxc;*.ods" ) ); // spreadsheet
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.stc;*.ots" ) ); // spreadsheet template
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sda;*.sxd;*.odg" ) ); // drawing
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.std;*.otg" ) ); // drawing template
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sdd;*.sxi;*.odp" ) ); // presentation
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sti;*.otp" ) ); // presentation template
aFilter += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ";*.sxm;*.odf" ) ); // formula
OUString aTitle = String( IDEResId( RID_STR_BASIC ) );
OUString aFilter;
aFilter = "*.sbl;*.xlc;*.xlb" ; // library files
aFilter += ";*.sdw;*.sxw;*.odt" ; // text
aFilter += ";*.vor;*.stw;*.ott" ; // text template
aFilter += ";*.sgl;*.sxg;*.odm" ; // master document
aFilter += ";*.oth" ; // html document template
aFilter += ";*.sdc;*.sxc;*.ods" ; // spreadsheet
aFilter += ";*.stc;*.ots" ; // spreadsheet template
aFilter += ";*.sda;*.sxd;*.odg" ; // drawing
aFilter += ";*.std;*.otg" ; // drawing template
aFilter += ";*.sdd;*.sxi;*.odp" ; // presentation
aFilter += ";*.sti;*.otp" ; // presentation template
aFilter += ";*.sxm;*.odf" ; // formula
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aTitle, aFilter );
// set display directory and filter
::rtl::OUString aPath(GetExtraData()->GetAddLibPath());
OUString aPath(GetExtraData()->GetAddLibPath());
if ( !aPath.isEmpty() )
xFP->setDisplayDirectory( aPath );
else
@@ -820,7 +821,7 @@ void LibPage::InsertLib()
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
}
rtl::OUString aLastFilter(GetExtraData()->GetAddLibFilter());
OUString aLastFilter(GetExtraData()->GetAddLibFilter());
if ( !aLastFilter.isEmpty() )
xFltMgr->setCurrentFilter( aLastFilter );
else
@@ -836,14 +837,14 @@ void LibPage::InsertLib()
Reference< script::XLibraryContainer2 > xDlgLibContImport;
// file URLs
Sequence< ::rtl::OUString > aFiles = xFP->getFiles();
Sequence< OUString > aFiles = xFP->getFiles();
INetURLObject aURLObj( aFiles[0] );
INetURLObject aModURLObj( aURLObj );
INetURLObject aDlgURLObj( aURLObj );
::rtl::OUString aBase = aURLObj.getBase();
::rtl::OUString aModBase(RTL_CONSTASCII_USTRINGPARAM("script"));
::rtl::OUString aDlgBase(RTL_CONSTASCII_USTRINGPARAM("dialog"));
OUString aBase = aURLObj.getBase();
OUString aModBase( "script" );
OUString aDlgBase( "dialog" );
if ( aBase == aModBase || aBase == aDlgBase )
{
@@ -855,22 +856,22 @@ void LibPage::InsertLib()
{
Reference< XSimpleFileAccess2 > xSFA( SimpleFileAccess::create(comphelper::getProcessComponentContext()) );
::rtl::OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aModURL( aModURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aModURL ) )
{
Sequence <Any> aSeqModURL(1);
aSeqModURL[0] <<= aModURL;
xModLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DocumentScriptLibraryContainer" ) ), aSeqModURL ), UNO_QUERY );
"com.sun.star.script.DocumentScriptLibraryContainer", aSeqModURL ), UNO_QUERY );
}
::rtl::OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aDlgURL( aDlgURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
if ( xSFA->exists( aDlgURL ) )
{
Sequence <Any> aSeqDlgURL(1);
aSeqDlgURL[0] <<= aDlgURL;
xDlgLibContImport = Reference< script::XLibraryContainer2 >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.script.DocumentDialogLibraryContainer" ) ), aSeqDlgURL ), UNO_QUERY );
"com.sun.star.script.DocumentDialogLibraryContainer", aSeqDlgURL ), UNO_QUERY );
}
}
@@ -880,9 +881,9 @@ void LibPage::InsertLib()
Reference< script::XLibraryContainer > xModLibContImp( xModLibContImport, UNO_QUERY );
Reference< script::XLibraryContainer > xDlgLibContImp( xDlgLibContImport, UNO_QUERY );
Sequence< ::rtl::OUString > aLibNames = GetMergedLibraryNames( xModLibContImp, xDlgLibContImp );
Sequence< OUString > aLibNames = GetMergedLibraryNames( xModLibContImp, xDlgLibContImp );
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
// library import dialog
@@ -894,7 +895,7 @@ void LibPage::InsertLib()
}
// libbox entries
::rtl::OUString aLibName( pLibNames[ i ] );
OUString aLibName( pLibNames[ i ] );
if ( !( ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) && xModLibContImport->isLibraryLink( aLibName ) ) ||
( xDlgLibContImport.is() && xDlgLibContImport->hasByName( aLibName ) && xDlgLibContImport->isLibraryLink( aLibName ) ) ) )
{
@@ -909,9 +910,9 @@ void LibPage::InsertLib()
else
{
bool bChanges = false;
::rtl::OUString aExtension( aURLObj.getExtension() );
::rtl::OUString aLibExtension(RTL_CONSTASCII_USTRINGPARAM("xlb"));
::rtl::OUString aContExtension(RTL_CONSTASCII_USTRINGPARAM("xlc"));
OUString aExtension( aURLObj.getExtension() );
OUString aLibExtension( "xlb" );
OUString aContExtension( "xlc" );
// disable reference checkbox for documents and sbls
if ( aExtension != aLibExtension && aExtension != aContExtension )
@@ -929,7 +930,7 @@ void LibPage::InsertLib()
{
SvLBoxEntry* pEntry = pLibDlg->GetLibBox().GetEntry( nLib );
DBG_ASSERT( pEntry, "Entry?!" );
::rtl::OUString aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) );
OUString aLibName( pLibDlg->GetLibBox().GetEntryText( pEntry, 0 ) );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
@@ -950,9 +951,9 @@ void LibPage::InsertLib()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && xModLibContainer->isLibraryReadOnly( aLibName ) && !xModLibContainer->isLibraryLink( aLibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{
::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
OUString aErrStr( IDE_RESSTR(RID_STR_REPLACELIB) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
aErrStr += OUString( "\n" );
aErrStr += IDE_RESSTR(RID_STR_LIBISREADONLY);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -963,13 +964,13 @@ void LibPage::InsertLib()
}
else
{
::rtl::OUString aErrStr;
OUString aErrStr;
if ( bReference )
aErrStr = IDE_RESSTR(RID_STR_REFNOTPOSSIBLE);
else
aErrStr = IDE_RESSTR(RID_STR_IMPORTNOTPOSSIBLE);
aErrStr = aErrStr.replaceAll("XX", aLibName);
aErrStr += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n"));
aErrStr += "\n" ;
aErrStr += IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -978,7 +979,7 @@ void LibPage::InsertLib()
// check, if the library is password protected
bool bOK = false;
::rtl::OUString aPassword;
OUString aPassword;
if ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) )
{
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
@@ -988,7 +989,7 @@ void LibPage::InsertLib()
if ( !bOK )
{
::rtl::OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
OUString aErrStr( IDE_RESSTR(RID_STR_NOIMPORT) );
aErrStr = aErrStr.replaceAll("XX", aLibName);
ErrorBox( this, WB_OK | WB_DEF_OK, aErrStr ).Execute();
continue;
@@ -1028,7 +1029,7 @@ void LibPage::InsertLib()
aModStorageURLObj.setExtension( aLibExtension );
aModStorageURLObj.setFinalSlash();
}
::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY);
@@ -1051,12 +1052,12 @@ void LibPage::InsertLib()
xModLibContImport->loadLibrary( aLibName );
// copy all modules
Sequence< ::rtl::OUString > aModNames = xModLibImport->getElementNames();
Sequence< OUString > aModNames = xModLibImport->getElementNames();
sal_Int32 nModCount = aModNames.getLength();
const ::rtl::OUString* pModNames = aModNames.getConstArray();
const OUString* pModNames = aModNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nModCount ; i++ )
{
::rtl::OUString aModName( pModNames[ i ] );
OUString aModName( pModNames[ i ] );
Any aElement_ = xModLibImport->getByName( aModName );
xModLib->insertByName( aModName, aElement_ );
}
@@ -1069,8 +1070,8 @@ void LibPage::InsertLib()
{
try
{
::rtl::OUString _aPassword( aPassword );
xPasswd->changeLibraryPassword( aLibName, ::rtl::OUString(), _aPassword );
OUString _aPassword( aPassword );
xPasswd->changeLibraryPassword( aLibName, OUString(), _aPassword );
}
catch (...)
{
@@ -1097,7 +1098,7 @@ void LibPage::InsertLib()
aDlgStorageURLObj.setExtension( aLibExtension );
aDlgStorageURLObj.setFinalSlash();
}
::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link
xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY);
@@ -1120,12 +1121,12 @@ void LibPage::InsertLib()
xDlgLibContImport->loadLibrary( aLibName );
// copy all dialogs
Sequence< ::rtl::OUString > aDlgNames = xDlgLibImport->getElementNames();
Sequence< OUString > aDlgNames = xDlgLibImport->getElementNames();
sal_Int32 nDlgCount = aDlgNames.getLength();
const ::rtl::OUString* pDlgNames = aDlgNames.getConstArray();
const OUString* pDlgNames = aDlgNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nDlgCount ; i++ )
{
::rtl::OUString aDlgName( pDlgNames[ i ] );
OUString aDlgName( pDlgNames[ i ] );
Any aElement_ = xDlgLibImport->getByName( aDlgName );
xDlgLib->insertByName( aDlgName, aElement_ );
}
@@ -1161,7 +1162,7 @@ void LibPage::Export( void )
String aLibName( aLibBox.GetEntryText( pCurEntry, 0 ) );
// Password verification
::rtl::OUString aOULibName( aLibName );
OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
@@ -1172,7 +1173,7 @@ void LibPage::Export( void )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOULibName ) && !xPasswd->isLibraryPasswordVerified( aOULibName ) )
{
::rtl::OUString aPassword;
OUString aPassword;
Reference< script::XLibraryContainer > xModLibContainer1( xModLibContainer, UNO_QUERY );
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
}
@@ -1200,7 +1201,7 @@ void LibPage::Export( void )
void LibPage::implExportLib( const String& aLibName, const String& aTargetURL,
const Reference< task::XInteractionHandler >& Handler )
{
::rtl::OUString aOULibName( aLibName );
OUString aOULibName( aLibName );
Reference< script::XLibraryContainerExport > xModLibContainerExport
( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainerExport > xDlgLibContainerExport
@@ -1253,27 +1254,22 @@ void LibPage::ExportAsPackage( const String& aLibName )
{
// file open dialog
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< task::XInteractionHandler > xHandler;
Reference< XSimpleFileAccess2 > xSFA;
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
Reference< XSimpleFileAccess2 > xSFA = SimpleFileAccess::create(xContext);
Reference < XFilePicker > xFP;
if( xMSF.is() )
{
xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance
( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY );
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
"com.sun.star.ui.dialogs.FilePicker", aServiceType ), UNO_QUERY );
xSFA = SimpleFileAccess::create(comphelper::getProcessComponentContext());
Sequence <Any> aServiceType(1);
aServiceType[0] <<= TemplateDescription::FILESAVE_SIMPLE;
xFP = Reference< XFilePicker >( xMSF->createInstanceWithArguments(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" ) ), aServiceType ), UNO_QUERY );
}
xFP->setTitle( String( IDEResId( RID_STR_EXPORTPACKAGE ) ) );
// filter
::rtl::OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) );
::rtl::OUString aFilter;
aFilter = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "*.oxt" ) ); // library files
OUString aTitle = String( IDEResId( RID_STR_PACKAGE_BUNDLE ) );
OUString aFilter;
aFilter = "*.oxt" ; // library files
Reference< XFilterManager > xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( aTitle, aFilter );
@@ -1294,12 +1290,12 @@ void LibPage::ExportAsPackage( const String& aLibName )
{
GetExtraData()->SetAddLibPath(xFP->getDisplayDirectory());
Sequence< ::rtl::OUString > aFiles = xFP->getFiles();
Sequence< OUString > aFiles = xFP->getFiles();
INetURLObject aURL( aFiles[0] );
if( aURL.getExtension().isEmpty() )
aURL.setExtension( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "oxt" ) ) );
aURL.setExtension( "oxt" );
::rtl::OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
OUString aPackageURL( aURL.GetMainURL( INetURLObject::NO_DECODE ) );
String aTmpPath = SvtPathOptions().GetTempPath();
INetURLObject aInetObj( aTmpPath );
@@ -1311,12 +1307,15 @@ void LibPage::ExportAsPackage( const String& aLibName )
implExportLib( aLibName, aTmpPath, xDummyHandler );
Reference< XCommandEnvironment > xCmdEnv =
static_cast<XCommandEnvironment*>( new OLibCommandEnvironment( xHandler ) );
static_cast<XCommandEnvironment*>(
new OLibCommandEnvironment(
Reference< task::XInteractionHandler >(
xHandler, UNO_QUERY ) ) );
::ucbhelper::Content sourceContent( aSourcePath, xCmdEnv, comphelper::getProcessComponentContext() );
::rtl::OUStringBuffer buf;
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
OUStringBuffer buf;
buf.appendAscii( "vnd.sun.star.zip://" );
buf.append( ::rtl::Uri::encode( aPackageURL,
rtl_UriCharClassRegName,
rtl_UriEncodeIgnoreEscapes,
@@ -1333,7 +1332,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
OUString(), NameClash::OVERWRITE );
INetURLObject aMetaInfInetObj( aTmpPath );
aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ),
aMetaInfInetObj.insertName( "META-INF",
true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE );
if( xSFA->exists( aMetaInfFolder ) )
@@ -1341,16 +1340,15 @@ void LibPage::ExportAsPackage( const String& aLibName )
xSFA->createFolder( aMetaInfFolder );
::std::vector< Sequence<beans::PropertyValue> > manifest;
const OUString strMediaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) );
const OUString strFullPath = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FullPath" ) );
const OUString strBasicMediaType = ::rtl::OUString
( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.sun.star.basic-library" ) );
const OUString strMediaType = "MediaType" ;
const OUString strFullPath = "FullPath" ;
const OUString strBasicMediaType = "application/vnd.sun.star.basic-library" ;
Sequence<beans::PropertyValue> attribs( 2 );
beans::PropertyValue * pattribs = attribs.getArray();
pattribs[ 0 ].Name = strFullPath;
OUString fullPath = aLibName;
fullPath += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/") );
fullPath += "/" ;
pattribs[ 0 ].Value <<= fullPath;
pattribs[ 1 ].Name = strMediaType;
pattribs[ 1 ].Value <<= strBasicMediaType;
@@ -1364,7 +1362,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
xPipe, Sequence< Sequence<beans::PropertyValue> >(
&manifest[ 0 ], manifest.size() ) );
aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "manifest.xml" ) ),
aMetaInfInetObj.insertName( "manifest.xml",
true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL );
// write buffered pipe data to content:
@@ -1387,16 +1385,10 @@ void LibPage::ExportAsBasic( const String& aLibName )
{
// Folder picker
Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() );
Reference< XFolderPicker > xFolderPicker;
Reference< task::XInteractionHandler > xHandler;
if( xMSF.is() )
{
xFolderPicker = Reference< XFolderPicker >( xMSF->createInstance(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) ) ), UNO_QUERY );
xHandler = Reference< task::XInteractionHandler >( xMSF->createInstance
( DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ), UNO_QUERY );
}
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference< XFolderPicker > xFolderPicker( xMSF->createInstance(
"com.sun.star.ui.dialogs.FolderPicker" ), UNO_QUERY );
Reference< task::XInteractionHandler2 > xHandler( task::InteractionHandler::createWithParent(xContext, 0) );
if( xFolderPicker.is() )
{
@@ -1430,7 +1422,7 @@ void LibPage::DeleteCurrent()
// check, if library is link
bool bIsLibraryLink = false;
::rtl::OUString aOULibName( aLibName );
OUString aOULibName( aLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
Reference< script::XLibraryContainer2 > xDlgLibContainer( m_aCurDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryLink( aOULibName ) ) ||
@@ -1454,7 +1446,7 @@ void LibPage::DeleteCurrent()
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
xDlgLibContainer->removeLibrary( aOULibName );
static_cast<SvLBox&>(aLibBox).GetModel()->Remove( pCurEntry );
static_cast<SvTreeListBox&>(aLibBox).GetModel()->Remove( pCurEntry );
MarkDocumentModified( m_aCurDocument );
}
}
@@ -1515,9 +1507,9 @@ void LibPage::SetCurLib()
aLibBox.Clear();
// get a sorted list of library names
Sequence< ::rtl::OUString > aLibNames = aDocument.getLibraryNames();
Sequence< OUString > aLibNames = aDocument.getLibraryNames();
sal_Int32 nLibCount = aLibNames.getLength();
const ::rtl::OUString* pLibNames = aLibNames.getConstArray();
const OUString* pLibNames = aLibNames.getConstArray();
for ( sal_Int32 i = 0 ; i < nLibCount ; i++ )
{
@@ -1526,7 +1518,7 @@ void LibPage::SetCurLib()
ImpInsertLibEntry( aLibName, i );
}
SvLBoxEntry* pEntry_ = aLibBox.FindEntry( rtl::OUString("Standard") );
SvLBoxEntry* pEntry_ = aLibBox.FindEntry( OUString( "Standard" ) );
if ( !pEntry_ )
pEntry_ = aLibBox.GetEntry( 0 );
aLibBox.SetCurEntry( pEntry_ );
@@ -1540,7 +1532,7 @@ SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos
{
// check, if library is password protected
bool bProtected = false;
::rtl::OUString aOULibName( rLibName );
OUString aOULibName( rLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{
@@ -1583,7 +1575,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create library name
String aLibName;
String aLibStdName( String( RTL_CONSTASCII_USTRINGPARAM( "Library" ) ) );
String aLibStdName( String( "Library" ) );
//String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) );
bool bValid = false;
sal_uInt16 i = 1;
@@ -1635,7 +1627,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create a module
String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
::rtl::OUString sModuleCode;
OUString sModuleCode;
if ( !rDocument.createModule( aLibName, aModName, true, sModuleCode ) )
throw Exception();
+1 -1
View File
@@ -36,7 +36,7 @@ using namespace ::com::sun::star::lang;
extern "C" {
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplementationName,
SAL_DLLPUBLIC_EXPORT void* SAL_CALL basctl_component_getFactory( const sal_Char* pImplementationName,
void* pServiceManager,
void* pRegistryKey )
{
+5 -5
View File
@@ -677,7 +677,7 @@ void implCopyStreamToByteSequence( Reference< XInputStream > xStream,
sal_Int32 nPos = bytes.getLength();
bytes.realloc( nPos + nRead );
::rtl_copyMemory( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead );
memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead );
}
}
@@ -810,8 +810,8 @@ void DlgEditor::Copy()
pCombinedData[i] = sal_Int8( n & 0xff );
n >>= 8;
}
::rtl_copyMemory( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen );
::rtl_copyMemory( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen );
memcpy( pCombinedData + 4, DialogModelBytes.getConstArray(), nDialogDataLen );
memcpy( pCombinedData + nResOffset, aResData.getConstArray(), nResDataLen );
Any aCombinedDataAny;
aCombinedDataAny <<= aCombinedData;
@@ -905,10 +905,10 @@ void DlgEditor::Paste()
sal_Int32 nDialogDataLen = nTotalLen - nResDataLen - 4;
DialogModelBytes.realloc( nDialogDataLen );
::rtl_copyMemory( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen );
memcpy( DialogModelBytes.getArray(), pCombinedData + 4, nDialogDataLen );
aResData.realloc( nResDataLen );
::rtl_copyMemory( aResData.getArray(), pCombinedData + nResOffset, nResDataLen );
memcpy( aResData.getArray(), pCombinedData + nResOffset, nResDataLen );
}
else
{
+31 -31
View File
@@ -50,7 +50,7 @@ class DialogWindow;
#define LINE_SEP 0x0A
// Implementation: baside2b.cxx
sal_Int32 searchEOL( const ::rtl::OUString& rStr, sal_Int32 fromIndex );
sal_Int32 searchEOL( const OUString& rStr, sal_Int32 fromIndex );
// Meaning of bToBeKilled:
// While being in a reschedule-loop, I may not destroy the window.
@@ -155,8 +155,8 @@ private:
int nStatus;
ScriptDocument m_aDocument;
rtl::OUString m_aLibName;
rtl::OUString m_aName;
OUString m_aLibName;
OUString m_aName;
friend class ModulWindow;
friend class DialogWindow;
@@ -166,7 +166,7 @@ protected:
public:
TYPEINFO();
BaseWindow( Window* pParent, const ScriptDocument& rDocument, ::rtl::OUString aLibName, ::rtl::OUString aName );
BaseWindow( Window* pParent, const ScriptDocument& rDocument, OUString aLibName, OUString aName );
virtual ~BaseWindow();
void Init();
@@ -192,8 +192,8 @@ public:
// print page
virtual void printPage( sal_Int32 nPage, Printer* pPrinter ) = 0;
virtual ::rtl::OUString GetTitle();
::rtl::OUString CreateQualifiedName();
virtual OUString GetTitle();
OUString CreateQualifiedName();
virtual EntryDescriptor CreateEntryDescriptor() = 0;
virtual bool IsModified();
@@ -223,16 +223,16 @@ public:
GetDocument() const { return m_aDocument; }
void SetDocument( const ScriptDocument& rDocument ) { m_aDocument = rDocument; }
bool IsDocument( const ScriptDocument& rDocument ) const { return rDocument == m_aDocument; }
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
void SetLibName( const ::rtl::OUString& aLibName ) { m_aLibName = aLibName; }
const ::rtl::OUString& GetName() const { return m_aName; }
void SetName( const ::rtl::OUString& aName ) { m_aName = aName; }
const OUString& GetLibName() const { return m_aLibName; }
void SetLibName( const OUString& aLibName ) { m_aLibName = aLibName; }
const OUString& GetName() const { return m_aName; }
void SetName( const OUString& aName ) { m_aName = aName; }
virtual void OnNewDocument ();
virtual char const* GetHid () const = 0;
virtual ItemType GetType () const = 0;
void InsertLibInfo () const;
bool Is (ScriptDocument const&, rtl::OUString const&, rtl::OUString const&, ItemType, bool bFindSuspended);
bool Is (ScriptDocument const&, OUString const&, OUString const&, ItemType, bool bFindSuspended);
virtual bool HasActiveEditor () const;
};
@@ -244,19 +244,19 @@ public:
LibInfos ();
~LibInfos ();
public:
void InsertInfo (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType);
void InsertInfo (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType);
void RemoveInfoFor (ScriptDocument const&);
Item const* GetInfo (ScriptDocument const&, rtl::OUString const& rLibName);
Item const* GetInfo (ScriptDocument const&, OUString const& rLibName);
private:
class Key
{
private:
ScriptDocument m_aDocument;
::rtl::OUString m_aLibName;
OUString m_aLibName;
public:
Key (ScriptDocument const&, rtl::OUString const& rLibName);
Key (ScriptDocument const&, OUString const& rLibName);
~Key ();
public:
bool operator == (Key const&) const;
@@ -266,24 +266,24 @@ private:
};
public:
const ScriptDocument& GetDocument() const { return m_aDocument; }
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
const OUString& GetLibName() const { return m_aLibName; }
};
public:
class Item
{
private:
ScriptDocument m_aDocument;
::rtl::OUString m_aLibName;
::rtl::OUString m_aCurrentName;
OUString m_aLibName;
OUString m_aCurrentName;
ItemType m_eCurrentType;
public:
Item (ScriptDocument const&, rtl::OUString const& rLibName, rtl::OUString const& rCurrentName, ItemType eCurrentType);
Item (ScriptDocument const&, OUString const& rLibName, OUString const& rCurrentName, ItemType eCurrentType);
~Item ();
public:
const ScriptDocument& GetDocument() const { return m_aDocument; }
const ::rtl::OUString& GetLibName() const { return m_aLibName; }
const ::rtl::OUString& GetCurrentName() const { return m_aCurrentName; }
const OUString& GetLibName() const { return m_aLibName; }
const OUString& GetCurrentName() const { return m_aCurrentName; }
ItemType GetCurrentType() const { return m_eCurrentType; }
};
private:
@@ -291,16 +291,16 @@ private:
Map m_aMap;
};
void CutLines( ::rtl::OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false );
::rtl::OUString CreateMgrAndLibStr( const ::rtl::OUString& rMgrName, const ::rtl::OUString& rLibName );
void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEraseTrailingEmptyLines = false );
OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName );
sal_uLong CalcLineCount( SvStream& rStream );
bool QueryReplaceMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
bool QueryDelMacro( const ::rtl::OUString& rName, Window* pParent = 0 );
bool QueryDelDialog( const ::rtl::OUString& rName, Window* pParent = 0 );
bool QueryDelModule( const ::rtl::OUString& rName, Window* pParent = 0 );
bool QueryDelLib( const ::rtl::OUString& rName, bool bRef = false, Window* pParent = 0 );
bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const ::rtl::OUString& rLibName, ::rtl::OUString& rPassword, bool bRepeat = false, bool bNewTitle = false );
bool QueryReplaceMacro( const OUString& rName, Window* pParent = 0 );
bool QueryDelMacro( const OUString& rName, Window* pParent = 0 );
bool QueryDelDialog( const OUString& rName, Window* pParent = 0 );
bool QueryDelModule( const OUString& rName, Window* pParent = 0 );
bool QueryDelLib( const OUString& rName, bool bRef = false, Window* pParent = 0 );
bool QueryPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::script::XLibraryContainer >& xLibContainer, const OUString& rLibName, OUString& rPassword, bool bRepeat = false, bool bNewTitle = false );
class ModuleInfoHelper
{
@@ -309,8 +309,8 @@ class ModuleInfoHelper
ModuleInfoHelper (const ModuleInfoHelper&);
ModuleInfoHelper& operator = (const ModuleInfoHelper&);
public:
static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName, ::rtl::OUString& rObjName );
static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const ::rtl::OUString& rModName );
static void getObjectName( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName, OUString& rObjName );
static sal_Int32 getModuleType( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& rLib, const OUString& rModName );
};
} // namespace basctl
+1 -1
View File
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
-->
<component loader="com.sun.star.loader.SharedLibrary"
<component loader="com.sun.star.loader.SharedLibrary" prefix="basctl"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.basic.BasicIDE">
<service name="com.sun.star.script.BasicIDE"/>
+3 -2
View File
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <string.h>
#include "basebmp/bitmapdevice.hxx"
#include "basebmp/compositeiterator.hxx"
@@ -47,7 +49,6 @@
#include "intconversion.hxx"
#include <rtl/alloc.h>
#include <rtl/memory.h>
#include <osl/diagnose.h>
#include <basegfx/tools/tools.hxx>
@@ -1892,7 +1893,7 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector&
&rtl_freeMemory );
if (pMem.get() == 0 && nMemSize != 0)
return BitmapDeviceSharedPtr();
rtl_zeroMemory(pMem.get(),nMemSize);
memset(pMem.get(), 0, nMemSize);
}
sal_uInt8* pFirstScanline = nScanlineStride < 0 ?
+2 -2
View File
@@ -30,9 +30,9 @@
#define _BGFX_RASTER_BPIXELRASTER_HXX
#include <algorithm>
#include <string.h>
#include <sal/types.h>
#include <basegfx/pixel/bpixel.hxx>
#include <rtl/memory.h>
#include <basegfx/basegfxdllapi.h>
//////////////////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@ namespace basegfx
// reset
void reset()
{
rtl_zeroMemory(mpContent, sizeof(BPixel) * mnCount);
memset(mpContent, 0, sizeof(BPixel) * mnCount);
}
// constructor/destructor
+2 -3
View File
@@ -30,7 +30,6 @@
#define _BGFX_RASTER_BZPIXELRASTER_HXX
#include <basegfx/raster/bpixelraster.hxx>
#include <rtl/memory.h>
#include <basegfx/basegfxdllapi.h>
//////////////////////////////////////////////////////////////////////////////
@@ -51,7 +50,7 @@ namespace basegfx
void resetZ()
{
reset();
rtl_zeroMemory(mpZBuffer, sizeof(sal_uInt16) * mnCount);
memset(mpZBuffer, 0, sizeof(sal_uInt16) * mnCount);
}
// constructor/destructor
@@ -59,7 +58,7 @@ namespace basegfx
: BPixelRaster(nWidth, nHeight),
mpZBuffer(new sal_uInt16[mnCount])
{
rtl_zeroMemory(mpZBuffer, sizeof(sal_uInt16) * mnCount);
memset(mpZBuffer, 0, sizeof(sal_uInt16) * mnCount);
}
~BZPixelRaster()
+1 -1
View File
@@ -2009,7 +2009,7 @@ uno::Sequence< sal_Int8 > implGetDialogData( SbxObject* pDialog )
uno::Sequence< sal_Int8 > aData( nLen );
sal_Int8* pDestData = aData.getArray();
const sal_Int8* pSrcData = (const sal_Int8*)aMemStream.GetData();
rtl_copyMemory( pDestData, pSrcData, nLen );
memcpy( pDestData, pSrcData, nLen );
return aData;
}
+4 -4
View File
@@ -494,7 +494,7 @@ void clearNativeObjectWrapperVector( void )
GaNativeObjectWrapperVector::get().clear();
}
sal_uInt32 lcl_registerNativeObjectWrapper( SbxObject* pNativeObj )
static sal_uInt32 lcl_registerNativeObjectWrapper( SbxObject* pNativeObj )
{
NativeObjectWrapperVector &rNativeObjectWrapperVector = GaNativeObjectWrapperVector::get();
sal_uInt32 nIndex = rNativeObjectWrapperVector.size();
@@ -502,7 +502,7 @@ sal_uInt32 lcl_registerNativeObjectWrapper( SbxObject* pNativeObj )
return nIndex;
}
SbxObject* lcl_getNativeObject( sal_uInt32 nIndex )
static SbxObject* lcl_getNativeObject( sal_uInt32 nIndex )
{
SbxObjectRef xRetObj;
NativeObjectWrapperVector &rNativeObjectWrapperVector = GaNativeObjectWrapperVector::get();
@@ -4552,7 +4552,7 @@ typedef std::vector< StarBasicDisposeItem* > DisposeItemVector;
static DisposeItemVector GaDisposeItemVector;
DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic )
static DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic )
{
DisposeItemVector::iterator it;
for( it = GaDisposeItemVector.begin() ; it != GaDisposeItemVector.end() ; ++it )
@@ -4564,7 +4564,7 @@ DisposeItemVector::iterator lcl_findItemForBasic( StarBASIC* pBasic )
return GaDisposeItemVector.end();
}
StarBasicDisposeItem* lcl_getOrCreateItemForBasic( StarBASIC* pBasic )
static StarBasicDisposeItem* lcl_getOrCreateItemForBasic( StarBASIC* pBasic )
{
DisposeItemVector::iterator it = lcl_findItemForBasic( pBasic );
StarBasicDisposeItem* pItem = (it != GaDisposeItemVector.end()) ? *it : NULL;
+15 -3
View File
@@ -819,10 +819,22 @@ short SbiConstExpression::GetShortValue()
else
{
double n = nVal;
if( n > 0 ) n += .5; else n -= .5;
if( n > SbxMAXINT ) n = SbxMAXINT, pParser->Error( SbERR_OUT_OF_RANGE );
if( n > 0 )
n += .5;
else
if( n < SbxMININT ) n = SbxMININT, pParser->Error( SbERR_OUT_OF_RANGE );
n -= .5;
if( n > SbxMAXINT )
{
n = SbxMAXINT;
pParser->Error( SbERR_OUT_OF_RANGE );
}
else if( n < SbxMININT )
{
n = SbxMININT;
pParser->Error( SbERR_OUT_OF_RANGE );
}
return (short) n;
}
}
@@ -17,27 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#ifndef _SBDATE_HXX
#define _SBDATE_HXX
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
/* Include this for instantiating bad-cast,
due to problems with WNT-STL-headers.
*/
sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
// If anybody who happens to read this has any idea what dark magic
// this is supposed to achieve, and whether it is needed or in any way
// relevant with MSVC2008 (or eventually newer), please add a
// comment...
#if defined(WNT) && !defined(__MINGW32__)
#define _NTSDK
#include<typeinfo>
_STD_BEGIN
bad_cast G_Dummy_Inst_bad_cast;
_STD_END
#endif // WNT
sal_Int16 implGetDateYear( double aDate );
sal_Int16 implGetDateMonth( double aDate );
sal_Int16 implGetDateDay( double aDate );
sal_Int16 implGetHour( double dDate );
sal_Int16 implGetMinute( double dDate );
sal_Int16 implGetSecond( double dDate );
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+3 -2
View File
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <string.h>
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/button.hxx>
@@ -435,14 +436,14 @@ sal_uIntPtr UCBStream::GetData( void* pData, sal_uIntPtr nSize )
{
Sequence<sal_Int8> aData;
nSize = xIS->readBytes( aData, nSize );
rtl_copyMemory( pData, aData.getConstArray(), nSize );
memcpy( pData, aData.getConstArray(), nSize );
return nSize;
}
else if( xS.is() && (xISFromS = xS->getInputStream()).is() )
{
Sequence<sal_Int8> aData;
nSize = xISFromS->readBytes( aData, nSize );
rtl_copyMemory( pData, aData.getConstArray(), nSize );
memcpy(pData, aData.getConstArray(), nSize );
return nSize;
}
else
+1 -7
View File
@@ -63,6 +63,7 @@ using namespace com::sun::star;
#include <comphelper/string.hxx>
#include "date.hxx"
#include "stdobj.hxx"
#include <basic/sbstdobj.hxx>
#include "rtlproto.hxx"
@@ -103,9 +104,6 @@ SbxVariable* getDefaultProp( SbxVariable* pRef );
#ifndef DISABLE_SCRIPTING
// forward decl.
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
// from source/classes/sbxmod.cxx
uno::Reference< frame::XModel > getDocumentModel( StarBASIC* );
@@ -1701,8 +1699,6 @@ sal_Int16 implGetDateMonth( double aDate )
return nRet;
}
sal_Int16 implGetDateYear( double aDate );
// Function to convert date to ISO 8601 date format
RTLFUNC(CDateToIso)
{
@@ -1956,8 +1952,6 @@ RTLFUNC(Hour)
}
}
sal_Int16 implGetMinute( double dDate );
RTLFUNC(Minute)
{
(void)pBasic;
+4 -15
View File
@@ -32,6 +32,7 @@
#include <vcl/jobset.hxx>
#include <basic/sbobjmod.hxx>
#include "date.hxx"
#include "sbintern.hxx"
#include "runtime.hxx"
#include "stdobj.hxx"
@@ -57,7 +58,6 @@ using namespace com::sun::star::i18n;
void unoToSbxValue( SbxVariable* pVar, const Any& aValue );
Any sbxToUnoValue( SbxVariable* pVar, const Type& rType, com::sun::star::beans::Property* pUnoProperty = NULL );
sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
static Reference< XCalendar3 > getLocaleCalendar( void )
{
@@ -915,7 +915,7 @@ RTLFUNC(FindPropertyObject)
sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
static sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
sal_Bool bBinary, short nBlockLen, sal_Bool bIsArray )
{
sal_uIntPtr nFPos = pStrm->Tell();
@@ -1001,7 +1001,7 @@ sal_Bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm,
return pStrm->GetErrorCode() ? sal_False : sal_True;
}
sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
static sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
sal_Bool bBinary, short nBlockLen, sal_Bool bIsArray )
{
(void)bBinary;
@@ -1111,7 +1111,7 @@ sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
// nCurDim = 1...n
sal_Bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
static sal_Bool lcl_WriteReadSbxArray( SbxDimArray& rArr, SvStream* pStrm,
sal_Bool bBinary, short nCurDim, short* pOtherDims, sal_Bool bWrite )
{
DBG_ASSERT( nCurDim > 0,"Bad Dim");
@@ -1906,17 +1906,6 @@ IntervalInfo* getIntervalInfo( const String& rStringCode )
return pInfo;
}
// From methods.cxx
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
sal_Int16 implGetDateDay( double aDate );
sal_Int16 implGetDateMonth( double aDate );
sal_Int16 implGetDateYear( double aDate );
sal_Int16 implGetHour( double dDate );
sal_Int16 implGetMinute( double dDate );
sal_Int16 implGetSecond( double dDate );
inline void implGetDayMonthYear( sal_Int16& rnYear, sal_Int16& rnMonth, sal_Int16& rnDay, double dDate )
{
rnDay = implGetDateDay( dDate );
+4 -4
View File
@@ -43,8 +43,8 @@ Reference< XInterface > createComListener( const Any& aControlAny, const ::rtl::
// for a patch forward declaring these methods below makes sense
// but, #FIXME lets really just move the methods to the top
void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType );
void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled );
static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType );
static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled );
SbxVariable* getDefaultProp( SbxVariable* pRef );
@@ -972,7 +972,7 @@ void SbiRuntime::StepREDIMP_ERASE()
refVar->SetType( SbxEMPTY );
}
void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
static void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
{
sal_uInt16 nSavFlags = refVar->GetFlags();
refVar->ResetFlag( SBX_FIXED );
@@ -981,7 +981,7 @@ void lcl_clearImpl( SbxVariableRef& refVar, SbxDataType& eType )
refVar->Clear();
}
void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled )
static void lcl_eraseImpl( SbxVariableRef& refVar, bool bVBAEnabled )
{
SbxDataType eType = refVar->GetType();
if( eType & SbxARRAY )
+1 -7
View File
@@ -39,6 +39,7 @@
#include <svtools/svtools.hrc>
#include "basrid.hxx"
#include "date.hxx"
#include "runtime.hxx"
#include <rtl/strbuf.hxx>
@@ -689,13 +690,6 @@ VbaFormatInfo* getFormatInfo( const String& rFmt )
#define VBAFORMAT_LOWERCASE "<"
#define VBAFORMAT_UPPERCASE ">"
// From methods1.cxx
sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam = false, sal_Int16 nFirstDay = 0 );
// from methods.cxx
sal_Int16 implGetMinute( double dDate );
sal_Int16 implGetDateYear( double aDate );
bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& rdRet );
void SbxValue::Format( XubString& rRes, const XubString* pFmt ) const
{
short nComma = 0;

Some files were not shown because too many files have changed in this diff Show More