include/sfx2/sidebar/Deck.hxx | 2 - sfx2/source/sidebar/Deck.cxx | 42 ++++++------------------ sw/qa/extras/ooxmlexport/ooxmlexport3.cxx | 5 ++ writerfilter/source/dmapper/StyleSheetTable.cxx | 8 ++++ 4 files changed, 24 insertions(+), 33 deletions(-)
New commits: commit a1e508d603d68faf768761ec83494c609f6ded4c Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Tue Oct 29 19:59:12 2019 -0400 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Thu Oct 31 11:55:35 2019 +0100 Revert "jsdialogs: emit JSON at idle to avoid repeated emission." Tunnelling Deck causes major problems, SidebarDockingWindow is tunnelled instead. This reverts commit 520dc93ef80e641b7e838122ec7424f030a57859. Change-Id: I0e66860f013f9323cbc910f519dd911248146b0a Reviewed-on: https://gerrit.libreoffice.org/81750 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/include/sfx2/sidebar/Deck.hxx b/include/sfx2/sidebar/Deck.hxx index d631c6f26438..4c9558a1966b 100644 --- a/include/sfx2/sidebar/Deck.hxx +++ b/include/sfx2/sidebar/Deck.hxx @@ -31,7 +31,6 @@ namespace sfx2 { namespace sidebar { class DeckDescriptor; class DeckTitleBar; -class DeckNotifyIdle; /** This is the parent window of the panels. It displays the deck title. @@ -92,7 +91,6 @@ private: sal_Int32 mnMinimalWidth; sal_Int32 mnMinimalHeight; SharedPanelContainer maPanels; - std::unique_ptr<DeckNotifyIdle> mpIdleNotify; VclPtr<DeckTitleBar> mpTitleBar; VclPtr<vcl::Window> mpScrollClipWindow; VclPtr<ScrollContainerWindow> mpScrollContainer; diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index db47c0bd3ba2..b38525bf7e4d 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -44,35 +44,8 @@ using namespace css; using namespace css::uno; - namespace sfx2 { namespace sidebar { -class DeckNotifyIdle : public Idle -{ - Deck &mrDeck; -public: - DeckNotifyIdle(Deck &rDeck) : - Idle("Deck notify"), - mrDeck(rDeck) - { - SetPriority(TaskPriority::POST_PAINT); - } - void Invoke() override - { - auto pNotifier = mrDeck.GetLOKNotifier(); - try - { - std::stringstream aStream; - boost::property_tree::write_json(aStream, mrDeck.DumpAsPropertyTree()); - pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aStream.str().c_str()); - } - catch(boost::property_tree::json_parser::json_parser_error& rError) - { - SAL_WARN("sfx.sidebar", rError.message()); - } - } -}; - Deck::Deck(const DeckDescriptor& rDeckDescriptor, vcl::Window* pParentWindow, const std::function<void()>& rCloserAction) : Window(pParentWindow, 0) @@ -80,7 +53,6 @@ Deck::Deck(const DeckDescriptor& rDeckDescriptor, vcl::Window* pParentWindow, , mnMinimalWidth(0) , mnMinimalHeight(0) , maPanels() - , mpIdleNotify(new DeckNotifyIdle(*this)) , mpTitleBar(VclPtr<DeckTitleBar>::Create(rDeckDescriptor.msTitle, this, rCloserAction)) , mpScrollClipWindow(VclPtr<vcl::Window>::Create(this)) , mpScrollContainer(VclPtr<ScrollContainerWindow>::Create(mpScrollClipWindow.get())) @@ -215,11 +187,21 @@ void Deck::Resize() { Window::Resize(); + const vcl::ILibreOfficeKitNotifier *pNotifier; if (comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) && - GetLOKNotifier()) + (pNotifier = GetLOKNotifier())) { - mpIdleNotify->Start(); + try + { + std::stringstream aStream; + boost::property_tree::write_json(aStream, DumpAsPropertyTree()); + pNotifier->libreOfficeKitViewCallback(LOK_CALLBACK_JSDIALOG, aStream.str().c_str()); + } + catch(boost::property_tree::json_parser::json_parser_error& rError) + { + SAL_WARN("sfx.sidebar", rError.message()); + } } } commit 5af351f9edd23e3a0e44b7aacb290ccf6a93f7a2 Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Thu Aug 1 15:50:00 2019 +0300 Commit: Ashod Nakashian <ashnak...@gmail.com> CommitDate: Thu Oct 31 11:55:23 2019 +0100 tdf#126544 writerfilter: check parent style exists before assigning If you set the parent style to a style that is not yet created, then it silently fails, and thus inherits from nothing! Change-Id: Ibb85235643dd5b1eb9b0bd43f701580f24b2b7fa Reviewed-on: https://gerrit.libreoffice.org/76805 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_l...@sil.org> (cherry picked from commit b47a8f091ad8f9048a6b7962e9cde5d04ea0d665) Reviewed-on: https://gerrit.libreoffice.org/81749 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx index 91301b44858d..a3d2cc895c35 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport3.cxx @@ -962,6 +962,11 @@ DECLARE_OOXMLEXPORT_TEST(testExtraSectionBreak, "1_page.docx") uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); xCursor->jumpToLastPage(); CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage()); + + // tdf126544 Styles were being added before their base/parent/inherited-from style existed, and so were using default settings. + uno::Reference<container::XNameAccess> xParaStyles(getStyles("ParagraphStyles")); + uno::Reference<style::XStyle> xStyle(xParaStyles->getByName("Heading 1"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL( OUString("Heading Base"), xStyle->getParentStyle() ); } DECLARE_OOXMLEXPORT_TEST(testcolumnbreak, "columnbreak.docx") diff --git a/writerfilter/source/dmapper/StyleSheetTable.cxx b/writerfilter/source/dmapper/StyleSheetTable.cxx index 957cdbedf356..e6e37898347d 100644 --- a/writerfilter/source/dmapper/StyleSheetTable.cxx +++ b/writerfilter/source/dmapper/StyleSheetTable.cxx @@ -984,7 +984,13 @@ void StyleSheetTable::ApplyStyleSheets( const FontTablePtr& rFontTable ) StyleSheetEntryPtr pParent = FindStyleSheetByISTD( pEntry->sBaseStyleIdentifier ); // Writer core doesn't support numbering styles having a parent style, it seems if (pParent.get() != nullptr && !bListStyle) - xStyle->setParentStyle(ConvertStyleName( pParent->sStyleName )); + { + const OUString sParentStyleName = ConvertStyleName( pParent->sStyleName ); + if ( !sParentStyleName.isEmpty() && !xStyles->hasByName( sParentStyleName ) ) + aMissingParent.emplace_back( sParentStyleName, xStyle ); + else + xStyle->setParentStyle( sParentStyleName ); + } } catch( const uno::RuntimeException& ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits