[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source
svx/source/table/tablecontroller.cxx | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) New commits: commit 690d7b87eda38b54585fed2fc16181897ecbf98d Author: merttumer AuthorDate: Mon May 17 05:52:01 2021 +0300 Commit: Andras Timar CommitDate: Tue Jun 15 09:18:44 2021 +0200 Implemented Delete key deletes the table when all the cells are selected Change-Id: I8a17c73781a3399b214d5655b83036652933a90a Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115689 Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117191 Reviewed-by: Andras Timar diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 04d0d7a17bc6..d7028fe42c0c 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1386,30 +1386,44 @@ bool SvxTableController::DeleteMarked() SdrTableObj& rTableObj(*mxTableObj.get()); SdrModel& rModel(rTableObj.getSdrModelFromSdrObject()); const bool bUndo(rModel.IsUndoEnabled()); +bool bDeleteTable = false; if (bUndo) rModel.BegUndo(SvxResId(STR_TABLE_DELETE_CELL_CONTENTS)); CellPos aStart, aEnd; getSelectedCells( aStart, aEnd ); -for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ ) +const sal_Int32 nRemovedColumns = aEnd.mnCol - aStart.mnCol + 1; +const sal_Int32 nRemovedRows = aEnd.mnRow - aStart.mnRow + 1; +if( nRemovedColumns == mxTable->getColumnCount() && nRemovedRows == mxTable->getRowCount()) { -for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ ) +bDeleteTable = true; +} +else +{ +for( sal_Int32 nRow = aStart.mnRow; nRow <= aEnd.mnRow; nRow++ ) { -CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) ); -if (xCell.is() && xCell->hasText()) +for( sal_Int32 nCol = aStart.mnCol; nCol <= aEnd.mnCol; nCol++ ) { -if (bUndo) -xCell->AddUndo(); -xCell->SetOutlinerParaObject(nullptr); +CellRef xCell( dynamic_cast< Cell* >( mxTable->getCellByPosition( nCol, nRow ).get() ) ); +if (xCell.is() && xCell->hasText()) +{ +if (bUndo) +xCell->AddUndo(); +xCell->SetOutlinerParaObject(nullptr); +} } } } +if (bDeleteTable) +mrView.DeleteMarkedObj(); + if (bUndo) rModel.EndUndo(); -UpdateTableShape(); +if (!bDeleteTable) +UpdateTableShape(); return true; } ___ 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' - svx/source
svx/source/table/svdotable.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 179e4e6901bdaf6577bad92817578c3b33a8514d Author: merttumer AuthorDate: Thu Apr 15 11:27:08 2021 +0300 Commit: Andras Timar CommitDate: Tue Jun 15 09:18:28 2021 +0200 Fix Row size change is not updated Row size is not taken into account when there is a change Only if column size/position changes, it starts updating Change-Id: I99f3aa9fe0e7f3428234062a2520ca8a61984067 Signed-off-by: merttumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114130 Reviewed-by: Jan Holesovsky Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117190 Reviewed-by: Andras Timar diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 45d184403c56..18ac30472a7b 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -243,6 +243,7 @@ private: static sal_Int32 lastRowCount; static sal_Int32 lastColCount; static std::vector lastColWidths; +static bool rowSizeChanged; }; SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = nullptr; @@ -253,6 +254,7 @@ bool SdrTableObjImpl::lastLayoutFitHeight; WritingMode SdrTableObjImpl::lastLayoutMode; sal_Int32 SdrTableObjImpl::lastRowCount; sal_Int32 SdrTableObjImpl::lastColCount; +bool SdrTableObjImpl::rowSizeChanged = false; std::vector SdrTableObjImpl::lastColWidths; SdrTableObjImpl::SdrTableObjImpl() @@ -594,6 +596,7 @@ void SdrTableObjImpl::DragEdge( bool mbHorizontal, int nEdge, sal_Int32 nOffset Reference< XIndexAccess > xRows( mxTable->getRows(), UNO_QUERY_THROW ); Reference< XPropertySet > xRowSet( xRows->getByIndex( (!nEdge)?nEdge:(nEdge-1) ), UNO_QUERY_THROW ); xRowSet->setPropertyValue( sSize, Any( nHeight ) ); +rowSizeChanged = true; } } else @@ -798,7 +801,8 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool || lastLayoutMode != writingMode || lastRowCount != getRowCount() || lastColCount != getColumnCount() -|| lastColWidths != getColumnWidths() ) +|| lastColWidths != getColumnWidths() +|| rowSizeChanged ) { lastLayoutTable = this; lastLayoutInputRectangle = rArea; @@ -813,6 +817,7 @@ void SdrTableObjImpl::LayoutTable( tools::Rectangle& rArea, bool bFitWidth, bool TableModelNotifyGuard aGuard( mxTable.get() ); mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight ); lastLayoutResultRectangle = rArea; +rowSizeChanged = false; } else { ___ 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' - svx/source
svx/source/sidebar/shadow/ShadowPropertyPanel.cxx | 16 1 file changed, 16 insertions(+) New commits: commit 57d63ffb2f071e4fbb7d358557c1cb6aa54464b7 Author: Szymon Kłos AuthorDate: Tue Aug 11 10:28:52 2020 +0200 Commit: Jan Holesovsky CommitDate: Fri Aug 14 22:40:32 2020 +0200 Instant update shadow fields in sidebar This allows mobile LOK client to receive updated state. Change-Id: I07fb397c1566546e6e2eb8071eaf6d848f6effc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100466 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx index a3c40a649db2..fc2b7ccd69bc 100644 --- a/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx +++ b/svx/source/sidebar/shadow/ShadowPropertyPanel.cxx @@ -28,6 +28,7 @@ #include #include #include +#include using namespace css; using namespace css::uno; @@ -141,12 +142,27 @@ IMPL_LINK_NOARG(ShadowPropertyPanel, ClickShadowHdl, Button*, void) SdrOnOffItem aItem(makeSdrShadowItem(false)); GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW, SfxCallMode::RECORD, { }); + +if (comphelper::LibreOfficeKit::isActive()) +{ +mpShowShadow->SetState( TRISTATE_FALSE ); +UpdateControls(); +} } else { SdrOnOffItem aItem(makeSdrShadowItem(true)); GetBindings()->GetDispatcher()->ExecuteList(SID_ATTR_FILL_SHADOW, SfxCallMode::RECORD, { }); + +if (mpShadowDistance->GetValue( FieldUnit::POINT ) == 0) +mpShadowDistance->SetValue( 8, FieldUnit::POINT ); + +if (comphelper::LibreOfficeKit::isActive()) +{ +mpShowShadow->SetState( TRISTATE_TRUE ); +UpdateControls(); +} } } ___ 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' - svx/source
svx/source/sidebar/area/AreaPropertyPanelBase.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 93aed840d996af6a7189bd6d5a3c40ca8e9b5205 Author: gokaysatir AuthorDate: Sat Aug 8 16:27:48 2020 +0300 Commit: Aron Budea CommitDate: Wed Aug 12 01:38:25 2020 +0200 core: Hide shape area bitmap import button. Change-Id: I6f6987ea82c102fc5ac44a1c48a234c9f43484e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100391 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky (cherry picked from commit 4a31a63c5e4d4dac01426581c39bc1ef9278f6cb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100367 diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx index e22455ee2c5e..0e911e47b1e9 100644 --- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx @@ -37,6 +37,7 @@ #include #include #include +#include using namespace css; using namespace css::uno; @@ -377,7 +378,8 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void) GraphicObject aBitmap; if(nPos == static_cast< sal_Int32 >(BITMAP)) { -mpBmpImport->Show(); +if (!comphelper::LibreOfficeKit::isActive()) +mpBmpImport->Show(); const SvxBitmapListItem* pItem = pSh->GetItem(SID_BITMAP_LIST); if(pItem) { @@ -1219,7 +1221,8 @@ void AreaPropertyPanelBase::Update() { if(pSh && pSh->GetItem(SID_BITMAP_LIST) && eXFS == BITMAP) { -mpBmpImport->Show(); +if (!comphelper::LibreOfficeKit::isActive()) +mpBmpImport->Show(); mpLbFillType->SelectEntryPos(sal_uInt32(BITMAP)); mpLbFillAttr->Fill(pSh->GetItem(SID_BITMAP_LIST)->GetBitmapList()); ___ 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' - svx/source
svx/source/tbxctrls/tbcontrl.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 8f12f79818e85c31c1f752c200d9174093d0dfca Author: Szymon Kłos AuthorDate: Thu Aug 6 10:56:41 2020 +0200 Commit: Szymon Kłos CommitDate: Thu Aug 6 12:36:13 2020 +0200 lok: Hide not working 'More Styles' option Option was shown in the sidebar style dropdown. Change-Id: Icd7b555d1c6c1a860454c4b367146a1ea9746b76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100204 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 7c4bf4ad20e0..ff8aeb8b6db8 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2807,7 +2807,8 @@ void SvxStyleToolBoxControl::FillStyleBox() pBox->InsertEntry( pImpl->aClearForm, 0 ); pBox->SetSeparatorPos( 0 ); -pBox->InsertEntry( pImpl->aMore ); +if (!comphelper::LibreOfficeKit::isActive()) +pBox->InsertEntry( pImpl->aMore ); // enable sort again nWinBits |= WB_SORT; ___ 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' - svx/source
svx/source/svdraw/svdograf.cxx |9 - 1 file changed, 8 insertions(+), 1 deletion(-) New commits: commit 1b991f19e73ac719dcbbc561cb3e4f9ecc646476 Author: Caolán McNamara AuthorDate: Mon May 11 17:02:50 2020 +0100 Commit: Andras Timar CommitDate: Wed May 13 12:30:01 2020 +0200 use the LinkManager persist to determine the Referer Change-Id: I4e93878972492a93af368ffa0560412132431a24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93994 Reviewed-by: Stephan Bergmann Reviewed-by: Michael Stahl Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index e24e1d8adebc..5fd6f3f5b1b9 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -19,8 +19,10 @@ #include +#include #include #include +#include #include #include #include @@ -102,8 +104,13 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj) { sfx2::LinkManager::GetDisplayNames( this, nullptr, , nullptr, ); +OUString sReferer(getReferer()); +SfxObjectShell * sh = pLinkManager->GetPersist(); +if (sh != nullptr && sh->HasName()) +sReferer = sh->GetMedium()->GetName(); + Graphic aGraphic; -if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, getReferer(), aGraphic, nullptr)) +if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, sReferer, aGraphic, nullptr)) { rGrafObj.ImpSetLinkedGraphic(aGraphic); } ___ 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' - svx/source
svx/source/sidebar/text/TextPropertyPanel.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit c0f1d703b4d1055768fc0bcbf3884c5d3cf71a1c Author: Pranam Lashkari AuthorDate: Fri May 8 23:59:36 2020 +0530 Commit: Andras Timar CommitDate: Sun May 10 13:15:59 2020 +0200 added clear Direct Formatting button in calc sidebar Change-Id: I7f18c696eb32332d9c65145e7788370304d91ea6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93812 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index fce4682eb2e1..9accfcdd0c6a 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -86,6 +86,7 @@ void TextPropertyPanel::HandleContextChange ( bool bWriterText = false; bool bDrawText = false; +bool bCalcText = false; switch (maContext.GetCombinedContext_DI()) { @@ -107,6 +108,14 @@ void TextPropertyPanel::HandleContextChange ( bWriterText = true; break; +case CombinedEnumContext(Application::Calc, Context::Text): +case CombinedEnumContext(Application::Calc, Context::Table): +case CombinedEnumContext(Application::Calc, Context::Cell): +case CombinedEnumContext(Application::Calc, Context::EditCell): +case CombinedEnumContext(Application::Calc, Context::Grid): +bCalcText = true; +break; + default: break; } @@ -114,7 +123,7 @@ void TextPropertyPanel::HandleContextChange ( mpToolBoxFontColor->Show(!bWriterText); mpToolBoxFontColorSw->Show(bWriterText); mpToolBoxBackgroundColor->Show(bDrawText); -mpResetAttr->Show(bWriterText); +mpResetAttr->Show(bWriterText || bCalcText); mpSetDefault->Show(bDrawText); } ___ 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' - svx/source svx/uiconfig
svx/source/sidebar/text/TextPropertyPanel.cxx |7 +++ svx/source/sidebar/text/TextPropertyPanel.hxx |2 ++ svx/uiconfig/ui/sidebartextpanel.ui | 25 + 3 files changed, 34 insertions(+) New commits: commit 2b77fd26283bab07e55542e4354f2019ef446968 Author: Pranam Lashkari AuthorDate: Thu May 7 19:21:04 2020 +0530 Commit: Andras Timar CommitDate: Fri May 8 18:02:44 2020 +0200 fixed clear Direct Formatting button to sidebar in impress Change-Id: I81cd30b3ce7087122c260dca99e86a3c857447b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93648 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 2c8e0ccf20cc..fce4682eb2e1 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -46,6 +46,8 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref get(mpToolBoxFontColorSw, "colorbar_writer"); get(mpToolBoxFontColor, "colorbar_others"); get(mpToolBoxBackgroundColor, "colorbar_background"); +get(mpResetAttr, "resetattr"); +get(mpSetDefault, "defaultattr"); bool isMobilePhone = false; const SfxViewShell* pViewShell = SfxViewShell::Current(); @@ -68,6 +70,8 @@ void TextPropertyPanel::dispose() mpToolBoxFontColorSw.clear(); mpToolBoxFontColor.clear(); mpToolBoxBackgroundColor.clear(); +mpResetAttr.clear(); +mpSetDefault.clear(); PanelLayout::dispose(); } @@ -110,6 +114,9 @@ void TextPropertyPanel::HandleContextChange ( mpToolBoxFontColor->Show(!bWriterText); mpToolBoxFontColorSw->Show(bWriterText); mpToolBoxBackgroundColor->Show(bDrawText); +mpResetAttr->Show(bWriterText); +mpSetDefault->Show(bDrawText); + } } } // end of namespace svx::sidebar diff --git a/svx/source/sidebar/text/TextPropertyPanel.hxx b/svx/source/sidebar/text/TextPropertyPanel.hxx index bbfe13f030d2..89a57d5e7b25 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.hxx +++ b/svx/source/sidebar/text/TextPropertyPanel.hxx @@ -50,6 +50,8 @@ private: VclPtr mpToolBoxFontColorSw; VclPtr mpToolBoxFontColor; VclPtr mpToolBoxBackgroundColor; +VclPtr mpResetAttr; +VclPtr mpSetDefault; vcl::EnumContext maContext; }; diff --git a/svx/uiconfig/ui/sidebartextpanel.ui b/svx/uiconfig/ui/sidebartextpanel.ui index 64b19a115db2..e965fbff9ecb 100644 --- a/svx/uiconfig/ui/sidebartextpanel.ui +++ b/svx/uiconfig/ui/sidebartextpanel.ui @@ -318,6 +318,31 @@ 3 + + +True +False +False + + +True +False +True +.uno:SetDefault +True + + +False +True + + + + +False +True +3 + + True ___ 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' - svx/source
svx/source/dialog/srchdlg.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 884d448169ae9ac3cedbb128b0b78edb92150ab4 Author: Caolán McNamara AuthorDate: Sat Apr 4 19:27:41 2020 +0100 Commit: Andras Timar CommitDate: Sun Apr 5 11:12:01 2020 +0200 rhbz#1820868 deref of null xLayoutManager Change-Id: Ib396ef9f5b019b08a181eeb5a8eb983bdb401db4 diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 20cd94e06252..0294154e650e 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2461,6 +2461,8 @@ OUString SvxSearchDialogWrapper::GetSearchLabel() pViewFrame->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW); css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; +if (!xLayoutManager.is()) +return OUString(); css::uno::Reference< css::ui::XUIElement > xUIElement = xLayoutManager->getElement("private:resource/toolbar/findbar"); if (!xUIElement.is()) ___ 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' - svx/source
svx/source/svdraw/svdedtv2.cxx | 17 - svx/source/svdraw/svdpdf.cxx | 13 - svx/source/svdraw/svdpdf.hxx |8 +--- 3 files changed, 29 insertions(+), 9 deletions(-) New commits: commit bdfc08855324e71168e633fa579aa04add5c0957 Author: Tomaž Vajngerl AuthorDate: Fri Mar 27 20:14:39 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Apr 1 12:31:40 2020 +0200 pdfium: make breaking of PDF graphic work again Changing PDF to use VectorGraphicData deleted the calls which triggered the breaking of the PDF. This change makes breaking work again. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91234 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit f265b14d6f8e3e63260b3c8ecce48d4251288fea) Change-Id: I1d817f1556e37fcbcc3d2850b690eb0810676fa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91446 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index d6ef069e9564..cf9746ae93ba 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -45,6 +45,7 @@ #include #include #include +#include using ::std::vector; using namespace com::sun::star; @@ -2043,7 +2044,21 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) SdrGrafObj* pGraf = dynamic_cast( pObj ); if (pGraf != nullptr) { -if (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedVectorGraphicData()) +Graphic aGraphic = pGraf->GetGraphic(); +auto const & pVectorGraphicData = aGraphic.getVectorGraphicData(); + +if (pVectorGraphicData && pVectorGraphicData->getVectorGraphicDataType() == VectorGraphicDataType::Pdf) +{ +#if HAVE_FEATURE_PDFIUM +aLogicRect = pGraf->GetLogicRect(); +ImpSdrPdfImport aFilter(*mpModel, pObj->GetLayer(), aLogicRect, aGraphic); +if (pGraf->getEmbeddedPageNumber() < aFilter.GetPageCount()) +{ +nInsAnz = aFilter.DoImport(*pOL, nInsPos, aGraphic.getPageNumber(), pProgrInfo); +} +#endif // HAVE_FEATURE_PDFIUM +} +else if (pGraf->HasGDIMetaFile() || pGraf->isEmbeddedVectorGraphicData() ) { GDIMetaFile aMetaFile(GetMetaFile(pGraf)); if (aMetaFile.GetActionSize()) diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx index ecf78dbdd3e5..d24d85b2205d 100644 --- a/svx/source/svdraw/svdpdf.cxx +++ b/svx/source/svdraw/svdpdf.cxx @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -115,11 +116,11 @@ struct FPDFBitmapDeleter using namespace com::sun::star; ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools::Rectangle& rRect, - const std::shared_ptr>& pPdfData) -: maTmpList() + Graphic const& rGraphic) +: mrGraphic(rGraphic) +, maTmpList() , mpVD(VclPtr::Create()) , maScaleRect(rRect) -, mpPdfData(pPdfData) , mnMapScalingOfs(0) , mpModel() , mnLayer(nLay) @@ -163,8 +164,10 @@ ImpSdrPdfImport::ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools: FPDF_InitLibraryWithConfig(); // Load the buffer using pdfium. -mpPdfDocument = FPDF_LoadMemDocument(mpPdfData->data(), mpPdfData->size(), - /*password=*/nullptr); +auto const& rVectorGraphicData = mrGraphic.getVectorGraphicData(); +mpPdfDocument = FPDF_LoadMemDocument( +rVectorGraphicData->getVectorGraphicDataArray().getConstArray(), +rVectorGraphicData->getVectorGraphicDataArrayLength(), /*password=*/nullptr); if (!mpPdfDocument) { //TODO: Handle failure to load. diff --git a/svx/source/svdraw/svdpdf.hxx b/svx/source/svdraw/svdpdf.hxx index 70b5a44e4ddf..1005b081142a 100644 --- a/svx/source/svdraw/svdpdf.hxx +++ b/svx/source/svdraw/svdpdf.hxx @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -158,10 +159,10 @@ class ImpSdrPdfImport final double ma, mb, mc, md, me, mf; }; -::std::vector maTmpList; +Graphic const& mrGraphic; +std::vector maTmpList; ScopedVclPtr mpVD; tools::Rectangle const maScaleRect; -const std::shared_ptr> mpPdfData; size_t mnMapScalingOfs; // from here on, not edited with MapScaling std::unique_ptr mpLineAttr; std::unique_ptr mpFillAttr; @@ -233,7 +234,8 @@ class ImpSdrPdfImport final public: ImpSdrPdfImport(SdrModel& rModel, SdrLayerID nLay, const tools::Rectangle& rRect, -const std::shared_ptr>& pPdfData); +Graphic const& rGraphic); + ~ImpSdrPdfImport(); int GetPageCount() const { return
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source svx/uiconfig
Rebased ref, commits from common ancestor: commit 287a4aaa7544cf8973a397db49131b8bc94faee2 Author: Pranam Lashkari AuthorDate: Sat Mar 28 06:02:05 2020 +0530 Commit: Andras Timar CommitDate: Mon Mar 30 18:44:49 2020 +0200 use "To Background" and "To Foreground" only in writer sidebar Change-Id: Ib7ccac192721b663c9655417fc3d639766d0424d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91267 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 5af69633c30b..85bb026006a8 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -101,6 +101,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( get( mpFtFlip,"fliplabel" ); get( mpFlipTbx, "selectrotationtype" ); get( mpBtnEditChart, "btnEditChart" ); +get( mpTBxArrange, "shaperespectedtotext"); Initialize(); mpBindings->Update( SID_ATTR_METRIC ); @@ -131,6 +132,7 @@ void PosSizePropertyPanel::dispose() mpFtFlip.clear(); mpFlipTbx.clear(); mpBtnEditChart.clear(); +mpTBxArrange.clear(); maTransfPosXControl.dispose(); maTransfPosYControl.dispose(); @@ -268,12 +270,14 @@ void PosSizePropertyPanel::HandleContextChange( bool bShowAngle = false; bool bShowFlip = false; bool bShowEditChart = false; +bool bShowArrangeShape = false; switch (maContext.GetCombinedContext_DI()) { case CombinedEnumContext(Application::WriterVariants, Context::Draw): bShowAngle = true; bShowFlip = true; +bShowArrangeShape = true; break; case CombinedEnumContext(Application::WriterVariants, Context::Graphic): @@ -333,6 +337,9 @@ void PosSizePropertyPanel::HandleContextChange( // Edit Chart mpBtnEditChart->Show(bShowEditChart); +// Arrange with respect to text +mpTBxArrange->Show(bShowArrangeShape); + if (mxSidebar.is()) mxSidebar->requestLayout(); } diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 8947f0f14a0f..74ac3fd8b88d 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -112,6 +112,9 @@ private: //edit charts button for online's mobile view VclPtr mpBtnEditChart; +// Arrange with respect to text +VclPtr mpTBxArrange; + // Internal variables basegfx::B2DRange maRect; basegfx::B2DRange maWorkArea; diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index 727c90c62580..5a5fc9a00a6c 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -419,6 +419,27 @@ True + + +True +False +2 + + + + +True +False +True +Arrange +end +False + + +True +False + + True @@ -446,8 +467,8 @@ True -True -1 +False +2 ___ 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' - svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |6 svx/source/sidebar/possize/PosSizePropertyPanel.hxx |3 ++ svx/uiconfig/ui/sidebarpossize.ui | 25 ++-- 3 files changed, 32 insertions(+), 2 deletions(-) New commits: commit ee0b6f291ef605f44d466bd8b0ccec52d5c9c725 Author: Pranam Lashkari AuthorDate: Sat Mar 28 06:02:05 2020 +0530 Commit: Andras Timar CommitDate: Mon Mar 30 18:14:13 2020 +0200 use "To Background" and "To Foreground" only in writer sidebar Change-Id: Ib7ccac192721b663c9655417fc3d639766d0424d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91267 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 5af69633c30b..1b018d06df9f 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -101,6 +101,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( get( mpFtFlip,"fliplabel" ); get( mpFlipTbx, "selectrotationtype" ); get( mpBtnEditChart, "btnEditChart" ); +get( mArrang, "shaperespectedtotext"); Initialize(); mpBindings->Update( SID_ATTR_METRIC ); @@ -268,12 +269,14 @@ void PosSizePropertyPanel::HandleContextChange( bool bShowAngle = false; bool bShowFlip = false; bool bShowEditChart = false; +bool bShowArrangeShape = false; switch (maContext.GetCombinedContext_DI()) { case CombinedEnumContext(Application::WriterVariants, Context::Draw): bShowAngle = true; bShowFlip = true; +bShowArrangeShape = true; break; case CombinedEnumContext(Application::WriterVariants, Context::Graphic): @@ -333,6 +336,9 @@ void PosSizePropertyPanel::HandleContextChange( // Edit Chart mpBtnEditChart->Show(bShowEditChart); +// Arrange with respect to text +mArrang->Show(bShowArrangeShape); + if (mxSidebar.is()) mxSidebar->requestLayout(); } diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 8947f0f14a0f..a9ba3f3c8ba6 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -112,6 +112,9 @@ private: //edit charts button for online's mobile view VclPtr mpBtnEditChart; +// Arrange with respect to text +VclPtr mArrang; + // Internal variables basegfx::B2DRange maRect; basegfx::B2DRange maWorkArea; diff --git a/svx/uiconfig/ui/sidebarpossize.ui b/svx/uiconfig/ui/sidebarpossize.ui index 727c90c62580..5a5fc9a00a6c 100644 --- a/svx/uiconfig/ui/sidebarpossize.ui +++ b/svx/uiconfig/ui/sidebarpossize.ui @@ -419,6 +419,27 @@ True + + +True +False +2 + + + + +True +False +True +Arrange +end +False + + +True +False + + True @@ -446,8 +467,8 @@ True -True -1 +False +2 ___ 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' - svx/source
svx/source/svdraw/svdograf.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit b639a1b6407a879e9da44a3b87bbcade838c8a24 Author: Tomaž Vajngerl AuthorDate: Wed Mar 25 10:28:53 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Mar 25 16:32:06 2020 +0100 SdrGrafObj: don't check the primitive sequence for PDF to get metadata For a PDF we create a BitmapPrimitive2D only, so it doesn't have any metadata in the primitive sequence itself, but a call to the getVectorGraphicData() method will render the PDF in order to create the BitmapPrimitive2D. This is a problem when we have multiple pages as we want them to be rendered on demand and not right away on load. This change short-circuits the gathering of metadata for PDF to prevent unnecessary early rendering of PDF pages. Change-Id: If5c286e88e72c4c0ba5083a98c7db707d207b6cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91034 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 74ebc6dcbc85ce9f49d7451e08d71a41f794f569) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90955 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 155ea15252b0..e24e1d8adebc 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -151,6 +151,12 @@ void SdrGrafObj::onGraphicChanged() if (!rVectorGraphicDataPtr.get()) return; +// Skip for PDF as it is only a bitmap primitive in a sequence and +// doesn't contain metadata. However getting the primitive sequence +// will also trigger a premature rendering of the PDF. +if (rVectorGraphicDataPtr->getVectorGraphicDataType() == VectorGraphicDataType::Pdf) +return; + const drawinglayer::primitive2d::Primitive2DContainer aSequence(rVectorGraphicDataPtr->getPrimitive2DSequence()); if (aSequence.empty()) ___ 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' - svx/source
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 1fcc356dc5e6530fbfeffd734965322310bc4b42 Author: Aron Budea AuthorDate: Tue Mar 24 16:28:32 2020 +0100 Commit: Aron Budea CommitDate: Tue Mar 24 16:31:14 2020 +0100 Revert "tdf#111922 Fix Position sidebar Height/Width order of..." This reverts commit ea3df44acc9da8dd91b1e5a6638822db3a5f391b. It causes cypress test failures with current online master. Change-Id: I107e0527bd0368b67fca3e67b1ec9454a2cb4c5d diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index b0ebe3fdb16b..5af69633c30b 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -1098,12 +1098,12 @@ void PosSizePropertyPanel::SetPosSizeMinMax() mpMtrPosY->SetMax(basegfx::fround64(fBottom)); mpMtrPosY->SetLast(basegfx::fround64(fBottom)); -double fMaxWidth = maWorkArea.getWidth() - (maRect.getWidth() - fLeft); -double fMaxHeight = maWorkArea.getHeight() - (maRect.getHeight() - fTop); -mpMtrWidth->SetMax(basegfx::fround64(fMaxWidth*100)); -mpMtrWidth->SetLast(basegfx::fround64(fMaxWidth*100)); -mpMtrHeight->SetMax(basegfx::fround64(fMaxHeight*100)); -mpMtrHeight->SetLast(basegfx::fround64(fMaxHeight*100)); +double fMaxWidth = maWorkArea.getWidth() - (maRect.getMinX() - fLeft); +double fMaxHeight = maWorkArea.getHeight() - (maRect.getMinY() - fTop); +mpMtrWidth->SetMax(basegfx::fround64(fMaxWidth)); +mpMtrWidth->SetLast(basegfx::fround64(fMaxWidth)); +mpMtrHeight->SetMax(basegfx::fround64(fMaxHeight)); +mpMtrHeight->SetLast(basegfx::fround64(fMaxHeight)); } void PosSizePropertyPanel::UpdateUIScale() ___ 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' - svx/source
svx/source/sidebar/possize/PosSizePropertyPanel.cxx |9 + svx/source/sidebar/possize/PosSizePropertyPanel.hxx |2 ++ 2 files changed, 11 insertions(+) New commits: commit 0ebf9a64661622ea01341b82221e44643c41ffce Author: Henry Castro AuthorDate: Mon Mar 23 15:34:57 2020 -0400 Commit: Andras Timar CommitDate: Tue Mar 24 15:12:33 2020 +0100 lok: update the measure units if changed Change-Id: If793e5e678277e27d66e7bcfbf3fbec999e46c63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90937 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 9b97d56f89ad..b0ebe3fdb16b 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -886,6 +886,15 @@ void PosSizePropertyPanel::executeSize() } } +boost::property_tree::ptree PosSizePropertyPanel::DumpAsPropertyTree() +{ +if (meDlgUnit != GetCurrentUnit(SfxItemState::DEFAULT, nullptr)) +{ +mpBindings->Update( SID_ATTR_METRIC ); +} + +return PanelLayout::DumpAsPropertyTree(); +} void PosSizePropertyPanel::MetricState( SfxItemState eState, const SfxPoolItem* pState ) { diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 07086e3d3608..8947f0f14a0f 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -73,6 +73,8 @@ public: const SfxPoolItem* pState, const bool bIsEnabled) override; +virtual boost::property_tree::ptree DumpAsPropertyTree() override; + SfxBindings* GetBindings() { return mpBindings;} // constructor/destructor ___ 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' - svx/source sw/source
svx/source/xoutdev/xattr.cxx| 13 +++ sw/source/uibase/shells/drawdlg.cxx | 40 2 files changed, 53 insertions(+) New commits: commit 8f062cdae1c71c9dd2a1e3f81617b08ac7463c5d Author: Dennis Francis AuthorDate: Sun Mar 22 19:43:03 2020 +0530 Commit: Andras Timar CommitDate: Mon Mar 23 12:51:42 2020 +0100 lokit: unify fill transparency items Online just listens to .uno:FillFloatTransparence but the set-item in core it corresponds to, does not represent the fill-transparency types like 'None' and 'Solid'. This is represented by another item called XFillTransparencyItem. As a result the mobile wizard does not show the correct transparency fill type always. To solve this, this patch encodes the constant transparency percentage in case of Solid and None(always 0%) as an intensity and stores this info in the statechange message of .uno:FillFloatTransparence whenever there is no gradient type and corrects the 'style' attribute of the message appropriately. More detailed information is provided as comments at appropriate places in the patch. Change-Id: I443ef4ce349badf28f6c2c702b1014868d9c6ed5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90878 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 83e052231b58..1de52ad51ee5 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -2532,6 +2532,19 @@ boost::property_tree::ptree XFillFloatTransparenceItem::dumpAsJSON() const boost::property_tree::ptree aTree = XFillGradientItem::dumpAsJSON(); aTree.put("commandName", ".uno:FillFloatTransparence"); +if (!bEnabled) +{ +boost::property_tree::ptree& rState = aTree.get_child("state"); +// When gradient fill is disabled, the intensity fields contain the +// constant encoded percent-transparency. However we use that here to just +// distinguish between 'None' and 'Solid' types and correct the 'style' +// property appropriately. +if (GetGradientValue().GetStartIntens() == 100) +rState.put("style", "NONE"); +else +rState.put("style", "SOLID"); +} + return aTree; } diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 8b42f0ebb732..66176aca79e6 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include #include @@ -320,6 +322,40 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq) pView->GetModel()->SetChanged(); } +void lcl_unifyFillTransparencyItems(SfxItemSet& rSet) +{ +// Transparent fill options are None, Solid, Linear, Axial, Radial, Elliptical, Quadratic, Square. +// But this is represented across two items namely XFillTransparenceItem (for None and Solid) +// and XFillFloatTransparenceItem (for the rest). To simplify the representation in LOKit case let's +// use XFillFloatTransparenceItem to carry the information of XFillTransparenceItem when gradients +// are disabled. When gradient transparency is disabled, all fields of XFillFloatTransparenceItem are invalid +// and not used. So convert XFillTransparenceItem's constant transparency percentage as an intensity +// and assign this to the XFillFloatTransparenceItem's start-intensity and end-intensity fields. +// Now the LOK clients need only listen to statechange messages of XFillFloatTransparenceItem +// to get fill-transparency settings instead of listening to two separate items. + +XFillFloatTransparenceItem* pFillFloatTranspItem = +const_cast + (rSet.GetItem(XATTR_FILLFLOATTRANSPARENCE)); +if (!pFillFloatTranspItem || pFillFloatTranspItem->IsEnabled()) +return; + +const XFillTransparenceItem* pFillTranspItem = +rSet.GetItem(XATTR_FILLTRANSPARENCE); + +if (!pFillTranspItem) +return; + +XGradient aTmpGradient = pFillFloatTranspItem->GetGradientValue(); +sal_uInt16 nTranspPercent = pFillTranspItem->GetValue(); +// Encode transparancy percentage as intensity +sal_uInt16 nIntensity = 100 - std::min +(std::max(nTranspPercent, 0), 100); +aTmpGradient.SetStartIntens(nIntensity); +aTmpGradient.SetEndIntens(nIntensity); +pFillFloatTranspItem->SetGradientValue(aTmpGradient); +} + void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) { SdrView* pSdrView = GetShell().GetDrawView(); @@ -329,7 +365,11 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet) bool bDisable = Disable( rSet ); if( !bDisable ) +{ pSdrView->GetAttributes( rSet ); +if (comphelper::LibreOfficeKit::isActive()) +
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source
svx/source/svdraw/svdotextdecomposition.cxx |9 + 1 file changed, 9 insertions(+) New commits: commit 1eafe67eb2cfd23781ebc61ee830e79c56a315f0 Author: Miklos Vajna AuthorDate: Wed Nov 20 16:15:39 2019 +0100 Commit: Miklos Vajna CommitDate: Fri Feb 21 15:58:10 2020 +0100 svx: add rendering for semi-transparent shape text The color's alpha is normally lost when we roundtrip SvxColorItem's tools Color via TextSimplePortionPrimitive2D's basegfx::BColor. One way would be to add an extra transparency member to the primitive, like BackgroundColorPrimitive2D does that. However, a much easier way is to go via UnifiedTransparencePrimitive2D, that way we handle transparency in drawinglayer::impBufferDevice::paint(), rather than platform-specific code like CairoTextRender::DrawTextLayout() in the Linux case. (cherry picked from commit 81b0d5393ca4cf2ff0954e53b05928cde047c2e0) Conflicts: svx/CppunitTest_svx_unit.mk Change-Id: Ie7aebe77ad9ac776dd27fc50538a5045200c8010 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89179 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index e5e0ee273e11..7c479065c4ae 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -351,6 +352,14 @@ namespace aTextFillColor); } +if (aFontColor.GetTransparency() != 0) +{ +// Handle semi-transparent text for both the decorated and simple case here. +pNewPrimitive = new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D( +drawinglayer::primitive2d::Primitive2DContainer{ pNewPrimitive }, +aFontColor.GetTransparency() / 255.0); +} + if(rInfo.mbEndOfBullet) { // embed in TextHierarchyBulletPrimitive2D ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 62aa2480090595b9cae53faa0a636c08f4f49bb6 Author: Henry Castro AuthorDate: Tue Feb 4 15:05:09 2020 -0400 Commit: Henry Castro CommitDate: Tue Feb 4 22:38:49 2020 +0100 lok: add "type" information when a graphic is selected Change-Id: I67a36d3aabbc197d9ac8f6ca4509dafd6f2620f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87989 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index bd19e90cfc5c..8c23ae2b114d 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -851,9 +851,10 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) OStringBuffer aExtraInfo; -aExtraInfo.append("{ \"id\": \""); +aExtraInfo.append("{\"id\":\""); aExtraInfo.append(OString::number(reinterpret_cast(pO))); -aExtraInfo.append("\""); +aExtraInfo.append("\",\"type\":"); +aExtraInfo.append(OString::number(pO->GetObjIdentifier())); if (bWriterGraphic) { @@ -985,7 +986,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } } -aExtraInfo.append(" }"); +aExtraInfo.append("}"); sSelectionText = aSelection.toString(); sSelectionText += OString(", ") + OString::number(nRotAngle); ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) New commits: commit 109df7755b505ffe9b089fc5943e56c716368297 Author: Michael Meeks AuthorDate: Fri Jan 24 16:42:48 2020 +0100 Commit: Michael Meeks CommitDate: Sat Jan 25 14:51:10 2020 +0100 lok: create marking overlay object, but add no objects to it null mpMarkObjOverlay was used for a number of other reasons. Change-Id: I0681d9c544f0cd3f93e991eb048b97bd58f94787 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87349 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 90dc167c64f9..bd19e90cfc5c 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -96,6 +96,9 @@ ImplMarkingOverlay::ImplMarkingOverlay(const SdrPaintView& rView, const basegfx: : maSecondPosition(rStartPos), mbUnmarking(bUnmarking) { +if (comphelper::LibreOfficeKit::isActive()) +return; // We do client-side object manipulation with the Kit API + for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++) { SdrPaintWindow* pCandidate = rView.GetPaintWindow(a); @@ -359,12 +362,8 @@ void SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark) DBG_ASSERT(nullptr == mpMarkObjOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkObjOverlay (!)"); -// We do client-side object manipulation with the Kit API -if (!comphelper::LibreOfficeKit::isActive()) -{ -basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); -mpMarkObjOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark); -} +basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); +mpMarkObjOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark); maDragStat.Reset(rPnt); maDragStat.NextPoint(); ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 3b55464eeab68f6dd37b3e85e04924815001a18d Author: Henry Castro AuthorDate: Tue Jan 21 17:00:13 2020 -0400 Commit: Henry Castro CommitDate: Thu Jan 23 17:07:57 2020 +0100 lok: add id information to the selected graphic When the graphic is selected it is necessary to send the id so the SVG background can be cached. Change-Id: I13afcad61c2f059f409484ea4af089dd199d1242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87165 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index a48642e40013..90dc167c64f9 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -851,9 +851,14 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } OStringBuffer aExtraInfo; + +aExtraInfo.append("{ \"id\": \""); + aExtraInfo.append(OString::number(reinterpret_cast(pO))); +aExtraInfo.append("\""); + if (bWriterGraphic) { -aExtraInfo.append("{ \"isWriterGraphic\": true }"); +aExtraInfo.append(", \"isWriterGraphic\": true"); } else if (bIsChart) { @@ -867,7 +872,6 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (aSel >>= aValue) { OString aObjectCID(aValue.getStr(), aValue.getLength(), osl_getThreadTextEncoding()); -aExtraInfo.append("{ "); const std::vector aProps{"Draggable", "Resizable", "Rotatable"}; for (const auto& rProp: aProps) { @@ -979,10 +983,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) aExtraInfo.append("}"); // dragInfo } } -aExtraInfo.append(" }"); } } } +aExtraInfo.append(" }"); + sSelectionText = aSelection.toString(); sSelectionText += OString(", ") + OString::number(nRotAngle); if (!aExtraInfo.isEmpty()) ___ 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' - svx/source
svx/source/engine3d/dragmt3d.cxx |5 + svx/source/svdraw/svddrgmt.cxx |5 + svx/source/svdraw/svdmrkv.cxx|9 +++-- 3 files changed, 17 insertions(+), 2 deletions(-) New commits: commit 2a380ac6c8e30d7e96a84482ce5935ddf7014dfc Author: Michael Meeks AuthorDate: Wed Jan 15 14:21:13 2020 + Commit: Michael Meeks CommitDate: Thu Jan 16 17:21:07 2020 +0100 lok: don't render shape selection overlays in lok mode. These are rendered client-side, doing it twice is a bug; also rendering of dashed-lines via drawinglayer decomposition is extraordinarily slow, so avoid it. Change-Id: I821f14699abd6bc9e7a6759c81edded2f792677d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86855 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx index 94d2bd213fbd..0e683cd073d0 100644 --- a/svx/source/engine3d/dragmt3d.cxx +++ b/svx/source/engine3d/dragmt3d.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include @@ -211,6 +212,10 @@ void E3dDragMethod::MoveSdrDrag(const Point& /*rPnt*/) // for migration from XOR to overlay void E3dDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager) { +// We do client-side object manipulation with the Kit API +if (comphelper::LibreOfficeKit::isActive()) +return; + const sal_uInt32 nCnt(maGrp.size()); basegfx::B2DPolyPolygon aResult; diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index d6d9a8db0668..e353c41038d1 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -69,6 +69,7 @@ #include #include #include +#include #include #include @@ -658,6 +659,10 @@ typedef std::map< const SdrObject*, SdrObject* > SdrObjectAndCloneMap; void SdrDragMethod::CreateOverlayGeometry(sdr::overlay::OverlayManager& rOverlayManager) { +// We do client-side object manipulation with the Kit API +if (comphelper::LibreOfficeKit::isActive()) +return; + // create SdrDragEntries on demand if(maSdrDragEntries.empty()) { diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index aa10261baff2..a48642e40013 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -358,8 +358,13 @@ void SdrMarkView::BegMarkObj(const Point& rPnt, bool bUnmark) BrkAction(); DBG_ASSERT(nullptr == mpMarkObjOverlay, "SdrMarkView::BegMarkObj: There exists a mpMarkObjOverlay (!)"); -basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); -mpMarkObjOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark); + +// We do client-side object manipulation with the Kit API +if (!comphelper::LibreOfficeKit::isActive()) +{ +basegfx::B2DPoint aStartPos(rPnt.X(), rPnt.Y()); +mpMarkObjOverlay = new ImplMarkingOverlay(*this, aStartPos, bUnmark); +} maDragStat.Reset(rPnt); maDragStat.NextPoint(); ___ 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' - svx/source
svx/source/tbxctrls/tbxcolor.cxx |7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) New commits: commit 83fedc02f2d831774c12d60097a99e968b56dc5e Author: Tor Lillqvist AuthorDate: Fri Dec 20 16:36:31 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Dec 20 18:55:05 2019 +0100 Get rid of two pointless #defines Change-Id: I7479f4f1c440bba1dd9f922c4df32ab877e0a803 Reviewed-on: https://gerrit.libreoffice.org/85619 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist diff --git a/svx/source/tbxctrls/tbxcolor.cxx b/svx/source/tbxctrls/tbxcolor.cxx index 7112f7dada98..3b7f3e04e999 100644 --- a/svx/source/tbxctrls/tbxcolor.cxx +++ b/svx/source/tbxctrls/tbxcolor.cxx @@ -33,11 +33,8 @@ namespace svx using namespace ::com::sun::star::frame; using namespace ::com::sun::star::beans; -#define TOOLBAR_RESNAME "private:resource/toolbar/" -#define PROPNAME_LAYOUTMANAGER "LayoutManager" - ToolboxAccess::ToolboxAccess( const OUString& rToolboxName ) : -m_sToolboxResName ( TOOLBAR_RESNAME ) +m_sToolboxResName ( "private:resource/toolbar/" ) { m_sToolboxResName += rToolboxName; @@ -49,7 +46,7 @@ namespace svx Reference< XFrame > xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface(); Reference< XPropertySet > xFrameProps( xFrame, UNO_QUERY ); if ( xFrameProps.is() ) -xFrameProps->getPropertyValue( PROPNAME_LAYOUTMANAGER ) >>= m_xLayouter; +xFrameProps->getPropertyValue( "LayoutManager" ) >>= m_xLayouter; } catch ( Exception& ) { ___ 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' - svx/source
svx/source/tbxctrls/tbxcolorupdate.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 4de843ee0de7f9211f536dc6c4ee0d05bf26cc52 Author: Tor Lillqvist AuthorDate: Fri Dec 20 16:17:13 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Dec 20 16:17:13 2019 +0200 tdf#126966: Tweak to get the "color bar" below text color controls to show up No idea where the size that the thing has to fit inside comes from; possibly one could alternatively have made that larger? Change-Id: Ifc1bec4c08c279403127056ecc61db4b80c03f96 diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 77385d58e400..7f9ca3c84eaf 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -93,7 +93,7 @@ namespace svx if (!mbWideButton) { // usually the normal size is 16 -const long nIOSSize = 40; +const long nIOSSize = 32; if (aItemSize.getWidth() < nIOSSize) { aItemSize.setWidth(nIOSSize); ___ 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' - svx/source
svx/source/unodraw/unoprov.cxx | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) New commits: commit aff6aa31eac39d5ac41095494852833d73cd28a7 Author: Noel Grandin AuthorDate: Wed Dec 18 15:35:53 2019 +0200 Commit: Noel Grandin CommitDate: Thu Dec 19 10:35:50 2019 +0100 reduce temporary OUString creation speeds up dialog load time a little (5%) Change-Id: Ia4e5f1973bb6f06b2b5ec6a251e4ad07fc3636d2 Reviewed-on: https://gerrit.libreoffice.org/85389 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 4b7b6993134a48c850608c758f7b7283bed27fec) Reviewed-on: https://gerrit.libreoffice.org/85399 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index a3c02ecf9074..b7c103cb2abe 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -1771,12 +1771,24 @@ static bool SvxUnoConvertResourceStringBuiltIn(const char** pSourceResIds, const for(int i = 0; i < nCount; ++i ) { -OUString aStrDefName = bToApi ? SvxResId(pSourceResIds[i]) : OUString::createFromAscii(pSourceResIds[i]); -if( sStr == aStrDefName ) +if (bToApi) { -OUString aReplace = bToApi ? OUString::createFromAscii(pDestResIds[i]) : SvxResId(pDestResIds[i]); -rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace ); -return true; +OUString aStrDefName = SvxResId(pSourceResIds[i]); +if( sStr == aStrDefName ) +{ +OUString aReplace = OUString::createFromAscii(pDestResIds[i]); +rString = rString.replaceAt( 0, aStrDefName.getLength(), aReplace ); +return true; +} +} +else +{ +if( sStr.equalsAscii(pSourceResIds[i]) ) +{ +OUString aReplace = SvxResId(pDestResIds[i]); +rString = rString.replaceAt( 0, strlen(pSourceResIds[i]), aReplace ); +return true; +} } } ___ 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' - svx/source
svx/source/tbxctrls/grafctrl.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit 00b473531b65aa5c10ea84aaedd05a35e6e50b25 Author: Szymon Kłos AuthorDate: Thu Nov 28 10:19:39 2019 +0100 Commit: Szymon Kłos CommitDate: Thu Nov 28 11:06:16 2019 +0100 jsdialogs; send graphic updates in Calc and Impress Change-Id: Ia69fe214b6961a8f0387e6fc8f97a75687f5ed93 Reviewed-on: https://gerrit.libreoffice.org/83968 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index 36ac6e4c0e5c..ced4d4c2bc32 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -53,6 +53,9 @@ #include #include +#include +#include + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::util; @@ -1010,6 +1013,10 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView const & rVie nWhich = aIter.NextWhich(); } + +SfxViewShell* pViewShell = SfxViewShell::Current(); +if (pViewShell && comphelper::LibreOfficeKit::isActive()) +pViewShell->sendUnoStatus( ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ 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' - svx/source
svx/source/dialog/hdft.cxx | 83 +++-- 1 file changed, 43 insertions(+), 40 deletions(-) New commits: commit 46a1c0a733f1e664823dcb483796dbcc8a743f4a Author: Ashod Nakashian AuthorDate: Sun May 26 14:59:53 2019 -0400 Commit: Ashod Nakashian CommitDate: Mon Nov 25 13:48:10 2019 +0100 svx: LOK: convert background child-dialogs to async (cherry picked from commit 625a8c33bd95b4068838caef19af28c5404c59ce) Change-Id: I682ab039ce3732aa973e0fe371c191f1ca1b9ef7 Reviewed-on: https://gerrit.libreoffice.org/83633 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index c4d79ddd25ae..c5a072300493 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -622,57 +622,60 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void) *pBBSet, mbEnableDrawingLayerFillStyles)); -if(RET_OK == pDlg->Execute() && pDlg->GetOutputItemSet()) -{ -SfxItemIter aIter(*pDlg->GetOutputItemSet()); -const SfxPoolItem* pItem = aIter.FirstItem(); - -while(pItem) +pDlg->StartExecuteAsync([&](sal_Int32 nResult) { +if (nResult == RET_OK && pDlg->GetOutputItemSet()) { -if(!IsInvalidItem(pItem)) -{ -pBBSet->Put(*pItem); -} - -pItem = aIter.NextItem(); -} - -{ -drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; +SfxItemIter aIter(*pDlg->GetOutputItemSet()); +const SfxPoolItem* pItem = aIter.FirstItem(); -if(mbEnableDrawingLayerFillStyles) +while (pItem) { -// create FillAttributes directly from DrawingLayer FillStyle entries -aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(*pBBSet)); +if (!IsInvalidItem(pItem)) +pBBSet->Put(*pItem); + +pItem = aIter.NextItem(); } -else + { -const sal_uInt16 nWhich = GetWhich(SID_ATTR_BRUSH); +drawinglayer::attribute::SdrAllFillAttributesHelperPtr aFillAttributes; -if(pBBSet->GetItemState(nWhich) == SfxItemState::SET) +if (mbEnableDrawingLayerFillStyles) { -// create FillAttributes from SvxBrushItem -const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(pBBSet->Get(nWhich)); -SfxItemSet aTempSet(*pBBSet->GetPool(), svl::Items{}); - -setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); -aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); +// create FillAttributes directly from DrawingLayer FillStyle entries +aFillAttributes.reset( +new drawinglayer::attribute::SdrAllFillAttributesHelper(*pBBSet)); +} +else +{ +const sal_uInt16 nWhich = GetWhich(SID_ATTR_BRUSH); + +if (pBBSet->GetItemState(nWhich) == SfxItemState::SET) +{ +// create FillAttributes from SvxBrushItem +const SvxBrushItem& rItem += static_cast(pBBSet->Get(nWhich)); +SfxItemSet aTempSet(*pBBSet->GetPool(), +svl::Items{}); + +setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); +aFillAttributes.reset( +new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); +} } -} -if(SID_ATTR_PAGE_HEADERSET == nId) -{ -//m_aBspWin.SetHdColor(rItem.GetColor()); -m_aBspWin.setHeaderFillAttributes(aFillAttributes); -} -else -{ -//m_aBspWin.SetFtColor(rItem.GetColor()); -m_aBspWin.setFooterFillAttributes(aFillAttributes); +if (SID_ATTR_PAGE_HEADERSET == nId) +{ +//m_aBspWin.SetHdColor(rItem.GetColor()); +m_aBspWin.setHeaderFillAttributes(aFillAttributes); +} +else +{ +//m_aBspWin.SetFtColor(rItem.GetColor()); +m_aBspWin.setFooterFillAttributes(aFillAttributes); +} } } - -} +}); UpdateExample(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source svx/uiconfig
svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 33 ++ svx/source/sidebar/possize/PosSizePropertyPanel.hxx |4 + svx/uiconfig/ui/sidebarpossize.ui | 62 +--- 3 files changed, 64 insertions(+), 35 deletions(-) New commits: commit 4094a739428886e39e11c2a013c27d2286278a30 Author: Muhammet Kara AuthorDate: Wed Nov 20 15:30:01 2019 +0300 Commit: Muhammet Kara CommitDate: Sun Nov 24 20:28:06 2019 +0100 Add Edit Chart button for online's mobile view To improve UX by providing mobile viewers a way to enter into edit mode of a chart via single tap Change-Id: I3cfb82df166c571a401f195a7f7c806fd6df604e Reviewed-on: https://gerrit.libreoffice.org/83614 Tested-by: Jenkins CollaboraOffice Reviewed-by: Muhammet Kara diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 358864fc92df..c6b5ccecc72c 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -41,6 +41,7 @@ #include #include #include +#include using namespace css; using namespace css::uno; @@ -120,6 +121,7 @@ PosSizePropertyPanel::PosSizePropertyPanel( get( mpDial, "orientationcontrol" ); get( mpFtFlip,"fliplabel" ); get( mpFlipTbx, "selectrotationtype" ); +get( mpBtnEditChart, "btnEditChart" ); Initialize(); mpBindings->Update( SID_ATTR_TRANSFORM_WIDTH ); @@ -149,6 +151,7 @@ void PosSizePropertyPanel::dispose() mpDial.clear(); mpFtFlip.clear(); mpFlipTbx.clear(); +mpBtnEditChart.clear(); maTransfPosXControl.dispose(); maTransfPosYControl.dispose(); @@ -218,6 +221,8 @@ void PosSizePropertyPanel::Initialize() //flip: mpFlipTbx->SetSelectHdl( LINK( this, PosSizePropertyPanel, FlipHdl) ); +mpBtnEditChart->SetClickHdl( LINK( this, PosSizePropertyPanel, ClickChartEditHdl ) ); + mpMtrAngle->InsertValue(0, FieldUnit::CUSTOM); mpMtrAngle->InsertValue(4500, FieldUnit::CUSTOM); mpMtrAngle->InsertValue(9000, FieldUnit::CUSTOM); @@ -283,6 +288,8 @@ void PosSizePropertyPanel::HandleContextChange( bool bShowPosition = false; bool bShowAngle = false; bool bShowFlip = false; +bool bShowEditChart = false; +bool bIsMobile = comphelper::LibreOfficeKit::isActive() && comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView()); switch (maContext.GetCombinedContext_DI()) { @@ -308,14 +315,24 @@ void PosSizePropertyPanel::HandleContextChange( bShowFlip = true; break; +case CombinedEnumContext(Application::WriterVariants, Context::OLE): +if (bIsMobile) +bShowEditChart = true; +break; + +case CombinedEnumContext(Application::Calc, Context::OLE): +case CombinedEnumContext(Application::DrawImpress, Context::OLE): +bShowPosition = true; +if (bIsMobile) +bShowEditChart = true; +break; + case CombinedEnumContext(Application::Calc, Context::Chart): case CombinedEnumContext(Application::Calc, Context::Form): case CombinedEnumContext(Application::Calc, Context::Media): -case CombinedEnumContext(Application::Calc, Context::OLE): case CombinedEnumContext(Application::Calc, Context::MultiObject): case CombinedEnumContext(Application::DrawImpress, Context::Media): case CombinedEnumContext(Application::DrawImpress, Context::Form): -case CombinedEnumContext(Application::DrawImpress, Context::OLE): case CombinedEnumContext(Application::DrawImpress, Context::ThreeDObject): case CombinedEnumContext(Application::DrawImpress, Context::MultiObject): bShowPosition = true; @@ -337,6 +354,9 @@ void PosSizePropertyPanel::HandleContextChange( mpFtFlip->Show(bShowFlip); mpFlipTbx->Show(bShowFlip); +// Edit Chart +mpBtnEditChart->Show(bShowEditChart); + if (mxSidebar.is()) mxSidebar->requestLayout(); } @@ -539,6 +559,15 @@ IMPL_LINK( PosSizePropertyPanel, FlipHdl, ToolBox*, pBox, void ) } } +IMPL_LINK_NOARG( PosSizePropertyPanel, ClickChartEditHdl, Button*, void ) +{ +SfxViewShell* pCurSh = SfxViewShell::Current(); +if ( pCurSh) +{ +pCurSh->DoVerb( -1 ); +} +} + void PosSizePropertyPanel::NotifyItemUpdate( sal_uInt16 nSID, diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx index 97059186a510..07086e3d3608 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.hxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.hxx @@ -107,6 +107,9 @@ private: VclPtrmpFtFlip; VclPtr mpFlipTbx; +//edit charts button for online's mobile view +VclPtr mpBtnEditChart; + // Internal variables
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source
svx/source/svdraw/svdedtv1.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit b05a57dc7a546893c7e7956ab01b748c6a34c66a Author: Szymon Kłos AuthorDate: Wed Nov 13 16:56:14 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 13 17:40:23 2019 +0100 jsdialog: fix compile error for SdrPercentItem fix for commit: 5adc79f54507bb7d191589a0895e491c95e63fe7 Change-Id: I452d132f4c58d22396775df462515786ea30fc95 Reviewed-on: https://gerrit.libreoffice.org/82621 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 3ffec47477c8..7304c592e8d3 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit 5adc79f54507bb7d191589a0895e491c95e63fe7 Author: Szymon Kłos AuthorDate: Wed Nov 13 15:10:58 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 13 16:02:28 2019 +0100 jsdialogs: send .uno:FillShadowTransparency updates Change-Id: Id74a0cf697faf796f68f5c350941e354494a6e3b Reviewed-on: https://gerrit.libreoffice.org/82607 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 8f24463c3e01..3ffec47477c8 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1001,6 +1001,19 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con } break; } + +case SDRATTR_SHADOWTRANSPARENCE: +{ +const SfxPoolItem* pItem = rSet.GetItem(SDRATTR_SHADOWTRANSPARENCE); +if (pItem) +{ +sal_uInt16 nWidth = static_cast(pItem)->GetValue(); +sPayload = OUString::number(nWidth); + +sPayload = ".uno:FillShadowTransparency=" + sPayload; +} +break; +} } if (!sPayload.isEmpty()) ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 14 ++ 1 file changed, 14 insertions(+) New commits: commit 06592c3c818f41b73ed0d8fa677cf7475c7cae5a Author: Szymon Kłos AuthorDate: Wed Nov 13 12:42:04 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 13 13:43:30 2019 +0100 jsdialogs: send .uno:FillTransparence updates Change-Id: I9951429d00c1c50d6ef3b1a703b266be6d72de9a Reviewed-on: https://gerrit.libreoffice.org/82586 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 2cd4f67b747e..8f24463c3e01 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -66,6 +66,7 @@ #include #include #include +#include #include #include #include @@ -962,6 +963,19 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con break; } +case XATTR_FILLTRANSPARENCE: +{ +const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLTRANSPARENCE); +if (pItem) +{ +sal_uInt16 nTransparency = static_cast(pItem)->GetValue(); +sPayload = OUString::number(nTransparency); + +sPayload = ".uno:FillTransparence=" + sPayload; +} +break; +} + case XATTR_LINETRANSPARENCE: { const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINETRANSPARENCE); ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 14 ++ 1 file changed, 14 insertions(+) New commits: commit 309e8b0fbf49a375556ef65c20d368d86d037cfc Author: Szymon Kłos AuthorDate: Wed Nov 13 12:28:31 2019 +0100 Commit: Szymon Kłos CommitDate: Wed Nov 13 13:12:23 2019 +0100 jsdialogs: send .uno:LineTransparence updates Change-Id: Ib6a2f5fd85e3e8c2cc8eb96c4b75f2357b669388 Reviewed-on: https://gerrit.libreoffice.org/82583 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 7ccaf13d5b63..2cd4f67b747e 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -65,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -961,6 +962,19 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con break; } +case XATTR_LINETRANSPARENCE: +{ +const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINETRANSPARENCE); +if (pItem) +{ +sal_uInt16 nTransparency = static_cast(pItem)->GetValue(); +sPayload = OUString::number(nTransparency); + +sPayload = ".uno:LineTransparence=" + sPayload; +} +break; +} + case XATTR_LINEWIDTH: { const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINEWIDTH); ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) New commits: commit a7d69c50f6f2918a255df9f2ad395e26395b8f63 Author: Szymon Kłos AuthorDate: Tue Nov 12 10:43:53 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 12 11:41:17 2019 +0100 Avoid nullptr dereference Conditions already present on master Change-Id: I527482521191e51340f19f601f03d94fce50d429 Reviewed-on: https://gerrit.libreoffice.org/82490 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 3a325152d4dd..7ccaf13d5b63 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -938,20 +938,26 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con case XATTR_LINECOLOR: { const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINECOLOR); -Color aColor = static_cast(pItem)->GetColorValue(); -sPayload = OUString::number(static_cast(aColor)); +if (pItem) +{ +Color aColor = static_cast(pItem)->GetColorValue(); +sPayload = OUString::number(static_cast(aColor)); -sPayload = ".uno:XLineColor=" + sPayload; +sPayload = ".uno:XLineColor=" + sPayload; +} break; } case XATTR_FILLCOLOR: { const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLCOLOR); -Color aColor = static_cast(pItem)->GetColorValue(); -sPayload = OUString::number(static_cast(aColor)); +if (pItem) +{ +Color aColor = static_cast(pItem)->GetColorValue(); +sPayload = OUString::number(static_cast(aColor)); -sPayload = ".uno:FillColor=" + sPayload; +sPayload = ".uno:FillColor=" + sPayload; +} break; } @@ -969,8 +975,9 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con } } - GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, -OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +if (!sPayload.isEmpty()) + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); } nWhich = aIter.NextWhich(); ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 13 + 1 file changed, 13 insertions(+) New commits: commit f49ef63f8ab5c6c9740eff4fdc52e8776f84e473 Author: Szymon Kłos AuthorDate: Mon Nov 11 16:44:46 2019 +0100 Commit: Szymon Kłos CommitDate: Tue Nov 12 10:40:33 2019 +0100 jsdialogs: send .uno:LineWidth updates Change-Id: I83856625d17910e5b9165c7a2ddae8b219650c8c Reviewed-on: https://gerrit.libreoffice.org/82455 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit a3d08f4f8c3c958a33ce05398127c35dad81dc4b) Reviewed-on: https://gerrit.libreoffice.org/82485 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 53bf8eb1d519..3a325152d4dd 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -954,6 +954,19 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con sPayload = ".uno:FillColor=" + sPayload; break; } + +case XATTR_LINEWIDTH: +{ +const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINEWIDTH); +if (pItem) +{ +sal_uInt32 nWidth = static_cast(pItem)->GetValue(); +sPayload = OUString::number(nWidth); + +sPayload = ".uno:LineWidth=" + sPayload; +} +break; +} } GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, ___ 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' - svx/source
svx/source/unodraw/unoshape.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit ab7cdbb1961210ee9b0a6a847878befad8789991 Author: Muhammet Kara AuthorDate: Sat Nov 9 13:28:30 2019 +0300 Commit: Muhammet Kara CommitDate: Sat Nov 9 17:14:04 2019 +0100 Add some info to the IllegalArgumentException in SvxShape Change-Id: I31253a0410299ec2f7fbeb8bb981bdc97c66906c Reviewed-on: https://gerrit.libreoffice.org/82350 Tested-by: Jenkins CollaboraOffice Reviewed-by: Muhammet Kara diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 4430da8af9c9..29e08997df88 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2512,7 +2512,12 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl return false; } } -throw lang::IllegalArgumentException(); + +OUString sExceptionMessage (OUStringLiteral("IllegalArgumentException in SvxShape::setPropertyValueImpl.") ++ " Property Type: " + pProperty->aType.getTypeName() + " Property nWID: " + OUString::number(pProperty->nWID) ++ " Value Type: " + (rValue.hasValue() ? rValue.getValueTypeName() : "void (no value)")); + +throw lang::IllegalArgumentException(sExceptionMessage, nullptr, 1); } ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx | 35 +++ 1 file changed, 35 insertions(+) New commits: commit c28ea22c5198c1162fc5a535d35b407762b8a865 Author: Szymon Kłos AuthorDate: Fri Nov 8 15:40:02 2019 +0100 Commit: Szymon Kłos CommitDate: Fri Nov 8 16:32:58 2019 +0100 jsdialogs: send .uno:FillColor & XLineColor status updates Change-Id: I665ca45293fb3e98a7940e24c1f14a5963b8d073 Reviewed-on: https://gerrit.libreoffice.org/82307 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index c0efa3a717a4..53bf8eb1d519 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -63,6 +63,11 @@ #include #include #include +#include +#include +#include +#include +#include #include // EditView @@ -925,6 +930,36 @@ void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) con rAttr.MergeValue(rItem, true); } +if (comphelper::LibreOfficeKit::isActive()) +{ +OUString sPayload; +switch(nWhich) +{ +case XATTR_LINECOLOR: +{ +const SfxPoolItem* pItem = rSet.GetItem(XATTR_LINECOLOR); +Color aColor = static_cast(pItem)->GetColorValue(); +sPayload = OUString::number(static_cast(aColor)); + +sPayload = ".uno:XLineColor=" + sPayload; +break; +} + +case XATTR_FILLCOLOR: +{ +const SfxPoolItem* pItem = rSet.GetItem(XATTR_FILLCOLOR); +Color aColor = static_cast(pItem)->GetColorValue(); +sPayload = OUString::number(static_cast(aColor)); + +sPayload = ".uno:FillColor=" + sPayload; +break; +} +} + + GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, +OUStringToOString(sPayload, RTL_TEXTENCODING_ASCII_US).getStr()); +} + nWhich = aIter.NextWhich(); } } ___ 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' - svx/source svx/uiconfig
svx/source/sidebar/text/TextPropertyPanel.cxx | 11 +++ svx/uiconfig/ui/sidebartextpanel.ui |2 +- 2 files changed, 12 insertions(+), 1 deletion(-) New commits: commit cd93a2e61f6f66dd6a0753c6f5a3e426a957fa71 Author: Michael Meeks AuthorDate: Wed Nov 6 19:58:18 2019 + Commit: Michael Meeks CommitDate: Wed Nov 6 22:04:01 2019 +0100 lok: disable text spacing for now. Change-Id: I87229ab2bc1b72987d43ce685a03627111951ce3 Reviewed-on: https://gerrit.libreoffice.org/82174 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index 3518e0368a4b..eae6f95aa366 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -21,6 +21,8 @@ #include #include +#include +#include using namespace css; @@ -44,6 +46,15 @@ TextPropertyPanel::TextPropertyPanel ( vcl::Window* pParent, const css::uno::Ref get(mpToolBoxFontColorSw, "colorbar_writer"); get(mpToolBoxFontColor, "colorbar_others"); get(mpToolBoxBackgroundColor, "colorbar_background"); + +bool isMobile = false; +if (comphelper::LibreOfficeKit::isActive() && +comphelper::LibreOfficeKit::isMobile(SfxLokHelper::getView())) +isMobile = true; +VclPtr xSpacingBar; +get(xSpacingBar, "spacingbar"); +xSpacingBar->Show(!isMobile); +xSpacingBar->ShowItem(0, !isMobile); } TextPropertyPanel::~TextPropertyPanel() diff --git a/svx/uiconfig/ui/sidebartextpanel.ui b/svx/uiconfig/ui/sidebartextpanel.ui index 8fbbc18b8fb0..c2c995490525 100644 --- a/svx/uiconfig/ui/sidebartextpanel.ui +++ b/svx/uiconfig/ui/sidebartextpanel.ui @@ -332,7 +332,7 @@ -True +False True ___ 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' - svx/source
svx/source/table/tablecontroller.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 15a6c2559b5d19a51534841c05bf478a11dc74fb Author: Tor Lillqvist AuthorDate: Wed Oct 30 17:30:14 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Nov 1 09:27:43 2019 +0100 tdf#128454: Make it possible to delete a table's single row or column It is already possible to delete all rows or all columns when there are multiple ones. So why it should be impossible to delete the single row or column when there is just one I can't understand. (This change is just one way to provide a workaround for the bug; the ideal would be if it was possible to specifically delete a whole table also in Impress documents, not just Writer ones.) (The change is only for the LibreOfficeKit use case, but maybe it should be in all cases.) Change-Id: If9221d248d59e515a110ff94cfb96fdd76aecafb Reviewed-on: https://gerrit.libreoffice.org/81801 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit f4594ae70f3bcde7a87ec606030ec5217ba53788) Reviewed-on: https://gerrit.libreoffice.org/81869 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index a07a90ac1bb5..d119367632a6 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -461,11 +461,11 @@ void SvxTableController::GetState( SfxItemSet& rSet ) break; } case SID_TABLE_DELETE_ROW: -if( !mxTable.is() || !hasSelectedCells() || (mxTable->getRowCount() <= 1) ) +if( !mxTable.is() || !hasSelectedCells() || (!comphelper::LibreOfficeKit::isActive() && mxTable->getRowCount() <= 1) ) rSet.DisableItem(SID_TABLE_DELETE_ROW); break; case SID_TABLE_DELETE_COL: -if( !mxTable.is() || !hasSelectedCells() || (mxTable->getColumnCount() <= 1) ) +if( !mxTable.is() || !hasSelectedCells() || (!comphelper::LibreOfficeKit::isActive() && mxTable->getColumnCount() <= 1) ) rSet.DisableItem(SID_TABLE_DELETE_COL); break; case SID_TABLE_MERGE_CELLS: ___ 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' - svx/source vcl/source
svx/source/tbxctrls/tbxcolorupdate.cxx | 16 ++-- vcl/source/window/toolbox.cxx |3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) New commits: commit 3eb2a9081c50d1634602609c4585fffcec4ff9c4 Author: Marco Cecchetti AuthorDate: Tue Sep 24 16:37:46 2019 +0200 Commit: Noel Grandin CommitDate: Wed Oct 30 19:28:09 2019 +0100 tdf#126966: Use larger buttons for the colours in the sidebar on iOS - 2 Attempt to merge this with Noel's re-work of the color picker. Change-Id: I9687546889bc20ef95a50aeafbc6f40e939d57a9 Reviewed-on: https://gerrit.libreoffice.org/81755 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/svx/source/tbxctrls/tbxcolorupdate.cxx b/svx/source/tbxctrls/tbxcolorupdate.cxx index 45558e51b533..77385d58e400 100644 --- a/svx/source/tbxctrls/tbxcolorupdate.cxx +++ b/svx/source/tbxctrls/tbxcolorupdate.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include #include #include @@ -89,7 +88,19 @@ namespace svx { Image aImage(mpTbx->GetItemImage(mnBtnId)); Size aItemSize(mbWideButton ? mpTbx->GetItemContentSize(mnBtnId) : aImage.GetSizePixel()); - +#ifdef IOS // tdf#126966 +// Oddly enough, it is in the "not wide button" case that we want the larger ones, hmm. +if (!mbWideButton) +{ +// usually the normal size is 16 +const long nIOSSize = 40; +if (aItemSize.getWidth() < nIOSSize) +{ +aItemSize.setWidth(nIOSSize); +aItemSize.setHeight(nIOSSize); +} +} +#endif const bool bSizeChanged = (maBmpSize != aItemSize); const bool bDisplayModeChanged = (mbWasHiContrastMode != mpTbx->GetSettings().GetStyleSettings().GetHighContrastMode()); Color aColor(rColor); @@ -100,6 +111,7 @@ namespace svx if ((maCurColor == aColor) && !bSizeChanged && !bDisplayModeChanged && !bForceUpdate) return; + if (!aItemSize.Width() || !aItemSize.Height()) return; diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 9ba57c20ad08..9fce6175fead 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -1413,6 +1413,9 @@ bool ToolBox::ImplCalcItem() longnMinWidth = 6; longnMinHeight = 6; longnDropDownArrowWidth = TB_DROPDOWNARROWWIDTH; +#ifdef IOS +nDropDownArrowWidth *= 3; +#endif // set defaults if image or text is needed but empty nDefWidth = GetDefaultImageSize().Width(); ___ 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' - svx/source
svx/source/tbxctrls/tbcontrl.cxx|2 ++ svx/source/tbxctrls/tbunocontroller.cxx |2 ++ 2 files changed, 4 insertions(+) New commits: commit a41911499409f492442982ea0941807230ba9b14 Author: Szymon Kłos AuthorDate: Thu Oct 24 10:45:38 2019 +0200 Commit: Szymon Kłos CommitDate: Thu Oct 24 12:53:12 2019 +0200 jsdialogs: send associated uno commands for comboboxes Change-Id: I170cad78b8c014e8ceab197b0ded03adc32940b1 Reviewed-on: https://gerrit.libreoffice.org/81431 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 79e707cbfc877d206a8e49bf7647a9be80b5404e) Reviewed-on: https://gerrit.libreoffice.org/81439 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 977e3146dafe..5427a40f60e3 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -930,6 +930,7 @@ boost::property_tree::ptree SvxStyleBox_Impl::DumpAsPropertyTree() aTree.put("selectedCount", GetSelectedEntryCount()); aTree.add_child("selectedEntries", aSelected); +aTree.put("command", ".uno:StyleApply"); return aTree; } @@ -1320,6 +1321,7 @@ boost::property_tree::ptree SvxFontNameBox_Impl::DumpAsPropertyTree() aTree.put("selectedCount", GetSelectedEntryCount()); aTree.add_child("selectedEntries", aSelected); +aTree.put("command", ".uno:CharFontName"); return aTree; } diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 917d87b462ca..c71e36ffe6c1 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -289,6 +289,8 @@ boost::property_tree::ptree SvxFontSizeBox_Impl::DumpAsPropertyTree() aTree.put("selectedCount", GetSelectedEntryCount()); aTree.add_child("selectedEntries", aSelected); +aTree.put("command", ".uno:FontHeight"); + return aTree; } ___ 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' - svx/source
svx/source/tbxctrls/tbcontrl.cxx | 32 1 file changed, 32 insertions(+) New commits: commit 9b5ea9a58200bf7a2075b47930e3f8c0f7c854c8 Author: Szymon Kłos AuthorDate: Wed Oct 23 17:10:35 2019 +0200 Commit: Szymon Kłos CommitDate: Thu Oct 24 08:53:52 2019 +0200 jsdliaogs: send data for text styles combobox Change-Id: I5827799f8adf8db697ac2e2a96eaba2a6fd2e2a4 Reviewed-on: https://gerrit.libreoffice.org/81401 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit 00d06dee4b77cf52c927bd2c8687bb1a8d6c7904) Reviewed-on: https://gerrit.libreoffice.org/81420 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index deecd6b37353..977e3146dafe 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -147,6 +147,7 @@ public: voidSetVisibilityListener( const Link& aVisListener ) { aVisibilityListener = aVisListener; } voidSetDefaultStyle( const OUString& rDefault ) { sDefaultStyle = rDefault; } +virtual boost::property_tree::ptree DumpAsPropertyTree() override; protected: /// Calculate the optimal width of the dropdown. Very expensive operation, triggers lots of font measurement. @@ -373,6 +374,7 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(vcl::Window* pParent, EnableUserDraw( true ); AddEventListener(LINK(this, SvxStyleBox_Impl, CalcOptimalExtraUserWidth)); SetUserItemSize( Size( 0, ITEM_HEIGHT ) ); +set_id("applystyle"); } SvxStyleBox_Impl::~SvxStyleBox_Impl() @@ -902,6 +904,36 @@ Color SvxStyleBox_Impl::TestColorsVisible(const Color , const Color return retCol; } +boost::property_tree::ptree SvxStyleBox_Impl::DumpAsPropertyTree() +{ +boost::property_tree::ptree aTree(ComboBox::DumpAsPropertyTree()); + +boost::property_tree::ptree aEntries; + +for (int i = 0; i < GetEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetEntry(i)); +aEntries.push_back(std::make_pair("", aEntry)); +} + +aTree.add_child("entries", aEntries); + +boost::property_tree::ptree aSelected; + +for (int i = 0; i < GetSelectedEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetSelectedEntryPos(i)); +aSelected.push_back(std::make_pair("", aEntry)); +} + +aTree.put("selectedCount", GetSelectedEntryCount()); +aTree.add_child("selectedEntries", aSelected); + +return aTree; +} + static bool lcl_GetDocFontList( const FontList** ppFontList, SvxFontNameBox_Impl* pBox ) { ___ 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' - svx/source vcl/source
svx/source/tbxctrls/tbcontrl.cxx| 32 svx/source/tbxctrls/tbunocontroller.cxx | 32 vcl/source/window/toolbox2.cxx | 26 +++--- 3 files changed, 79 insertions(+), 11 deletions(-) New commits: commit 37d2b00dfd5cbbda3492b00a06201879b629f1af Author: Szymon Kłos AuthorDate: Wed Oct 23 13:29:37 2019 +0200 Commit: Szymon Kłos CommitDate: Wed Oct 23 17:12:16 2019 +0200 jsdilogs: send data for font name & size toolitems Change-Id: Ia5ea058ba44b3a511a0bdbfc132a7de2d68f2e6b Reviewed-on: https://gerrit.libreoffice.org/81380 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit c7b97f2e4b8f47107bc91ded0295dcfffd0c71b6) Reviewed-on: https://gerrit.libreoffice.org/81395 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index c748507a1fc8..deecd6b37353 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -235,6 +235,7 @@ public: virtual boolEventNotify( NotifyEvent& rNEvt ) override; virtual Reference< css::accessibility::XAccessible > CreateAccessible() override; void SetOwnFontList(::std::unique_ptr && _aOwnFontList) { m_aOwnFontList = std::move(_aOwnFontList); } +virtual boost::property_tree::ptree DumpAsPropertyTree() override; }; // SelectHdl needs the Modifiers, get them in MouseButtonUp @@ -987,6 +988,7 @@ SvxFontNameBox_Impl::SvxFontNameBox_Impl( vcl::Window* pParent, const Reference< SetOptimalSize(); EnableControls_Impl(); GetSubEdit()->AddEventListener( LINK( this, SvxFontNameBox_Impl, CheckAndMarkUnknownFont )); +set_id("fontnamecombobox"); } SvxFontNameBox_Impl::~SvxFontNameBox_Impl() @@ -1260,6 +1262,36 @@ void SvxFontNameBox_Impl::Select() } } +boost::property_tree::ptree SvxFontNameBox_Impl::DumpAsPropertyTree() +{ +boost::property_tree::ptree aTree(FontNameBox::DumpAsPropertyTree()); + +boost::property_tree::ptree aEntries; + +for (int i = 0; i < GetEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetEntry(i)); +aEntries.push_back(std::make_pair("", aEntry)); +} + +aTree.add_child("entries", aEntries); + +boost::property_tree::ptree aSelected; + +for (int i = 0; i < GetSelectedEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetSelectedEntryPos(i)); +aSelected.push_back(std::make_pair("", aEntry)); +} + +aTree.put("selectedCount", GetSelectedEntryCount()); +aTree.add_child("selectedEntries", aSelected); + +return aTree; +} + SvxColorWindow::SvxColorWindow(const OUString&rCommand, std::shared_ptr const & rPaletteManager, ColorStatus& rColorStatus, diff --git a/svx/source/tbxctrls/tbunocontroller.cxx b/svx/source/tbxctrls/tbunocontroller.cxx index 18b22663e2c0..917d87b462ca 100644 --- a/svx/source/tbxctrls/tbunocontroller.cxx +++ b/svx/source/tbxctrls/tbunocontroller.cxx @@ -91,6 +91,7 @@ public: voidSetOptimalSize(); virtual boolEventNotify( NotifyEvent& rNEvt ) override; +virtual boost::property_tree::ptree DumpAsPropertyTree() override; protected: virtual voidSelect() override; @@ -120,6 +121,7 @@ SvxFontSizeBox_Impl::SvxFontSizeBox_Impl( { SetValue( 0 ); SetText( "" ); +set_id("fontsizecombobox"); } void SvxFontSizeBox_Impl::ReleaseFocus_Impl() @@ -260,6 +262,36 @@ void SvxFontSizeBox_Impl::DataChanged( const DataChangedEvent& rDCEvt ) FontSizeBox::DataChanged( rDCEvt ); } +boost::property_tree::ptree SvxFontSizeBox_Impl::DumpAsPropertyTree() +{ +boost::property_tree::ptree aTree(FontSizeBox::DumpAsPropertyTree()); + +boost::property_tree::ptree aEntries; + +for (int i = 0; i < GetEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetEntry(i)); +aEntries.push_back(std::make_pair("", aEntry)); +} + +aTree.add_child("entries", aEntries); + +boost::property_tree::ptree aSelected; + +for (int i = 0; i < GetSelectedEntryCount(); ++i) +{ +boost::property_tree::ptree aEntry; +aEntry.put("", GetSelectedEntryPos(i)); +aSelected.push_back(std::make_pair("", aEntry)); +} + +aTree.put("selectedCount", GetSelectedEntryCount()); +aTree.add_child("selectedEntries", aSelected); + +return aTree; +} + FontHeightToolBoxControl::FontHeightToolBoxControl( const uno::Reference< uno::XComponentContext >& rxContext ) : svt::ToolboxController( rxContext, uno::Reference< frame::XFrame >(), diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 5e5de5430d22..9a618a0b07eb 100644 ---
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source
svx/source/svdraw/svdedxv.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 3ca663cc5398b7c50c2476bd6372f1f766c7133e Author: Jan Holesovsky AuthorDate: Fri Oct 4 00:09:15 2019 +0200 Commit: Jan Holesovsky CommitDate: Fri Oct 4 15:14:51 2019 +0200 tdf#127941: Don't be _that_ eager to assert(!IsTextEdit()); Turns out that this is still a condition that can happen regularly: * open Impress * click an object with a spelling mistake * press F7 to activate the spelling dialog (don't choose it from the menu) => assert() It is unclear how to sort this out correctly without refactoring, and also unclear how many other cases fail this condition, so let's change to SAL_WARN_IF for the moment. Change-Id: I97730cc93c86c279973702bbf4ddc922f1616c0b Reviewed-on: https://gerrit.libreoffice.org/80171 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index b704e8d34780..c38ebfa75505 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1021,7 +1021,10 @@ bool SdrObjEditView::SdrBeginTextEdit( bool bDontDeleteOutliner, bool bOnlyOneView, bool bGrabFocus) { -assert(!IsTextEdit()); +// FIXME cannot be an assert() yet, the code is not ready for that; +// eg. press F7 in Impress when you are inside a text object with spelling +// mistakes => boom; and it is unclear how to avoid that +SAL_WARN_IF(IsTextEdit(), "svx", "SdrBeginTextEdit called when IsTextEdit() is already true."); // FIXME this encourages all sorts of bad habits and should be removed SdrEndTextEdit(); ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx| 16 +++- svx/source/table/tablecontroller.cxx |3 --- 2 files changed, 3 insertions(+), 16 deletions(-) New commits: commit e71c70f4c60731bca441f9020176d0a819befd83 Author: Tomaž Vajngerl AuthorDate: Wed Oct 2 14:32:07 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Oct 3 10:41:52 2019 +0200 tdf#125565 always send the graphic selection for the table Reviewed-on: https://gerrit.libreoffice.org/80034 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit c9336bfb6bbf6d73d3f23c124262ade30133448d) Change-Id: I7085b2f1ddcfd83eccbbcaba4892cde95b6bd85c Reviewed-on: https://gerrit.libreoffice.org/80092 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 443a4b59e08f..b66bc9d69e45 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -746,7 +746,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } SfxViewShell* pViewShell = GetSfxViewShell(); -bool bIsInTextEditMode = false; + // check if text edit or ole is active and handles need to be suppressed. This may be the case // when a single object is selected // Using a strict return statement is okay here; no handles means *no* handles. @@ -764,9 +764,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (pSdrTextObj && pSdrTextObj->IsInEditMode()) { -if (bTiledRendering) -bIsInTextEditMode = true; -else +if (!bTiledRendering) return; } } @@ -832,19 +830,11 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) OString sSelectionText; boost::property_tree::ptree aTableJsonTree; bool bTableSelection = false; -bool bCellsAreSelected = false; if (mpMarkedObj && mpMarkedObj->GetObjIdentifier() == OBJ_TABLE) { auto* pTableObject = dynamic_cast(mpMarkedObj); bTableSelection = pTableObject->createTableEdgesJson(aTableJsonTree); - -rtl::Reference xController = static_cast(this)->getSelectionController(); -if (xController.is() && xController->hasSelectedCells()) -{ -// The table shape has selected cells, which provide text selection already -> no graphic selection. -bCellsAreSelected = true; -} } if (GetMarkedObjectCount()) { @@ -1002,7 +992,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } -if (sSelectionText.isEmpty() || bCellsAreSelected || bIsInTextEditMode) +if (sSelectionText.isEmpty()) sSelectionText = "EMPTY"; if (bTableSelection) diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index 5b5116c7877a..a07a90ac1bb5 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -2296,9 +2296,6 @@ void SvxTableController::updateSelectionOverlay() { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, aSelection.toString().getStr()); pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, aSelection.toString().getStr()); -OString sSelection("EMPTY"); - pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr()); -SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", sSelection); } } } ___ 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' - svx/source
svx/source/svdraw/svdograf.cxx |4 1 file changed, 4 insertions(+) New commits: commit 0aa006a1429fa9bd58ed2362ce08791b377c8579 Author: Tor Lillqvist AuthorDate: Tue Mar 26 16:16:44 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Sep 20 12:56:10 2019 +0200 Stopgap measure to fix compilation error on Windows Somehow gets included here and it #defines GetMetaFile as GetMetaFileA. Undo that. Change-Id: Ia99c077ef7b3f845efabaf286f12e2688fe4a132 (cherry picked from commit c6056a8f913a161199a2833b6afa3735680a1c4d) Reviewed-on: https://gerrit.libreoffice.org/79190 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index 38e57ac81694..0e4413b3764f 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -866,6 +866,10 @@ GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedVectorGraphicData() const return aRetval; } +#ifdef _WIN32 +#undef GetMetaFile +#endif + GDIMetaFile SdrGrafObj::GetMetaFile(GraphicType ) const { if (isEmbeddedVectorGraphicData()) ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit a5acbbdbce32b25000ad2f1429c7bc307c7d28cb Author: Szymon Kłos AuthorDate: Wed May 29 15:29:04 2019 +0200 Commit: Andras Timar CommitDate: Wed Sep 18 22:53:11 2019 +0200 lok: send message when in place editing Change-Id: I96d22cabeda1eb851116d556a5302394a0dd7f93 Reviewed-on: https://gerrit.libreoffice.org/73162 Reviewed-by: Andras Timar Tested-by: Andras Timar (cherry picked from commit 96ca927aca86b077b9914178e6c68ed0d4c0e3d1) Reviewed-on: https://gerrit.libreoffice.org/79093 Tested-by: Jenkins CollaboraOffice diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index d68f0d634941..443a4b59e08f 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -776,7 +776,12 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if(pSdrOle2Obj && (pSdrOle2Obj->isInplaceActive() || pSdrOle2Obj->isUiActive())) { -return; +if(pViewShell) +{ + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE"); +SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "INPLACE"); +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' - svx/source
svx/source/svdraw/svdedxv.cxx |4 1 file changed, 4 insertions(+) New commits: commit 2be775d1f135fd39128f08bcb9d16539e88faa22 Author: Henry Castro AuthorDate: Fri Mar 22 11:56:20 2019 -0400 Commit: Andras Timar CommitDate: Wed Sep 18 21:48:34 2019 +0200 tdf#124167: Changing text properties doesn't make presentation... modified right away when the attributes of edit engine has changed also broadcast the changes Change-Id: I28c67a4167e0b5653b6e9b645069830aa5575412 Reviewed-on: https://gerrit.libreoffice.org/69564 Tested-by: Jenkins Reviewed-by: Henry Castro (cherry picked from commit dd8010c037a06763b3554739c01c9029988ad84f) Reviewed-on: https://gerrit.libreoffice.org/79103 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index c7f8b58e2fdf..b704e8d34780 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2159,6 +2159,10 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) } pTextEditOutlinerView->SetAttribs(rSet); +Outliner* pTEOutliner = pTextEditOutlinerView->GetOutliner(); +if (mpModel && pTEOutliner && pTEOutliner->IsModified()) +mpModel->SetChanged(); + #ifdef DBG_UTIL if (mpItemBrowser!=nullptr) mpItemBrowser->SetDirty(); ___ 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' - svx/source svx/uiconfig
svx/source/dialog/crashreportdlg.cxx |3 +-- svx/source/dialog/crashreportdlg.hxx |2 +- svx/uiconfig/ui/crashreportdlg.ui|7 ++- 3 files changed, 4 insertions(+), 8 deletions(-) New commits: commit 6d166595c370fb221a286d1ee98ebc3081127cf5 Author: Andras Timar AuthorDate: Fri May 5 16:20:35 2017 +0200 Commit: Andras Timar CommitDate: Tue Sep 17 12:53:39 2019 +0200 don't show inaccessible crashreport links (cherry picked from commit 0d045c85fb8dbdb7fa2e116ef9983e0a60bd2b99) Change-Id: I3c4ed28cb1a02049fb009f576943f80b8ba8e627 Reviewed-on: https://gerrit.libreoffice.org/78403 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx index 21581b0a865c..248aab0f2e59 100644 --- a/svx/source/dialog/crashreportdlg.cxx +++ b/svx/source/dialog/crashreportdlg.cxx @@ -30,7 +30,7 @@ CrashReportDialog::CrashReportDialog(vcl::Window* pParent): get(mpBtnCancel, "btn_cancel"); get(mpBtnClose, "btn_close"); get(mpEditPreUpload, "ed_pre"); -get(mpEditPostUpload, "ed_post"); +get(mpEditPostUpload, "ft_post"); get(mpBugReportMailto, "bugreport_mailto"); get(mpCBSafeMode, "check_safemode"); @@ -39,7 +39,6 @@ CrashReportDialog::CrashReportDialog(vcl::Window* pParent): mpBtnSend->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl)); mpBtnCancel->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl)); mpBtnClose->SetClickHdl(LINK(this, CrashReportDialog, BtnHdl)); -mpEditPostUpload->SetReadOnly(); } CrashReportDialog::~CrashReportDialog() diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx index a564670bad55..69474a870fb5 100644 --- a/svx/source/dialog/crashreportdlg.hxx +++ b/svx/source/dialog/crashreportdlg.hxx @@ -35,7 +35,7 @@ private: VclPtr mpBtnCancel; VclPtr mpBtnClose; VclPtr mpEditPreUpload; -VclPtr mpEditPostUpload; +VclPtr mpEditPostUpload; VclPtr mpBugReportMailto; VclPtr mpCBSafeMode; diff --git a/svx/uiconfig/ui/crashreportdlg.ui b/svx/uiconfig/ui/crashreportdlg.ui index 2651979a0c62..eabfbbf9df5b 100644 --- a/svx/uiconfig/ui/crashreportdlg.ui +++ b/svx/uiconfig/ui/crashreportdlg.ui @@ -81,15 +81,12 @@ You can help us to fix this issue by sending an anonymous crash report to the %P - + False center 0 -The crash report was successfully uploaded. -You can soon find the report at: -http://crashreport.collaboraoffice.com/stats/crash_details/%CRASHID +The crash report was successfully uploaded. 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 'distro/collabora/cp-6.2' - svx/source
svx/source/svdraw/svdmrkv.cxx | 71 +- 1 file changed, 36 insertions(+), 35 deletions(-) New commits: commit 5e930cdd29170b628810c0fb890db09fe05891e2 Author: Tomaž Vajngerl AuthorDate: Sun Aug 25 23:00:53 2019 +0900 Commit: Tomaž Vajngerl CommitDate: Fri Sep 6 11:59:00 2019 +0200 lok: cleanup and simplify graphic selection code Don't get SfxViewShell all the time, just one and ask if it is available (non-null). Rename sSelection to sSelectionText so it doesn't look similar to aSelection. Group more if statement together - especially to bring them under bTiledRendering "umbrella" Change-Id: Ic998f67a2e5de7482a0073a67ddffd721c012525 Reviewed-on: https://gerrit.libreoffice.org/78082 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit f876dc9e16b9c85ae85ed848865531a8be0e911c) Reviewed-on: https://gerrit.libreoffice.org/78685 Tested-by: Tomaž Vajngerl diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 5ce4ccc84518..0b9ed33ecf4a 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -742,6 +742,8 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } } +SfxViewShell* pViewShell = GetSfxViewShell(); + // check if text edit or ole is active and handles need to be suppressed. This may be the case // when a single object is selected // Using a strict return statement is okay here; no handles means *no* handles. @@ -762,7 +764,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (bTiledRendering) { // Suppress handles -> empty graphic selection. -if(SfxViewShell* pViewShell = GetSfxViewShell()) +if (pViewShell) { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "EMPTY"); @@ -786,7 +788,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) if (xController.is() && xController->hasSelectedCells()) { // The table shape has selected cells, which provide text selection already -> no graphic selection. -if(SfxViewShell* pViewShell = GetSfxViewShell()) +if (pViewShell) { pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY"); SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_GRAPHIC_VIEW_SELECTION, "selection", "EMPTY"); @@ -797,35 +799,33 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) } tools::Rectangle aRect(GetMarkedObjRect()); -tools::Rectangle aSelection(aRect); -bool bIsChart = false; -if (bTiledRendering && !aRect.IsEmpty()) +if (bTiledRendering && pViewShell) { -sal_uInt32 nTotalPaintWindows = this->PaintWindowCount(); -if (nTotalPaintWindows == 1) +tools::Rectangle aSelection(aRect); +bool bIsChart = false; + +if (!aRect.IsEmpty()) { -const vcl::Window* pWin = dynamic_cast(this->GetFirstOutputDevice()); -if (pWin && pWin->IsChart()) +sal_uInt32 nTotalPaintWindows = this->PaintWindowCount(); +if (nTotalPaintWindows == 1) { -bIsChart = true; -const vcl::Window* pViewShellWindow = GetSfxViewShell()->GetEditWindowForActiveOLEObj(); -if (pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin)) +const vcl::Window* pWin = dynamic_cast(this->GetFirstOutputDevice()); +if (pWin && pWin->IsChart()) { -Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow); -Point aLogicOffset = pWin->PixelToLogic(aOffsetPx); -aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY()); +bIsChart = true; +const vcl::Window* pViewShellWindow = GetSfxViewShell()->GetEditWindowForActiveOLEObj(); +if (pViewShellWindow && pViewShellWindow->IsAncestorOf(*pWin)) +{ +Point aOffsetPx = pWin->GetOffsetPixelFrom(*pViewShellWindow); +Point aLogicOffset = pWin->PixelToLogic(aOffsetPx); +aSelection.Move(aLogicOffset.getX(), aLogicOffset.getY()); +} } } } -} -if (bTiledRendering) -{ -OString sSelection; -if (aSelection.IsEmpty()) -sSelection = "EMPTY"; -else +if (!aSelection.IsEmpty()) { // In case the map mode is in 100th
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - svx/source vcl/source
svx/source/sdr/contact/viewcontactofgroup.cxx |6 ++ svx/source/sdr/contact/viewcontactofsdrrectobj.cxx |5 ++--- vcl/source/helper/canvastools.cxx |6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) New commits: commit b6d2d10b8b2de89b1a856b8e164c0defcb2119ff Author: Noel Grandin AuthorDate: Fri May 3 16:19:51 2019 +0200 Commit: Andras Timar CommitDate: Thu Sep 5 09:08:21 2019 +0200 tdf#81134 Chart size not retained Change-Id: I39019e29a988b7b9e12505537fdb69d83223600d Reviewed-on: https://gerrit.libreoffice.org/75329 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/78422 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx index d6a0e98dfcfe..cc82432aaea6 100644 --- a/svx/source/sdr/contact/viewcontactofgroup.cxx +++ b/svx/source/sdr/contact/viewcontactofgroup.cxx @@ -27,6 +27,7 @@ #include #include #include +#include namespace sdr @@ -76,10 +77,7 @@ namespace sdr // to current zoom so as objects relative position to grid // appears stable aCurrentBoundRect += GetSdrObjGroup().GetGridOffset(); -const basegfx::B2DRange aCurrentRange( -aCurrentBoundRect.Left(), aCurrentBoundRect.Top(), -aCurrentBoundRect.Right(), aCurrentBoundRect.Bottom()); - +const basegfx::B2DRange aCurrentRange = vcl::unotools::b2DRectangleFromRectangle(aCurrentBoundRect); const drawinglayer::primitive2d::Primitive2DReference xReference( drawinglayer::primitive2d::createHiddenGeometryPrimitives2D( false, aCurrentRange)); diff --git a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx index f02ba917280c..0ada135b8766 100644 --- a/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrrectobj.cxx @@ -25,6 +25,7 @@ #include #include #include +#include namespace sdr { namespace contact { @@ -52,9 +53,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfSdrRectObj::createV // to current zoom so as objects relative position to grid // appears stable rRectangle += GetRectObj().GetGridOffset(); -const ::basegfx::B2DRange aObjectRange( -rRectangle.Left(), rRectangle.Top(), -rRectangle.Right(), rRectangle.Bottom() ); +const ::basegfx::B2DRange aObjectRange = vcl::unotools::b2DRectangleFromRectangle(rRectangle); const GeoStat& rGeoStat(GetRectObj().GetGeoStat()); diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx index b78625fb54ad..40502932864c 100644 --- a/vcl/source/helper/canvastools.cxx +++ b/vcl/source/helper/canvastools.cxx @@ -394,9 +394,9 @@ namespace vcl basegfx::B2DRange b2DRectangleFromRectangle( const ::tools::Rectangle& rRect ) { return basegfx::B2DRange( rRect.Left(), -rRect.Top(), -rRect.Right(), -rRect.Bottom() ); + rRect.Top(), + rRect.IsWidthEmpty() ? rRect.Left() :rRect.Right(), + rRect.IsHeightEmpty() ? rRect.Top() : rRect.Bottom() ); } geometry::IntegerSize2D integerSize2DFromSize( const Size& rSize ) ___ 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' - svx/source
svx/source/svdraw/svdedtv1.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 78172b81a4cabdd39bea4dd037c3cd8309d6c57a Author: Tamás Zolnai AuthorDate: Fri Nov 23 13:01:02 2018 +0100 Commit: Tor Lillqvist CommitDate: Tue Aug 27 22:25:55 2019 +0200 lok: Right rotation calculation in case of delta angle Change-Id: Ia7d0a573c1902fba3fc1e69f425bbf2dc93a1c82 (cherry picked from commit 173953dd0ede08ad5972e48286f0d10e0d588733) Reviewed-on: https://gerrit.libreoffice.org/78197 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 31fc953ed2b1..c0efa3a717a4 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -1544,7 +1544,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr) // rotation if (SfxItemState::SET == rAttr.GetItemState(SID_ATTR_TRANSFORM_DELTA_ANGLE, true, )) { -nRotateAngle = static_cast(pPoolItem)->GetValue() + nOldRotateAngle; +nRotateAngle = static_cast(pPoolItem)->GetValue(); bRotate = (nRotateAngle != 0); } ___ 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' - svx/source
svx/source/svdraw/svdmrkv.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 03e2d2a906288f520a4b046d5b96dfba759b27b0 Author: Miklos Vajna AuthorDate: Thu May 9 11:32:56 2019 +0200 Commit: Miklos Vajna CommitDate: Fri Aug 23 15:48:29 2019 +0200 svx lok: fix crash on select all when there is no mpMarkedObj yet Fixes the online.git HTTPWSTest::testRenderShapeSelectionImpress() testcase by reverting one hunk of commit 3fb298f673db169a38c1258d66ec24821386eb40 (lok: writer: svg export transformed images, 2019-03-26). This was probably meant to be a cleanup, but getting the sdr mark, followed by getting the sdr object of the mark always gives us a shape, while directly accessing mpMarkedObj does not. Change-Id: Id733ba5c6fdf6fc86a3e9f7de62b4bdcbf9b06db Reviewed-on: https://gerrit.libreoffice.org/72039 Reviewed-by: Michael Meeks Tested-by: Michael Meeks Reviewed-on: https://gerrit.libreoffice.org/72566 Tested-by: Jenkins Reviewed-by: Marco Cecchetti (cherry picked from commit b359e4816a9d40beb79f1f87be1c0d12a59555f7) diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index b6cd8a3426ef..5ce4ccc84518 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -847,7 +847,8 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) { if (GetMarkedObjectCount()) { -SdrObject* pO = mpMarkedObj; +SdrMark* pM = GetSdrMarkByIndex(0); +SdrObject* pO = pM->GetMarkedSdrObj(); long nRotAngle = pO->GetRotateAngle(); // true if we are delaing with a RotGrfFlyFrame // (SwVirtFlyDrawObj with a SwGrfNode) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits