diff options
author | Tobias Lippert <drtl@fastmail.fm> | 2014-08-07 22:30:58 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-09-19 21:53:55 +0000 |
commit | 5013ac55090ab7a64b9549df67196aa5c7479542 (patch) | |
tree | b8305cc98935855ae69413b6afd1f1805591df41 /svx/CppunitTest_svx_unit.mk | |
parent | 234b5de79fd10bd99b75d7b968581af7b6ffe44b (diff) |
fdo#84061 Fix setting text style sheet listeners in SdrTextObj
The code in SdrTextObj::ImpSetTextStyleSheetListeners is obviously not
working correctly.
The families of the stylesheets are appended to the name of the family
for further usage.
An encoded string looks like "STYLE_NAME|3 "
The family is then extracted by copying the first (length-6) bytes,
e.g., "STYLE_NAME" in this example. Then another copy starting a
position 1 is created, e.g., "TYLE_NAME". This string is cast to an
Int32. Since this is not possible, 0 is returned, and the originally
stored family is lost.
This patch corrects this behavior, and adds a unit test.
Change-Id: I60c0add6e4b670acbbc264cc77672452f282f737
Reviewed-on: https://gerrit.libreoffice.org/10818
Reviewed-by: Matúš Kukan <matus.kukan@collabora.com>
Tested-by: Matúš Kukan <matus.kukan@collabora.com>
Diffstat (limited to 'svx/CppunitTest_svx_unit.mk')
-rw-r--r-- | svx/CppunitTest_svx_unit.mk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/svx/CppunitTest_svx_unit.mk b/svx/CppunitTest_svx_unit.mk new file mode 100644 index 000000000000..82d9cd48a4b2 --- /dev/null +++ b/svx/CppunitTest_svx_unit.mk @@ -0,0 +1,32 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_CppunitTest_CppunitTest,svx_unit)) + +$(eval $(call gb_CppunitTest_use_external,svx_unit,boost_headers)) + +$(eval $(call gb_CppunitTest_use_api,svx_unit, \ + offapi \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_set_include,svx_unit,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \ + svx/qa/unit/svdraw/test_SdrTextObject \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,svx_unit, \ + sal \ + svxcore \ +)) + +# vim: set noet sw=4 ts=4: |