basic/source/uno/namecont.cxx | 17 +- dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk | 119 +++++++++++++++ dbaccess/CppunitTest_dbaccess_nolib_save.mk | 119 +++++++++++++++ dbaccess/Module_dbaccess.mk | 2 dbaccess/qa/extras/empty-stdlib-save.cxx | 145 +++++++++++++++++++ dbaccess/qa/extras/nolib-save.cxx | 135 +++++++++++++++++ download.lst | 2 i18npool/source/localedata/data/es_CR.xml | 12 - sc/source/core/data/column4.cxx | 7 sc/source/core/data/table3.cxx | 7 sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx | 1 sc/source/ui/docshell/dbdocfun.cxx | 1 sd/source/ui/controller/slidelayoutcontroller.cxx | 16 ++ sd/source/ui/controller/slidelayoutcontroller.hxx | 4 sw/qa/extras/ooxmlimport/data/bnc891663.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 9 + writerfilter/source/dmapper/GraphicImport.cxx | 8 + writerfilter/source/dmapper/PropertyIds.cxx | 1 writerfilter/source/dmapper/PropertyIds.hxx | 1 19 files changed, 590 insertions(+), 16 deletions(-)
New commits: commit 600f01ddec03f900c1ade16425febb50c048a718 Author: Kohei Yoshida <[email protected]> Date: Fri Sep 19 09:11:09 2014 -0400 fdo#84009: Be sure to update the sheet index when moving the sort range. Change-Id: Ic9ad51b33f6dfb6f90e76439c27eeff25ec4c7da (cherry picked from commit 5fd4679e7b92f344ea867e0dca1fc4c9363ae2cd) Reviewed-on: https://gerrit.libreoffice.org/11549 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index dbc75d0..7469578 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -459,6 +459,7 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam, return false; aLocalParam.MoveToDest(); + nTab = aLocalParam.nDestTab; } ScEditableTester aTester( pDoc, nTab, aLocalParam.nCol1,aLocalParam.nRow1, commit 4889672fda0ea383f0fbedbbcd1700e3f0f5a2c0 Author: Maxim Monastirsky <[email protected]> Date: Mon Sep 15 22:52:40 2014 +0300 fdo#83619 Retain dropdown part after customization (cherry picked from commit 99ace739828f9d79a2f9b04ef066b90d77f77bc4) Conflicts: sd/source/ui/controller/slidelayoutcontroller.cxx Change-Id: I84c33e5b646ba43b9cad1d9ed106e7ead911e5c0 Reviewed-on: https://gerrit.libreoffice.org/11466 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 34a5e2b..59868ff 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -370,6 +370,22 @@ SlideLayoutController::SlideLayoutController( const Reference< uno::XComponentCo +void SAL_CALL SlideLayoutController::initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) +{ + svt::PopupWindowController::initialize( aArguments ); + + ToolBox* pToolBox = 0; + sal_uInt16 nId = 0; + if ( getToolboxId( nId, &pToolBox ) ) + { + if ( mbInsertPage ) + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWN ); + else + pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | TIB_DROPDOWNONLY ); + } +} + ::Window* SlideLayoutController::createPopupWindow( ::Window* pParent ) { return new sd::LayoutToolbarMenu( *this, m_xFrame, pParent, mbInsertPage ); diff --git a/sd/source/ui/controller/slidelayoutcontroller.hxx b/sd/source/ui/controller/slidelayoutcontroller.hxx index 71e2bb3..3c6e91b 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.hxx +++ b/sd/source/ui/controller/slidelayoutcontroller.hxx @@ -34,6 +34,10 @@ public: virtual ::Window* createPopupWindow( ::Window* pParent ) SAL_OVERRIDE; + // XInitialization + virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) + throw ( css::uno::Exception, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + // XServiceInfo virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE; commit a98953d08df64b7f15a95ac57c05795823a758a1 Author: Kohei Yoshida <[email protected]> Date: Thu Sep 18 12:13:13 2014 -0400 fdo#83764: Ensure that the row position is below MAXROW. When attempting to split formula groups, else multi_type_vector would try to locate a block outside its logical range. Change-Id: I424ede112138de459b5ba3bff5e021c4407ccf3d (cherry picked from commit 0ef6263ed2b31b8f9e431971e6c5e8928996c1c8) Reviewed-on: https://gerrit.libreoffice.org/11518 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/core/data/column4.cxx b/sc/source/core/data/column4.cxx index 3f26db1..93fca48 100644 --- a/sc/source/core/data/column4.cxx +++ b/sc/source/core/data/column4.cxx @@ -916,11 +916,16 @@ public: void ScColumn::SplitFormulaGroupByRelativeRef( const ScRange& rBoundRange ) { + if (rBoundRange.aStart.Row() >= MAXROW) + // Nothing to split. + return; + std::vector<SCROW> aBounds; // Cut at row boundaries first. aBounds.push_back(rBoundRange.aStart.Row()); - aBounds.push_back(rBoundRange.aEnd.Row()+1); + if (rBoundRange.aEnd.Row() < MAXROW) + aBounds.push_back(rBoundRange.aEnd.Row()+1); sc::SharedFormulaUtil::splitFormulaCellGroups(maCells, aBounds); RelativeRefBoundChecker aFunc(rBoundRange); diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 613cb1f..c5bfe75 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -772,8 +772,11 @@ void ScTable::SortReorderByColumn( sc::CellStoreType& rCells = aCol[nCol].maCells; sc::CellStoreType::position_type aPos = rCells.position(nRow1); sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); - aPos = rCells.position(aPos.first, nRow2+1); - sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); + if (nRow2 < MAXROW) + { + aPos = rCells.position(aPos.first, nRow2+1); + sc::SharedFormulaUtil::joinFormulaCellAbove(aPos); + } } } commit 578c659f5599b8fabebc77487200b33f03a97bfc Author: Lionel Elie Mamane <[email protected]> Date: Thu Sep 4 11:59:11 2014 +0200 fdo#52076 unittest Change-Id: Iae10f9728db4c90c4a55ad692b32cddeb7adc48a Reviewed-on: https://gerrit.libreoffice.org/11277 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk new file mode 100644 index 0000000..408c0bf --- /dev/null +++ b/dbaccess/CppunitTest_dbaccess_empty_stdlib_save.mk @@ -0,0 +1,119 @@ +# -*- 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,dbaccess_empty_stdlib_save)) + +$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_empty_stdlib_save, \ + dbaccess/qa/extras/empty-stdlib-save \ +)) + +$(eval $(call gb_CppunitTest_use_externals,dbaccess_empty_stdlib_save,\ + boost_headers \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,dbaccess_empty_stdlib_save, \ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + dba \ + dbu \ + sdbt \ + drawinglayer \ + editeng \ + for \ + forui \ + i18nlangtag \ + msfilter \ + oox \ + sal \ + salhelper \ + sax \ + sb \ + sfx \ + sot \ + svl \ + svt \ + svx \ + svxcore \ + test \ + subsequenttest \ + tl \ + tk \ + ucbhelper \ + unotest \ + utl \ + vbahelper \ + vcl \ + xo \ + $(gb_UWINAPI) \ +)) + +$(eval $(call gb_CppunitTest_set_include,dbaccess_empty_stdlib_save,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_api,dbaccess_empty_stdlib_save,\ + offapi \ + oovbaapi \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,dbaccess_empty_stdlib_save)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_empty_stdlib_save)) + +$(eval $(call gb_CppunitTest_use_components,dbaccess_empty_stdlib_save,\ + basic/util/sb \ + comphelper/util/comphelp \ + configmgr/source/configmgr \ + dbaccess/util/dba \ + dbaccess/util/dbu \ + dbaccess/util/sdbt \ + dbaccess/source/filter/xml/dbaxml \ + filter/source/config/cache/filterconfig1 \ + forms/util/frm \ + framework/util/fwk \ + i18npool/util/i18npool \ + linguistic/source/lng \ + oox/util/oox \ + package/source/xstor/xstor \ + package/util/package2 \ + sax/source/expatwrap/expwrap \ + scripting/source/basprov/basprov \ + scripting/util/scriptframe \ + sfx2/util/sfx \ + sot/util/sot \ + svl/source/fsstor/fsstorage \ + svl/util/svl \ + toolkit/util/tk \ + ucb/source/core/ucb1 \ + ucb/source/ucp/file/ucpfile1 \ + ucb/source/ucp/tdoc/ucptdoc1 \ + unotools/util/utl \ + unoxml/source/rdf/unordf \ + unoxml/source/service/unoxml \ + xmloff/util/xo \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,dbaccess_empty_stdlib_save)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,dbaccess_empty_stdlib_save)) + +$(eval $(call gb_CppunitTest_use_unittest_configuration,dbaccess_empty_stdlib_save)) + +$(call gb_CppunitTest_get_target,dbaccess_empty_stdlib_save) : $(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb +$(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/testDialogSave.odb + mkdir -p $(dir $@) + cp -P -f "$<" "$@" +.PHONY: $(WORKDIR)/CppunitTest/testEmptyStdlibSave.odb + +$(call gb_CppunitTest_get_target,dbaccess_empty_stdlib_save): \ + $(call gb_AllLangResTarget_get_target,ofa) + +# vim: set noet sw=4 ts=4: diff --git a/dbaccess/CppunitTest_dbaccess_nolib_save.mk b/dbaccess/CppunitTest_dbaccess_nolib_save.mk new file mode 100644 index 0000000..6684d72 --- /dev/null +++ b/dbaccess/CppunitTest_dbaccess_nolib_save.mk @@ -0,0 +1,119 @@ +# -*- 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,dbaccess_nolib_save)) + +$(eval $(call gb_CppunitTest_add_exception_objects,dbaccess_nolib_save, \ + dbaccess/qa/extras/nolib-save \ +)) + +$(eval $(call gb_CppunitTest_use_externals,dbaccess_nolib_save,\ + boost_headers \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,dbaccess_nolib_save, \ + basegfx \ + comphelper \ + cppu \ + cppuhelper \ + dba \ + dbu \ + sdbt \ + drawinglayer \ + editeng \ + for \ + forui \ + i18nlangtag \ + msfilter \ + oox \ + sal \ + salhelper \ + sax \ + sb \ + sfx \ + sot \ + svl \ + svt \ + svx \ + svxcore \ + test \ + subsequenttest \ + tl \ + tk \ + ucbhelper \ + unotest \ + utl \ + vbahelper \ + vcl \ + xo \ + $(gb_UWINAPI) \ +)) + +$(eval $(call gb_CppunitTest_set_include,dbaccess_nolib_save,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_api,dbaccess_nolib_save,\ + offapi \ + oovbaapi \ + udkapi \ +)) + +$(eval $(call gb_CppunitTest_use_ure,dbaccess_nolib_save)) +$(eval $(call gb_CppunitTest_use_vcl,dbaccess_nolib_save)) + +$(eval $(call gb_CppunitTest_use_components,dbaccess_nolib_save,\ + basic/util/sb \ + comphelper/util/comphelp \ + configmgr/source/configmgr \ + dbaccess/util/dba \ + dbaccess/util/dbu \ + dbaccess/util/sdbt \ + dbaccess/source/filter/xml/dbaxml \ + filter/source/config/cache/filterconfig1 \ + forms/util/frm \ + framework/util/fwk \ + i18npool/util/i18npool \ + linguistic/source/lng \ + oox/util/oox \ + package/source/xstor/xstor \ + package/util/package2 \ + sax/source/expatwrap/expwrap \ + scripting/source/basprov/basprov \ + scripting/util/scriptframe \ + sfx2/util/sfx \ + sot/util/sot \ + svl/source/fsstor/fsstorage \ + svl/util/svl \ + toolkit/util/tk \ + ucb/source/core/ucb1 \ + ucb/source/ucp/file/ucpfile1 \ + ucb/source/ucp/tdoc/ucptdoc1 \ + unotools/util/utl \ + unoxml/source/rdf/unordf \ + unoxml/source/service/unoxml \ + xmloff/util/xo \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,dbaccess_nolib_save)) + +$(eval $(call gb_CppunitTest_use_filter_configuration,dbaccess_nolib_save)) + +$(eval $(call gb_CppunitTest_use_unittest_configuration,dbaccess_nolib_save)) + +$(call gb_CppunitTest_get_target,dbaccess_nolib_save) : $(WORKDIR)/CppunitTest/testNolibSave.odb +$(WORKDIR)/CppunitTest/testNolibSave.odb : $(SRCDIR)/dbaccess/qa/extras/testdocuments/testDialogSave.odb + mkdir -p $(dir $@) + cp -P -f "$<" "$@" +.PHONY: $(WORKDIR)/CppunitTest/testNolibSave.odb + +$(call gb_CppunitTest_get_target,dbaccess_nolib_save): \ + $(call gb_AllLangResTarget_get_target,ofa) + +# vim: set noet sw=4 ts=4: diff --git a/dbaccess/Module_dbaccess.mk b/dbaccess/Module_dbaccess.mk index b9d7d56..bbe3009 100644 --- a/dbaccess/Module_dbaccess.mk +++ b/dbaccess/Module_dbaccess.mk @@ -42,6 +42,8 @@ endif $(eval $(call gb_Module_add_check_targets,dbaccess,\ CppunitTest_dbaccess_dialog_save \ + CppunitTest_dbaccess_empty_stdlib_save \ + CppunitTest_dbaccess_nolib_save \ CppunitTest_dbaccess_macros_test \ )) diff --git a/dbaccess/qa/extras/empty-stdlib-save.cxx b/dbaccess/qa/extras/empty-stdlib-save.cxx new file mode 100644 index 0000000..3f84d53 --- /dev/null +++ b/dbaccess/qa/extras/empty-stdlib-save.cxx @@ -0,0 +1,145 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <sal/config.h> +#include <test/bootstrapfixture.hxx> +#include <test/unoapi_test.hxx> +#include <rtl/strbuf.hxx> +#include <osl/file.hxx> +#include <com/sun/star/frame/Desktop.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/document/XEmbeddedScripts.hpp> +#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp> +#include <com/sun/star/script/XLibraryContainer.hpp> +#include <com/sun/star/util/XModifiable.hpp> +#include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <com/sun/star/io/XStream.hpp> +#include <com/sun/star/io/XInputStream.hpp> + +#include <sfx2/app.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/docfile.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/sfxmodelfactory.hxx> +#include <svl/intitem.hxx> +#include <comphelper/processfactory.hxx> + +#include <basic/sbxdef.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; + + +class DialogSaveTest : public UnoApiTest +{ +public: + DialogSaveTest(); + + void test(); + + CPPUNIT_TEST_SUITE(DialogSaveTest); +// Should we disable this test on MOX and WNT? +// #if !defined(MACOSX) && !defined(WNT) + CPPUNIT_TEST(test); +// #endif + CPPUNIT_TEST_SUITE_END(); + +}; + + +DialogSaveTest::DialogSaveTest() + : UnoApiTest("/dbaccess/qa/extras/testdocuments") +{ +} + +void DialogSaveTest::test() +{ + // UnoApiTest::setUp (via InitVCL) puts each test under a locked SolarMutex, + // but at least the below xDocCloseable->close call could lead to a deadlock + // then, and it looks like none of the code here requires the SolarMutex to + // be locked anyway: + SolarMutexReleaser rel; + + const OUString sStandard("Standard"); + const OUString aFileName(getURLFromWorkdir("CppunitTest/testEmptyStdlibSave.odb")); + { + uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName); + CPPUNIT_ASSERT(xComponent.is()); + uno::Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocStorable.is()); + uno::Reference< document::XEmbeddedScripts > xDocScr(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocScr.is()); + uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries()); + CPPUNIT_ASSERT(xStorBasLib.is()); + uno::Reference< script::XLibraryContainer > xBasLib(xStorBasLib, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xBasLib.is()); + uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries()); + CPPUNIT_ASSERT(xStorDlgLib.is()); + uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDlgLib.is()); + xBasLib->loadLibrary(sStandard); + xDlgLib->loadLibrary(sStandard); + CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard)); + CPPUNIT_ASSERT(xDlgLib->isLibraryLoaded(sStandard)); + + Any a; + uno::Reference< container::XNameContainer > xI; + + a = xBasLib->getByName(sStandard); + a >>= xI; + CPPUNIT_ASSERT(xI.is()); + xI->removeByName("Raralix"); + + a = xDlgLib->getByName(sStandard); + a >>= xI; + CPPUNIT_ASSERT(xI.is()); + xI->removeByName("Dialog1"); + + // uno::Reference< util::XModifiable > xDlgMod(xDlgLib, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xDlgMod.is()); + // xDlgMod->setModified(sal_True); + + // uno::Reference< util::XModifiable > xScrMod(xDocScr, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xScrMod.is()); + // xScrMod->setModified(sal_True); + + // uno::Reference< util::XModifiable > xDocMod(xComponent, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xDocMod.is()); + // std::cerr << "** Modified: " << static_cast<bool>(xDocMod->isModified()) << std::endl; + // xDocMod->setModified(sal_True); + // std::cerr << "** Modified: " << static_cast<bool>(xDocMod->isModified()) << std::endl; + // CPPUNIT_ASSERT(xDocMod->isModified()); + + // now save; the code path to exercise in this test is the "store to same location" + // do *not* change to store(As|To|URL)! + xDocStorable->store(); + + // close + uno::Reference< util::XCloseable > xDocCloseable(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocCloseable.is()); + xDocCloseable->close(false); + + // All our uno::References are (should?) be invalid now -> let them go out of scope + } + { + uno::Sequence<uno::Any> args(1); + args[0] <<= aFileName; + Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xHNA.is()); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard")); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard")); + } +} + +CPPUNIT_TEST_SUITE_REGISTRATION(DialogSaveTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/qa/extras/nolib-save.cxx b/dbaccess/qa/extras/nolib-save.cxx new file mode 100644 index 0000000..3f1ca91 --- /dev/null +++ b/dbaccess/qa/extras/nolib-save.cxx @@ -0,0 +1,135 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include <sal/config.h> +#include <test/bootstrapfixture.hxx> +#include <test/unoapi_test.hxx> +#include <rtl/strbuf.hxx> +#include <osl/file.hxx> +#include <com/sun/star/frame/Desktop.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/frame/XStorable.hpp> +#include <com/sun/star/document/XEmbeddedScripts.hpp> +#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp> +#include <com/sun/star/script/XLibraryContainer.hpp> +#include <com/sun/star/util/XModifiable.hpp> +#include <com/sun/star/container/XHierarchicalNameAccess.hpp> +#include <com/sun/star/io/XStream.hpp> +#include <com/sun/star/io/XInputStream.hpp> + +#include <sfx2/app.hxx> +#include <sfx2/docfilt.hxx> +#include <sfx2/docfile.hxx> +#include <sfx2/objsh.hxx> +#include <sfx2/sfxmodelfactory.hxx> +#include <svl/intitem.hxx> +#include <comphelper/processfactory.hxx> + +#include <basic/sbxdef.hxx> + +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; + + +class DialogSaveTest : public UnoApiTest +{ +public: + DialogSaveTest(); + + void test(); + + CPPUNIT_TEST_SUITE(DialogSaveTest); +// Should we disable this test on MOX and WNT? +// #if !defined(MACOSX) && !defined(WNT) + CPPUNIT_TEST(test); +// #endif + CPPUNIT_TEST_SUITE_END(); + +}; + + +DialogSaveTest::DialogSaveTest() + : UnoApiTest("/dbaccess/qa/extras/testdocuments") +{ +} + +void DialogSaveTest::test() +{ + // UnoApiTest::setUp (via InitVCL) puts each test under a locked SolarMutex, + // but at least the below xDocCloseable->close call could lead to a deadlock + // then, and it looks like none of the code here requires the SolarMutex to + // be locked anyway: + SolarMutexReleaser rel; + + const OUString sStandard("Standard"); + const OUString aFileName(getURLFromWorkdir("CppunitTest/testNolibSave.odb")); + { + uno::Reference< lang::XComponent > xComponent = loadFromDesktop(aFileName); + CPPUNIT_ASSERT(xComponent.is()); + uno::Reference< frame::XStorable > xDocStorable(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocStorable.is()); + uno::Reference< document::XEmbeddedScripts > xDocScr(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocScr.is()); + uno::Reference< script::XStorageBasedLibraryContainer > xStorBasLib(xDocScr->getBasicLibraries()); + CPPUNIT_ASSERT(xStorBasLib.is()); + uno::Reference< script::XLibraryContainer > xBasLib(xStorBasLib, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xBasLib.is()); + uno::Reference< script::XStorageBasedLibraryContainer > xStorDlgLib(xDocScr->getDialogLibraries()); + CPPUNIT_ASSERT(xStorDlgLib.is()); + uno::Reference< script::XLibraryContainer > xDlgLib(xStorDlgLib, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDlgLib.is()); + xBasLib->loadLibrary(sStandard); + xDlgLib->loadLibrary(sStandard); + CPPUNIT_ASSERT(xBasLib->isLibraryLoaded(sStandard)); + CPPUNIT_ASSERT(xDlgLib->isLibraryLoaded(sStandard)); + + xBasLib->removeLibrary(sStandard); + xDlgLib->removeLibrary(sStandard); + + // uno::Reference< util::XModifiable > xDlgMod(xDlgLib, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xDlgMod.is()); + // xDlgMod->setModified(sal_True); + + // uno::Reference< util::XModifiable > xScrMod(xDocScr, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xScrMod.is()); + // xScrMod->setModified(sal_True); + + // uno::Reference< util::XModifiable > xDocMod(xComponent, UNO_QUERY_THROW); + // CPPUNIT_ASSERT(xDocMod.is()); + // std::cerr << "** Modified: " << static_cast<bool>(xDocMod->isModified()) << std::endl; + // xDocMod->setModified(sal_True); + // std::cerr << "** Modified: " << static_cast<bool>(xDocMod->isModified()) << std::endl; + // CPPUNIT_ASSERT(xDocMod->isModified()); + + // now save; the code path to exercise in this test is the "store to same location" + // do *not* change to store(As|To|URL)! + xDocStorable->store(); + + // close + uno::Reference< util::XCloseable > xDocCloseable(xComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT(xDocCloseable.is()); + xDocCloseable->close(false); + + // All our uno::References are (should?) be invalid now -> let them go out of scope + } + { + uno::Sequence<uno::Any> args(1); + args[0] <<= aFileName; + Reference<container::XHierarchicalNameAccess> xHNA(getMultiServiceFactory()->createInstanceWithArguments("com.sun.star.packages.Package", args), UNO_QUERY_THROW); + CPPUNIT_ASSERT(xHNA.is()); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Basic/Standard")); + CPPUNIT_ASSERT(!xHNA->hasByHierarchicalName("Dialogs/Standard")); + } +} + +CPPUNIT_TEST_SUITE_REGISTRATION(DialogSaveTest); + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 987bcf0d73f15c7418950ee7e044a2be48f7c961 Author: Lionel Elie Mamane <[email protected]> Date: Thu Sep 4 11:56:12 2014 +0200 fdo#52076 remove Library dir when no library when saving to same storage (in place) we already did that when empty "Standard" was the only library, but not when there was no library... Cannot get through that state in through UI, but possible through scripting. Change-Id: I0f1129e034ac31b3eaf6bd388a03aee5aae5b87e Reviewed-on: https://gerrit.libreoffice.org/11276 Reviewed-by: Muthu Subramanian K <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index abdd3d5..61672d3 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1795,18 +1795,22 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto nLibsToSave--; } } - if( !nLibsToSave ) - { - return; - } - boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); - // Write to storage? bool bStorage = i_rStorage.is(); uno::Reference< embed::XStorage > xSourceLibrariesStor; uno::Reference< embed::XStorage > xTargetLibrariesStor; OUString sTempTargetStorName; const bool bInplaceStorage = bStorage && ( i_rStorage == mxStorage ); + + if( nLibsToSave == 0 ) + { + if ( bInplaceStorage && mxStorage->hasByName(maLibrariesDir) ) + { + mxStorage->removeElement(maLibrariesDir); + } + return; + } + if ( bStorage ) { // Don't write if only empty standard lib exists @@ -1884,6 +1888,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto int iArray = 0; pName = aNames.getConstArray(); ::xmlscript::LibDescriptor aLibDescriptorForExtensionLibs; + boost::scoped_ptr< ::xmlscript::LibDescriptorArray > pLibArray(new ::xmlscript::LibDescriptorArray(nLibsToSave)); for( ; pName != pNamesEnd; ++pName ) { SfxLibrary* pImplLib = getImplLib( *pName ); commit 511ad0dd7965fe262c040174e6374f6cedbb51a9 Author: LuboÅ¡ LuÅák <[email protected]> Date: Sun Sep 21 17:52:58 2014 +0200 handle docx's w:anchor layoutInCell attribute (bnc#891663) Change-Id: I8268567b84aa0f6e42624bfd0f79c8c49c153edd Reviewed-on: https://gerrit.libreoffice.org/11568 Reviewed-by: Andras Timar <[email protected]> Tested-by: Andras Timar <[email protected]> diff --git a/sw/qa/extras/ooxmlimport/data/bnc891663.docx b/sw/qa/extras/ooxmlimport/data/bnc891663.docx new file mode 100644 index 0000000..d5f057e Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/bnc891663.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 305b6ed..07761dd 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -2275,6 +2275,15 @@ DECLARE_OOXMLIMPORT_TEST(testBnc519228OddBreaks, "bnc519228_odd-breaks.docx") getParagraphOfText( 1, getProperty< uno::Reference<text::XText> >(page5Style, "HeaderText"), "This is the header for odd pages"); } +DECLARE_OOXMLIMPORT_TEST(testBnc891663, "bnc891663.docx") +{ + // The image should be inside a cell, so the text in the following cell should be below it. + int imageTop = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds", "top").toInt32(); + int imageHeight = parseDump("/root/page/body/tab/row[1]/cell[2]/txt[1]/anchored/fly/infos/bounds", "height").toInt32(); + int textNextRowTop = parseDump("/root/page/body/tab/row[2]/cell[1]/txt[1]/infos/bounds", "top").toInt32(); + CPPUNIT_ASSERT( textNextRowTop >= imageTop + imageHeight ); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 6cd88a5..4c68904 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -210,6 +210,7 @@ public: sal_Int16 nVertOrient; sal_Int16 nVertRelation; sal_Int32 nWrap; + bool bLayoutInCell; bool bOpaque; bool bContour; bool bContourOutside; @@ -283,6 +284,7 @@ public: ,nVertOrient( text::VertOrientation::NONE ) ,nVertRelation( text::RelOrientation::FRAME ) ,nWrap(0) + ,bLayoutInCell(false) ,bOpaque( true ) ,bContour(false) ,bContourOutside(true) @@ -580,7 +582,10 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) m_pImpl->bOpaque = false; break; case NS_ooxml::LN_CT_Anchor_locked: // 90990; - ignored + break; case NS_ooxml::LN_CT_Anchor_layoutInCell: // 90991; - ignored + m_pImpl->bLayoutInCell = nIntValue != 0; + break; case NS_ooxml::LN_CT_Anchor_hidden: // 90992; - ignored break; case NS_ooxml::LN_CT_Anchor_allowOverlap: // 90993; @@ -1230,6 +1235,9 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b } xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND ), uno::makeAny(m_pImpl->nWrap)); + if( m_pImpl->bLayoutInCell && m_pImpl->nWrap != text::WrapTextMode_THROUGHT ) + xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_FOLLOW_TEXT_FLOW ), + uno::makeAny(true)); xGraphicObjectProperties->setPropertyValue(rPropNameSupplier.GetName( PROP_SURROUND_CONTOUR ), uno::makeAny(m_pImpl->bContour)); diff --git a/writerfilter/source/dmapper/PropertyIds.cxx b/writerfilter/source/dmapper/PropertyIds.cxx index 3f5fa05..fc81dae 100644 --- a/writerfilter/source/dmapper/PropertyIds.cxx +++ b/writerfilter/source/dmapper/PropertyIds.cxx @@ -394,6 +394,7 @@ OUString PropertyNameSupplier::GetName( PropertyIds eId ) const case PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING : sName = "ApplyParagraphMarkFormatToNumbering"; break; case PROP_CELL_DIRECTION: sName = "CellDirection"; break; case PROP_CELL_HIDE_MARK: sName = "CellHideMark"; break; + case PROP_FOLLOW_TEXT_FLOW: sName = "IsFollowingTextFlow"; break; } ::std::pair<PropertyNameMap_t::iterator,bool> aInsertIt = m_pImpl->aNameMap.insert( PropertyNameMap_t::value_type( eId, sName )); diff --git a/writerfilter/source/dmapper/PropertyIds.hxx b/writerfilter/source/dmapper/PropertyIds.hxx index 3510e62..7394a50 100644 --- a/writerfilter/source/dmapper/PropertyIds.hxx +++ b/writerfilter/source/dmapper/PropertyIds.hxx @@ -366,6 +366,7 @@ enum PropertyIds ,PROP_APPLY_PARAGRAPH_MARK_FORMAT_TO_NUMBERING ,PROP_CELL_DIRECTION ,PROP_CELL_HIDE_MARK + ,PROP_FOLLOW_TEXT_FLOW }; struct PropertyNameSupplier_Impl; class PropertyNameSupplier commit 318f1cc95be5eb6732ce445070c4ea89afa4d699 Author: Niklas Johansson <[email protected]> Date: Mon Sep 15 08:57:01 2014 +0200 fdo#81264 Calc is not accessible to screen readers if sheet is modified [a11y] When the IA2 changes was merged it removed the call to CommitFocusGained and thereby stopped sending a STATE_CHANGED FOCUSED. A big thank you to Joanmarie Diggs for noticing the lack of that event. I tested the patch on Fedora, Windows and Mac. At a quick glance Windows and Mac seem unaffected by the patch but Fedora and Orca seem to require the added event. Change-Id: Ic616d1b367ad8b8ed5d243e0ba124764082e96f1 Reviewed-on: https://gerrit.libreoffice.org/11451 Reviewed-by: Eike Rathke <[email protected]> Tested-by: Eike Rathke <[email protected]> (cherry picked from commit 93410b5ba13749cf3663d3d696fe1a14474bf696) Reviewed-on: https://gerrit.libreoffice.org/11544 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 6d26093..6cb8118 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -362,6 +362,7 @@ void ScAccessibleSpreadsheet::LostFocus() void ScAccessibleSpreadsheet::GotFocus() { + CommitFocusGained(); AccessibleEventObject aEvent; aEvent.EventId = AccessibleEventId::ACTIVE_DESCENDANT_CHANGED; aEvent.Source = uno::Reference< XAccessibleContext >(this); commit 7e113f2b0f90d87172f45d588b294c927c18a297 Author: Kohei Yoshida <[email protected]> Date: Thu Sep 18 14:22:27 2014 -0400 Update mdds to 0.11.0. (cherry picked from commit 3f3b404b643f907f9feff893324174c00c3c4e4a) Conflicts: download.lst Change-Id: Ia4c413d313aafc1ba46d3d856145c0eb51a7d6ec Reviewed-on: https://gerrit.libreoffice.org/11520 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/download.lst b/download.lst index f413a57..303033d 100644 --- a/download.lst +++ b/download.lst @@ -95,7 +95,7 @@ export LIBXML_TARBALL := 9c0cfef285d5c4a5c80d00904ddab380-libxml2-2.9.1.tar.gz export LIBXSLT_TARBALL := 9667bf6f9310b957254fdcf6596600b7-libxslt-1.1.28.tar.gz export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz export MARIADB_TARBALL := 05f84c95b610c21c5fd510d10debcabf-mariadb-native-client-1.0.0.tar.bz2 -export MDDS_TARBALL := aa5ca9d1ed1082890835afab26400a39-mdds_0.10.3.tar.bz2 +export MDDS_TARBALL := a67a46ec9d00d283a7cd8dbdd2906b59-mdds_0.11.0.tar.bz2 export MSPUB_MD5SUM := 1d489c4932109e72495b1df8b69e5f11 export MSPUB_TARBALL := libmspub-0.1.1.tar.bz2 export MWAW_MD5SUM := 6f1ac4a0e24131c422e1e91f07718fb6 commit bcbe168b644c88f321ec21fcaf76734ea863846f Author: Julien Nabet <[email protected]> Date: Wed Sep 24 22:20:56 2014 +0200 Resolves fdo#84260: Wrong CRC Costa Rica currency symbol See https://en.wikipedia.org/wiki/Costa_Rican_col%C3%B3n Cherry-picked from aa33dd16b0e3075f28c56656678c0f5cb7642222 Change-Id: I6c30b2bd244f2ea40d56c812673922f27f5d53c8 Reviewed-on: https://gerrit.libreoffice.org/11635 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/i18npool/source/localedata/data/es_CR.xml b/i18npool/source/localedata/data/es_CR.xml index 2513623..6a04a8e 100644 --- a/i18npool/source/localedata/data/es_CR.xml +++ b/i18npool/source/localedata/data/es_CR.xml @@ -143,22 +143,22 @@ <FormatCode>#.###,00</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey1" default="true" type="short" usage="CURRENCY" formatindex="12"> - <FormatCode>[$¢-140A] #.##0;-[$¢-140A] #.##0</FormatCode> + <FormatCode>[$â¡-140A] #.##0;-[$â¡-140A] #.##0</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey2" default="false" type="medium" usage="CURRENCY" formatindex="13"> - <FormatCode>[$¢-140A] #.##0,00;-[$¢-140A] #.##0,00</FormatCode> + <FormatCode>[$â¡-140A] #.##0,00;-[$â¡-140A] #.##0,00</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey3" default="false" type="medium" usage="CURRENCY" formatindex="14"> - <FormatCode>[$¢-140A] #.##0;[RED]-[$¢-140A] #.##0</FormatCode> + <FormatCode>[$â¡-140A] #.##0;[RED]-[$â¡-140A] #.##0</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey4" default="true" type="medium" usage="CURRENCY" formatindex="15"> - <FormatCode>[$¢-140A] #.##0,00;[RED]-[$¢-140A] #.##0,00</FormatCode> + <FormatCode>[$â¡-140A] #.##0,00;[RED]-[$â¡-140A] #.##0,00</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey5" default="false" type="medium" usage="CURRENCY" formatindex="16"> <FormatCode>#.##0,00 CCC</FormatCode> </FormatElement> <FormatElement msgid="CurrencyFormatskey6" default="false" type="medium" usage="CURRENCY" formatindex="17"> - <FormatCode>[$¢-140A] #.##0,--;[RED]-[$¢-140A] #.##0,--</FormatCode> + <FormatCode>[$â¡-140A] #.##0,--;[RED]-[$â¡-140A] #.##0,--</FormatCode> </FormatElement> <FormatElement msgid="PercentFormatskey1" default="true" type="short" usage="PERCENT_NUMBER" formatindex="8"> <FormatCode>0%</FormatCode> @@ -180,7 +180,7 @@ <LC_CURRENCY> <Currency default="true" usedInCompatibleFormatCodes="true"> <CurrencyID>CRC</CurrencyID> - <CurrencySymbol>¢</CurrencySymbol> + <CurrencySymbol>â¡</CurrencySymbol> <BankSymbol>CRC</BankSymbol> <CurrencyName>Colon</CurrencyName> <DecimalPlaces>2</DecimalPlaces>
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
