[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2021-04-29 Thread Mike Kaganski (via logerrit)
 sfx2/source/control/charmapcontrol.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 31736f5f0abc09eb4066d09fd9e7394d844f9748
Author: Mike Kaganski 
AuthorDate: Wed Apr 28 11:25:18 2021 +0200
Commit: Xisco Fauli 
CommitDate: Thu Apr 29 14:39:57 2021 +0200

tdf#135997: fix toolbar control

This is the same as fc7b4bfeba39a2479c9a2c9c8ef5ced5ab3c0de7,
just for the toolbar control (the older one was for special
character dialog).

The problem was present since 800ac37021e3f8859a52c5eebca261a5d3bc5a11.

Change-Id: Ib86aa7336a3078ff28b417de37fbd5bc492c85c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114719
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 
(cherry picked from commit b27de500b1412bacefc7144b5222c307ca1ae0fe)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114853
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/sfx2/source/control/charmapcontrol.cxx 
b/sfx2/source/control/charmapcontrol.cxx
index 69e1a197d4ee..50a716a25ad6 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -128,7 +128,7 @@ void SfxCharmapCtrl::updateFavCharControl()
 {
 int i = 0;
 for ( std::deque< OUString >::iterator it = m_aFavCharList.begin(), it2 = 
m_aFavCharFontList.begin();
-it != m_aFavCharList.end() || it2 != m_aFavCharFontList.end();
+it != m_aFavCharList.end() && it2 != m_aFavCharFontList.end();
 ++it, ++it2, i++)
 {
 m_aFavCharView[i].SetText(*it);
@@ -160,7 +160,7 @@ void SfxCharmapCtrl::updateRecentCharControl()
 {
 int i = 0;
 for ( std::deque< OUString >::iterator it = m_aRecentCharList.begin(), it2 
= m_aRecentCharFontList.begin();
-it != m_aRecentCharList.end() || it2 != m_aRecentCharFontList.end();
+it != m_aRecentCharList.end() && it2 != m_aRecentCharFontList.end();
 ++it, ++it2, i++)
 {
 m_aRecentCharView[i].SetText(*it);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source sfx2/uiconfig

2021-01-27 Thread Caolán McNamara (via logerrit)
 sfx2/source/appl/newhelp.cxx   |1 -
 sfx2/uiconfig/ui/helpwindow.ui |5 ++---
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit cfdaa4fec60f010d325b5a261db9625394c75535
Author: Caolán McNamara 
AuthorDate: Wed Jan 27 12:43:25 2021 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Jan 27 16:44:29 2021 +0100

tdf#138727 help browser didn't flow text

because of its size request, while the paned shrink lets the pane shrink
below the size request the contents stay at a min of the size request
and aren't really shrunk, just clipped. Instead don't let the pane
shrink but don't set a size.request letting it shrink to its natural
min of its contents which are then truly resized so the text flow works.

Change-Id: Iaf6738ace28c82379ac6322310de9a22f9653473
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109984
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 9160c231f7e3..fb3ed8d5b78b 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -2467,7 +2467,6 @@ SfxHelpWindow_Impl::SfxHelpWindow_Impl(
 m_xContainer->connect_size_allocate(LINK(this, SfxHelpWindow_Impl, 
ResizeHdl));
 m_xHelpPaneWindow = m_xBuilder->weld_container("helppanewindow");
 m_xHelpTextWindow = m_xBuilder->weld_container("helptextwindow");
-
m_xHelpTextWindow->set_size_request(m_xHelpTextWindow->get_approximate_digit_width()
 * 120, -1);
 m_xHelpTextXWindow = m_xHelpTextWindow->CreateChildFrame();
 
 pHelpInterceptor->InitWaiter( this );
diff --git a/sfx2/uiconfig/ui/helpwindow.ui b/sfx2/uiconfig/ui/helpwindow.ui
index 6c9fae044c45..f35acaf06bf7 100644
--- a/sfx2/uiconfig/ui/helpwindow.ui
+++ b/sfx2/uiconfig/ui/helpwindow.ui
@@ -20,7 +20,7 @@
 
   
   
-True
+False
 False
   
 
@@ -43,7 +43,6 @@
 True
 False
 icons
-False
 
   
 True
@@ -196,7 +195,7 @@
   
   
 True
-True
+False
   
 
   
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2021-01-15 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/TabBar.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 994b4232f114f8d75cb32a5b1e701b6c78fd9be4
Author: Caolán McNamara 
AuthorDate: Fri Jan 15 11:47:57 2021 +
Commit: Xisco Fauli 
CommitDate: Fri Jan 15 19:09:35 2021 +0100

Resolves: rhbz#1916640 pFocusWin can be null

Change-Id: Ib901b1d849b2e54c61bd3e8626eb8262e73b832d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109359
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 4f49bd461364..47c59f15ec32 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -302,8 +302,8 @@ Image TabBar::GetItemImage(const DeckDescriptor& 
rDeckDescriptor) const
 
 IMPL_LINK_NOARG(TabBar::Item, HandleClick, Button*, void)
 {
-vcl::Window* pFocusWin = Application::GetFocusWindow();
-pFocusWin->GrabFocusToDocument();
+if (vcl::Window* pFocusWin = Application::GetFocusWindow())
+pFocusWin->GrabFocusToDocument();
 try
 {
 maDeckActivationFunctor(msDeckId);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2021-01-07 Thread Stephan Bergmann (via logerrit)
 sfx2/source/dialog/versdlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6bf4d1ed9193f16ec75e2daf62ac4d723cd5a0fa
Author: Stephan Bergmann 
AuthorDate: Wed Jan 6 18:23:37 2021 +0100
Commit: Caolán McNamara 
CommitDate: Thu Jan 7 22:07:28 2021 +0100

Missing construction of SfxCmisVersionsDialog::m_xVersionBox

...ever since b1baf73dc671069bedec18d170f8199b0766ea60 "weld
SfxCmisVersionsDialog".  (Found by GCC 11 trunk with --enable-optimized,

> sfx2/source/dialog/versdlg.cxx: In constructor 
‘SfxCmisVersionsDialog::SfxCmisVersionsDialog(weld::Window*, SfxViewFrame*)’:
> sfx2/source/dialog/versdlg.cxx:435:36: error: ‘this’ pointer null 
[-Werror=nonnull]
>   435 | 
m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 
90,
>   | 
~~~^~~
>   436 | 
m_xVersionBox->get_height_rows(15));
>   | 
~~~

)

Change-Id: I2720d6bc49af717951a0af6a262fb013a27e09df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108886
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 29e36c699c610be4fe6f8a2fe21ae3e4c8bdbd38)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108909
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 68abca31ba61..88a1f3115e39 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -432,6 +432,7 @@ SfxCmisVersionsDialog::SfxCmisVersionsDialog(weld::Window* 
pParent, SfxViewFrame
 , m_xViewButton(m_xBuilder->weld_button("show"))
 , m_xDeleteButton(m_xBuilder->weld_button("delete"))
 , m_xCompareButton(m_xBuilder->weld_button("compare"))
+, m_xVersionBox(m_xBuilder->weld_tree_view("versions"))
 {
 
m_xVersionBox->set_size_request(m_xVersionBox->get_approximate_digit_width() * 
90,
 m_xVersionBox->get_height_rows(15));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-12-23 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/templatedlg.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 99a86cdf098e68d0a35f6a9af06ffe8c8e03c905
Author: Caolán McNamara 
AuthorDate: Fri Dec 18 13:16:18 2020 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Wed Dec 23 08:59:23 2020 +0100

Delete Category dialog includes '~' text in the titlebar

Change-Id: I8581e5219ffc690e686a0d563463c19b682ea04b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107911
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 3979db7cf573..6ccff8f7a655 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -1124,7 +1125,7 @@ void SfxTemplateManagerDlg::OnCategoryDelete()
 SfxTemplateCategoryDialog aDlg(m_xDialog.get());
 aDlg.SetCategoryLBEntries(mxLocalView->getFolderNames());
 aDlg.HideNewCategoryOption();
-aDlg.set_title(SfxResId(STR_CATEGORY_DELETE));
+
aDlg.set_title(MnemonicGenerator::EraseAllMnemonicChars(SfxResId(STR_CATEGORY_DELETE)));
 aDlg.SetSelectLabelText(SfxResId(STR_CATEGORY_SELECT));
 
 if (aDlg.run() == RET_OK)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-12-17 Thread Caolán McNamara (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 871940eba642bec3cc263b48048ee4ffbf8a6c0f
Author: Caolán McNamara 
AuthorDate: Tue Dec 15 14:51:47 2020 +
Commit: Xisco Fauli 
CommitDate: Thu Dec 17 13:49:50 2020 +0100

tdf#138935 rsDeckId is invalid by the time collectUIInformation is called

Change-Id: I4afc1ed1bbbfbbd510617a51b9aa6d627471d80d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107706
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 68066f4f4918..b890f9950f56 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -608,6 +608,8 @@ void SidebarController::OpenThenToggleDeck (
 }
 }
 RequestOpenDeck();
+// before SwitchToDeck which may cause the rsDeckId string to be released
+collectUIInformation(rsDeckId);
 SwitchToDeck(rsDeckId);
 
 // Make sure the sidebar is wide enough to fit the requested content
@@ -618,8 +620,6 @@ void SidebarController::OpenThenToggleDeck (
 if (mnSavedSidebarWidth < nRequestedWidth)
 SetChildWindowWidth(nRequestedWidth);
 }
-
-collectUIInformation(rsDeckId);
 }
 
 void SidebarController::OpenThenSwitchToDeck (
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-12-11 Thread Aron Budea (via logerrit)
 sfx2/source/sidebar/SidebarController.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit d0f3639a5a91ff69e5a0c8883cabb8558803ec85
Author: Aron Budea 
AuthorDate: Wed Dec 9 18:39:54 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Dec 11 10:56:12 2020 +0100

tdf#138762: crash when trying to open sidebar w chart in Writer

In Writer when in chart edit mode, and the chart is deselected,
the object selection remains. Opening Properties sidebar at
this point crashed. Calc and Impress were unaffected.

Regression from b5fdb148fe87a90f3e586efcea7aa6ef865fa42a

Change-Id: I356c3a42c41dd38e4739df27c72c6d67722b1dbc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107500
Tested-by: Jenkins
Reviewed-by: Aron Budea 
(cherry picked from commit 7e5991dc695d1e590483615c2907811ce4117834)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107543
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 08606a83f9dc..68066f4f4918 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -611,10 +611,13 @@ void SidebarController::OpenThenToggleDeck (
 SwitchToDeck(rsDeckId);
 
 // Make sure the sidebar is wide enough to fit the requested content
-sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth())
-* mpTabBar->GetDPIScaleFactor();
-if (mnSavedSidebarWidth < nRequestedWidth)
-SetChildWindowWidth(nRequestedWidth);
+if (mpCurrentDeck && mpTabBar)
+{
+sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + 
TabBar::GetDefaultWidth())
+* mpTabBar->GetDPIScaleFactor();
+if (mnSavedSidebarWidth < nRequestedWidth)
+SetChildWindowWidth(nRequestedWidth);
+}
 
 collectUIInformation(rsDeckId);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-11-24 Thread Tor Lillqvist (via logerrit)
 sfx2/source/doc/docfile.cxx |   10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 6b55436aa93be01086c93a66b20aa73ab455aa71
Author: Tor Lillqvist 
AuthorDate: Mon Nov 16 00:43:37 2020 +
Commit: Caolán McNamara 
CommitDate: Tue Nov 24 10:02:29 2020 +0100

Avoid unused parameter 'pImpl'

Change-Id: I8dd30ed3a0e5340b32ce4399dd05cc57e2b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105962
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106258
Tested-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106457
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 09c6f8cbb6ed..57a85ffe16a8 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3620,10 +3620,12 @@ OUString GetLogicBase(std::unique_ptr 
const & pImpl)
 {
 OUString aLogicBase;
 
-// In a sandboxed environment we don't want to attempt to create temporary 
files in the same
-// directory where the user has selected an output file to be stored. The 
sandboxed process has
-// permission only to create the specifically named output file in that 
directory.
-#if !HAVE_FEATURE_MACOSX_SANDBOX
+#if HAVE_FEATURE_MACOSX_SANDBOX
+// In a sandboxed environment we don't want to attempt to create temporary 
files in the same
+// directory where the user has selected an output file to be stored. The 
sandboxed process has
+// permission only to create the specifically named output file in that 
directory.
+(void) pImpl;
+#else
 
 if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-10-30 Thread Noel Grandin (via logerrit)
 sfx2/source/dialog/templdlg.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e25ba916316a88c5652810108e3fdace0ad2f4d5
Author: Noel Grandin 
AuthorDate: Thu Oct 29 19:55:37 2020 +0200
Commit: Noel Grandin 
CommitDate: Fri Oct 30 09:03:21 2020 +0100

tdf#137754 Crash in styles tree in sidebar in impress

this is a timing bug - easier to hit on a slow machine,
or with a debug build - it happens when mouse movement
triggers a request for a tooltip in the tree, but the tree
is in a transition state.

Change-Id: Ibed7ffd01483b26f2debb1aa9cc99e23b38ba950
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105025
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 9f6fbe36da3d53df0b64c41e9ea51cc20d442a30)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104962
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 4ca4b292cfbf..40851576fe78 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -241,6 +241,8 @@ IMPL_LINK(SfxCommonTemplateDialog_Impl, QueryTooltipHdl, 
const weld::TreeIter&,
 OUString sQuickHelpText(aTemplName);
 
 const SfxStyleFamilyItem* pItem = GetFamilyItem_Impl();
+if (!pItem)
+return sQuickHelpText;
 SfxStyleSheetBase* pStyle = pStyleSheetPool->Find(aTemplName, 
pItem->GetFamily());
 
 if (pStyle && pStyle->IsUsed())  // pStyle is in use in the document?
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source vcl/qt5

2020-10-28 Thread Jan-Marek Glogowski (via logerrit)
 sfx2/source/dialog/backingwindow.cxx |   99 ++-
 sfx2/source/dialog/backingwindow.hxx |8 ++
 vcl/qt5/Qt5Frame.cxx |7 ++
 3 files changed, 76 insertions(+), 38 deletions(-)

New commits:
commit 804f051e8504338ada4ab1fe958aa7fc66a1297c
Author: Jan-Marek Glogowski 
AuthorDate: Fri Oct 23 18:43:25 2020 +0200
Commit: Michael Weghorn 
CommitDate: Wed Oct 28 15:26:51 2020 +0100

tdf#136555 apply window bg color for button boxes

The default background color of the frame is APPBACKGROUND, which
is matched to GetWorkspaceColor(). That color is visible in Writer
as the default document workspace background.

Originally I just saw the dark background of the button box in the
start center, and thought the workspace color in Qt is wrong and
changed it in the reverted commit, missing the change of the color
around the Writer document.

Now that the button boxes's background color isn't fixed via the
"branding" setting, we also must react to changed style settings,
so we override the DataChanged function.

This also reverts commit ef267dc5c1e46d236478ff32fc14925a0eeb0266.

Regressed-by: a927e0964ba0442d53fffb22c577e54bcf183ed7
Change-Id: I62396355054523baef1197a8a8af61c2f0d29ef3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104743
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/sfx2/source/dialog/backingwindow.cxx 
b/sfx2/source/dialog/backingwindow.cxx
index 7ee1b63e7604..caff3c45a832 100644
--- a/sfx2/source/dialog/backingwindow.cxx
+++ b/sfx2/source/dialog/backingwindow.cxx
@@ -63,7 +63,7 @@ using namespace ::com::sun::star::document;
 const char SERVICENAME_CFGREADACCESS[] = 
"com.sun.star.configuration.ConfigurationAccess";
 
 // increase size of the text in the buttons on the left fMultiplier-times
-float const fMultiplier = 1.4f;
+float const g_fMultiplier = 1.4f;
 
 BackingWindow::BackingWindow( vcl::Window* i_pParent ) :
 Window( i_pParent ),
@@ -227,43 +227,82 @@ void BackingWindow::initControls()
 mpLocalView->SetStyle( mpLocalView->GetStyle() | WB_VSCROLL);
 mpLocalView->Hide();
 
-mpTemplateButton->SetDelayMenu(true);
-mpTemplateButton->SetDropDown(PushButtonDropdownStyle::SplitMenuButton);
-mpRecentButton->SetDelayMenu(true);
-mpRecentButton->SetDropDown(PushButtonDropdownStyle::SplitMenuButton);
-
 //set handlers
 mpLocalView->setCreateContextMenuHdl(LINK(this, BackingWindow, 
CreateContextMenuHdl));
 mpLocalView->setOpenTemplateHdl(LINK(this, BackingWindow, 
OpenTemplateHdl));
 mpLocalView->setEditTemplateHdl(LINK(this, BackingWindow, 
EditTemplateHdl));
 mpLocalView->ShowTooltips( true );
 
-setupButton( mpOpenButton );
-setupButton( mpRemoteButton );
-setupButton( mpRecentButton );
-setupButton( mpTemplateButton );
-setupButton( mpWriterAllButton );
-setupButton( mpDrawAllButton );
-setupButton( mpCalcAllButton );
-setupButton( mpDBAllButton );
-setupButton( mpImpressAllButton );
-setupButton( mpMathAllButton );
-
 checkInstalledModules();
 
 mpExtensionsButton->SetClickHdl(LINK(this, BackingWindow, 
ExtLinkClickHdl));
 
-// setup nice colors
-vcl::Font 
aFont(mpCreateLabel->GetSettings().GetStyleSettings().GetLabelFont());
-aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * fMultiplier));
-mpCreateLabel->SetControlFont(aFont);
+mpOpenButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpRemoteButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpWriterAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpDrawAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpCalcAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpDBAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpImpressAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+mpMathAllButton->SetClickHdl(LINK(this, BackingWindow, ClickHdl));
+
+setupMenuButton(mpRecentButton);
+setupMenuButton(mpTemplateButton);
+
+ApplyStyleSettings();
+}
+
+void BackingWindow::DataChanged(const DataChangedEvent& rDCEvt)
+{
+if ((rDCEvt.GetType() != DataChangedEventType::SETTINGS)
+|| !(rDCEvt.GetFlags() & AllSettingsFlags::STYLE))
+{
+vcl::Window::DataChanged(rDCEvt);
+return;
+}
+
+ApplyStyleSettings();
+Invalidate();
+}
+
+template 
+void BackingWindow::setLargerFont(WidgetClass& pWidget, const vcl::Font& rFont)
+{
+vcl::Font aFont(rFont);
+aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * g_fMultiplier));
+pWidget->SetControlFont(aFont);
+}
+
+void BackingWindow::ApplyStyleSettings()
+{
+const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
+const Color aButtonsBackground(rStyleSettings.GetWindowColor());
+const vcl::Font& 

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source sw/qa

2020-10-28 Thread Bartosz Kosiorek (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx   |7 +++---
 sw/qa/extras/ooxmlexport/data/custom-properties.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport2.cxx|   20 +++
 3 files changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 966880403f6b9b58d53b7b6e0da9520cdfdc0baa
Author: Bartosz Kosiorek 
AuthorDate: Tue Oct 20 18:58:34 2020 +0200
Commit: Michael Stahl 
CommitDate: Wed Oct 28 09:39:51 2020 +0100

tdf#116214 Allow for scientific notation in Custom Properties

To keep compatibility with OOXML format, it should be allowed
to use Scientific Format in Custom Properties.
The solution is backward compatible with standard numbers
(it is still possible to write integer numbers and fractions).

With that fix it is also possible to store very small and very big
numbers in scientific notation.

Change-Id: Ic788a6e3f4f748b905828f3d6c8c40dc7e46ba52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104569
Tested-by: Jenkins
Reviewed-by: Eike Rathke 
(cherry picked from commit b73151c8f8fd4e67dc5674ebb6538783bdfb91df)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104842
Reviewed-by: Michael Stahl 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 0d1fac1a9622..0d09643680d4 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1408,15 +1408,16 @@ bool CustomPropertiesWindow::IsLineValid( 
CustomPropertyLine* pLine ) const
 if ( sValue.isEmpty() )
 return true;
 
-sal_uInt32 nIndex = 0x;
+sal_uInt32 nIndex = NUMBERFORMAT_ENTRY_NOT_FOUND;
 if ( CUSTOM_TYPE_NUMBER == nType )
+// tdf#116214 Scientific format allows to use also standard numbers
 nIndex = const_cast< SvNumberFormatter& >(
-m_aNumberFormatter ).GetFormatIndex( NF_NUMBER_SYSTEM );
+m_aNumberFormatter ).GetFormatIndex( NF_SCIENTIFIC_000E00 );
 else if ( CUSTOM_TYPE_DATE == nType )
 nIndex = const_cast< SvNumberFormatter& >(
 m_aNumberFormatter).GetFormatIndex( NF_DATE_SYS_DDMM );
 
-if ( nIndex != 0x )
+if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND )
 {
 sal_uInt32 nTemp = nIndex;
 double fDummy = 0.0;
diff --git a/sw/qa/extras/ooxmlexport/data/custom-properties.docx 
b/sw/qa/extras/ooxmlexport/data/custom-properties.docx
index 4d104cb26824..01db34977baa 100644
Binary files a/sw/qa/extras/ooxmlexport/data/custom-properties.docx and 
b/sw/qa/extras/ooxmlexport/data/custom-properties.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
index 5f160fab6007..8149a444e8f0 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport2.cxx
@@ -94,14 +94,14 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCustomProperties, 
"custom-properties.doc
 assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:Characters", "22");
 assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:CharactersWithSpaces", 
"24");
 assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:Company", "kompany");
-assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:Manager", "menadzer");
+assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:Manager", 
"menadzer;isecondmanager");
 assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:HyperlinkBase", 
"hiperlink");
 //assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:DocSecurity", "2");
 assertXPathContent(pXmlDoc, 
"/extended-properties:Properties/extended-properties:AppVersion", "15.");
 
 // Custom file properties - defined by user
 xmlDocUniquePtr pCustomXml = parseExport("docProps/custom.xml");
-assertXPath(pCustomXml, 
"/custom-properties:Properties/custom-properties:property", 8);
+assertXPath(pCustomXml, 
"/custom-properties:Properties/custom-properties:property", 9);
 assertXPath(pCustomXml, 
"/custom-properties:Properties/custom-properties:property[1]",
 "name", "testDateProperty");
 assertXPathContent(pCustomXml, 
"/custom-properties:Properties/custom-properties:property[1]/vt:filetime",
@@ -119,22 +119,26 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testCustomProperties, 
"custom-properties.doc
 assertXPathContent(pCustomXml, 
"/custom-properties:Properties/custom-properties:property[5]/vt:r8",
"-128.1");
 assertXPath(pCustomXml, 
"/custom-properties:Properties/custom-properties:property[6]",
+"name", "testScientificNumber");
+assertXPathContent(pCustomXml, 
"/custom-properties:Properties/custom-properties:property[6]/vt:r8",
+   "1.23456789E+023");
+

[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source sw/source

2020-10-27 Thread Srijan Bhatia (via logerrit)
 sfx2/source/view/viewprn.cxx |   10 +-
 sw/source/core/doc/doc.cxx   |4 +---
 2 files changed, 2 insertions(+), 12 deletions(-)

New commits:
commit fdfd3638a3a2ca099cc47f8eb0d449f4c64fd200
Author: Srijan Bhatia 
AuthorDate: Thu Jul 30 16:43:01 2020 +0530
Commit: Xisco Fauli 
CommitDate: Tue Oct 27 18:37:19 2020 +0100

tdf#135082 fix print selection

Change-Id: Id4d48f25161aac20e8594b5e32c5dbe09e78ccc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99790
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104879

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index 4db985c961d9..dabb57c27b4f 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -190,20 +190,12 @@ const Any& SfxPrinterController::getSelectionObject() 
const
 return bSel ? maSelection : maCompleteSelection;
 }
 
-bool bIsCalc = false;
-pVal = getValue( OUString( "PrintRange" ) );
-if ( pVal )
-bIsCalc = true;
-
 sal_Int32 nChoice = 0;
 pVal = getValue( OUString( "PrintContent" ) );
 if( pVal )
 pVal->Value >>= nChoice;
 
-if ( bIsCalc )
-return (nChoice > 1) ? maSelection : maCompleteSelection;
-else
-return (nChoice > 3) ? maSelection : maCompleteSelection;
+return (nChoice > 1) ? maSelection : maCompleteSelection;
 }
 
 Sequence< beans::PropertyValue > SfxPrinterController::getMergedOptions() const
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 3609e634e598..b850b2c8ac4e 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -721,9 +721,7 @@ void SwDoc::CalculatePagesForPrinting(
 // PageContent :
 // 0 -> print all pages (default if aPageRange is empty)
 // 1 -> print range according to PageRange
-// 2 -> print even pages
-// 3 -> print odd pages
-// 4 -> print selection
+// 2 -> print selection
 if (1 == nContent)
 aPageRange = rOptions.getStringValue( "PageRange" );
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-10-17 Thread Vasily Melenchuk (via logerrit)
 sfx2/source/doc/objstor.cxx |   33 ++---
 1 file changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 0de0b1b64a1c122254bb821ea0eb9b038875e8d4
Author: Vasily Melenchuk 
AuthorDate: Sat Oct 17 10:00:04 2020 +0300
Commit: Caolán McNamara 
CommitDate: Sat Oct 17 20:57:54 2020 +0200

tdf#133771: remove encryption data during SaveAs

If document was password protected but during SaveAs it wasn't
selected to use a password we should remove EcnryptionData.

But we should not do this unconditionally: in general case we should
try to keep all encryption metadata.

Change-Id: Id91a88790deccd7377fb5d394b36395d13748c31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104454
Tested-by: Thorsten Behrens 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit dd4670b976b00d643f335516fe5fd0c880d58025)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104345
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 308ab1dfd0d4..fd405517265f 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2787,11 +2787,38 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& 
rFileName, const OUString&
 // in "SaveAs" title and password will be cleared ( maybe the new itemset 
contains new values, otherwise they will be empty )
 // #i119366# - As the SID_ENCRYPTIONDATA and SID_PASSWORD are using for 
setting password together, we need to clear them both.
 // Also, ( maybe the new itemset contains new values, otherwise they will 
be empty )
-if (xMergedParams->HasItem( SID_PASSWORD ))
+if (xMergedParams->HasItem(SID_ENCRYPTIONDATA))
 {
-xMergedParams->ClearItem( SID_PASSWORD );
-xMergedParams->ClearItem( SID_ENCRYPTIONDATA );
+bool bPasswordProtected = true;
+const SfxUnoAnyItem* pEncryptionDataItem
+= xMergedParams->GetItem(SID_ENCRYPTIONDATA, false);
+if (pEncryptionDataItem)
+{
+uno::Sequence aEncryptionData;
+pEncryptionDataItem->GetValue() >>= aEncryptionData;
+for (const auto& rItem : std::as_const(aEncryptionData))
+{
+if (rItem.Name == "CryptoType")
+{
+OUString aValue;
+rItem.Value >>= aValue;
+if (aValue != "StrongEncryptionDataSpace")
+{
+// This is not just a password protected document. 
Let's keep encryption data as is.
+bPasswordProtected = false;
+}
+break;
+}
+}
+}
+if (bPasswordProtected)
+{
+// For password protected documents remove encryption data during 
"Save as..."
+xMergedParams->ClearItem(SID_PASSWORD);
+xMergedParams->ClearItem(SID_ENCRYPTIONDATA);
+}
 }
+
 xMergedParams->ClearItem( SID_DOCINFO_TITLE );
 
 xMergedParams->ClearItem( SID_INPUTSTREAM );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-10-01 Thread Caolán McNamara (via logerrit)
 sfx2/source/dialog/templdlg.cxx |9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 0f77b8a44e7ee5541c97304d37f0c52cd8275cba
Author: Caolán McNamara 
AuthorDate: Thu Sep 17 12:14:25 2020 +0100
Commit: Miklos Vajna 
CommitDate: Thu Oct 1 09:54:03 2020 +0200

tdf#134598 call FmtSelect to update watercan

Change-Id: Idd88acfdaac66b999b0bcd8cf0a4fe69f7ae6ac5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102926
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 03da396a51b5..4ca4b292cfbf 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -868,7 +868,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const 
OUString , bool bIsCal
 {
 mxTreeBox->scroll_to_row(*xEntry);
 mxTreeBox->select(*xEntry);
-return;
+break;
 }
 bEntry = mxTreeBox->iter_next(*xEntry);
 }
@@ -894,7 +894,6 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const 
OUString , bool bIsCal
 mxFmtLb->unselect_all();
 mxFmtLb->scroll_to_row(*xEntry);
 mxFmtLb->select(*xEntry);
-FmtSelect(nullptr, bIsCallback);
 }
 }
 }
@@ -910,6 +909,12 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const 
OUString , bool bIsCal
 }
 
 bWaterDisabled = !IsSafeForWaterCan();
+
+if (!bIsCallback)
+{
+// tdf#134598 call FmtSelect to update watercan
+FmtSelect(nullptr, false);
+}
 }
 
 OUString SfxCommonTemplateDialog_Impl::GetSelectedEntry() const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-08-28 Thread Julien Nabet (via logerrit)
 sfx2/source/view/viewfrm.cxx |   27 ---
 1 file changed, 16 insertions(+), 11 deletions(-)

New commits:
commit 4db16b2dc835cce918623343b87eab6b067f3023
Author: Julien Nabet 
AuthorDate: Wed Aug 26 11:00:16 2020 +0200
Commit: Caolán McNamara 
CommitDate: Fri Aug 28 17:15:01 2020 +0200

tdf#136133: AppendInfoBar can return null

2 cases:
1) When set Donate property to false value in 
/org.openoffice.Office.UI.Infobar/Enabled
 and LastTimeDonateShow with 1 in /org.openoffice.Setup/Product (Expert 
Configuration)
See https://bugs.documentfoundation.org/attachment.cgi?id=164702

2) GetInvolved = false and LastTimeGetInvolved = 1
See https://bugs.documentfoundation.org/attachment.cgi?id=164703

Change-Id: I2da22616fb6f3fb4e42bf6b5e5c29cc094dc2fd6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101391
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit be4fcac736fccce8ee7d4550a860b0127e7601bb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101456
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 3a0572058932..39b1c911778d 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1331,11 +1331,14 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, 
const SfxHint& rHint )
 
 VclPtr pInfoBar = 
AppendInfoBar("getinvolved", "", SfxResId(STR_GET_INVOLVED_TEXT), 
InfobarType::INFO);
 
-VclPtrInstance 
xGetInvolvedButton(());
-
xGetInvolvedButton->SetText(SfxResId(STR_GET_INVOLVED_BUTTON));
-
xGetInvolvedButton->SetSizePixel(xGetInvolvedButton->GetOptimalSize());
-xGetInvolvedButton->SetClickHdl(LINK(this, SfxViewFrame, 
GetInvolvedHandler));
-pInfoBar->addButton(xGetInvolvedButton);
+if (pInfoBar)
+{
+VclPtrInstance 
xGetInvolvedButton(());
+
xGetInvolvedButton->SetText(SfxResId(STR_GET_INVOLVED_BUTTON));
+
xGetInvolvedButton->SetSizePixel(xGetInvolvedButton->GetOptimalSize());
+xGetInvolvedButton->SetClickHdl(LINK(this, 
SfxViewFrame, GetInvolvedHandler));
+pInfoBar->addButton(xGetInvolvedButton);
+}
 }
 
 if (bUpdateLastTimeGetInvolvedShown
@@ -1357,12 +1360,14 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, 
const SfxHint& rHint )
 bUpdateLastTimeDonateShown = true;
 
 VclPtr pInfoBar = 
AppendInfoBar("donate", "", SfxResId(STR_DONATE_TEXT), InfobarType::INFO);
-
-VclPtrInstance xDonateButton(());
-xDonateButton->SetText(SfxResId(STR_DONATE_BUTTON));
-
xDonateButton->SetSizePixel(xDonateButton->GetOptimalSize());
-xDonateButton->SetClickHdl(LINK(this, SfxViewFrame, 
DonationHandler));
-pInfoBar->addButton(xDonateButton);
+if (pInfoBar)
+{
+VclPtrInstance xDonateButton(());
+xDonateButton->SetText(SfxResId(STR_DONATE_BUTTON));
+
xDonateButton->SetSizePixel(xDonateButton->GetOptimalSize());
+xDonateButton->SetClickHdl(LINK(this, SfxViewFrame, 
DonationHandler));
+pInfoBar->addButton(xDonateButton);
+}
 }
 
 if (bUpdateLastTimeDonateShown
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-08-05 Thread Julien Nabet (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |   12 ++--
 1 file changed, 2 insertions(+), 10 deletions(-)

New commits:
commit e2ce8ae7b9f84d1862b3dd95e4d4e7b27a70b752
Author: Julien Nabet 
AuthorDate: Wed Aug 5 23:41:29 2020 +0200
Commit: Eike Rathke 
CommitDate: Thu Aug 6 00:42:55 2020 +0200

Revert "tdf#130863: autoredact, disable useless checkboxes for regex"

This reverts commit b53fbe19dfd39d27868d616afb4f743b1237229b.

See details here:
https://bugs.documentfoundation.org/show_bug.cgi?id=130863#c26

Change-Id: I431094784106c9aad2a11b37b5ea849ba924b60f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100191
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 
(cherry picked from commit f615a3366e502884a15bbbf07c2fb1e70eb9dbfa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100210
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 868fc73cc538..19d1923b21ac 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -695,18 +695,10 @@ IMPL_LINK_NOARG(SfxAddTargetDialog, SelectTypeHdl, 
weld::ComboBox&, void)
 m_xLabelContent->set_visible(true);
 m_xContent->set_sensitive(true);
 m_xContent->set_visible(true);
+m_xWholeWords->set_sensitive(true);
 m_xWholeWords->set_visible(true);
+m_xCaseSensitive->set_sensitive(true);
 m_xCaseSensitive->set_visible(true);
-if (m_xType->get_active_id() == "regex")
-{
-m_xWholeWords->set_sensitive(false);
-m_xCaseSensitive->set_sensitive(false);
-}
-else
-{
-m_xWholeWords->set_sensitive(true);
-m_xCaseSensitive->set_sensitive(true);
-}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-07-30 Thread Julien Nabet (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 20a87b075e868ebe036e3e6d0930eb2ee501c334
Author: Julien Nabet 
AuthorDate: Wed Jul 22 13:09:23 2020 +0200
Commit: Caolán McNamara 
CommitDate: Thu Jul 30 13:03:31 2020 +0200

tdf#128838: autoredact, change Content UI according to Type when editing 
target

Change-Id: I99806c7a7629329a98ade23a3ad1f4c4921ec3ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99213
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit c61f3f47280334c9589fe37742cad93501540857)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99208
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index d95b44169eef..868fc73cc538 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -745,6 +745,7 @@ SfxAddTargetDialog::SfxAddTargetDialog(weld::Window* 
pParent, const OUString& sN
 m_xName->select_region(0, sName.getLength());
 
 m_xType->set_active_id(getTypeID(eTargetType));
+m_xType->connect_changed(LINK(this, SfxAddTargetDialog, SelectTypeHdl));
 
 if (eTargetType == RedactionTargetType::REDACTION_TARGET_PREDEFINED)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-07-30 Thread Julien Nabet (via logerrit)
 sfx2/source/doc/autoredactdialog.cxx |   12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 2d2d9e65104f0d6a1ebaed69fa604905be401438
Author: Julien Nabet 
AuthorDate: Wed Jul 22 15:42:29 2020 +0200
Commit: Caolán McNamara 
CommitDate: Thu Jul 30 12:50:26 2020 +0200

tdf#130863: autoredact, disable useless checkboxes for regex

Change-Id: Ic2bebfb24b8630c6135500a872eb6d6dee7935f2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99227
Tested-by: Jenkins
Reviewed-by: Julien Nabet 
(cherry picked from commit b53fbe19dfd39d27868d616afb4f743b1237229b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99201
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/autoredactdialog.cxx 
b/sfx2/source/doc/autoredactdialog.cxx
index 95780bde8320..d95b44169eef 100644
--- a/sfx2/source/doc/autoredactdialog.cxx
+++ b/sfx2/source/doc/autoredactdialog.cxx
@@ -695,10 +695,18 @@ IMPL_LINK_NOARG(SfxAddTargetDialog, SelectTypeHdl, 
weld::ComboBox&, void)
 m_xLabelContent->set_visible(true);
 m_xContent->set_sensitive(true);
 m_xContent->set_visible(true);
-m_xWholeWords->set_sensitive(true);
 m_xWholeWords->set_visible(true);
-m_xCaseSensitive->set_sensitive(true);
 m_xCaseSensitive->set_visible(true);
+if (m_xType->get_active_id() == "regex")
+{
+m_xWholeWords->set_sensitive(false);
+m_xCaseSensitive->set_sensitive(false);
+}
+else
+{
+m_xWholeWords->set_sensitive(true);
+m_xCaseSensitive->set_sensitive(true);
+}
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-07-21 Thread Pierre MARTY (via logerrit)
 sfx2/source/doc/guisaveas.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 68880474423c4e2b22cdc2a25b64750863a9023f
Author: Pierre MARTY 
AuthorDate: Fri Apr 17 19:01:41 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Tue Jul 21 16:47:57 2020 +0200

tdf#121191 Fix PDF viewer after "Export..."

* Add '.pdf' file extension detection:
| if the file is actually a PDF then modify the 
'nStoreMode' value
| to 'EXPORT_REQUESTED | PDFEXPORT_REQUESTED'

Change-Id: I2c950dc424fd62f004bb3eb6860621561669f547
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92715
Tested-by: Jenkins
Reviewed-by: Pierre Marty 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99143
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
old mode 100644
new mode 100755
index eb94e0873e6e..bb4b0fb7f838
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1601,12 +1601,18 @@ bool SfxStoringHelper::GUIStoreModel( const 
uno::Reference< frame::XModel >& xMo
 aModelData.GetMediaDescr().find( 
OUString("FilterFlags") );
 bool bFilterFlagsSet = ( aIter != aModelData.GetMediaDescr().end() );
 
+// check if the filter Dialog has not been called before
 if( !( nStoreMode & PDFEXPORT_REQUESTED ) && !( nStoreMode & 
EPUBEXPORT_REQUESTED ) && !bFilterFlagsSet
 && ( ( nStoreMode & EXPORT_REQUESTED ) || bUseFilterOptions ) )
 {
 // execute filter options dialog
 if ( aModelData.ExecuteFilterDialog_Impl( aFilterName ) )
+{
 bDialogUsed = true;
+// check if the file is a pdf or not and change the storing mode 
at convenience
+if (aFilterName.endsWith("pdf_Export"))
+nStoreMode = EXPORT_REQUESTED | PDFEXPORT_REQUESTED;
+}
 }
 
 // so the arguments will not change any more and can be stored to the main 
location
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-07-10 Thread Michael Stahl (via logerrit)
 sfx2/source/doc/objstor.cxx |   30 ++
 1 file changed, 30 insertions(+)

New commits:
commit a24a4cc1838e3a2d55261a8edf6cb63186f4c38f
Author: Michael Stahl 
AuthorDate: Fri Jul 10 14:30:34 2020 +0200
Commit: Thorsten Behrens 
CommitDate: Fri Jul 10 22:22:32 2020 +0200

tdf#134582 sfx2: when storing, set Version on embedded object storage

This previously wasn't needed because there was only one version for
which it was checked (1.2) but since commit
a541cd91951eca15e40764244b34c72b347f9f26 there's a second version so
when loading an existing embedded object in one version and storing it
in another, the Version must be updated so the attribute in
META-INF/manifest.xml matches the one in content.xml.

Change-Id: Ic2fc303c6f6bc254050d531d578029377976ecb5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98521
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98459
Reviewed-by: Thorsten Behrens 

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 846e68700814..308ab1dfd0d4 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -969,6 +969,36 @@ bool SfxObjectShell::DoSave()
 
 pImpl->bIsSaving = true;
 
+if (IsOwnStorageFormat(*GetMedium()))
+{
+SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = 
SvtSaveOptions::ODFSVER_013;
+if (!utl::ConfigManager::IsFuzzing())
+{
+SvtSaveOptions aSaveOpt;
+nDefVersion = aSaveOpt.GetODFSaneDefaultVersion();
+}
+uno::Reference const 
xProps(GetMedium()->GetStorage(), uno::UNO_QUERY);
+assert(xProps.is());
+if (nDefVersion >= SvtSaveOptions::ODFSVER_012) // property exists 
only since ODF 1.2
+{
+try // tdf#134582 set Version on embedded objects as they
+{   // could have been loaded with a different/old version
+if (SvtSaveOptions::ODFSVER_013 <= nDefVersion)
+{
+xProps->setPropertyValue("Version", 
uno::makeAny(ODFVER_013_TEXT));
+}
+else
+{
+xProps->setPropertyValue("Version", 
uno::makeAny(ODFVER_012_TEXT));
+}
+}
+catch (uno::Exception&)
+{
+TOOLS_WARN_EXCEPTION("sfx.doc", "SfxObjectShell::DoSave");
+}
+}
+}
+
 uno::Sequence< beans::NamedValue > aEncryptionData;
 if ( IsPackageStorageFormat_Impl( *GetMedium() ) )
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-07-02 Thread Jan-Marek Glogowski (via logerrit)
 sfx2/source/sidebar/PanelLayout.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ee8229381a73210856ef2f54f035b70d9c5c7207
Author: Jan-Marek Glogowski 
AuthorDate: Wed Jul 1 23:26:59 2020 +0200
Commit: Adolfo Jayme Barrientos 
CommitDate: Thu Jul 2 08:22:03 2020 +0200

Fix PanelLayout Task::SetPriority warning

SetStyle will tigger a resize event, which in turn will start the
m_aPanelLayoutIdle, before it's actually prepared, resulting in
the Task::SetPriority SAL_WARN_IF triggering.

Change-Id: Ide48d6004e242cf75bb48dc9f5e8dc3aa5ff809b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97664
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 
(cherry picked from commit fc8cf3afa29909a6c37beaf8021c531ae12773da)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97671
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sfx2/source/sidebar/PanelLayout.cxx 
b/sfx2/source/sidebar/PanelLayout.cxx
index e4cf889b02ff..6a333819274b 100644
--- a/sfx2/source/sidebar/PanelLayout.cxx
+++ b/sfx2/source/sidebar/PanelLayout.cxx
@@ -21,11 +21,12 @@ PanelLayout::PanelLayout(vcl::Window* pParent, const 
OString& rID, const OUStrin
 , m_bInClose(false)
 , mxFrame(rFrame)
 {
-SetStyle(GetStyle() | WB_DIALOGCONTROL);
 m_aPanelLayoutIdle.SetPriority(TaskPriority::RESIZE);
 m_aPanelLayoutIdle.SetInvokeHandler( LINK( this, PanelLayout, 
ImplHandlePanelLayoutTimerHdl ) );
 m_aPanelLayoutIdle.SetDebugName("sfx2::PanelLayout m_aPanelLayoutIdle");
 
+SetStyle(GetStyle() | WB_DIALOGCONTROL);
+
 // Builder will trigger resize and start Idle
 m_xVclContentArea = VclPtr::Create(this);
 m_xVclContentArea->Show();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-06-19 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objmisc.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit ac65ade24aa10c0a39d7d38576ad54bd00724455
Author: Caolán McNamara 
AuthorDate: Mon Jun 8 21:22:58 2020 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jun 19 17:14:31 2020 +0200

tdf#128006 allow documents inside odbs to be as trusted as their container

Change-Id: Id19d3805ef2e3282c1a8e89dd8edcccbf4ac4db6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96210
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index e3e07dd5c306..7f0656d7b310 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1744,7 +1744,12 @@ OUString SfxObjectShell_Impl::getDocumentLocation() const
 // for documents made from a template: get the name of the template
 sLocation = rDocShell.getDocProperties()->getTemplateURL();
 }
+
+// tdf#128006 take document base url as location
+if (sLocation.isEmpty())
+sLocation = rDocShell.getDocumentBaseURL();
 }
+
 return sLocation;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-06-03 Thread Miklos Vajna (via logerrit)
 sfx2/source/doc/objserv.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 35ec66f8766bd3d8f17c9e0ea68d1e260a9fbc32
Author: Miklos Vajna 
AuthorDate: Tue Jun 2 16:45:44 2020 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 3 09:06:49 2020 +0200

tdf#130354 sfx2: make PDF signing UI work again

Regression from commit 9112c18524c9f5e67d6cbb282586a439e3020cdb (Don't
create unnecessary tempfiles for opened doc, 2019-10-18), restore the
temporary file creation for the PDF case, as it's needed for PDF signing
to work.

Change-Id: I945f04f6ab90d0e04fb14a7634ec877fb0af1a0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95367
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit 058caeef45f9abf12e4e243aafbbb1c2ebcbc057)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95324

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index e0b6bf5a4a39..7e367a88e53e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1568,6 +1568,10 @@ uno::Sequence< security::DocumentSignatureInformation > 
SfxObjectShell::GetDocum
 else
 {
 // Not ZIP-based, e.g. PDF.
+
+// Create temp file if needed.
+GetMedium()->CreateTempFile(/*bReplace=*/false);
+
 std::unique_ptr 
pStream(utl::UcbStreamHelper::CreateStream(GetMedium()->GetName(), 
StreamMode::READ));
 uno::Reference xStream(new 
utl::OStreamWrapper(*pStream));
 uno::Reference xInputStream(xStream, 
uno::UNO_QUERY);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sfx2/source

2020-05-27 Thread Caolán McNamara (via logerrit)
 sfx2/source/dialog/templdlg.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 4bdbb29a6b8d605d2a5fec1d080d386a95c183be
Author: Caolán McNamara 
AuthorDate: Wed May 27 13:03:11 2020 +0100
Commit: Caolán McNamara 
CommitDate: Wed May 27 21:26:04 2020 +0200

Related: tdf#133385 set cursor in row on right click

if the target row is not already selected

Change-Id: I7cb39118f4a695546d8d2251390d6d3279e82bc3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit bcbbd77f42ac03bbe9d0754051b72e0faed20b11)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94954

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index c32c4f9e639b..03da396a51b5 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -339,6 +339,7 @@ void SfxCommonTemplateDialog_Impl::PrepareMenu(const Point& 
rPos)
 if (pTreeView->get_dest_row_at_pos(rPos, xIter.get(), false) && 
!pTreeView->is_selected(*xIter))
 {
 pTreeView->unselect_all();
+pTreeView->set_cursor(*xIter);
 pTreeView->select(*xIter);
 FmtSelectHdl(*pTreeView);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits