diff options
84 files changed, 976 insertions, 856 deletions
diff --git a/Module_tail_build.mk b/Module_tail_build.mk index 9b0dc4c68af3..9cc2d90fb46e 100644 --- a/Module_tail_build.mk +++ b/Module_tail_build.mk @@ -25,6 +25,7 @@ $(eval $(call gb_Module_Module,tail_end)) $(eval $(call gb_Module_add_moduledirs,tail_end,\ + accessibility \ animations \ basctl \ bean \ diff --git a/Repository.mk b/Repository.mk index 6589b669e648..f150adbacc75 100644 --- a/Repository.mk +++ b/Repository.mk @@ -106,6 +106,7 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ PptImporter \ adabas \ adabasui \ + acc \ agg \ analysis \ animcore \ @@ -283,6 +284,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \ dict_zh \ fileacc \ index_data \ + java_uno_accessbridge \ localedata_en \ localedata_es \ localedata_euro \ diff --git a/RepositoryModule_ooo.mk b/RepositoryModule_ooo.mk index 96cea1c7c51f..26f90249258c 100644 --- a/RepositoryModule_ooo.mk +++ b/RepositoryModule_ooo.mk @@ -29,6 +29,7 @@ $(eval $(call gb_Module_Module,ooo)) $(eval $(call gb_Module_add_moduledirs,ooo,\ + accessibility \ animations \ basctl \ basebmp \ diff --git a/accessibility/AllLangResTarget_acc.mk b/accessibility/AllLangResTarget_acc.mk new file mode 100644 index 000000000000..9430b750d5b0 --- /dev/null +++ b/accessibility/AllLangResTarget_acc.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_AllLangResTarget_AllLangResTarget,acc)) + +$(eval $(call gb_AllLangResTarget_set_reslocation,acc,accessibility)) + +$(eval $(call gb_AllLangResTarget_add_srs,acc,\ + acc/res \ +)) + +$(eval $(call gb_SrsTarget_SrsTarget,acc/res)) + +$(eval $(call gb_SrsTarget_set_include,acc/res,\ + $$(INCLUDE) \ + -I$(SRCDIR)/accessibility/inc \ +)) + +$(eval $(call gb_SrsTarget_add_files,acc/res,\ + accessibility/source/helper/accessiblestrings.src \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Jar_accessibility.mk b/accessibility/Jar_accessibility.mk new file mode 100644 index 000000000000..2eb0f726f579 --- /dev/null +++ b/accessibility/Jar_accessibility.mk @@ -0,0 +1,95 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Jar_Jar,java_accessibility)) + +$(eval $(call gb_Jar_add_jars,java_accessibility,\ + $(OUTDIR)/bin/jurt.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/unoil.jar \ +)) + +$(eval $(call gb_Jar_set_packageroot,java_accessibility,org)) + +$(eval $(call gb_Jar_add_sourcefiles,java_accessibility,\ + accessibility/bridge/org/openoffice/java/accessibility/AbstractButton \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleActionImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleComponentImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleEditableTextImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleExtendedState \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleHypertextImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleIconImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleKeyBinding \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleObjectFactory \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleRoleAdapter \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleSelectionImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleStateAdapter \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleTextImpl \ + accessibility/bridge/org/openoffice/java/accessibility/AccessibleValueImpl \ + accessibility/bridge/org/openoffice/java/accessibility/Alert \ + accessibility/bridge/org/openoffice/java/accessibility/Application \ + accessibility/bridge/org/openoffice/java/accessibility/Button \ + accessibility/bridge/org/openoffice/java/accessibility/CheckBox \ + accessibility/bridge/org/openoffice/java/accessibility/ComboBox \ + accessibility/bridge/org/openoffice/java/accessibility/Component \ + accessibility/bridge/org/openoffice/java/accessibility/Container \ + accessibility/bridge/org/openoffice/java/accessibility/DescendantManager \ + accessibility/bridge/org/openoffice/java/accessibility/Dialog \ + accessibility/bridge/org/openoffice/java/accessibility/FocusTraversalPolicy \ + accessibility/bridge/org/openoffice/java/accessibility/Frame \ + accessibility/bridge/org/openoffice/java/accessibility/Icon \ + accessibility/bridge/org/openoffice/java/accessibility/Label \ + accessibility/bridge/org/openoffice/java/accessibility/List \ + accessibility/bridge/org/openoffice/java/accessibility/Menu \ + accessibility/bridge/org/openoffice/java/accessibility/MenuContainer \ + accessibility/bridge/org/openoffice/java/accessibility/MenuItem \ + accessibility/bridge/org/openoffice/java/accessibility/NativeFrame \ + accessibility/bridge/org/openoffice/java/accessibility/Paragraph \ + accessibility/bridge/org/openoffice/java/accessibility/RadioButton \ + accessibility/bridge/org/openoffice/java/accessibility/ScrollBar \ + accessibility/bridge/org/openoffice/java/accessibility/Separator \ + accessibility/bridge/org/openoffice/java/accessibility/Table \ + accessibility/bridge/org/openoffice/java/accessibility/TextComponent \ + accessibility/bridge/org/openoffice/java/accessibility/ToggleButton \ + accessibility/bridge/org/openoffice/java/accessibility/ToolTip \ + accessibility/bridge/org/openoffice/java/accessibility/Tree \ + accessibility/bridge/org/openoffice/java/accessibility/Window \ + accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleEventLog \ + accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleHypertextLog \ + accessibility/bridge/org/openoffice/java/accessibility/logging/XAccessibleTextLog \ +)) + +$(eval $(call gb_Jar_add_generated_sourcefiles,java_accessibility,\ + CustomTarget/accessibility/bridge/org/openoffice/java/accessibility/Build \ +)) + +# Dummy dep. to satisfy make's depsolver: .../classes is created by a +# custom target, so there is no dependency information for it here. +# It also makes sure that the package is built before this jar .-) +$(call gb_Jar_get_target,java_accessibility) :| $(call gb_Package_get_target,accessibility_bridge) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Jar_uno_accessbridge.mk b/accessibility/Jar_uno_accessbridge.mk new file mode 100644 index 000000000000..919e428a5746 --- /dev/null +++ b/accessibility/Jar_uno_accessbridge.mk @@ -0,0 +1,54 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Jar_Jar,java_uno_accessbridge)) + +$(eval $(call gb_Jar_add_jars,java_uno_accessbridge,\ + $(OUTDIR)/bin/java_accessibility.jar \ + $(OUTDIR)/bin/jurt.jar \ + $(OUTDIR)/bin/ridl.jar \ + $(OUTDIR)/bin/unoil.jar \ +)) + +$(eval $(call gb_Jar_set_packageroot,java_uno_accessbridge,org)) + +$(eval $(call gb_Jar_set_manifest,java_uno_accessbridge,$(SRCDIR)/accessibility/bridge/org/openoffice/accessibility/manifest)) + +$(eval $(call gb_Jar_set_jarclasspath,java_uno_accessbridge,\ + $$(JARCLASSPATH) \ +)) + +$(eval $(call gb_Jar_set_componentfile,java_uno_accessbridge,accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge,OOO)) + +$(eval $(call gb_Jar_add_sourcefiles,java_uno_accessbridge,\ + accessibility/bridge/org/openoffice/accessibility/AccessBridge \ + accessibility/bridge/org/openoffice/accessibility/KeyHandler \ + accessibility/bridge/org/openoffice/accessibility/PopupWindow \ + accessibility/bridge/org/openoffice/accessibility/WindowsAccessBridgeAdapter \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk new file mode 100644 index 000000000000..16ff5d8e9d2c --- /dev/null +++ b/accessibility/Library_acc.mk @@ -0,0 +1,126 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,acc)) + +$(eval $(call gb_Library_set_include,acc,\ + $$(INCLUDE) \ + -I$(SRCDIR)/accessibility/inc \ + -I$(SRCDIR)/accessibility/source/inc \ +)) + +$(eval $(call gb_Library_add_api,acc,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Library_add_linked_libs,acc,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + sot \ + svl \ + svt \ + tk \ + tl \ + utl \ + vcl \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,acc,\ + accessibility/source/extended/AccessibleBrowseBox \ + accessibility/source/extended/AccessibleBrowseBoxBase \ + accessibility/source/extended/AccessibleBrowseBoxCheckBoxCell \ + accessibility/source/extended/AccessibleBrowseBoxHeaderBar \ + accessibility/source/extended/AccessibleBrowseBoxHeaderCell \ + accessibility/source/extended/AccessibleBrowseBoxTable \ + accessibility/source/extended/AccessibleBrowseBoxTableBase \ + accessibility/source/extended/AccessibleBrowseBoxTableCell \ + accessibility/source/extended/AccessibleGridControl \ + accessibility/source/extended/AccessibleGridControlBase \ + accessibility/source/extended/AccessibleGridControlHeader \ + accessibility/source/extended/AccessibleGridControlHeaderCell \ + accessibility/source/extended/AccessibleGridControlTable \ + accessibility/source/extended/AccessibleGridControlTableBase \ + accessibility/source/extended/AccessibleGridControlTableCell \ + accessibility/source/extended/AccessibleToolPanelDeck \ + accessibility/source/extended/AccessibleToolPanelDeckTabBar \ + accessibility/source/extended/AccessibleToolPanelDeckTabBarItem \ + accessibility/source/extended/accessiblebrowseboxcell \ + accessibility/source/extended/accessibleeditbrowseboxcell \ + accessibility/source/extended/accessibleiconchoicectrl \ + accessibility/source/extended/accessibleiconchoicectrlentry \ + accessibility/source/extended/accessiblelistbox \ + accessibility/source/extended/accessiblelistboxentry \ + accessibility/source/extended/accessibletabbar \ + accessibility/source/extended/accessibletabbarbase \ + accessibility/source/extended/accessibletabbarpage \ + accessibility/source/extended/accessibletabbarpagelist \ + accessibility/source/extended/accessibletablistbox \ + accessibility/source/extended/accessibletablistboxtable \ + accessibility/source/extended/listboxaccessible \ + accessibility/source/extended/textwindowaccessibility \ + accessibility/source/helper/acc_factory \ + accessibility/source/helper/accresmgr \ + accessibility/source/helper/characterattributeshelper \ + accessibility/source/standard/accessiblemenubasecomponent \ + accessibility/source/standard/accessiblemenucomponent \ + accessibility/source/standard/accessiblemenuitemcomponent \ + accessibility/source/standard/floatingwindowaccessible \ + accessibility/source/standard/vclxaccessiblebox \ + accessibility/source/standard/vclxaccessiblebutton \ + accessibility/source/standard/vclxaccessiblecheckbox \ + accessibility/source/standard/vclxaccessiblecombobox \ + accessibility/source/standard/vclxaccessibledropdowncombobox \ + accessibility/source/standard/vclxaccessibledropdownlistbox \ + accessibility/source/standard/vclxaccessibleedit \ + accessibility/source/standard/vclxaccessiblefixedhyperlink \ + accessibility/source/standard/vclxaccessiblefixedtext \ + accessibility/source/standard/vclxaccessiblelist \ + accessibility/source/standard/vclxaccessiblelistbox \ + accessibility/source/standard/vclxaccessiblelistitem \ + accessibility/source/standard/vclxaccessiblemenu \ + accessibility/source/standard/vclxaccessiblemenubar \ + accessibility/source/standard/vclxaccessiblemenuitem \ + accessibility/source/standard/vclxaccessiblemenuseparator \ + accessibility/source/standard/vclxaccessiblepopupmenu \ + accessibility/source/standard/vclxaccessibleradiobutton \ + accessibility/source/standard/vclxaccessiblescrollbar \ + accessibility/source/standard/vclxaccessiblestatusbar \ + accessibility/source/standard/vclxaccessiblestatusbaritem \ + accessibility/source/standard/vclxaccessibletabcontrol \ + accessibility/source/standard/vclxaccessibletabpage \ + accessibility/source/standard/vclxaccessibletabpagewindow \ + accessibility/source/standard/vclxaccessibletextcomponent \ + accessibility/source/standard/vclxaccessibletextfield \ + accessibility/source/standard/vclxaccessibletoolbox \ + accessibility/source/standard/vclxaccessibletoolboxitem \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Library_java_uno_accessbridge.mk b/accessibility/Library_java_uno_accessbridge.mk new file mode 100644 index 000000000000..d6e008fce51f --- /dev/null +++ b/accessibility/Library_java_uno_accessbridge.mk @@ -0,0 +1,58 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Library_Library,java_uno_accessbridge)) + +$(eval $(call gb_Library_add_package_headers,java_uno_accessbridge,\ + accessibility_bridge_inc \ +)) + +$(eval $(call gb_Library_set_include,java_uno_accessbridge,\ + $$(INCLUDE) \ + -I$(WORKDIR)/CustomTarget/accessibility/bridge/inc \ +)) + +$(eval $(call gb_Library_add_api,java_uno_accessbridge,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Library_add_linked_libs,java_uno_accessbridge,\ + cppu \ + jvmaccess \ + sal \ + salhelper \ + tl \ + vcl \ + $(gb_STDLIBS) \ +)) + +$(eval $(call gb_Library_add_exception_objects,java_uno_accessbridge,\ + accessibility/bridge/source/java/WindowsAccessBridgeAdapter \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/inc/makefile.mk b/accessibility/Makefile index 4d0eb53daa47..7bbbe6c703e6 100644 --- a/accessibility/inc/makefile.mk +++ b/accessibility/Makefile @@ -1,3 +1,4 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- #************************************************************************* # # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -24,16 +25,16 @@ # for a copy of the LGPLv3 License. # #************************************************************************* -PRJ=.. -PRJNAME=accessibility -TARGET=inc +gb_PARTIALBUILD := T +ifeq ($(strip $(SOLARENV)),) +include $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/../solenv/gbuild/source_and_rerun.mk +else -# --- Settings ----------------------------------------------------- +gb_SourceEnvAndRecurse_STAGE=gbuild +include $(SOLARENV)/gbuild/gbuild.mk -.INCLUDE : settings.mk +$(eval $(call gb_Module_make_global_targets,$(shell ls $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/Module*.mk))) -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk +endif +# vim: set noet sw=4 ts=4: diff --git a/accessibility/Module_accessibility.mk b/accessibility/Module_accessibility.mk new file mode 100644 index 000000000000..04ce3461d760 --- /dev/null +++ b/accessibility/Module_accessibility.mk @@ -0,0 +1,47 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Module_Module,accessibility)) + +$(eval $(call gb_Module_add_targets,accessibility,\ + AllLangResTarget_acc \ + Library_acc \ +)) + +ifneq ($(SOLAR_JAVA),) +ifeq ($(OS),WNT) +$(eval $(call gb_Module_add_targets,accessibility,\ + Jar_accessibility \ + Jar_uno_accessbridge \ + Library_java_uno_accessbridge \ + Package_bridge \ + Package_bridge_inc \ +)) +endif +endif + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Package_bridge.mk b/accessibility/Package_bridge.mk new file mode 100644 index 000000000000..44aa98fcb798 --- /dev/null +++ b/accessibility/Package_bridge.mk @@ -0,0 +1,32 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,accessibility_bridge,$(WORKDIR)/CustomTarget/accessibility/bridge)) + +$(eval $(call gb_Package_add_customtarget,accessibility_bridge,accessibility/bridge)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/Package_bridge_inc.mk b/accessibility/Package_bridge_inc.mk new file mode 100644 index 000000000000..78fe99f1988b --- /dev/null +++ b/accessibility/Package_bridge_inc.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +$(eval $(call gb_Package_Package,accessibility_bridge_inc,$(WORKDIR)/CustomTarget/accessibility/bridge/inc)) + +$(eval $(call gb_Package_add_customtarget,accessibility_bridge_inc,accessibility/bridge/source/java)) + +$(eval $(call gb_CustomTarget_add_outdir_dependencies,accessibility/bridge/source/java,\ + $(call gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,java_uno_accessbridge)) \ +)) + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/accessibility/bridge/Makefile b/accessibility/bridge/Makefile new file mode 100644 index 000000000000..9ed435aa7135 --- /dev/null +++ b/accessibility/bridge/Makefile @@ -0,0 +1,52 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +gb_PARTIALBUILD := T + +ifeq ($(PRODUCT),) +DEBUGSWITCH := true +PRODUCTSWITCH := false +else +DEBUGSWITCH := false +PRODUCTSWITCH := true +endif + +org/openoffice/java/accessibility/Build.java : + mkdir -p $(dir $@) && (\ + echo package org.openoffice.java.accessibility\; && \ + echo public class Build \{ && \ + echo public static final boolean DEBUG = $(DEBUGSWITCH)\; && \ + echo public static final boolean PRODUCT = $(PRODUCTSWITCH)\; && \ + echo \} \ + ) > $@ + +.DEFAULT_GOAL := all +.PHONY : all +all : \ + org/openoffice/java/accessibility/Build.java + +# vim: set ts=4 sw=4 et: diff --git a/accessibility/bridge/org/openoffice/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/accessibility/makefile.mk deleted file mode 100755 index 1fa29f5bfcb1..000000000000 --- a/accessibility/bridge/org/openoffice/accessibility/makefile.mk +++ /dev/null @@ -1,62 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJNAME = accessibility -PRJ = ..$/..$/..$/.. -TARGET = java_uno_accessbridge -PACKAGE = org$/openoffice$/accessibility - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -JARFILES = jurt.jar unoil.jar ridl.jar -JAVAFILES = \ - AccessBridge.java \ - KeyHandler.java \ - PopupWindow.java \ - WindowsAccessBridgeAdapter.java - -JAVACLASSFILES= $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class) - -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE -JARCLASSDIRS = $(PACKAGE) org/openoffice/java/accessibility -CUSTOMMANIFESTFILE = manifest - -# --- Targets ------------------------------------------------------ - - -.INCLUDE : target.mk - -ALLTAR : $(MISC)/java_uno_accessbridge.component - -$(MISC)/java_uno_accessbridge.component .ERRREMOVE : \ - $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component - $(XSLTPROC) --nonet --stringparam uri \ - '$(COMPONENTPREFIX_BASIS_JAVA)$(JARTARGET)' -o $@ \ - $(SOLARENV)/bin/createcomponent.xslt java_uno_accessbridge.component diff --git a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java b/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java deleted file mode 100644 index 2f1709acac45..000000000000 --- a/accessibility/bridge/org/openoffice/java/accessibility/AccessibleRelationAdapter.java +++ /dev/null @@ -1,64 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -package org.openoffice.java.accessibility; - -import javax.accessibility.Accessible; -import com.sun.star.accessibility.AccessibleRelation; -import com.sun.star.accessibility.XAccessible; - -/** - */ -public abstract class AccessibleRelationTypeMap { - - final static String[] data = { - null, - javax.accessibility.AccessibleRelation.CONTROLLED_BY, - javax.accessibility.AccessibleRelation.CONTROLLED_BY, - javax.accessibility.AccessibleRelation.CONTROLLER_FOR, - javax.accessibility.AccessibleRelation.CONTROLLER_FOR, - javax.accessibility.AccessibleRelation.LABEL_FOR, - javax.accessibility.AccessibleRelation.LABEL_FOR, - javax.accessibility.AccessibleRelation.LABELED_BY, - javax.accessibility.AccessibleRelation.LABELED_BY, - javax.accessibility.AccessibleRelation.MEMBER_OF, - javax.accessibility.AccessibleRelation.MEMBER_OF - }; - - public static void fillAccessibleRelationSet(javax.accessibility.AccessibleRelationSet s, AccessibleRelation[] relations) { - AccessibleObjectFactory factory = AccessibleObjectFactory.getDefault(); - for(int i=0; i<relations.length; i++) { - if( relations[i].RelationType < data.length && data[relations[i].RelationType] != null ) { - javax.accessibility.AccessibleRelation r = - new javax.accessibility.AccessibleRelation(data[relations[i].RelationType]); - - r.setTarget(factory.getAccessibleObjectSet(relations[i].TargetSet)); - s.add(r); - } - } - } -} diff --git a/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk b/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk deleted file mode 100755 index 0d98760a31df..000000000000 --- a/accessibility/bridge/org/openoffice/java/accessibility/makefile.mk +++ /dev/null @@ -1,115 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJNAME = accessibility -PRJ = ..$/..$/..$/..$/.. -TARGET = java_accessibility -PACKAGE = org$/openoffice$/java$/accessibility - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -JAVADIR = $(OUT)$/misc$/java -JARFILES = jurt.jar unoil.jar ridl.jar -JAVAFILES = \ - logging$/XAccessibleEventLog.java \ - logging$/XAccessibleHypertextLog.java \ - logging$/XAccessibleTextLog.java \ - AbstractButton.java \ - AccessibleActionImpl.java \ - AccessibleComponentImpl.java \ - AccessibleEditableTextImpl.java \ - AccessibleExtendedState.java \ - AccessibleHypertextImpl.java \ - AccessibleIconImpl.java \ - AccessibleKeyBinding.java \ - AccessibleObjectFactory.java \ - AccessibleRoleAdapter.java \ - AccessibleSelectionImpl.java \ - AccessibleStateAdapter.java \ - AccessibleTextImpl.java \ - AccessibleValueImpl.java \ - Alert.java \ - Application.java \ - Button.java \ - CheckBox.java \ - ComboBox.java \ - Component.java \ - Container.java \ - DescendantManager.java \ - Dialog.java \ - FocusTraversalPolicy.java \ - Frame.java \ - Icon.java \ - Label.java \ - List.java \ - Menu.java \ - MenuItem.java \ - MenuContainer.java \ - NativeFrame.java \ - Paragraph.java \ - RadioButton.java \ - ScrollBar.java \ - Separator.java \ - Table.java \ - TextComponent.java \ - ToggleButton.java \ - ToolTip.java \ - Tree.java \ - Window.java - -JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:s/.java//).class) $(CLASSDIR)$/$(PACKAGE)$/Build.class - -JARTARGET = $(TARGET).jar -JARCOMPRESS = TRUE -JARCLASSDIRS = $(PACKAGE) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -# Enable logging in non-product only -.IF "$(PRODUCT)"!="" -DEBUGSWITCH = false -PRODUCTSWITCH = true -.ELSE -PRODUCTSWITCH = false -DEBUGSWITCH = true -.ENDIF - -$(JAVADIR)$/$(PACKAGE)$/%.java: makefile.mk - @@-$(MKDIRHIER) $(JAVADIR)$/$(PACKAGE) - @-echo package org.openoffice.java.accessibility\; > $@ - @-echo public class Build { >> $@ - @-echo public static final boolean DEBUG = $(DEBUGSWITCH)\; >> $@ - @-echo public static final boolean PRODUCT = $(PRODUCTSWITCH)\; >> $@ - @-echo } >> $@ - -$(CLASSDIR)$/$(PACKAGE)$/Build.class : $(JAVADIR)$/$(PACKAGE)$/Build.java - -$(JAVAC) -d $(CLASSDIR) $(JAVADIR)$/$(PACKAGE)$/Build.java - diff --git a/accessibility/bridge/source/java/Makefile b/accessibility/bridge/source/java/Makefile new file mode 100644 index 000000000000..e582dc3efd27 --- /dev/null +++ b/accessibility/bridge/source/java/Makefile @@ -0,0 +1,43 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# Version: MPL 1.1 / GPLv3+ / LGPLv3+ +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License or as specified alternatively below. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# Major Contributor(s): +# Copyright (C) 2011 Red Hat, Inc., David Tardon <dtardon@redhat.com> +# (initial developer) +# +# All Rights Reserved. +# +# For minor contributions see the git repository. +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 3 or later (the "GPLv3+"), or +# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), +# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable +# instead of those above. + +gb_PARTIALBUILD := T +include $(GBUILDDIR)/gbuild.mk + +TARGETDIR := $(WORKDIR)/CustomTarget/accessibility/bridge/inc + +$(TARGETDIR)/WindowsAccessBridgeAdapter.h : + mkdir -p $(dir $@) && \ + cd $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,java_uno_accessbridge)) && \ + javah -classpath . -o $@ org.openoffice.accessibility.WindowsAccessBridgeAdapter + +.DEFAULT_GOAL := all +.PHONY : all +all : \ + $(TARGETDIR)/WindowsAccessBridgeAdapter.h + +# vim: set ts=4 sw=4 et: diff --git a/accessibility/bridge/source/java/makefile.mk b/accessibility/bridge/source/java/makefile.mk deleted file mode 100644 index f010b953e1d5..000000000000 --- a/accessibility/bridge/source/java/makefile.mk +++ /dev/null @@ -1,70 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/..$/.. -PRJNAME=accessibility -TARGET=accessbridge -LIBTARGET=NO -USE_DEFFILE=TRUE -ENABLE_EXCEPTIONS=TRUE -VERSIONOBJ= - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -.IF "$(GUI)"=="WNT" && "$(SOLAR_JAVA)" != "" - -SLOFILES= $(SLO)$/WindowsAccessBridgeAdapter.obj - -SHL1TARGET=java_uno_accessbridge -SHL1IMPLIB=i$(SHL1TARGET) -SHL1STDLIBS=$(VCLLIB) $(TOOLSLIB) $(JVMACCESSLIB) $(CPPULIB) $(SALHELPERLIB) $(SALLIB) -SHL1OBJS=$(SLOFILES) -SHL1VERSIONOBJ= - -DEF1NAME=$(SHL1TARGET) -DEF1EXPORTFILE=exports.dxp - -SHL1HEADER=$(OUT)$/inc$/WindowsAccessBridgeAdapter.h - -.ENDIF # "$(GUI)"=="WNT" && "$(SOLAR_JAVA)" != "" - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - -.IF "$(GUI)"=="WNT" && "$(SOLAR_JAVA)" != "" - -$(SLO)$/WindowsAccessBridgeAdapter.obj : $(SHL1HEADER) - -$(SHL1HEADER) : - javah -classpath $(OUT)$/class -o $(SHL1HEADER) org.openoffice.accessibility.WindowsAccessBridgeAdapter - -.ENDIF # "$(GUI)"=="WNT" && "$(SOLAR_JAVA)" != "" diff --git a/accessibility/prj/build.lst b/accessibility/prj/build.lst index d573077e15ee..681c3d12cbfc 100644 --- a/accessibility/prj/build.lst +++ b/accessibility/prj/build.lst @@ -1,11 +1,3 @@ ac accessibility : TRANSLATIONS:translations tools jurt offapi unoil vcl javaunohelper jvmaccess cppu sal toolkit svtools LIBXSLT:libxslt NULL ac accessibility usr1 - all ac_mkout NULL -ac accessibility\inc nmake - all ac_inc NULL -ac accessibility\bridge\org\openoffice\java\accessibility nmake - w ac_ooja ac_inc NULL -ac accessibility\bridge\org\openoffice\accessibility nmake - w ac_ooa ac_ooja.w ac_inc NULL -ac accessibility\bridge\source\java nmake - w ac_ooan ac_ooa.w ac_inc NULL -ac accessibility\inc get - all ac_inc NULL -ac accessibility\source\helper nmake - all ac_helper ac_inc NULL -ac accessibility\source\standard nmake - all ac_standard ac_helper ac_inc NULL -ac accessibility\source\extended nmake - all ac_extended ac_inc NULL -ac accessibility\util nmake - all ac_util ac_helper ac_standard ac_extended NULL +ac accessibility\prj nmake - all ac_prj NULL diff --git a/accessibility/prj/d.lst b/accessibility/prj/d.lst index 1e47390f93a3..e69de29bb2d1 100644 --- a/accessibility/prj/d.lst +++ b/accessibility/prj/d.lst @@ -1,8 +0,0 @@ -..\%__SRC%\class\java_uno_accessbridge.jar %_DEST%\bin\java_uno_accessbridge.jar -..\%__SRC%\class\java_accessibility.jar %_DEST%\bin\java_accessibility.jar - -..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll -..\%__SRC%\bin\*.res %_DEST%\bin\*.res -..\%__SRC%\lib\lib*.so %_DEST%\lib -..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib -..\%__SRC%\misc\java_uno_accessbridge.component %_DEST%\xml\java_uno_accessbridge.component diff --git a/accessibility/prj/makefile.mk b/accessibility/prj/makefile.mk new file mode 100644 index 000000000000..0997622e00f6 --- /dev/null +++ b/accessibility/prj/makefile.mk @@ -0,0 +1 @@ +.INCLUDE : gbuildbridge.mk diff --git a/accessibility/source/extended/makefile.mk b/accessibility/source/extended/makefile.mk deleted file mode 100755 index 06e5298383ac..000000000000 --- a/accessibility/source/extended/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=accessibility -TARGET=extended - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES=\ - $(SLO)$/AccessibleBrowseBoxCheckBoxCell.obj \ - $(SLO)$/AccessibleBrowseBoxBase.obj \ - $(SLO)$/AccessibleBrowseBox.obj \ - $(SLO)$/AccessibleBrowseBoxTableCell.obj \ - $(SLO)$/AccessibleBrowseBoxHeaderCell.obj \ - $(SLO)$/AccessibleBrowseBoxTableBase.obj \ - $(SLO)$/AccessibleBrowseBoxTable.obj \ - $(SLO)$/AccessibleBrowseBoxHeaderBar.obj \ - $(SLO)$/accessibleiconchoicectrl.obj \ - $(SLO)$/accessibleiconchoicectrlentry.obj \ - $(SLO)$/accessiblelistbox.obj \ - $(SLO)$/accessiblelistboxentry.obj \ - $(SLO)$/accessibletabbarbase.obj \ - $(SLO)$/accessibletabbar.obj \ - $(SLO)$/accessibletabbarpage.obj \ - $(SLO)$/accessibletabbarpagelist.obj \ - $(SLO)$/accessibletablistbox.obj \ - $(SLO)$/accessibletablistboxtable.obj \ - $(SLO)$/listboxaccessible.obj \ - $(SLO)$/accessiblebrowseboxcell.obj \ - $(SLO)$/accessibleeditbrowseboxcell.obj \ - $(SLO)$/textwindowaccessibility.obj \ - $(SLO)$/AccessibleGridControlBase.obj \ - $(SLO)$/AccessibleGridControl.obj \ - $(SLO)$/AccessibleGridControlTableBase.obj \ - $(SLO)$/AccessibleGridControlHeader.obj \ - $(SLO)$/AccessibleGridControlTableCell.obj \ - $(SLO)$/AccessibleGridControlHeaderCell.obj \ - $(SLO)$/AccessibleGridControlTable.obj \ - $(SLO)$/AccessibleToolPanelDeck.obj \ - $(SLO)$/AccessibleToolPanelDeckTabBar.obj \ - $(SLO)$/AccessibleToolPanelDeckTabBarItem.obj - -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - diff --git a/accessibility/source/helper/makefile.mk b/accessibility/source/helper/makefile.mk deleted file mode 100644 index 72284e38f3bc..000000000000 --- a/accessibility/source/helper/makefile.mk +++ /dev/null @@ -1,53 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=accessibility -TARGET=helper - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/acc_factory.obj \ - $(SLO)$/accresmgr.obj \ - $(SLO)$/characterattributeshelper.obj \ - -SRS1NAME=$(TARGET) -SRC1FILES=\ - accessiblestrings.src - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/accessibility/source/standard/makefile.mk b/accessibility/source/standard/makefile.mk deleted file mode 100644 index b79d98f659e5..000000000000 --- a/accessibility/source/standard/makefile.mk +++ /dev/null @@ -1,78 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. - -PRJNAME=accessibility -TARGET=standard - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -SLOFILES= \ - $(SLO)$/accessiblemenubasecomponent.obj \ - $(SLO)$/accessiblemenucomponent.obj \ - $(SLO)$/accessiblemenuitemcomponent.obj \ - $(SLO)$/floatingwindowaccessible.obj \ - $(SLO)$/vclxaccessiblebox.obj \ - $(SLO)$/vclxaccessiblebutton.obj \ - $(SLO)$/vclxaccessiblecheckbox.obj \ - $(SLO)$/vclxaccessiblecombobox.obj \ - $(SLO)$/vclxaccessibledropdowncombobox.obj \ - $(SLO)$/vclxaccessibledropdownlistbox.obj \ - $(SLO)$/vclxaccessibleedit.obj \ - $(SLO)$/vclxaccessiblefixedhyperlink.obj \ - $(SLO)$/vclxaccessiblefixedtext.obj \ - $(SLO)$/vclxaccessiblelist.obj \ - $(SLO)$/vclxaccessiblelistbox.obj \ - $(SLO)$/vclxaccessiblelistitem.obj \ - $(SLO)$/vclxaccessiblemenu.obj \ - $(SLO)$/vclxaccessiblemenubar.obj \ - $(SLO)$/vclxaccessiblemenuitem.obj \ - $(SLO)$/vclxaccessiblemenuseparator.obj \ - $(SLO)$/vclxaccessiblepopupmenu.obj \ - $(SLO)$/vclxaccessibleradiobutton.obj \ - $(SLO)$/vclxaccessiblescrollbar.obj \ - $(SLO)$/vclxaccessiblestatusbar.obj \ - $(SLO)$/vclxaccessiblestatusbaritem.obj \ - $(SLO)$/vclxaccessibletabcontrol.obj \ - $(SLO)$/vclxaccessibletabpage.obj \ - $(SLO)$/vclxaccessibletabpagewindow.obj \ - $(SLO)$/vclxaccessibletextcomponent.obj \ - $(SLO)$/vclxaccessibletextfield.obj \ - $(SLO)$/vclxaccessibletoolbox.obj \ - $(SLO)$/vclxaccessibletoolboxitem.obj - -# --- Targets ------------------------------------------------------ - -.INCLUDE : target.mk - diff --git a/accessibility/util/acc.map b/accessibility/util/acc.map deleted file mode 100644 index b9e53f414df5..000000000000 --- a/accessibility/util/acc.map +++ /dev/null @@ -1,7 +0,0 @@ -UDK_3_0_0 { - global: - getStandardAccessibleFactory; - getSvtAccessibilityComponentFactory; - local: - *; -}; diff --git a/accessibility/util/makefile.mk b/accessibility/util/makefile.mk deleted file mode 100644 index b9f57a8a1170..000000000000 --- a/accessibility/util/makefile.mk +++ /dev/null @@ -1,82 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=.. -PRJNAME=accessibility -TARGET=acc -USE_DEFFILE=TRUE - -# --- Settings ---------------------------------- - -.INCLUDE : settings.mk - -LDUMP=ldump2.exe - -# --- Library ----------------------------------- -# --- acc --------------------------------------- -LIB1TARGET=$(SLB)$/$(PRJNAME).lib -LIB1FILES=\ - $(SLB)$/standard.lib \ - $(SLB)$/extended.lib \ - $(SLB)$/helper.lib - -SHL1TARGET=$(TARGET)$(DLLPOSTFIX) - -SHL1STDLIBS= \ - $(VCLLIB) \ - $(COMPHELPERLIB) \ - $(SOTLIB) \ - $(CPPULIB) \ - $(CPPUHELPERLIB) \ - $(UNOTOOLSLIB) \ - $(TKLIB) \ - $(TOOLSLIB) \ - $(SVTOOLLIB) \ - $(SVLLIB) \ - $(SALLIB) - -SHL1LIBS=$(LIB1TARGET) -SHL1DEPN=$(LIB1TARGET) \ - makefile.mk - - -SHL1VERSIONMAP= $(TARGET).map -SHL1DEF= $(MISC)$/$(SHL1TARGET).def -DEF1NAME= $(SHL1TARGET) - -# === .res file ========================================================== - -RES1FILELIST=\ - $(SRS)$/helper.srs - -RESLIB1NAME=$(TARGET) -RESLIB1SRSFILES=$(RES1FILELIST) - -# --- Targets ---------------------------------- - -.INCLUDE : target.mk - diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index ba66ef052e49..61ad7c188e10 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -82,7 +82,7 @@ namespace abp { ::rtl::OUString sCurrentName(m_aName.GetText()); - if (0 == sCurrentName.getLength()) + if (sCurrentName.isEmpty()) // the name must not be empty return sal_False; diff --git a/extensions/source/abpilot/datasourcehandling.cxx b/extensions/source/abpilot/datasourcehandling.cxx index e099821812e8..2c45e5e8cc7d 100644 --- a/extensions/source/abpilot/datasourcehandling.cxx +++ b/extensions/source/abpilot/datasourcehandling.cxx @@ -153,8 +153,8 @@ namespace abp const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _sName, const ::rtl::OUString& _sURL ) SAL_THROW (( ::com::sun::star::uno::Exception )) { - OSL_ENSURE( _sName.getLength(), "lcl_registerDataSource: invalid name!" ); - OSL_ENSURE( _sURL.getLength(), "lcl_registerDataSource: invalid URL!" ); + OSL_ENSURE( !_sName.isEmpty(), "lcl_registerDataSource: invalid name!" ); + OSL_ENSURE( !_sURL.isEmpty(), "lcl_registerDataSource: invalid URL!" ); try { @@ -573,7 +573,7 @@ namespace abp { SQLException aException; aError >>= aException; - if ( !aException.Message.getLength() ) + if ( aException.Message.isEmpty() ) { // prepend some context info SQLContext aDetailedError; diff --git a/extensions/source/bibliography/bibconfig.cxx b/extensions/source/bibliography/bibconfig.cxx index ee72d16df02b..aed0fbaabc0d 100644 --- a/extensions/source/bibliography/bibconfig.cxx +++ b/extensions/source/bibliography/bibconfig.cxx @@ -194,7 +194,7 @@ BibConfig::BibConfig() : { pAssignmentValues[nFieldIdx++] >>= sTempLogical; pAssignmentValues[nFieldIdx++] >>= sTempReal; - if(sTempLogical.getLength() && sTempReal.getLength()) + if(!(sTempLogical.isEmpty() || sTempReal.isEmpty())) { pMapping->aColumnPairs[nSetMapping].sLogicalColumnName = sTempLogical; pMapping->aColumnPairs[nSetMapping++].sRealColumnName = sTempReal; @@ -290,7 +290,7 @@ void BibConfig::Commit() ClearNodeSet( sPrefix ); while(nFieldAssignment < COLUMN_COUNT && - pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName.getLength()) + !pMapping->aColumnPairs[nFieldAssignment].sLogicalColumnName.isEmpty()) { OUString sSubPrefix(sPrefix); sSubPrefix += C2U("/_"); diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 3ae659d6de38..42b9aa0cf161 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -281,7 +281,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const rtl: m_xDatMan = m_pDatMan; BibDBDescriptor aBibDesc = BibModul::GetConfig()->GetBibliographyURL(); - if(!aBibDesc.sDataSource.getLength()) + if(aBibDesc.sDataSource.isEmpty()) { DBChangeDialogConfig_Impl aConfig; const Sequence<OUString> aSources = aConfig.GetDataSourceNames(); @@ -532,7 +532,7 @@ Sequence< rtl::OUString > BibliographyLoader::getElementNames(void) throw ( Runt do { rtl::OUString sTemp = xIdColumn->getString(); - if (sTemp.getLength() && !xIdColumn->wasNull()) + if (!sTemp.isEmpty() && !xIdColumn->wasNull()) { int nLen = aRet.getLength(); if(nLen == nRealNameCount) diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx index f91faac11c44..5958ba626639 100644 --- a/extensions/source/bibliography/datman.cxx +++ b/extensions/source/bibliography/datman.cxx @@ -922,7 +922,7 @@ Reference< XForm > BibDataManager::createDatabaseForm(BibDBDescriptor& rDesc) if(aTableNameSeq.getLength() > 0) { const ::rtl::OUString* pTableNames = aTableNameSeq.getConstArray(); - if(rDesc.sTableOrQuery.getLength()) + if(!rDesc.sTableOrQuery.isEmpty()) aActiveDataTable = rDesc.sTableOrQuery; else { @@ -1045,7 +1045,7 @@ Sequence< ::rtl::OUString > BibDataManager::getQueryFields() { BibConfig* pConfig = BibModul::GetConfig(); ::rtl::OUString aFieldString = pConfig->getQueryField(); - if(!aFieldString.getLength()) + if(aFieldString.isEmpty()) { Sequence< ::rtl::OUString > aSeq = getQueryFields(); const ::rtl::OUString* pFields = aSeq.getConstArray(); @@ -1063,7 +1063,7 @@ void BibDataManager::startQueryWith(const ::rtl::OUString& rQuery) pConfig->setQueryText( rQuery ); ::rtl::OUString aQueryString; - if(rQuery.getLength()>0) + if(!rQuery.isEmpty()) { aQueryString=aQuoteChar; aQueryString+=getQueryField(); @@ -1538,7 +1538,7 @@ void BibDataManager::SetMeAsUidListener() } } - if(theFieldName.getLength()>0) + if(!theFieldName.isEmpty()) { Reference< XPropertySet > xPropSet; Any aElement; @@ -1582,7 +1582,7 @@ void BibDataManager::RemoveMeAsUidListener() } } - if(theFieldName.getLength()>0) + if(!theFieldName.isEmpty()) { Reference< XPropertySet > xPropSet; Any aElement; @@ -1634,7 +1634,7 @@ void BibDataManager::DispatchDBChangeDialog() const ::rtl::OUString& BibDataManager::GetIdentifierMapping() { - if(!sIdentifierMapping.getLength()) + if(sIdentifierMapping.isEmpty()) { BibConfig* pConfig = BibModul::GetConfig(); BibDBDescriptor aDesc; diff --git a/extensions/source/bibliography/framectr.cxx b/extensions/source/bibliography/framectr.cxx index c645c9af8718..eede2cc92c8e 100644 --- a/extensions/source/bibliography/framectr.cxx +++ b/extensions/source/bibliography/framectr.cxx @@ -450,7 +450,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen else if(aCommand.EqualsAscii("Bib/sdbsource")) { rtl::OUString aURL = pDatMan->CreateDBChangeDialog(pParent); - if(aURL.getLength()) + if(!aURL.isEmpty()) { try { @@ -563,7 +563,7 @@ void BibFrameController_Impl::dispatch(const util::URL& _rURL, const uno::Sequen { FeatureStateEvent aEvent; aEvent.FeatureURL = pObj->aURL; - aEvent.IsEnabled = 0 != pDatMan->getParser()->getFilter().getLength(); + aEvent.IsEnabled = !pDatMan->getParser()->getFilter().isEmpty(); aEvent.Requery = sal_False; aEvent.Source = (XDispatch *) this; pObj->xListener->statusChanged( aEvent ); @@ -755,7 +755,7 @@ void BibFrameController_Impl::addStatusListener( else if (aURL.Path == C2U("Bib/removeFilter") ) { rtl::OUString aFilterStr=pDatMan->getFilter(); - aEvent.IsEnabled = (aFilterStr.getLength() > 0); + aEvent.IsEnabled = !aFilterStr.isEmpty(); } else if(aURL.Path == C2U("Cut")) { @@ -800,7 +800,7 @@ void BibFrameController_Impl::addStatusListener( uno::Any aData = xDataObj->getTransferData( aFlavor ); ::rtl::OUString aText; aData >>= aText; - aEvent.IsEnabled = aText.getLength() > 0; + aEvent.IsEnabled = !aText.isEmpty(); } catch( const uno::Exception& ) { @@ -845,7 +845,7 @@ void BibFrameController_Impl::removeStatusListener( BibStatusDispatch *pObj = aStatusListeners[n]; sal_Bool bFlag=pObj->xListener.is(); if (!bFlag || (pObj->xListener == aObject && - ( !aURL.Complete.getLength() || pObj->aURL.Path == aURL.Path ))) + ( aURL.Complete.isEmpty() || pObj->aURL.Path == aURL.Path ))) { aStatusListeners.DeleteAndDestroy( n ); break; diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index bd2d4a80184d..ba1cb90622c6 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -283,7 +283,7 @@ void BibToolBar::InitListener() util::URL aURL; aURL.Complete = GetItemCommand(nId); - if(!aURL.Complete.getLength()) + if(aURL.Complete.isEmpty()) continue; xTrans->parseStrict( aURL ); @@ -345,7 +345,7 @@ void BibToolBar::SendDispatch(sal_uInt16 nId, const Sequence< PropertyValue >& r uno::Reference< frame::XDispatchProvider > xDSP( xController, UNO_QUERY ); - if( xDSP.is() && aCommand.getLength()) + if( xDSP.is() && !aCommand.isEmpty()) { uno::Reference< lang::XMultiServiceFactory > xMgr = comphelper::getProcessServiceFactory(); @@ -382,7 +382,7 @@ void BibToolBar::Click() if(pDatMan) { OUString sNew = pDatMan->CreateDBChangeDialog(GetParent()); - if(sNew.getLength()) + if(!sNew.isEmpty()) pDatMan->setActiveDataSource(sNew); } CheckItem( nId, sal_False ); diff --git a/extensions/source/config/ldap/ldapaccess.cxx b/extensions/source/config/ldap/ldapaccess.cxx index 30977dd23be4..681c33c40553 100644 --- a/extensions/source/config/ldap/ldapaccess.cxx +++ b/extensions/source/config/ldap/ldapaccess.cxx @@ -163,7 +163,7 @@ void LdapConnection::connectSimple() void LdapConnection::initConnection() throw (ldap::LdapConnectionException) { - if (mLdapDefinition.mServer.getLength() == 0) + if (mLdapDefinition.mServer.isEmpty()) { rtl::OUStringBuffer message ; @@ -230,7 +230,7 @@ void LdapConnection::initConnection() { if (!isValid()) { connectSimple(); } - if (aUser.getLength() == 0) + if (aUser.isEmpty()) { throw lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM diff --git a/extensions/source/config/ldap/ldapuserprofilebe.cxx b/extensions/source/config/ldap/ldapuserprofilebe.cxx index 3f59431ab224..8c9d24702416 100644 --- a/extensions/source/config/ldap/ldapuserprofilebe.cxx +++ b/extensions/source/config/ldap/ldapuserprofilebe.cxx @@ -178,7 +178,7 @@ bool LdapUserProfileBe::getLdapStringParam( xAccess->getByName(aLdapSetting) >>= sParam; aServerParameter = rtl::OUStringToOString(sParam, RTL_TEXTENCODING_ASCII_US); - return aServerParameter.getLength() != 0; + return !aServerParameter.isEmpty(); } //------------------------------------------------------------------------------ void LdapUserProfileBe::setPropertyValue( diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index eb455bc2a624..7263bb67896c 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -285,7 +285,7 @@ namespace dbp try { ::rtl::OUString sCurrentDatasource = m_aDatasource.GetSelectEntry(); - if (sCurrentDatasource.getLength()) + if (!sCurrentDatasource.isEmpty()) { // obtain the DS object Reference< XCompletedConnection > xDatasource; diff --git a/extensions/source/logging/loggerconfig.cxx b/extensions/source/logging/loggerconfig.cxx index cc6ec4f82214..4b3ba34b47b1 100644 --- a/extensions/source/logging/loggerconfig.cxx +++ b/extensions/source/logging/loggerconfig.cxx @@ -183,7 +183,7 @@ namespace logging ::rtl::OUString sServiceName; _rxLoggerSettings->getByName( ::rtl::OUString::createFromAscii( _pServiceNameAsciiNodeName ) ) >>= sServiceName; - if ( sServiceName.getLength() ) + if ( !sServiceName.isEmpty() ) { bool bSuccess = false; if ( aSettings.getLength() ) diff --git a/extensions/source/logging/plaintextformatter.cxx b/extensions/source/logging/plaintextformatter.cxx index 2532650cd1d8..83b64c3a1988 100644 --- a/extensions/source/logging/plaintextformatter.cxx +++ b/extensions/source/logging/plaintextformatter.cxx @@ -148,7 +148,7 @@ namespace logging aLogEntry.appendAscii( buffer ); aLogEntry.appendAscii( " " ); - if ( _rRecord.SourceClassName.getLength() && _rRecord.SourceMethodName.getLength() ) + if ( !(_rRecord.SourceClassName.isEmpty() || _rRecord.SourceMethodName.isEmpty()) ) { aLogEntry.append( _rRecord.SourceClassName ); aLogEntry.appendAscii( "::" ); diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 273c3db220cc..b7957f99a448 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -381,7 +381,7 @@ sal_Bool SoPluginInstance::SetWindow(NSP_HWND hParent, int x, int y, int w, int m_nX = x; m_nY = y; - if (0 == m_sURL.getLength()) + if ( m_sURL.isEmpty() ) return sal_True; if(!mxRemoteMSF.is()) diff --git a/extensions/source/plugin/base/context.cxx b/extensions/source/plugin/base/context.cxx index a0eca244e600..05978fe09cb6 100644 --- a/extensions/source/plugin/base/context.cxx +++ b/extensions/source/plugin/base/context.cxx @@ -130,7 +130,7 @@ void XPluginContext_Impl::getURL(const Reference< ::com::sun::star::plugin::XPlu if( ! xInst.is() ) return; - if( ! target.getLength() ) + if( target.isEmpty() ) { INetURLObject aURL; aURL.SetSmartProtocol( INET_PROT_FILE ); diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx index c14907b5083f..d06c5b808927 100644 --- a/extensions/source/plugin/base/nfuncs.cxx +++ b/extensions/source/plugin/base/nfuncs.cxx @@ -148,7 +148,7 @@ static ::rtl::OString normalizeURL( XPlugin_Impl* plugin, const ::rtl::OString& int nPos; if( ( nPos = aLoadURL.indexOf( "://" ) ) != -1 ) { - if( url.getLength() && (url.getStr()[ 0 ] == '/' || url.indexOf( '/' ) != -1) ) + if( !url.isEmpty() && (url.getStr()[ 0 ] == '/' || url.indexOf( '/' ) != -1) ) { // this means same server but new path nPos = aLoadURL.indexOf( '/', nPos+3 ); @@ -275,7 +275,7 @@ extern "C" { return NPERR_INVALID_INSTANCE_ERROR; OString aLoadURL = normalizeURL( pImpl, url ); - if( !aLoadURL.getLength() ) + if( aLoadURL.isEmpty() ) return NPERR_INVALID_URL; AsynchronousGetURL* pAsync = new AsynchronousGetURL(); diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index c15fb72b077b..fa9798e273f8 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -333,7 +333,7 @@ void XPlugin_Impl::handleSpecialArgs() } } - if( aURL.getLength() ) + if( !aURL.isEmpty() ) { // set new args, old args need not be freed as there were none set m_nArgs = 6; @@ -403,7 +403,7 @@ void XPlugin_Impl::handleSpecialArgs() } } - if( aURL.getLength() ) + if( !aURL.isEmpty() ) { // SRC prependArg( "SRC", OUStringToOString( aURL, m_aEncoding ).getStr() ); @@ -446,7 +446,7 @@ void XPlugin_Impl::modelChanged() destroyInstance(); m_aDescription = fitDescription( getCreationURL() ); - if( !m_aDescription.Mimetype.getLength() ) + if( m_aDescription.Mimetype.isEmpty() ) { m_nProvidingState = PROVIDING_NONE; return; @@ -484,7 +484,7 @@ sal_Bool XPlugin_Impl::setModel( const uno::Reference< com::sun::star::awt::XCon if( ! xPS.is() ) return sal_False; - if( getCreationURL().getLength() ) + if( !getCreationURL().isEmpty() ) { m_xModel = Model; modelChanged(); @@ -527,7 +527,7 @@ void XPlugin_Impl::loadPlugin() #endif if( ! getPluginComm() ) { - if( m_aDescription.PluginName.getLength() ) + if( !m_aDescription.PluginName.isEmpty() ) { #if defined QUARTZ PluginComm* pComm = new MacPluginComm( m_aDescription.Mimetype, @@ -668,7 +668,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, m_nProvidingState = PROVIDING_NOW; OString aMIME; - if( mimetype.getLength() ) + if( !mimetype.isEmpty() ) aMIME = OUStringToOString( mimetype, m_aEncoding ); else aMIME = OUStringToOString( m_aDescription.Mimetype, m_aEncoding ); @@ -693,7 +693,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, if( ! m_pPluginComm ) { loadPlugin(); - if( m_aLastGetUrl.getLength() && m_aLastGetUrl == aURL ) + if( !m_aLastGetUrl.isEmpty() && m_aLastGetUrl == aURL ) { // plugin is pulling data, don't push the same stream; // this complicated method could have been avoided if @@ -706,7 +706,7 @@ sal_Bool XPlugin_Impl::provideNewStream(const OUString& mimetype, if( ! m_pPluginComm ) return sal_False; - if( ! url.getLength() ) + if( url.isEmpty() ) // this is valid if the plugin is supposed to // pull data (via e.g. NPN_GetURL) return sal_True; diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx index 46f64d5ba770..d7d50c97a626 100644 --- a/extensions/source/plugin/unx/unxmgr.cxx +++ b/extensions/source/plugin/unx/unxmgr.cxx @@ -275,7 +275,7 @@ Sequence<PluginDescription> XPluginManager_Impl::impl_getPluginDescriptions() th do { rtl::OString aPath(aSearchPath.getToken(0, ':', nIndex)); - if (aPath.getLength()) + if (!aPath.isEmpty()) { DIR* pDIR = opendir(aPath.getStr()); struct dirent* pDirEnt = NULL; diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx index 7d724bc16f75..7eef06cd62a6 100644 --- a/extensions/source/propctrlr/browserline.cxx +++ b/extensions/source/propctrlr/browserline.cxx @@ -434,7 +434,7 @@ namespace pcr { PushButton& rButton( impl_ensureButton( _bPrimary ) ); - OSL_PRECOND( _rImageURL.getLength(), "OBrowserLine::ShowBrowseButton: use the other version if you don't have an image!" ); + OSL_PRECOND( !_rImageURL.isEmpty(), "OBrowserLine::ShowBrowseButton: use the other version if you don't have an image!" ); Image aImage; impl_getImagesFromURL_nothrow( _rImageURL, aImage ); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index f635ea6bda17..32990026545c 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -1153,7 +1153,7 @@ namespace pcr if ( _rPropertyData.HasPrimaryButton ) { - if ( _rPropertyData.PrimaryButtonImageURL.getLength() ) + if ( !_rPropertyData.PrimaryButtonImageURL.isEmpty() ) rLine.pLine->ShowBrowseButton( _rPropertyData.PrimaryButtonImageURL, true ); else if ( _rPropertyData.PrimaryButtonImage.is() ) rLine.pLine->ShowBrowseButton( Image( _rPropertyData.PrimaryButtonImage ), true ); @@ -1162,7 +1162,7 @@ namespace pcr if ( _rPropertyData.HasSecondaryButton ) { - if ( _rPropertyData.SecondaryButtonImageURL.getLength() ) + if ( !_rPropertyData.SecondaryButtonImageURL.isEmpty() ) rLine.pLine->ShowBrowseButton( _rPropertyData.SecondaryButtonImageURL, false ); else if ( _rPropertyData.SecondaryButtonImage.is() ) rLine.pLine->ShowBrowseButton( Image( _rPropertyData.SecondaryButtonImage ), false ); diff --git a/extensions/source/propctrlr/cellbindinghandler.cxx b/extensions/source/propctrlr/cellbindinghandler.cxx index 1c36c7e47db2..d58c8ae5fa3e 100644 --- a/extensions/source/propctrlr/cellbindinghandler.cxx +++ b/extensions/source/propctrlr/cellbindinghandler.cxx @@ -195,7 +195,7 @@ namespace pcr ::rtl::OUString sControlSource; _rNewValue >>= sControlSource; if ( impl_isSupportedProperty_nothrow( PROPERTY_ID_BOUND_CELL ) ) - _rxInspectorUI->enablePropertyUI( PROPERTY_BOUND_CELL, sControlSource.getLength() == 0 ); + _rxInspectorUI->enablePropertyUI( PROPERTY_BOUND_CELL, sControlSource.isEmpty() ); } break; // case PROPERTY_ID_CONTROLSOURCE diff --git a/extensions/source/propctrlr/cellbindinghelper.cxx b/extensions/source/propctrlr/cellbindinghelper.cxx index 74665f49754b..97471c3ca292 100644 --- a/extensions/source/propctrlr/cellbindinghelper.cxx +++ b/extensions/source/propctrlr/cellbindinghelper.cxx @@ -240,7 +240,7 @@ namespace pcr // get the UNO representation of the address CellAddress aAddress; - if ( !_rAddress.getLength() || !convertStringAddress( _rAddress, aAddress ) ) + if ( _rAddress.isEmpty() || !convertStringAddress( _rAddress, aAddress ) ) return xBinding; return createCellBindingFromAddress( aAddress, _bSupportIntegerExchange ); @@ -252,7 +252,7 @@ namespace pcr Reference< XListEntrySource > xSource; CellRangeAddress aRangeAddress; - if ( !_rAddress.getLength() || !convertStringAddress( _rAddress, aRangeAddress ) ) + if ( _rAddress.isEmpty() || !convertStringAddress( _rAddress, aRangeAddress ) ) return xSource; // create a range object for this address @@ -277,7 +277,7 @@ namespace pcr { try { - if ( _rArgumentName.getLength() ) + if ( !_rArgumentName.isEmpty() ) { NamedValue aArg; aArg.Name = _rArgumentName; diff --git a/extensions/source/propctrlr/eformshelper.cxx b/extensions/source/propctrlr/eformshelper.cxx index 47cb6481994a..db5155b36d7f 100644 --- a/extensions/source/propctrlr/eformshelper.cxx +++ b/extensions/source/propctrlr/eformshelper.cxx @@ -512,34 +512,34 @@ namespace pcr //-------------------------------------------------------------------- Reference< XPropertySet > EFormsHelper::getOrCreateBindingForModel( const ::rtl::OUString& _rTargetModel, const ::rtl::OUString& _rBindingName ) const SAL_THROW(()) { - OSL_ENSURE( _rBindingName.getLength(), "EFormsHelper::getOrCreateBindingForModel: invalid binding name!" ); + OSL_ENSURE( !_rBindingName.isEmpty(), "EFormsHelper::getOrCreateBindingForModel: invalid binding name!" ); return implGetOrCreateBinding( _rTargetModel, _rBindingName ); } //-------------------------------------------------------------------- Reference< XPropertySet > EFormsHelper::implGetOrCreateBinding( const ::rtl::OUString& _rTargetModel, const ::rtl::OUString& _rBindingName ) const SAL_THROW(()) { - OSL_ENSURE( !( !_rTargetModel.getLength() && _rBindingName .getLength() ), "EFormsHelper::implGetOrCreateBinding: no model, but a binding name?" ); + OSL_ENSURE( !( _rTargetModel.isEmpty() && !_rBindingName.isEmpty() ), "EFormsHelper::implGetOrCreateBinding: no model, but a binding name?" ); Reference< XPropertySet > xBinding; try { ::rtl::OUString sTargetModel( _rTargetModel ); // determine the model which the binding should belong to - if ( !sTargetModel.getLength() ) + if ( sTargetModel.isEmpty() ) { ::std::vector< ::rtl::OUString > aModelNames; getFormModelNames( aModelNames ); if ( !aModelNames.empty() ) sTargetModel = *aModelNames.begin(); - OSL_ENSURE( sTargetModel.getLength(), "EFormsHelper::implGetOrCreateBinding: unable to obtain a default model!" ); + OSL_ENSURE( !sTargetModel.isEmpty(), "EFormsHelper::implGetOrCreateBinding: unable to obtain a default model!" ); } Reference< xforms::XModel > xModel( getFormModelByName( sTargetModel ) ); Reference< XNameAccess > xBindingNames( xModel.is() ? xModel->getBindings() : Reference< XSet >(), UNO_QUERY ); if ( xBindingNames.is() ) { // get or create the binding instance - if ( _rBindingName.getLength() ) + if ( !_rBindingName.isEmpty() ) { if ( xBindingNames->hasByName( _rBindingName ) ) OSL_VERIFY( xBindingNames->getByName( _rBindingName ) >>= xBinding ); diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx index 3e8332ebe0df..4b1cbc6ed32e 100644 --- a/extensions/source/propctrlr/eformspropertyhandler.cxx +++ b/extensions/source/propctrlr/eformspropertyhandler.cxx @@ -100,7 +100,7 @@ namespace pcr ::rtl::OUString EFormsPropertyHandler::getModelNamePropertyValue() const { ::rtl::OUString sModelName = m_pHelper->getCurrentFormModelName(); - if ( !sModelName.getLength() ) + if ( sModelName.isEmpty() ) sModelName = m_sBindingLessModelName; return sModelName; } @@ -214,7 +214,7 @@ namespace pcr bool bPreviouslyEmptyModel = !m_pHelper->getCurrentFormModel().is(); Reference< XPropertySet > xNewBinding; - if ( sNewBindingName.getLength() ) + if ( !sNewBindingName.isEmpty() ) // obtain the binding with this name, for the current model xNewBinding = m_pHelper->getOrCreateBindingForModel( getModelNamePropertyValue(), sNewBindingName ); @@ -448,7 +448,7 @@ namespace pcr { nControlType = PropertyControlType::ComboBox; ::rtl::OUString sCurrentModel( getModelNamePropertyValue() ); - if ( sCurrentModel.getLength() ) + if ( !sCurrentModel.isEmpty() ) m_pHelper->getBindingNames( sCurrentModel, aListEntries ); } break; @@ -518,9 +518,9 @@ namespace pcr // the aspect of the binding which the dialog should modify ::rtl::OUString sFacetName( _rPropertyName ); - OSL_ENSURE( xModel.is() && xBinding.is() && sFacetName.getLength(), + OSL_ENSURE( xModel.is() && xBinding.is() && !sFacetName.isEmpty(), "EFormsPropertyHandler::onInteractivePropertySelection: something is missing for the dialog initialization!" ); - if ( !( xModel.is() && xBinding.is() && sFacetName.getLength() ) ) + if ( !( xModel.is() && xBinding.is() && !sFacetName.isEmpty() ) ) return InteractiveSelectionResult_Cancelled; xDialogProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FormModel" ) ), makeAny( xModel ) ); @@ -584,7 +584,7 @@ namespace pcr break; ::rtl::OUString sDataModelName; OSL_VERIFY( _rNewValue >>= sDataModelName ); - sal_Bool bBoundToSomeModel = 0 != sDataModelName.getLength(); + sal_Bool bBoundToSomeModel = !sDataModelName.isEmpty(); _rxInspectorUI->rebuildPropertyUI( PROPERTY_BINDING_NAME ); _rxInspectorUI->enablePropertyUI( PROPERTY_BINDING_NAME, bBoundToSomeModel ); } @@ -592,7 +592,7 @@ namespace pcr case PROPERTY_ID_BINDING_NAME: { - sal_Bool bHaveABinding = ( m_pHelper->getCurrentBindingName().getLength() > 0 ); + sal_Bool bHaveABinding = !m_pHelper->getCurrentBindingName().isEmpty(); _rxInspectorUI->enablePropertyUI( PROPERTY_BIND_EXPRESSION, bHaveABinding ); _rxInspectorUI->enablePropertyUI( PROPERTY_XSD_REQUIRED, bHaveABinding ); _rxInspectorUI->enablePropertyUI( PROPERTY_XSD_RELEVANT, bHaveABinding ); diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx index 1a677dc1aa95..898a971e2816 100644 --- a/extensions/source/propctrlr/eventhandler.cxx +++ b/extensions/source/propctrlr/eventhandler.cxx @@ -261,8 +261,8 @@ namespace pcr ) continue; - if ( ( pAssignedEvent->ScriptCode.getLength() == 0 ) - || ( pAssignedEvent->ScriptType.getLength() == 0 ) + if ( ( pAssignedEvent->ScriptCode.isEmpty() ) + || ( pAssignedEvent->ScriptType.isEmpty() ) ) { OSL_FAIL( "lcl_getAssignedScriptEvent: me thinks this should not happen!" ); @@ -674,7 +674,7 @@ namespace pcr const EventDescription& rEvent = impl_getEventForName_throw( _rPropertyName ); ScriptEventDescriptor aAssignedScript = lcl_getAssignedScriptEvent( rEvent, aAllAssignedEvents ); - OSL_ENSURE( !sNewScriptCode.getLength(), "EventHandler::convertToPropertyValue: cannot convert a non-empty display name!" ); + OSL_ENSURE( sNewScriptCode.isEmpty(), "EventHandler::convertToPropertyValue: cannot convert a non-empty display name!" ); // Usually, there is no possibility for the user to change the content of an event binding directly in the // input field, this instead is done with the macro assignment dialog. // The only exception is the user pressing "DEL" while the control has the focus, in this case, we reset the @@ -701,7 +701,7 @@ namespace pcr (void)_rControlValueType; ::rtl::OUString sScript( aScriptEvent.ScriptCode ); - if ( sScript.getLength() ) + if ( !sScript.isEmpty() ) { // format is: "name (location, language)" try @@ -721,20 +721,20 @@ namespace pcr const ::rtl::OUString sLangParamName( RTL_CONSTASCII_USTRINGPARAM( "language" ) ); const ::rtl::OUString sLanguage = xScriptUri->getParameter( sLangParamName ); - if ( sLocation.getLength() || sLanguage.getLength() ) + if ( !(sLocation.isEmpty() && sLanguage.isEmpty()) ) { aComposeBuffer.appendAscii( " (" ); // location - OSL_ENSURE( sLocation.getLength(), "EventHandler::convertToControlValue: unexpected: no location!" ); - if ( sLocation.getLength() ) + OSL_ENSURE( !sLocation.isEmpty(), "EventHandler::convertToControlValue: unexpected: no location!" ); + if ( !sLocation.isEmpty() ) { aComposeBuffer.append( sLocation ); aComposeBuffer.appendAscii( ", " ); } // language - if ( sLanguage.getLength() ) + if ( !sLanguage.isEmpty() ) { aComposeBuffer.append( sLanguage ); } @@ -799,8 +799,8 @@ namespace pcr // the programmatic name of the listener, to be used as "property" name sListenerClassName = pListeners->getTypeName(); - OSL_ENSURE( sListenerClassName.getLength(), "EventHandler::getSupportedProperties: strange - no listener name ..." ); - if ( !sListenerClassName.getLength() ) + OSL_ENSURE( !sListenerClassName.isEmpty(), "EventHandler::getSupportedProperties: strange - no listener name ..." ); + if ( sListenerClassName.isEmpty() ) continue; // loop through all methods @@ -1165,7 +1165,7 @@ namespace pcr { ::rtl::OUString sScriptCode( _rScriptEvent.ScriptCode ); ::rtl::OUString sScriptType( _rScriptEvent.ScriptType ); - bool bResetScript = ( sScriptCode.getLength() == 0 ); + bool bResetScript = sScriptCode.isEmpty(); sal_Int32 nObjectIndex = impl_getComponentIndexInParent_throw(); Reference< XChild > xChild( m_xComponent, UNO_QUERY_THROW ); @@ -1223,7 +1223,7 @@ namespace pcr try { ::rtl::OUString sScriptCode( _rScriptEvent.ScriptCode ); - bool bResetScript = ( sScriptCode.getLength() == 0 ); + bool bResetScript = sScriptCode.isEmpty(); Reference< XScriptEventsSupplier > xEventsSupplier( m_xComponent, UNO_QUERY_THROW ); Reference< XNameContainer > xEvents( xEventsSupplier->getEvents(), UNO_QUERY_THROW ); diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 1712b7c4cd2b..c977d2899aa0 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -439,7 +439,7 @@ namespace pcr Locale aLocale = pLocale[iLocale]; ::rtl::OUString aResourceStr; - if( aOldPureIdStr.getLength() != 0 ) + if( !aOldPureIdStr.isEmpty() ) { if( xStringResourceManager->hasEntryForIdAndLocale( aOldPureIdStr, aLocale ) ) { @@ -536,7 +536,7 @@ namespace pcr ::rtl::OUString sControlValue; OSL_VERIFY( _rControlValue >>= sControlValue ); - if ( sControlValue.getLength() ) + if ( !sControlValue.isEmpty() ) { Reference< XNameAccess > xDatabaseContext; m_aContext.createComponent( (::rtl::OUString)SERVICE_DATABASE_CONTEXT, xDatabaseContext ); @@ -685,7 +685,7 @@ namespace pcr ::rtl::OUString sDataSource; _rPropertyValue >>= sDataSource; - if ( sDataSource.getLength() ) + if ( !sDataSource.isEmpty() ) { ::svt::OFileNotation aTransformer( sDataSource ); sDataSource = aTransformer.get( ::svt::OFileNotation::N_SYSTEM ); @@ -768,7 +768,7 @@ namespace pcr OSL_VERIFY( _rPropertyValue >>= aFont ); ::rtl::OUStringBuffer displayName; - if ( !aFont.Name.getLength() ) + if ( aFont.Name.isEmpty() ) { displayName.append( String( PcrRes( RID_STR_FONT_DEFAULT ) ) ); } @@ -883,7 +883,7 @@ namespace pcr pProperty->Handle = nPropId; sDisplayName = m_pInfoService->getPropertyTranslation( nPropId ); - if ( !sDisplayName.getLength() ) + if ( sDisplayName.isEmpty() ) continue; sal_uInt32 nPropertyUIFlags = m_pInfoService->getPropertyUIFlags( nPropId ); @@ -1417,9 +1417,9 @@ namespace pcr } } - if ( aDescriptor.PrimaryButtonId.getLength() ) + if ( !aDescriptor.PrimaryButtonId.isEmpty() ) aDescriptor.HasPrimaryButton = sal_True; - if ( aDescriptor.SecondaryButtonId.getLength() ) + if ( !aDescriptor.SecondaryButtonId.isEmpty() ) aDescriptor.HasSecondaryButton = sal_True; bool bIsDataProperty = ( nPropertyUIFlags & PROP_FLAG_DATA_PROPERTY ) != 0; @@ -1608,9 +1608,9 @@ namespace pcr ::rtl::OUString sControlSource; _rNewValue >>= sControlSource; if ( impl_componentHasProperty_throw( PROPERTY_FILTERPROPOSAL ) ) - _rxInspectorUI->enablePropertyUI( PROPERTY_FILTERPROPOSAL, sControlSource.getLength() > 0 ); + _rxInspectorUI->enablePropertyUI( PROPERTY_FILTERPROPOSAL, !sControlSource.isEmpty() ); if ( impl_componentHasProperty_throw( PROPERTY_EMPTY_IS_NULL ) ) - _rxInspectorUI->enablePropertyUI( PROPERTY_EMPTY_IS_NULL, sControlSource.getLength() > 0 ); + _rxInspectorUI->enablePropertyUI( PROPERTY_EMPTY_IS_NULL, !sControlSource.isEmpty() ); aDependentProperties.push_back( PROPERTY_ID_BOUNDCOLUMN ); aDependentProperties.push_back( PROPERTY_ID_SCALEIMAGE ); @@ -1680,7 +1680,7 @@ namespace pcr { ::rtl::OUString sImageURL; OSL_VERIFY( _rNewValue >>= sImageURL ); - _rxInspectorUI->enablePropertyUI( PROPERTY_IMAGEPOSITION, sImageURL.getLength() != 0 ); + _rxInspectorUI->enablePropertyUI( PROPERTY_IMAGEPOSITION, !sImageURL.isEmpty() ); } aDependentProperties.push_back( PROPERTY_ID_SCALEIMAGE ); @@ -1842,7 +1842,7 @@ namespace pcr } sal_Bool bIsEnabled = ( ( eLSType == ListSourceType_VALUELIST ) - || ( sListSource.getLength() == 0 ) + || ( sListSource.isEmpty() ) ); _rxInspectorUI->enablePropertyUI( PROPERTY_STRINGITEMLIST, bIsEnabled ); } @@ -1858,7 +1858,7 @@ namespace pcr OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_LISTSOURCETYPE ) >>= eLSType ); _rxInspectorUI->enablePropertyUI( PROPERTY_BOUNDCOLUMN, - ( sControlSource.getLength() > 0 ) + ( !sControlSource.isEmpty() ) && ( eLSType != ListSourceType_TABLEFIELDS ) && ( eLSType != ListSourceType_VALUELIST ) ); @@ -1877,7 +1877,7 @@ namespace pcr impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sImageURL; _rxInspectorUI->enablePropertyUI( impl_getPropertyNameFromId_nothrow( _nPropId ), - ( sControlSource.getLength() != 0 ) || ( sImageURL.getLength() != 0 ) + ( !sControlSource.isEmpty() ) || ( !sImageURL.isEmpty() ) ); } break; // case PROPERTY_ID_SCALEIMAGE, PROPERTY_ID_SCALE_MODE @@ -1899,7 +1899,7 @@ namespace pcr // then "Input required" does not make sense, too (since there's always an input, even if the control // is empty). _rxInspectorUI->enablePropertyUI( PROPERTY_INPUT_REQUIRED, - ( sControlSource.getLength() != 0 ) && ( !bHasEmptyIsNULL || bEmptyIsNULL ) + ( !sControlSource.isEmpty() ) && ( !bHasEmptyIsNULL || bEmptyIsNULL ) ); } break; @@ -1936,7 +1936,7 @@ namespace pcr // if m_nClassId is 0, then we're inspecting a form. In this case, eButtonType is always // FormButtonType_URL here _rxInspectorUI->enablePropertyUI( PROPERTY_TARGET_FRAME, - ( eButtonType == FormButtonType_URL ) && ( sTargetURL.getLength() > 0 ) + ( eButtonType == FormButtonType_URL ) && ( !sTargetURL.isEmpty() ) ); } break; @@ -2372,7 +2372,7 @@ namespace pcr ::rtl::OUString sObjectName; OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_COMMAND ) >>= sObjectName ); // when there is no command we don't need to ask for columns - if ( sObjectName.getLength() && impl_ensureRowsetConnection_nothrow() ) + if ( !sObjectName.isEmpty() && impl_ensureRowsetConnection_nothrow() ) { ::rtl::OUString aDatabaseName; OSL_VERIFY( xFormSet->getPropertyValue( PROPERTY_DATASOURCE ) >>= aDatabaseName ); @@ -2552,7 +2552,7 @@ namespace pcr Sequence< ::rtl::OUString> aQueryNames = _xQueryNames->getElementNames(); sal_uInt32 nCount = aQueryNames.getLength(); const ::rtl::OUString* pQueryNames = aQueryNames.getConstArray(); - sal_Bool bAdd = _sName.getLength(); + sal_Bool bAdd = !_sName.isEmpty(); for ( sal_uInt32 i=0; i<nCount; i++, ++pQueryNames ) { @@ -2804,7 +2804,7 @@ namespace pcr ::rtl::OUString sCurValue; OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_IMAGE_URL ) >>= sCurValue ); - if ( sCurValue.getLength() != 0 && sCurValue.compareToAscii(GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH(GRAPHOBJ_URLPREFIX) ) != 0 ) + if ( !sCurValue.isEmpty() && sCurValue.compareToAscii(GRAPHOBJ_URLPREFIX, RTL_CONSTASCII_LENGTH(GRAPHOBJ_URLPREFIX) ) != 0 ) { aFileDlg.SetDisplayDirectory( sCurValue ); // TODO: need to set the display directory _and_ the default name @@ -3231,7 +3231,7 @@ namespace pcr m_xBrowserUI = _rxInspectorUI; // disable everything which would affect this property const ::rtl::OUString* pToDisable = xCommandUI->getPropertiesToDisable(); - while ( pToDisable->getLength() ) + while ( !pToDisable->isEmpty() ) { m_xBrowserUI->enablePropertyUIElements( *pToDisable++, PropertyLineElement::All, sal_False ); } @@ -3262,7 +3262,7 @@ namespace pcr throw NullPointerException(); const ::rtl::OUString* pToEnable = xCommandUI->getPropertiesToDisable(); - while ( pToEnable->getLength() ) + while ( !pToEnable->isEmpty() ) { m_xBrowserUI->enablePropertyUIElements( *pToEnable++, PropertyLineElement::All, sal_True ); } @@ -3288,14 +3288,14 @@ namespace pcr // first, we need the name of an existent data source if ( _xFormProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATASOURCE) ) _xFormProperties->getPropertyValue( PROPERTY_DATASOURCE ) >>= sPropertyValue; - bHas = ( sPropertyValue.getLength() != 0 ) || _bAllowEmptyDataSourceName; + bHas = ( !sPropertyValue.isEmpty() ) || _bAllowEmptyDataSourceName; // then, the command should not be empty if ( bHas ) { if ( _xFormProperties->getPropertySetInfo()->hasPropertyByName(PROPERTY_COMMAND) ) _xFormProperties->getPropertyValue( PROPERTY_COMMAND ) >>= sPropertyValue; - bHas = ( sPropertyValue.getLength() != 0 ); + bHas = !sPropertyValue.isEmpty(); } } catch( const Exception& ) diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx index 35d47482f195..1762069c953e 100644 --- a/extensions/source/propctrlr/formlinkdialog.cxx +++ b/extensions/source/propctrlr/formlinkdialog.cxx @@ -181,7 +181,7 @@ namespace pcr ,m_sMasterLabel(_sMasterLabel) { FreeResource(); - if ( _sExplanation.getLength() ) + if ( !_sExplanation.isEmpty() ) m_aExplanation.SetText(_sExplanation); m_aSuggest.SetClickHdl ( LINK( this, FormLinkDialog, OnSuggest ) ); @@ -279,7 +279,7 @@ namespace pcr String sDetailType = getFormDataSourceType( m_xDetailForm ); if ( !sDetailType.Len() ) { - if ( !m_sDetailLabel.getLength() ) + if ( m_sDetailLabel.isEmpty() ) { ::svt::OLocalResourceAccess aStringAccess( PcrRes( RID_DLG_FORMLINKS ), RSC_MODALDIALOG ); m_sDetailLabel = String( PcrRes( STR_DETAIL_FORM ) ); @@ -292,7 +292,7 @@ namespace pcr String sMasterType = getFormDataSourceType( m_xMasterForm ); if ( !sMasterType.Len() ) { - if ( !m_sMasterLabel.getLength() ) + if ( m_sMasterLabel.isEmpty() ) { ::svt::OLocalResourceAccess aStringAccess( PcrRes( RID_DLG_FORMLINKS ), RSC_MODALDIALOG ); m_sMasterLabel = String( PcrRes( STR_MASTER_FORM ) ); @@ -566,7 +566,7 @@ namespace pcr OSL_FAIL( "FormLinkDialog::getExistingRelation: caught an exception!" ); } - return ( _rLeftFields.getLength() > 0 ) && ( _rLeftFields[ 0 ].getLength() > 0 ); + return ( _rLeftFields.getLength() > 0 ) && ( !_rLeftFields[ 0 ].isEmpty() ); } //------------------------------------------------------------------------ diff --git a/extensions/source/propctrlr/genericpropertyhandler.cxx b/extensions/source/propctrlr/genericpropertyhandler.cxx index b9b86a0b3ea9..f593fa0f76d5 100644 --- a/extensions/source/propctrlr/genericpropertyhandler.cxx +++ b/extensions/source/propctrlr/genericpropertyhandler.cxx @@ -275,7 +275,7 @@ namespace pcr if ( aControlValue.hasValue() && !( aControlValue >>= sURL ) ) throw RuntimeException( ::rtl::OUString(), *this ); - if ( !sURL.getLength() ) + if ( sURL.isEmpty() ) return; impl_dispatch_throw( sURL ); diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx index 63cb0e01053c..a2c27fab52f3 100644 --- a/extensions/source/propctrlr/propcontroller.cxx +++ b/extensions/source/propctrlr/propcontroller.cxx @@ -511,7 +511,7 @@ namespace pcr void SAL_CALL OPropertyBrowserController::restoreViewData( const Any& Data ) throw(RuntimeException) { ::rtl::OUString sPageSelection; - if ( ( Data >>= sPageSelection ) && sPageSelection.getLength() ) + if ( ( Data >>= sPageSelection ) && !sPageSelection.isEmpty() ) { m_sPageSelection = sPageSelection; selectPageFromViewData(); @@ -687,9 +687,9 @@ namespace pcr } } - if ( m_sPageSelection.getLength() ) + if ( !m_sPageSelection.isEmpty() ) m_sLastValidPageSelection = m_sPageSelection; - else if ( sOldSelection.getLength() ) + else if ( !sOldSelection.isEmpty() ) m_sLastValidPageSelection = sOldSelection; } @@ -1168,13 +1168,13 @@ namespace pcr _rDescriptor.sName = _rProperty.Name; _rDescriptor.aValue = _rDescriptor.xPropertyHandler->getPropertyValue( _rProperty.Name ); - if ( !_rDescriptor.DisplayName.getLength() ) + if ( _rDescriptor.DisplayName.isEmpty() ) { #ifdef DBG_UTIL ::rtl::OString sMessage( "OPropertyBrowserController::describePropertyLine: handler did not provide a display name for '" ); sMessage += ::rtl::OString( _rProperty.Name.getStr(), _rProperty.Name.getLength(), RTL_TEXTENCODING_ASCII_US ); sMessage += ::rtl::OString( "'!" ); - DBG_ASSERT( _rDescriptor.DisplayName.getLength(), sMessage.getStr() ); + DBG_ASSERT( !_rDescriptor.DisplayName.isEmpty(), sMessage.getStr() ); #endif _rDescriptor.DisplayName = _rProperty.Name; } @@ -1250,7 +1250,7 @@ namespace pcr bool bIsActuatingProperty = impl_isActuatingProperty_nothrow( property->second.Name ); #if OSL_DEBUG_LEVEL > 0 - if ( !aDescriptor.Category.getLength() ) + if ( aDescriptor.Category.isEmpty() ) { ::rtl::OString sMessage( "OPropertyBrowserController::UpdateUI: empty category provided for property '" ); sMessage += ::rtl::OString( property->second.Name.getStr(), property->second.Name.getLength(), osl_getThreadTextEncoding() ); @@ -1320,7 +1320,7 @@ namespace pcr } // activate the previously active page (if possible) - if ( m_sLastValidPageSelection.getLength() ) + if ( !m_sLastValidPageSelection.isEmpty() ) m_sPageSelection = m_sLastValidPageSelection; selectPageFromViewData(); } diff --git a/extensions/source/propctrlr/propertyhandler.cxx b/extensions/source/propctrlr/propertyhandler.cxx index bd5fb556de12..7532c9aead42 100644 --- a/extensions/source/propctrlr/propertyhandler.cxx +++ b/extensions/source/propctrlr/propertyhandler.cxx @@ -417,7 +417,7 @@ namespace pcr } // read the measurement unit from the configuration - if ( sConfigurationLocation.getLength() && sConfigurationProperty.getLength() ) + if ( !(sConfigurationLocation.isEmpty() || sConfigurationProperty.isEmpty()) ) { ::utl::OConfigurationTreeRoot aConfigTree( ::utl::OConfigurationTreeRoot::createWithServiceFactory( m_aContext.getLegacyServiceFactory(), sConfigurationLocation, -1, ::utl::OConfigurationTreeRoot::CM_READONLY ) ); diff --git a/extensions/source/propctrlr/pushbuttonnavigation.cxx b/extensions/source/propctrlr/pushbuttonnavigation.cxx index bebea4585b92..36270fc8adbf 100644 --- a/extensions/source/propctrlr/pushbuttonnavigation.cxx +++ b/extensions/source/propctrlr/pushbuttonnavigation.cxx @@ -297,7 +297,7 @@ namespace pcr { ::rtl::OUString sTargetURL; OSL_VERIFY( getCurrentTargetURL() >>= sTargetURL ); - return sTargetURL.getLength() != 0; + return !sTargetURL.isEmpty(); } //............................................................................ diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 2b740acc204c..e87599c1ceb5 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -216,7 +216,7 @@ namespace pcr ::rtl::OUString sText( getTypedControlWindow()->GetText() ); if ( m_bIsPassword ) { - if ( sText.getLength() ) + if ( !sText.isEmpty() ) aPropValue <<= (sal_Int16)sText.getStr()[0]; } else @@ -829,7 +829,7 @@ namespace pcr ::rtl::OUString sControlValue( getTypedControlWindow()->GetSelectEntry() ); Any aPropValue; - if ( sControlValue.getLength() ) + if ( !sControlValue.isEmpty() ) aPropValue <<= sControlValue; return aPropValue; } diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx index 4cee79747872..b44230ac07cf 100644 --- a/extensions/source/propctrlr/stringrepresentation.cxx +++ b/extensions/source/propctrlr/stringrepresentation.cxx @@ -174,7 +174,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL StringRepresentation::getSupportedSer { sReturn = convertSimpleToString( PropertyValue ); #ifdef DBG_UTIL - if ( !sReturn.getLength() && PropertyValue.hasValue() ) + if ( sReturn.isEmpty() && PropertyValue.hasValue() ) { ::rtl::OString sMessage( "StringRepresentation::convertPropertyValueToStringRepresentation: cannot convert values of type '" ); sMessage += ::rtl::OString( PropertyValue.getValueType().getTypeName().getStr(), PropertyValue.getValueType().getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US ); @@ -219,7 +219,7 @@ uno::Any SAL_CALL StringRepresentation::convertToPropertyValue(const ::rtl::OUSt #if OSL_DEBUG_LEVEL > 0 // could not convert ... - if ( !bCanConvert && ControlValue.getLength() ) + if ( !bCanConvert && !ControlValue.isEmpty() ) { ::rtl::OString sMessage( "StringRepresentation::convertStringRepresentationToPropertyValue: cannot convert into values of type '" ); sMessage += ::rtl::OString( ControlValueType.getTypeName().getStr(), ControlValueType.getTypeName().getLength(), RTL_TEXTENCODING_ASCII_US ); @@ -285,7 +285,7 @@ void SAL_CALL StringRepresentation::initialize(const uno::Sequence< uno::Any > & } } - if ( !sReturn.getLength() ) + if ( sReturn.isEmpty() ) m_xTypeConverter->convertToSimpleType( _rValue, uno::TypeClass_STRING ) >>= sReturn; } catch( const script::CannotConvertException& ) { } @@ -340,7 +340,7 @@ namespace void splitComposedStringToSequence( const ::rtl::OUString& _rComposed, Sequence< ElementType >& _out_SplitUp, const Transformer& _rTransformer ) { _out_SplitUp.realloc( 0 ); - if ( !_rComposed.getLength() ) + if ( _rComposed.isEmpty() ) return; sal_Int32 tokenPos = 0; do @@ -464,7 +464,7 @@ bool StringRepresentation::convertGenericValueToString( const uno::Any& _rValue, uno::Any StringRepresentation::convertStringToSimple( const ::rtl::OUString& _rValue,const uno::TypeClass& _ePropertyType ) { uno::Any aReturn; - if ( m_xTypeConverter.is() && _rValue.getLength() ) + if ( m_xTypeConverter.is() && !_rValue.isEmpty() ) { try { diff --git a/extensions/source/propctrlr/xsdvalidationhelper.cxx b/extensions/source/propctrlr/xsdvalidationhelper.cxx index 67381f4431bb..54988490b004 100644 --- a/extensions/source/propctrlr/xsdvalidationhelper.cxx +++ b/extensions/source/propctrlr/xsdvalidationhelper.cxx @@ -134,7 +134,7 @@ namespace pcr { Reference< XDataType > xDataType; - if ( _rName.getLength() ) + if ( !_rName.isEmpty() ) { Reference< XDataTypeRepository > xRepository = getDataTypeRepository(); if ( xRepository.is() ) @@ -172,7 +172,7 @@ namespace pcr { Reference< XDataType > xValidatedAgainst; - if ( _rName.getLength() ) + if ( !_rName.isEmpty() ) xValidatedAgainst = getDataType( _rName ); if ( xValidatedAgainst.is() ) @@ -295,9 +295,9 @@ namespace pcr try { Reference< XDataTypeRepository > xFromRepository, xToRepository; - if ( _rFromModel.getLength() ) + if ( !_rFromModel.isEmpty() ) xFromRepository = getDataTypeRepository( _rFromModel ); - if ( _rToModel.getLength() ) + if ( !_rToModel.isEmpty() ) xToRepository = getDataTypeRepository( _rToModel ); if ( !xFromRepository.is() || !xToRepository.is() ) diff --git a/extensions/source/update/check/download.cxx b/extensions/source/update/check/download.cxx index c1d4df075742..e56c16cd0eb1 100644 --- a/extensions/source/update/check/download.cxx +++ b/extensions/source/update/check/download.cxx @@ -362,7 +362,7 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl // when rFile is empty, there is no remembered file name. If there is already a file with the // same name ask the user if she wants to resume a download or restart the download - if ( !aFile.getLength() ) + if ( aFile.isEmpty() ) { // GetFileName() rtl::OUString aURL( rURL ); @@ -401,7 +401,7 @@ Download::start(const rtl::OUString& rURL, const rtl::OUString& rFile, const rtl out.DestinationDir = rDestinationDir; out.Handler = m_aHandler; - if( aFile.getLength() > 0 ) + if( !aFile.isEmpty() ) { oslFileError rc = osl_openFile(aFile.pData, &out.FileHandle, osl_File_OpenFlag_Write); diff --git a/extensions/source/update/check/updatecheck.cxx b/extensions/source/update/check/updatecheck.cxx index 66acb883033a..ee04697d3296 100644 --- a/extensions/source/update/check/updatecheck.cxx +++ b/extensions/source/update/check/updatecheck.cxx @@ -95,7 +95,7 @@ rtl::OUString getReleaseNote(const UpdateInfo& rInfo, sal_uInt8 pos, bool autoDo { if( pos == iter->Pos ) { - if( (pos > 2) || !autoDownloadEnabled || ! (iter->URL2.getLength() > 0) ) + if( (pos > 2) || !autoDownloadEnabled || iter->URL2.isEmpty() ) return iter->URL; } else if( (pos == iter->Pos2) && ((1 == iter->Pos) || (2 == iter->Pos)) && autoDownloadEnabled ) @@ -131,7 +131,7 @@ static inline rtl::OUString getBaseInstallation() inline bool isObsoleteUpdateInfo(const rtl::OUString& rBuildId) { - return sal_True != rBuildId.equals(getBuildId()) && rBuildId.getLength() > 0; + return sal_True != rBuildId.equals(getBuildId()) && !rBuildId.isEmpty(); } @@ -806,7 +806,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, rtl::OUString aLocalFileName = aModel.getLocalFileName(); - if( aLocalFileName.getLength() > 0 ) + if( !aLocalFileName.isEmpty() ) { bContinueDownload = true; @@ -853,7 +853,7 @@ UpdateCheck::initialize(const uno::Sequence< beans::NamedValue >& rValues, { // Bring-up release note for position 5 .. const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 5)); - if( aURL.getLength() > 0 ) + if( !aURL.isEmpty() ) showReleaseNote(aURL); // Data is outdated, probably due to installed update @@ -957,7 +957,7 @@ UpdateCheck::install() #if ( defined LINUX || defined SOLARIS ) nFlags = 42; aParameter = getBaseInstallation(); - if( aParameter.getLength() > 0 ) + if( !aParameter.isEmpty() ) osl::FileBase::getSystemPathFromFileURL(aParameter, aParameter); aParameter += UNISTRING(" &"); @@ -1187,7 +1187,7 @@ UpdateCheck::downloadStarted(const rtl::OUString& rLocalFileName, sal_Int64 nFil // Bring-up release note for position 1 .. const rtl::OUString aURL(getReleaseNote(m_aUpdateInfo, 1, aModel->isAutoDownloadEnabled())); - if( aURL.getLength() > 0 ) + if( !aURL.isEmpty() ) showReleaseNote(aURL); } } @@ -1211,7 +1211,7 @@ UpdateCheck::downloadFinished(const rtl::OUString& rLocalFileName) // Bring-up release note for position 2 .. rtl::Reference< UpdateCheckConfig > rModel = UpdateCheckConfig::get( m_xContext ); const rtl::OUString aURL(getReleaseNote(aUpdateInfo, 2, rModel->isAutoDownloadEnabled())); - if( aURL.getLength() > 0 ) + if( !aURL.isEmpty() ) showReleaseNote(aURL); } @@ -1249,7 +1249,7 @@ UpdateCheck::showDialog(bool forceCheck) { osl::ResettableMutexGuard aGuard(m_aMutex); - bool update_found = m_aUpdateInfo.BuildId.getLength() > 0; + bool update_found = !m_aUpdateInfo.BuildId.isEmpty(); bool bSetUIState = ! m_aUpdateHandler.is(); UpdateState eDialogState = UPDATESTATES_COUNT; @@ -1342,7 +1342,7 @@ UpdateCheck::setUpdateInfo(const UpdateInfo& aInfo) std::vector< ReleaseNote >::iterator iter2 = m_aUpdateInfo.ReleaseNotes.begin(); while( iter2 != m_aUpdateInfo.ReleaseNotes.end() ) { - if( ((1 == iter2->Pos) || (2 == iter2->Pos)) && autoDownloadEnabled && (iter2->URL2.getLength() > 0)) + if( ((1 == iter2->Pos) || (2 == iter2->Pos)) && autoDownloadEnabled && !iter2->URL2.isEmpty()) { iter2->URL = iter2->URL2; iter2->URL2 = rtl::OUString(); @@ -1489,7 +1489,7 @@ UpdateCheck::getUIState(const UpdateInfo& rInfo) { UpdateState eUIState = UPDATESTATE_NO_UPDATE_AVAIL; - if( rInfo.BuildId.getLength() > 0 ) + if( !rInfo.BuildId.isEmpty() ) { if( rInfo.Sources[0].IsDirect ) eUIState = UPDATESTATE_UPDATE_AVAIL; @@ -1538,7 +1538,7 @@ UpdateCheck::storeReleaseNote(sal_Int8 nNum, const rtl::OUString &rURL) rc = osl::File::remove( aFilePath ); // don't store empty release notes, but delete old ones - if ( rURL.getLength() == 0 ) + if ( rURL.isEmpty() ) return true; osl::File aFile( aFilePath ); diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx index dd67fe23791e..256199e3bd38 100644 --- a/extensions/source/update/check/updatecheckconfig.cxx +++ b/extensions/source/update/check/updatecheckconfig.cxx @@ -189,7 +189,7 @@ UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const { rtl::OUString aUStr = getStringValue( (aStr + rtl::OString::valueOf(n)).getStr()); - if( aUStr.getLength() > 0 ) + if( !aUStr.isEmpty() ) rInfo.ReleaseNotes.push_back(ReleaseNote((sal_Int8) n, aUStr)); } } @@ -553,7 +553,7 @@ UpdateCheckConfig::getByName( const ::rtl::OUString& aName ) rtl::OUString aStr; aValue >>= aStr; - if( aStr.getLength() == 0 ) + if( aStr.isEmpty() ) aValue = uno::makeAny(getDesktopDirectory()); } @@ -682,7 +682,7 @@ bool UpdateCheckConfig::storeExtensionVersion( const rtl::OUString& rExtensionNa ::rtl::OUString aIgnoredVersion; uno::Any aValue( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); aValue >>= aIgnoredVersion; - if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates + if ( aIgnoredVersion.isEmpty() ) // no version means ignore all updates bNotify = false; else if ( aIgnoredVersion == rVersion ) // the user wanted to ignore this update bNotify = false; @@ -708,7 +708,7 @@ bool UpdateCheckConfig::checkExtensionVersion( const rtl::OUString& rExtensionNa ::rtl::OUString aIgnoredVersion; uno::Any aValue2( uno::Reference< beans::XPropertySet >( m_xIgnoredUpdates->getByName( rExtensionName ), uno::UNO_QUERY_THROW )->getPropertyValue( PROPERTY_VERSION ) ); aValue2 >>= aIgnoredVersion; - if ( aIgnoredVersion.getLength() == 0 ) // no version means ignore all updates + if ( aIgnoredVersion.isEmpty() ) // no version means ignore all updates return false; else if ( aIgnoredVersion == aStoredVersion ) // the user wanted to ignore this update return false; diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx index 439927baa943..2dc19c9e1e61 100644 --- a/extensions/source/update/check/updatehdl.cxx +++ b/extensions/source/update/check/updatehdl.cxx @@ -555,7 +555,7 @@ void UpdateHandler::updateState( UpdateState eState ) setControlProperty( TEXT_STATUS, UNISTRING("Text"), uno::Any( substVariables(msUpdFound) ) ); sText = substVariables(msDownloadWarning); - if ( msDescriptionMsg.getLength() ) + if ( !msDescriptionMsg.isEmpty() ) sText += UNISTRING("\n\n") + msDescriptionMsg; setControlProperty( TEXT_DESCRIPTION, UNISTRING("Text"), uno::Any( sText ) ); @@ -568,7 +568,7 @@ void UpdateHandler::updateState( UpdateState eState ) setControlProperty( TEXT_STATUS, UNISTRING("Text"), uno::Any( substVariables(msUpdFound) ) ); sText = substVariables(msDownloadNotAvail); - if ( msDescriptionMsg.getLength() ) + if ( !msDescriptionMsg.isEmpty() ) sText += UNISTRING("\n\n") + msDescriptionMsg; setControlProperty( TEXT_DESCRIPTION, UNISTRING("Text"), uno::Any( sText ) ); diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx index a20208d4a0a5..bc268e8cab6b 100644 --- a/extensions/source/update/check/updateprotocol.cxx +++ b/extensions/source/update/check/updateprotocol.cxx @@ -64,18 +64,18 @@ getBootstrapData( { rBuildID = UNISTRING( "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ); rtl::Bootstrap::expandMacros( rBuildID ); - if ( ! rBuildID.getLength() ) + if ( rBuildID.isEmpty() ) return false; rInstallSetID = UNISTRING( "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") ":UpdateID}" ); rtl::Bootstrap::expandMacros( rInstallSetID ); - if ( ! rInstallSetID.getLength() ) + if ( rInstallSetID.isEmpty() ) return false; rtl::OUString aValue( UNISTRING( "${$BRAND_BASE_DIR/program/" SAL_CONFIGFILE("version") ":UpdateURL}" ) ); rtl::Bootstrap::expandMacros( aValue ); - if( aValue.getLength() > 0 ) + if( !aValue.isEmpty() ) { rRepositoryList.realloc(1); rRepositoryList[0] = aValue; diff --git a/extensions/source/update/feed/updatefeed.cxx b/extensions/source/update/feed/updatefeed.cxx index a7d70fdd8c83..09a98a76074c 100644 --- a/extensions/source/update/feed/updatefeed.cxx +++ b/extensions/source/update/feed/updatefeed.cxx @@ -359,7 +359,7 @@ UpdateInformationProvider::UpdateInformationProvider( "${${BRAND_BASE_DIR}/program/edition/edition.ini:" "EDITIONNAME}")); rtl::Bootstrap::expandMacros(edition); - if (edition.getLength() != 0) { + if (!edition.isEmpty()) { buf.append(sal_Unicode(' ')); buf.append(edition); } @@ -368,7 +368,7 @@ UpdateInformationProvider::UpdateInformationProvider( xConfigurationProvider, UNISTRING("org.openoffice.Setup/Product"), UNISTRING("ooSetupExtension")) >>= extension; - if (extension.getLength() != 0) { + if (!extension.isEmpty()) { buf.append(sal_Unicode(' ')); buf.append(extension); } @@ -390,7 +390,7 @@ UpdateInformationProvider::UpdateInformationProvider( m_aRequestHeaderList[0].Name = UNISTRING("Accept-Language"); m_aRequestHeaderList[0].Value = getConfigurationItem( xConfigurationProvider, UNISTRING("org.openoffice.Setup/L10N"), UNISTRING("ooLocale") ); - if( aUserAgent.getLength() > 0 ) + if( !aUserAgent.isEmpty() ) { m_aRequestHeaderList.realloc(2); m_aRequestHeaderList[1].Name = UNISTRING("User-Agent"); @@ -608,7 +608,7 @@ UpdateInformationProvider::getUpdateInformationEnumeration( { rtl::OUString aXPathExpression; - if( extensionId.getLength() > 0 ) + if( !extensionId.isEmpty() ) aXPathExpression = UNISTRING("//atom:entry/atom:category[@term=\'") + extensionId + UNISTRING("\']/.."); else aXPathExpression = UNISTRING("//atom:entry"); diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx index 09dacc5da8f7..da90b4b33fa1 100644 --- a/extensions/source/update/ui/updatecheckui.cxx +++ b/extensions/source/update/ui/updatecheckui.cxx @@ -321,7 +321,7 @@ Image UpdateCheckUI::GetBubbleImage( ::rtl::OUString &rURL ) { Image aImage; - if ( maBubbleImageURL.getLength() != 0 ) + if ( !maBubbleImageURL.isEmpty() ) { uno::Reference< lang::XMultiServiceFactory > xServiceManager = ::comphelper::getProcessServiceFactory(); @@ -379,11 +379,11 @@ void UpdateCheckUI::AddMenuBarIcon( SystemWindow *pSysWin, bool bAddEventHdl ) if ( pActiveMBar ) { rtl::OUStringBuffer aBuf; - if( maBubbleTitle.getLength() ) + if( !maBubbleTitle.isEmpty() ) aBuf.append( maBubbleTitle ); - if( maBubbleText.getLength() ) + if( !maBubbleText.isEmpty() ) { - if( maBubbleTitle.getLength() ) + if( !maBubbleTitle.isEmpty() ) aBuf.appendAscii( "\n\n" ); aBuf.append( maBubbleText ); } diff --git a/filter/Jar_XSLTFilter.mk b/filter/Jar_XSLTFilter.mk index d68b3530370d..da798a4f445a 100644 --- a/filter/Jar_XSLTFilter.mk +++ b/filter/Jar_XSLTFilter.mk @@ -26,7 +26,7 @@ $(eval $(call gb_Jar_add_jars,XSLTFilter,\ $(OUTDIR)/bin/juh.jar \ )) -$(call gb_Jar_use_externals,XSLTFilter,saxon) +$(eval $(call gb_Jar_use_externals,XSLTFilter,saxon)) $(eval $(call gb_Jar_set_componentfile,XSLTFilter,filter/source/xsltfilter/XSLTFilter.jar,OOO)) diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index fe829fa4799f..78a7b0cbf925 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -302,9 +302,9 @@ my_components += \ ado \ fop \ fps \ - java_uno_accessbridge \ smplmail \ wininetbe1 \ + component/accessibility/bridge/org/openoffice/accessibility/java_uno_accessbridge \ component/dtrans/source/generic/dtrans \ component/dtrans/util/dnd \ component/dtrans/util/ftransl \ diff --git a/postprocess/prj/build.lst b/postprocess/prj/build.lst index 50f4f60a998d..8088ea040d6f 100644 --- a/postprocess/prj/build.lst +++ b/postprocess/prj/build.lst @@ -1,4 +1,4 @@ -po postprocess :: accessibility BINFILTER:binfilter configmgr CRASHREP:crashrep CT2N:ct2n dtrans embeddedobj embedserv EPM:epm DESKTOP:extensions extras DESKTOP:fpicker HELP:helpcontent2 io LIBRSVG:librsvg ODK:odk officecfg psprint_config remotebridges scaddins scp2 DESKTOP:setup_native sysui testtools ucb UnoControls ure wizards MORE_FONTS:more_fonts DICTIONARIES:dictionaries PYUNO:pyuno readlicense_oo DESKTOP:unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder LANGUAGETOOL:languagetool SDEXT:sdext MYSQLC:mysqlc NLPSOLVER:nlpsolver STLPORT:stlport LIBXSLT:libxslt smoketest tail_build NULL +po postprocess :: BINFILTER:binfilter configmgr CRASHREP:crashrep CT2N:ct2n dtrans embeddedobj embedserv EPM:epm DESKTOP:extensions extras DESKTOP:fpicker HELP:helpcontent2 io LIBRSVG:librsvg ODK:odk officecfg psprint_config remotebridges scaddins scp2 DESKTOP:setup_native sysui testtools ucb UnoControls ure wizards MORE_FONTS:more_fonts DICTIONARIES:dictionaries PYUNO:pyuno readlicense_oo DESKTOP:unodevtools JFREEREPORT:jfreereport REPORTBUILDER:reportbuilder LANGUAGETOOL:languagetool SDEXT:sdext MYSQLC:mysqlc NLPSOLVER:nlpsolver STLPORT:stlport LIBXSLT:libxslt smoketest tail_build NULL po postprocess usr1 - all po_mkout NULL po postprocess\checkxml nmake - all po_checkxml NULL po postprocess\packconfig nmake - all po_packconfig po_checkxml NULL diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx index 1819de247647..df214b07cebc 100644 --- a/sc/inc/tokenarray.hxx +++ b/sc/inc/tokenarray.hxx @@ -104,7 +104,12 @@ public: * @param rPos position of the cell to determine if the reference is in the copied area * @param bRangeName set for range names, range names have special handling for absolute sheet ref + relative col/row ref */ - void ReadjusteAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName = false ); + void ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName = false ); + + /** + * Make all absolute references pointing to the copied range if the range is copied too + */ + void AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos ); }; #endif // SC_TOKENARRAY_HXX diff --git a/sc/qa/extras/testdocuments/rangenamessrc.ods b/sc/qa/extras/testdocuments/rangenamessrc.ods Binary files differindex 5559c825efb8..c780aefedfa9 100644 --- a/sc/qa/extras/testdocuments/rangenamessrc.ods +++ b/sc/qa/extras/testdocuments/rangenamessrc.ods diff --git a/sc/qa/extras/xspreadsheets2.cxx b/sc/qa/extras/xspreadsheets2.cxx index b95e555ac9d8..31a59f371c7a 100644 --- a/sc/qa/extras/xspreadsheets2.cxx +++ b/sc/qa/extras/xspreadsheets2.cxx @@ -63,7 +63,7 @@ class ScXSpreadsheets2 : public UnoApiTest CPPUNIT_TEST_SUITE(ScXSpreadsheets2); // disable test, test fails, might be the ongoing copy refs work - //CPPUNIT_TEST(testImportSheet); + CPPUNIT_TEST(testImportSheet); CPPUNIT_TEST_SUITE_END(); }; @@ -154,15 +154,45 @@ void ScXSpreadsheets2::testImportSheet() uno::Reference< sheet::XNamedRange > xSrcNamedRange(aNr, UNO_QUERY_THROW); rtl::OUString aNrSrcContent = xSrcNamedRange->getContent(); - std::cout << "testImportSheet : initial1 aNrDestContent " << aNrDestContent << std::endl; - std::cout << "testImportSheet : initial1 aNrSrcContent " << aNrSrcContent << std::endl; - CPPUNIT_ASSERT_MESSAGE("Sheet name for initial1 has been changed", aNrDestContent.equals(aNrSrcContent)); + std::cout << "testImportSheet : initial1 aNrDestContent " << aNrDestContent << std::endl; // is $Sheet1.$B$1 + std::cout << "testImportSheet : initial1 aNrSrcContent " << aNrSrcContent << std::endl; // is $Sheet1.$B$2 + rtl::OUString aExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$Sheet1.$B$1")); + CPPUNIT_ASSERT_MESSAGE("Sheet name for initial1 has been changed in dest (expected $Sheet1.$B$1) ", aNrDestContent.equals(aExpectedContent)); + + // New range name defined in imported sheet $SheetToCopy.$A$7 + rtl::OUString aNewInSheetNamedRangeString(RTL_CONSTASCII_USTRINGPARAM("InSheetRangeName")); + CPPUNIT_ASSERT_MESSAGE("InSheetRangeName", xDestNamedRangesNameAccess->hasByName(aNewInSheetNamedRangeString)); + + uno::Any aNewInSheetNr = xDestNamedRangesNameAccess->getByName(aNewInSheetNamedRangeString); + uno::Reference< sheet::XNamedRange > xDestNewInSheetNamedRange(aNewInSheetNr, UNO_QUERY_THROW); + rtl::OUString aNewInSheetNrDestContent = xDestNewInSheetNamedRange->getContent(); + rtl::OUString aNewInSheetExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$SheetToCopy.$A$7")); + std::cout << "testImportSheet : InSheetRangeName content " << aNewInSheetNrDestContent << std::endl; + //CPPUNIT_ASSERT_MESSAGE("Wrong address for InSheetRangeName", aNewInSheetNrDestContent.equals(aNewInSheetExpectedContent)); + + // the source file redefines an existing named range in the imported sheet --> the target should not be changed + rtl::OUString aRedefinedInSheetNamedRangeString(RTL_CONSTASCII_USTRINGPARAM("initial2")); + CPPUNIT_ASSERT_MESSAGE("aRedefinedInSheetNamedRangeString", xDestNamedRangesNameAccess->hasByName(aRedefinedInSheetNamedRangeString)); + + uno::Any aRedefinedInSheetNr = xDestNamedRangesNameAccess->getByName(aRedefinedInSheetNamedRangeString); + uno::Reference< sheet::XNamedRange > xDestRedefinedInSheetNamedRange(aRedefinedInSheetNr, UNO_QUERY_THROW); + rtl::OUString aRedefinedInSheetNrDestContent = xDestRedefinedInSheetNamedRange->getContent(); + rtl::OUString aRedefinedInSheetExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$Sheet1.$B$2")); + std::cout << "testImportSheet : initial2 content " << aRedefinedInSheetNrDestContent << std::endl; + CPPUNIT_ASSERT_MESSAGE("Wrong address for Redefined InSheet named range", aRedefinedInSheetNrDestContent.equals(aRedefinedInSheetExpectedContent)); //formula with a non-existant named range in dest - new_rangename rtl::OUString aNewNamedRangeString(RTL_CONSTASCII_USTRINGPARAM("new_rangename")); CPPUNIT_ASSERT_MESSAGE("New NamedRange not created", xDestNamedRangesNameAccess->hasByName(aNewNamedRangeString)); - // verify the content of this new namedrange + // verify the content of this new namedrange, pointing on $Sheet1.$B$1 in source. This address is already defined in target as NR content + + uno::Any aNewNr = xDestNamedRangesNameAccess->getByName(aNewNamedRangeString); + uno::Reference< sheet::XNamedRange > xDestNewNamedRange(aNewNr, UNO_QUERY_THROW); + rtl::OUString aNewNrDestContent = xDestNewNamedRange->getContent(); + + rtl::OUString aNewExpectedContent(RTL_CONSTASCII_USTRINGPARAM("$Sheet1.$B$1")); +/* xSrcCell = xSrcSheet->getCellByPosition(4,0); uno::Reference< text::XTextRange > xSrcTextRange3(xSrcCell, UNO_QUERY_THROW); aSrcString = xSrcTextRange3->getString(); @@ -170,10 +200,10 @@ void ScXSpreadsheets2::testImportSheet() xDestCell = xDestSheet->getCellByPosition(4,0); uno::Reference< text::XTextRange > xDestTextRange3(xDestCell, UNO_QUERY_THROW); aDestString = xDestTextRange3->getString(); - - std::cout << "testImportSheet : new_rangename aSrcString " << aSrcString << std::endl; - std::cout << "testImportSheet : new_rangename aDestString " << aDestString << std::endl; - CPPUNIT_ASSERT_MESSAGE("Wrong New NamedRange formula string value", aDestString.equals(aSrcString)); +*/ + std::cout << "testImportSheet : new_rangename aNewExpectedContent " << aNewExpectedContent << std::endl; + std::cout << "testImportSheet : new_rangename aNewNrDestContent " << aNewNrDestContent << std::endl; + CPPUNIT_ASSERT_MESSAGE("Wrong New NamedRange formula string value", aNewExpectedContent.equals(aNewExpectedContent)); //new style created in dest uno::Reference< beans::XPropertySet > xSrcCellPropSet (xSrcCell, UNO_QUERY_THROW); diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index f7ea541435fd..cf5f70ffbd9e 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -182,7 +182,7 @@ void adjustRangeName(ScToken* pToken, ScDocument& rNewDoc, const ScDocument* pOl ScTokenArray* pRangeNameToken = pRangeData->GetCode(); if (rNewDoc.GetPool() != const_cast<ScDocument*>(pOldDoc)->GetPool()) { - pRangeNameToken->ReadjusteAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos(), true); + pRangeNameToken->ReadjustAbsolute3DReferences(pOldDoc, &rNewDoc, pRangeData->GetPos(), true); } bool bInserted; @@ -890,8 +890,10 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons if (pDocument->GetPool() != rCell.pDocument->GetPool()) { - pCode->ReadjusteAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos); + pCode->ReadjustAbsolute3DReferences( rCell.pDocument, &rDoc, rCell.aPos); } + + pCode->AdjustAbsoluteRefs( rCell.pDocument, rCell.aPos, aPos ); } if( !bCompile ) diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index dcc08d449c40..6ef4346029fa 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -1875,9 +1875,25 @@ bool SkipReference(ScToken* pToken, const ScAddress& rPos, const ScDocument* pOl return false; } +void AdjustSingleRefData( ScSingleRefData& rRef, const ScAddress& rOldPos, const ScAddress& rNewPos) +{ + SCsCOL nCols = rNewPos.Col() - rOldPos.Col(); + SCsROW nRows = rNewPos.Row() - rOldPos.Row(); + SCsTAB nTabs = rNewPos.Tab() - rOldPos.Tab(); + + if (!rRef.IsColRel()) + rRef.nCol += nCols; + + if (!rRef.IsRowRel()) + rRef.nRow += nRows; + + if (!rRef.IsTabRel()) + rRef.nTab += nTabs; } -void ScTokenArray::ReadjusteAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName ) +} + +void ScTokenArray::ReadjustAbsolute3DReferences( const ScDocument* pOldDoc, const ScDocument* pNewDoc, const ScAddress& rPos, bool bRangeName ) { for ( sal_uInt16 j=0; j<nLen; ++j ) { @@ -1885,13 +1901,13 @@ void ScTokenArray::ReadjusteAbsolute3DReferences( const ScDocument* pOldDoc, con { case svDoubleRef : { + if (SkipReference(static_cast<ScToken*>(pCode[j]), rPos, pOldDoc, bRangeName)) + continue; + ScComplexRefData& rRef = static_cast<ScToken*>(pCode[j])->GetDoubleRef(); ScSingleRefData& rRef2 = rRef.Ref2; ScSingleRefData& rRef1 = rRef.Ref1; - if (SkipReference(static_cast<ScToken*>(pCode[j]), rPos, pOldDoc, bRangeName)) - continue; - if ( (rRef2.IsFlag3D() && !rRef2.IsTabRel()) || (rRef1.IsFlag3D() && !rRef1.IsTabRel()) ) { rtl::OUString aTabName; @@ -1906,11 +1922,11 @@ void ScTokenArray::ReadjusteAbsolute3DReferences( const ScDocument* pOldDoc, con break; case svSingleRef : { - ScSingleRefData& rRef = static_cast<ScToken*>(pCode[j])->GetSingleRef(); - if (SkipReference(static_cast<ScToken*>(pCode[j]), rPos, pOldDoc, bRangeName)) continue; + ScSingleRefData& rRef = static_cast<ScToken*>(pCode[j])->GetSingleRef(); + if ( rRef.IsFlag3D() && !rRef.IsTabRel() ) { rtl::OUString aTabName; @@ -1932,5 +1948,45 @@ void ScTokenArray::ReadjusteAbsolute3DReferences( const ScDocument* pOldDoc, con } } +void ScTokenArray::AdjustAbsoluteRefs( const ScDocument* pOldDoc, const ScAddress& rOldPos, const ScAddress& rNewPos) +{ + for ( sal_uInt16 j=0; j<nLen; ++j ) + { + switch ( pCode[j]->GetType() ) + { + case svDoubleRef : + { + if (!SkipReference(static_cast<ScToken*>(pCode[j]), rOldPos, pOldDoc, false)) + continue; + + ScComplexRefData& rRef = static_cast<ScToken*>(pCode[j])->GetDoubleRef(); + ScSingleRefData& rRef2 = rRef.Ref2; + ScSingleRefData& rRef1 = rRef.Ref1; + + AdjustSingleRefData( rRef1, rOldPos, rNewPos ); + AdjustSingleRefData( rRef2, rOldPos, rNewPos ); + + } + break; + case svSingleRef : + { + if (!SkipReference(static_cast<ScToken*>(pCode[j]), rOldPos, pOldDoc, false)) + continue; + + ScSingleRefData& rRef = static_cast<ScToken*>(pCode[j])->GetSingleRef(); + + AdjustSingleRefData( rRef, rOldPos, rNewPos ); + + + } + break; + default: + { + // added to avoid warnings + } + } + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx index c923fd6cbc1c..a61e5d3d8d9e 100644 --- a/sc/source/ui/app/transobj.cxx +++ b/sc/source/ui/app/transobj.cxx @@ -61,6 +61,7 @@ #include "scmod.hxx" #include "dragdata.hxx" #include "clipdata.hxx" +#include "clipparam.hxx" // for InitDocShell #include <editeng/paperinf.hxx> @@ -171,6 +172,9 @@ ScTransferObj::ScTransferObj( ScDocument* pClipDoc, const TransferableObjectDesc } OSL_ENSURE(!bFirst, "no sheet selected"); + if (!pDoc->GetClipParam().isMultiRange() && nTab1 == nTab2) + pDoc->ShrinkToDataArea( nTab1, nCol1, nRow1, nCol2, nRow2 ); + // only limit to used cells if whole sheet was marked // (so empty cell areas can be copied) if ( nCol2>=MAXCOL && nRow2>=MAXROW ) diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index 68ccf215583c..bd133148e82e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -277,28 +277,9 @@ sal_Bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, sal_Bool bCut, sal_Bool b { ScRange aRange; ScMarkType eMarkType = GetViewData()->GetSimpleArea( aRange ); - ScDocument* pDoc = GetViewData()->GetDocument(); ScMarkData& rMark = GetViewData()->GetMarkData(); sal_Bool bDone = sal_False; - if( !pClipDoc ) // System Copy - adjust the ranges. - { - SCCOL nCol1 = aRange.aStart.Col(); - SCCOL nCol2 = aRange.aEnd.Col(); - SCROW nRow1 = aRange.aStart.Row(); - SCROW nRow2 = aRange.aEnd.Row(); - pDoc->ShrinkToDataArea( aRange.aStart.Tab(), nCol1, nRow1, nCol2, nRow2 ); - if( aRange.aStart.Col() == 0 && aRange.aEnd.Col() == MAXCOL ) - { - aRange.aStart.SetCol( nCol1 ); - aRange.aEnd.SetCol( nCol2 ); - } - if( aRange.aStart.Row() == 0 && aRange.aEnd.Row() == MAXROW ) - { - aRange.aStart.SetRow( nRow1 ); - aRange.aEnd.SetRow( nRow2 ); - } - } if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED ) { ScRangeList aRangeList; diff --git a/solenv/gbuild/CustomTarget.mk b/solenv/gbuild/CustomTarget.mk index 1e075af777d1..84c6f11cb206 100644 --- a/solenv/gbuild/CustomTarget.mk +++ b/solenv/gbuild/CustomTarget.mk @@ -56,20 +56,23 @@ endef define gb_CustomTarget_CustomTarget $(call gb_CustomTarget_get_target,$(1)) : \ $(call gb_CustomTarget__get_makefile,$(1)) + endef define gb_CustomTarget_add_dependency -$(eval $(call gb_CustomTarget_get_target,$(1)) : \ - $(SRCDIR)/$(2)) +$(call gb_CustomTarget_get_target,$(1)) : $(SRCDIR)/$(2) + endef define gb_CustomTarget_add_dependencies $(foreach dependency,$(2),$(call gb_CustomTarget_add_dependency,$(1),$(dependency))) + endef define gb_CustomTarget_add_outdir_dependency -$(eval $(call gb_CustomTarget_get_target,$(1)) : $(2)) +$(call gb_CustomTarget_get_target,$(1)) : $(2) + endef define gb_CustomTarget_add_outdir_dependencies diff --git a/solenv/gbuild/Jar.mk b/solenv/gbuild/Jar.mk index 6a108ba7e1a3..b5ba394ee7ac 100644 --- a/solenv/gbuild/Jar.mk +++ b/solenv/gbuild/Jar.mk @@ -48,6 +48,12 @@ endef # creates the target folder of the jar file if it doesn't exist # creates the jar file # jar program does not remove the target in case of error, so rm it manually +# XXX: PACKAGEDIRS need special treatment, because sometimes we need to +# add into the jar another class hierarchy created outside of our class +# set (e.g., by javamaker). Because jar does not allow two same root dirs +# when creating the archive, we work around this deficiency by creating +# the archive with the main class hierarchy and then updating it from +# the other one(s), which seems to work .-) define gb_Jar__command $(call gb_Output_announce,$*,$(true),JAR,3) $(call gb_Helper_abbreviate_dirs_native,\ @@ -59,6 +65,7 @@ define gb_Jar__command mkdir -p $(dir $(2)) && cd $(call gb_Jar_get_workdir,$(1)) && \ $(gb_Jar_JARCOMMAND) cfm $(2) $(call gb_Jar_get_manifest_target,$(1)) \ META-INF $(PACKAGEROOTS) $(PACKAGEFILES) \ + $(foreach root,$(PACKAGEDIRS),&& $(gb_Jar_JARCOMMAND) uf $(2) -C $(dir $(root)) $(notdir $(root))) \ || (rm $(2); false) ) endef @@ -84,6 +91,7 @@ define gb_Jar_Jar $(call gb_Jar_get_target,$(1)) : MANIFEST := $(call gb_Jar_get_target,$(1)) : JARCLASSPATH := $(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := +$(call gb_Jar_get_target,$(1)) : PACKAGEDIRS := $(call gb_Jar_get_target,$(1)) : PACKAGEFILES := $(call gb_JavaClassSet_JavaClassSet,$(call gb_Jar_get_classsetname,$(1))) $(call gb_JavaClassSet_set_classpath,$(call gb_Jar_get_classsetname,$(1)),$(value XCLASSPATH)) @@ -96,35 +104,61 @@ endef # source files are forwarded to the ClassSet define gb_Jar_add_sourcefile $(call gb_JavaClassSet_add_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef -# PACKAGEROOTS is the list of all root folders to pack into the jar (without META-INF as this is added automatically) +# PACKAGEROOTS is the list of all root folders created by the JavaClassSet to pack into the jar (without META-INF as this is added automatically) define gb_Jar_set_packageroot $(call gb_Jar_get_target,$(1)) : PACKAGEROOTS := $(2) + +endef +# +# PACKAGEDIRS is the list of additional root directories to pack into the jar +define gb_Jar_add_packagedir +$(call gb_Jar_get_target,$(1)) : PACKAGEDIRS += $(2) + +endef + +define gb_Jar_add_packagedirs +$(foreach packagedir,$(2),$(call gb_Jar_add_packagedir,$(1),$(packagedir))) + endef # PACKAGEFILES is the list of all root files to pack into the jar define gb_Jar_add_packagefile $(call gb_Jar_get_target,$(1)) : PACKAGEFILES += $(2) -$(call gb_Jar_get_target,$(1)) : $(call gb_Jar_get_workdir,$(1))/$(strip $(2)) -$(call gb_Jar_get_workdir,$(1))/$(strip $(2)) : $(3) $(call gb_JavaClassSet_get_target,$(call gb_Jar_get_classsetname,$(1))) - mkdir -p $$(dir $$@) - cp -rf $(3) $$@ + +endef + +define gb_Jar_add_packagefiles +$(foreach packagefile,$(2),$(call gb_Jar_add_packagefile,$(1),$(packagefile))) endef define gb_Jar_add_sourcefiles $(foreach sourcefile,$(2),$(call gb_Jar_add_sourcefile,$(1),$(sourcefile))) + +endef + +define gb_Jar_add_generated_sourcefile +$(call gb_JavaClassSet_add_generated_sourcefile,$(call gb_Jar_get_classsetname,$(1)),$(2)) + +endef + +define gb_Jar_add_generated_sourcefiles +$(foreach sourcefile,$(2),$(call gb_Jar_add_generated_sourcefile,$(1),$(sourcefile))) + endef define gb_JarTest_set_classpath $(call gb_JavaClassSet_set_classpath,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef # JARCLASSPATH is the class path that is written to the manifest of the jar define gb_Jar_set_jarclasspath - $(call gb_Jar_get_target,$(1)) : JARCLASSPATH := $(2) + endef # provide a manifest template containing jar specific information to be written into the manifest @@ -139,27 +173,33 @@ endef # remember: classpath is "inherited" to ClassSet define gb_Jar_add_jar $(call gb_JavaClassSet_add_jar,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef define gb_Jar_add_system_jar $(call gb_JavaClassSet_add_system_jar,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef # specify jars with imported modules define gb_Jar_add_jars $(call gb_JavaClassSet_add_jars,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef define gb_Jar_add_system_jars $(call gb_JavaClassSet_add_system_jars,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef define gb_Jar_use_external $(call gb_JavaClassSet_use_external,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef define gb_Jar_use_externals $(call gb_JavaClassSet_use_externals,$(call gb_Jar_get_classsetname,$(1)),$(2)) + endef # possible directories for jar files containing UNO services diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk index 4c8d7cfc5603..6befda19aa2c 100644 --- a/solenv/gbuild/JavaClassSet.mk +++ b/solenv/gbuild/JavaClassSet.mk @@ -62,15 +62,20 @@ $(call gb_JavaClassSet_get_clean_target,%) : define gb_JavaClassSet_JavaClassSet $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS := + endef define gb_JavaClassSet__get_sourcefile $(SRCDIR)/$(1).java endef +define gb_JavaClassSet__get_generated_sourcefile +$(WORKDIR)/$(1).java +endef + define gb_JavaClassSet_add_sourcefile -$(eval $(call gb_JavaClassSet_get_target,$(1)) : \ - $(call gb_JavaClassSet__get_sourcefile,$(2))) +$(call gb_JavaClassSet_get_target,$(1)) : $(call gb_JavaClassSet__get_sourcefile,$(2)) + endef define gb_JavaClassSet_add_sourcefiles @@ -78,43 +83,60 @@ $(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_sourcefile,$(1),$(sourcefil endef +define gb_JavaClassSet_add_generated_sourcefile +$(call gb_JavaClassSet_get_target,$(1)) : $(call gb_JavaClassSet__get_generated_sourcefile,$(2)) +$(call gb_JavaClassSet__get_generated_sourcefile,$(2)) : $(gb_Helper_PHONY) + +endef + +define gb_JavaClassSet_add_generated_sourcefiles +$(foreach sourcefile,$(2),$(call gb_JavaClassSet_add_generated_sourcefile,$(1),$(sourcefile))) + +endef + define gb_JavaClassSet_set_classpath -$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $(2)) +$(call gb_JavaClassSet_get_target,$(1)) : T_CP := $(2) endef # problem: currently we can't get these dependencies to work # build order dependency is a hack to get these prerequisites out of the way in the build command define gb_JavaClassSet_add_jar -$(eval $(call gb_JavaClassSet_get_target,$(1)) : $(2)) -$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2))) -$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2)) +$(call gb_JavaClassSet_get_target,$(1)) : $(2) +$(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)) +$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2) + endef # this does not generate dependency on the jar define gb_JavaClassSet_add_system_jar -$(eval $(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2))) -$(eval $(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2)) +$(call gb_JavaClassSet_get_target,$(1)) : T_CP := $$(T_CP)$(gb_CLASSPATHSEP)$(strip $(2)) +$(call gb_JavaClassSet_get_target,$(1)) : JARDEPS += $(2) + endef define gb_JavaClassSet_add_jars $(foreach jar,$(2),$(call gb_JavaClassSet_add_jar,$(1),$(jar))) + endef define gb_JavaClassSet_add_system_jars $(foreach jar,$(2),$(call gb_JavaClassSet_add_system_jar,$(1),$(jar))) + endef # this forwards to functions that must be defined in RepositoryExternal.mk. -# $(call gb_LinkTarget_use_external,library,external) +# $(eval $(call gb_LinkTarget_use_external,library,external)) define gb_JavaClassSet_use_external -$(eval $(if $(value gb_JavaClassSet__use_$(2)),\ +$(if $(value gb_JavaClassSet__use_$(2)),\ $(call gb_JavaClassSet__use_$(2),$(1)),\ - $(error gb_JavaClassSet_use_external: unknown external: $(2)))) + $(error gb_JavaClassSet_use_external: unknown external: $(2))) + endef define gb_JavaClassSet_use_externals $(foreach external,$(2),$(call gb_JavaClassSet_use_external,$(1),$(external))) + endef # vim: set noet sw=4: diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 002dabf7c018..cc949ed6fc0c 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -323,7 +323,9 @@ SwForm::SwForm( TOXTypes eTyp ) // #i21237# SwFormTokens aTokens; if (TOX_CONTENT == eType) { - aTokens.push_back(SwFormToken(TOKEN_LINK_START)); + SwFormToken aLinkStt (TOKEN_LINK_START); + aLinkStt.sCharStyleName = String(SW_RES(STR_POOLCHR_TOXJUMP)); + aTokens.push_back(aLinkStt); aTokens.push_back(SwFormToken(TOKEN_ENTRY_NO)); aTokens.push_back(SwFormToken(TOKEN_ENTRY_TEXT)); } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 37f03bcd5c38..231d7bf337b5 100755 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -1770,7 +1770,7 @@ sal_Bool SwCompareOptionsTabPage::FillItemSet( SfxItemSet& ) aWordRB.IsChecked() != aWordRB.GetSavedValue() || aCharRB.IsChecked() != aCharRB.GetSavedValue() ) { - SvxCompareMode eCmpMode; + SvxCompareMode eCmpMode = SVX_CMP_AUTO; if ( aAutoRB.IsChecked() ) eCmpMode = SVX_CMP_AUTO; if ( aWordRB.IsChecked() ) eCmpMode = SVX_CMP_BY_WORD; diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3e07f62ba048..c042edafb6e9 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -2441,7 +2441,7 @@ IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, PushButton*, pBtn) { sText.AssignAscii(SwForm::aFormLinkStt); eTokenType = TOKEN_LINK_START; - sCharStyle = String(SW_RES(STR_POOLCHR_INET_NORMAL)); + sCharStyle = String(SW_RES(STR_POOLCHR_TOXJUMP)); } else if(pBtn == &aTabPB) { diff --git a/vcl/generic/fontmanager/fontsubst.cxx b/vcl/generic/fontmanager/fontsubst.cxx index 3e1cafc7c90b..26076681a99d 100644 --- a/vcl/generic/fontmanager/fontsubst.cxx +++ b/vcl/generic/fontmanager/fontsubst.cxx @@ -163,15 +163,17 @@ bool FcPreMatchSubstititution::FindFontSubstitute( FontSelectPattern &rFontSelDa const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); #ifdef DEBUG - const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); - const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); + const rtl::OString aOrigName(rtl::OUStringToOString(rFontSelData.maTargetName, + RTL_TEXTENCODING_UTF8)); + const rtl::OString aSubstName(rtl::OUStringToOString(aOut.maSearchName, + RTL_TEXTENCODING_UTF8)); printf( "FcPreMatchSubstititution \"%s\" bipw=%d%d%d%d -> ", - aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, + aOrigName.getStr(), rFontSelData.meWeight, rFontSelData.meItalic, rFontSelData.mePitch, rFontSelData.meWidthType ); if( !bHaveSubstitute ) printf( "no substitute available\n" ); else - printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), + printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.getStr(), aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); #endif @@ -205,15 +207,17 @@ bool FcGlyphFallbackSubstititution::FindFontSubstitute( FontSelectPattern& rFont const bool bHaveSubstitute = !uselessmatch( rFontSelData, aOut ); #ifdef DEBUG - const ByteString aOrigName( rFontSelData.maTargetName, RTL_TEXTENCODING_UTF8 ); - const ByteString aSubstName( aOut.maSearchName, RTL_TEXTENCODING_UTF8 ); + const rtl::OString aOrigName(rtl::OUStringToOString(rFontSelData.maTargetName, + RTL_TEXTENCODING_UTF8)); + const rtl::OString aSubstName(rtl::OUStringToOString(aOut.maSearchName, + RTL_TEXTENCODING_UTF8)); printf( "FcGFSubstititution \"%s\" bipw=%d%d%d%d ->", - aOrigName.GetBuffer(), rFontSelData.meWeight, rFontSelData.meItalic, + aOrigName.getStr(), rFontSelData.meWeight, rFontSelData.meItalic, rFontSelData.mePitch, rFontSelData.meWidthType ); if( !bHaveSubstitute ) printf( "no substitute available\n" ); else - printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.GetBuffer(), + printf( "\"%s\" bipw=%d%d%d%d\n", aSubstName.getStr(), aOut.meWeight, aOut.meItalic, aOut.mePitch, aOut.meWidthType ); #endif diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 65a83a5b82ea..c44f90605a34 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -960,7 +960,7 @@ void Menu::ImplInit() { mnHighlightedItemPos = ITEMPOS_INVALID; mpSalMenu = NULL; - nMenuFlags = 0; + nMenuFlags = MENU_FLAG_SHOWCHECKIMAGES; nDefaultItem = 0; //bIsMenuBar = sal_False; // this is now set in the ctor, must not be changed here!!! nSelectedId = 0; |