[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sfx2/source

2019-12-08 Thread Ashod Nakashian (via logerrit)
 sfx2/source/sidebar/Deck.cxx |3 +
 sfx2/source/sidebar/DeckLayouter.cxx |   93 +++
 2 files changed, 43 insertions(+), 53 deletions(-)

New commits:
commit 33dd53818ee68aea81b4cfd5725c06f5f590474f
Author: Ashod Nakashian 
AuthorDate: Sun Dec 8 11:26:06 2019 -0500
Commit: Ashod Nakashian 
CommitDate: Mon Dec 9 03:35:45 2019 +0100

sfx2: convert iterator loops to range-for

Change-Id: Iebeb96b2eea76f13abdba6fffb0a4b488f202faa
Reviewed-on: https://gerrit.libreoffice.org/84719
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/sfx2/source/sidebar/DeckLayouter.cxx 
b/sfx2/source/sidebar/DeckLayouter.cxx
index 650b112605aa..c1b35df89525 100644
--- a/sfx2/source/sidebar/DeckLayouter.cxx
+++ b/sfx2/source/sidebar/DeckLayouter.cxx
@@ -163,13 +163,10 @@ tools::Rectangle LayoutPanels (
 sal_Int32 nTotalPreferredHeight (0);
 sal_Int32 nTotalMinimumHeight (0);
 
-for(::std::vector::const_iterator iItem(rLayoutItems.begin()),
- iEnd(rLayoutItems.end());
-iItem!=iEnd;
-++iItem)
+for (const LayoutItem& item : rLayoutItems)
 {
-nTotalMinimumHeight += iItem->maLayoutSize.Minimum;
-nTotalPreferredHeight += iItem->maLayoutSize.Preferred;
+nTotalMinimumHeight += item.maLayoutSize.Minimum;
+nTotalPreferredHeight += item.maLayoutSize.Preferred;
 }
 
 
@@ -354,41 +351,39 @@ void GetRequestedSizes (
 
 const sal_Int32 nDeckSeparatorHeight 
(Theme::GetInteger(Theme::Int_DeckSeparatorHeight));
 
-::std::vector::const_iterator iEnd(rLayoutItems.end());
-
-for(::std::vector::iterator iItem(rLayoutItems.begin());
-iItem!=iEnd;
-++iItem)
+for (LayoutItem& item : rLayoutItems)
 {
 ui::LayoutSize aLayoutSize (ui::LayoutSize(0,0,0));
-if (iItem->mpPanel != nullptr)
+if (item.mpPanel != nullptr)
 {
 if (rLayoutItems.size() == 1
-&& iItem->mpPanel->IsTitleBarOptional())
+&& item.mpPanel->IsTitleBarOptional())
 {
 // There is only one panel and its title bar is
 // optional => hide it.
 rAvailableHeight -= nDeckSeparatorHeight;
-iItem->mbShowTitleBar = false;
+item.mbShowTitleBar = false;
 }
 else
 {
 // Show the title bar and a separator above and below
 // the title bar.
-const sal_Int32 nPanelTitleBarHeight 
(Theme::GetInteger(Theme::Int_PanelTitleBarHeight) * 
iItem->mpPanel->GetDPIScaleFactor());
+const sal_Int32 nPanelTitleBarHeight(
+Theme::GetInteger(Theme::Int_PanelTitleBarHeight)
+* item.mpPanel->GetDPIScaleFactor());
 
 rAvailableHeight -= nPanelTitleBarHeight;
 rAvailableHeight -= nDeckSeparatorHeight;
 }
 
-if (iItem->mpPanel->IsExpanded())
+if (item.mpPanel->IsExpanded())
 {
-Reference xPanel 
(iItem->mpPanel->GetPanelComponent());
+Reference 
xPanel(item.mpPanel->GetPanelComponent());
 if (xPanel.is())
 {
 aLayoutSize = 
xPanel->getHeightForWidth(rContentBox.GetWidth());
 
-sal_Int32 nWidth = xPanel->getMinimalWidth();
+const sal_Int32 nWidth = xPanel->getMinimalWidth();
 if (nWidth > rMinimalWidth)
 rMinimalWidth = nWidth;
 }
@@ -396,7 +391,8 @@ void GetRequestedSizes (
 aLayoutSize = ui::LayoutSize(MinimalPanelHeight, -1, 0);
 }
 }
-iItem->maLayoutSize = aLayoutSize;
+
+item.maLayoutSize = aLayoutSize;
 }
 }
 
@@ -416,25 +412,19 @@ void DistributeHeights (
 sal_Int32 nTotalWeight (0);
 sal_Int32 nNoMaximumCount (0);
 
-::std::vector::const_iterator iEnd(rLayoutItems.end());
-
-for(::std::vector::iterator iItem(rLayoutItems.begin());
-iItem!=iEnd;
-++iItem)
+for (LayoutItem& item : rLayoutItems)
 {
-if (iItem->maLayoutSize.Maximum == 0)
+if (item.maLayoutSize.Maximum == 0)
 continue;
-if (iItem->maLayoutSize.Maximum < 0)
+if (item.maLayoutSize.Maximum < 0)
 ++nNoMaximumCount;
 
-const sal_Int32 nBaseHeight (
-bMinimumHeightIsBase
-? iItem->maLayoutSize.Minimum
-: iItem->maLayoutSize.Preferred);
+const sal_Int32 nBaseHeight(bMinimumHeightIsBase ? 
item.maLayoutSize.Minimum
+ : 
item.maLayoutSize.Preferred);
 if (nBaseHeight < nContainerHeight)
 {
-iItem->mnWeight = nContainerHeight - nBaseHeight;
-nTotalWeight += iItem->mnWeight;
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sfx2/source

2019-10-31 Thread Ashod Nakashian (via logerrit)
 sfx2/source/sidebar/Deck.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 553ce975b5de6a883757d815913ca5c8ad2d1afa
Author: Ashod Nakashian 
AuthorDate: Tue Oct 29 20:05:54 2019 -0400
Commit: Ashod Nakashian 
CommitDate: Thu Oct 31 11:55:59 2019 +0100

Revert "lok: only generate sidebar JSON for mobile views, for now."

Tunnelling Deck causes major problems, SidebarDockingWindow
is tunnelled instead.

This reverts commit d6bb6ed7e5d20305662d75feccbbefaafb09c6df.

Change-Id: Ib1ec53fed0d948d4119fc81db09ea18a9d3be76b
Reviewed-on: https://gerrit.libreoffice.org/81752
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 5fe1c6093eb3..99b3728d0838 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -182,10 +182,7 @@ void Deck::Resize()
 {
 Window::Resize();
 
-const vcl::ILibreOfficeKitNotifier *pNotifier;
-if (comphelper::LibreOfficeKit::isActive() &&
-comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()) &&
-(pNotifier = GetLOKNotifier()))
+if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier())
 {
 try
 {
commit 6a077e809b4578312e7a66ba18c99828afe9a772
Author: Ashod Nakashian 
AuthorDate: Tue Oct 29 20:03:32 2019 -0400
Commit: Ashod Nakashian 
CommitDate: Thu Oct 31 11:55:47 2019 +0100

Revert "jsdialogs: set LOKNotifier in Deck"

Tunnelling Deck causes major problems, SidebarDockingWindow
is tunnelled instead.

This reverts commit b728dda0c99679c4ab0d6a1180aab5aee1d63cf0.

Change-Id: If0ce69a885665686d5c197757422d0e4a8bbf5c2
Reviewed-on: https://gerrit.libreoffice.org/81751
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index b38525bf7e4d..5fe1c6093eb3 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -68,11 +68,6 @@ Deck::Deck(const DeckDescriptor& rDeckDescriptor, 
vcl::Window* pParentWindow,
 
 mpVerticalScrollBar->SetScrollHdl(LINK(this, Deck, 
HandleVerticalScrollBarChange));
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-SetLOKNotifier(SfxViewShell::Current());
-}
-
 #ifdef DEBUG
 SetText(OUString("Deck"));
 mpScrollClipWindow->SetText(OUString("ScrollClipWindow"));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sfx2/source svx/source

2019-10-11 Thread Szymon Kłos (via logerrit)
 sfx2/source/view/ipclient.cxx |7 +++
 svx/source/svdraw/svdmrkv.cxx |7 +--
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 403c6cd3653c1013a78f696bc68d639eb0f32f94
Author: Szymon Kłos 
AuthorDate: Thu May 30 16:00:56 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 11 22:54:24 2019 +0200

Don't send INPLACE messages to all views

Change-Id: I5ede42a173d297878b6212c4c8c467e2898d797f
Reviewed-on: https://gerrit.libreoffice.org/80683
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 1f5acea744d4..f941ceb31a8c 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -191,10 +191,10 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const 
document::EventObject& a
 
 if ( m_pClient && aEvent.EventName == "OnVisAreaChanged" && m_nAspect != 
embed::Aspects::MSOLE_ICON )
 {
-if(SfxViewShell* pViewShell = m_pClient->GetViewShell())
+if ( comphelper::LibreOfficeKit::isActive() )
 {
-
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, 
"INPLACE");
-SfxLokHelper::notifyOtherViews(pViewShell, 
LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "INPLACE");
+if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() )
+pViewShell->libreOfficeKitViewCallback( 
LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE" );
 }
 
 m_pClient->FormatChanged(); // for Writer when format of the object is 
changed with the area
commit 80c2c7d0bc63ff7eb962a1b5f498a003253c3acb
Author: Szymon Kłos 
AuthorDate: Wed May 29 15:29:04 2019 +0200
Commit: Andras Timar 
CommitDate: Fri Oct 11 22:54:10 2019 +0200

lok: send message when in place editing

Fixup mis-merge into the wrong module of
"lok: send message when in place editing"

This reverts commit a5acbbdbce32b25000ad2f1429c7bc307c7d28cb.

Change-Id: Ia7ee0b70e2c491274d9fa7eb5808396e83fb3e52
Reviewed-on: https://gerrit.libreoffice.org/80682
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 9dd4503eff7f..1f5acea744d4 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -69,6 +69,7 @@
 #include 
 
 #include 
+#include 
 
 #define SFX_CLIENTACTIVATE_TIMEOUT 100
 
@@ -190,6 +191,12 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const 
document::EventObject& a
 
 if ( m_pClient && aEvent.EventName == "OnVisAreaChanged" && m_nAspect != 
embed::Aspects::MSOLE_ICON )
 {
+if(SfxViewShell* pViewShell = m_pClient->GetViewShell())
+{
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, 
"INPLACE");
+SfxLokHelper::notifyOtherViews(pViewShell, 
LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "INPLACE");
+}
+
 m_pClient->FormatChanged(); // for Writer when format of the object is 
changed with the area
 m_pClient->ViewChanged();
 m_pClient->Invalidate();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index b66bc9d69e45..aa10261baff2 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -774,12 +774,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell)
 
 if(pSdrOle2Obj && (pSdrOle2Obj->isInplaceActive() || 
pSdrOle2Obj->isUiActive()))
 {
-if(pViewShell)
-{
-
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, 
"INPLACE");
-SfxLokHelper::notifyOtherViews(pViewShell, 
LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "INPLACE");
-return;
-}
+return;
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sfx2/source

2019-06-17 Thread Muhammet Kara (via logerrit)
 sfx2/source/doc/SfxRedactionHelper.cxx |8 
 sfx2/source/doc/objserv.cxx|6 --
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 0e6c070d083157bd3fbd3dbe2fba51520b08774c
Author: Muhammet Kara 
AuthorDate: Fri Mar 29 12:38:13 2019 +0300
Commit: Muhammet Kara 
CommitDate: Mon Jun 17 22:52:12 2019 +0200

Enable redaction for Impress

After the commit c2330b14e2bfa170131a83c375ec0b1a91c95415,
different page sizes and orientations are handled properly,
and Impress pages are converted to Draw perfectly.

Change-Id: Ib9ab6b298e12fc0d8e9440bf63f31ad6dd05ab35
Reviewed-on: https://gerrit.libreoffice.org/69910
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/74217
Tested-by: Muhammet Kara 

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index ffd7643658af..a34ad5c24113 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -556,12 +556,6 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest )
 bool bIsWriter = aRenderer.isWriter();
 bool bIsCalc = aRenderer.isCalc();
 
-if (!bIsWriter && !bIsCalc)
-{
-SAL_WARN( "sfx.doc", "Redaction is supported only for Writer 
and Calc! (for now...)");
-return;
-}
-
 sal_Int32 nPages = aRenderer.getPageCount();
 std::vector< GDIMetaFile > aMetaFiles;
 
commit 169d37f12dc427edd29de7a2a77edd4f5bff08f3
Author: Muhammet Kara 
AuthorDate: Fri Mar 29 12:18:12 2019 +0300
Commit: Muhammet Kara 
CommitDate: Mon Jun 17 22:51:55 2019 +0200

Handle different page sizes for redaction

Change-Id: I7136717936668fbb1d87b5d9491430c13c5e73fd
Reviewed-on: https://gerrit.libreoffice.org/69909
Tested-by: Jenkins
Reviewed-by: Muhammet Kara 
Reviewed-on: https://gerrit.libreoffice.org/74216
Tested-by: Muhammet Kara 

diff --git a/sfx2/source/doc/SfxRedactionHelper.cxx 
b/sfx2/source/doc/SfxRedactionHelper.cxx
index b23ed271eb87..a117bc14123b 100644
--- a/sfx2/source/doc/SfxRedactionHelper.cxx
+++ b/sfx2/source/doc/SfxRedactionHelper.cxx
@@ -122,9 +122,17 @@ void 
SfxRedactionHelper::addPagesToDraw(uno::Reference& xComponent,
 GDIMetaFile rGDIMetaFile = aMetaFiles[nPage];
 Graphic aGraphic(rGDIMetaFile);
 
+sal_Int32 nPageHeight(rGDIMetaFile.GetPrefSize().Height());
+sal_Int32 nPageWidth(rGDIMetaFile.GetPrefSize().Width());
+
 uno::Reference xGraph = aGraphic.GetXGraphic();
 uno::Reference xPage = 
xDrawPages->insertNewByIndex(nPage);
 
+// Set page size
+uno::Reference xPageProperySet(xPage, 
uno::UNO_QUERY);
+xPageProperySet->setPropertyValue("Height", 
css::uno::makeAny(nPageHeight));
+xPageProperySet->setPropertyValue("Width", 
css::uno::makeAny(nPageWidth));
+
 // Create and insert the shape
 uno::Reference xShape(
 
xFactory->createInstance("com.sun.star.drawing.GraphicObjectShape"), 
uno::UNO_QUERY);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits