[Libreoffice-commits] core.git: sot/source stoc/test svl/source svtools/source svx/source

2021-06-09 Thread Julien Nabet (via logerrit)
 sot/source/sdstor/ucbstorage.cxx   |   10 +---
 stoc/test/testregistry.cxx |7 -
 svl/source/passwordcontainer/passwordcontainer.cxx |   26 -
 svtools/source/control/inettbc.cxx |   15 +---
 svx/source/accessibility/charmapacc.cxx|8 +-
 svx/source/fmcomp/gridcell.cxx |   15 
 svx/source/form/formcontroller.cxx |   13 +-
 svx/source/xml/xmleohlp.cxx|2 -
 8 files changed, 25 insertions(+), 71 deletions(-)

New commits:
commit 159030991c70fc3c4018ef28abf1814902a0aebb
Author: Julien Nabet 
AuthorDate: Wed Jun 9 23:17:41 2021 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 10 08:30:12 2021 +0200

Simplify Sequences initializations (sot/stock/svl/svtools/svx)

Change-Id: Iec21851d69f4a8d5f557e9ed2d30e5f680cd62c2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116943
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 162748e5b5d2..460b3c650fe3 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -1670,20 +1670,14 @@ void UCBStorage_Impl::ReadContent()
 
 m_bListCreated = true;
 
-// create cursor for access to children
-Sequence< OUString > aProps(4);
-aProps[0] = "Title";
-aProps[1] = "IsFolder";
-aProps[2] = "MediaType";
-aProps[3] = "Size";
-
 try
 {
 GetContent();
 if ( !m_pContent )
 return;
 
-Reference< XResultSet > xResultSet = m_pContent->createCursor( aProps, 
::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS );
+// create cursor for access to children
+Reference< XResultSet > xResultSet = m_pContent->createCursor( { 
"Title", "IsFolder", "MediaType", "Size" }, 
::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS );
 Reference< XRow > xRow( xResultSet, UNO_QUERY );
 if ( xResultSet.is() )
 {
diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx
index d81328ac6f37..ef0d0a91d551 100644
--- a/stoc/test/testregistry.cxx
+++ b/stoc/test/testregistry.cxx
@@ -513,12 +513,7 @@ void test_DefaultRegistry(
 OSL_ENSURE( seqValue.getArray()[2] == "come",
   "test_DefaultRegistry error 13" );
 
-Sequence seqLong(3);
-seqLong.getArray()[0] = 1234;
-seqLong.getArray()[1] = 4567;
-seqLong.getArray()[2] = 7890;
-
-xKey->setLongListValue(seqLong);
+xKey->setLongListValue({ 1234, 4567, 7890 });
 
 Sequence seqLongValue = xKey->getLongListValue();
 
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx 
b/svl/source/passwordcontainer/passwordcontainer.cxx
index 596a6e413db3..99f94c5eb809 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -231,15 +231,11 @@ PassMap StorageItem::getInfo()
 
 void StorageItem::setUseStorage( bool bUse )
 {
-Sequence< OUString > sendNames(1);
 Sequence< uno::Any > sendVals(1);
-
-sendNames[0] = "UseStorage";
-
 sendVals[0] <<= bUse;
 
 ConfigItem::SetModified();
-ConfigItem::PutProperties( sendNames, sendVals );
+ConfigItem::PutProperties( { "UseStorage" }, sendVals );
 }
 
 
@@ -293,18 +289,14 @@ bool StorageItem::getEncodedMP( OUString& aResult )
 
 void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty )
 {
-Sequence< OUString > sendNames(2);
 Sequence< uno::Any > sendVals(2);
 
-sendNames[0] = "HasMaster";
-sendNames[1] = "Master";
-
 bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty );
 sendVals[0] <<= bHasMaster;
 sendVals[1] <<= aEncoded;
 
 ConfigItem::SetModified();
-ConfigItem::PutProperties( sendNames, sendVals );
+ConfigItem::PutProperties( { "HasMaster", "Master" }, sendVals );
 
 hasEncoded = bHasMaster;
 mEncoded = aEncoded;
@@ -313,13 +305,8 @@ void StorageItem::setEncodedMP( const OUString& aEncoded, 
bool bAcceptEmpty )
 
 void StorageItem::remove( const OUString& aURL, const OUString& aName )
 {
-std::vector < OUString > forIndex;
-forIndex.push_back( aURL );
-forIndex.push_back( aName );
-
-Sequence< OUString > sendSeq(1);
-
-sendSeq[0] = createIndex( forIndex );
+std::vector < OUString > forIndex { aURL, aName };
+Sequence< OUString > sendSeq { createIndex( forIndex ) };
 
 ConfigItem::ClearNodeElements( "Store", sendSeq );
 }
@@ -673,18 +660,15 @@ UrlRecord SAL_CALL PasswordContainer::findForName( const 
OUString& aURL, const O
 
 Sequence< UserRecord > PasswordContainer::FindUsr( const std::vector< 
NamePassRecord >& userlist, std::u16string_view aName, const Reference< 
XInteractionHandler >& aHandler )
 {
-sal_uInt32 nInd = 0;
 for (auto const& aNPIter : userlist)
 {
  

[Libreoffice-commits] core.git: sd/inc sd/source

2021-06-09 Thread Tomaž Vajngerl (via logerrit)
 sd/inc/Outliner.hxx|3 +
 sd/source/ui/view/Outliner.cxx |   63 +
 2 files changed, 36 insertions(+), 30 deletions(-)

New commits:
commit 36db408b9027da01464927e5853950435596ae05
Author: Tomaž Vajngerl 
AuthorDate: Wed Jun 9 14:58:28 2021 +0900
Commit: Tomaž Vajngerl 
CommitDate: Thu Jun 10 02:36:22 2021 +0200

sd: ubsan - fix heap-use-after-free in SdOutliner

OutlinerView can change (old one deleted and new one create)
so we can't store it in a local vairable and need to always
fetch it.

UBSAN Error log:
==21484==ERROR: AddressSanitizer: heap-use-after-free on address 
0x606000af7d28 at pc 0x2ab7c5979405 bp 0x7ffcd1a3d1a0 sp 0x7ffcd1a3d198
  READ of size 8 at 0x606000af7d28 thread T0
  -0 0x2ab7c5979404 in std::__uniq_ptr_impl >::_M_ptr() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:147:42
  -1 0x2ab7c59792ea in std::unique_ptr >::get() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:337:21
  -2 0x2ab7c59791d9 in std::unique_ptr >::operator*() const 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/unique_ptr.h:322:2
  -3 0x2ab7c59725da in OutlinerView::GetEditView() const 
/include/editeng/outliner.hxx:209:46
  -4 0x2ab7c70e36bb in 
SdOutliner::SearchAndReplaceOnce(std::__debug::vector >*) /sd/source/ui/view/Outliner.cxx:903:21
  -5 0x2ab7c70dcb32 in SdOutliner::SearchAndReplaceAll() 
/sd/source/ui/view/Outliner.cxx:622:29
  -6 0x2ab7c70da81b in SdOutliner::StartSearchAndReplace(SvxSearchItem 
const*) /sd/source/ui/view/Outliner.cxx:478:28
  -7 0x2ab7c61e4fc5 in sd::FuSearch::SearchAndReplace(SvxSearchItem 
const*) /sd/source/ui/func/fusearch.cxx:128:44
  -8 0x2ab7c5c61fc5 in sd::DrawDocShell::Execute(SfxRequest&) 
/sd/source/ui/docshell/docshel3.cxx:228:36
  -9 0x2ab7c5cac074 in SfxStubDrawDocShellExecute(SfxShell*, 
SfxRequest&) /workdir/SdiTarget/sd/sdi/sdslots.hxx:18384:1
  -10 0x2ab7cd885d8f in SfxDispatcher::Call_Impl(SfxShell&, SfxSlot 
const&, SfxRequest&, bool) /sfx2/source/control/dispatch.cxx:253:9
  -11 0x2ab7cd89bd8f in SfxDispatcher::Execute_(SfxShell&, SfxSlot 
const&, SfxRequest&, SfxCallMode) /sfx2/source/control/dispatch.cxx:753:9
  -12 0x2ab7cd89ccd6 in SfxDispatcher::Execute(unsigned short, 
SfxCallMode, SfxItemSet const*, SfxItemSet const*, unsigned short) 
/sfx2/source/control/dispatch.cxx:811:9
  -13 0x2ab7cdd11d76 in 
SfxDispatchController_Impl::dispatch(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:738:46
  -14 0x2ab7cdd15135 in 
SfxOfficeDispatch::dispatchWithNotification(com::sun::star::util::URL const&, 
com::sun::star::uno::Sequence const&, 
com::sun::star::uno::Reference 
const&) /sfx2/source/control/unoctitm.cxx:243:16
  -15 0x2ab7f54b25d7 in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, com::sun::star::util::URL const&, bool, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:159:30
  -16 0x2ab7f54b1531 in 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx:117:16
  -17 0x2ab7f54b2d17 in non-virtual thunk to 
framework::DispatchHelper::executeDispatch(com::sun::star::uno::Reference
 const&, rtl::OUString const&, rtl::OUString const&, int, 
com::sun::star::uno::Sequence const&) 
/framework/source/services/dispatchhelper.cxx
  -18 0x2ab7e63c546f in 
unotest::MacrosTest::dispatchCommand(com::sun::star::uno::Reference
 const&, rtl::OUString const&, 
com::sun::star::uno::Sequence const&) 
/unotest/source/cpp/macros_test.cxx:85:22
  -19 0x2ab7b1a9ac2d in testSearchAllInDocumentAndNotes::TestBody() 
/sd/qa/unit/uiimpress.cxx:715:5
  -20 0x2ab7b1b43f84 in void std::__invoke_impl(std::__invoke_memfun_deref, void 
(testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:73:14
  -21 0x2ab7b1b43b5e in std::__invoke_result::type std::__invoke(void 
(testSearchAllInDocumentAndNotes::*&)(), testSearchAllInDocumentAndNotes*&) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95:14
  -22 0x2ab7b1b439b2 in void std::_Bind::__call(std::tuple<>&&, 
std::_Index_tuple<0ul>) 
/home/tdf/lode/opt_private/gcc-7.3.0/lib/gcc/x86_64-pc-linux-gnu/7.3.0/../../../../include/c++/

[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sw/source/core/frmedt/feshview.cxx |   19 ---
 1 file changed, 19 deletions(-)

New commits:
commit aa9cb8e14749e7fb7a83b55a2bb095501f731a18
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 16:18:55 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 22:52:24 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

For both aRelNullPt local variables in SwFEShell::ImpEndCreate and
SwFEShell::CheckUnboundObjects the (only) reads were removed with
5f7d6695ab561758acb27a93f14e08ee960324d5 "INTEGRATION: CWS 
swdrawpositioning".
(And nIdent in SwFEShell::CheckUnboundObjects thus becomes unused, too.)

Change-Id: Ifb4851b4e10b7370f2fc2f25bcdba77d532e77a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116845
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index d0a980fed49b..6e070d448399 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -2133,12 +2133,6 @@ bool SwFEShell::ImpEndCreate()
 GetDoc()->GetIDocumentUndoRedo().DoDrawUndo(bRestore);
 }
 
-Point aRelNullPt;
-if( OBJ_CAPTION == nIdent )
-aRelNullPt = static_cast(rSdrObj).GetTailPos();
-else
-aRelNullPt = rBound.TopLeft();
-
 aSet.Put( aAnch );
 aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) );
 // OD 2004-03-30 #i26791# - set horizontal position
@@ -2826,12 +2820,6 @@ void SwFEShell::CheckUnboundObjects()
 pPage = pLast;
 OSL_ENSURE( pPage, "Page not found." );
 
-// Alien identifier should roll into the default,
-// Duplications are possible!!
-sal_uInt16 nIdent =
-Imp()->GetDrawView()->GetCurrentObjInventor() == 
SdrInventor::Default ?
-Imp()->GetDrawView()->GetCurrentObjIdentifier() : 
0x;
-
 SwFormatAnchor aAnch;
 {
 const SwContentFrame *const pAnch = ::FindAnchor(pPage, aPt, true);
@@ -2850,13 +2838,6 @@ void SwFEShell::CheckUnboundObjects()
 RES_SURROUND, RES_ANCHOR>{} );
 aSet.Put( aAnch );
 
-Point aRelNullPt;
-
-if( OBJ_CAPTION == nIdent )
-aRelNullPt = static_cast(pObj)->GetTailPos();
-else
-aRelNullPt = rBound.TopLeft();
-
 aSet.Put( aAnch );
 aSet.Put( SwFormatSurround( css::text::WrapTextMode_THROUGH ) );
 SwFrameFormat* pFormat = 
getIDocumentLayoutAccess().MakeLayoutFormat( RndStdIds::DRAW_OBJECT, &aSet );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: uui/source

2021-06-09 Thread Andreas Heinisch (via logerrit)
 uui/source/passworddlg.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit 17694c906f94a195a2d5086e0e87afa1c852107b
Author: Andreas Heinisch 
AuthorDate: Mon Jun 7 14:00:23 2021 +0200
Commit: Andreas Heinisch 
CommitDate: Wed Jun 9 21:45:53 2021 +0200

tdf#66553 - Add file/product name to title bar for password managers

Change-Id: I6a16e654edcbc3511ee8cbea0889d858e22f2a2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116782
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 

diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 3e8d1550f6cd..694e717216b1 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -21,6 +21,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -78,6 +79,14 @@ PasswordDialog::PasswordDialog(weld::Window* pParent,
 const char* pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : 
STR_ENTER_PASSWORD_TO_OPEN;
 OUString aMessage(Translate::get(pStrId, rResLocale));
 INetURLObject url(aDocURL);
+
+// tdf#66553 - add file name to title bar for password managers
+OUString aFileName = url.getName(INetURLObject::LAST_SEGMENT, true,
+ 
INetURLObject::DecodeMechanism::Unambiguous);
+if (!aFileName.isEmpty())
+aFileName += " - " + utl::ConfigManager::getProductName();
+m_xDialog->set_title(aTitle + " - " + aFileName);
+
 aMessage += url.HasError()
 ? aDocURL : 
url.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
 m_xFTPassword->set_label(aMessage);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Luboš Luňák (via logerrit)
 sw/source/core/view/viewsh.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2aa2d03ec4e775d9399420c21cd1f2e972984154
Author: Luboš Luňák 
AuthorDate: Wed Jun 9 15:32:52 2021 +0200
Commit: Luboš Luňák 
CommitDate: Wed Jun 9 21:36:28 2021 +0200

do not draw directly in SwViewShell in LOK mode

Online mode draws tiles as necessary, so there's no need to care
about flickering, and this drawing is in fact not needed at all
for Online.

Change-Id: I19d981ad6ab6890ada1f415dc251a3492fd054ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116920
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index a28f3dc2df52..ff59a3b58c01 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -473,7 +473,7 @@ void SwViewShell::ImplUnlockPaint( bool bVirDev )
 CurrShell aCurr( this );
 if ( GetWin() && GetWin()->IsVisible() )
 {
-if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() )
+if ( (bInSizeNotify || bVirDev ) && VisArea().HasArea() && 
!comphelper::LibreOfficeKit::isActive())
 {
 //Refresh with virtual device to avoid flickering.
 VclPtrInstance pVout( *mpOut );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/source

2021-06-09 Thread Julien Nabet (via logerrit)
 sfx2/source/bastyp/helper.cxx|   13 ++---
 sfx2/source/doc/doctempl.cxx |8 +---
 sfx2/source/doc/doctemplates.cxx |   32 +---
 sfx2/source/doc/sfxbasemodel.cxx |   25 +++--
 4 files changed, 23 insertions(+), 55 deletions(-)

New commits:
commit 58d218df8c5e36468183ebae666120a6d5d0a4f7
Author: Julien Nabet 
AuthorDate: Wed Jun 9 20:03:04 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 21:28:05 2021 +0200

Simplify Sequences initializations (sfx2)

Change-Id: I1384dd80e910ba1c55ec7481ab481bc48740fc5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116937
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 7918cfcceec1..d9d1a4bb4da4 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -49,15 +49,10 @@ std::vector SfxContentHelper::GetResultSet( const 
OUString& rURL )
 ::ucbhelper::Content aCnt( rURL, uno::Reference< 
ucb::XCommandEnvironment >(), comphelper::getProcessComponentContext() );
 uno::Reference< sdbc::XResultSet > xResultSet;
 uno::Reference< ucb::XDynamicResultSet > xDynResultSet;
-uno::Sequence< OUString > aProps(3);
-OUString* pProps = aProps.getArray();
-pProps[0] = "Title";
-pProps[1] = "ContentType";
-pProps[2] = "IsFolder";
 
 try
 {
-xDynResultSet = aCnt.createDynamicCursor( aProps );
+xDynResultSet = aCnt.createDynamicCursor( { "Title", 
"ContentType", "IsFolder" } );
 if ( xDynResultSet.is() )
 xResultSet = xDynResultSet->getStaticResultSet();
 }
@@ -112,14 +107,10 @@ std::vector< OUString > 
SfxContentHelper::GetHelpTreeViewContents( const OUStrin
 
 ::ucbhelper::Content aCnt( rURL, new ::ucbhelper::CommandEnvironment( 
xInteractionHandler, uno::Reference< ucb::XProgressHandler >() ), 
comphelper::getProcessComponentContext() );
 uno::Reference< sdbc::XResultSet > xResultSet;
-uno::Sequence< OUString > aProps(2);
-OUString* pProps = aProps.getArray();
-pProps[0] = "Title";
-pProps[1] = "IsFolder";
 
 try
 {
-uno::Reference< ucb::XDynamicResultSet > xDynResultSet = 
aCnt.createDynamicCursor( aProps );
+uno::Reference< ucb::XDynamicResultSet > xDynResultSet = 
aCnt.createDynamicCursor( { "Title", "IsFolder" } );
 if ( xDynResultSet.is() )
 xResultSet = xDynResultSet->getStaticResultSet();
 }
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 5e6dd0e6260b..cea3d30f4f1d 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -1488,16 +1488,10 @@ void SfxDocTemplate_Impl::AddRegion( const OUString& 
rTitle,
 
 // now get the content of the region
 uno::Reference< XResultSet > xResultSet;
-Sequence< OUString > aProps(2);
-aProps[0] = TITLE;
-aProps[1] = TARGET_URL;
 
 try
 {
-Sequence< NumberedSortingInfo > aSortingInfo(1);
-aSortingInfo.getArray()->ColumnIndex = 1;
-aSortingInfo.getArray()->Ascending = true;
-xResultSet = rContent.createSortedCursor( aProps, aSortingInfo, 
m_rCompareFactory, INCLUDE_DOCUMENTS_ONLY );
+xResultSet = rContent.createSortedCursor( { TITLE, TARGET_URL }, { { 
1, true } }, m_rCompareFactory, INCLUDE_DOCUMENTS_ONLY );
 }
 catch ( Exception& ) {}
 
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 4e01f35583c7..50d11b8b043b 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -699,11 +699,6 @@ bool SfxDocTplService_Impl::addEntry( Content& 
rParentFolder,
 
 if ( ! Content::create( aLinkURL, maCmdEnv, 
comphelper::getProcessComponentContext(), aLink ) )
 {
-Sequence< OUString > aNames(3);
-aNames[0] = TITLE;
-aNames[1] = IS_FOLDER;
-aNames[2] = TARGET_URL;
-
 Sequence< Any > aValues(3);
 aValues[0] <<= rTitle;
 aValues[1] <<= false;
@@ -711,7 +706,7 @@ bool SfxDocTplService_Impl::addEntry( Content& 
rParentFolder,
 
 try
 {
-rParentFolder.insertNewContent( TYPE_LINK, aNames, aValues, aLink 
);
+rParentFolder.insertNewContent( TYPE_LINK, { TITLE, IS_FOLDER, 
TARGET_URL }, aValues, aLink );
 setProperty( aLink, PROPERTY_TYPE, makeAny( rType ) );
 bAddedEntry = true;
 }
@@ -747,10 +742,6 @@ bool SfxDocTplService_Impl::createFolder( const OUString& 
rNewFolderURL,
 {
 try
 {
-Sequence< OUString > aNames(2);
-aNames[0] = TITLE;
-aNames[1] = IS_FOLDER;
-
 Sequence< Any > aValues(2);
 aValues[0] <<= aFolderName;
 aValues[1] <<= true;
@@ -762,7 +753,7 @@ bool SfxDocTplServi

[Libreoffice-commits] core.git: sdext/source

2021-06-09 Thread Julien Nabet (via logerrit)
 sdext/source/presenter/PresenterGeometryHelper.cxx |   44 -
 sdext/source/presenter/PresenterSlideShowView.cxx  |   27 ++--
 sdext/source/presenter/PresenterWindowManager.cxx  |   27 ++--
 3 files changed, 55 insertions(+), 43 deletions(-)

New commits:
commit da44de883f205736fffeacc148c32dcfd638ad66
Author: Julien Nabet 
AuthorDate: Wed Jun 9 19:02:52 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 21:27:29 2021 +0200

Simplify Sequences initializations (sdext)

Change-Id: Ide9a3ddd4f6915f45b02353293236988bff51eba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116935
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sdext/source/presenter/PresenterGeometryHelper.cxx 
b/sdext/source/presenter/PresenterGeometryHelper.cxx
index 3d59f259ea7b..67a81d63c766 100644
--- a/sdext/source/presenter/PresenterGeometryHelper.cxx
+++ b/sdext/source/presenter/PresenterGeometryHelper.cxx
@@ -21,6 +21,8 @@
 
 #include 
 #include 
+#include 
+
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -183,12 +185,15 @@ Reference 
PresenterGeometryHelper::CreatePolygon(
 if ( ! rxDevice.is())
 return nullptr;
 
-Sequence > aPoints(1);
-aPoints[0] = Sequence(4);
-aPoints[0][0] = geometry::RealPoint2D(rBox.X, rBox.Y);
-aPoints[0][1] = geometry::RealPoint2D(rBox.X, rBox.Y+rBox.Height);
-aPoints[0][2] = geometry::RealPoint2D(rBox.X+rBox.Width, 
rBox.Y+rBox.Height);
-aPoints[0][3] = geometry::RealPoint2D(rBox.X+rBox.Width, rBox.Y);
+Sequence > aPoints
+{
+{
+{ o3tl::narrowing(rBox.X), o3tl::narrowing(rBox.Y) 
},
+{ o3tl::narrowing(rBox.X), 
o3tl::narrowing(rBox.Y+rBox.Height) },
+{ o3tl::narrowing(rBox.X+rBox.Width), 
o3tl::narrowing(rBox.Y+rBox.Height) },
+{ o3tl::narrowing(rBox.X+rBox.Width), 
o3tl::narrowing(rBox.Y) }
+}
+};
 Reference xPolygon (
 rxDevice->createCompatibleLinePolyPolygon(aPoints));
 if (xPolygon.is())
@@ -204,12 +209,15 @@ Reference 
PresenterGeometryHelper::CreatePolygon(
 if ( ! rxDevice.is())
 return nullptr;
 
-Sequence > aPoints(1);
-aPoints[0] = Sequence(4);
-aPoints[0][0] = geometry::RealPoint2D(rBox.X1, rBox.Y1);
-aPoints[0][1] = geometry::RealPoint2D(rBox.X1, rBox.Y2);
-aPoints[0][2] = geometry::RealPoint2D(rBox.X2, rBox.Y2);
-aPoints[0][3] = geometry::RealPoint2D(rBox.X2, rBox.Y1);
+Sequence > aPoints
+{
+{
+{ rBox.X1, rBox.Y1 },
+{ rBox.X1, rBox.Y2 },
+{ rBox.X2, rBox.Y2 },
+{ rBox.X2, rBox.Y1 }
+}
+};
 Reference xPolygon (
 rxDevice->createCompatibleLinePolyPolygon(aPoints));
 if (xPolygon.is())
@@ -230,11 +238,13 @@ Reference 
PresenterGeometryHelper::CreatePolygon(
 for (sal_Int32 nIndex=0; nIndex(4);
-aPoints[nIndex][0] = geometry::RealPoint2D(rBox.X, rBox.Y);
-aPoints[nIndex][1] = geometry::RealPoint2D(rBox.X, rBox.Y+rBox.Height);
-aPoints[nIndex][2] = geometry::RealPoint2D(rBox.X+rBox.Width, 
rBox.Y+rBox.Height);
-aPoints[nIndex][3] = geometry::RealPoint2D(rBox.X+rBox.Width, rBox.Y);
+aPoints[nIndex] = Sequence
+{
+{ o3tl::narrowing(rBox.X), o3tl::narrowing(rBox.Y) 
},
+{ o3tl::narrowing(rBox.X), 
o3tl::narrowing(rBox.Y+rBox.Height) },
+{ o3tl::narrowing(rBox.X+rBox.Width), 
o3tl::narrowing(rBox.Y+rBox.Height) },
+{ o3tl::narrowing(rBox.X+rBox.Width), 
o3tl::narrowing(rBox.Y) }
+};
 }
 
 Reference xPolygon (
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx 
b/sdext/source/presenter/PresenterSlideShowView.cxx
index 7ad4bc207645..26239c0b2642 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -666,20 +666,21 @@ void PresenterSlideShowView::PaintOuterWindow (const 
awt::Rectangle& rRepaintBox
 Reference xBackgroundBitmap 
(mpBackground->GetNormalBitmap());
 if (xBackgroundBitmap.is())
 {
-Sequence aTextures (1);
 const geometry::IntegerSize2D 
aBitmapSize(xBackgroundBitmap->getSize());
-aTextures[0] = rendering::Texture (
-geometry::AffineMatrix2D(
-aBitmapSize.Width,0,0,
-0,aBitmapSize.Height,0),
-1,
-0,
-xBackgroundBitmap,
-nullptr,
-nullptr,
-rendering::StrokeAttributes(),
-rendering::TexturingMode::REPEAT,
-rendering::TexturingMode::REPEAT);
+Sequence aTextures
+{
+{
+geometry::AffineMatrix2D( aBitmapSize.Width,0,0, 
0,aBitmapSize.Height,0),
+1,
+0,
+xBackgroundBitmap,
+nullptr,
+nullptr,
+rendering::StrokeAttributes(),
+ 

[Libreoffice-commits] core.git: desktop/source include/vcl vcl/source

2021-06-09 Thread Luboš Luňák (via logerrit)
 desktop/source/lib/init.cxx |7 ++-
 include/vcl/lok.hxx |4 
 vcl/source/app/svapp.cxx|8 
 3 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit 53dd6aa5f3817d42bf676980f980051c3b7cdb03
Author: Luboš Luňák 
AuthorDate: Wed Jun 9 17:11:15 2021 +0200
Commit: Luboš Luňák 
CommitDate: Wed Jun 9 21:21:45 2021 +0200

scale VCL's scale cache according to the number of Online views

If a document is opened in several Online views, each of them using
a different zoom, then the scale cache is used for the scaling,
and each view is sent updated tiles, so if there are too many
views, the cache is not large enough.
(Collabora T28503)

Change-Id: I3fa719b0515064773fe4584fedbc8aff98e6e213
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116928
Tested-by: Luboš Luňák 
Reviewed-by: Luboš Luňák 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d509643ce4d1..99e90c5e9ad9 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5275,6 +5275,8 @@ static int 
doc_createViewWithOptions(LibreOfficeKitDocument* pThis,
 LibLODocument_Impl* pDocument = static_cast(pThis);
 const int nId = SfxLokHelper::createView(pDocument->mnDocumentId);
 
+
vcl::lok::numberOfViewsChanged(SfxLokHelper::getViewsCount(pDocument->mnDocumentId));
+
 #ifdef IOS
 (void) pThis;
 #else
@@ -5289,7 +5291,7 @@ static int doc_createView(LibreOfficeKitDocument* pThis)
 return doc_createViewWithOptions(pThis, nullptr); // No options.
 }
 
-static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/, int nId)
+static void doc_destroyView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
pThis, int nId)
 {
 comphelper::ProfileZone aZone("doc_destroyView");
 
@@ -5299,6 +5301,9 @@ static void doc_destroyView(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pThis
 LOKClipboardFactory::releaseClipboardForView(nId);
 
 SfxLokHelper::destroyView(nId);
+
+LibLODocument_Impl* pDocument = static_cast(pThis);
+
vcl::lok::numberOfViewsChanged(SfxLokHelper::getViewsCount(pDocument->mnDocumentId));
 }
 
 static void doc_setView(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/, int nId)
diff --git a/include/vcl/lok.hxx b/include/vcl/lok.hxx
index 9f3f30ab7977..108f46def8aa 100644
--- a/include/vcl/lok.hxx
+++ b/include/vcl/lok.hxx
@@ -20,6 +20,10 @@ bool VCL_DLLPUBLIC isUnipoll();
 void VCL_DLLPUBLIC registerPollCallbacks(LibreOfficeKitPollCallback 
pPollCallback,
  LibreOfficeKitWakeCallback 
pWakeCallback, void* pData);
 void VCL_DLLPUBLIC unregisterPollCallbacks();
+
+// Called to tell VCL that the number of document views has changed, so that 
VCL
+// can adjust e.g. sizes of bitmap caches to scale well with larger number of 
users.
+void VCL_DLLPUBLIC numberOfViewsChanged(int count);
 }
 
 #endif // INCLUDE_VCL_LOK_HXX
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ecfaa3805bef..79d6dfa9c146 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1711,6 +1711,14 @@ bool isUnipoll()
 return pSVData && pSVData->mpPollCallback != nullptr;
 }
 
+void numberOfViewsChanged(int count)
+{
+ImplSVData * pSVData = ImplGetSVData();
+auto& rCache = pSVData->maGDIData.maScaleCache;
+// Normally the cache size is set to 10, scale according to the number of 
users.
+rCache.setMaxSize(count * 10);
+}
+
 } // namespace lok, namespace vcl
 
 /* 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: include/o3tl o3tl/qa

2021-06-09 Thread Luboš Luňák (via logerrit)
 include/o3tl/lru_map.hxx |9 -
 o3tl/qa/test-lru_map.cxx |   14 ++
 2 files changed, 22 insertions(+), 1 deletion(-)

New commits:
commit 62b58e88d897f51a7c4e12b41d14121ab8d3396f
Author: Luboš Luňák 
AuthorDate: Wed Jun 9 17:10:42 2021 +0200
Commit: Luboš Luňák 
CommitDate: Wed Jun 9 21:20:09 2021 +0200

allow altering the max size of o3tl::lru_cache

Change-Id: Id119b70275e1c88a8c57f89d915241427be9dbf5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116927
Tested-by: Jenkins
Reviewed-by: Luboš Luňák 

diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx
index dc8a102977dd..41c215255c7a 100644
--- a/include/o3tl/lru_map.hxx
+++ b/include/o3tl/lru_map.hxx
@@ -50,7 +50,7 @@ private:
 
 list_t mLruList;
 map_t mLruMap;
-const size_t mMaxSize;
+size_t mMaxSize;
 
 void checkLRU()
 {
@@ -80,6 +80,13 @@ public:
 list_t().swap(mLruList);
 }
 
+void setMaxSize(size_t nMaxSize)
+{
+mMaxSize = nMaxSize ? nMaxSize : std::min(mLruMap.max_size(), 
mLruList.max_size());
+while (mLruMap.size() > mMaxSize)
+checkLRU();
+}
+
 void insert(key_value_pair_t& rPair)
 {
 map_iterator_t i = mLruMap.find(rPair.first);
diff --git a/o3tl/qa/test-lru_map.cxx b/o3tl/qa/test-lru_map.cxx
index ef46f44d17b9..aac8a3e25283 100644
--- a/o3tl/qa/test-lru_map.cxx
+++ b/o3tl/qa/test-lru_map.cxx
@@ -29,6 +29,7 @@ public:
 void testCustomHash();
 void testRemoveIf();
 void testNoAutoCleanup();
+void testChangeMaxSize();
 
 CPPUNIT_TEST_SUITE(lru_map_test);
 CPPUNIT_TEST(testBaseUsage);
@@ -38,6 +39,7 @@ public:
 CPPUNIT_TEST(testCustomHash);
 CPPUNIT_TEST(testRemoveIf);
 CPPUNIT_TEST(testNoAutoCleanup);
+CPPUNIT_TEST(testChangeMaxSize);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -310,6 +312,18 @@ void lru_map_test::testNoAutoCleanup()
 }
 }
 
+void lru_map_test::testChangeMaxSize()
+{
+o3tl::lru_map lru(3);
+CPPUNIT_ASSERT_EQUAL(size_t(0), lru.size());
+lru.insert({ 0, 0 });
+lru.insert({ 1, 1 });
+lru.insert({ 2, 2 });
+CPPUNIT_ASSERT_EQUAL(size_t(3), lru.size());
+lru.setMaxSize(1);
+CPPUNIT_ASSERT_EQUAL(size_t(1), lru.size());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(lru_map_test);
 
 /* 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: sw/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sw/source/filter/xml/xmltbli.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit e9838a1d1de8d9d44fd1bac603a1d29ff97a12ff
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 17:40:11 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 9 20:45:16 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

...since the (only) read of sXmlId got removed with
c50357ff625972464d1a591afe4198d3f6f42a39 "loplugin:unusedfields in sw"

Change-Id: I609eae60eb0e1d440a47f97b6387c833c1404518
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116855
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 8e72c781ab22..560fe1c81e1f 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -802,7 +802,6 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( 
SwXMLImport& rImport,
 nRowRepeat( 1 )
 {
 OUString aStyleName, aDfltCellStyleName;
-OUString sXmlId;
 
 for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
 {
@@ -825,7 +824,6 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( 
SwXMLImport& rImport,
 aDfltCellStyleName = aIter.toString();
 break;
 case XML_ELEMENT(XML, XML_ID):
-sXmlId = aIter.toString();
 break;
 default:
 XMLOFF_WARN_UNKNOWN("sw", aIter);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sw/source/core/layout/layact.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit a74dab375e894c3b87f5279cd7c43c26e4c79bb4
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 17:23:30 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 9 20:44:38 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

Since 20e5f64215853bdd32c5f16394ba7f2f36745904 "loplugin:unused-returns in 
sw"
removed

> return bChanged || bTabChanged;

from the end of SwLayAction::FormatLayoutFly, bTabChanged is effectively
completely unused (and now gets warned about by Clang), and the update of
bChanged is apparently no longer used, either.

Change-Id: Iab180e83070c45531aecf46d85a030463cf7b22d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116853
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 0ab451c111a0..4e95504f07ef 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1430,16 +1430,15 @@ void SwLayAction::FormatLayoutFly( SwFlyFrame* pFly )
 return;
 
 // Now, deal with the lowers that are LayoutFrames
-bool bTabChanged = false;
 SwFrame *pLow = pFly->Lower();
 while ( pLow )
 {
 if ( pLow->IsLayoutFrame() )
 {
 if ( pLow->IsTabFrame() )
-bTabChanged |= FormatLayoutTab( 
static_cast(pLow), bAddRect );
+FormatLayoutTab( static_cast(pLow), bAddRect );
 else
-bChanged |= FormatLayout( m_pImp->GetShell()->GetOut(), 
static_cast(pLow), bAddRect );
+FormatLayout( m_pImp->GetShell()->GetOut(), 
static_cast(pLow), bAddRect );
 }
 pLow = pLow->GetNext();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source writerfilter/source

2021-06-09 Thread Justin Luth (via logerrit)
 sw/source/filter/ww8/ww8par.cxx |1 -
 writerfilter/source/filter/WriterFilter.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit aa39400c73fac4b0430ee47a0d18bf4978f7f2d0
Author: Justin Luth 
AuthorDate: Fri Jun 4 15:22:33 2021 +0200
Commit: Justin Luth 
CommitDate: Wed Jun 9 20:29:40 2021 +0200

NFC compat cleanup: no need to specify default TabOverflow

This really confused me because it lead me to think
that this was something done for MS compatibility.

Well, that is only true in an off-handed way.
LibreOffice itself was changed to work similarly
to MS Word. So there is nothing special about how DOC
or DOCX/RTF are handled.

Since the compat settings are not saved or loaded
into MS Formats (i.e. it just takes the default value),
and since on an ODT save it also will just save
with the proper default value, there is no need
to specify "TabOverflow = true" in non-ODT import filters.

Only ooxmlexport16 has a unit test that reacts if
tabOverflow is false. That one is mine and it indicates
that the document would be better if tabOverflow was off,
so there are no examples of how tabOverflow improves a doc.

Change-Id: I97c25154108bc1ca0fcd3dfcff66fea0ea2bca7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116741
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a4ce6ada24dd..7f5b8d543875 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1916,7 +1916,6 @@ void SwWW8ImplReader::ImportDop()
 
 
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::INVERT_BORDER_SPACING,
 true);
 
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::COLLAPSE_EMPTY_CELL_PARA,
 true);
-m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVERFLOW, 
true);
 
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::UNBREAKABLE_NUMBERINGS,
 true);
 
m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::CLIPPED_PICTURES, 
true);
 m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN, 
true);
diff --git a/writerfilter/source/filter/WriterFilter.cxx 
b/writerfilter/source/filter/WriterFilter.cxx
index f1a57253b125..2d20ab1ef0c3 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -318,7 +318,6 @@ void WriterFilter::setTargetDocument(const 
uno::Reference& xDo
 xSettings->setPropertyValue("IgnoreTabsAndBlanksForLineCalculation", 
uno::makeAny(true));
 xSettings->setPropertyValue("InvertBorderSpacing", uno::makeAny(true));
 xSettings->setPropertyValue("CollapseEmptyCellPara", uno::makeAny(true));
-xSettings->setPropertyValue("TabOverflow", uno::makeAny(true));
 // tdf#142404 TabOverSpacing (new for compatibilityMode15/Word2013+) is a 
subset of TabOverMargin
 // (which applied to DOCX <= compatibilityMode14).
 // TabOverMargin looks at tabs beyond the normal text area,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/shells/tabsh.cxx |   16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 3bcb8c3d6d028f76817039f2aad57cab5a6e524b
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 16:55:14 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 20:28:42 2021 +0200

tdf#142721 restore SwShellTableCursor if the orig selection was a single 
cell

where the previous attempt of

commit 4d52d2bc81f9d27472fe368785912a530489d046
tdf#142165 restore a SwShellTableCursor if the orig selection described 
that
so that we are operating on the same selection that existed when the
dialog was originally launched

wasn't sufficient to restore a single cell selection.

we continue to need to avoid the assert of

commit 6db71f70a3b200d4074f6cda8ce445e9861d3296
tdf#140977 drop possible table-cursor before setting the new one

and support the multi-selection of

commit e08b446e46f56e15af58fdd4396afba1a316f9e5
tdf#140257 duplicate entire PaM ring when making copy

and support not scrolling to a different location on changing a table
page break style of

commit 9c61732677d038e32b73fc9fb883aced14c0febf
tdf#135916 just set the target table as selection

and keep making it possible to remove a page break on a table of

commit 81f91196b98af38e29af451b86c26a893a109abc
tdf#135636 the selection at dialog-launch time is lost by dialog-apply 
time

all of which is necessitated by

commit c3a085d22742f88e91ff92f319a26d6e8d1d9a98
lokdialog: Convert the Table -> Properties... to async exec.

Though; since 4d52d2bc81f9d27472fe368785912a530489d046 where we started
using rSh.GetTableCrs if IsTableMode() then in practice
6db71f70a3b200d4074f6cda8ce445e9861d3296 probably cannot arise.  The
scenario of rSh.IsTableMode() changing between launch of the dialog and
applying the result of the dialog is presumably maybe theoretically
possible in e.g. an online scenario, but not in the normal user case,
but handled here anyway.

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

diff --git a/sw/source/uibase/shells/tabsh.cxx 
b/sw/source/uibase/shells/tabsh.cxx
index 3eb0e9b6ed4f..3599a569466a 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -597,18 +597,22 @@ void SwTableShell::Execute(SfxRequest &rReq)
 auto pRequest = std::make_shared(rReq);
 rReq.Ignore(); // the 'old' request is not relevant any more
 
-SwPaM* pCursor = rSh.IsTableMode() ? rSh.GetTableCrs() : 
rSh.GetCursor(); // tdf#142165 use table cursor if in table mode
+const bool bTableMode = rSh.IsTableMode();
+SwPaM* pCursor = bTableMode ? rSh.GetTableCrs() : 
rSh.GetCursor(); // tdf#142165 use table cursor if in table mode
 auto vCursors = CopyPaMRing(*pCursor); // tdf#135636 make a 
copy to use at later apply
-pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, 
&rBindings, &rSh, vCursors](sal_Int32 nResult){
+pDlg->StartExecuteAsync([pDlg, pRequest, pTableRep, 
&rBindings, &rSh, vCursors, bTableMode](sal_Int32 nResult){
 if (RET_OK == nResult)
 {
-if (rSh.IsTableMode()) // tdf#140977 drop possible 
table-cursor before setting the new one
-rSh.TableCursorToCursor();
+if (!bTableMode && rSh.IsTableMode()) // tdf#140977 
drop current table-cursor if setting a replacement
+rSh.TableCursorToCursor();// non-table one
 
-// tdf#135636 set the table selected at dialog launch 
as current selection
+// tdf#135636 set the selection at dialog launch as 
current selection
 rSh.SetSelection(*vCursors->front()); // 
UpdateCursor() will be called which in the case
   // of a table 
selection should recreate a
-  // 
SwShellTableCursor
+  // 
SwShellTableCursor if the selection is more than a single cell
+
+if (bTableMode && !rSh.IsTableMode()) // tdf#142721 
ensure the new selection is a SwShellTableCursor in
+rSh.SelTableBox();// the case of 
of a single cell
 
 const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mai

[Libreoffice-commits] core.git: drawinglayer/source emfio/qa emfio/source include/vcl vcl/source

2021-06-09 Thread Bartosz Kosiorek (via logerrit)
 drawinglayer/source/tools/primitive2dxmldump.cxx   |   16 ++
 emfio/qa/cppunit/emf/EmfImportTest.cxx |   82 +
 emfio/qa/cppunit/wmf/data/TestBitBltStretchBlt.wmf |binary
 emfio/source/reader/wmfreader.cxx  |  124 +++--
 include/vcl/BitmapTools.hxx|2 
 vcl/source/bitmap/BitmapTools.cxx  |   15 +-
 6 files changed, 151 insertions(+), 88 deletions(-)

New commits:
commit 01ded1e6d362dbcd7148334c6965d6ad00981d4a
Author: Bartosz Kosiorek 
AuthorDate: Tue Jun 8 23:07:28 2021 +0200
Commit: Bartosz Kosiorek 
CommitDate: Wed Jun 9 20:19:27 2021 +0200

WMF tdf#55058 tdf#142722 Add implementation of BitBlt and StretchBlt

With previous implementation, only BitBlt record with 1 bit color depth
was supported and StretchBlt was not implemented at all.

With this commit the support for 1 bit, 24 bit and 32 bit,
for both BitBlt and StretchBlt were added.

Change-Id: I061b2beae8c2f143ddff9c8c8bb64bf52f4cf502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116873
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 

diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx 
b/drawinglayer/source/tools/primitive2dxmldump.cxx
index 295c13fde6e9..9ed0e796fb01 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -228,8 +228,22 @@ void Primitive2dXmlDump::decomposeAndWrite(
 
 rWriter.attribute("height", rSizePixel.getHeight());
 rWriter.attribute("width", rSizePixel.getWidth());
-rWriter.attribute("checksum", aBitmapEx.GetChecksum());
+rWriter.attribute("checksum", OString(std::to_string( 
aBitmapEx.GetChecksum() )));
 
+for (tools::Long y=0; y(aSequence));
 CPPUNIT_ASSERT (pDocument);
 
-
 assertXPath(pDocument, 
"/primitive2D/metafile/transform/textsimpleportion", 2);
 assertXPath(pDocument, 
"/primitive2D/metafile/transform/textsimpleportion[1]",
 "text", "No_rect- DLP-");
@@ -576,6 +577,73 @@ void Test::TestExtTextOutOpaqueAndClipTransform()
 "fontcolor", "#00");
 }
 
+void Test::TestBitBltStretchBltWMF()
+{
+// tdf#55058 tdf#142722 WMF records: BITBLT, STRETCHBLT.
+Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/wmf/data/TestBitBltStretchBlt.wmf");
+CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
+drawinglayer::Primitive2dXmlDump dumper;
+xmlDocUniquePtr pDocument = 
dumper.dumpAndParse(comphelper::sequenceToContainer(aSequence));
+CPPUNIT_ASSERT (pDocument);
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap", 2);
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy11", "508");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy12", "0");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy13", "711");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy21", "0");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy22", "508");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"xy23", "508");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"height", "10");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"width", "10");
+#if !defined(MACOSX) && !defined(_WIN32) // TODO Bitmap display needs to be 
aligned for macOS and Windows
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]",
+"checksum", "747141214295528493");
+#endif
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]/data",
+10);
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]/data[1]",
+"row", 
"00,00,00,00,00,00,00,00,00,00");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]/data[4]",
+"row", 
"00,ff,00,ff,00,ff,00,ff,00,ff");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[1]/data[5]",
+"row", 
"ff,00,ff,ff,00,00,00,ff,ff,00");
+
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[2]",
+"xy11", "1524");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[2]",
+"xy12", "0");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[2]",
+"xy13", "1524");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[2]",
+"xy21", "0");
+assertXPath(pDocument, "/primitive2D/metafile/transform/bitmap[2]",
+   

[Libreoffice-commits] core.git: sd/source

2021-06-09 Thread Julien Nabet (via logerrit)
 sd/source/filter/xml/sdxmlwrp.cxx  |   15 ++-
 sd/source/ui/dlg/TemplateScanner.cxx   |   16 +++-
 sd/source/ui/presenter/PresenterCanvas.cxx |   15 +--
 3 files changed, 22 insertions(+), 24 deletions(-)

New commits:
commit fca7d50b17fae217bd34e9e6f5e3a8b0fda93833
Author: Julien Nabet 
AuthorDate: Wed Jun 9 18:27:28 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 19:57:46 2021 +0200

Simplify Sequences initializations (sd)

Change-Id: I968f1209961ba30ad0837846ae1ba4a9249663c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116934
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index 4bd5b043e089..9a6e8d9a9afe 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -1007,11 +1007,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool 
TestImportFODP(SvStream &rStream)
 uno::Reference xStream(new 
::utl::OSeekableInputStreamWrapper(rStream));
 uno::Reference 
xInterface(xMultiServiceFactory->createInstance("com.sun.star.comp.Writer.XmlFilterAdaptor"),
 uno::UNO_SET_THROW);
 
-css::uno::Sequence aUserData(7);
-aUserData[0] = "com.sun.star.comp.filter.OdfFlatXml";
-aUserData[2] = "com.sun.star.comp.Impress.XMLOasisImporter";
-aUserData[3] = "com.sun.star.comp.Impress.XMLOasisExporter";
-aUserData[6] = "true";
+css::uno::Sequence aUserData
+{
+"com.sun.star.comp.filter.OdfFlatXml",
+"",
+"com.sun.star.comp.Impress.XMLOasisImporter",
+"com.sun.star.comp.Impress.XMLOasisExporter",
+"",
+"",
+"true"
+};
 uno::Sequence 
aAdaptorArgs(comphelper::InitPropertySequence(
 {
 { "UserData", uno::Any(aUserData) },
diff --git a/sd/source/ui/dlg/TemplateScanner.cxx 
b/sd/source/ui/dlg/TemplateScanner.cxx
index 4afc801df5f2..5d302c26156f 100644
--- a/sd/source/ui/dlg/TemplateScanner.cxx
+++ b/sd/source/ui/dlg/TemplateScanner.cxx
@@ -141,15 +141,10 @@ TemplateScanner::State 
TemplateScanner::InitializeEntryScanning()
 {
 mxEntryEnvironment.clear();
 
+//  Create a cursor to iterate over the templates in this folders.
 //  We are interested only in three properties: the entry's name,
 //  its URL, and its content type.
-Sequence aProps (3);
-aProps[0] = TITLE;
-aProps[1] = "TargetURL";
-aProps[2] = "TypeDescription";
-
-//  Create a cursor to iterate over the templates in this folders.
-mxEntryResultSet.set( maFolderContent.createCursor(aProps, 
::ucbhelper::INCLUDE_DOCUMENTS_ONLY));
+mxEntryResultSet.set( maFolderContent.createCursor({ TITLE, 
"TargetURL", "TypeDescription" }, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY));
 }
 else
 eNextState = ERROR;
@@ -218,13 +213,8 @@ TemplateScanner::State 
TemplateScanner::InitializeFolderScanning()
 mxFolderEnvironment.clear();
 ::ucbhelper::Content aTemplateDir (mxTemplateRoot, 
mxFolderEnvironment, comphelper::getProcessComponentContext());
 
-//  Define the list of properties we are interested in.
-Sequence aProps (2);
-aProps[0] = TITLE;
-aProps[1] = "TargetDirURL";
-
 //  Create a cursor to iterate over the template folders.
-mxFolderResultSet.set( aTemplateDir.createCursor(aProps, 
::ucbhelper::INCLUDE_FOLDERS_ONLY));
+mxFolderResultSet.set( aTemplateDir.createCursor({ TITLE, 
"TargetDirURL" }, ::ucbhelper::INCLUDE_FOLDERS_ONLY));
 if (mxFolderResultSet.is())
 eNextState = GATHER_FOLDER_LIST;
 }
diff --git a/sd/source/ui/presenter/PresenterCanvas.cxx 
b/sd/source/ui/presenter/PresenterCanvas.cxx
index f1f2271a1098..d657d6f37596 100644
--- a/sd/source/ui/presenter/PresenterCanvas.cxx
+++ b/sd/source/ui/presenter/PresenterCanvas.cxx
@@ -660,12 +660,15 @@ Reference 
PresenterCanvas::UpdateSpriteClip (
 else
 {
 // Create a new clip polygon from the window clip rectangle.
-Sequence > aPoints (1);
-aPoints[0] = Sequence(4);
-aPoints[0][0] = geometry::RealPoint2D(nMinX,nMinY);
-aPoints[0][1] = geometry::RealPoint2D(nMaxX,nMinY);
-aPoints[0][2] = geometry::RealPoint2D(nMaxX,nMaxY);
-aPoints[0][3] = geometry::RealPoint2D(nMinX,nMaxY);
+Sequence > aPoints
+{
+{
+{ nMinX,nMinY },
+{ nMaxX,nMinY },
+{ nMaxX,nMaxY },
+{ nMinX,nMaxY }
+}
+};
 Reference xLinePolygon(
 xDevice->createCompatibleLinePolyPolygon(aPoints));
 if (xLinePolygon.is())
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sccomp/qa

2021-06-09 Thread Julien Nabet (via logerrit)
 sccomp/qa/unit/SwarmSolverTest.cxx |   21 +++--
 sccomp/qa/unit/solver.cxx  |3 +--
 2 files changed, 8 insertions(+), 16 deletions(-)

New commits:
commit 5897a97bb53bcbf2283161cc22f43d87f575f3d6
Author: Julien Nabet 
AuthorDate: Wed Jun 9 18:14:41 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 19:57:11 2021 +0200

Simplify Sequences initializations (sccomp)

Change-Id: I6316e1318ae1ee68e5d4e4529731bca0d1860b58
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116932
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/sccomp/qa/unit/SwarmSolverTest.cxx 
b/sccomp/qa/unit/SwarmSolverTest.cxx
index b7d3becc475c..78cfccaaa376 100644
--- a/sccomp/qa/unit/SwarmSolverTest.cxx
+++ b/sccomp/qa/unit/SwarmSolverTest.cxx
@@ -75,8 +75,7 @@ void SwarmSolverTest::testUnconstrained()
 table::CellAddress aObjective(0, 1, 1);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(1);
-aVariables[0] = table::CellAddress(0, 1, 0);
+uno::Sequence aVariables{ { 0, 1, 0 } };
 
 // constraints
 uno::Sequence aConstraints;
@@ -125,8 +124,7 @@ void SwarmSolverTest::testVariableBounded()
 table::CellAddress aObjective(0, 1, 1);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(1);
-aVariables[0] = table::CellAddress(0, 1, 0);
+uno::Sequence aVariables{ { 0, 1, 0 } };
 
 // constraints
 uno::Sequence aConstraints(2);
@@ -177,8 +175,7 @@ void SwarmSolverTest::testVariableConstrained()
 table::CellAddress aObjective(0, 1, 1);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(1);
-aVariables[0] = table::CellAddress(0, 1, 0);
+uno::Sequence aVariables{ { 0, 1, 0 } };
 
 // constraints
 uno::Sequence aConstraints(3);
@@ -233,9 +230,7 @@ void SwarmSolverTest::testTwoVariables()
 table::CellAddress aObjective(0, 1, 5);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(2);
-aVariables[0] = table::CellAddress(0, 1, 2);
-aVariables[1] = table::CellAddress(0, 1, 3);
+uno::Sequence aVariables{ { 0, 1, 2 }, { 0, 1, 3 } };
 
 // constraints
 uno::Sequence aConstraints(4);
@@ -299,11 +294,9 @@ void SwarmSolverTest::testMultipleVariables()
 table::CellAddress aObjective(0, 5, 7);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(4);
-aVariables[0] = table::CellAddress(0, 6, 1);
-aVariables[1] = table::CellAddress(0, 6, 2);
-aVariables[2] = table::CellAddress(0, 6, 3);
-aVariables[3] = table::CellAddress(0, 6, 4);
+uno::Sequence aVariables{
+{ 0, 6, 1 }, { 0, 6, 2 }, { 0, 6, 3 }, { 0, 6, 4 }
+};
 
 // constraints
 uno::Sequence aConstraints(12);
diff --git a/sccomp/qa/unit/solver.cxx b/sccomp/qa/unit/solver.cxx
index 4405279e26cb..eedbce69f274 100644
--- a/sccomp/qa/unit/solver.cxx
+++ b/sccomp/qa/unit/solver.cxx
@@ -87,8 +87,7 @@ void LpSolverTest::testSolver(OUString const & rName)
 table::CellAddress aObjective(0, 0, 0);
 
 // "changing cells" - unknown variables
-uno::Sequence aVariables(1);
-aVariables[0] = table::CellAddress(0, 0, 0);
+uno::Sequence aVariables { {0, 0, 0 } };
 
 // constraints
 uno::Sequence aConstraints(1);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-06-09 Thread sarynasser (via logerrit)
 sc/qa/extras/macros-test.cxx |   36 
 1 file changed, 36 deletions(-)

New commits:
commit 8ed68179e2eaf07289663c64d923d8b5dd8b25c9
Author: sarynasser 
AuthorDate: Sat Apr 10 01:14:51 2021 +0200
Commit: Ilmari Lauhakangas 
CommitDate: Wed Jun 9 19:43:50 2021 +0200

tdf#139734 remove redundant asserts after loadFromDesktop

Change-Id: Ibabb1775ea86a6dd548ee718ed1dede6ffc60be9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113898
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 751e31a28eda..fae1e4f71027 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -116,7 +116,6 @@ void ScMacrosTest::testMSP()
 createFileURL(u"MasterScriptProviderProblem.ods", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load MasterScriptProviderProblem.ods", 
xComponent.is());
 
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
@@ -147,8 +146,6 @@ void ScMacrosTest::testPasswordProtectedStarBasic()
 createFileURL(u"testTypePassword.ods", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load testTypePassword.ods", 
xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -201,8 +198,6 @@ void ScMacrosTest::testStarBasic()
 createFileURL(u"StarBasic.ods", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -348,8 +343,6 @@ void ScMacrosTest::testVba()
 OUString aFileName;
 createFileURL(OUString(rTestInfo.sFileBaseName + "xls"), aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
-OUString sMsg( "Failed to load " + aFileName );
-CPPUNIT_ASSERT_MESSAGE( OUStringToOString( sMsg, RTL_TEXTENCODING_UTF8 
).getStr(), xComponent.is() );
 
 // process all events such as OnLoad events etc.
 // otherwise the tend to arrive later at a random
@@ -401,8 +394,6 @@ void ScMacrosTest::testTdf107885()
 createFileURL(u"tdf107885.xlsm", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -451,8 +442,6 @@ void ScMacrosTest::testRowColumn()
 createFileURL(u"StarBasic.ods", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load StarBasic.ods", xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -488,8 +477,6 @@ void ScMacrosTest::testTdf131562()
 createFileURL(u"tdf131562.xlsm", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -526,7 +513,6 @@ void ScMacrosTest::testPasswordProtectedUnicodeString()
 OUString aFileName;
 createFileURL(u"tdf57113.ods", aFileName);
 auto xComponent = loadFromDesktop(aFileName, 
"com.sun.star.sheet.SpreadsheetDocument");
-CPPUNIT_ASSERT(xComponent);
 
 // Check that loading password-protected macro image correctly loads 
Unicode strings
 {
@@ -585,7 +571,6 @@ void ScMacrosTest::testPasswordProtectedArrayInUserType()
 OUString aFileName;
 createFileURL(u"ProtectedArrayInCustomType.ods", aFileName);
 auto xComponent = loadFromDesktop(aFileName, 
"com.sun.star.sheet.SpreadsheetDocument");
-CPPUNIT_ASSERT(xComponent);
 
 // Check that loading password-protected macro image correctly loads array 
bounds
 {
@@ -641,8 +626,6 @@ void ScMacrosTest::testTdf114427()
 createFileURL(u"tdf114427.ods", aFileName);
 uno::Reference< css::lang::XComponent > xComponent = 
loadFromDesktop(aFileName, "com.sun.star.sheet.SpreadsheetDocument");
 
-CPPUNIT_ASSERT_MESSAGE("Failed to load the doc", xComponent.is());
-
 Any aRet;
 Sequence< sal_Int16 > aOutParamIndex;
 Sequence< Any > aOutParam;
@@ -677,8 +660,6 @@ void ScMacrosTest::testTdf107902()
 creat

Re: [libreoffice-documentation] Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

2021-06-09 Thread Eike Rathke
Hi Steve,

On Wednesday, 2021-06-09 15:46:11 +0100, Steve Fanning wrote:

> I have finished updating the FILTERXML and WEBSERVICE wiki pages.

Yup, look better now, thanks.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A


signature.asc
Description: PGP signature
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Miklos Vajna (via logerrit)
 sw/source/ui/frmdlg/frmpage.cxx   |7 +--
 sw/source/uibase/app/docst.cxx|   25 -
 sw/source/uibase/app/docstyle.cxx |1 +
 3 files changed, 30 insertions(+), 3 deletions(-)

New commits:
commit 4895a92e67ffbbee87ec5ee1e2394cdc5b833fcb
Author: Miklos Vajna 
AuthorDate: Wed Jun 9 17:59:08 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 18:54:48 2021 +0200

sw keep aspect ratio: add style UI for this setting

It's a per-document setting, but it was only possible to set/get this for a
direct formatting dialog. Allow it for styles as well.

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

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index c42ce8dbf4fd..dc148972e277 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -886,7 +886,10 @@ void SwFramePage::Reset( const SfxItemSet *rSet )
 {
 // at formats no anchor editing
 m_xAnchorFrame->set_sensitive(false);
-m_xFixedRatioCB->set_sensitive(false);
+if (rSet->GetItemState(FN_KEEP_ASPECT_RATIO) != SfxItemState::SET)
+{
+m_xFixedRatioCB->set_sensitive(false);
+}
 }
 else
 {
@@ -1205,7 +1208,7 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
 aSz.SetWidthSizeType( eFrameSize );
 }
 }
-if (!m_bFormat && m_xFixedRatioCB->get_state_changed_from_saved())
+if (m_xFixedRatioCB->get_state_changed_from_saved())
 bRet |= nullptr != rSet->Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, 
m_xFixedRatioCB->get_active()));
 
 pOldItem = GetOldItem(*rSet, RES_FRM_SIZE);
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 654ff05a0650..b9ab297aef78 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -642,6 +642,22 @@ IMPL_LINK_NOARG(ApplyStyle, ApplyHdl, LinkParamNone*, void)
 }
 }
 }
+
+if (m_nFamily == SfxStyleFamily::Frame)
+{
+const SfxPoolItem* pItem = nullptr;
+if (aTmpSet.HasItem(FN_KEEP_ASPECT_RATIO, &pItem))
+{
+const auto& rBoolItem = static_cast(*pItem);
+const SwViewOption* pVOpt = pWrtShell->GetViewOptions();
+SwViewOption aUsrPref(*pVOpt);
+aUsrPref.SetKeepRatio(rBoolItem.GetValue());
+if (rBoolItem.GetValue() != pVOpt->IsKeepRatio())
+{
+SW_MOD()->ApplyUsrPref(aUsrPref, &pWrtShell->GetView());
+}
+}
+}
 }
 
 if(m_bNew)
@@ -913,6 +929,14 @@ void SwDocShell::Edit(
 rSet.Put(*oGrabBag);
 }
 
+SwWrtShell* pCurrShell = pActShell ? pActShell : m_pWrtShell;
+if (nFamily == SfxStyleFamily::Frame)
+{
+SfxItemSet& rSet = xTmp->GetItemSet();
+const SwViewOption* pVOpt = pCurrShell->GetViewOptions();
+rSet.Put(SfxBoolItem(FN_KEEP_ASPECT_RATIO, pVOpt->IsKeepRatio()));
+}
+
 if (!bBasic)
 {
 // prior to the dialog the HtmlMode at the DocShell is being sunk
@@ -921,7 +945,6 @@ void SwDocShell::Edit(
 // In HTML mode, we do not always have a printer. In order to show
 // the correct page size in the Format - Page dialog, we have to
 // get one here.
-SwWrtShell* pCurrShell = pActShell ? pActShell : m_pWrtShell;
 if( ( HTMLMODE_ON & nHtmlMode ) &&
 !pCurrShell->getIDocumentDeviceAccess().getPrinter( false ) )
 pCurrShell->InitPrt( 
pCurrShell->getIDocumentDeviceAccess().getPrinter( true ) );
diff --git a/sw/source/uibase/app/docstyle.cxx 
b/sw/source/uibase/app/docstyle.cxx
index 8b8d6bb3f63e..99b44f47ae86 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -486,6 +486,7 @@ SwDocStyleSheet::SwDocStyleSheet(   SwDoc&
rDocument,
 SID_ATTR_CHAR_GRABBAG, SID_ATTR_CHAR_GRABBAG,
 SID_ATTR_AUTO_STYLE_UPDATE, SID_ATTR_AUTO_STYLE_UPDATE,
 FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO,
+FN_KEEP_ASPECT_RATIO, FN_KEEP_ASPECT_RATIO,
 FN_COND_COLL, FN_COND_COLL>{}),
 m_bPhysical(false)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl vcl/source

2021-06-09 Thread Noel Grandin (via logerrit)
 include/vcl/RawBitmap.hxx   |6 ++
 vcl/source/filter/ipsd/ipsd.cxx |9 +
 2 files changed, 11 insertions(+), 4 deletions(-)

New commits:
commit 520bb32555985c12642b40fad3b7dcac7a940585
Author: Noel Grandin 
AuthorDate: Wed Jun 9 15:24:19 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jun 9 18:25:10 2021 +0200

tdf#142629 import psd image with transparent background

regression from
commit 2168d709805a847ac012ff87b06e081ca139d064
Date:   Mon Feb 12 15:29:10 2018 +0200
use RawBitmap in PSDReader

Change-Id: I8d547d3cca7fb8fc90a8d9382e054b4d4b2f3519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116916
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/RawBitmap.hxx b/include/vcl/RawBitmap.hxx
index 26e08dbdedac..b26d532a4032 100644
--- a/include/vcl/RawBitmap.hxx
+++ b/include/vcl/RawBitmap.hxx
@@ -49,6 +49,12 @@ public:
 if (mnBitCount == 32)
 mpData[p] = nColor.GetAlpha();
 }
+void SetAlpha(tools::Long nY, tools::Long nX, sal_uInt8 nAlpha)
+{
+assert(mnBitCount == 32);
+tools::Long p = (nY * maSize.getWidth() + nX) * (mnBitCount / 8) + 3;
+mpData[p] = nAlpha;
+}
 Color GetPixel(tools::Long nY, tools::Long nX) const
 {
 tools::Long p = (nY * maSize.getWidth() + nX) * mnBitCount / 8;
diff --git a/vcl/source/filter/ipsd/ipsd.cxx b/vcl/source/filter/ipsd/ipsd.cxx
index 6b96d742dae2..08e520884754 100644
--- a/vcl/source/filter/ipsd/ipsd.cxx
+++ b/vcl/source/filter/ipsd/ipsd.cxx
@@ -121,7 +121,7 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
 }
 
 Size aBitmapSize( mpFileHeader->nColumns, mpFileHeader->nRows );
-mpBitmap.reset( new vcl::bitmap::RawBitmap( aBitmapSize, 24 ) );
+mpBitmap.reset( new vcl::bitmap::RawBitmap( aBitmapSize, mbTransparent ? 
32 : 24 ) );
 if ( mpPalette && mbStatus )
 {
 mvPalette.resize( 256 );
@@ -131,8 +131,9 @@ bool PSDReader::ReadPSD(Graphic & rGraphic )
 }
 }
 
-if ((mnDestBitDepth == 1 || mnDestBitDepth == 8 || mbTransparent) && 
mvPalette.empty())
+if ((mnDestBitDepth == 1 || mnDestBitDepth == 8) && mvPalette.empty())
 {
+SAL_WARN("vcl", "no palette, but bit depth is " << mnDestBitDepth);
 mbStatus = false;
 return mbStatus;
 }
@@ -723,7 +724,7 @@ bool PSDReader::ImplReadBody()
 m_rPSD.ReadUChar( nDummy );
 for ( sal_uInt16 i = 0; i < ( -nRunCount + 1 ); i++ )
 {
-mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, 
nDat));
+mpBitmap->SetAlpha(nY, nX, nDat ? 0 : 255);
 if ( ++nX == mpFileHeader->nColumns )
 {
 nX = 0;
@@ -744,7 +745,7 @@ bool PSDReader::ImplReadBody()
 nDat = 1;
 if ( mpFileHeader->nDepth == 16 )   // 16 bit depth is to 
be skipped
 m_rPSD.ReadUChar( nDummy );
-mpBitmap->SetPixel(nY, nX, SanitizePaletteIndex(mvPalette, 
nDat));
+mpBitmap->SetAlpha(nY, nX, nDat ? 0 : 255);
 if ( ++nX == mpFileHeader->nColumns )
 {
 nX = 0;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 svl/source/misc/adrparse.cxx |  153 ---
 1 file changed, 153 deletions(-)

New commits:
commit e6aecfeea18a5b98ec724e6229295170ec75c936
Author: Stephan Bergmann 
AuthorDate: Wed Jun 9 15:37:52 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 18:03:16 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

> svl/source/misc/adrparse.cxx:639:30: error: variable 'aTheRealName' set 
but not used [-Werror,-Wunused-but-set-variable]
> OUString aTheRealName;
>  ^

since 334644bad9e325d5b23b4416cdc3d22dce5141bf "loplugin:unusedfields in 
svl",
plus removal of further newly dead code

Change-Id: I24b4b63a8b625422c898d14ef9a0d304b828d6b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116926
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/svl/source/misc/adrparse.cxx b/svl/source/misc/adrparse.cxx
index 16b3aa4c7196..a0cdcfdfc022 100644
--- a/svl/source/misc/adrparse.cxx
+++ b/svl/source/misc/adrparse.cxx
@@ -75,63 +75,30 @@ class SvAddressParser_Impl
 sal_uInt32 m_nCurToken;
 sal_Unicode const * m_pCurTokenBegin;
 sal_Unicode const * m_pCurTokenEnd;
-sal_Unicode const * m_pCurTokenContentBegin;
-sal_Unicode const * m_pCurTokenContentEnd;
-bool m_bCurTokenReparse;
 ParsedAddrSpec m_aOuterAddrSpec;
 ParsedAddrSpec m_aInnerAddrSpec;
 ParsedAddrSpec * m_pAddrSpec;
-sal_Unicode const * m_pRealNameBegin;
-sal_Unicode const * m_pRealNameEnd;
-sal_Unicode const * m_pRealNameContentBegin;
-sal_Unicode const * m_pRealNameContentEnd;
-bool m_bRealNameReparse;
-bool m_bRealNameFinished;
-sal_Unicode const * m_pFirstCommentBegin;
-sal_Unicode const * m_pFirstCommentEnd;
-bool m_bFirstCommentReparse;
 State m_eState;
 TokenType m_eType;
 
-inline void resetRealNameAndFirstComment();
-
 inline void reset();
 
 void addTokenToAddrSpec(ElementType eTokenElem);
 
-inline void addTokenToRealName();
-
 bool readToken();
 
 static OUString reparse(sal_Unicode const * pBegin,
 sal_Unicode const * pEnd, bool bAddrSpec);
 
-static OUString reparseComment(sal_Unicode const * pBegin,
-   sal_Unicode const * pEnd);
-
 public:
 SvAddressParser_Impl(SvAddressParser * pParser, const OUString& rIn);
 };
 
-inline void SvAddressParser_Impl::resetRealNameAndFirstComment()
-{
-m_pRealNameBegin = nullptr;
-m_pRealNameEnd = nullptr;
-m_pRealNameContentBegin = nullptr;
-m_pRealNameContentEnd = nullptr;
-m_bRealNameReparse = false;
-m_bRealNameFinished = false;
-m_pFirstCommentBegin = nullptr;
-m_pFirstCommentEnd = nullptr;
-m_bFirstCommentReparse = false;
-}
-
 inline void SvAddressParser_Impl::reset()
 {
 m_aOuterAddrSpec.reset();
 m_aInnerAddrSpec.reset();
 m_pAddrSpec = &m_aOuterAddrSpec;
-resetRealNameAndFirstComment();
 m_eState = BEFORE_COLON;
 m_eType = TOKEN_ATOM;
 }
@@ -146,20 +113,6 @@ void SvAddressParser_Impl::addTokenToAddrSpec(ElementType 
eTokenElem)
 m_pAddrSpec->m_eLastElem = eTokenElem;
 }
 
-inline void SvAddressParser_Impl::addTokenToRealName()
-{
-if (!m_bRealNameFinished && m_eState != AFTER_LESS)
-{
-if (!m_pRealNameBegin)
-m_pRealNameBegin = m_pRealNameContentBegin = m_pCurTokenBegin;
-else if (m_pRealNameEnd < m_pCurTokenBegin - 1
- || (m_pRealNameEnd == m_pCurTokenBegin - 1
-&& *m_pRealNameEnd != ' '))
-m_bRealNameReparse = true;
-m_pRealNameEnd = m_pRealNameContentEnd = m_pCurTokenEnd;
-}
-}
-
 
 //  SvAddressParser_Impl
 
@@ -167,13 +120,11 @@ inline void SvAddressParser_Impl::addTokenToRealName()
 bool SvAddressParser_Impl::readToken()
 {
 m_nCurToken = m_eType;
-m_bCurTokenReparse = false;
 switch (m_eType)
 {
 case TOKEN_QUOTED:
 {
 m_pCurTokenBegin = m_pInputPos - 1;
-m_pCurTokenContentBegin = m_pInputPos;
 bool bEscaped = false;
 for (;;)
 {
@@ -182,13 +133,11 @@ bool SvAddressParser_Impl::readToken()
 sal_Unicode cChar = *m_pInputPos++;
 if (bEscaped)
 {
-m_bCurTokenReparse = true;
 bEscaped = false;
 }
 else if (cChar == '"')
 {
 m_pCurTokenEnd = m_pInputPos;
-m_pCurTokenContentEnd = m_pInputPos - 1;
 return true;
 }
 else if (cChar == '\\')
@@ -199,7 +148,6 @@ bool SvAddressParser_Impl::readToken()
 case TOKEN_DOMAIN:
 {
 m_pCurTokenBegin = m_pInputPos - 1;
-m_pCurTokenContentBegin = m_pInputPos;
 bool bEscaped = false;
 for (;;)

[Libreoffice-commits] core.git: sc/source

2021-06-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/Accessibility/AccessibleEditObject.cxx |5 ++---
 sc/source/ui/app/inputwin.cxx   |4 ++--
 sc/source/ui/inc/AccessibleEditObject.hxx   |3 +--
 sc/source/ui/pagedlg/tphfedit.cxx   |2 +-
 4 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit 842a5504119c49edf368b94889f098e76f5fb80d
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 14:48:08 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 17:50:44 2021 +0200

drop unnecessary pWin arg to InitAcc

on the only path InitAcc has a non-null pWin arg the caller ctor
has already set mpWindow to pWin which is also all that InitAcc does
with its pWin arg

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

diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx 
b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 2f06f9d8fdda..8412b313c69c 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -69,7 +69,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(
 , mbHasFocus(false)
 , m_pScDoc(nullptr)
 {
-InitAcc(rxParent, pEditView, pWin, rName, rDescription);
+InitAcc(rxParent, pEditView, rName, rDescription);
 }
 
 ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
@@ -85,13 +85,12 @@ 
ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
 
 void ScAccessibleEditObject::InitAcc(
 const uno::Reference& rxParent,
-EditView* pEditView, vcl::Window* pWin,
+EditView* pEditView,
 const OUString& rName,
 const OUString& rDescription)
 {
 SetParent(rxParent);
 mpEditView = pEditView;
-mpWindow = pWin;
 
 CreateTextHelper();
 SetName(rName);
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 39c8f4abdb21..52de56543a80 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1536,7 +1536,7 @@ void ScTextWnd::InitEditEngine()
 
 if (pAcc)
 {
-pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
+pAcc->InitAcc(nullptr, m_xEditView.get(),
   ScResId(STR_ACC_EDITLINE_NAME),
   ScResId(STR_ACC_EDITLINE_DESCR));
 }
@@ -2010,7 +2010,7 @@ void ScTextWnd::MakeDialogEditView()
 
 if (pAcc)
 {
-pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
+pAcc->InitAcc(nullptr, m_xEditView.get(),
   ScResId(STR_ACC_EDITLINE_NAME),
   ScResId(STR_ACC_EDITLINE_DESCR));
 }
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx 
b/sc/source/ui/inc/AccessibleEditObject.hxx
index ea9c638705d4..43a4cba6b18d 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -59,8 +59,7 @@ public:
 
 void InitAcc(
 const css::uno::Reference& rxParent,
-EditView* pEditView, vcl::Window* pWin,
-const OUString& rName, const OUString& rDescription);
+EditView* pEditView, const OUString& rName, const OUString& 
rDescription);
 
 protected:
 virtual ~ScAccessibleEditObject() override;
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx 
b/sc/source/ui/pagedlg/tphfedit.cxx
index 40cea53f9c91..c71c67b0842b 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -105,7 +105,7 @@ void ScEditWindow::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 break;
 }
 
-tmpAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
+tmpAcc->InitAcc(nullptr, m_xEditView.get(),
   sName, pDrawingArea->get_tooltip_text());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2021-06-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/Accessibility/AccessibleEditObject.cxx |5 ++---
 sc/source/ui/app/inputwin.cxx   |4 ++--
 sc/source/ui/inc/AccessibleEditObject.hxx   |2 +-
 sc/source/ui/pagedlg/tphfedit.cxx   |2 +-
 4 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit a5d6dc7ac82cf6f527a47bf67f976f982c2c0015
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 14:44:23 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 17:47:37 2021 +0200

ScTextWnd is set since the ctor now so drop from InitAcc

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

diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx 
b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 20074b494c0b..2f06f9d8fdda 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -69,7 +69,7 @@ ScAccessibleEditObject::ScAccessibleEditObject(
 , mbHasFocus(false)
 , m_pScDoc(nullptr)
 {
-InitAcc(rxParent, pEditView, pWin, nullptr, rName, rDescription);
+InitAcc(rxParent, pEditView, pWin, rName, rDescription);
 }
 
 ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
@@ -86,13 +86,12 @@ 
ScAccessibleEditObject::ScAccessibleEditObject(EditObjectType eObjectType)
 void ScAccessibleEditObject::InitAcc(
 const uno::Reference& rxParent,
 EditView* pEditView, vcl::Window* pWin,
-ScTextWnd* pTxtWnd, const OUString& rName,
+const OUString& rName,
 const OUString& rDescription)
 {
 SetParent(rxParent);
 mpEditView = pEditView;
 mpWindow = pWin;
-mpTextWnd = pTxtWnd;
 
 CreateTextHelper();
 SetName(rName);
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 4d8d59dd957f..39c8f4abdb21 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1536,7 +1536,7 @@ void ScTextWnd::InitEditEngine()
 
 if (pAcc)
 {
-pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr, this,
+pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
   ScResId(STR_ACC_EDITLINE_NAME),
   ScResId(STR_ACC_EDITLINE_DESCR));
 }
@@ -2010,7 +2010,7 @@ void ScTextWnd::MakeDialogEditView()
 
 if (pAcc)
 {
-pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr, this,
+pAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
   ScResId(STR_ACC_EDITLINE_NAME),
   ScResId(STR_ACC_EDITLINE_DESCR));
 }
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx 
b/sc/source/ui/inc/AccessibleEditObject.hxx
index 0c679e6831ae..ea9c638705d4 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -59,7 +59,7 @@ public:
 
 void InitAcc(
 const css::uno::Reference& rxParent,
-EditView* pEditView, vcl::Window* pWin, ScTextWnd* pTextWnd,
+EditView* pEditView, vcl::Window* pWin,
 const OUString& rName, const OUString& rDescription);
 
 protected:
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx 
b/sc/source/ui/pagedlg/tphfedit.cxx
index 403d6148454a..40cea53f9c91 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -105,7 +105,7 @@ void ScEditWindow::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 break;
 }
 
-tmpAcc->InitAcc(nullptr, m_xEditView.get(), nullptr, nullptr,
+tmpAcc->InitAcc(nullptr, m_xEditView.get(), nullptr,
   sName, pDrawingArea->get_tooltip_text());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sc/source/ui/view/viewdata.cxx |   10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit cb8d6ebfb5b5512c32027708859251fae8c2fcae
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 10:24:36 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:43:45 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

The "INTEGRATION: CWS sheetzoom: #i24372# allow separate zoom per sheet" 
commits
0846c467a921a27ebd3691e4bc187ece8d0ae7aa (sc/source/ui/inc/viewdata.hxx) and
8d808f64ed32d55adc7af34c3615993ada02f117 (sc/source/ui/view/viewdata.cxx) 
had
moved the aZoomX, aZoomY, aPageZoomX, aPageZoomY data members from 
ScViewData to
ScViewTableData (and added aDefZoomX, aDefZoomY, aDefPageZoomX, 
aDefPageZoomY
data members to ScViewData in their place), and introduced the local 
variables

> Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;//! evaluate (all 
sheets?)

into ScViewData::ReadUserData, so the pre-exisiting assignments to them in 
that
function, which used to assign to the ScViewData data members, now started 
to do
dead assignments to those local variables.

(8d808f64ed32d55adc7af34c3615993ada02f117 had similarly added local 
variables

> Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;//! evaluate (all 
sheets?)

to the top of ScViewData::ReadUserDataSequence, but they have already been
cleaned away by 305bf19e390aebdf2d20ea052a92f782e8d1185c "loplugin: unused
variables".)

Change-Id: I0053ba85b3e33fc515cf4724655baa3c5063826d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116818
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 5c66b48c6c72..1e045bf35ca4 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -3293,19 +3293,11 @@ void ScViewData::ReadUserData(const OUString& rData)
 return;
 }
 
-Fraction aZoomX, aZoomY, aPageZoomX, aPageZoomY;// evaluate (all 
sheets?)
-
 sal_Int32 nMainIdx {0};
 sal_Int32 nIdx {0};
 
 OUString aZoomStr = rData.getToken(0, ';', nMainIdx);   // 
Zoom/PageZoom/Mode
-sal_uInt16 nNormZoom = 
sal::static_int_cast(aZoomStr.getToken(0, '/', nIdx).toInt32());
-if ( nNormZoom >= MINZOOM && nNormZoom <= MAXZOOM )
-aZoomX = aZoomY = Fraction( nNormZoom, 100 );   //  "normal" 
zoom (always)
-sal_uInt16 nPageZoom = 
sal::static_int_cast(aZoomStr.getToken(0, '/', nIdx).toInt32());
-if ( nPageZoom >= MINZOOM && nPageZoom <= MAXZOOM )
-aPageZoomX = aPageZoomY = Fraction( nPageZoom, 100 );   // Pagebreak 
zoom, if set
-sal_Unicode cMode = aZoomStr.getToken(0, '/', nIdx)[0]; // 0 or "0"/"1"
+sal_Unicode cMode = aZoomStr.getToken(2, '/', nIdx)[0]; // 0 or "0"/"1"
 SetPagebreakMode( cMode == '1' );
 // SetPagebreakMode must always be called due to CalcPPT / RecalcPixPos()
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svtools/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 svtools/source/table/gridtablerenderer.cxx |5 -
 1 file changed, 5 deletions(-)

New commits:
commit 85582c40bca587017611bb332d1c9997c687cdfe
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 11:49:05 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:43:12 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

The (only) use of lineColor at

> //m_pImpl->bUseGridLines ? _rDevice.SetLineColor( lineColor ) : 
_rDevice.SetLineColor();

had been commented out in 8578ba4dc736b53c3ca8461516e4024d276b3b05 
"gridsort:
consolidated and fixed table cell rendering" and then cleaned away 
completely
with f4147a39374c7692728e8506961f23e59a069c45 "refactor TableControl to use
RenderContext"

Change-Id: I817800b26f4996a73a38fece22149ae87c2f9c01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116824
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/svtools/source/table/gridtablerenderer.cxx 
b/svtools/source/table/gridtablerenderer.cxx
index 8a68ccdbba2a..a0bcc2bb30c8 100644
--- a/svtools/source/table/gridtablerenderer.cxx
+++ b/svtools/source/table/gridtablerenderer.cxx
@@ -309,9 +309,6 @@ namespace svt::table
 
 Color backgroundColor = _rStyle.GetFieldColor();
 
-std::optional const aLineColor( m_pImpl->rModel.getLineColor() 
);
-Color lineColor = !aLineColor ? _rStyle.GetSeparatorColor() : 
*aLineColor;
-
 Color const activeSelectionBackColor = 
lcl_getEffectiveColor(m_pImpl->rModel.getActiveSelectionBackColor(),
  _rStyle, 
&StyleSettings::GetHighlightColor);
 if (_bSelected)
@@ -320,8 +317,6 @@ namespace svt::table
 backgroundColor = i_hasControlFocus
 ? activeSelectionBackColor
 : 
lcl_getEffectiveColor(m_pImpl->rModel.getInactiveSelectionBackColor(), _rStyle, 
&StyleSettings::GetDeactiveColor);
-if (!aLineColor)
-lineColor = backgroundColor;
 }
 else
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |8 ++--
 sd/source/ui/inc/BulletAndPositionDlg.hxx |7 +--
 2 files changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 1541ac50819c59923e100e297fa7b4d4a3316126
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 11:15:45 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:42:41 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

> sd/source/ui/dlg/BulletAndPositionDlg.cxx:707:14: error: variable 
'sSelectStyle' set but not used [-Werror,-Wunused-but-set-variable]
> OUString sSelectStyle;
>  ^

...ever since the code's introduction in
e3015d7021e689c71c2ed8e5dd01a74d832c84f0 "Add new customize and position 
merged
dialog", and which means that 
SvxBulletAndPositionDlg::m_sBulletCharFormatName
and second parameter of SvxBulletAndPositionDlg::SetCharFmts, both also
introduced in that commit, were equally unused

Change-Id: Id07c05777817298073d85719689b391bda533221
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116821
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index fc7d4d4dbb39..fb798956e4ef 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -189,11 +189,10 @@ 
SvxBulletAndPositionDlg::SvxBulletAndPositionDlg(weld::Window* pWindow, const Sf
 aSet.Put(SfxUInt16Item(SID_METRIC_ITEM, static_cast(eMetric)));
 
 const SfxStringItem* pNumCharFmt = 
aSet.GetItem(SID_NUM_CHAR_FMT, false);
-const SfxStringItem* pBulletCharFmt = 
aSet.GetItem(SID_BULLET_CHAR_FMT, false);
 const SfxUInt16Item* pMetricItem = 
aSet.GetItem(SID_METRIC_ITEM, false);
 
-if (pNumCharFmt && pBulletCharFmt)
-SetCharFmts(pNumCharFmt->GetValue(), pBulletCharFmt->GetValue());
+if (pNumCharFmt)
+SetCharFmt(pNumCharFmt->GetValue());
 
 if (pMetricItem)
 SetMetric(static_cast(pMetricItem->GetValue()));
@@ -702,7 +701,6 @@ IMPL_LINK_NOARG(SvxBulletAndPositionDlg, 
PreviewInvalidateHdl_Impl, Timer*, void
 
 IMPL_LINK(SvxBulletAndPositionDlg, NumberTypeSelectHdl_Impl, weld::ComboBox&, 
rBox, void)
 {
-OUString sSelectStyle;
 bool bBmp = false;
 sal_uInt16 nMask = 1;
 for (sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -737,7 +735,6 @@ IMPL_LINK(SvxBulletAndPositionDlg, 
NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
 pActNum->SetLevel(i, aNumFmt);
 SwitchNumberType(SHOW_BULLET);
 // allocation of the drawing pattern is automatic
-sSelectStyle = m_sBulletCharFormatName;
 }
 else
 {
@@ -748,7 +745,6 @@ IMPL_LINK(SvxBulletAndPositionDlg, 
NumberTypeSelectHdl_Impl, weld::ComboBox&, rB
 CheckForStartValue_Impl(nNumberingType);
 
 // allocation of the drawing pattern is automatic
-sSelectStyle = m_sNumCharFmtName;
 }
 }
 nMask <<= 1;
diff --git a/sd/source/ui/inc/BulletAndPositionDlg.hxx 
b/sd/source/ui/inc/BulletAndPositionDlg.hxx
index 6b33aff7098f..b6984af8ccb5 100644
--- a/sd/source/ui/inc/BulletAndPositionDlg.hxx
+++ b/sd/source/ui/inc/BulletAndPositionDlg.hxx
@@ -46,7 +46,6 @@ class View;
 class SvxBulletAndPositionDlg : public weld::GenericDialogController
 {
 OUString m_sNumCharFmtName;
-OUString m_sBulletCharFormatName;
 
 Timer aInvalidateTimer;
 
@@ -148,11 +147,7 @@ public:
 bool IsSlideScope() const;
 void Reset(const SfxItemSet* rSet);
 
-void SetCharFmts(const OUString& rNumName, const OUString& rBulletName)
-{
-m_sNumCharFmtName = rNumName;
-m_sBulletCharFormatName = rBulletName;
-}
+void SetCharFmt(const OUString& rNumName) { m_sNumCharFmtName = rNumName; }
 void SetMetric(FieldUnit eSet);
 
 void SetModified(bool bRepaint = true);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sfx2/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sfx2/source/bastyp/fltfnc.cxx |7 ---
 1 file changed, 7 deletions(-)

New commits:
commit 97654133f64eed1c1e6d35188315f5fb22f2d936
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 11:21:16 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:42:07 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

...after e79e8117dcc7475d8d90afeaaac9eb7050ff244e "loplugin:unusedfields in
sfx2" had removed the (only) read of sPattern

Change-Id: I2413af34b15dec45c46df0ffabf1d910f92dd695
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116822
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index bd48141ac7f5..83b25b015e4d 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -895,7 +895,6 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
 OUString sDefaultTemplate;
 OUString sUserData   ;
 OUString sExtension  ;
-OUString sPattern;
 OUString sServiceName;
 bool bEnabled = true ;
 
@@ -975,12 +974,6 @@ void SfxFilterContainer::ReadSingleFilter_Impl(
 sExtension = implc_convertStringlistToString( 
lExtensions, ';', u"*." );
 }
 }
-else if ( rTypeProperty.Name == "URLPattern" )
-{
-uno::Sequence< OUString > lPattern;
-rTypeProperty.Value >>= lPattern;
-sPattern = implc_convertStringlistToString( 
lPattern, ';', u"" );
-}
 }
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sd/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sd/source/ui/dlg/BulletAndPositionDlg.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 1269ea3586cb902a790f721810fbe93647cfd491
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 11:12:00 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:41:40 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

...after 096168cacc574a71482520e5c3fbd79f975dc6ad "loplugin:writeonlyvars" 
had
removed the (only) read of sFirstCharFmt

Change-Id: I8b59f54b2bb8669c66a14df80c4c74fceb56b1c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116820
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sd/source/ui/dlg/BulletAndPositionDlg.cxx 
b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
index 6ef27fd7de9a..fc7d4d4dbb39 100644
--- a/sd/source/ui/dlg/BulletAndPositionDlg.cxx
+++ b/sd/source/ui/dlg/BulletAndPositionDlg.cxx
@@ -429,7 +429,6 @@ void SvxBulletAndPositionDlg::InitControls()
 bool bSameIndent = !bLabelAlignmentPosAndSpaceModeActive;
 
 const SvxNumberFormat* aNumFmtArr[SVX_MAX_NUM];
-OUString sFirstCharFmt;
 SvxAdjust eFirstAdjust = SvxAdjust::Left;
 Size aFirstSize(0, 0);
 sal_uInt16 nMask = 1;
@@ -449,7 +448,6 @@ void SvxBulletAndPositionDlg::InitControls()
 if (SAL_MAX_UINT16 == nLvl)
 {
 nLvl = i;
-sFirstCharFmt = aNumFmtArr[i]->GetCharFormatName();
 if (bShowBitmap)
 aFirstSize = aNumFmtArr[i]->GetGraphicSize();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: cui/source

2021-06-09 Thread Armin Le Grand (Allotropia) (via logerrit)
 cui/source/options/optpath.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit bcc28948d0fd7b4f005a13db923c3e853d74817c
Author: Armin Le Grand (Allotropia) 
AuthorDate: Wed Jun 9 13:33:26 2021 +0200
Commit: Armin Le Grand 
CommitDate: Wed Jun 9 17:12:59 2021 +0200

tdf#130428 remove unnecessary usage of SfxItemState::UNKNOWN

See task, slowly trying to reduce usages of that flag

Change-Id: I50dc8e21e2f5e82e21bf335d63d07cee1ee18d01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116913
Reviewed-by: Julien Nabet 
Reviewed-by: Armin Le Grand 
Tested-by: Jenkins

diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index e1f638faa673..e0f940219016 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -77,14 +77,14 @@ namespace {
 struct PathUserData_Impl
 {
 SvtPathOptions::Paths  nRealId;
-SfxItemStateeState;
+boolbItemStateSet;
 OUStringsUserPath;
 OUStringsWritablePath;
 boolbReadOnly;
 
 explicit PathUserData_Impl(SvtPathOptions::Paths nId)
 : nRealId(nId)
-, eState(SfxItemState::UNKNOWN)
+, bItemStateSet(false)
 , bReadOnly(false)
 {
 }
@@ -227,7 +227,7 @@ bool SvxPathTabPage::FillItemSet( SfxItemSet* )
 {
 PathUserData_Impl* pPathImpl = 
reinterpret_cast(m_xPathBox->get_id(i).toInt64());
 SvtPathOptions::Paths nRealId = pPathImpl->nRealId;
-if (pPathImpl->eState == SfxItemState::SET)
+if (pPathImpl->bItemStateSet )
 SetPathList( nRealId, pPathImpl->sUserPath, 
pPathImpl->sWritablePath );
 }
 return true;
@@ -403,7 +403,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, StandardHdl_Impl, 
weld::Button&, void)
 }
 }
 m_xPathBox->set_text(rEntry, Convert_Impl(sTemp), 1);
-pPathImpl->eState = SfxItemState::SET;
+pPathImpl->bItemStateSet = true;
 pPathImpl->sUserPath = sUserPath.makeStringAndClear();
 pPathImpl->sWritablePath = sWritablePath;
 }
@@ -448,7 +448,7 @@ void SvxPathTabPage::ChangeCurrentEntry( const OUString& 
_rFolder )
 return;
 
 m_xPathBox->set_text(nEntry, Convert_Impl(sNewPathStr), 1);
-pPathImpl->eState = SfxItemState::SET;
+pPathImpl->bItemStateSet = true;
 pPathImpl->sWritablePath = sNewPathStr;
 if ( SvtPathOptions::Paths::Work == pPathImpl->nRealId )
 {
@@ -530,7 +530,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, 
weld::Button&, void)
 
 m_xPathBox->set_text(nEntry, Convert_Impl(sFullPath), 1);
 // save modified flag
-pPathImpl->eState = SfxItemState::SET;
+pPathImpl->bItemStateSet = true;
 pPathImpl->sUserPath = sUser;
 pPathImpl->sWritablePath = sWritable;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configure.ac

2021-06-09 Thread Caolán McNamara (via logerrit)
 configure.ac |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 33b4198735af8d9398e63887187b86b4176cac82
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 13:41:30 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 17:07:56 2021 +0200

allow system firebird 4

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

diff --git a/configure.ac b/configure.ac
index 077684be36b4..e860d4a5f199 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10103,11 +10103,10 @@ if test "$enable_firebird_sdbc" = "yes" ; then
 AC_MSG_CHECKING([Firebird version])
 if test -n "${FIREBIRD_VERSION}"; then
 FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
-FIREBIRD_MINOR=`echo $FIREBIRD_VERSION | cut -d"." -f2`
-if test "$FIREBIRD_MAJOR" -eq "3" -a "$FIREBIRD_MINOR" -eq "0"; 
then
+if test "$FIREBIRD_MAJOR" -ge "3"; then
 AC_MSG_RESULT([OK])
 else
-AC_MSG_ERROR([Ensure firebird 3.0.x is installed])
+AC_MSG_ERROR([Ensure firebird >= 3 is installed])
 fi
 else
 save_CFLAGS="${CFLAGS}"
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: svl/CppunitTest_svl_adrparse.mk svl/Module_svl.mk svl/qa

2021-06-09 Thread Stephan Bergmann (via logerrit)
 svl/CppunitTest_svl_adrparse.mk  |   21 +
 svl/Module_svl.mk|1 
 svl/qa/unit/test_SvAddressParser.cxx |   77 +++
 3 files changed, 99 insertions(+)

New commits:
commit acf565ea13204479f215ca597a432d69dac4290d
Author: Stephan Bergmann 
AuthorDate: Wed Jun 9 15:33:04 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 17:01:19 2021 +0200

Add an SvAddressParser unit test

Change-Id: I7d08528f455bb7849e0b62da16c5387b1812ccb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116919
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/svl/CppunitTest_svl_adrparse.mk b/svl/CppunitTest_svl_adrparse.mk
new file mode 100644
index ..7cd663c8e217
--- /dev/null
+++ b/svl/CppunitTest_svl_adrparse.mk
@@ -0,0 +1,21 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 
100 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CppunitTest_CppunitTest,svl_adrparse))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,svl_adrparse, \
+svl/qa/unit/test_SvAddressParser \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,svl_adrparse, \
+sal \
+svl \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/svl/Module_svl.mk b/svl/Module_svl.mk
index 6283df82eadb..45bf74915c14 100644
--- a/svl/Module_svl.mk
+++ b/svl/Module_svl.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_Module_add_l10n_targets,svl,\
 ))
 
 $(eval $(call gb_Module_add_check_targets,svl,\
+   CppunitTest_svl_adrparse \
CppunitTest_svl_inetcontenttype \
CppunitTest_svl_itempool \
CppunitTest_svl_items \
diff --git a/svl/qa/unit/test_SvAddressParser.cxx 
b/svl/qa/unit/test_SvAddressParser.cxx
new file mode 100644
index ..b015f9a1b389
--- /dev/null
+++ b/svl/qa/unit/test_SvAddressParser.cxx
@@ -0,0 +1,77 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+namespace
+{
+class Test : public CppUnit::TestFixture
+{
+void testRfc822ExampleAddresses()
+{
+// Examples taken from section A.1 "Examples: Addresses" of
+//  "Standard for the Format of 
ARPA Internet Text
+// Messages":
+{
+SvAddressParser p("Alfred Neuman ");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), p.Count());
+CPPUNIT_ASSERT_EQUAL(OUString("Neuman@BBN-TENEXA"), 
p.GetEmailAddress(0));
+}
+{
+SvAddressParser p("Neuman@BBN-TENEXA");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), p.Count());
+CPPUNIT_ASSERT_EQUAL(OUString("Neuman@BBN-TENEXA"), 
p.GetEmailAddress(0));
+}
+{
+SvAddressParser p("\"George, Ted\" ");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), p.Count());
+CPPUNIT_ASSERT_EQUAL(OUString("Shared@Group.Arpanet"), 
p.GetEmailAddress(0));
+}
+{
+SvAddressParser p("Wilt . (the  Stilt) chamberl...@nba.us");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), p.Count());
+CPPUNIT_ASSERT_EQUAL(OUString("wilt.chamberl...@nba.us"), 
p.GetEmailAddress(0));
+}
+{
+SvAddressParser p("Gourmets:  Pompous Person 
,\n"
+  "   Childs@WGBH.Boston, Galloping 
Gourmet@\n"
+  "   ANT.Down-Under (Australian National 
Television),\n"
+  "   Cheapie@Discount-Liquors;,\n"
+  "  Cruisers:  Port@Portugal, Jones@SEA;,\n"
+  "Another@Somewhere.SomeOrg");
+CPPUNIT_ASSERT_EQUAL(sal_Int32(7), p.Count());
+CPPUNIT_ASSERT_EQUAL(OUString("WhoZiWhatZit@Cordon-Bleu"), 
p.GetEmailAddress(0));
+CPPUNIT_ASSERT_EQUAL(OUString("Childs@WGBH.Boston"), 
p.GetEmailAddress(1));
+CPPUNIT_ASSERT_EQUAL(OUString("gour...@ant.down-Under"), 
p.GetEmailAddress(2));
+CPPUNIT_ASSERT_EQUAL(OUString("Cheapie@Discount-Liquors"), 
p.GetEmailAddress(3));
+CPPUNIT_ASSERT_EQUAL(OUString("Port@Portugal"), 
p.GetEmailAddress(4));
+CPPUNIT_ASSERT_EQUAL(OUString("Jones@SEA"), p.GetEmailAddress(5));
+CPPUNIT_ASSERT_EQUAL(OUString("Another@Somewhere.SomeOrg"), 
p.GetEmailAddress(6));
+}
+}
+
+CPPUNIT_TEST_SUITE(Test);
+

[Libreoffice-commits] core.git: include/comphelper

2021-06-09 Thread Tor Lillqvist (via logerrit)
 include/comphelper/profilezone.hxx |   39 ++---
 include/comphelper/traceevent.hxx  |   20 ++
 2 files changed, 39 insertions(+), 20 deletions(-)

New commits:
commit 0fa2bb31b53c2b9114480ab77e0db4e011691440
Author: Tor Lillqvist 
AuthorDate: Mon May 31 15:55:20 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Jun 9 16:52:15 2021 +0200

Avoid empty std::map constructor

Change-Id: Ie1bc333409fb201d82dd2cff7597e281600f01db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116449
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116849
Tested-by: Jenkins

diff --git a/include/comphelper/profilezone.hxx 
b/include/comphelper/profilezone.hxx
index babd11f5b93b..08e6a8b031e8 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -31,6 +31,24 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent
 
 void addRecording();
 
+ProfileZone(const char* sName, const OUString& sArgs, bool bConsole)
+: NamedEvent(sName, sArgs)
+, m_bConsole(bConsole)
+, m_nNesting(-1)
+{
+if (s_bRecording || m_bConsole)
+{
+TimeValue systemTime;
+osl_getSystemTime(&systemTime);
+m_nCreateTime
+= static_cast(systemTime.Seconds) * 100 + 
systemTime.Nanosec / 1000;
+
+m_nNesting = s_nNesting++;
+}
+else
+m_nCreateTime = 0;
+}
+
 public:
 /**
  * Starts measuring the cost of a C++ scope.
@@ -47,23 +65,14 @@ public:
  * Similar to the DEBUG macro in sal/log.hxx, don't forget to remove these 
lines before
  * committing.
  */
-ProfileZone(const char* sName, bool bConsole = false,
-const std::map& args = std::map())
-: NamedEvent(sName, args)
-, m_bConsole(bConsole)
-, m_nNesting(-1)
+ProfileZone(const char* sName, const std::map& aArgs, 
bool bConsole = false)
+: ProfileZone(sName, createArgsString(aArgs), bConsole)
 {
-if (s_bRecording || m_bConsole)
-{
-TimeValue systemTime;
-osl_getSystemTime(&systemTime);
-m_nCreateTime
-= static_cast(systemTime.Seconds) * 100 + 
systemTime.Nanosec / 1000;
+}
 
-m_nNesting = s_nNesting++;
-}
-else
-m_nCreateTime = 0;
+ProfileZone(const char* sName, bool bConsole = false)
+: ProfileZone(sName, OUString(), bConsole)
+{
 }
 
 ~ProfileZone()
diff --git a/include/comphelper/traceevent.hxx 
b/include/comphelper/traceevent.hxx
index 6e614ec0552e..5e2502de72a1 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -82,9 +82,14 @@ protected:
 const int m_nPid;
 const OUString m_sArgs;
 
-TraceEvent(std::map args)
+TraceEvent(const OUString& sArgs)
 : m_nPid(getPid())
-, m_sArgs(createArgsString(args))
+, m_sArgs(sArgs)
+{
+}
+
+TraceEvent(std::map aArgs)
+: TraceEvent(createArgsString(aArgs))
 {
 }
 
@@ -105,9 +110,14 @@ class COMPHELPER_DLLPUBLIC NamedEvent : public TraceEvent
 protected:
 const char* m_sName;
 
-NamedEvent(const char* sName,
-   const std::map& args = std::map())
-: TraceEvent(args)
+NamedEvent(const char* sName, const OUString& sArgs)
+: TraceEvent(sArgs)
+, m_sName(sName ? sName : "(null)")
+{
+}
+
+NamedEvent(const char* sName, const std::map& aArgs)
+: TraceEvent(aArgs)
 , m_sName(sName ? sName : "(null)")
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: helpcontent2

2021-06-09 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4b8ead440a6216e42596333b0837854c923e25a9
Author: Alain Romedenne 
AuthorDate: Wed Jun 9 16:49:57 2021 +0200
Commit: Gerrit Code Review 
CommitDate: Wed Jun 9 16:49:57 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to 9fffc3e09d2cddfc614e5520d8d33942572dd5a5
  - ThisDatabaseDocument new help page

Change-Id: I9ad35913bbc5fef9208b3a9ea5eb9be01f882131
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116463
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/helpcontent2 b/helpcontent2
index ed18f8e4f9fc..9fffc3e09d2c 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit ed18f8e4f9fc516d1a9e117e983cdc8006838ad1
+Subproject commit 9fffc3e09d2cddfc614e5520d8d33942572dd5a5
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/auxiliary source/text

2021-06-09 Thread Alain Romedenne (via logerrit)
 AllLangHelp_sbasic.mk |2 +
 source/auxiliary/sbasic.tree  |1 
 source/text/sbasic/shared/03132200.xhp|   24 -
 source/text/sbasic/shared/thisdbdoc.xhp   |   52 ++
 source/text/sbasic/shared/uno_objects.xhp |   21 
 5 files changed, 91 insertions(+), 9 deletions(-)

New commits:
commit 9fffc3e09d2cddfc614e5520d8d33942572dd5a5
Author: Alain Romedenne 
AuthorDate: Wed Jun 2 13:58:29 2021 +0200
Commit: Rafael Lima 
CommitDate: Wed Jun 9 16:49:57 2021 +0200

ThisDatabaseDocument new help page

Change-Id: I9ad35913bbc5fef9208b3a9ea5eb9be01f882131
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116463
Tested-by: Jenkins
Reviewed-by: Rafael Lima 

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index f40dd2d0f..c2d750049 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -396,6 +396,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/replace \
 helpcontent2/source/text/sbasic/shared/uno_objects \
 helpcontent2/source/text/sbasic/shared/stardesktop \
+helpcontent2/source/text/sbasic/shared/stardesktop \
+helpcontent2/source/text/sbasic/shared/thisdbdoc \
 helpcontent2/source/text/sbasic/shared/GetPathSeparator \
 helpcontent2/source/text/sbasic/shared/keys \
 helpcontent2/source/text/sbasic/shared/main0211 \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index b52b277ee..9d981d88c 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -294,6 +294,7 @@
 SYD 
Function [VBA]
 Tan 
Function
 ThisComponent object
+ThisDatabaseDocument object
 TimeSerial Function
 TimeValue Function
 Time 
Function
diff --git a/source/text/sbasic/shared/03132200.xhp 
b/source/text/sbasic/shared/03132200.xhp
index eb96a9964..b89a5d3cb 100644
--- a/source/text/sbasic/shared/03132200.xhp
+++ b/source/text/sbasic/shared/03132200.xhp
@@ -29,11 +29,18 @@
   ThisComponent object
   components;addressing
 
-ThisComponent Object
-Addresses the 
active component whose properties can be read and set, and whose methods can be 
called. ThisComponent is used in Basic, where it represents 
the current document. Properties and methods available through 
ThisComponent depend on the document type.see 
i60932
+
+ThisComponent Object
+ThisComponent represents the current 
document in Basic macros. It addresses the active component whose properties 
can be read and set, and whose methods can be called. Properties and methods 
available through ThisComponent depend on the document 
type.see i60932
 
+
 
-ThisComponent
+
+  ThisComponent
+
+When the active window 
is a Base form, query, report, table or view, ThisComponent 
returns the current Form information.
+When active window is the Basic IDE, 
ThisComponent object returns the component owning the 
current script.
+
 
 
 Sub Main
@@ -45,5 +52,16 @@
 index.update()
 End Sub
 
+
+
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1text_1_1TextDocument.html";
 name="TextDocument API service">com.sun.star.text.TextDocument API 
service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sheet_1_1SpreadsheetDocument.html";
 name="SpreadsheetDocument API 
service">com.sun.star.sheet.SpreadsheetDocument API service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1presentation_1_1PresentationDocument.html";
 name="PresentationDocument API 
service">com.sun.star.presentation.PresentationDocument API 
service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1drawing_1_1DrawingDocument.html";
 name="DrawingDocument API service">com.sun.star.drawing.DrawingDocument 
API service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1formula_1_1FormulaProperties.html";
 name="FormulaProperties API 
service">com.sun.star.formula.FormulaProperties API service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sdb_1_1OfficeDatabaseDocument.html";
 name="OfficeDatabaseDocument API 
service">com.sun.star.sdb.OfficeDatabaseDocument API service
+  https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1document_1_1OfficeDocument.html";
 name="OfficeDocument API service">com.sun.star.document.OfficeDocument 
API service
+
+
 
 
\ No newline at end of file
diff --git a/source/text/sbasic/shared/thisdbdoc.xhp 
b/source/text/sbasic/shared/thisdbdoc.xhp
new file mode 100644
index 0..8f4a1c61c
--- /dev/null
+++ b/source/text/sbasic/shared/thisdbdoc.xhp
@@ -0,0 +1,52 @@
+
+
+
+
+
+ThisDatabaseDocument 
object
+/text/sbasic/shared/thisdbdoc.xhp
+
+
+
+
+
+
+ 

Re: [libreoffice-documentation] Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

2021-06-09 Thread Steve Fanning

I have finished updating the FILTERXML and WEBSERVICE wiki pages.

I hope that I have implemented the suggested changes satisfactorily. I 
think that I have addressed the spirit of all comments, although I 
changed the proposed detail in some cases.


Thanks again for the helpful comments. Please let me know if you are 
still unhappy with anything on any of the three pages.


Regards,

Steve


On 08/06/2021 20:36, Steve Fanning wrote:


Many thanks to Dev, Eike and Rafael for your helpful comments, they 
are much appreciated.


I have updated the ENCODEURL page and hopefully addressed all 
significant points (although I may have ignored the odd typographical 
change to retain consistency with the many other pages in this part of 
the wiki).


I decided that the tabular format for examples wasn't working on this 
page, some of the URLs were just too long. I've removed it but 
hopefully that won't detract from the usefulness of the page.


Please let me know if you are still unhappy with anything on the 
ENCODEURL page.


I will address the other two pages over the next couple of days.

Regards,

Steve


On 07/06/2021 09:30, Vasudev Narayanan wrote:

Greetings:
For the ENCOREURL function, the given URL returns an empty page as in

For the other two functions, I will also share my review comments.
Thank you-Dev


-Original Message-
From: Steve Fanning 
To: LibreOffice Developers 
Cc: LibreOffice Documentation 
Sent: Mon, Jun 7, 2021 12:36 am
Subject: [libreoffice-documentation] Calc's ENCODEURL, FILTERXML and 
WEBSERVICE functions


Hello All,

Please could somebody with technical knowledge of these three functions
help me?

I have been upgrading their descriptions in the Calc Functions Wiki area
(https://wiki.documentfoundation.org/Documentation/Calc_Functions/ENCODEURL, 

https://wiki.documentfoundation.org/Documentation/Calc_Functions/FILTERXML 


and
https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEBSERVICE). 



I am not an expert on these functions but have extended the descriptions
beyond the explanations given in the Help by a combination of code
inspection and experimentation.

Would it be possible for somebody who has expertise in this area to
review these three wiki pages from a technical perspective? Is what I
have written technically correct? Have I missed anything that might be
significant to a user who is looking for more background? (Please don't
think I'm looking for somebody to find typos - there may be some, but we
can resolve those without wasting any of a developer's valuable time!)

On a specific point, do we need to declare the versions of XML and XPath
that are relevant for FILTERXML? If so, can somebody confirm what 
they are?


Thanks in advance.

Regards,

Steve Fanning (LibreOffice Documentation Team)






___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sc/source

2021-06-09 Thread Caolán McNamara (via logerrit)
 sc/source/ui/Accessibility/AccessibleEditObject.cxx |9 +
 sc/source/ui/app/inputwin.cxx   |2 +-
 sc/source/ui/inc/AccessibleEditObject.hxx   |8 
 3 files changed, 18 insertions(+), 1 deletion(-)

New commits:
commit ff72a7db944651c81ff32ad33d6f6b7502448c4e
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 14:31:05 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 16:33:32 2021 +0200

tdf#141769 ScTextWnd has to be available before the editview is created

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

diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx 
b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 57780c4335d2..20074b494c0b 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -594,4 +595,12 @@ OutputDevice* 
ScAccessibleEditControlObject::GetOutputDeviceForView()
 return &m_pController->GetDrawingArea()->get_ref_device();
 }
 
+ScAccessibleEditLineObject::ScAccessibleEditLineObject(ScTextWnd* pTextWnd)
+: ScAccessibleEditControlObject(pTextWnd, ScAccessibleEditObject::EditLine)
+{
+// tdf#141769 set this early so its always available, even before the 
on-demand
+// editview is created
+mpTextWnd = pTextWnd;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 53ae38acd27d..4d8d59dd957f 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -2095,7 +2095,7 @@ void ScTextWnd::SetDrawingArea(weld::DrawingArea* 
pDrawingArea)
 
 css::uno::Reference< css::accessibility::XAccessible > 
ScTextWnd::CreateAccessible()
 {
-pAcc = new ScAccessibleEditControlObject(this, 
ScAccessibleEditObject::EditLine);
+pAcc = new ScAccessibleEditLineObject(this);
 return pAcc;
 }
 
diff --git a/sc/source/ui/inc/AccessibleEditObject.hxx 
b/sc/source/ui/inc/AccessibleEditObject.hxx
index eb672e3102d7..0c679e6831ae 100644
--- a/sc/source/ui/inc/AccessibleEditObject.hxx
+++ b/sc/source/ui/inc/AccessibleEditObject.hxx
@@ -174,7 +174,9 @@ private:
 std::unique_ptr mpTextHelper;
 EditView*  mpEditView;
 VclPtr mpWindow;
+protected:
 ScTextWnd* mpTextWnd;
+private:
 EditObjectType meObjectType;
 bool   mbHasFocus;
 
@@ -221,4 +223,10 @@ public:
 virtual void SAL_CALL disposing() override;
 };
 
+class ScAccessibleEditLineObject : public ScAccessibleEditControlObject
+{
+public:
+ScAccessibleEditLineObject(ScTextWnd* pTextWnd);
+};
+
 /* 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: chart2/CppunitTest_chart2_export2.mk chart2/CppunitTest_chart2_export.mk chart2/export_setup.mk chart2/Module_chart2.mk chart2/qa

2021-06-09 Thread Xisco Fauli (via logerrit)
 chart2/CppunitTest_chart2_export.mk|  127 --
 chart2/CppunitTest_chart2_export2.mk   |   14 
 chart2/Module_chart2.mk|3 
 chart2/export_setup.mk |  143 ++
 chart2/qa/extras/chart2dump/chart2dump.cxx |2 
 chart2/qa/extras/chart2export.cxx  | 1231 -
 chart2/qa/extras/chart2export2.cxx | 1427 +
 chart2/qa/extras/chart2geometry.cxx|   66 -
 chart2/qa/extras/charttest.hxx |   61 +
 chart2/qa/extras/xshape/chart2xshape.cxx   |2 
 10 files changed, 1654 insertions(+), 1422 deletions(-)

New commits:
commit 94fdd0191fe30e193aea19f365397074a816fbe6
Author: Xisco Fauli 
AuthorDate: Wed Jun 9 14:24:24 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 9 16:11:03 2021 +0200

Split CppunitTest_chart2_export into two

it already had 148 tests

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

diff --git a/chart2/CppunitTest_chart2_export.mk 
b/chart2/CppunitTest_chart2_export.mk
index 29147efc03aa..df390d9b4262 100644
--- a/chart2/CppunitTest_chart2_export.mk
+++ b/chart2/CppunitTest_chart2_export.mk
@@ -9,130 +9,7 @@
 #
 #*
 
-$(eval $(call gb_CppunitTest_CppunitTest,chart2_export))
-
-$(eval $(call gb_CppunitTest_use_externals,chart2_export, \
-   boost_headers \
-   libxml2 \
-))
-
-$(eval $(call gb_CppunitTest_add_exception_objects,chart2_export, \
-chart2/qa/extras/chart2export \
-))
-
-$(eval $(call gb_CppunitTest_use_libraries,chart2_export, \
-$(call gb_Helper_optional,AVMEDIA,avmedia) \
-basegfx \
-comphelper \
-cppu \
-cppuhelper \
-drawinglayer \
-editeng \
-for \
-forui \
-i18nlangtag \
-msfilter \
-oox \
-sal \
-salhelper \
-sax \
-sb \
-sc \
-sw \
-sd \
-sfx \
-sot \
-svl \
-svt \
-svx \
-svxcore \
-test \
-tl \
-tk \
-ucbhelper \
-unotest \
-utl \
-vbahelper \
-vcl \
-xo \
-))
-
-$(eval $(call gb_CppunitTest_set_include,chart2_export,\
--I$(SRCDIR)/chart2/inc \
-$$(INCLUDE) \
-))
-
-$(eval $(call gb_CppunitTest_use_sdk_api,chart2_export))
-
-$(eval $(call gb_CppunitTest_use_ure,chart2_export))
-$(eval $(call gb_CppunitTest_use_vcl,chart2_export))
-
-$(eval $(call gb_CppunitTest_use_components,chart2_export,\
-basic/util/sb \
-animations/source/animcore/animcore \
-chart2/source/controller/chartcontroller \
-chart2/source/chartcore \
-comphelper/util/comphelp \
-configmgr/source/configmgr \
-dbaccess/util/dba \
-embeddedobj/util/embobj \
-emfio/emfio \
-eventattacher/source/evtatt \
-filter/source/config/cache/filterconfig1 \
-filter/source/odfflatxml/odfflatxml \
-filter/source/storagefilterdetect/storagefd \
-filter/source/xmlfilteradaptor/xmlfa \
-filter/source/xmlfilterdetect/xmlfd \
-forms/util/frm \
-framework/util/fwk \
-i18npool/util/i18npool \
-linguistic/source/lng \
-oox/util/oox \
-package/source/xstor/xstor \
-package/util/package2 \
-sax/source/expatwrap/expwrap \
-sc/util/sc \
-sc/util/scd \
-sc/util/scfilt \
-sw/util/sw \
-sw/util/swd \
-sw/util/msword \
-sd/util/sd \
-sd/util/sdfilt \
-sd/util/sdd \
-$(call gb_Helper_optional,SCRIPTING, \
-   sc/util/vbaobj) \
-scaddins/source/analysis/analysis \
-scaddins/source/datefunc/date \
-scripting/source/basprov/basprov \
-scripting/util/scriptframe \
-sfx2/util/sfx \
-sot/util/sot \
-svl/source/fsstor/fsstorage \
-svl/util/svl \
-   svtools/util/svt \
-svx/util/svx \
-svx/util/svxcore \
-toolkit/util/tk \
-vcl/vcl.common \
-ucb/source/core/ucb1 \
-ucb/source/ucp/file/ucpfile1 \
-ucb/source/ucp/tdoc/ucptdoc1 \
-unotools/util/utl \
-unoxml/source/rdf/unordf \
-unoxml/source/service/unoxml \
-uui/util/uui \
-writerfilter/util/writerfilter \
-xmloff/util/xo \
-xmlscript/util/xmlscript \
-))
-
-$(eval $(call gb_CppunitTest_use_uiconfigs,chart2_export, \
-modules/swriter \
-))
-
-$(eval $(call gb_CppunitTest_use_configuration,chart2_export))
-
-$(call gb_CppunitTest_get_target,chart2_export): $(call 
gb_Package_get_target,postprocess_images)
+# empty second argument (i.e. no 1)
+$(eval $(call chart2_export_test,))
 
 # vim: set noet sw=4 ts=4:
diff --git a/chart2/CppunitTest_chart2_export2.mk 
b/chart2/CppunitTest_chart2_export2.mk
new file mode 100644
index ..0584cbfc9931
--- /dev/null
+++ b/chart2/CppunitTest_chart2_export2.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#

[Libreoffice-commits] core.git: vcl/qa vcl/source

2021-06-09 Thread panoskorovesis (via logerrit)
 vcl/qa/cppunit/svm/data/gradientex.svm |binary
 vcl/qa/cppunit/svm/svmtest.cxx |  105 -
 vcl/source/gdi/mtfxmldump.cxx  |   30 -
 3 files changed, 131 insertions(+), 4 deletions(-)

New commits:
commit dbd86edb55de543d9b0b88bca1d43676da88215a
Author: panoskorovesis 
AuthorDate: Wed Jun 9 10:32:25 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 9 15:49:06 2021 +0200

Add GradientEx cppunit test to vcl

The test creates two GradientEx and checks
their attributes. In mtfxmldump.cxx the
case regarding GradientEx was completed

Change-Id: I52f2303fa3123b97fb8a4b0783610c0bae300fc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116819
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/qa/cppunit/svm/data/gradientex.svm 
b/vcl/qa/cppunit/svm/data/gradientex.svm
new file mode 100644
index ..6a83d078cd2c
Binary files /dev/null and b/vcl/qa/cppunit/svm/data/gradientex.svm differ
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 0331502d1041..844a12bd1214 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -116,7 +116,7 @@ class SvmTest : public test::BootstrapFixture, public 
XmlTestTools
 void checkGradient(const GDIMetaFile& rMetaFile);
 void testGradient();
 
-//void checkGradientEx(const GDIMetaFile& rMetaFile);
+void checkGradientEx(const GDIMetaFile& rMetaFile);
 void testGradientEx();
 
 void checkHatch(const GDIMetaFile& rMetaFile);
@@ -1254,8 +1254,109 @@ void SvmTest::testGradient()
 checkGradient(readFile(u"gradient.svm"));
 }
 
+void SvmTest::checkGradientEx(const GDIMetaFile& rMetaFile)
+{
+xmlDocUniquePtr pDoc = dumpMeta(rMetaFile);
+
+assertXPathAttrs(pDoc, "/metafile/gradientex[1]", {
+{"style", "Linear"},
+{"startcolor", "#ff"},
+{"endcolor", "#00"},
+{"angle", "0"},
+{"border", "0"},
+{"offsetx", "50"},
+{"offsety", "50"},
+{"startintensity", "100"},
+{"endintensity", "100"},
+{"steps", "0"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[1]/polygon/point[1]", {
+{"x", "1"},
+{"y", "8"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[1]/polygon/point[2]", {
+{"x", "2"},
+{"y", "7"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[1]/polygon/point[3]", {
+{"x", "3"},
+{"y", "6"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[2]", {
+{"style", "Axial"},
+{"startcolor", "#ff00ff"},
+{"endcolor", "#008080"},
+{"angle", "55"},
+{"border", "10"},
+{"offsetx", "22"},
+{"offsety", "24"},
+{"startintensity", "4"},
+{"endintensity", "14"},
+{"steps", "64"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[2]/polygon[1]/point[1]", {
+{"x", "1"},
+{"y", "2"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[2]/polygon[1]/point[2]", {
+{"x", "3"},
+{"y", "4"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[2]/polygon[2]/point[1]", {
+{"x", "8"},
+{"y", "9"}
+});
+assertXPathAttrs(pDoc, "/metafile/gradientex[2]/polygon[2]/point[2]", {
+{"x", "6"},
+{"y", "7"}
+});
+}
+
 void SvmTest::testGradientEx()
-{}
+{
+GDIMetaFile aGDIMetaFile;
+ScopedVclPtrInstance pVirtualDev;
+setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
+
+tools::Polygon aPolygon(3);
+aPolygon.SetPoint(Point(1, 8), 0);
+aPolygon.SetPoint(Point(2, 7), 1);
+aPolygon.SetPoint(Point(3, 6), 2);
+
+tools::PolyPolygon aPolyPolygon(1);
+aPolyPolygon.Insert(aPolygon);
+
+Gradient aGradient(GradientStyle::Linear, COL_WHITE, COL_BLACK);
+pVirtualDev->DrawGradient(aPolyPolygon, aGradient);
+
+tools::Polygon aPolygon2(2);
+aPolygon2.SetPoint(Point(1, 2), 0);
+aPolygon2.SetPoint(Point(3, 4), 1);
+
+tools::Polygon aPolygon3(2);
+aPolygon3.SetPoint(Point(8, 9), 0);
+aPolygon3.SetPoint(Point(6, 7), 1);
+
+tools::PolyPolygon aPolyPolygon2(1);
+aPolyPolygon2.Insert(aPolygon2);
+aPolyPolygon2.Insert(aPolygon3);
+
+Gradient aGradient2;
+aGradient2.SetStyle(GradientStyle::Axial);
+aGradient2.SetStartColor(COL_LIGHTMAGENTA);
+aGradient2.SetEndColor(COL_CYAN);
+aGradient2.SetAngle(Degree10(55));
+aGradient2.SetBorder(10);
+aGradient2.SetOfsX(22);
+aGradient2.SetOfsY(24);
+aGradient2.SetStartIntensity(4);
+aGradient2.SetEndIntensity(14);
+aGradient2.SetSteps(64);
+pVirtualDev->DrawGradient(aPolyPolygon2, aGradient2);
+
+checkGradientEx(writeAndReadStream(aGDIMetaFile));
+checkGradientEx(readFile(u"gradientex.svm"));
+}
 
 void SvmTest::checkHatch(const GDIMetaFile& rMetaFile)
 {
diff --git a/vcl/source/gdi/mtfxmldump.cxx b/vcl/source/gdi/

[Libreoffice-commits] core.git: vcl/qa

2021-06-09 Thread panoskorovesis (via logerrit)
 vcl/qa/cppunit/svm/data/refpoint.svm |binary
 vcl/qa/cppunit/svm/svmtest.cxx   |   32 ++--
 2 files changed, 30 insertions(+), 2 deletions(-)

New commits:
commit 1adbb3e00593af8eed5baf7019fa9b177186567c
Author: panoskorovesis 
AuthorDate: Wed Jun 9 10:03:34 2021 +0300
Commit: Tomaž Vajngerl 
CommitDate: Wed Jun 9 15:47:53 2021 +0200

Add RefPoint cppunit test to vcl

The test creates two RefPoints. A default one and one
using a Point. Then checks their attributes

Change-Id: I7ae3d6498f776d00dee3d084d13f0764942af5c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116780
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 

diff --git a/vcl/qa/cppunit/svm/data/refpoint.svm 
b/vcl/qa/cppunit/svm/data/refpoint.svm
new file mode 100644
index ..e6412f9083b2
Binary files /dev/null and b/vcl/qa/cppunit/svm/data/refpoint.svm differ
diff --git a/vcl/qa/cppunit/svm/svmtest.cxx b/vcl/qa/cppunit/svm/svmtest.cxx
index 06ec5841f8f6..0331502d1041 100644
--- a/vcl/qa/cppunit/svm/svmtest.cxx
+++ b/vcl/qa/cppunit/svm/svmtest.cxx
@@ -179,7 +179,7 @@ class SvmTest : public test::BootstrapFixture, public 
XmlTestTools
 //void checkEPS(const GDIMetaFile& rMetaFile);
 void testEPS();
 
-//void checkRefPoint(const GDIMetaFile& rMetaFile);
+void checkRefPoint(const GDIMetaFile& rMetaFile);
 void testRefPoint();
 
 //void checkComment(const GDIMetaFile& rMetaFile);
@@ -1636,8 +1636,36 @@ void SvmTest::testFloatTransparent()
 void SvmTest::testEPS()
 {}
 
+void SvmTest::checkRefPoint(const GDIMetaFile& rMetaFile)
+{
+xmlDocUniquePtr pDoc = dumpMeta(rMetaFile);
+
+assertXPathAttrs(pDoc, "/metafile/refpoint[1]", {
+{"x", "0"},
+{"y", "0"},
+{"set", "false"}
+});
+
+assertXPathAttrs(pDoc, "/metafile/refpoint[2]", {
+{"x", "1"},
+{"y", "2"},
+{"set", "true"}
+});
+}
+
 void SvmTest::testRefPoint()
-{}
+{
+GDIMetaFile aGDIMetaFile;
+ScopedVclPtrInstance pVirtualDev;
+setupBaseVirtualDevice(*pVirtualDev, aGDIMetaFile);
+
+pVirtualDev->SetRefPoint();
+
+pVirtualDev->SetRefPoint(Point(1,2));
+
+checkRefPoint(writeAndReadStream(aGDIMetaFile));
+checkRefPoint(readFile(u"refpoint.svm"));
+}
 
 void SvmTest::testComment()
 {}
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/uiconfig

2021-06-09 Thread Heiko Tietze (via logerrit)
 sc/uiconfig/scalc/toolbar/previewbar.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e0900c497a65af2e45c7cff3211b340bf14c4324
Author: Heiko Tietze 
AuthorDate: Wed Jun 9 11:24:30 2021 +0200
Commit: Heiko Tietze 
CommitDate: Wed Jun 9 15:36:41 2021 +0200

Resolves tdf#142513 - Order of ZoomIn and ZoomOut at Print Preview

Change-Id: I630e11bdbf4604b779756a6169e4a777c5baeba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116888
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/uiconfig/scalc/toolbar/previewbar.xml 
b/sc/uiconfig/scalc/toolbar/previewbar.xml
index 3bccdae2470e..f8da09167073 100644
--- a/sc/uiconfig/scalc/toolbar/previewbar.xml
+++ b/sc/uiconfig/scalc/toolbar/previewbar.xml
@@ -24,8 +24,8 @@
  
  
  
- 
  
+ 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: connectivity/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 connectivity/source/drivers/odbc/OStatement.cxx |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit f09cb84b274edd2a27697a7dc803a7ee42946de2
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 11:59:57 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 15:35:26 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

...ever since the code's introduction in
c25ec0608a167bcf1d891043f02273761c351701 "initial import".  Lets assume 
that the
accompanying comment, also present since the "initial import", describes 
what
was actually intended, and augment it with a "TODO".

Change-Id: If94a3b72533459d02b1155653b5093c32f034e27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116834
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/connectivity/source/drivers/odbc/OStatement.cxx 
b/connectivity/source/drivers/odbc/OStatement.cxx
index 3ec5bebce68c..c5d63ef771a8 100644
--- a/connectivity/source/drivers/odbc/OStatement.cxx
+++ b/connectivity/source/drivers/odbc/OStatement.cxx
@@ -319,7 +319,6 @@ sal_Bool SAL_CALL OStatement_Base::execute( const OUString& 
sql )
 OString aSql(OUStringToOString(sql,getOwnConnection()->getTextEncoding()));
 
 bool hasResultSet = false;
-SQLWarning aWarning;
 
 // Reset the statement handle and warning
 
@@ -336,12 +335,10 @@ sal_Bool SAL_CALL OStatement_Base::execute( const 
OUString& sql )
 try {
 THROW_SQL(N3SQLExecDirect(m_aStatementHandle, 
reinterpret_cast(const_cast(aSql.getStr())), 
aSql.getLength()));
 }
-catch (const SQLWarning& ex) {
+catch (const SQLWarning&) {
 
-// Save pointer to warning and save with ResultSet
+//TODO: Save pointer to warning and save with ResultSet
 // object once it is created.
-
-aWarning = ex;
 }
 
 // Now determine if there is a result set associated with
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Problems with unittest testEffectExtentInline

2021-06-09 Thread Regina Henschel

Hi Miklos, hi all,

I'm currently working on https://gerrit.libreoffice.org/c/core/+/115668
WIP improve wrap margins in docx filters

My current state is, that distances needed for shadow and glow, for 
rotation and for fat stroke/border are read from docx, and they are 
written to docx from docx and from odt. That works for "normal" cases 
besides +-1Twip rounding errors somewhere and border thickness for 
frames, which is not yet implemented.


But I have trouble with unittest testEffectExtentInline [1]. The 
document in testEffectExtentInline would need a negative bottom margin 
(UI wrap distance from text). But that is not possible in LO, bug 
tdf#141880. The test does not fail in current LO, because it does not 
determine the actual values of the image, but simple writes out the 
values from InteropGrabBag. If the user changes the rotate angle to 
90deg (and put it back to vertical 'top to base line') or sets the 
bottom margin to 1cm for example, the exported docx file has unsuitable 
effectExtent. That results currently in a wrong line height in Word.


I have tried this: Open the test document in Word and change the rotate 
angle to 330° to force Word to recalculate the effectExtent values. Save 
it and reopen it in Word, change back to rotate angle 320° and save that 
again. Then the document has different effectExtent values than the 
original test document. With these values the problem does not exist.


So what to do?

[1] 
https://opengrok.libreoffice.org/xref/core/sw/qa/extras/ooxmlexport/ooxmlexport.cxx?r=1b82b81c&mo=29450&fi=582#591


Kind regards
Regina
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: helpcontent2

2021-06-09 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24d22a76f9a0ad9ef5a45d1478002362ff50335f
Author: Olivier Hallot 
AuthorDate: Wed Jun 9 10:16:54 2021 -0300
Commit: Gerrit Code Review 
CommitDate: Wed Jun 9 15:16:54 2021 +0200

Update git submodules

* Update helpcontent2 from branch 'master'
  to ed18f8e4f9fc516d1a9e117e983cdc8006838ad1
  - Refactor some database help files

Change-Id: Ia9f3e2844cdf4ac16d7ee3ba70d64415c2bf964d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116837
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 8459f8839e7f..ed18f8e4f9fc 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 8459f8839e7fc029963d35c81cf6768777209fa0
+Subproject commit ed18f8e4f9fc516d1a9e117e983cdc8006838ad1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] help.git: AllLangHelp_sdatabase.mk AllLangHelp_shared.mk source/text

2021-06-09 Thread Olivier Hallot (via logerrit)
 AllLangHelp_sdatabase.mk |3 +++
 AllLangHelp_shared.mk|3 ---
 source/text/sdatabase/dabaadvprop.xhp|   11 ---
 source/text/sdatabase/dabaadvpropdat.xhp |   15 +--
 source/text/sdatabase/dabaadvpropgen.xhp |   19 +++
 5 files changed, 31 insertions(+), 20 deletions(-)

New commits:
commit ed18f8e4f9fc516d1a9e117e983cdc8006838ad1
Author: Olivier Hallot 
AuthorDate: Tue Jun 8 09:14:19 2021 -0300
Commit: Olivier Hallot 
CommitDate: Wed Jun 9 15:16:54 2021 +0200

Refactor some database help files

Change-Id: Ia9f3e2844cdf4ac16d7ee3ba70d64415c2bf964d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/116837
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/AllLangHelp_sdatabase.mk b/AllLangHelp_sdatabase.mk
index b2723e0c4..337313b72 100644
--- a/AllLangHelp_sdatabase.mk
+++ b/AllLangHelp_sdatabase.mk
@@ -45,6 +45,9 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sdatabase,\
 helpcontent2/source/text/sdatabase/11030100 \
 helpcontent2/source/text/sdatabase/1108 \
 helpcontent2/source/text/sdatabase/1109 \
+helpcontent2/source/text/sdatabase/dabaadvpropdat \
+helpcontent2/source/text/sdatabase/dabaadvpropgen \
+helpcontent2/source/text/sdatabase/dabaadvprop \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/AllLangHelp_shared.mk b/AllLangHelp_shared.mk
index 65feeac78..6ebe3e7db 100644
--- a/AllLangHelp_shared.mk
+++ b/AllLangHelp_shared.mk
@@ -861,9 +861,6 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
 ))
 
 $(eval $(call gb_AllLangHelp_add_helpfiles,shared,\
-helpcontent2/source/text/shared/explorer/database/dabaadvprop \
-helpcontent2/source/text/shared/explorer/database/dabaadvpropdat \
-helpcontent2/source/text/shared/explorer/database/dabaadvpropgen \
 helpcontent2/source/text/shared/explorer/database/dabadoc \
 helpcontent2/source/text/shared/explorer/database/dabaprop \
 helpcontent2/source/text/shared/explorer/database/dabapropadd \
diff --git a/source/text/shared/explorer/database/dabaadvprop.xhp 
b/source/text/sdatabase/dabaadvprop.xhp
similarity index 80%
rename from source/text/shared/explorer/database/dabaadvprop.xhp
rename to source/text/sdatabase/dabaadvprop.xhp
index ee8535766..fc008f5d5 100644
--- a/source/text/shared/explorer/database/dabaadvprop.xhp
+++ b/source/text/sdatabase/dabaadvprop.xhp
@@ -1,6 +1,4 @@
 
-
-
 
-   
 
 
 
 Advanced Properties
-/text/shared/explorer/database/dabaadvprop.xhp
+/text/sdatabase/dabaadvprop.xhp
 
 
 Database advanced properties 
dialog
@@ -31,13 +28,13 @@
 
 
 
-Advanced 
Properties
+Advanced 
Properties
 Specifies 
advanced properties for the database.
 
 
 In a database 
window, choose Edit - Database - Properties, click Advanced 
Properties tab
 
-
-
+
+
 
 
diff --git a/source/text/shared/explorer/database/dabaadvpropdat.xhp 
b/source/text/sdatabase/dabaadvpropdat.xhp
similarity index 91%
rename from source/text/shared/explorer/database/dabaadvpropdat.xhp
rename to source/text/sdatabase/dabaadvpropdat.xhp
index 399a8693d..0a0e98f94 100644
--- a/source/text/shared/explorer/database/dabaadvpropdat.xhp
+++ b/source/text/sdatabase/dabaadvpropdat.xhp
@@ -21,14 +21,25 @@
 
   
  Special Settings
- /text/shared/explorer/database/dabaadvpropdat.xhp
+ /text/sdatabase/dabaadvpropdat.xhp
   


  
  
+ 
+ database;special settings
+ database settings;SQL92 naming
+ database settings;keyword AS
+ database settings;outer join syntax
+ database settings;special SELECT 
statements
+ database settings;ODBC date/time
+ database settings;support primary 
keys
+ database settings;line ends
+ database settings;version columns
+ 
   
- Special 
Settings
+ Special Settings
  Specifies the way you can work with data in a 
database.
   
   
diff --git a/source/text/shared/explorer/database/dabaadvpropgen.xhp 
b/source/text/sdatabase/dabaadvpropgen.xhp
similarity index 81%
rename from source/text/shared/explorer/database/dabaadvpropgen.xhp
rename to source/text/sdatabase/dabaadvpropgen.xhp
index 8627519bc..d9312dc5e 100644
--- a/source/text/shared/explorer/database/dabaadvpropgen.xhp
+++ b/source/text/sdatabase/dabaadvpropgen.xhp
@@ -1,6 +1,4 @@
 
-
-
 
-   
 
 
 
 Generated Values
-/text/shared/explorer/database/dabaadvpropgen.xhp
+/text/sdatabase/dabaadvpropgen.xhp
 
 
 Advanced Properties dialog Generated 
values tab page
 
 
 
+
+database advanced properties;autoincrement 
values
+database advanced properties;automatic generated 
values
+database advanced properties;retrieve generated 
values
+database advanced properties;query generated 
values
+
 
-Generated 
Values
+Generated 
Values
 Specifies the 
options for automatically generated values for new data records.UFI: 
all text copied from shared\explore

[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - sw/source

2021-06-09 Thread Miklos Vajna (via logerrit)
 sw/source/core/text/porrst.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6041add19bafabd48ad6f9ae6da3e1f7f537032c
Author: Miklos Vajna 
AuthorDate: Wed Jun 9 14:58:03 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 14:58:10 2021 +0200

sw: allow the height of a line to be larger than 65536 twips, fix two 
warnings

This was a mistake introduced by the vector-7.0 backport, the patch was
already warning-free on master.

Change-Id: Ie2d3ab2e6b92bc947a4f99ffd4cae9f5fd217d8d

diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 69183bc58557..259fd485a224 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -592,12 +592,12 @@ void SwControlCharPortion::Paint( const SwTextPaintInfo 
&rInf ) const
 aNewPos.AdjustY(deltaY);
 break;
 case 900:
-aNewPos.AdjustY(-deltaX);
+aNewPos.AdjustY(-static_cast(deltaX));
 aNewPos.AdjustX(deltaY);
 break;
 case 2700:
 aNewPos.AdjustY(deltaX);
-aNewPos.AdjustX(-deltaY);
+aNewPos.AdjustX(-static_cast(deltaY));
 break;
 default:
 assert(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/co-2021' - svx/uiconfig

2021-06-09 Thread Szymon Kłos (via logerrit)
 svx/uiconfig/ui/findreplacedialog-mobile.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4b5688d12870cb8138f6f6d81173a6c343bda87f
Author: Szymon Kłos 
AuthorDate: Wed Jun 9 12:06:28 2021 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 9 14:38:43 2021 +0200

jsdialog: hide adv search options on mobile

Change-Id: Ide206d602992c49a3a54c8635d97a1ce43cc216e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116912
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/svx/uiconfig/ui/findreplacedialog-mobile.ui 
b/svx/uiconfig/ui/findreplacedialog-mobile.ui
index 792e334a114d..0545a5e8c34e 100644
--- a/svx/uiconfig/ui/findreplacedialog-mobile.ui
+++ b/svx/uiconfig/ui/findreplacedialog-mobile.ui
@@ -642,7 +642,7 @@
 True
 
   
-True
+False
 True
 6
 1
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/vector/vector-7.0' - 2 commits - sw/qa sw/source

2021-06-09 Thread Miklos Vajna (via logerrit)
 sw/qa/core/text/data/line-height.fodt |   32 +++
 sw/qa/core/text/data/line-width.fodt  |   32 +++
 sw/qa/core/text/text.cxx  |   35 ++
 sw/source/core/edit/edattr.cxx|4 +--
 sw/source/core/inc/txtfrm.hxx |2 -
 sw/source/core/text/frmcrsr.cxx   |2 -
 sw/source/core/text/frmform.cxx   |8 +++
 sw/source/core/text/frmpaint.cxx  |4 +--
 sw/source/core/text/inftxt.cxx|4 +--
 sw/source/core/text/itrcrsr.cxx   |   22 ++---
 sw/source/core/text/itrform2.cxx  |   26 -
 sw/source/core/text/itrpaint.cxx  |   12 +--
 sw/source/core/text/itrtxt.cxx|   10 -
 sw/source/core/text/itrtxt.hxx|8 +++
 sw/source/core/text/porfld.cxx|8 +++
 sw/source/core/text/porfly.cxx|2 -
 sw/source/core/text/porglue.cxx   |2 -
 sw/source/core/text/porlay.cxx|6 ++---
 sw/source/core/text/porlay.hxx|6 ++---
 sw/source/core/text/porlin.cxx|2 -
 sw/source/core/text/porlin.hxx|   12 +--
 sw/source/core/text/pormulti.cxx  |   12 +--
 sw/source/core/text/pormulti.hxx  |2 -
 sw/source/core/text/possiz.hxx|   30 ++---
 sw/source/core/text/txtdrop.cxx   |   10 -
 sw/source/core/text/txtfrm.cxx|4 +--
 26 files changed, 198 insertions(+), 99 deletions(-)

New commits:
commit 9aa3b30c9b6e44af62f48f9a8f9beb2c713f962a
Author: Miklos Vajna 
AuthorDate: Wed Jun 9 09:09:16 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 14:24:53 2021 +0200

sw: allow the width of a line portion to be larger than 65536 twips

The line portion width can be quite large if the line contains an
as-char image.

Found by asking -fsanitize=implicit-unsigned-integer-truncation
-fsanitize=implicit-signed-integer-truncation to flag the problematic
conversions.

(cherry picked from commit 6fdd0a3f8b3448a9a246496191908c92156cc38b)

Conflicts:
sw/source/core/edit/edattr.cxx
sw/source/core/text/pormulti.hxx

Change-Id: I303b9c71dcd979d79b9c9aee5283b268cc4e3b8c

diff --git a/sw/qa/core/text/data/line-width.fodt 
b/sw/qa/core/text/data/line-width.fodt
new file mode 100644
index ..a6b2b2f5c62b
--- /dev/null
+++ b/sw/qa/core/text/data/line-width.fodt
@@ -0,0 +1,32 @@
+
+
+  
+
+
+  
+
+  
+  
+
+  
+  
+
+  iVBORw0KGgoNSUhEUgAAAEBACAQAYLlVBGdBTUEAALGPC/xhBQFz
+   UkdCAK7OHOkgY0hSTQAAeiYAAICEAAD6gOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+   AAJiS0dEAACqjSMyCW9GRnMGAAAMc1XTCXBIWXMAAA3XAAAN1wFCKJt4
+   CXZwQWcAAABMQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+   BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+   cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+   /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+   QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+   YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+   2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+   cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+   AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+   hOCNQr34oD4ldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+   5RscJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+   AABJRU5ErkJggg==
+  
+
+  
+
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index bbeb12780e05..23f3294b5303 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -94,6 +94,25 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLineHeight)
 assertXPath(pXmlDoc, "//fly/infos/bounds", "top", 
OUString::number(DOCUMENTBORDER));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLineWidth)
+{
+// Given a document with an as-char image, width in twips not fitting into 
sal_uInt16:
+SwDoc* pDoc = createDoc("line-width.fodt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+sal_Int32 nOldLeft = pWrtShell->GetCharRect().Left();
+
+// When moving the cursor to the right:
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+
+// Then make sure we move to the right by the image width:
+sal_Int32 nNewLeft = pWrtShell->GetCharRect().Left();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected greater than: 65536
+// - Actual  : 1872
+// i.e. the width (around 67408 twips) was truncated.
+CPPUNIT_ASSERT_GREATER(static_cast(65536), nNewLeft - nOldLeft);
+}
+
 CPPUNIT_PLUGIN_IMPLEME

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - vcl/jsdialog

2021-06-09 Thread Szymon Kłos (via logerrit)
 vcl/jsdialog/jsdialogbuilder.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 1584da76ab1c671ceacdefef438047ff4a71673e
Author: Szymon Kłos 
AuthorDate: Wed Jun 9 10:57:41 2021 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 9 14:03:15 2021 +0200

jsdialog: don't send update if not changed checkbox state

to avoid infinite updates in find & replace dialog

Change-Id: If9d26cec66f2b4475c89ba394b9597bc23881341
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116886
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index d9129c32fb74..6bc1248660d0 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1158,8 +1158,10 @@ JSCheckButton::JSCheckButton(JSDialogSender* pSender, 
::CheckBox* pCheckBox,
 
 void JSCheckButton::set_active(bool active)
 {
+bool bWasActive = get_active();
 SalInstanceCheckButton::set_active(active);
-sendUpdate();
+if (bWasActive != active)
+sendUpdate();
 }
 
 JSDrawingArea::JSDrawingArea(JSDialogSender* pSender, VclDrawingArea* 
pDrawingArea,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - vcl/inc vcl/jsdialog vcl/source

2021-06-09 Thread Szymon Kłos (via logerrit)
 vcl/inc/jsdialog/jsdialogbuilder.hxx |8 
 vcl/inc/salvtables.hxx   |   15 +++
 vcl/jsdialog/jsdialogbuilder.cxx |   17 +
 vcl/source/app/salvtables.cxx|   26 +-
 4 files changed, 49 insertions(+), 17 deletions(-)

New commits:
commit 8fb52d084e5ad9e9843568cdb8addf3593858908
Author: Szymon Kłos 
AuthorDate: Wed Jun 9 12:06:02 2021 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 9 14:02:59 2021 +0200

jsdialog: weld frame

Change-Id: I863022b0b1efc741626b0ba4a8a6183c169eaa85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116891
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx 
b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 0ca30d00c8b5..266d19272a18 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -252,6 +252,7 @@ public:
 virtual std::unique_ptr weld_expander(const OString& id) 
override;
 virtual std::unique_ptr weld_icon_view(const OString& id) 
override;
 virtual std::unique_ptr weld_radio_button(const 
OString& id) override;
+virtual std::unique_ptr weld_frame(const OString& id) 
override;
 
 static weld::MessageDialog* CreateMessageDialog(weld::Widget* pParent,
 VclMessageType 
eMessageType,
@@ -600,4 +601,11 @@ public:
 virtual void set_active(bool active) override;
 };
 
+class JSFrame : public JSWidget
+{
+public:
+JSFrame(JSDialogSender* pSender, ::VclFrame* pFrame, SalInstanceBuilder* 
pBuilder,
+bool bTakeOwnership);
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 3a72d45e74be..d9129c32fb74 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -862,6 +862,17 @@ std::unique_ptr 
JSInstanceBuilder::weld_radio_button(const OS
 return pWeldWidget;
 }
 
+std::unique_ptr JSInstanceBuilder::weld_frame(const OString& id)
+{
+::VclFrame* pFrame = m_xBuilder->get<::VclFrame>(id);
+auto pWeldWidget = pFrame ? std::make_unique(this, pFrame, this, 
false) : nullptr;
+
+if (pWeldWidget)
+RememberWidget(id, pWeldWidget.get());
+
+return pWeldWidget;
+}
+
 weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* 
pParent,
 VclMessageType 
eMessageType,
 VclButtonsType 
eButtonType,
@@ -1388,4 +1399,10 @@ void JSRadioButton::set_active(bool active)
 sendUpdate();
 }
 
+JSFrame::JSFrame(JSDialogSender* pSender, ::VclFrame* pFrame, 
SalInstanceBuilder* pBuilder,
+ bool bTakeOwnership)
+: JSWidget(pSender, pFrame, pBuilder, 
bTakeOwnership)
+{
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
commit 5c1f4f0d43fcbc12a526a80643dc9ebb3871e623
Author: Szymon Kłos 
AuthorDate: Wed Jun 9 11:22:26 2021 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 9 14:02:46 2021 +0200

Move SalInstanceFrame decl to header file

Change-Id: I43b10e2314b81dc490714ad9fb809c1324fe17c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116890
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index 0b19f0729343..52b71320c332 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -1797,4 +1797,19 @@ public:
 virtual ~SalInstanceRadioButton() override;
 };
 
+class SalInstanceFrame : public SalInstanceContainer, public virtual 
weld::Frame
+{
+private:
+VclPtr m_xFrame;
+
+public:
+SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* pBuilder, bool 
bTakeOwnership);
+
+virtual void set_label(const OUString& rText) override;
+
+virtual OUString get_label() const override;
+
+virtual std::unique_ptr weld_label_widget() const override;
+};
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 7d7d28c6ec33..0501ff7fa359 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1954,27 +1954,19 @@ IMPL_LINK_NOARG(SalInstanceAssistant, 
UpdateRoadmap_Hdl, Timer*, void)
 enable_notify_events();
 }
 
-namespace
-{
-class SalInstanceFrame : public SalInstanceContainer, public virtual 
weld::Frame
+SalInstanceFrame::SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* 
pBuilder,
+   bool bTakeOwnership)
+: SalInstanceContainer(pFrame, pBuilder, bTakeOwnership)
+, m_xFrame(pFrame)
 {
-private:
-VclPtr m_xFrame;
-
-public:
-SalInstanceFrame(VclFrame* pFrame, SalInstanceBuilder* pBuilder, bool 
bTak

[Libreoffice-commits] core.git: comphelper/qa include/comphelper

2021-06-09 Thread Tor Lillqvist (via logerrit)
 comphelper/qa/unit/test_traceevent.cxx |6 +++---
 include/comphelper/traceevent.hxx  |2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f0a8d47aecf42b64f576601a947b1904b78b94de
Author: Tor Lillqvist 
AuthorDate: Mon May 24 14:37:46 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Jun 9 13:53:49 2021 +0200

Fix syntax error in the "arguments" of a TraceEvent

Change-Id: I68f94311d3e0527955b6ad8d5b49e4e564329e1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116054
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116848
Tested-by: Tor Lillqvist 

diff --git a/comphelper/qa/unit/test_traceevent.cxx 
b/comphelper/qa/unit/test_traceevent.cxx
index 37855b82d5d4..b6be38f02ca8 100644
--- a/comphelper/qa/unit/test_traceevent.cxx
+++ b/comphelper/qa/unit/test_traceevent.cxx
@@ -151,12 +151,12 @@ void TestTraceEvent::test()
 
CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async2.5\",\"ph\":\"b\",\"id\":1,"));
 
CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block2\",\"ph\":\"X\","));
 CPPUNIT_ASSERT(aEvents[3].startsWith(
-
"{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
+
"{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
 
CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async4in3\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block3\",\"ph\":\"X\","));
 
CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async2.5\",\"ph\":\"e\",\"id\":1,"));
 CPPUNIT_ASSERT(aEvents[7].startsWith(
-
"{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\",\"bar2\",\"tem2\",\"42\"},"));
+
"{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\":\"bar2\",\"tem2\":\"42\"},"));
 
CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"async5in4\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async6in5\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async6in5\",\"ph\":\"e\",\"id\":2,"));
@@ -166,7 +166,7 @@ void TestTraceEvent::test()
 
CPPUNIT_ASSERT(aEvents[14].startsWith("{\"name\":\"async4in3\",\"ph\":\"e\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[15].startsWith("{\"name\":\"async7in3\",\"ph\":\"e\",\"id\":2,"));
 CPPUNIT_ASSERT(aEvents[16].startsWith(
-
"{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
+
"{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\":\"bar\",\"tem\":\"42\"},"));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent);
diff --git a/include/comphelper/traceevent.hxx 
b/include/comphelper/traceevent.hxx
index 73c87e3767ac..6e614ec0552e 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -69,7 +69,7 @@ protected:
 sResult.append(',');
 sResult.append('"');
 sResult.append(i.first);
-sResult.append("\",\"");
+sResult.append("\":\"");
 sResult.append(i.second);
 sResult.append('"');
 first = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: comphelper/qa comphelper/source include/comphelper

2021-06-09 Thread Tor Lillqvist (via logerrit)
 comphelper/qa/unit/test_traceevent.cxx |   15 --
 comphelper/source/misc/traceevent.cxx  |9 +--
 include/comphelper/profilezone.hxx |9 +--
 include/comphelper/traceevent.hxx  |   82 -
 4 files changed, 77 insertions(+), 38 deletions(-)

New commits:
commit 6038c9125bcb9f6d5dc2b998f2bef476ba1b1f98
Author: Tor Lillqvist 
AuthorDate: Tue May 11 13:58:38 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Jun 9 13:49:31 2021 +0200

Add the possibility to include a set of arguments in Trace Events

Change-Id: I55720baf64bd9b719026c94e4373b6368a1a7106
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116847
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/comphelper/qa/unit/test_traceevent.cxx 
b/comphelper/qa/unit/test_traceevent.cxx
index 29094b14f01b..37855b82d5d4 100644
--- a/comphelper/qa/unit/test_traceevent.cxx
+++ b/comphelper/qa/unit/test_traceevent.cxx
@@ -74,7 +74,8 @@ void trace_event_test()
 CPPUNIT_ASSERT(pAsync2.expired());
 
 // This will generate a 'b' event for async3
-auto pAsync3(std::make_shared("async3"));
+std::map aArgsAsync3({ { "foo", "bar" }, { "tem", 
"42" } });
+auto pAsync3(std::make_shared("async3", 
aArgsAsync3));
 
 std::weak_ptr pAsync4;
 
@@ -92,7 +93,8 @@ void trace_event_test()
 comphelper::ProfileZone aZone4("test2");
 
 // This will generate an 'i' event for instant2"
-comphelper::TraceEvent::addInstantEvent("instant2");
+std::map aArgsInstant2({ { "foo2", "bar2" }, { 
"tem2", "42" } });
+comphelper::TraceEvent::addInstantEvent("instant2", aArgsInstant2);
 
 std::weak_ptr pAsync5;
 {
@@ -148,11 +150,13 @@ void TestTraceEvent::test()
 
CPPUNIT_ASSERT(aEvents[0].startsWith("{\"name:\"instant1\",\"ph\":\"i\","));
 
CPPUNIT_ASSERT(aEvents[1].startsWith("{\"name\":\"async2.5\",\"ph\":\"b\",\"id\":1,"));
 
CPPUNIT_ASSERT(aEvents[2].startsWith("{\"name\":\"block2\",\"ph\":\"X\","));
-
CPPUNIT_ASSERT(aEvents[3].startsWith("{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,"));
+CPPUNIT_ASSERT(aEvents[3].startsWith(
+
"{\"name\":\"async3\",\"ph\":\"b\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
 
CPPUNIT_ASSERT(aEvents[4].startsWith("{\"name\":\"async4in3\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[5].startsWith("{\"name\":\"block3\",\"ph\":\"X\","));
 
CPPUNIT_ASSERT(aEvents[6].startsWith("{\"name\":\"async2.5\",\"ph\":\"e\",\"id\":1,"));
-
CPPUNIT_ASSERT(aEvents[7].startsWith("{\"name:\"instant2\",\"ph\":\"i\","));
+CPPUNIT_ASSERT(aEvents[7].startsWith(
+
"{\"name:\"instant2\",\"ph\":\"i\",\"args\":{\"foo2\",\"bar2\",\"tem2\",\"42\"},"));
 
CPPUNIT_ASSERT(aEvents[8].startsWith("{\"name\":\"async5in4\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[9].startsWith("{\"name\":\"async6in5\",\"ph\":\"b\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[10].startsWith("{\"name\":\"async6in5\",\"ph\":\"e\",\"id\":2,"));
@@ -161,7 +165,8 @@ void TestTraceEvent::test()
 CPPUNIT_ASSERT(aEvents[13].startsWith("{\"name\":\"test2\",\"ph\":\"X\""));
 
CPPUNIT_ASSERT(aEvents[14].startsWith("{\"name\":\"async4in3\",\"ph\":\"e\",\"id\":2,"));
 
CPPUNIT_ASSERT(aEvents[15].startsWith("{\"name\":\"async7in3\",\"ph\":\"e\",\"id\":2,"));
-
CPPUNIT_ASSERT(aEvents[16].startsWith("{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,"));
+CPPUNIT_ASSERT(aEvents[16].startsWith(
+
"{\"name\":\"async3\",\"ph\":\"e\",\"id\":2,\"args\":{\"foo\",\"bar\",\"tem\",\"42\"},"));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(TestTraceEvent);
diff --git a/comphelper/source/misc/traceevent.cxx 
b/comphelper/source/misc/traceevent.cxx
index 3a2e1b012c4c..cd6d3929e27c 100644
--- a/comphelper/source/misc/traceevent.cxx
+++ b/comphelper/source/misc/traceevent.cxx
@@ -40,7 +40,7 @@ void TraceEvent::addRecording(const OUString& sObject)
 g_aRecording.emplace_back(sObject);
 }
 
-void TraceEvent::addInstantEvent(const char* sName)
+void TraceEvent::addInstantEvent(const char* sName, const std::map& args)
 {
 long long nNow = getNow();
 
@@ -54,9 +54,8 @@ void TraceEvent::addInstantEvent(const char* sName)
  "\"name:\""
  + OUString(sName, strlen(sName), RTL_TEXTENCODING_UTF8)
  + "\","
-   "\"ph\":\"i\","
-   "\"ts\":"
- + OUString::number(nNow)
+   "\"ph\":\"i\""
+ + createArgsString(args) + ",\"ts\":" + OUString::number(nNow)
  + ","
"\"pid\":"
  + OUString::number(nPid)
@@ -110,7 +109,7 @@ void ProfileZone::addRecording()
  + OUString::number(m_nCreateTime)
  + ","
"\"dur\":"
- + OUString::number(nNow - m_nCreateTime)
+  

[Libreoffice-commits] core.git: desktop/source

2021-06-09 Thread Tor Lillqvist (via logerrit)
 desktop/source/lib/init.cxx |   64 +---
 1 file changed, 37 insertions(+), 27 deletions(-)

New commits:
commit e4f5705b91ecacdfc84e564e116dfe812fd96b61
Author: Tor Lillqvist 
AuthorDate: Mon May 10 15:50:45 2021 +0300
Commit: Tor Lillqvist 
CommitDate: Wed Jun 9 13:44:01 2021 +0200

We must collect the Trace Events when recording them is turned on

Recording them can be turned on and off on-the-fly.

Also rename the class from ProfileZoneDumper to TraceEventDumper as
ProfileZones are just one special case of Trace Events.

Change-Id: I4928397937963c83ffe8022ba4fa941f81119e15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115332
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tor Lillqvist 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115593
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116846
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 77fb9e4baecc..d509643ce4d1 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -200,7 +200,38 @@ struct ExtensionMap
 const char *filterName;
 };
 
-}
+class TraceEventDumper : public AutoTimer
+{
+static const int dumpTimeoutMS = 5000;
+
+public:
+TraceEventDumper() : AutoTimer( "Trace Event dumper" )
+{
+SetTimeout(dumpTimeoutMS);
+Start();
+}
+virtual void Invoke() override
+{
+const css::uno::Sequence aEvents =
+comphelper::TraceEvent::getRecordingAndClear();
+OStringBuffer aOutput;
+for (const auto &s : aEvents)
+{
+aOutput.append(OUStringToOString(s, RTL_TEXTENCODING_UTF8));
+aOutput.append("\n");
+}
+if (aOutput.getLength() > 0)
+{
+OString aChunk = aOutput.makeStringAndClear();
+if (gImpl && gImpl->mpCallback)
+gImpl->mpCallback(LOK_CALLBACK_PROFILE_FRAME, aChunk.getStr(), 
gImpl->mpCallbackData);
+}
+}
+};
+
+} // unnamed namespace
+
+static TraceEventDumper *traceEventDumper = nullptr;
 
 const ExtensionMap aWriterExtensionMap[] =
 {
@@ -3852,7 +3883,11 @@ static void lo_setOption(LibreOfficeKit* /*pThis*/, 
const char *pOption, const c
 if (strcmp(pOption, "traceeventrecording") == 0)
 {
 if (strcmp(pValue, "start") == 0)
+{
 comphelper::TraceEvent::startRecording();
+if (traceEventDumper == nullptr)
+traceEventDumper = new TraceEventDumper();
+}
 else if (strcmp(pValue, "stop") == 0)
 comphelper::TraceEvent::stopRecording();
 }
@@ -6095,31 +6130,6 @@ static void preloadData()
 
 namespace {
 
-class ProfileZoneDumper : public AutoTimer
-{
-static const int dumpTimeoutMS = 5000;
-public:
-ProfileZoneDumper() : AutoTimer( "zone dumper" )
-{
-SetTimeout(dumpTimeoutMS);
-Start();
-}
-virtual void Invoke() override
-{
-const css::uno::Sequence aEvents =
-comphelper::TraceEvent::getRecordingAndClear();
-OStringBuffer aOutput;
-for (const auto &s : aEvents)
-{
-aOutput.append(OUStringToOString(s, RTL_TEXTENCODING_UTF8));
-aOutput.append("\n");
-}
-OString aChunk = aOutput.makeStringAndClear();
-if (gImpl && gImpl->mpCallback)
-gImpl->mpCallback(LOK_CALLBACK_PROFILE_FRAME, aChunk.getStr(), 
gImpl->mpCallbackData);
-}
-};
-
 static void activateNotebookbar(std::u16string_view rApp)
 {
 OUString aPath = 
OUString::Concat("org.openoffice.Office.UI.ToolbarMode/Applications/") + rApp;
@@ -6190,7 +6200,7 @@ static int lo_initialize(LibreOfficeKit* pThis, const 
char* pAppPath, const char
 if (bProfileZones && eStage == SECOND_INIT)
 {
 comphelper::TraceEvent::startRecording();
-new ProfileZoneDumper();
+traceEventDumper = new TraceEventDumper();
 }
 
 comphelper::ProfileZone aZone("lok-init");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-06-09 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/layout/layout.cxx  | 1371 
 sw/qa/extras/layout/layout2.cxx | 1340 ---
 2 files changed, 1371 insertions(+), 1340 deletions(-)

New commits:
commit 1c01bdd6c1fabf301218560d7d1d26dea6915827
Author: Xisco Fauli 
AuthorDate: Wed Jun 9 12:06:28 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 9 13:38:33 2021 +0200

sw_layoutwriter: split tests evenly

Before sw/qa/extras/layout/layout.cxx had 23 tests and
sw/qa/extras/layout/layout2.cxx 124. Now they have
81 and 66 respectively
Change-Id: Ib28824b4cbe6467c1e66ed29c99a3467dd9943f4

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

diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 1e8878da6887..4c69dc6dcf05 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -9,18 +9,49 @@
 
 #include 
 #include 
+#include 
+#include 
+#include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 
 constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/layout/data/";
 
@@ -2279,6 +2310,1346 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineTables)
 assertXPath(pXmlDoc, "/root/page[1]/body/txt[1]/Text[1]", "Portion", 
"foar");
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf109137)
+{
+createDoc("tdf109137.docx");
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+uno::Sequence 
aDescriptor(comphelper::InitPropertySequence({
+{ "FilterName", uno::Any(OUString("writer8")) },
+}));
+xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+loadURL(aTempFile.GetURL(), "tdf109137.odt");
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+// This was 0, the blue rectangle moved from the 1st to the 2nd page.
+assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly/notxt",
+/*nNumberOfNodes=*/1);
+}
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint72) { 
createDoc("forcepoint72-1.rtf"); }
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint75) { 
createDoc("forcepoint75-1.rtf"); }
+
+//just care it doesn't crash/assert
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepointFootnoteFrame)
+{
+createDoc("forcepoint-swfootnoteframe-1.rtf");
+}
+
+//FIXME: disabled after failing again with fixed layout
+//CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testForcepoint76) { 
createDoc("forcepoint76-1.rtf"); }
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf118058)
+{
+SwDoc* pDoc = createDoc("tdf118058.fodt");
+// This resulted in a layout loop.
+pDoc->getIDocumentLayoutAccess().GetCurrentViewShell()->CalcLayout();
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128611)
+{
+createDoc("tdf128611.fodt");
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+CPPUNIT_ASSERT(pXmlDoc);
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected: 1
+// - Actual  : 14
+// i.e. there were multiple portions in the first paragraph of the A1 
cell, which means that the
+// rotated text was broken into multiple lines without a good reason.
+assertXPath(pXmlDoc, "//tab/row/cell[1]/txt/Text", "Portion", "Abcd 
efghijkl");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf125893)
+{
+createDoc("tdf125893.docx");
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+// This was 400. The paragraph must have zero top border.
+assertXPath(pXmlDoc, "/root/page/body/txt[4]/infos/prtBounds", "top", "0");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf134463)
+{
+createDoc("tdf134463.docx");
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+// This was 621. The previous paragraph must have zero bottom border.
+assertXPath(pXmlDoc, "/root/page/body/txt[3]/infos/prtBounds", "top", 
"21");
+}
+
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf117188)
+{
+createDoc("tdf117188.docx");
+uno::Reference xStorable(mxComponent, uno::UNO_QUERY);
+utl::TempFile aTempFile;
+aTempFile.EnableKillingFile();
+uno::Sequence 
aDescriptor(comphelper::InitPropertySequence({
+{ "FilterName", uno::Any(OUString("writer8")) },
+}));
+xStorable->storeToURL(aTempFile.GetURL(), aDescriptor);
+loadURL(aTempFile.GetURL(), "tdf117188.odt");
+xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+OUString sWidth = getXPath(p

[Libreoffice-commits] core.git: framework/dtd i18npool/source officecfg/registry package/dtd xmerge/source xmloff/dtd xmlscript/dtd

2021-06-09 Thread Caolán McNamara (via logerrit)
 framework/dtd/accelerator.dtd  |1 -
 framework/dtd/event.dtd|1 -
 framework/dtd/groupuinames.dtd |1 -
 framework/dtd/image.dtd|1 -
 framework/dtd/menubar.dtd  |1 -
 framework/dtd/statusbar.dtd|1 -
 framework/dtd/toolbar.dtd  |1 -
 i18npool/source/localedata/data/locale.dtd |1 -
 officecfg/registry/component-schema.dtd|1 -
 officecfg/registry/component-update.dtd|1 -
 package/dtd/Manifest.dtd   |1 -
 xmerge/source/xmerge/converter.dtd |1 -
 xmloff/dtd/office.dtd  |1 -
 xmlscript/dtd/dialog.dtd   |1 -
 xmlscript/dtd/libraries.dtd|2 --
 xmlscript/dtd/library.dtd  |2 --
 xmlscript/dtd/module.dtd   |2 --
 17 files changed, 20 deletions(-)

New commits:
commit 160a4852f1d7487154d8cdd8881acd287d481b7f
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 10:20:57 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 12:41:53 2021 +0200

dtd files are not xml files and shouldn't have xml headers

so rpminspect is correct in complaining that they are not valid xml
on inspecting files claiming to be xml

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

diff --git a/framework/dtd/accelerator.dtd b/framework/dtd/accelerator.dtd
index f4dcac65242d..912b652d3cf5 100644
--- a/framework/dtd/accelerator.dtd
+++ b/framework/dtd/accelerator.dtd
@@ -1,4 +1,3 @@
-
 

[Libreoffice-commits] core.git: connectivity/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 connectivity/source/drivers/file/fcode.cxx |   30 +
 connectivity/source/drivers/file/fcomp.cxx |2 -
 connectivity/source/inc/file/fcode.hxx |2 -
 3 files changed, 8 insertions(+), 26 deletions(-)

New commits:
commit 5f9a90a939de600952707edeeb309c6badd757c6
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 15:16:12 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 12:26:26 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

The only read of aParamterName in the OOperandParam ctor had been commented 
out
and marked "todo" ever since at least 
8b1efd34bf563a1a8de9d7e78e52cdab8086cb38
"moved from ..\..\parse", so lets clean all of that effectively dead code 
away
completely for now, and just leave a comment for later.

Change-Id: Ia5ee51cd6c45e8bc50bdd4e892ed0a4dfdc690a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116839
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/connectivity/source/drivers/file/fcode.cxx 
b/connectivity/source/drivers/file/fcode.cxx
index 36cba4a73485..6e1a0cdf54e5 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -63,32 +63,14 @@ void OOperandValue::setValue(const ORowSetValue& _rVal)
 m_aValue = _rVal;
 }
 
-OOperandParam::OOperandParam(OSQLParseNode const * pNode, sal_Int32 _nPos)
+OOperandParam::OOperandParam(sal_Int32 _nPos)
 : OOperandRow(static_cast(_nPos), DataType::VARCHAR) 
// Standard-Type
 {
-OSL_ENSURE(SQL_ISRULE(pNode,parameter),"Argument is not a parameter");
-OSL_ENSURE(pNode->count() > 0,"Error in Parse Tree");
-OSQLParseNode *pMark = pNode->getChild(0);
-
-OUString aParameterName;
-if (SQL_ISPUNCTUATION(pMark, "?"))
-aParameterName = "?";
-else if (SQL_ISPUNCTUATION(pMark, ":"))
-aParameterName = pNode->getChild(1)->getTokenValue();
-else
-{
-SAL_WARN( "connectivity.drivers","Error in Parse Tree");
-}
-
-// set up Parameter-Column with default type, can be specified more 
precisely later using Describe-Parameter
-
-// save Identity (not especially necessary here, just for the sake of 
symmetry)
-
-// todo
-//  OColumn* pColumn = new 
OFILEColumn(aParameterName,eDBType,255,0,SQL_FLAGS_NULLALLOWED);
-//  rParamColumns->AddColumn(pColumn);
-
-// the value will be set just before the evaluation
+//TODO: Actually do something here (the current state of OOperandParam 
appears to be "the
+// remains of the very beginnings of a never finished implementation of 
support for parameters
+// in this code", as Lionel put it in the comments at 
 
"-Werror,-Wunused-but-set-variable
+// (Clang 13 trunk)").
 }
 
 
diff --git a/connectivity/source/drivers/file/fcomp.cxx 
b/connectivity/source/drivers/file/fcomp.cxx
index 44d175be69f3..be01a70ed360 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -457,7 +457,7 @@ OOperand* OPredicateCompiler::execute_Operand(OSQLParseNode 
const * pPredicateNo
 }
 else if (SQL_ISRULE(pPredicateNode,parameter))
 {
-pOperand = new OOperandParam(pPredicateNode, ++m_nParamCounter);
+pOperand = new OOperandParam(++m_nParamCounter);
 }
 else if (pPredicateNode->getNodeType() == SQLNodeType::String ||
  pPredicateNode->getNodeType() == SQLNodeType::IntNum ||
diff --git a/connectivity/source/inc/file/fcode.hxx 
b/connectivity/source/inc/file/fcode.hxx
index f1b4e55815ff..c78461743c27 100644
--- a/connectivity/source/inc/file/fcode.hxx
+++ b/connectivity/source/inc/file/fcode.hxx
@@ -96,7 +96,7 @@ namespace connectivity
 class OOperandParam : public OOperandRow
 {
 public:
-OOperandParam(connectivity::OSQLParseNode const * pNode, sal_Int32 
_nPos);
+OOperandParam(sal_Int32 _nPos);
 };
 
 // Value operands
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: dbaccess/uiconfig

2021-06-09 Thread Caolán McNamara (via logerrit)
 dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c3325e8d7eae59ba1064546038ea2c6abeed9db6
Author: Caolán McNamara 
AuthorDate: Wed Jun 9 09:35:28 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 11:55:31 2021 +0200

xmllint: Namespace prefix menu on menuseparator is not defined

xmllint --noout dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml
dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml:24: namespace error : 
Namespace prefix menu on menuseparator is not defined
 

should be a toolbarseparator here

a problem since...

commit 4f810905fa74128871f2fe924a3d28a79f4e4261
Date:   Tue Mar 5 15:42:19 2019 +0100

sync dbaccess ui files with swriter ui file structure

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

diff --git a/dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml 
b/dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml
index b3c2c9c37eef..78e698df3883 100644
--- a/dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml
+++ b/dbaccess/uiconfig/dbapp/toolbar/formobjectbar.xml
@@ -21,7 +21,7 @@
  
  
  
- 
+ 
  
  
  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-06-09 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/ww8export/data/tdf96840.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx|6 ++
 2 files changed, 6 insertions(+)

New commits:
commit 975488594fc88aaba7298448e0ff727ebca7fe85
Author: Xisco Fauli 
AuthorDate: Wed Jun 9 10:14:31 2021 +0200
Commit: Xisco Fauli 
CommitDate: Wed Jun 9 11:30:23 2021 +0200

tdf#96840: sw_ww8export3: Add unittest

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

diff --git a/sw/qa/extras/ww8export/data/tdf96840.doc 
b/sw/qa/extras/ww8export/data/tdf96840.doc
new file mode 100644
index ..02cc7559dd55
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf96840.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index a0b46cdee465..ecf30b99806b 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -268,6 +268,12 @@ DECLARE_WW8EXPORT_TEST(testTdf122460_header, 
"tdf122460_header.odt")
 CPPUNIT_ASSERT(headerIsOn);
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf96840, "tdf96840.doc")
+{
+// Without the fix in place, this test would have hung at import time
+CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf139495_tinyHeader, "tdf139495_tinyHeader.doc")
 {
 // In Word 2003, this is one page, but definitely not six pages.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2021-06-09 Thread Oleg Shchelykalnov (via logerrit)
 sw/qa/extras/txtencexport/txtencexport.cxx |2 +-
 sw/source/filter/ascii/wrtasc.cxx  |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit b5e07b1339f73841664b28c65639f1638bd7edf4
Author: Oleg Shchelykalnov 
AuthorDate: Wed May 26 22:11:49 2021 +0300
Commit: Michael Stahl 
CommitDate: Wed Jun 9 11:10:01 2021 +0200

tdf#137469 Implement and test excluding hidden text in text filter

Uses filter options to manage whether hidden text output to file.
Fixes filter options usage in test.

Change-Id: I12a234438730795df6dd11bd6707dfa1fbfa4740
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105631
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/txtencexport/txtencexport.cxx 
b/sw/qa/extras/txtencexport/txtencexport.cxx
index ec9fa697e9d1..bce9b81b4564 100644
--- a/sw/qa/extras/txtencexport/txtencexport.cxx
+++ b/sw/qa/extras/txtencexport/txtencexport.cxx
@@ -86,7 +86,7 @@ DECLARE_TXTENCEXPORT_TEST(testBulletsHidden, "bullets.odt", 
"UTF8,false", Tx
 "2. Second" SAL_NEWLINE_STRING "1. Second-first" 
SAL_NEWLINE_STRING
 "   Third, but deleted" SAL_NEWLINE_STRING "3. Actual third" 
SAL_NEWLINE_STRING
 "" SAL_NEWLINE_STRING "Paragraph after numbering" SAL_NEWLINE_STRING
-"Next paragraph" SAL_NEWLINE_STRING "Hidden paragraph" 
SAL_NEWLINE_STRING
+"Next paragraph" SAL_NEWLINE_STRING
 "Final paragraph" SAL_NEWLINE_STRING,
 RTL_TEXTENCODING_UTF8);
 
diff --git a/sw/source/filter/ascii/wrtasc.cxx 
b/sw/source/filter/ascii/wrtasc.cxx
index f122e51f6d5c..1bba438e87e8 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -87,6 +87,7 @@ SwASCWriter::~SwASCWriter() {}
 ErrCode SwASCWriter::WriteStream()
 {
 bool bIncludeBOM = GetAsciiOptions().GetIncludeBOM();
+bool bIncludeHidden = GetAsciiOptions().GetIncludeHidden();
 
 if( m_bASCII_ParaAsCR )   // If predefined
 m_sLineEnd = "\015";
@@ -149,7 +150,7 @@ ErrCode SwASCWriter::WriteStream()
 continue;   // reset while loop!
 }
 }
-else
+else if (!pNd->IsHidden() || bIncludeHidden)
 {
 if (bWriteSttTag)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: solenv/clang-format sw/CppunitTest_sw_txtencexport.mk sw/Module_sw.mk sw/qa

2021-06-09 Thread Oleg Shchelykalnov (via logerrit)
 solenv/clang-format/excludelist|1 
 sw/CppunitTest_sw_txtencexport.mk  |   63 ++
 sw/Module_sw.mk|1 
 sw/qa/extras/txtencexport/data/bullets.odt |binary
 sw/qa/extras/txtencexport/txtencexport.cxx |  101 +
 5 files changed, 166 insertions(+)

New commits:
commit c96b61f86ef3f4cdc34f84043fed2724b6d9732b
Author: Oleg Shchelykalnov 
AuthorDate: Wed May 26 18:20:06 2021 +0300
Commit: Michael Stahl 
CommitDate: Wed Jun 9 11:09:15 2021 +0200

tdf#137469 Prepare tests for encoded text filter

Change-Id: Ifba71748cc389544bfb64e225a7020de8261967b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105621
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index ec136c66d917..13a5f25ac5ff 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -12332,6 +12332,7 @@ sw/qa/extras/ooxmlexport/ooxmlfieldexport.cxx
 sw/qa/extras/ooxmlexport/ooxmlw14export.cxx
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx
 sw/qa/extras/tiledrendering/tiledrendering.cxx
+sw/qa/extras/txtencexport/txtencexport.cxx
 sw/qa/extras/uiwriter/uiwriter.cxx
 sw/qa/extras/ww8export/ww8export.cxx
 sw/qa/extras/ww8export/ww8export2.cxx
diff --git a/sw/CppunitTest_sw_txtencexport.mk 
b/sw/CppunitTest_sw_txtencexport.mk
new file mode 100644
index ..1f37a8eba4c8
--- /dev/null
+++ b/sw/CppunitTest_sw_txtencexport.mk
@@ -0,0 +1,63 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_txtencexport))
+
+$(eval $(call gb_CppunitTest_use_common_precompiled_header,sw_txtencexport))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_txtencexport, \
+sw/qa/extras/txtencexport/txtencexport \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_txtencexport, \
+comphelper \
+cppu \
+cppuhelper \
+i18nlangtag \
+sal \
+sfx \
+sw \
+swqahelper \
+test \
+tl \
+unotest \
+utl \
+vcl \
+$(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_txtencexport,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_txtencexport,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_txtencexport,\
+udkapi \
+offapi \
+oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_txtencexport))
+$(eval $(call gb_CppunitTest_use_vcl,sw_txtencexport))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_txtencexport,services))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_txtencexport))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 80cad58b1bdc..28782147fb9e 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_odfexport2 \
 CppunitTest_sw_odfimport \
 CppunitTest_sw_txtexport \
+CppunitTest_sw_txtencexport \
 CppunitTest_sw_txtimport \
 $(if $(filter-out MACOSX,$(OS)), \
 CppunitTest_sw_uiwriter \
diff --git a/sw/qa/extras/txtencexport/data/bullets.odt 
b/sw/qa/extras/txtencexport/data/bullets.odt
new file mode 100644
index ..aec2b52cbd27
Binary files /dev/null and b/sw/qa/extras/txtencexport/data/bullets.odt differ
diff --git a/sw/qa/extras/txtencexport/txtencexport.cxx 
b/sw/qa/extras/txtencexport/txtencexport.cxx
new file mode 100644
index ..ec9fa697e9d1
--- /dev/null
+++ b/sw/qa/extras/txtencexport/txtencexport.cxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include 
+
+#include 
+
+class TxtEncExportTest : public SwModelTestBase
+{
+public:
+TxtEncExportTest(const OUString & rFilterOptions)
+: SwModelTestBase("/sw/qa/extras/txtencexport/data/", "Text (encoded)")
+{
+setFilterOptions(rFilterOptions);
+}
+
+protected:
+OString readExportedFile()
+{
+SvMemoryStream aMemoryStream;
+SvFileStream aStream(maTempFile.GetURL(), StreamMode::READ);
+aStream.ReadStre

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

2021-06-09 Thread Gabriel Masei (via logerrit)
 vcl/source/window/mouse.cxx   |   19 ++--
 vcl/source/window/toolbox.cxx |2 -
 vcl/source/window/winproc.cxx |   47 +-
 3 files changed, 42 insertions(+), 26 deletions(-)

New commits:
commit 54916b178bdee9be0f3faef7b62aa735cb3d3ab5
Author: Gabriel Masei 
AuthorDate: Fri May 28 14:37:52 2021 +0300
Commit: Dennis Francis 
CommitDate: Wed Jun 9 11:01:04 2021 +0200

vcl: check mpWindowImpl before referencing it

Fixed some cases generating crashes because mpWindowImpl was not checked 
for nullptr.

Conflicts:
vcl/source/window/toolbox.cxx

Change-Id: I5540f9f21a870b02655b5bf2afdbf3a8153c1519
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116330
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116774
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gabriel Masei 
Reviewed-by: Dennis Francis 

diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx
index 47116725856f..663da0ff872c 100644
--- a/vcl/source/window/mouse.cxx
+++ b/vcl/source/window/mouse.cxx
@@ -253,7 +253,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 
 bool bAsyncFocusWaiting = false;
 vcl::Window *pFrame = pSVData->maFrameData.mpFirstFrame;
-while( pFrame  )
+while( pFrame && pFrame->mpWindowImpl && pFrame->mpWindowImpl->mpFrameData 
)
 {
 if( pFrame != mpWindowImpl->mpFrameWindow.get() && 
pFrame->mpWindowImpl->mpFrameData->mnFocusId )
 {
@@ -276,6 +276,8 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 bMustNotGrabFocus = true;
 break;
 }
+if (!pParent->mpWindowImpl)
+break;
 pParent = pParent->mpWindowImpl->mpParent;
 }
 
@@ -333,13 +335,16 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags )
 else
 {
 vcl::Window* pNewOverlapWindow = ImplGetFirstOverlapWindow();
-vcl::Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
-pNewOverlapWindow->mpWindowImpl->mbActive = true;
-pNewOverlapWindow->Activate();
-if ( pNewRealWindow != pNewOverlapWindow )
+if ( pNewOverlapWindow && pNewOverlapWindow->mpWindowImpl )
 {
-pNewRealWindow->mpWindowImpl->mbActive = true;
-pNewRealWindow->Activate();
+vcl::Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
+pNewOverlapWindow->mpWindowImpl->mbActive = true;
+pNewOverlapWindow->Activate();
+if ( pNewRealWindow != pNewOverlapWindow  && pNewRealWindow && 
pNewRealWindow->mpWindowImpl )
+{
+pNewRealWindow->mpWindowImpl->mbActive = true;
+pNewRealWindow->Activate();
+}
 }
 }
 
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index ef8641986555..0d22f446dea7 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -3209,7 +3209,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt )
 // and do not highlight when focus is in a different toolbox
 bool bDrawHotSpot = true;
 vcl::Window *pWin = Application::GetFocusWindow();
-if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this )
+if( pWin && pWin->ImplGetWindowImpl() && 
pWin->ImplGetWindowImpl()->mbToolBox && pWin != this )
 bDrawHotSpot = false;
 
 if ( mbSelection && bDrawHotSpot )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 31620bc6a0ac..4dea82046299 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -814,17 +814,20 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* 
pWindow )
 vcl::Window* pChild = pSVData->mpWinData->mpFirstFloat;
 while (pChild)
 {
-if (pChild->ImplGetWindowImpl()->mbFloatWin)
+if (pChild->ImplGetWindowImpl())
 {
-if (static_cast(pChild)->GrabsFocus())
-break;
-}
-else if (pChild->ImplGetWindowImpl()->mbDockWin)
-{
-vcl::Window* pParent = 
pChild->GetWindow(GetWindowType::RealParent);
-if (pParent && pParent->ImplGetWindowImpl()->mbFloatWin &&
-static_cast(pParent)->GrabsFocus())
-break;
+if (pChild->ImplGetWindowImpl()->mbFloatWin)
+{
+if (static_cast(pChild)->GrabsFocus())
+break;
+}
+else if (pChild->ImplGetWindowImpl()->mbDockWin)
+{
+vcl::Window* pParent = 
pChild->GetWindow(GetWindowType::RealParent);
+if (pParent && pParent->ImplGetWindowImpl()->mbFloatWin &&
+static_cast(pParent)->GrabsFocus())
+break;
+}
 }
 pChild = pChild->GetParent();
 }
@@ -832,7 +835,7 @@ static vcl::Window* ImplGetKeyInputWi

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source sc/uiconfig sd/source sd/uiconfig sd/UIConfig_simpress.mk sw/source sw/uiconfig

2021-06-09 Thread Szymon Kłos (via logerrit)
 sc/source/ui/sidebar/CellLineStyleControl.cxx   |2 -
 sc/uiconfig/scalc/ui/floatinglinestyle.ui   |2 -
 sd/UIConfig_simpress.mk |2 +
 sd/source/ui/sidebar/AllMasterPagesSelector.cxx |2 -
 sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx |2 -
 sd/source/ui/sidebar/LayoutMenu.cxx |2 -
 sd/source/ui/sidebar/MasterPagesSelector.cxx|8 --
 sd/source/ui/sidebar/MasterPagesSelector.hxx|4 ++-
 sd/source/ui/sidebar/RecentMasterPagesSelector.cxx  |2 -
 sd/uiconfig/simpress/ui/layoutpanel.ui  |2 -
 sd/uiconfig/simpress/ui/masterpagepanel.ui  |2 -
 sd/uiconfig/simpress/ui/masterpagepanelall.ui   |   25 
 sd/uiconfig/simpress/ui/masterpagepanelrecent.ui|   25 
 sw/source/uibase/sidebar/PageSizeControl.cxx|2 -
 sw/uiconfig/swriter/ui/pagesizecontrol.ui   |2 -
 15 files changed, 70 insertions(+), 14 deletions(-)

New commits:
commit dc5ede6280b6d66e5bfe4cafe6bb7c12d4173233
Author: Szymon Kłos 
AuthorDate: Tue Jun 8 14:05:14 2021 +0200
Commit: Szymon Kłos 
CommitDate: Wed Jun 9 10:49:53 2021 +0200

jsdialog: sidebar: avoid duplicated widget ids

all controls for sidebar goes to the same window id
we need different names for every widget so
create valuesets with different name every time

Change-Id: I69074e607bfe5fa6db665c0dbcae1f029d13a161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116836
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx 
b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index beae25ff03bd..5c4b7767cd55 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -36,7 +36,7 @@ CellLineStylePopup::CellLineStylePopup(weld::Toolbar* 
pParent, const OString& rI
 , maToolButton(pParent, rId)
 , mpDispatcher(pDispatcher)
 , mxCellLineStyleValueSet(new sc::sidebar::CellLineStyleValueSet)
-, mxCellLineStyleValueSetWin(new weld::CustomWeld(*m_xBuilder, "valueset", 
*mxCellLineStyleValueSet))
+, mxCellLineStyleValueSetWin(new weld::CustomWeld(*m_xBuilder, 
"linestylevalueset", *mxCellLineStyleValueSet))
 , mxPushButtonMoreOptions(m_xBuilder->weld_button("more"))
 {
 Initialize();
diff --git a/sc/uiconfig/scalc/ui/floatinglinestyle.ui 
b/sc/uiconfig/scalc/ui/floatinglinestyle.ui
index f18f610b62ad..9f5cd374a9f4 100644
--- a/sc/uiconfig/scalc/ui/floatinglinestyle.ui
+++ b/sc/uiconfig/scalc/ui/floatinglinestyle.ui
@@ -48,7 +48,7 @@
 True
 False
 
-  
+  
 True
 True
 True
diff --git a/sd/UIConfig_simpress.mk b/sd/UIConfig_simpress.mk
index e645d21fdb40..cca2113b61b0 100644
--- a/sd/UIConfig_simpress.mk
+++ b/sd/UIConfig_simpress.mk
@@ -135,6 +135,8 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/masterlayoutdlg \
sd/uiconfig/simpress/ui/mastermenu \
sd/uiconfig/simpress/ui/masterpagepanel \
+   sd/uiconfig/simpress/ui/masterpagepanelall \
+   sd/uiconfig/simpress/ui/masterpagepanelrecent \
sd/uiconfig/simpress/ui/navigatorpanel \
sd/uiconfig/simpress/ui/notebookbar \
sd/uiconfig/simpress/ui/notebookbar_compact \
diff --git a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx 
b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
index 21fbff298633..76e056120ec8 100644
--- a/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/AllMasterPagesSelector.cxx
@@ -103,7 +103,7 @@ AllMasterPagesSelector::AllMasterPagesSelector (
 ViewShellBase& rBase,
 const std::shared_ptr& rpContainer,
 const css::uno::Reference& rxSidebar)
-: MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar),
+: MasterPagesSelector(pParent, rDocument, rBase, rpContainer, rxSidebar, 
"modules/simpress/ui/masterpagepanelall.ui", "allvalueset"),
   mpSortedMasterPages(new SortedMasterPageDescriptorList())
 {
 MasterPagesSelector::Fill();
diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx 
b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
index 3a7f691ad804..90587b793cd4 100644
--- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx
@@ -66,7 +66,7 @@ CurrentMasterPagesSelector::CurrentMasterPagesSelector (
 ViewShellBase& rBase,
 const std::shared_ptr& rpContainer,
 const css::uno::Reference& rxSidebar)
-: MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar)
+: MasterPagesSelector (pParent, rDocument, rBase, rpContainer, rxSidebar, 
"modules/simpress/ui/masterpagepanel.ui", "usedvalueset")
 {
 Link a

[Libreoffice-commits] core.git: i18npool/source linguistic/source oox/source package/source

2021-06-09 Thread Julien Nabet (via logerrit)
 i18npool/source/localedata/localedata.cxx  |   39 
+++---
 i18npool/source/transliteration/transliteration_Ignore.cxx |   18 
 i18npool/source/transliteration/transliteration_body.cxx   |5 -
 i18npool/source/transliteration/transliteration_caseignore.cxx |   12 ---
 linguistic/source/gciterator.cxx   |9 --
 oox/source/drawingml/textparagraphproperties.cxx   |3 
 oox/source/export/drawingml.cxx|   19 ++--
 oox/source/ppt/pptfilterhelpers.cxx|   10 +-
 package/source/zippackage/ZipPackage.cxx   |   16 +---
 9 files changed, 44 insertions(+), 87 deletions(-)

New commits:
commit 7af40a445551a07c6918f835da20ca461a6bd4ee
Author: Julien Nabet 
AuthorDate: Tue Jun 8 21:39:34 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 10:49:26 2021 +0200

Simplify Sequences initializations (i*->p*)

Change-Id: I6bf0eaa2233de2487d90a2f9ae7de263b4ddf1bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116865
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/i18npool/source/localedata/localedata.cxx 
b/i18npool/source/localedata/localedata.cxx
index 0f3b03a2689a..33da5647adc3 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -784,8 +784,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale )
 return calendarsSeq;
 }
 else {
-Sequence< Calendar2 > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -828,8 +827,7 @@ LocaleDataImpl::getAllCurrencies2( const Locale& rLocale )
 return seq;
 }
 else {
-Sequence< Currency2 > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -910,8 +908,7 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& 
rLocale )
 }
 else
 {
-Sequence< OUString > seq(0);
-return seq;
+return {};
 }
 }
 
@@ -954,8 +951,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& 
rLocale )
 return seq;
 }
 else {
-Sequence< Implementation > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -974,8 +970,7 @@ LocaleDataImpl::getCollationOptions( const Locale& rLocale )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -994,8 +989,7 @@ LocaleDataImpl::getSearchOptions( const Locale& rLocale )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1023,8 +1017,7 @@ LocaleDataImpl::getIndexAlgorithm( const Locale& rLocale )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1108,8 +1101,7 @@ LocaleDataImpl::getUnicodeScripts( const Locale& rLocale )
 return seq;
 }
 else {
-Sequence< UnicodeScript > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1128,8 +1120,7 @@ LocaleDataImpl::getFollowPageWords( const Locale& rLocale 
)
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1150,8 +1141,7 @@ LocaleDataImpl::getTransliterations( const Locale& 
rLocale )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 
 
@@ -1229,8 +1219,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& 
rLocale  )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1251,8 +1240,7 @@ LocaleDataImpl::getReservedWord( const Locale& rLocale  )
 return seq;
 }
 else {
-Sequence< OUString > seq1(0);
-return seq1;
+return {};
 }
 }
 
@@ -1427,8 +1415,7 @@ LocaleDataImpl::getOutlineNumberingLevels( const 
lang::Locale& rLocale )
 return aRet;
 }
 else {
-Sequence< Reference > seq1(0);
-return seq1;
+return {};
 }
 }
 
diff --git a/i18npool/source/transliteration/transliteration_Ignore.cxx 
b/i18npool/source/transliteration/transliteration_Ignore.cxx
index 946e2979b0da..c3faeb11ed0f 100644
--- a/i18npool/source/transliteration/transliteration_Ignore.cxx
+++ b/i18npool/source/transliteration/transliteration_Ignore.cxx
@@ -66,10 +66,7 @@ transliteration_Ignore::transliterateRange( const OUString& 
str1, const OUString
 if (str1.isEmpty() || str2.isEmpty())
 throw RuntimeException();
 
-Sequence< OUString > r(2);
-r[0] = str1.copy(0, 1);
-r[1] = str2.copy(0, 1);
-return r;
+return { str1.copy(0, 1), str2.copy(0, 1) };
 }
 
 
@@ -103,18 +100,9 @@ transliteration_Ignore::transliterateRange( const 
OUString& str1, const OUString
 OUString s22 = t2.transliterat

[Libreoffice-commits] core.git: external/pdfium

2021-06-09 Thread Stephan Bergmann (via logerrit)
 external/pdfium/gcc-c++20-comparison.patch |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 07a09195adc65722207390e355a202100bc608ff
Author: Stephan Bergmann 
AuthorDate: Wed Jun 9 09:33:25 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 10:48:11 2021 +0200

external/pdfium: Latest MSVC now needs the GCC workaround, too

...or else a build with MS VS 2019 16.10.0 and --with-latest-c++ would 
cause a
stack overflow during CppunitTest_xmlsecurity_pdfsigning in the same way as
described at 6391e3c4dcd4d61c2f95f996e797e49b5586dbd1 "external/pdfium: Work
around GCC C++20 recursive comparison issue".  Interestingly, builds with 
recent
Clang (on various platforms) and --with-latest-c++ do not run into that 
stack
overflow issue, so it appears that Clang implements subtly different rules 
for
C++20 and beyond here than do GCC and MSVC.  (The GCC issue
 "c++20 rewritten 
operator==
recursive call mixing friend and external operators for template class"
mentioned in external/pdfium/UnpackedTarball_pdfium.mk may not be the most
accurate description of the precise issue at hand here, but lets keep it at 
that
for now.  Its comments do mention "that some people are going to try and 
change
the rules to avoid breaking code like this.")

But regardless of what the exact rules are for C++20 and beyond, these
problematic overloads are only needed for C++17 and earlier anyway, as 
C++20 can
cover them with automatic rewrites of other operators.  So lets generally
disable them for C++20 and beyond.

Change-Id: I99033d6f09f069f00a6916ef40fd03dd4962a5c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116882
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/pdfium/gcc-c++20-comparison.patch 
b/external/pdfium/gcc-c++20-comparison.patch
index e81cb4fe2aa7..0895ea8b5f9d 100644
--- a/external/pdfium/gcc-c++20-comparison.patch
+++ b/external/pdfium/gcc-c++20-comparison.patch
@@ -4,7 +4,7 @@
mutable intptr_t m_nRefCount = 0;
  };
  
-+#if !(defined __GNUC__ && !defined __clang__ && __cplusplus > 201703L)
++#if __cplusplus < 202002L
  template 
  inline bool operator==(const U* lhs, const RetainPtr& rhs) {
return rhs == lhs;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: reportdesign/source

2021-06-09 Thread Julien Nabet (via logerrit)
 reportdesign/source/ui/inspection/DataProviderHandler.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 92556e330ede97e11ae2cbc487bb298e6bbcb6bf
Author: Julien Nabet 
AuthorDate: Wed Jun 9 09:18:20 2021 +0200
Commit: Julien Nabet 
CommitDate: Wed Jun 9 10:22:39 2021 +0200

Even more simplification in initializations (reportdesign)

following 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=bd536744ec947090819d59e0f0ec9f2c454aa428
author  Julien Nabet   2021-06-08 22:00:41 +0200
committer   Julien Nabet   2021-06-09 07:43:32 
+0200
commit  bd536744ec947090819d59e0f0ec9f2c454aa428 (patch)
treec970950805e3953e5b7c663fa8095cbd20beb737
parent  96f8ed6619a73655f9c3b94e6a4a3979cc67f551 (diff)
Simplify Sequences initializations (reportdesign)

Thank you Mike!

Change-Id: Ib1dbcb3def89c2060534e30304cd8f35e5486efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116880
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx 
b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index ef1c58ada24f..d9665d6883dc 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -226,8 +226,7 @@ void DataProviderHandler::impl_updateChartTitle_throw(const 
uno::Any& _aValue)
 OUString sStr;
 _aValue >>= sStr;
 xFormatted->setString(sStr);
-uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs { 
xFormatted };
-xTitle->setText(aArgs);
+xTitle->setText({ xFormatted });
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: vcl/unx

2021-06-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |   62 ++-
 vcl/unx/gtk4/convert3to4.cxx |   22 ++-
 2 files changed, 48 insertions(+), 36 deletions(-)

New commits:
commit 49dfd2245b58c5b7e2c2115bb68d5f40289d40fb
Author: Caolán McNamara 
AuthorDate: Tue Jun 8 20:32:49 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 10:15:17 2021 +0200

gtk4: implement some more of the menu requirements

just give each radiobutton its own group

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 470ada586aa2..270f50e17e13 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9419,9 +9419,6 @@ private:
 {
 clear_actions();
 
-m_aActionEntries.push_back({"action", action_activated, "s", nullptr, 
nullptr, {}});
-m_aInsertedActions.insert("action");
-
 GtkPopover* pPopover = gtk_menu_button_get_popover(m_pMenuButton);
 if (GMenuModel* pMenuModel = GTK_IS_POPOVER_MENU(pPopover) ?
  
gtk_popover_menu_get_menu_model(GTK_POPOVER_MENU(pPopover)) :
@@ -9442,7 +9439,10 @@ private:
 {
 // the const char* arg isn't copied by anything so it 
must continue to exist for the life time of
 // the action group
-m_aActionEntries.push_back({res.first->getStr(), 
action_activated, "s", "'none'", nullptr, {}});
+if (sAction.startsWith("radio."))
+m_aActionEntries.push_back({res.first->getStr(), 
action_activated, "s", "'none'", nullptr, {}});
+else
+m_aActionEntries.push_back({res.first->getStr(), 
action_activated, "s", nullptr, nullptr, {}});
 }
 
 g_free(id);
@@ -9606,9 +9606,28 @@ public:
 #if !GTK_CHECK_VERSION(4, 0, 0)
 MenuHelper::insert_item(pos, rId, rStr, pIconName, pImageSurface, 
eCheckRadioFalse);
 #else
-// TODO see g_menu_item_set_action_and_target
-(void)pos; (void)rId; (void) rStr; (void)pIconName; 
(void)pImageSurface; (void)eCheckRadioFalse;
-std::abort();
+(void)pIconName; (void)pImageSurface;
+
+GtkPopover* pPopover = gtk_menu_button_get_popover(m_pMenuButton);
+if (GMenuModel* pMenuModel = GTK_IS_POPOVER_MENU(pPopover) ?
+ 
gtk_popover_menu_get_menu_model(GTK_POPOVER_MENU(pPopover)) :
+ nullptr)
+{
+GMenu* pMenu = G_MENU(pMenuModel);
+// action with a target value ... the action name and target value 
are separated by a double
+// colon ... For example: "app.action::target"
+OUString sActionAndTarget;
+if (eCheckRadioFalse == TRISTATE_INDET)
+sActionAndTarget = "menu.normal." + rId + "::" + rId;
+else
+sActionAndTarget = "menu.radio." + rId + "::" + rId;
+g_menu_insert(pMenu, pos, MapToGtkAccelerator(rStr).getStr(), 
sActionAndTarget.toUtf8().getStr());
+
+assert(eCheckRadioFalse == TRISTATE_INDET); // come back to this 
later
+
+// TODO not redo entire group
+update_action_group_from_popover_model();
+}
 #endif
 }
 
@@ -9617,8 +9636,17 @@ public:
 #if !GTK_CHECK_VERSION(4, 0, 0)
 MenuHelper::insert_separator(pos, rId);
 #else
-(void)pos; (void)rId;
-std::abort();
+(void)rId;
+
+GtkPopover* pPopover = gtk_menu_button_get_popover(m_pMenuButton);
+if (GMenuModel* pMenuModel = GTK_IS_POPOVER_MENU(pPopover) ?
+ 
gtk_popover_menu_get_menu_model(GTK_POPOVER_MENU(pPopover)) :
+ nullptr)
+{
+GMenu* pMenu = G_MENU(pMenuModel);
+g_menu_insert(pMenu, pos, "SEPARATOR", "menu.action");
+}
+
 #endif
 }
 
@@ -9651,12 +9679,8 @@ public:
 virtual void set_item_active(const OString& rIdent, bool bActive) override
 {
 #if GTK_CHECK_VERSION(4, 0, 0)
-if (bActive)
-{
-g_action_group_change_action_state(m_pActionGroup, 
m_aIdToAction[rIdent].getStr(),
-   
g_variant_new_string(rIdent.getStr()));
-}
-// TODO checkboxes vs radiobuttons
+g_action_group_change_action_state(m_pActionGroup, 
m_aIdToAction[rIdent].getStr(),
+   g_variant_new_string(bActive ? 
rIdent.getStr() : "'none'"));
 #else
 MenuHelper::set_item_active(rIdent, bActive);
 #endif
@@ -9665,7 +9689,7 @@ public:
 virtual void set_item_sensitive(const OString& rIdent, bool bSensitive) 
o

[Libreoffice-commits] core.git: vcl/unx

2021-06-09 Thread Caolán McNamara (via logerrit)
 vcl/unx/gtk4/convert3to4.cxx |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 80f37b8fdc9b3bf39abe437b016cdc69f836058a
Author: Caolán McNamara 
AuthorDate: Tue Jun 8 17:16:01 2021 +0100
Commit: Caolán McNamara 
CommitDate: Wed Jun 9 10:14:56 2021 +0200

gtk4: default that empty button labels are invisible

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

diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx
index a5282b0cece7..46f5c831b828 100644
--- a/vcl/unx/gtk4/convert3to4.cxx
+++ b/vcl/unx/gtk4/convert3to4.cxx
@@ -1156,8 +1156,15 @@ ConvertResult Convert3To4(const 
css::uno::Reference& xNode
 xLabelClassName->setValue("GtkLabel");
 xNewChildObjectNode->setAttributeNode(xLabelClassName);
 if (xChildPropertyLabel)
+{
 xNewChildObjectNode->appendChild(
 
xChildPropertyLabel->getParentNode()->removeChild(xChildPropertyLabel));
+}
+else
+{
+auto xNotVisible = CreateProperty(xDoc, "visible", 
"False");
+xNewChildObjectNode->appendChild(xNotVisible);
+}
 if (bChildUseUnderline)
 {
 auto xUseUnderline = CreateProperty(xDoc, "use-underline", 
"True");
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa sw/source

2021-06-09 Thread Miklos Vajna (via logerrit)
 sw/qa/core/text/data/line-width.fodt |   32 
 sw/qa/core/text/text.cxx |   19 +++
 sw/source/core/edit/edattr.cxx   |4 ++--
 sw/source/core/text/itrcrsr.cxx  |   12 ++--
 sw/source/core/text/porglue.cxx  |2 +-
 sw/source/core/text/porlin.cxx   |2 +-
 sw/source/core/text/porlin.hxx   |4 ++--
 sw/source/core/text/pormulti.cxx |2 +-
 sw/source/core/text/pormulti.hxx |2 +-
 9 files changed, 65 insertions(+), 14 deletions(-)

New commits:
commit 6fdd0a3f8b3448a9a246496191908c92156cc38b
Author: Miklos Vajna 
AuthorDate: Wed Jun 9 09:09:16 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 10:07:45 2021 +0200

sw: allow the width of a line portion to be larger than 65536 twips

The line portion width can be quite large if the line contains an
as-char image.

Found by asking -fsanitize=implicit-unsigned-integer-truncation
-fsanitize=implicit-signed-integer-truncation to flag the problematic
conversions.

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

diff --git a/sw/qa/core/text/data/line-width.fodt 
b/sw/qa/core/text/data/line-width.fodt
new file mode 100644
index ..a6b2b2f5c62b
--- /dev/null
+++ b/sw/qa/core/text/data/line-width.fodt
@@ -0,0 +1,32 @@
+
+
+  
+
+
+  
+
+  
+  
+
+  
+  
+
+  iVBORw0KGgoNSUhEUgAAAEBACAQAYLlVBGdBTUEAALGPC/xhBQFz
+   UkdCAK7OHOkgY0hSTQAAeiYAAICEAAD6gOgAAHUwAADqYAAAOpgAABdwnLpRPAAA
+   AAJiS0dEAACqjSMyCW9GRnMGAAAMc1XTCXBIWXMAAA3XAAAN1wFCKJt4
+   CXZwQWcAAABMQACdMTgbAAABzUlEQVRo3u3ZPU/CQBjA8X+Jxs3ESUDj4iK+LA5+
+   BBfjqBE1cXB2MlFAEqMgxvhNNL4sLsK3UPQL6ObkoAETz+FKW2mxCPRYnucWUu76/OC59C49
+   cGOCKqrD9kHRc6ddPv7oW2WCwMh0nF63Myz7Tm8hPTNu0pgHMER3scepTbgK6enJNND83RLn
+   /878yRaPmgBZFDuMsNLeWB9gmFQHP77MIg9gsYciR50NFKvtjIy10yk84pSZA7DYpwR8scmF
+   QQCMuoQMpzbh0iAARrlnVn90CWHTsZcAiHPPdINQAuqsc2MQAAnKDUKWEhZ10twaBEDSJWQo
+   YlFj7S9CzwEegkXWIbQsRAQASFJhpplwbRAACS+hANRJBxMiAkDcJeQ4sQkBhYgMoJ+Ozlwo
+   2YQ7AJ6CRxyiUGnVy3hVKb0Af9v7hUG2Wy9TEQCUelFTDULB2S+YKYGOMcpM6UIccOQnRA6A
+   cSp6ibfI+wkGADBGpTEd8xz1AaAfTQ7huA8AvUw5hVjuA0D/C5OaMN8XACRZ8F0zCggKAQhA
+   AAIQgAAEIAABCEAAAhCAAAQgAAH4zg3feY4w3Xs44M5+oW0qvCWoGcvaIlM3x/f/ab+O738A
+   hOCNQr34oD4ldEVYdGNyZWF0ZS1kYXRlADIwMTAtMTItMjBUMTc6MDg6MzYrMDE6MDB6
+   5RscJXRFWHRtb2RpZnktZGF0ZQAyMDEwLTEyLTIwVDE3OjA4OjM3KzAxOjAwgyNmnAAA
+   AABJRU5ErkJggg==
+  
+
+  
+
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index d38b6a3e62cc..be6406f6b654 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -151,6 +151,25 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLineHeight)
 assertXPath(pXmlDoc, "//fly/infos/bounds", "top", 
OUString::number(DOCUMENTBORDER));
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testLineWidth)
+{
+// Given a document with an as-char image, width in twips not fitting into 
sal_uInt16:
+SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "line-width.fodt");
+SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+sal_Int32 nOldLeft = pWrtShell->GetCharRect().Left();
+
+// When moving the cursor to the right:
+pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/false, 1, 
/*bBasicCall=*/false);
+
+// Then make sure we move to the right by the image width:
+sal_Int32 nNewLeft = pWrtShell->GetCharRect().Left();
+// Without the accompanying fix in place, this test would have failed with:
+// - Expected greater than: 65536
+// - Actual  : 1872
+// i.e. the width (around 67408 twips) was truncated.
+CPPUNIT_ASSERT_GREATER(static_cast(65536), nNewLeft - nOldLeft);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/edit/edattr.cxx b/sw/source/core/edit/edattr.cxx
index 4df2c7db6e47..c6bb80b318cb 100644
--- a/sw/source/core/edit/edattr.cxx
+++ b/sw/source/core/edit/edattr.cxx
@@ -533,10 +533,10 @@ bool SwEditShell::IsMoveLeftMargin( bool bRight, bool 
bModulus ) const
 SwFrame* pFrame = pCNd->getLayoutFrame( GetLayout() );
 if ( pFrame )
 {
-const sal_uInt16 nFrameWidth = 
o3tl::narrowing( pFrame->IsVertical() ?
+const sal_uInt32 nFrameWidth = 
o3tl::narrowing( pFrame->IsVertical() ?
  
pFrame->getFrameArea().Height() :
  
pFrame->getFrameArea().Width() );
-bRet = nFrameWidth > ( nNext + MM50 );
+bRet = o3tl::narrowing(nFrameWidth) > ( nNext 
+ MM50 );
 }
 else
   

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/qa

2021-06-09 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |  130 +++
 1 file changed, 130 insertions(+)

New commits:
commit facee193fae2fdcdcf4910475a5b19d5bad79b72
Author: Dennis Francis 
AuthorDate: Thu May 27 14:02:28 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:36:16 2021 +0200

unit test: lok: text selection message test

Change-Id: Ie551461e323a2705c5b0b159dd50e8a1eef7d364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116429
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit 42b08e239983063e559af8bd249213bba79eee48)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116807

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index f81a5f48dcce..02d261919b0a 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -122,6 +122,7 @@ public:
 void testAutoInputExactMatch();
 void testMoveShapeHandle();
 void testEditCursorBounds();
+void testTextSelectionBounds();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -174,6 +175,7 @@ public:
 CPPUNIT_TEST(testAutoInputExactMatch);
 CPPUNIT_TEST(testMoveShapeHandle);
 CPPUNIT_TEST(testEditCursorBounds);
+CPPUNIT_TEST(testTextSelectionBounds);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -483,6 +485,78 @@ struct EditCursorMessage final {
 }
 };
 
+struct TextSelectionMessage
+{
+std::vector m_aRelRects;
+Point m_aRefPoint;
+
+void clear() {
+m_aRefPoint.setX(0);
+m_aRefPoint.setY(0);
+m_aRelRects.clear();
+}
+
+bool empty() {
+return m_aRelRects.empty();
+}
+
+void parseMessage(const char* pMessage)
+{
+clear();
+if (!pMessage)
+return;
+
+std::string aStr(pMessage);
+if (aStr.find(",") == std::string::npos)
+return;
+
+size_t nRefDelimStart = aStr.find("::");
+std::string aRectListString = (nRefDelimStart == std::string::npos) ? 
aStr : aStr.substr(0, nRefDelimStart);
+std::string aRefPointString = (nRefDelimStart == std::string::npos) ?
+std::string("0, 0") :
+aStr.substr(nRefDelimStart + 2, aStr.length() - 2 - 
nRefDelimStart);
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aRefPointString.c_str()));
+CPPUNIT_ASSERT_EQUAL(2, aSeq.getLength());
+m_aRefPoint.setX(aSeq[0].toInt32());
+m_aRefPoint.setY(aSeq[1].toInt32());
+
+size_t nStart = 0;
+size_t nEnd = aRectListString.find(";");
+if (nEnd == std::string::npos)
+nEnd = aRectListString.length();
+do
+{
+std::string aRectString = aRectListString.substr(nStart, nEnd - 
nStart);
+{
+aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aRectString.c_str()));
+CPPUNIT_ASSERT_EQUAL(4, aSeq.getLength());
+tools::Rectangle aRect;
+aRect.setX(aSeq[0].toInt32());
+aRect.setY(aSeq[1].toInt32());
+aRect.setWidth(aSeq[2].toInt32());
+aRect.setHeight(aSeq[3].toInt32());
+
+m_aRelRects.push_back(aRect);
+}
+
+nStart = nEnd + 1;
+nEnd = aRectListString.find(";", nStart);
+}
+while(nEnd != std::string::npos);
+}
+
+tools::Rectangle getBounds(size_t nIndex)
+{
+if (nIndex >= m_aRelRects.size())
+return tools::Rectangle();
+
+tools::Rectangle aBounds = m_aRelRects[nIndex];
+aBounds.Move(m_aRefPoint.X(), m_aRefPoint.Y());
+return aBounds;
+}
+
+};
+
 /// A view callback tracks callbacks invoked on one specific view.
 class ViewCallback final
 {
@@ -503,6 +577,7 @@ public:
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
 EditCursorMessage m_aInvalidateCursorResult;
+TextSelectionMessage m_aTextSelectionResult;
 OString m_sInvalidateHeader;
 OString m_sInvalidateSheetGeometry;
 OString m_ShapeSelection;
@@ -634,6 +709,11 @@ public:
 {
 m_aInvalidateCursorResult.parseMessage(pPayload);
 }
+break;
+case LOK_CALLBACK_TEXT_SELECTION:
+{
+m_aTextSelectionResult.parseMessage(pPayload);
+}
 }
 }
 };
@@ -2703,6 +2783,56 @@ void ScTiledRenderingTest::testEditCursorBounds()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testTextSelectionBounds()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);
+ScModelObj* pMode

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/qa

2021-06-09 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |  115 ++-
 1 file changed, 114 insertions(+), 1 deletion(-)

New commits:
commit 8b10fd63e713e566f4a0a4240f86d4346e3973cc
Author: Dennis Francis 
AuthorDate: Tue May 25 15:48:39 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:34:34 2021 +0200

unit test: lok: edit cursor invalidation message

Conflicts:
sc/qa/unit/tiledrendering/tiledrendering.cxx

Change-Id: I255e3b637329fc1fb41d24e79a770051ee827162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116428
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit d1a1b8ac3d7eea4b571d8015e31549f39a0b20ed)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116806

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 620e79541a28..f81a5f48dcce 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -121,7 +121,7 @@ public:
 void testAutoInputStringBlock();
 void testAutoInputExactMatch();
 void testMoveShapeHandle();
-
+void testEditCursorBounds();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -173,6 +173,7 @@ public:
 CPPUNIT_TEST(testAutoInputStringBlock);
 CPPUNIT_TEST(testAutoInputExactMatch);
 CPPUNIT_TEST(testMoveShapeHandle);
+CPPUNIT_TEST(testEditCursorBounds);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -430,6 +431,58 @@ void ScTiledRenderingTest::testEmptyColumnSelection()
 CPPUNIT_ASSERT_EQUAL(OString(), 
apitest::helper::transferable::getTextSelection(pModelObj->getSelection(), 
"text/plain;charset=utf-8"));
 }
 
+struct EditCursorMessage final {
+tools::Rectangle m_aRelRect;
+Point m_aRefPoint;
+
+void clear()
+{
+m_aRelRect.SetEmpty();
+m_aRefPoint = Point(-1, -1);
+}
+
+bool empty()
+{
+return m_aRelRect.IsEmpty() &&
+m_aRefPoint.X() == -1 &&
+m_aRefPoint.Y() == -1;
+}
+
+void parseMessage(const char* pMessage)
+{
+clear();
+if (!pMessage || !comphelper::LibreOfficeKit::isCompatFlagSet(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs) ||
+!comphelper::LibreOfficeKit::isViewIdForVisCursorInvalidation())
+return;
+
+std::stringstream aStream(pMessage);
+boost::property_tree::ptree aTree;
+boost::property_tree::read_json(aStream, aTree);
+std::string aVal = 
aTree.get_child("refpoint").get_value();
+
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aVal.c_str()));
+CPPUNIT_ASSERT_EQUAL(2, aSeq.getLength());
+m_aRefPoint.setX(aSeq[0].toInt32());
+m_aRefPoint.setY(aSeq[1].toInt32());
+
+aVal = aTree.get_child("relrect").get_value();
+aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aVal.c_str()));
+CPPUNIT_ASSERT_EQUAL(4, aSeq.getLength());
+m_aRelRect.setX(aSeq[0].toInt32());
+m_aRelRect.setY(aSeq[1].toInt32());
+m_aRelRect.setWidth(aSeq[2].toInt32());
+m_aRelRect.setHeight(aSeq[3].toInt32());
+}
+
+tools::Rectangle getBounds()
+{
+tools::Rectangle aBounds = m_aRelRect;
+aBounds.Move(m_aRefPoint.X(), m_aRefPoint.Y());
+return aBounds;
+}
+};
+
 /// A view callback tracks callbacks invoked on one specific view.
 class ViewCallback final
 {
@@ -444,10 +497,12 @@ public:
 bool m_bFullInvalidateTiles;
 bool m_bInvalidateTiles;
 std::vector m_aInvalidations;
+tools::Rectangle m_aCellCursorBounds;
 std::vector m_aInvalidationsParts;
 bool m_bViewLock;
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
+EditCursorMessage m_aInvalidateCursorResult;
 OString m_sInvalidateHeader;
 OString m_sInvalidateSheetGeometry;
 OString m_ShapeSelection;
@@ -490,6 +545,14 @@ public:
 case LOK_CALLBACK_CELL_CURSOR:
 {
 m_bOwnCursorInvalidated = true;
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(pPayload));
+m_aCellCursorBounds = tools::Rectangle();
+if (aSeq.getLength() == 6) {
+m_aCellCursorBounds.setX(aSeq[0].toInt32());
+m_aCellCursorBounds.setY(aSeq[1].toInt32());
+m_aCellCursorBounds.setWidth(aSeq[2].toInt32());
+m_aCellCursorBounds.setHeight(aSeq[3].toInt32());
+}
 }
 break;
 case LOK_CALLBACK_CELL_VIEW_CURSOR:
@@ -566,6 +629,11 @@ public:
 {
 m_sInvalidateSheetGeometry = pPayload;
 }
+break;
+case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
+{
+m_aInva

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source

2021-06-09 Thread Dennis Francis (via logerrit)
 editeng/source/editeng/impedit.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 605ac470a071ee4afbb17e75505920dbb659bb1e
Author: Dennis Francis 
AuthorDate: Tue May 25 10:53:22 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:34:18 2021 +0200

sc: lok: apply the previous fix for selections too

Conflicts:
editeng/source/editeng/impedit.cxx

Change-Id: Ic1f6c1642da71e0ef8c23831786ae405dda21133
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116427
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit c5e249877b93e9d11788ec04fffee1dcb142a0e5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116805

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index 3b329d567943..e784f564a02e 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -658,9 +658,12 @@ void ImpEditView::ImplDrawHighlightRect( OutputDevice* 
_pTarget, const Point& rD
 {
 MapUnit eDevUnit = _pTarget->GetMapMode().GetMapUnit();
 tools::Rectangle aSelRect(rDocPosTopLeft, rDocPosBottomRight);
-aSelRect = mpLOKSpecialPositioning->GetWindowPos(aSelRect, eDevUnit);
-const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint();
-aSelRect.Move(-aRefPoint.X(), -aRefPoint.Y());
+aSelRect = GetWindowPos(aSelRect);
+Point aRefPointLogical = GetOutputArea().TopLeft();
+// Get the relative coordinates w.r.t refpoint in display units.
+aSelRect.Move(-aRefPointLogical.X(), -aRefPointLogical.Y());
+// Convert from display unit to twips.
+aSelRect = OutputDevice::LogicToLogic(aSelRect, MapMode(eDevUnit), 
MapMode(MapUnit::MapTwip));
 
 tools::Polygon aTmpPoly(4);
 aTmpPoly[0] = aSelRect.TopLeft();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - editeng/source

2021-06-09 Thread Dennis Francis (via logerrit)
 editeng/source/editeng/impedit.cxx |   12 
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 73e2bee5753e4b34024a138f8a0ea1203dfe79be
Author: Dennis Francis 
AuthorDate: Tue May 25 10:35:22 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:33:51 2021 +0200

sc: lokit: fix wrong edit cursor coordinates for numeric cells

The cursor coordinates returned by editengine implementation is computed
with respect to document-visible-area in "display" hmm and not "print"
hmm. For numeric cells, the visible top-left is always non-zero, hence
triggering this incorrect "refpoint" subtraction to compute "relrect".

The fix is to calculate the correct "relrect" by subtracting the display
hmm version of "refpoint" from the edit cursor rectange and then convert
to twips.

Change-Id: I4b663edcb1f74e1bdcc300788769d580fcfe7e17
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116426
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit 77704022556bb97a64ef47666230a2c0232d45d3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116804

diff --git a/editeng/source/editeng/impedit.cxx 
b/editeng/source/editeng/impedit.cxx
index edb7cd228151..3b329d567943 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1312,11 +1312,15 @@ void ImpEditView::ShowCursor( bool bGotoCursor, bool 
bForceVisCursor )
 
 MapUnit eDevUnit = rOutDev.GetMapMode().GetMapUnit();
 tools::Rectangle aCursorRectPureLogical(aEditCursor.TopLeft(), 
GetCursor()->GetSize());
-// Get rectangle in window-coordinates from editeng(doc) 
coordinates.
-aCursorRectPureLogical = 
mpLOKSpecialPositioning->GetWindowPos(aCursorRectPureLogical, eDevUnit);
+// Get rectangle in window-coordinates from editeng(doc) 
coordinates in hmm.
+aCursorRectPureLogical = GetWindowPos(aCursorRectPureLogical);
+Point aRefPointLogical = GetOutputArea().TopLeft();
+// Get the relative coordinates w.r.t refpoint in display hmm.
+aCursorRectPureLogical.Move(-aRefPointLogical.X(), 
-aRefPointLogical.Y());
+// Convert to twips.
+aCursorRectPureLogical = 
OutputDevice::LogicToLogic(aCursorRectPureLogical, MapMode(eDevUnit), 
MapMode(MapUnit::MapTwip));
+// "refpoint" in print twips.
 const Point aRefPoint = mpLOKSpecialPositioning->GetRefPoint();
-// Get the relative coordinates w.r.t rRefPoint.
-aCursorRectPureLogical.Move(-aRefPoint.X(), -aRefPoint.Y());
 aMessageParams.put("relrect", 
aCursorRectPureLogical.toString());
 aMessageParams.put("refpoint", aRefPoint.toString());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source

2021-06-09 Thread Dennis Francis (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 738a3d26b54494113afcb53e106e9629d88311d5
Author: Dennis Francis 
AuthorDate: Wed May 19 20:17:01 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:33:35 2021 +0200

autocomplete: allow cycling through possible matches

Conflicts:
sc/source/ui/app/inputhdl.cxx

Change-Id: I4a4b11312f36885d1c6fbe43c4850d55293b2557
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115859
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit ccbbd6bac6aaf5691a66a56b82d2592153336191)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116803

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index dfcc5347bd22..c04e0db4aa86 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1977,6 +1977,16 @@ void ScInputHandler::UseColData() // When typing
 miAutoPosColumn = pColumnData->end();
 miAutoPosColumn = findTextAll(*pColumnData, miAutoPosColumn, aText, 
aResultVec, false, 2);
 bool bShowCompletion = (aResultVec.size() == 1);
+bUseTab = (aResultVec.size() == 2);
+if (bUseTab)
+{
+// Allow cycling through possible matches using shortcut.
+// Make miAutoPosColumn invalid so that Ctrl+TAB provides the first 
matching one.
+miAutoPosColumn = pColumnData->end();
+aAutoSearch = aText;
+return;
+}
+
 if (!bShowCompletion)
 return;
 
@@ -2011,17 +2021,6 @@ void ScInputHandler::UseColData() // When typing
 }
 
 aAutoSearch = aText; // To keep searching - nAutoPos is set
-
-if (aText.getLength() == aNew.getLength())
-{
-// If the inserted text is found, consume TAB only if there's more 
coming
-OUString aDummy;
-ScTypedCaseStrSet::const_iterator itNextPos =
-findText(*pColumnData, miAutoPosColumn, aText, aDummy, false);
-bUseTab = itNextPos != pColumnData->end();
-}
-else
-bUseTab = true;
 }
 
 void ScInputHandler::NextAutoEntry( bool bBack )
@@ -2029,7 +2028,7 @@ void ScInputHandler::NextAutoEntry( bool bBack )
 EditView* pActiveView = pTopView ? pTopView : pTableView;
 if ( pActiveView && pColumnData )
 {
-if (miAutoPosColumn != pColumnData->end() && !aAutoSearch.isEmpty())
+if (!aAutoSearch.isEmpty())
 {
 // Is the selection still valid (could be changed via the mouse)?
 ESelection aSel = pActiveView->GetSelection();
@@ -3670,7 +3669,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, 
bool bStartEdit /* = false
 NextFormulaEntry( bShift );
 bUsed = true;
 }
-else if (pColumnData && bUseTab && miAutoPosColumn != 
pColumnData->end())
+else if (pColumnData && bUseTab)
 {
 // Iterate through AutoInput entries
 NextAutoEntry( bShift );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sc/qa

2021-06-09 Thread Dennis Francis (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |  130 +++
 1 file changed, 130 insertions(+)

New commits:
commit 214e6b15de5f0704b063310ca667d8798b272a79
Author: Dennis Francis 
AuthorDate: Thu May 27 14:02:28 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:31:26 2021 +0200

unit test: lok: text selection message test

Change-Id: Ie551461e323a2705c5b0b159dd50e8a1eef7d364
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116429
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit 42b08e239983063e559af8bd249213bba79eee48)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116543
Tested-by: Jenkins

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index b646868ce525..07ebef6086d9 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -118,6 +118,7 @@ public:
 void testAutoInputExactMatch();
 void testMoveShapeHandle();
 void testEditCursorBounds();
+void testTextSelectionBounds();
 
 CPPUNIT_TEST_SUITE(ScTiledRenderingTest);
 CPPUNIT_TEST(testRowColumnHeaders);
@@ -170,6 +171,7 @@ public:
 CPPUNIT_TEST(testAutoInputExactMatch);
 CPPUNIT_TEST(testMoveShapeHandle);
 CPPUNIT_TEST(testEditCursorBounds);
+CPPUNIT_TEST(testTextSelectionBounds);
 CPPUNIT_TEST_SUITE_END();
 
 private:
@@ -479,6 +481,78 @@ struct EditCursorMessage final {
 }
 };
 
+struct TextSelectionMessage
+{
+std::vector m_aRelRects;
+Point m_aRefPoint;
+
+void clear() {
+m_aRefPoint.setX(0);
+m_aRefPoint.setY(0);
+m_aRelRects.clear();
+}
+
+bool empty() {
+return m_aRelRects.empty();
+}
+
+void parseMessage(const char* pMessage)
+{
+clear();
+if (!pMessage)
+return;
+
+std::string aStr(pMessage);
+if (aStr.find(",") == std::string::npos)
+return;
+
+size_t nRefDelimStart = aStr.find("::");
+std::string aRectListString = (nRefDelimStart == std::string::npos) ? 
aStr : aStr.substr(0, nRefDelimStart);
+std::string aRefPointString = (nRefDelimStart == std::string::npos) ?
+std::string("0, 0") :
+aStr.substr(nRefDelimStart + 2, aStr.length() - 2 - 
nRefDelimStart);
+uno::Sequence aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aRefPointString.c_str()));
+CPPUNIT_ASSERT_EQUAL(2, aSeq.getLength());
+m_aRefPoint.setX(aSeq[0].toInt32());
+m_aRefPoint.setY(aSeq[1].toInt32());
+
+size_t nStart = 0;
+size_t nEnd = aRectListString.find(";");
+if (nEnd == std::string::npos)
+nEnd = aRectListString.length();
+do
+{
+std::string aRectString = aRectListString.substr(nStart, nEnd - 
nStart);
+{
+aSeq = 
comphelper::string::convertCommaSeparated(OUString::createFromAscii(aRectString.c_str()));
+CPPUNIT_ASSERT_EQUAL(4, aSeq.getLength());
+tools::Rectangle aRect;
+aRect.setX(aSeq[0].toInt32());
+aRect.setY(aSeq[1].toInt32());
+aRect.setWidth(aSeq[2].toInt32());
+aRect.setHeight(aSeq[3].toInt32());
+
+m_aRelRects.push_back(aRect);
+}
+
+nStart = nEnd + 1;
+nEnd = aRectListString.find(";", nStart);
+}
+while(nEnd != std::string::npos);
+}
+
+tools::Rectangle getBounds(size_t nIndex)
+{
+if (nIndex >= m_aRelRects.size())
+return tools::Rectangle();
+
+tools::Rectangle aBounds = m_aRelRects[nIndex];
+aBounds.Move(m_aRefPoint.X(), m_aRefPoint.Y());
+return aBounds;
+}
+
+};
+
 /// A view callback tracks callbacks invoked on one specific view.
 class ViewCallback final
 {
@@ -499,6 +573,7 @@ public:
 OString m_sCellFormula;
 boost::property_tree::ptree m_aCommentCallbackResult;
 EditCursorMessage m_aInvalidateCursorResult;
+TextSelectionMessage m_aTextSelectionResult;
 OString m_sInvalidateHeader;
 OString m_sInvalidateSheetGeometry;
 OString m_ShapeSelection;
@@ -630,6 +705,11 @@ public:
 {
 m_aInvalidateCursorResult.parseMessage(pPayload);
 }
+break;
+case LOK_CALLBACK_TEXT_SELECTION:
+{
+m_aTextSelectionResult.parseMessage(pPayload);
+}
 }
 }
 };
@@ -2699,6 +2779,56 @@ void ScTiledRenderingTest::testEditCursorBounds()
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
 
+void ScTiledRenderingTest::testTextSelectionBounds()
+{
+comphelper::LibreOfficeKit::setActive();
+comphelper::LibreOfficeKit::setCompatFlag(
+comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs);

[Libreoffice-commits] core.git: sc/source

2021-06-09 Thread Dennis Francis (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   25 -
 1 file changed, 12 insertions(+), 13 deletions(-)

New commits:
commit 299227ad81d4a44556fda8cca7b8b79219ba7e6c
Author: Dennis Francis 
AuthorDate: Wed May 19 20:17:01 2021 +0530
Commit: Dennis Francis 
CommitDate: Wed Jun 9 09:30:45 2021 +0200

autocomplete: allow cycling through possible matches

Conflicts:
sc/source/ui/app/inputhdl.cxx

Change-Id: I4a4b11312f36885d1c6fbe43c4850d55293b2557
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115859
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Luboš Luňák 
Reviewed-by: Dennis Francis 
(cherry picked from commit ccbbd6bac6aaf5691a66a56b82d2592153336191)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116539
Tested-by: Jenkins

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 194049e999e8..a8bf4a39e8f9 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1975,6 +1975,16 @@ void ScInputHandler::UseColData() // When typing
 miAutoPosColumn = pColumnData->end();
 miAutoPosColumn = findTextAll(*pColumnData, miAutoPosColumn, aText, 
aResultVec, false, 2);
 bool bShowCompletion = (aResultVec.size() == 1);
+bUseTab = (aResultVec.size() == 2);
+if (bUseTab)
+{
+// Allow cycling through possible matches using shortcut.
+// Make miAutoPosColumn invalid so that Ctrl+TAB provides the first 
matching one.
+miAutoPosColumn = pColumnData->end();
+aAutoSearch = aText;
+return;
+}
+
 if (!bShowCompletion)
 return;
 
@@ -2009,17 +2019,6 @@ void ScInputHandler::UseColData() // When typing
 }
 
 aAutoSearch = aText; // To keep searching - nAutoPos is set
-
-if (aText.getLength() == aNew.getLength())
-{
-// If the inserted text is found, consume TAB only if there's more 
coming
-OUString aDummy;
-ScTypedCaseStrSet::const_iterator itNextPos =
-findText(*pColumnData, miAutoPosColumn, aText, aDummy, false);
-bUseTab = itNextPos != pColumnData->end();
-}
-else
-bUseTab = true;
 }
 
 void ScInputHandler::NextAutoEntry( bool bBack )
@@ -2027,7 +2026,7 @@ void ScInputHandler::NextAutoEntry( bool bBack )
 EditView* pActiveView = pTopView ? pTopView : pTableView;
 if ( pActiveView && pColumnData )
 {
-if (miAutoPosColumn != pColumnData->end() && !aAutoSearch.isEmpty())
+if (!aAutoSearch.isEmpty())
 {
 // Is the selection still valid (could be changed via the mouse)?
 ESelection aSel = pActiveView->GetSelection();
@@ -3659,7 +3658,7 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, 
bool bStartEdit /* = false
 NextFormulaEntry( bShift );
 bUsed = true;
 }
-else if (pColumnData && bUseTab && miAutoPosColumn != 
pColumnData->end())
+else if (pColumnData && bUseTab)
 {
 // Iterate through AutoInput entries
 NextAutoEntry( bShift );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sw/source/ui/index/cnttab.cxx |8 
 1 file changed, 8 deletions(-)

New commits:
commit 10f501dec737f3c3da21d9df2b204d0385290477
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 17:31:05 2021 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 9 09:20:55 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

...since the (only) read of sText got removed with
4e6be990eaf6a524740299e8d00fb5401c1a21c0 "weld SwTOXEntryTabPage"

Change-Id: I24bceb37c106cc840cef60d6a08953ca25cc3d15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116854
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 71ed6cb64e2d..30c9407064d3 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2167,48 +2167,40 @@ void SwTOXEntryTabPage::SetFocus2theAllBtn()
 // put here the UI dependent initializations
 IMPL_LINK(SwTOXEntryTabPage, InsertTokenHdl, weld::Button&, rBtn, void)
 {
-OUString sText;
 FormTokenType eTokenType = TOKEN_ENTRY_NO;
 OUString sCharStyle;
 sal_uInt16  nChapterFormat = CF_NUMBER; // i89791
 if (&rBtn == m_xEntryNoPB.get())
 {
-sText = SwForm::GetFormEntryNum();
 eTokenType = TOKEN_ENTRY_NO;
 }
 else if (&rBtn == m_xEntryPB.get())
 {
 if( TOX_CONTENT == m_pCurrentForm->GetTOXType() )
 {
-sText = SwForm::GetFormEntryText();
 eTokenType = TOKEN_ENTRY_TEXT;
 }
 else
 {
-sText = SwForm::GetFormEntry();
 eTokenType = TOKEN_ENTRY;
 }
 }
 else if (&rBtn == m_xChapterInfoPB.get())
 {
-sText = SwForm::GetFormChapterMark();
 eTokenType = TOKEN_CHAPTER_INFO;
 nChapterFormat = CF_NUM_NOPREPST_TITLE; // i89791
 }
 else if (&rBtn == m_xPageNoPB.get())
 {
-sText = SwForm::GetFormPageNums();
 eTokenType = TOKEN_PAGE_NUMS;
 }
 else if (&rBtn == m_xHyperLinkPB.get())
 {
-sText = SwForm::GetFormLinkStt();
 eTokenType = TOKEN_LINK_START;
 sCharStyle = SwResId(STR_POOLCHR_TOXJUMP);
 }
 else if (&rBtn == m_xTabPB.get())
 {
-sText = SwForm::GetFormTab();
 eTokenType = TOKEN_TAB_STOP;
 }
 SwFormToken aInsert(eTokenType);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


Self Intro - Ahmet Hakan Çelik

2021-06-09 Thread AHÇ
Hi LibreOffice Community,

I'm Ahmet Hakan Çelik. I'm an undergraduate computer science student at
Çanakkale Onsekiz Mart University, Turkey.

I will be working on the 100 Paper Cuts during next two months. I will try
to solve as many issues as I can.

Thank you.

-- 

Regards,
Ahmet Hakan Çelik
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice-commits] core.git: sw/source

2021-06-09 Thread Stephan Bergmann (via logerrit)
 sw/source/core/doc/docnum.cxx |   10 --
 1 file changed, 10 deletions(-)

New commits:
commit dfafa053945aa9ffea347c4b9a98f255b15016bf
Author: Stephan Bergmann 
AuthorDate: Tue Jun 8 15:21:44 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 09:13:06 2021 +0200

-Werror,-Wunused-but-set-variable (Clang 13 trunk)

The only read of nChgFormatLevel (spelled "nChgFmtLevel" back then) back at
84a3db80b4fd66c6854b3135b5f69b61fd828e62 "initial import" was in a

> #ifndef NUM_RELSPACE

block that was removed with f917bb6900bad2c9382374a2cbc5678b278dde2e
"INTEGRATION: CWS swnumtree".  It apparently was dead code, as sw/inc/sw.mk 
had
included

> CDEFS+=-DNUM_RELSPACE

ever since at least 7b0b5cdfeed656b279bc32cd929630d5fc25878b "initial 
import"
(which was later removed with 58003f28fc09cb2021e145afa0d0d692a7a402a7
"INTEGRATION: CWS writercorehandoff" when all its remaining uses were also
removed in that CWS writercorehandoff).

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

diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 2420532c5bee..586324391888 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -1185,16 +1185,6 @@ bool SwDoc::ReplaceNumRule( const SwPosition& rPos,
 if ( !aTextNodeList.empty() )
 {
 SwRegHistory aRegH( pUndo ? pUndo->GetHistory() : nullptr );
-sal_uInt16 nChgFormatLevel = 0;
-for( sal_uInt8 n = 0; n < MAXLEVEL; ++n )
-{
-const SwNumFormat& rOldFormat = pOldRule->Get( n ),
-& rNewFormat = pNewRule->Get( n );
-
-if( rOldFormat.GetAbsLSpace() != rNewFormat.GetAbsLSpace() ||
-rOldFormat.GetFirstLineOffset() != 
rNewFormat.GetFirstLineOffset() )
-nChgFormatLevel |= ( 1 << n );
-}
 
 const SwTextNode* pGivenTextNode = 
rPos.nNode.GetNode().GetTextNode();
 SwNumRuleItem aRule( rNewRule );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: sw/qa

2021-06-09 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   37 ---
 1 file changed, 5 insertions(+), 32 deletions(-)

New commits:
commit 6cd8dd2123354578a1499a1e85e268f702f38954
Author: Miklos Vajna 
AuthorDate: Tue Jun 8 20:47:57 2021 +0200
Commit: Miklos Vajna 
CommitDate: Wed Jun 9 09:03:34 2021 +0200

CppunitTest_sw_ooxmlimport: rework to avoid the FailTest hack

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

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index b9b09d765eef..deb17d50fb23 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -68,45 +68,16 @@
 #include 
 #include 
 
+constexpr OUStringLiteral DATA_DIRECTORY = u"/sw/qa/extras/ooxmlimport/data/";
 
 class Test : public SwModelTestBase
 {
 public:
-Test() : SwModelTestBase("/sw/qa/extras/ooxmlimport/data/", "Office Open 
XML Text")
+Test() : SwModelTestBase(DATA_DIRECTORY, "Office Open XML Text")
 {
 }
 };
 
-class FailTest : public Test
-{
-public:
-// UGLY: hacky manual override of MacrosTest::loadFromDesktop
-void executeImportTest(const char* filename, const char* /*password*/)
-{
-header();
-preTest(filename);
-{
-if (mxComponent.is())
-mxComponent->dispose();
-std::cout << filename << ",";
-mnStartTime = osl_getGlobalTimer();
-{
-OUString aURL(m_directories.getURLFromSrc(mpTestDocumentPath) 
+ OUString::createFromAscii(filename));
-CPPUNIT_ASSERT_MESSAGE("no desktop", mxDesktop.is());
-uno::Sequence args( 
comphelper::InitPropertySequence({
-{ "DocumentService", 
uno::Any(OUString("com.sun.star.text.TextDocument")) }
-}));
-
-uno::Reference xComponent = 
mxDesktop->loadComponentFromURL(aURL, "_default", 0, args);
-OUString sMessage = "loading succeeded: " + aURL;
-CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sMessage, 
RTL_TEXTENCODING_UTF8).getStr(), !xComponent.is());
-}
-}
-verify();
-finish();
-}
-};
-
 CPPUNIT_TEST_FIXTURE(Test, testImageHyperlink)
 {
 load(mpTestDocumentPath, "image-hyperlink.docx");
@@ -114,8 +85,10 @@ CPPUNIT_TEST_FIXTURE(Test, testImageHyperlink)
 CPPUNIT_ASSERT_EQUAL(OUString("http://www.libreoffice.org/";), URL);
 }
 
-DECLARE_SW_IMPORT_TEST(testMathMalformedXml, "math-malformed_xml.docx", 
nullptr, FailTest)
+CPPUNIT_TEST_FIXTURE(Test, testMathMalformedXml)
 {
+OUString aURL = m_directories.getURLFromSrc(DATA_DIRECTORY) + 
"math-malformed_xml.docx";
+mxComponent = mxDesktop->loadComponentFromURL(aURL, "_default", 0, {});
 CPPUNIT_ASSERT(!mxComponent.is());
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits