sfx2/source/notebookbar/SfxNotebookBar.cxx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
New commits: commit 7aa6e5ce82eaca64f666b9fc6c0351bfd55d376a Author: Szymon KÅos <eszka...@gmail.com> Date: Mon Sep 12 16:29:24 2016 +0200 tdf#102065 Notebookbar: Menu bar disappears when cancelling dialog Change-Id: I6f83248eddfc279fe69f0f9c1d64d6b453bb1d3e Reviewed-on: https://gerrit.libreoffice.org/28843 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon KÅos <eszka...@gmail.com> diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index e12bead..e103d69 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -199,7 +199,23 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, RemoveListeners(pSysWindow); OUString sFile = officecfg::Office::UI::Notebookbar::Active::get(); - if ( !sFile.isEmpty() ) + OUString sNewFile = rUIFile + sFile; + OUString sCurrentFile; + if ( pSysWindow->GetNotebookBar() ) + sCurrentFile = OStringToOUString( pSysWindow->GetNotebookBar()->getUIFile(), RTL_TEXTENCODING_ASCII_US ); + + bool bChangedFile = true; + if ( sCurrentFile.getLength() && sNewFile.getLength() ) + { + // delete "/" + sCurrentFile = sCurrentFile.copy( 0, sCurrentFile.getLength() - 1 ); + // delete ".ui" + sNewFile = sNewFile.copy( 0, sNewFile.getLength() - 3 ); + + bChangedFile = ( sNewFile.compareTo( sCurrentFile ) != 0 ); + } + + if ( !sFile.isEmpty() && bChangedFile ) { OUStringBuffer aBuf(rUIFile); aBuf.append( sFile );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits