[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/dtrans/DropTarget.cxx | 20 +++- vcl/aqua/source/dtrans/DropTarget.hxx |2 +- 2 files changed, 16 insertions(+), 6 deletions(-) New commits: commit 024b54d68cc4bcd0d4a71be7b686cad98238bfc8 Author: Herbert Dürr Date: Wed Jun 24 07:08:31 2015 + #i105098# fix drag&drop insertion of files/images on Mac Fixed-by: Manik Reviewed-by: Herbert Duerr diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 46d6780..c02bfdc 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -133,7 +133,8 @@ namespace /* private */ -(BOOL)performDragOperation:(id )sender { - return mDropTarget->performDragOperation(sender); + (void) sender; + return mDropTarget->performDragOperation(); } @@ -235,7 +236,10 @@ NSDragOperation DropTarget::draggingEntered(id sender) sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -274,7 +278,10 @@ NSDragOperation DropTarget::draggingUpdated(id sender) { sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -326,7 +333,7 @@ BOOL DropTarget::prepareForDragOperation(id /*sender*/) } -BOOL DropTarget::performDragOperation(id sender) +BOOL DropTarget::performDragOperation() { bool bSuccess = false; @@ -340,7 +347,10 @@ BOOL DropTarget::performDragOperation(id sender) } NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx index c8532a8..111867c 100644 --- a/vcl/aqua/source/dtrans/DropTarget.hxx +++ b/vcl/aqua/source/dtrans/DropTarget.hxx @@ -133,7 +133,7 @@ public: virtual NSDragOperation draggingUpdated(id sender); virtual void draggingExited(id sender); virtual BOOL prepareForDragOperation(id sender); - virtual BOOL performDragOperation(id sender); + virtual BOOL performDragOperation(); virtual void concludeDragOperation(id sender); /* If multiple actions are supported by the drag source and ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - extras/source
extras/source/palettes/standard.soc |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit acd376b1e3e54279111dc177d698915566165ed1 Author: Herbert Dürr Date: Fri Feb 20 09:15:45 2015 + #i125897# fix color palette entry for "Sky Blue 1" Patch-by: Erik Engstrom Suggested-by: V Stuart Foote Found-by: Jay Philips Reviewed-by: Herbert Duerr diff --git a/extras/source/palettes/standard.soc b/extras/source/palettes/standard.soc index 4f1c9b3..03cea3a 100644 --- a/extras/source/palettes/standard.soc +++ b/extras/source/palettes/standard.soc @@ -37,7 +37,7 @@ - + @@ -195,4 +195,4 @@ - \ No newline at end of file + ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - configure.in
configure.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 78d58bc5b0ff535551c819d214535067fcaa05f0 Author: Herbert Dürr Date: Fri Dec 5 07:46:41 2014 + #i125921# fix autodetection of the OSX 10.10 SDK which failed because the autodetection only worked with single-digit minor-versions. Patch-by: Thorsten Wagner Found-by: Thorsten Wagner Review-by: Herbert Duerr diff --git a/configure.in b/configure.in index b7d1fc3..ea90014 100644 --- a/configure.in +++ b/configure.in @@ -3936,7 +3936,7 @@ if test "$_os" = "Darwin"; then else MACOSX_DEPLOYMENT_TARGET=$sdk_target - sdk_found=`xcodebuild -showsdks | grep "sdk macosx10.[[789]]" | sed -e "s/.*sdk //" | head -n1` + sdk_found=`xcodebuild -showsdks | egrep "sdk macosx10.(7|8|9|10)" | sed -e "s/.*sdk //" | tail -n1` if test -z "$sdk_found"; then AC_MSG_ERROR([No SDK with OSX $sdk_target compatibility found]) else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/a11y/aqua11ywrapper.mm |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ac91424975502e1a67434dcaa649e26a2bcf8be4 Author: Herbert Dürr Date: Fri Oct 31 16:30:42 2014 + #i125815# fix build breaker with Mac 10.10 SDK diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm index a0e7559..c577ad4 100644 --- a/vcl/aqua/source/a11y/aqua11ywrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm @@ -694,7 +694,7 @@ static BOOL isPopupMenuOpen = NO; -(BOOL)accessibilityIsIgnored { // #i90575# guard NSAccessibility protocol against unwanted access if ( isPopupMenuOpen ) { -return nil; +return FALSE; } BOOL ignored = NO; sal_Int16 nRole = [ self accessibleContext ] -> getAccessibleRole(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - set_soenv.in vcl/aqua
set_soenv.in |8 ++-- vcl/aqua/source/gdi/salprn.cxx |5 + 2 files changed, 11 insertions(+), 2 deletions(-) New commits: commit 603a37eb46a5ed08d3c9c9b342386705cbd00109 Author: Herbert Dürr Date: Tue Oct 21 07:43:39 2014 + #i125776# handle OSX SDK 10.9 changes regarding NSPrintingOrientation -> NSPaperOrientation SDK 10.9 changed the NSPrintInfo::orientation method to take a parameter of type NSPaperOrientation (i.e. enum) instead of NSPrintingOrientation (i.e. NSUInteger). The actual values are the same so the binaries work fine on older and newer platforms, but the type mismatch on the newer SDK would break the build. diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index ae5edf5..2d6a496 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -76,8 +76,13 @@ AquaSalInfoPrinter::AquaSalInfoPrinter( const SalPrinterQueueInfo& i_rQueue ) : { mpPrintInfo = [pShared copy]; [mpPrintInfo setPrinter: mpPrinter]; +#ifdef __MAC_10_9 // code for SDK 10.9 or newer +mePageOrientation = ([mpPrintInfo orientation] == NSPaperOrientationLandscape) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT; +[mpPrintInfo setOrientation: NSPaperOrientationPortrait]; +#else // code for SDK 10.8 or older mePageOrientation = ([mpPrintInfo orientation] == NSLandscapeOrientation) ? ORIENTATION_LANDSCAPE : ORIENTATION_PORTRAIT; [mpPrintInfo setOrientation: NSPortraitOrientation]; +#endif } mpGraphics = new AquaSalGraphics(); commit 2786d200b010a44a41a9453bfb56f0e41358422e Author: Jürgen Schmidt Date: Tue Oct 21 07:25:11 2014 + #125776# adapt STL include path for Xcode 6 diff --git a/set_soenv.in b/set_soenv.in index 5cd279f..ae70515 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1482,8 +1482,12 @@ elsif ($platform =~ m/darwin/) { $FRAMEWORKSHOME = "@MACOSX_SDK_PATH@/System/Library/Frameworks"; chomp( my $TOOLSPATH = `xcode-select --print-path` ); -my $STLINC .= $I."$TOOLSPATH/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/"; -$SOLARINC .= $STLINC . $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers"; +my $STLINC = "$TOOLSPATH/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/"; + if ( !(-e $STLINC) && !(-d $STLINC) ) { + # Xcode 5 + $STLINC = "$TOOLSPATH/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/"; + } +$SOLARINC .= $I.$STLINC . $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers"; $GUIBASE = "aqua"; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d89756854ed100ed27fda7a8a7716af74332c1a4 Author: Herbert Dürr Date: Wed Oct 15 09:03:39 2014 + Resolves: #i63015# always default to WinAnsiEncoding... for non-symbol PDF-Type1 export Suggested-By: e...@gruene.de Reviewed-By: h...@apache.org (cherry picked from commit b8186703cb43d2b57460cb23a7a4e3f989e95426) Conflicts: vcl/source/gdi/pdfwriter_impl.cxx Change-Id: I02227724bff301133ac8ce5562ec5ca1ed94f136 Reviewed-on: https://gerrit.libreoffice.org/11988 Reviewed-by: Björn Michaelsen Tested-by: Björn Michaelsen diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 2f44dd5..5548629 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3491,7 +3491,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical "IsSymbolFont() ) aLine.append( "/Encoding/WinAnsiEncoding\n" ); if( nToUnicodeStream ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit eea16cb3e65a4308caddb7618d31a76ca259dbb1 Author: Herbert Dürr Date: Wed Oct 15 09:03:39 2014 + Resolves: #i63015# always default to WinAnsiEncoding... for non-symbol PDF-Type1 export Suggested-By: e...@gruene.de Reviewed-By: h...@apache.org (cherry picked from commit b8186703cb43d2b57460cb23a7a4e3f989e95426) Conflicts: vcl/source/gdi/pdfwriter_impl.cxx Change-Id: I02227724bff301133ac8ce5562ec5ca1ed94f136 diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index b9f0df7..4501776 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3489,7 +3489,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const Physical "IsSymbolFont() ) aLine.append( "/Encoding/WinAnsiEncoding\n" ); if( nToUnicodeStream ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b8186703cb43d2b57460cb23a7a4e3f989e95426 Author: Herbert Dürr Date: Wed Oct 15 09:03:39 2014 + #i63015# always default to WinAnsiEncoding for non-symbol PDF-Type1 export Suggested-By: e...@gruene.de Reviewed-By: h...@apache.org diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index dffa0cd..a0b135a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3693,7 +3693,7 @@ std::map< sal_Int32, sal_Int32 > PDFWriterImpl::emitEmbeddedFont( const ImplFont "IsSymbolFont() ) aLine.append( "/Encoding/WinAnsiEncoding\n" ); if( nToUnicodeStream ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/87/10287/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/87/10287/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/74/9574/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/84/2584/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/46/4946/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/66/8366/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/46/4946/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/88/10288/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/00/10200/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/03/10203/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/41/5241/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/88/10288/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/59/8359/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/02/10202/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/00/10200/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/74/9574/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/66/8366/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/02/10202/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/88/6588/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/41/5241/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/59/8359/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/88/6588/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/33/1933/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/33/1933/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/19/6219/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/28/9628/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/95/5295/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/97/10297/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/97/10297/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/01/10201/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/27/9627/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/27/9627/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/78/2678/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/78/2678/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/42/5242/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/26/9626/2'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/26/9626/1'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Changes to 'refs/changes/26/9626/3'
___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sfx2/source
sfx2/source/appl/impldde.cxx | 72 ++- 1 file changed, 11 insertions(+), 61 deletions(-) New commits: commit 1e7502f3c8b8d751dd851c3f146debf2678781ec Author: Herbert Dürr Date: Mon Jul 14 07:17:59 2014 + Related: #i125226# expect DDE servers to be already up "soffice" is always up anyway and other DDE apps should be started manually (cherry picked from commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0) Conflicts: sfx2/source/appl/impldde.cxx (cherry picked from commit f4a8d7cd10cda57143b22519e16cdf8d5f19e759) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I52ebb26528952a4abf33ac95cb67c598f08b2790 Reviewed-on: https://gerrit.libreoffice.org/10297 Reviewed-by: David Tardon Tested-by: David Tardon diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index b0b79a21..92b1c7e 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -198,9 +198,6 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) { -#if defined(WNT) -static sal_Bool bInWinExec = sal_False; -#endif sal_uInt16 nLinkType = pSvLink->GetUpdateMode(); if( pConnection ) // Connection is already made { @@ -227,69 +224,22 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) pConnection = new DdeConnection( sServer, sTopic ); if( pConnection->GetError() ) { - // Is it possible to address the system-Topic? - // then the server is up, it just does not know the topic! -if( sTopic.equalsIgnoreAsciiCase( "SYSTEM" ) ) +// check if the DDE server knows the "SYSTEM" topic +bool bSysTopic = false; +if (!sTopic.equalsIgnoreAsciiCase("SYSTEM")) { -sal_Bool bSysTopic; -{ -DdeConnection aTmp(sServer, OUString("SYSTEM")); -bSysTopic = !aTmp.GetError(); -} - -if( bSysTopic ) -{ -nError = DDELINK_ERROR_DATA; -return sal_False; -} -// otherwise in Win/WinNT, start the Application directly +DdeConnection aTmp(sServer, OUString("SYSTEM")); +bSysTopic = !aTmp.GetError(); } -#if defined(WNT) -// check the suitability of starting the DDE server -const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); -static const char* aBadServers[] = { "cmd", "rundll32" }; -for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= sServer.equalsAscii(aBadServers[i]); - -// try to start the DDE server if it is not there already -bForbidden |= (bInWinExec != false); -if( !bForbidden ) +if( bSysTopic ) { -OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); -aCmdLine.append(".exe "); -aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); - -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead -nError = DDELINK_ERROR_APP; -else -{ -sal_uInt16 i; -for( i=0; i<5; i++ ) -{ -bInWinExec = sal_True; -Application::Reschedule(); -bInWinExec = sal_False; - -delete pConnection; -pConnection = new DdeConnection( sServer, sTopic ); -if( !pConnection->GetError() ) -break; -} - -if( i == 5 ) -{ -nError = DDELINK_ERROR_APP; -} -} -} -else -#endif // WNT -{ -nError = DDELINK_ERROR_APP; +// if the system topic works then the server is up but just doesn't know the original topic +nError = DDELINK_ERROR_DATA; +return false; } + +nError = DDELINK_ERROR_APP; } if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sfx2/source
sfx2/source/appl/impldde.cxx | 72 ++- 1 file changed, 11 insertions(+), 61 deletions(-) New commits: commit b76427635b8f00ac5b3eeda4dbe77f1e6d56f29b Author: Herbert Dürr Date: Mon Jul 14 07:17:59 2014 + Related: #i125226# expect DDE servers to be already up "soffice" is always up anyway and other DDE apps should be started manually (cherry picked from commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I52ebb26528952a4abf33ac95cb67c598f08b2790 (cherry picked from commit f4a8d7cd10cda57143b22519e16cdf8d5f19e759) Reviewed-on: https://gerrit.libreoffice.org/10288 Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 7ec637a..9fbe93d 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -198,9 +198,6 @@ bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, bool SvDDEObject::Connect( SvBaseLink * pSvLink ) { -#if defined(WNT) -static sal_Bool bInWinExec = sal_False; -#endif sal_uInt16 nLinkType = pSvLink->GetUpdateMode(); if( pConnection ) // Connection is already made { @@ -227,69 +224,22 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) pConnection = new DdeConnection( sServer, sTopic ); if( pConnection->GetError() ) { - // Is it possible to address the system-Topic? - // then the server is up, it just does not know the topic! -if( sTopic.equalsIgnoreAsciiCase( "SYSTEM" ) ) +// check if the DDE server knows the "SYSTEM" topic +bool bSysTopic = false; +if (!sTopic.equalsIgnoreAsciiCase("SYSTEM")) { -bool bSysTopic; -{ -DdeConnection aTmp(sServer, OUString("SYSTEM")); -bSysTopic = !aTmp.GetError(); -} - -if( bSysTopic ) -{ -nError = DDELINK_ERROR_DATA; -return false; -} -// otherwise in Win/WinNT, start the Application directly +DdeConnection aTmp(sServer, OUString("SYSTEM")); +bSysTopic = !aTmp.GetError(); } -#if defined(WNT) -// check the suitability of starting the DDE server -const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); -static const char* aBadServers[] = { "cmd", "rundll32" }; -for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= sServer.equalsAscii(aBadServers[i]); - -// try to start the DDE server if it is not there already -bForbidden |= (bInWinExec != false); -if( !bForbidden ) +if( bSysTopic ) { -OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); -aCmdLine.append(".exe "); -aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); - -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead -nError = DDELINK_ERROR_APP; -else -{ -sal_uInt16 i; -for( i=0; i<5; i++ ) -{ -bInWinExec = sal_True; -Application::Reschedule(); -bInWinExec = sal_False; - -delete pConnection; -pConnection = new DdeConnection( sServer, sTopic ); -if( !pConnection->GetError() ) -break; -} - -if( i == 5 ) -{ -nError = DDELINK_ERROR_APP; -} -} -} -else -#endif // WNT -{ -nError = DDELINK_ERROR_APP; +// if the system topic works then the server is up but just doesn't know the original topic +nError = DDELINK_ERROR_DATA; +return false; } + +nError = DDELINK_ERROR_APP; } if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - sfx2/source
sfx2/source/appl/impldde.cxx | 72 ++- 1 file changed, 11 insertions(+), 61 deletions(-) New commits: commit c6fe1d2e6555f38b6cb7249eeb258812b2fd7985 Author: Herbert Dürr Date: Mon Jul 14 07:17:59 2014 + Related: #i125226# expect DDE servers to be already up "soffice" is always up anyway and other DDE apps should be started manually (cherry picked from commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I52ebb26528952a4abf33ac95cb67c598f08b2790 (cherry picked from commit f4a8d7cd10cda57143b22519e16cdf8d5f19e759) Reviewed-on: https://gerrit.libreoffice.org/10287 Reviewed-by: Eike Rathke Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 7ec637a..9fbe93d 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -198,9 +198,6 @@ bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, bool SvDDEObject::Connect( SvBaseLink * pSvLink ) { -#if defined(WNT) -static sal_Bool bInWinExec = sal_False; -#endif sal_uInt16 nLinkType = pSvLink->GetUpdateMode(); if( pConnection ) // Connection is already made { @@ -227,69 +224,22 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) pConnection = new DdeConnection( sServer, sTopic ); if( pConnection->GetError() ) { - // Is it possible to address the system-Topic? - // then the server is up, it just does not know the topic! -if( sTopic.equalsIgnoreAsciiCase( "SYSTEM" ) ) +// check if the DDE server knows the "SYSTEM" topic +bool bSysTopic = false; +if (!sTopic.equalsIgnoreAsciiCase("SYSTEM")) { -bool bSysTopic; -{ -DdeConnection aTmp(sServer, OUString("SYSTEM")); -bSysTopic = !aTmp.GetError(); -} - -if( bSysTopic ) -{ -nError = DDELINK_ERROR_DATA; -return false; -} -// otherwise in Win/WinNT, start the Application directly +DdeConnection aTmp(sServer, OUString("SYSTEM")); +bSysTopic = !aTmp.GetError(); } -#if defined(WNT) -// check the suitability of starting the DDE server -const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); -static const char* aBadServers[] = { "cmd", "rundll32" }; -for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= sServer.equalsAscii(aBadServers[i]); - -// try to start the DDE server if it is not there already -bForbidden |= (bInWinExec != false); -if( !bForbidden ) +if( bSysTopic ) { -OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); -aCmdLine.append(".exe "); -aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); - -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead -nError = DDELINK_ERROR_APP; -else -{ -sal_uInt16 i; -for( i=0; i<5; i++ ) -{ -bInWinExec = sal_True; -Application::Reschedule(); -bInWinExec = sal_False; - -delete pConnection; -pConnection = new DdeConnection( sServer, sTopic ); -if( !pConnection->GetError() ) -break; -} - -if( i == 5 ) -{ -nError = DDELINK_ERROR_APP; -} -} -} -else -#endif // WNT -{ -nError = DDELINK_ERROR_APP; +// if the system topic works then the server is up but just doesn't know the original topic +nError = DDELINK_ERROR_DATA; +return false; } + +nError = DDELINK_ERROR_APP; } if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/salnativewidgets.cxx | 28 1 file changed, 16 insertions(+), 12 deletions(-) New commits: commit cc147840647a02cdca5d59bef373ce4ec73ee969 Author: Herbert Dürr Date: Mon Jul 14 14:59:11 2014 + #i125234# the scrollbar arrows disappeared in OSX>=10.7 so the native-widget assumptions about the scrollbar layout has to be adjusted. diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index 37d23b5..457e3c9 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -131,6 +131,10 @@ static ThemeButtonValue ImplGetButtonValue( ButtonValue aButtonValue ) } } +// the scrollbar arrows disappeared in OSX>=10.7 +#define SCROLL_BUTTON_HEIGHT 0 +#define SCROLL_BUTTON_WIDTH 0 + static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart, const Rectangle& rControlRect, Rectangle& rResultRect ) { @@ -141,38 +145,38 @@ static bool AquaGetScrollRect( /* TODO: int nScreen, */ ControlPart nPart, { case PART_BUTTON_UP: if( GetSalData()->mbIsScrollbarDoubleMax ) -rResultRect.Top() = rControlRect.Bottom() - 2*BUTTON_HEIGHT; -rResultRect.Bottom() = rResultRect.Top() + BUTTON_HEIGHT; +rResultRect.Top() = rControlRect.Bottom() - 2*SCROLL_BUTTON_HEIGHT; +rResultRect.Bottom() = rResultRect.Top() + SCROLL_BUTTON_HEIGHT; break; case PART_BUTTON_DOWN: -rResultRect.Top() = rControlRect.Bottom() - BUTTON_HEIGHT; +rResultRect.Top() = rControlRect.Bottom() - SCROLL_BUTTON_HEIGHT; break; case PART_BUTTON_LEFT: if( GetSalData()->mbIsScrollbarDoubleMax ) -rResultRect.Left() = rControlRect.Right() - 2*BUTTON_WIDTH; -rResultRect.Right() = rResultRect.Left() + BUTTON_WIDTH; +rResultRect.Left() = rControlRect.Right() - 2*SCROLL_BUTTON_WIDTH; +rResultRect.Right() = rResultRect.Left() + SCROLL_BUTTON_WIDTH; break; case PART_BUTTON_RIGHT: -rResultRect.Left() = rControlRect.Right() - BUTTON_WIDTH; +rResultRect.Left() = rControlRect.Right() - SCROLL_BUTTON_WIDTH; break; case PART_TRACK_HORZ_AREA: -rResultRect.Right() -= BUTTON_WIDTH + 1; +rResultRect.Right() -= SCROLL_BUTTON_WIDTH + 1; if( GetSalData()->mbIsScrollbarDoubleMax ) -rResultRect.Right() -= BUTTON_WIDTH; +rResultRect.Right() -= SCROLL_BUTTON_WIDTH; else -rResultRect.Left() += BUTTON_WIDTH + 1; +rResultRect.Left() += SCROLL_BUTTON_WIDTH + 1; break; case PART_TRACK_VERT_AREA: -rResultRect.Bottom() -= BUTTON_HEIGHT + 1; +rResultRect.Bottom() -= SCROLL_BUTTON_HEIGHT + 1; if( GetSalData()->mbIsScrollbarDoubleMax ) -rResultRect.Bottom() -= BUTTON_HEIGHT; +rResultRect.Bottom() -= SCROLL_BUTTON_HEIGHT; else -rResultRect.Top() += BUTTON_HEIGHT + 1; +rResultRect.Top() += SCROLL_BUTTON_HEIGHT + 1; break; case PART_THUMB_HORZ: if( GetSalData()->mbIsScrollbarDoubleMax ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/appl/impldde.cxx | 72 ++- 1 file changed, 11 insertions(+), 61 deletions(-) New commits: commit f4a8d7cd10cda57143b22519e16cdf8d5f19e759 Author: Herbert Dürr Date: Mon Jul 14 07:17:59 2014 + Related: #i125226# expect DDE servers to be already up "soffice" is always up anyway and other DDE apps should be started manually (cherry picked from commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I52ebb26528952a4abf33ac95cb67c598f08b2790 diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 1035241..cf34acc 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -186,9 +186,6 @@ bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, bool SvDDEObject::Connect( SvBaseLink * pSvLink ) { -#if defined(WNT) -static sal_Bool bInWinExec = sal_False; -#endif sal_uInt16 nLinkType = pSvLink->GetUpdateMode(); if( pConnection ) // Connection is already made { @@ -215,69 +212,22 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) pConnection = new DdeConnection( sServer, sTopic ); if( pConnection->GetError() ) { - // Is it possible to address the system-Topic? - // then the server is up, it just does not know the topic! -if( sTopic.equalsIgnoreAsciiCase( "SYSTEM" ) ) +// check if the DDE server knows the "SYSTEM" topic +bool bSysTopic = false; +if (!sTopic.equalsIgnoreAsciiCase("SYSTEM")) { -bool bSysTopic; -{ -DdeConnection aTmp(sServer, OUString("SYSTEM")); -bSysTopic = !aTmp.GetError(); -} - -if( bSysTopic ) -{ -nError = DDELINK_ERROR_DATA; -return false; -} -// otherwise in Win/WinNT, start the Application directly +DdeConnection aTmp(sServer, OUString("SYSTEM")); +bSysTopic = !aTmp.GetError(); } -#if defined(WNT) -// check the suitability of starting the DDE server -const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); -static const char* aBadServers[] = { "cmd", "rundll32" }; -for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= sServer.equalsAscii(aBadServers[i]); - -// try to start the DDE server if it is not there already -bForbidden |= (bInWinExec != false); -if( !bForbidden ) +if( bSysTopic ) { -OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); -aCmdLine.append(".exe "); -aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); - -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead -nError = DDELINK_ERROR_APP; -else -{ -sal_uInt16 i; -for( i=0; i<5; i++ ) -{ -bInWinExec = sal_True; -Application::Reschedule(); -bInWinExec = sal_False; - -delete pConnection; -pConnection = new DdeConnection( sServer, sTopic ); -if( !pConnection->GetError() ) -break; -} - -if( i == 5 ) -{ -nError = DDELINK_ERROR_APP; -} -} -} -else -#endif // WNT -{ -nError = DDELINK_ERROR_APP; +// if the system topic works then the server is up but just doesn't know the original topic +nError = DDELINK_ERROR_DATA; +return false; } + +nError = DDELINK_ERROR_APP; } if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/source
sfx2/source/appl/impldde.cxx | 72 ++- 1 file changed, 11 insertions(+), 61 deletions(-) New commits: commit e0bfdb26cef87c8d3b3435293116a33cf99c11f0 Author: Herbert Dürr Date: Mon Jul 14 07:17:59 2014 + #i125226# expect DDE servers to be already up "soffice" is always up anyway and other DDE apps should be started manually diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 3fbcaa7..8add5c2 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -209,9 +209,6 @@ sal_Bool SvDDEObject::GetData( ::com::sun::star::uno::Any & rData /*out param*/, sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) { -#if defined(WNT) -static sal_Bool bInWinExec = sal_False; -#endif sal_uInt16 nLinkType = pSvLink->GetUpdateMode(); if( pConnection ) // Verbindung steht ja schon { @@ -238,69 +235,22 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) pConnection = new DdeConnection( sServer, sTopic ); if( pConnection->GetError() ) { -// kann man denn das System-Topic ansprechen ? -// dann ist der Server oben, kennt nur nicht das Topic! -if( sTopic.EqualsIgnoreCaseAscii( "SYSTEM" ) ) +// check if the DDE server knows the "SYSTEM" topic +bool bSysTopic = false; +if( !sTopic.EqualsIgnoreCaseAscii( "SYSTEM" )) { -sal_Bool bSysTopic; -{ -DdeConnection aTmp( sServer, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "SYSTEM" ) ) ); -bSysTopic = !aTmp.GetError(); -} - -if( bSysTopic ) -{ -nError = DDELINK_ERROR_DATA; -return sal_False; -} -// ansonsten unter Win/WinNT die Applikation direkt starten +DdeConnection aTmp( sServer, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "SYSTEM" ) ) ); +bSysTopic = !aTmp.GetError(); } -#if defined(WNT) -// check the suitability of starting the DDE server -const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (sServer.SearchChar( L":./%\\") != STRING_NOTFOUND); -static const char* aBadServers[] = { "cmd", "rundll32" }; -for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL); - -// try to start the DDE server if it is not there already -bForbidden |= (bInWinExec != sal_False); -if( !bForbidden ) +if( bSysTopic ) { -ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US ); -aCmdLine.Append( ".exe " ); -aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) ); - -if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead -nError = DDELINK_ERROR_APP; -else -{ -sal_uInt16 i; -for( i=0; i<5; i++ ) -{ -bInWinExec = sal_True; -Application::Reschedule(); -bInWinExec = sal_False; - -delete pConnection; -pConnection = new DdeConnection( sServer, sTopic ); -if( !pConnection->GetError() ) -break; -} - -if( i == 5 ) -{ -nError = DDELINK_ERROR_APP; -} -} -} -else -#endif // WNT -{ -nError = DDELINK_ERROR_APP; +// if the system topic works then the server is up but just doesn't know the original topic +nError = DDELINK_ERROR_DATA; +return sal_False; } + +nError = DDELINK_ERROR_APP; } if( LINKUPDATE_ALWAYS == nLinkType && !pLink && !pConnection->GetError() ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2-6' - sfx2/source
sfx2/source/appl/impldde.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 9d54cde32053e71177964adff87ecdc994383287 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + Related: #i125226# don't try to access known-bad DDE servers (cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4 (cherry picked from commit b16f164650f8345e51bf0b0c73bf9c8eee775bc2) Related: #i125226# some macro preferences are directly... applicable to DDE servers (cherry picked from commit 2c835e761e1e9ddb6794895e6f3538b918160dd1) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: Ic16b3df34ac1b003a8a5cabab15ea655d05bdd18 Related: #i125226# typo fix (cherry picked from commit 727ea069c6342e01a50c8b068ec302574b251cbd) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I8db53b7e8529d05e660a2d69e669b44c9045712c (cherry picked from commit 13b68e24db26374ca17572de9abb429edeac32e9) Related: #i125226# disallow absolute and relative paths for DDE servers (cherry picked from commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I127add375a127dbbd0eaf12a10884e2636f1a332 (cherry picked from commit d1fc47793c1efbe9ff5271656283211647dd0b33) Reviewed-on: https://gerrit.libreoffice.org/10203 Reviewed-by: Markus Mohrhard Reviewed-by: Eike Rathke Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index cc6431d..b0b79a21 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -25,6 +25,7 @@ #include "impldde.hxx" +#include #include #include #include @@ -45,6 +46,8 @@ #include #include +#include + #define DDELINK_ERROR_APP 1 #define DDELINK_ERROR_DATA 2 @@ -243,15 +246,23 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server not up, try once more to start it. -if( !bInWinExec ) +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); +bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); +static const char* aBadServers[] = { "cmd", "rundll32" }; +for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= sServer.equalsAscii(aBadServers[i]); + +// try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != false); +if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-0' - sfx2/source
sfx2/source/appl/impldde.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 77e980c5afc845bbfa075bdf934d424655e594f6 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + Related: #i125226# don't try to access known-bad DDE servers (cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4 (cherry picked from commit b16f164650f8345e51bf0b0c73bf9c8eee775bc2) Related: #i125226# some macro preferences are directly... applicable to DDE servers (cherry picked from commit 2c835e761e1e9ddb6794895e6f3538b918160dd1) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: Ic16b3df34ac1b003a8a5cabab15ea655d05bdd18 Related: #i125226# typo fix (cherry picked from commit 727ea069c6342e01a50c8b068ec302574b251cbd) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I8db53b7e8529d05e660a2d69e669b44c9045712c (cherry picked from commit 13b68e24db26374ca17572de9abb429edeac32e9) Related: #i125226# disallow absolute and relative paths for DDE servers (cherry picked from commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I127add375a127dbbd0eaf12a10884e2636f1a332 (cherry picked from commit d1fc47793c1efbe9ff5271656283211647dd0b33) Reviewed-on: https://gerrit.libreoffice.org/10201 Reviewed-by: Markus Mohrhard Reviewed-by: Eike Rathke Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 501346a..7ec637a 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -25,6 +25,7 @@ #include "impldde.hxx" +#include #include #include #include @@ -45,6 +46,8 @@ #include #include +#include + #define DDELINK_ERROR_APP 1 #define DDELINK_ERROR_DATA 2 @@ -243,15 +246,23 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server not up, try once more to start it. -if( !bInWinExec ) +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); +bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); +static const char* aBadServers[] = { "cmd", "rundll32" }; +for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= sServer.equalsAscii(aBadServers[i]); + +// try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != false); +if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sfx2/source
sfx2/source/appl/impldde.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit 3d1cb5397d95bba5426ac5372bbd7644aac88409 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + Related: #i125226# don't try to access known-bad DDE servers (cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4 (cherry picked from commit b16f164650f8345e51bf0b0c73bf9c8eee775bc2) Related: #i125226# some macro preferences are directly... applicable to DDE servers (cherry picked from commit 2c835e761e1e9ddb6794895e6f3538b918160dd1) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: Ic16b3df34ac1b003a8a5cabab15ea655d05bdd18 Related: #i125226# typo fix (cherry picked from commit 727ea069c6342e01a50c8b068ec302574b251cbd) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I8db53b7e8529d05e660a2d69e669b44c9045712c (cherry picked from commit 13b68e24db26374ca17572de9abb429edeac32e9) Related: #i125226# disallow absolute and relative paths for DDE servers (cherry picked from commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I127add375a127dbbd0eaf12a10884e2636f1a332 (cherry picked from commit d1fc47793c1efbe9ff5271656283211647dd0b33) Reviewed-on: https://gerrit.libreoffice.org/10202 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index cc6431d..b0b79a21 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -25,6 +25,7 @@ #include "impldde.hxx" +#include #include #include #include @@ -45,6 +46,8 @@ #include #include +#include + #define DDELINK_ERROR_APP 1 #define DDELINK_ERROR_DATA 2 @@ -243,15 +246,23 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server not up, try once more to start it. -if( !bInWinExec ) +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); +bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); +static const char* aBadServers[] = { "cmd", "rundll32" }; +for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= sServer.equalsAscii(aBadServers[i]); + +// try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != false); +if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sfx2/source
sfx2/source/appl/impldde.cxx | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) New commits: commit ff91dd51e2d1db1039e54617d99a11fe27ccd1c9 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + Related: #i125226# don't try to access known-bad DDE servers (cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4 (cherry picked from commit b16f164650f8345e51bf0b0c73bf9c8eee775bc2) Related: #i125226# some macro preferences are directly... applicable to DDE servers (cherry picked from commit 2c835e761e1e9ddb6794895e6f3538b918160dd1) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: Ic16b3df34ac1b003a8a5cabab15ea655d05bdd18 Related: #i125226# typo fix (cherry picked from commit 727ea069c6342e01a50c8b068ec302574b251cbd) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I8db53b7e8529d05e660a2d69e669b44c9045712c (cherry picked from commit 13b68e24db26374ca17572de9abb429edeac32e9) Related: #i125226# disallow absolute and relative paths for DDE servers (cherry picked from commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I127add375a127dbbd0eaf12a10884e2636f1a332 (cherry picked from commit d1fc47793c1efbe9ff5271656283211647dd0b33) Reviewed-on: https://gerrit.libreoffice.org/10200 Reviewed-by: Markus Mohrhard Tested-by: Markus Mohrhard diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 501346a..7ec637a 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -25,6 +25,7 @@ #include "impldde.hxx" +#include #include #include #include @@ -45,6 +46,8 @@ #include #include +#include + #define DDELINK_ERROR_APP 1 #define DDELINK_ERROR_DATA 2 @@ -243,15 +246,23 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server not up, try once more to start it. -if( !bInWinExec ) +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); +bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); +static const char* aBadServers[] = { "cmd", "rundll32" }; +for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= sServer.equalsAscii(aBadServers[i]); + +// try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != false); +if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - sfx2/source
sfx2/source/appl/impldde.cxx | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) New commits: commit d1fc47793c1efbe9ff5271656283211647dd0b33 Author: Herbert Dürr Date: Thu Jul 10 09:11:07 2014 + Related: #i125226# disallow absolute and relative paths for DDE servers (cherry picked from commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I127add375a127dbbd0eaf12a10884e2636f1a332 diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 8a93a7e..7ec637a 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -25,6 +25,7 @@ #include "impldde.hxx" +#include #include #include #include @@ -248,19 +249,20 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) // check the suitability of starting the DDE server const SvtSecurityOptions aSecOpts; bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (bInWinExec != false); +bForbidden |= (comphelper::string::indexOfAny(sServer, L":./%\\") != -1); static const char* aBadServers[] = { "cmd", "rundll32" }; for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) bForbidden |= sServer.equalsAscii(aBadServers[i]); // try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != false); if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US)); -if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { commit 13b68e24db26374ca17572de9abb429edeac32e9 Author: Herbert Dürr Date: Wed Jul 9 15:51:49 2014 + Related: #i125226# some macro preferences are directly... applicable to DDE servers (cherry picked from commit 2c835e761e1e9ddb6794895e6f3538b918160dd1) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: Ic16b3df34ac1b003a8a5cabab15ea655d05bdd18 Related: #i125226# typo fix (cherry picked from commit 727ea069c6342e01a50c8b068ec302574b251cbd) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: I8db53b7e8529d05e660a2d69e669b44c9045712c diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 3bb38ba..8a93a7e 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -45,6 +45,8 @@ #include #include +#include + #define DDELINK_ERROR_APP 1 #define DDELINK_ERROR_DATA 2 @@ -243,13 +245,15 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) -bool bForbidden = bInWinExec; -// TODO: also check the security level -static const char* aBadServers[] = { "cmd" }; +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); +bForbidden |= (bInWinExec != false); +static const char* aBadServers[] = { "cmd", "rundll32" }; for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) bForbidden |= sServer.equalsAscii(aBadServers[i]); -// try to start the DDE server if it is not there +// try to start the DDE server if it is not there already if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: sfx2/source
sfx2/source/appl/impldde.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit b16f164650f8345e51bf0b0c73bf9c8eee775bc2 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + Related: #i125226# don't try to access known-bad DDE servers (cherry picked from commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132) Conflicts: sfx2/source/appl/impldde.cxx Change-Id: If4dcd49cfe15188d06e4e06cd8e58cdcc66ed5a4 diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 501346a..3bb38ba 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -243,9 +243,14 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server not up, try once more to start it. -if( !bInWinExec ) +bool bForbidden = bInWinExec; +// TODO: also check the security level +static const char* aBadServers[] = { "cmd" }; +for (size_t i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= sServer.equalsAscii(aBadServers[i]); + +// try to start the DDE server if it is not there +if( !bForbidden ) { OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US)); aCmdLine.append(".exe "); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/source
sfx2/source/appl/impldde.cxx |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) New commits: commit 6b64ada6e3a902ac4b44fe49476514d49138d4d4 Author: Herbert Dürr Date: Thu Jul 10 09:11:07 2014 + #i125226# disallow absolute and relative paths for DDE servers diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 76981f9..3fbcaa7 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -260,19 +260,20 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) // check the suitability of starting the DDE server const SvtSecurityOptions aSecOpts; bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); -bForbidden |= (bInWinExec != sal_False); +bForbidden |= (sServer.SearchChar( L":./%\\") != STRING_NOTFOUND); static const char* aBadServers[] = { "cmd", "rundll32" }; for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL ); +bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL); // try to start the DDE server if it is not there already +bForbidden |= (bInWinExec != sal_False); if( !bForbidden ) { ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US ); aCmdLine.Append( ".exe " ); aCmdLine.Append( ByteString( sTopic, RTL_TEXTENCODING_ASCII_US ) ); -if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 ) +if( WinExec( aCmdLine.GetBuffer(), SW_SHOWMINIMIZED ) < 32 ) // TODO: use CreateProcess() instead nError = DDELINK_ERROR_APP; else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sfx2/source
sfx2/source/appl/impldde.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 727ea069c6342e01a50c8b068ec302574b251cbd Author: Herbert Dürr Date: Wed Jul 9 21:14:50 2014 + #i125226# typo fix diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 8bc1cb6..76981f9 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -259,7 +259,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) #if defined(WNT) // check the suitability of starting the DDE server const SvtSecurityOptions aSecOpts; -bool bForbidden = (aSecOpts.GetMacroSecurityLevel() != eNEVER_EXECUTE); +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() == eNEVER_EXECUTE); bForbidden |= (bInWinExec != sal_False); static const char* aBadServers[] = { "cmd", "rundll32" }; for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - sfx2/source sysui/desktop
sfx2/source/appl/impldde.cxx| 15 --- sysui/desktop/debian/makefile.mk| 20 ++-- sysui/desktop/productversion.mk |2 +- sysui/desktop/slackware/makefile.mk | 20 ++-- 4 files changed, 33 insertions(+), 24 deletions(-) New commits: commit 2c835e761e1e9ddb6794895e6f3538b918160dd1 Author: Herbert Dürr Date: Wed Jul 9 15:51:49 2014 + #i125226# some macro preferences are directly applicable to DDE servers diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index 2dfe160..8bc1cb6 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -49,6 +49,8 @@ #include #include +#include + #define DDELINK_COLD0 #define DDELINK_HOT 1 @@ -255,13 +257,15 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) -bool bForbidden = bInWinExec; -// TODO: also check the security level -static const char* aBadServers[] = { "cmd" }; +// check the suitability of starting the DDE server +const SvtSecurityOptions aSecOpts; +bool bForbidden = (aSecOpts.GetMacroSecurityLevel() != eNEVER_EXECUTE); +bForbidden |= (bInWinExec != sal_False); +static const char* aBadServers[] = { "cmd", "rundll32" }; for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) -bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL); +bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL ); -// try to start the DDE server if it is not there +// try to start the DDE server if it is not there already if( !bForbidden ) { ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US ); commit 88de6a59d9d7933b86fdcba733277aa4fbd5e132 Author: Herbert Dürr Date: Wed Jul 9 15:23:59 2014 + #i125226# don't try to access known-bad DDE servers diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx index c4d8ae6..2dfe160 100644 --- a/sfx2/source/appl/impldde.cxx +++ b/sfx2/source/appl/impldde.cxx @@ -255,9 +255,14 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink ) } #if defined(WNT) - -// Server nicht da, starten und nochmal versuchen -if( !bInWinExec ) +bool bForbidden = bInWinExec; +// TODO: also check the security level +static const char* aBadServers[] = { "cmd" }; +for( int i = 0; i < sizeof(aBadServers)/sizeof(*aBadServers); ++i) +bForbidden |= (sServer.CompareIgnoreCaseToAscii( aBadServers[i]) == COMPARE_EQUAL); + +// try to start the DDE server if it is not there +if( !bForbidden ) { ByteString aCmdLine( sServer, RTL_TEXTENCODING_ASCII_US ); aCmdLine.Append( ".exe " ); commit e58576b77160240afb952e55b1f125cf703ae195 Author: Oliver-Rainer Wittmann Date: Wed Jul 9 14:37:08 2014 + 124940: further 'version numbers' which need to be adapted to 4.2 diff --git a/sysui/desktop/debian/makefile.mk b/sysui/desktop/debian/makefile.mk index 30d886c..96c630a 100644 --- a/sysui/desktop/debian/makefile.mk +++ b/sysui/desktop/debian/makefile.mk @@ -41,7 +41,7 @@ TARGET=debian .IF "$(PKGFORMAT)"!="$(PKGFORMAT:s/deb//)" -DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i4.0-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb) +DEBFILES=$(foreach,i,{$(PRODUCTLIST)} $(PKGDIR)$/$i4.2-$(TARGET)-menus_$(PKGVERSION.$i)-$(PKGREV)_all.deb) .ENDIF @@ -56,22 +56,22 @@ ALLTAR : $(DEBFILES) %/DEBIAN/control : $$(@:f) @$(MKDIRHIER) $(@:d) $*$/etc $*$/usr/share/applnk/Office $*$/usr/lib/menu -ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/4.0//)) $*$/etc$/ -/bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/4.0//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh" -@cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/4.0//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/4.0//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/4.0//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:f:s/-/ /:1:s/4.0//))/' > $*$/usr/lib/menu/$(*:f:s/_/ /:1:s/4.0//) -echo "Package: $(*:f:s/_/ /:1:s/4.0//)" > $@ -cat $(@:f) | tr -d "\015" | sed "s/%productname/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/4.0//))/" >> $@ -echo "Version: $(PKGVERSION.$(*:f:s/-/ /:1:s/4.0//))-$(PKGREV)" >> $@ +ln -sf /opt/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/4.2//)) $*$/etc$/ +/bin/sh -c -x "cd $(COMMONMISC)$/$(*:f:s/-/ /:1:s/4.2//) && DESTDIR=$(shell @cd $*; pwd) ICON_PREFIX=$(ICONPREFIX) KDEMAINDIR=/usr GNOMEDIR=/usr create_tree.sh" +@cat openoffice.org-debian-menus | sed -e 's/%PRODUCTNAME/$(PRODUCTNAME.$(*:f:s/-/ /:1:s/4.2//)) $(PRODUCTVERSION.$(*:f:s/-/ /:1:s/4.2//))/' -e 's/%PREFIX/$(UNIXFILENAME.$(*:f:s/-/ /:1:s/4.2//))/' -e 's/%ICONPREFIX/$(ICONPREFIX.$(*:
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/quartz
vcl/quartz/ctlayout.cxx | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) New commits: commit 4adebd56d21cf104dca28a62c7015466a7a0c357 Author: Herbert Dürr Date: Tue May 20 12:00:50 2014 + Resolves: #i124935# fix expanded/condensed text breaking... in the CoreText engine the concept of an extra-width per code-unit was obsolete at least since apps supported unicode with its different normalization forms, diacritical marks, surrogate-pairs, non-printing characters such as ZWJ/ZWNJ/RLM, etc. so of course modern engines like CoreText don't aid this typographical crime. The fix here extends the CTLayout::GetTextBreak() method to handle the obsolete semantic of per code-unit extra-widths by successively approximating the number of involved code-units. (cherry picked from commit a9b9ceff86f35be1eeff5f251d24e338db760a1e) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I52a7f7488a9e8a303ed7271df2a24a3c85098ce3 (cherry picked from commit 687f0c9300d499b78deea2890b4c2019adb2d67d) Reviewed-on: https://gerrit.libreoffice.org/9627 Reviewed-by: Christian Lohmaier Tested-by: Christian Lohmaier diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 1d96f90..f0cdc8a 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -569,20 +569,39 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const return nPixWidth; } -sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long /*nCharExtra*/, int nFactor ) const +sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const { if( !mpCTLine ) return -1; CTTypesetterRef aCTTypeSetter = CTTypesetterCreateWithAttributedString( mpAttrString ); -const double fCTMaxWidth = (double)nMaxWidth / nFactor; -CFIndex nIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth ); -CFRelease( aCTTypeSetter ); - -if( nIndex >= mnCharCount ) -return -1; +CFIndex nBestGuess = (nCharExtra >= 0) ? 0 : mnCharCount; +for( int i = 1; i <= mnCharCount; i *= 2 ) +{ +// guess the target width considering char-extra expansion/condensation +const double nTargetWidth = nMaxWidth - nBestGuess * nCharExtra; +const double fCTMaxWidth = nTargetWidth / nFactor; +// calculate the breaking index for the guessed target width +const CFIndex nNewIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth ); +if( nNewIndex >= mnCharCount ) { +CFRelease( aCTTypeSetter ); +return -1; +} +// check if the original extra-width guess was good +if( !nCharExtra ) +nBestGuess = nNewIndex; +if( nBestGuess == nNewIndex ) +break; +// prepare another round for a different number of characters +CFIndex nNewGuess = (nNewIndex + nBestGuess + 1) / 2; +if( nNewGuess == nBestGuess ) +nNewGuess += (nNewIndex > nBestGuess) ? +1 : -1; +nBestGuess = nNewGuess; +} -nIndex += mnMinCharPos; +// suggest the best fitting cluster break as breaking position +CFRelease( aCTTypeSetter ); +const int nIndex = nBestGuess + mnMinCharPos; return nIndex; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm |5 +++-- vcl/aqua/source/a11y/aqua11ytextwrapper.mm |6 +- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit 0a4564b42de0fc61253ae4e69039860c09e53eba Author: Herbert Dürr Date: Wed Jun 25 11:40:58 2014 + #i122471# make the Mac lookup feature handle the correct word diff --git a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm index 39ec446..5f30b34 100644 --- a/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextattributeswrapper.mm @@ -227,12 +227,13 @@ using namespace ::rtl; [ string beginEditing ]; // add default attributes for whole string Sequence < PropertyValue > defaultAttributes = [ wrapper accessibleTextAttributes ] -> getDefaultAttributes ( emptySequence ); -[ AquaA11yTextAttributesWrapper applyAttributesFrom: defaultAttributes toString: string forRange: [ origRange rangeValue ] storeDefaultsTo: wrapper getDefaultsFrom: nil ]; +NSRange offsetRange = NSMakeRange ( 0, len ); +[ AquaA11yTextAttributesWrapper applyAttributesFrom: defaultAttributes toString: string forRange: offsetRange storeDefaultsTo: wrapper getDefaultsFrom: nil ]; // add attributes for attribute run(s) while ( currentIndex < endIndex ) { TextSegment textSegment = [ wrapper accessibleText ] -> getTextAtIndex ( currentIndex, AccessibleTextType::ATTRIBUTE_RUN ); int endOfRange = endIndex > textSegment.SegmentEnd ? textSegment.SegmentEnd : endIndex; -NSRange rangeForAttributeRun = NSMakeRange ( currentIndex, endOfRange - currentIndex ); +NSRange rangeForAttributeRun = NSMakeRange ( currentIndex-loc, endOfRange - currentIndex ); // add run attributes Sequence < PropertyValue > attributes = [ wrapper accessibleTextAttributes ] -> getRunAttributes ( currentIndex, emptySequence ); [ AquaA11yTextAttributesWrapper applyAttributesFrom: attributes toString: string forRange: rangeForAttributeRun storeDefaultsTo: nil getDefaultsFrom: wrapper ]; diff --git a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm index 1320b09..616bf08 100644 --- a/vcl/aqua/source/a11y/aqua11ytextwrapper.mm +++ b/vcl/aqua/source/a11y/aqua11ytextwrapper.mm @@ -210,7 +210,11 @@ using namespace ::rtl; +(id)rangeForPositionAttributeForElement:(AquaA11yWrapper *)wrapper forParameter:(id)point { NSValue * value = nil; -sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint ( [ AquaA11yUtil nsPointToVclPoint: point ] ); +Point aPoint( [ AquaA11yUtil nsPointToVclPoint: point ]); +const Point screenPos = [ wrapper accessibleComponent ] -> getLocationOnScreen(); +aPoint.X -= screenPos.X; +aPoint.Y -= screenPos.Y; +sal_Int32 index = [ wrapper accessibleText ] -> getIndexAtPoint( aPoint ); if ( index > -1 ) { value = [ AquaA11yTextWrapper rangeForIndexAttributeForElement: wrapper forParameter: [ NSNumber numberWithLong: index ] ]; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - l10ntools/source
l10ntools/source/export2.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit cb8f2e44c2772af90e7be12dfc8bbf167f31f56b Author: Herbert Dürr Date: Tue Jun 24 09:48:21 2014 + #i125143# reduce helpex stack usage to prevent intermittent failures moving the 1MB copy buffer from the stack to the heap solves the problem that was first observed on the Windows buildbot. diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx index 1608a09..fb9df40 100644 --- a/l10ntools/source/export2.cxx +++ b/l10ntools/source/export2.cxx @@ -36,6 +36,7 @@ #include #include #include +#include using namespace std; // @@ -339,9 +340,6 @@ void Export::RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename ){ bool Export::CopyFile( const ByteString& source , const ByteString& dest ) { //cout << "CopyFile( " << source.GetBuffer() << " , " << dest.GetBuffer() << " )\n"; -static const int BUFFERSIZE = 0x10; -char buf[ BUFFERSIZE ]; - FILE* IN_FILE = fopen( source.GetBuffer() , "r" ); if( IN_FILE == NULL ) { @@ -357,6 +355,10 @@ bool Export::CopyFile( const ByteString& source , const ByteString& dest ) return false; } +static const int BUFFERSIZE = 0x10; +boost::shared_ptr aScopedBuffer( new char[BUFFERSIZE] ); +char* buf = aScopedBuffer.get(); + bool bOk = true; while( bOk ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - l10ntools/source
l10ntools/source/export2.cxx | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) New commits: commit b4c9dd86123180e7ca5ffade6cc5d41ce54c7885 Author: Herbert Dürr Date: Mon Jun 23 12:48:27 2014 + #i125143# use bulk-copying instead of line-wise in helpex Export::CopyFile() This simple change has been measured to speed up the helpex by almost 30%. diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx index 34df550..1608a09 100644 --- a/l10ntools/source/export2.cxx +++ b/l10ntools/source/export2.cxx @@ -339,7 +339,7 @@ void Export::RemoveUTF8ByteOrderMarkerFromFile( const ByteString &rFilename ){ bool Export::CopyFile( const ByteString& source , const ByteString& dest ) { //cout << "CopyFile( " << source.GetBuffer() << " , " << dest.GetBuffer() << " )\n"; -const int BUFFERSIZE= 8192; +static const int BUFFERSIZE = 0x10; char buf[ BUFFERSIZE ]; FILE* IN_FILE = fopen( source.GetBuffer() , "r" ); @@ -357,27 +357,30 @@ bool Export::CopyFile( const ByteString& source , const ByteString& dest ) return false; } -while( fgets( buf , BUFFERSIZE , IN_FILE ) != NULL ) +bool bOk = true; +while( bOk ) { -if( fputs( buf , OUT_FILE ) == EOF ) +if( feof( IN_FILE ) ) +break; +const size_t nBytesRead = fread( buf, 1, BUFFERSIZE, IN_FILE ); +if( nBytesRead <= 0 ) +{ +if( ferror( IN_FILE ) ) +{ +cerr << "Export::CopyFile WARNING: Read problems " << dest.GetBuffer() << "\n"; +bOk = false; +} +} +else if( fwrite( buf, 1, nBytesRead, OUT_FILE ) <= 0 ) { cerr << "Export::CopyFile WARNING: Write problems " << source.GetBuffer() << "\n"; -fclose( IN_FILE ); -fclose( OUT_FILE ); -return false; +bOk = false; } } -if( ferror( IN_FILE ) ) -{ -cerr << "Export::CopyFile WARNING: Read problems " << dest.GetBuffer() << "\n"; -fclose( IN_FILE ); -fclose( OUT_FILE ); -return false; -} fclose ( IN_FILE ); fclose ( OUT_FILE ); -return true; +return bOk; } /*/ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/osx vcl/unx
vcl/osx/documentfocuslistener.cxx | 51 +++--- vcl/unx/gtk/a11y/atkutil.cxx | 40 +++-- 2 files changed, 47 insertions(+), 44 deletions(-) New commits: commit 5232d01ee5afea97b80da39b082012ee4c1a1409 Author: Herbert Dürr Date: Mon Jun 23 07:55:44 2014 + Resolves: #i124970# fix DocumentFocusListener::notifyEvent's... handling of IndexOutOfBoundsException the DocumentFocusListener::notifyEvent() throw list only allows a RuntimeException to propagate. The methods called in notifyEvent() allow IndexOutOfBoundsException though, so it must be handled in all cases to prevent C++ from invoking its unexpected() abort mechanisms. Ceterum censeo, non-empty throw lists should be removed altogether... (cherry picked from commit 4da0e442f0fd4838e93e7316c24cfeef9289207d) Conflicts: vcl/osx/documentfocuslistener.cxx vcl/unx/gtk/a11y/atkutil.cxx Change-Id: Ie0b783832314ee5ec376a0c3c2cd67e4a70e218b diff --git a/vcl/osx/documentfocuslistener.cxx b/vcl/osx/documentfocuslistener.cxx index 9087003..ee1e1f4 100644 --- a/vcl/osx/documentfocuslistener.cxx +++ b/vcl/osx/documentfocuslistener.cxx @@ -48,10 +48,10 @@ void SAL_CALL DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) throw( RuntimeException, std::exception ) { -switch( aEvent.EventId ) -{ -case AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = AccessibleStateType::INVALID; aEvent.NewValue >>= nState; @@ -59,34 +59,35 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) if( AccessibleStateType::FOCUSED == nState ) m_aFocusTracker.setFocusedObject( getAccessible(aEvent) ); } -catch(const IndexOutOfBoundsException &) +break; + +case AccessibleEventId::CHILD: { -OSL_TRACE("Focused object has invalid index in parent"); +Reference< XAccessible > xChild; +if( (aEvent.OldValue >>= xChild) && xChild.is() ) +detachRecursive(xChild); + +if( (aEvent.NewValue >>= xChild) && xChild.is() ) +attachRecursive(xChild); } break; -case AccessibleEventId::CHILD: -{ -Reference< XAccessible > xChild; -if( (aEvent.OldValue >>= xChild) && xChild.is() ) -detachRecursive(xChild); - -if( (aEvent.NewValue >>= xChild) && xChild.is() ) -attachRecursive(xChild); -} +case AccessibleEventId::INVALIDATE_ALL_CHILDREN: +{ +Reference< XAccessible > xAccessible( getAccessible(aEvent) ); +detachRecursive(xAccessible); +attachRecursive(xAccessible); +} +OSL_TRACE( "Invalidate all children called\n" ); break; -case AccessibleEventId::INVALIDATE_ALL_CHILDREN: -{ -Reference< XAccessible > xAccessible( getAccessible(aEvent) ); -detachRecursive(xAccessible); -attachRecursive(xAccessible); +default: +break; } - -OSL_TRACE( "Invalidate all children called" ); -break; -default: -break; +} +catch (const IndexOutOfBoundsException&) +{ +OSL_TRACE("Focused object has invalid index in parent"); } } diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index f662bbd..96990c9 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -204,10 +204,10 @@ void DocumentFocusListener::disposing( const lang::EventObject& aEvent ) void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent ) throw( uno::RuntimeException, std::exception ) { -switch( aEvent.EventId ) -{ -case accessibility::AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case accessibility::AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = accessibility::AccessibleStateType::INVALID; aEvent.NewValue >>= nState; @@ -215,28 +215,30 @@ void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObj if( accessibility::AccessibleStateType::FOCUSED == nState ) atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) ); } -catch (const lang::IndexOutOfBoundsException&) -{ -g_warning("Focused object has invalid index in parent"); -} b
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua vcl/unx
vcl/aqua/source/a11y/documentfocuslistener.cxx | 51 - vcl/unx/gtk/a11y/atkutil.cxx | 42 ++-- 2 files changed, 48 insertions(+), 45 deletions(-) New commits: commit 4da0e442f0fd4838e93e7316c24cfeef9289207d Author: Herbert Dürr Date: Mon Jun 23 07:55:44 2014 + #i124970# fix DocumentFocusListener::notifyEvent's handling of IndexOutOfBoundsException the DocumentFocusListener::notifyEvent() throw list only allows a RuntimeException to propagate. The methods called in notifyEvent() allow IndexOutOfBoundsException though, so it must be handled in all cases to prevent C++ from invoking its unexpected() abort mechanisms. Ceterum censeo, non-empty throw lists should be removed altogether... diff --git a/vcl/aqua/source/a11y/documentfocuslistener.cxx b/vcl/aqua/source/a11y/documentfocuslistener.cxx index 3fbda71..b15d4f8 100644 --- a/vcl/aqua/source/a11y/documentfocuslistener.cxx +++ b/vcl/aqua/source/a11y/documentfocuslistener.cxx @@ -65,10 +65,10 @@ void SAL_CALL DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) throw( RuntimeException ) { -switch( aEvent.EventId ) -{ -case AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = AccessibleStateType::INVALID; aEvent.NewValue >>= nState; @@ -76,34 +76,35 @@ DocumentFocusListener::notifyEvent( const AccessibleEventObject& aEvent ) if( AccessibleStateType::FOCUSED == nState ) m_aFocusTracker.setFocusedObject( getAccessible(aEvent) ); } -catch(IndexOutOfBoundsException e) -{ -OSL_TRACE("Focused object has invalid index in parent"); -} break; -case AccessibleEventId::CHILD: -{ -Reference< XAccessible > xChild; -if( (aEvent.OldValue >>= xChild) && xChild.is() ) -detachRecursive(xChild); +case AccessibleEventId::CHILD: +{ +Reference< XAccessible > xChild; +if( (aEvent.OldValue >>= xChild) && xChild.is() ) +detachRecursive(xChild); -if( (aEvent.NewValue >>= xChild) && xChild.is() ) -attachRecursive(xChild); -} +if( (aEvent.NewValue >>= xChild) && xChild.is() ) +attachRecursive(xChild); +} break; -case AccessibleEventId::INVALIDATE_ALL_CHILDREN: -{ -Reference< XAccessible > xAccessible( getAccessible(aEvent) ); -detachRecursive(xAccessible); -attachRecursive(xAccessible); -} - +case AccessibleEventId::INVALIDATE_ALL_CHILDREN: +{ +Reference< XAccessible > xAccessible( getAccessible(aEvent) ); +detachRecursive(xAccessible); +attachRecursive(xAccessible); +} OSL_TRACE( "Invalidate all children called\n" ); break; -default: -break; + +default: +break; +} +} +catch(IndexOutOfBoundsException e) +{ +OSL_TRACE("Focused object has invalid index in parent"); } } diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx index 8a6d7fa..4fbe84b 100644 --- a/vcl/unx/gtk/a11y/atkutil.cxx +++ b/vcl/unx/gtk/a11y/atkutil.cxx @@ -202,10 +202,10 @@ void DocumentFocusListener::disposing( const lang::EventObject& aEvent ) void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent ) throw( uno::RuntimeException ) { -switch( aEvent.EventId ) -{ -case accessibility::AccessibleEventId::STATE_CHANGED: -try +try { +switch( aEvent.EventId ) +{ +case accessibility::AccessibleEventId::STATE_CHANGED: { sal_Int16 nState = accessibility::AccessibleStateType::INVALID; aEvent.NewValue >>= nState; @@ -213,34 +213,36 @@ void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObj if( accessibility::AccessibleStateType::FOCUSED == nState ) atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) ); } -catch(const lang::IndexOutOfBoundsException &e) -{ -g_warning("Focused object has invalid index in parent"); -} break; -case accessibility::AccessibleEventId::CHILD: -{ -uno::Reference< accessibility::XAccessible > xChild; -if( (aEvent.OldValue >>= xChild) && xChild.is() ) -detachRecursive(xChild); +case accessibility::Accessible
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - desktop/win32
desktop/win32/source/unoinfo.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit c20e4c606988de65d45ce3ce9608cb75deb5234a Author: Herbert Dürr Date: Thu Jun 19 14:42:27 2014 + #i125115# fix unoinfo output on Windows by using plain fwrite instead of trusting fprintf to handle the wchar_t string diff --git a/desktop/win32/source/unoinfo.cxx b/desktop/win32/source/unoinfo.cxx index dbf34cf..dfb538d 100644 --- a/desktop/win32/source/unoinfo.cxx +++ b/desktop/win32/source/unoinfo.cxx @@ -66,7 +66,8 @@ void writePath( if (end == NULL) { exit(EXIT_FAILURE); } -fprintf(stdout, "%S", path); +size_t nWideLen = wcslen(path); +fwrite( path, sizeof(wchar_t), nWideLen, stdout); } } @@ -103,7 +104,7 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) { writeNull(); writePath(path, pathEnd, MY_STRING(L"classes\\unoil.jar")); writeNull(); -writePath(path, pathEnd, MY_STRING(L"\classes\\ridl.jar")); +writePath(path, pathEnd, MY_STRING(L"classes\\ridl.jar")); writeNull(); writePath(path, pathEnd, MY_STRING(L"classes\\jurt.jar")); writeNull(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - solenv/inc
solenv/inc/tg_ext.mk |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 563d895d861c04adb2e18a18d1b54276bfe65a7a Author: Herbert Dürr Date: Thu Jun 19 08:34:18 2014 + #i125121# speed up the "make writeable" step when building external libraries avoiding the many individual invocations of chmod for each directory makes this step about ten times faster on Windows without SSD (460sec -> 41sec for boost alone). With SSD storage the speedup should be even higher. diff --git a/solenv/inc/tg_ext.mk b/solenv/inc/tg_ext.mk index 290b503..ab3a519 100644 --- a/solenv/inc/tg_ext.mk +++ b/solenv/inc/tg_ext.mk @@ -164,8 +164,7 @@ $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) : $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE @-$(MKDIRHIER) $(PACKAGE_DIR)$(fake_root_dir) $(COMMAND_ECHO)cd $(PACKAGE_DIR)$(fake_root_dir) && ( $(shell @$(TYPE) $(PRJ)/$(ROUT)/misc/$(TARFILE_MD5)-$(TARFILE_NAME).unpack)) && $(TOUCH) $(UNTAR_FLAG_FILE) @echo make writeable... -@cd $(PACKAGE_DIR) && chmod -R +rw $(TARFILE_ROOTDIR) && $(TOUCH) $(UNTAR_FLAG_FILE) -@cd $(PACKAGE_DIR) && find $(TARFILE_ROOTDIR) -type d -exec chmod a+x {{}} \; +@cd $(PACKAGE_DIR) && chmod -R +rwX $(TARFILE_ROOTDIR) && $(TOUCH) $(UNTAR_FLAG_FILE) #add new files to patch $(PACKAGE_DIR)/$(ADD_FILES_FLAG_FILE) : $(PACKAGE_DIR)/$(UNTAR_FLAG_FILE) $(T_ADDITIONAL_FILES:+".dummy") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
sal/inc/rtl/string.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit fa6f55c32a3f76b4a9e7810e9d4b07ea9510f4d8 Author: Herbert Dürr Date: Wed Jun 18 11:39:01 2014 + #i125112# fix CStringHash functor to match full strings only diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index b05cb09..8c98a36 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -945,10 +945,10 @@ struct OStringHash struct CStringEqual { bool operator()( const char* p1, const char* p2) const { -while( *p1) +while( *p1 != '\0') if( *(p1++) != *(p2++)) return false; -return true; +return (*p2 == '\0'); } }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/quartz
vcl/quartz/salgdiutils.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit c26817f9d576893e4b45b3432837b4f1c949098c Author: Herbert Dürr Date: Mon Jun 2 11:47:23 2014 + Resolves: #i125020# fix rounding error in AquaSalGraphics::RefreshRect() Rounding left and width down can accumulate a rounding error of almost two in the calculation of right. The existing code compensates for this by increasing the width by two, but since left has been decremented by one to accommodate for antialiasing artifacts this compensation is one to few by itself and two to few when accounting for antialiasing artifacts on the right. Y-pos and height have the same problems and get the matching fix. (cherry picked from commit 073ec69fb970830d39c8700317ee74dbbdfd1fda) (cherry picked from commit ee9dd6c086f7bda615d5b28d3319a83ce1673607) Change-Id: Ia394859035d59c76c67b6b0d53ddc6cf88582bfe Reviewed-on: https://gerrit.libreoffice.org/9626 Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index c251203..704fef5 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -182,10 +182,13 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh { // update a little more around the designated rectangle // this helps with antialiased rendering +// Rounding down x and width can accumulate a rounding error of up to 2 +// The decrementing of x, the rounding error and the antialiasing border +// require that the width and the height need to be increased by four const Rectangle aVclRect(Point(static_cast(lX-1), static_cast(lY-1) ), - Size( static_cast(lWidth+2), -static_cast(lHeight+2) ) ); + Size( static_cast(lWidth+4), +static_cast(lHeight+4) ) ); mpFrame->maInvalidRect.Union( aVclRect ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/quartz
vcl/quartz/ctlayout.cxx | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) New commits: commit af9203676b014509c04c0495d2189e04b633f6b9 Author: Herbert Dürr Date: Mon Jun 2 11:30:49 2014 + Related: #i125020# fix the calculation of the text-update rectangle... in CoreText by doing the calculation before CTLineDraw() updates the text position. Requesting the update early is possible because that update region is not used until AquaSalInstance::Yield(). (cherry picked from commit ee042661b996fd00d5504caf4f4be60f77bf880f) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx (cherry picked from commit d2bbef3d3d6c7be096175ddbdb788ece5067f5fc) Conflicts: vcl/quartz/ctlayout.cxx Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db Reviewed-on: https://gerrit.libreoffice.org/9628 Tested-by: Christian Lohmaier Reviewed-by: Christian Lohmaier diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index a39f00e..1d96f90 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -344,13 +344,8 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); -// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) -CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); - -// draw the text -CTLineDraw( ctline, rAquaGraphics.mrContext ); #ifndef IOS -// request an update of the changed window area +// request an update of the to-be-changed window area if( rAquaGraphics.IsWindowGraphics() ) { const CGRect aInkRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext ); @@ -358,6 +353,14 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons rAquaGraphics.RefreshRect( aRefreshRect ); } #endif + +// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) +CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + +SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); +// draw the text +CTLineDraw( ctline, rAquaGraphics.mrContext ); + // restore the original graphic context transformations CGContextRestoreGState( rAquaGraphics.mrContext ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sw/source
sw/source/core/attr/format.cxx |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) New commits: commit 7d096ff2e25e422f55c821ecce99cecac6ee4b95 Author: Herbert Dürr Date: Thu Jun 12 08:55:46 2014 + #i125071# check SwFmt::GetItemState()'s ppItem parameter for NULL before assigning something into it. The ppItem default value is NULL so it is allowed. The method should be prepared to handle that. diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 92f81e4..2a8e6a7 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -471,14 +471,16 @@ SfxItemState SwFmt::GetItemState( sal_uInt16 nWhich, sal_Bool bSrchInParent, con static SvxBrushItem aSvxBrushItem(RES_BACKGROUND); aSvxBrushItem = getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, bSrchInParent); -*ppItem = &aSvxBrushItem; +if( ppItem ) +*ppItem = &aSvxBrushItem; return SFX_ITEM_SET; } // if not, reset pointer and return SFX_ITEM_DEFAULT to signal that // the item is not set -*ppItem = 0; +if( ppItem ) +*ppItem = NULL; return SFX_ITEM_DEFAULT; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - sal/qa sw/source
sal/qa/osl/condition/osl_Condition.cxx | 22 +++--- sw/source/core/inc/pagefrm.hxx |2 +- sw/source/core/layout/paintfrm.cxx | 11 +-- 3 files changed, 17 insertions(+), 18 deletions(-) New commits: commit 283007f8da755af1a9a4a66cc7089aaed3ec8d18 Author: Herbert Dürr Date: Wed Jun 4 11:21:52 2014 + #i125003# fix google-test for osl_condition in the sal module the test didn't initialize the nanosecond part of the condition timeout and so the absolute timeout calculated from the second and nanosecond values could become invalid depending on the pseudo-random value of the nanosecond member. This resulted in spurious gtest failures (first seen on Ubuntu). diff --git a/sal/qa/osl/condition/osl_Condition.cxx b/sal/qa/osl/condition/osl_Condition.cxx index 2feee84..7231d05 100644 --- a/sal/qa/osl/condition/osl_Condition.cxx +++ b/sal/qa/osl/condition/osl_Condition.cxx @@ -216,8 +216,7 @@ namespace osl_Condition Result wait(const TimeValue *pTimeout = 0) */ TEST(Sal_Test_Condition, wait_001) { -TimeValue tv1; -tv1.Seconds = 1; +TimeValue tv1 = {1,0}; ::osl::Condition cond1; ::osl::Condition cond2; @@ -232,14 +231,13 @@ namespace osl_Condition fprintf(stderr,"%d %d %d\n",r1,r2,r3); // #test comment#: test three types of wait. -ASSERT_TRUE( (cond1.wait(&tv1) == ::osl::Condition::result_ok) && - (cond2.wait() == ::osl::Condition::result_ok) && - (cond3.wait(&tv1) == ::osl::Condition::result_timeout) ); +ASSERT_TRUE( cond1.wait(&tv1) == ::osl::Condition::result_ok ); +ASSERT_TRUE( cond2.wait() == ::osl::Condition::result_ok ); +ASSERT_TRUE( cond3.wait(&tv1) == ::osl::Condition::result_timeout ); } TEST(Sal_Test_Condition, wait_002) { -TimeValue tv1; -tv1.Seconds = 1; +TimeValue tv1 = {1,0}; ::osl::Condition aCond; ::osl::Condition::Result wRes, wRes1; @@ -253,9 +251,10 @@ namespace osl_Condition sal_Bool bRes1 = aCond.check( ); // #test comment#: wait a condition after set/reset. -ASSERT_TRUE( !bRes && bRes1 && - ( ::osl::Condition::result_timeout == wRes ) && - ( ::osl::Condition::result_ok == wRes1 ) ); +ASSERT_TRUE( !bRes ); +ASSERT_TRUE( bRes1 ); +ASSERT_TRUE( ::osl::Condition::result_timeout == wRes ); +ASSERT_TRUE( ::osl::Condition::result_ok == wRes1 ); } @@ -288,7 +287,8 @@ namespace osl_Condition sal_Bool bRes1 = aCond.check( ); // #test comment#: use threads to set/reset Condition and check it in main routine. -ASSERT_TRUE( bRes && !bRes1 ); +ASSERT_TRUE( bRes ); +ASSERT_TRUE( !bRes1 ); } } // namespace osl_Condition commit a8a2653568d31a2fb76aeb3183e128e3304452bd Author: Armin Le Grand Date: Wed Jun 4 11:12:30 2014 + Corrected GetDrawBackgrdColor to return a value, not a reference, removed unused var diff --git a/sw/source/core/inc/pagefrm.hxx b/sw/source/core/inc/pagefrm.hxx index 2876704..3b00e71 100644 --- a/sw/source/core/inc/pagefrm.hxx +++ b/sw/source/core/inc/pagefrm.hxx @@ -317,7 +317,7 @@ public: @return reference to an instance of class Color */ -const Color& GetDrawBackgrdColor() const; +const Color GetDrawBackgrdColor() const; /** paint margin area of a page diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 081ad1a..ca5e6ae 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -308,8 +308,7 @@ void SwCalcPixStatics( OutputDevice *pOut ) //Zum Sichern der statics, damit das Paint (quasi) reentrant wird. class SwSavePaintStatics { -sal_BoolbSFlyMetafile, -bSPageOnly; +sal_BoolbSFlyMetafile; // not used: bSPageOnly; ViewShell *pSGlobalShell; OutputDevice *pSFlyMetafileOut; SwFlyFrm *pSRetoucheFly, @@ -3011,7 +3010,7 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const /// OD 29.08.2002 #102450# /// determine background color of page for method /// calls, paint or -const Color aPageBackgrdColor = pPage->GetDrawBackgrdColor(); +const Color aPageBackgrdColor(pPage->GetDrawBackgrdColor()); pPage->PaintBaBo( aPaintRect, pPage, sal_True ); @@ -6489,7 +6488,7 @@ void SwLayoutFrm::RefreshExtraData( const SwRect &rRect ) const @return Color */ -const Color& SwPageFrm::GetDrawBackgrdColor() const +const Color SwPageFrm::GetDrawBackgrdColor() const { const SvxBrushItem* pBrushItem; const Color* pDummyColor; @@ -6605,7 +6604,7 @@ void SwFrm::Retouche( const SwPageFrm * pPage, const SwR
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/prj
sal/prj/build.lst |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2028a3f848106637179feef1330a211d9e3fb072 Author: Herbert Dürr Date: Wed Jun 4 07:47:42 2014 + #i125003# sal's autotest submodule depends on sal's cpprt submodule diff --git a/sal/prj/build.lst b/sal/prj/build.lst index 24f7ca9..6e9e6a9 100644 --- a/sal/prj/build.lst +++ b/sal/prj/build.lst @@ -10,7 +10,7 @@ sasal\systools\win32\kill nmake - n sa_kill sa_uwinapi.n sa_inc NULL sa sal\systools\win32\onlineupdate nmake - n sa_onlineupdate sa_uwinapi.n sa_inc NULL sa sal\osl\w32 nmake - n sa_osln sa_inc NULL sa sal\osl\os2 nmake - p sa_oslp sa_inc NULL -sa sal\qa nmake - all sa_qa sa_util NULL +sa sal\qa nmake - all sa_qa sa_util sa_cpprt NULL sa sal\osl\unx nmake - u sa_oslu sa_tc.u sa_inc NULL sa sal\osl\all nmake - all sa_oslall sa_tc.u sa_inc NULL sa sal\util nmake - all sa_util sa_tc.u sa_oslall sa_uwinapi.n sa_kill.n sa_onlineupdate.n sa_osln.n sa_oslp.p sa_oslu.u sa_rtl sa_textenc NULL ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/ctlayout.cxx | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) New commits: commit d2bbef3d3d6c7be096175ddbdb788ece5067f5fc Author: Herbert Dürr Date: Mon Jun 2 11:30:49 2014 + Related: #i125020# fix the calculation of the text-update rectangle... in CoreText by doing the calculation before CTLineDraw() updates the text position. Requesting the update early is possible because that update region is not used until AquaSalInstance::Yield(). (cherry picked from commit ee042661b996fd00d5504caf4f4be60f77bf880f) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I317a2068071a2f6d33f34c81e104e30beedc33db diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 8c42cc8..46c55a3 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -356,14 +356,8 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons SAL_INFO( "vcl.ct", "CGContextSetTextPosition(" << rAquaGraphics.mrContext << "," << aTextPos << ")" ); CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); -// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) -CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); - -SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); -// draw the text -CTLineDraw( ctline, rAquaGraphics.mrContext ); #ifndef IOS -// request an update of the changed window area +// request an update of the to-be-changed window area if( rAquaGraphics.IsWindowGraphics() ) { const CGRect aInkRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext ); @@ -371,6 +365,14 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons rAquaGraphics.RefreshRect( aRefreshRect ); } #endif + +// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) +CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + +SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); +// draw the text +CTLineDraw( ctline, rAquaGraphics.mrContext ); + // restore the original graphic context transformations SAL_INFO( "vcl.ct", "CGContextRestoreGState(" << rAquaGraphics.mrContext << ")" ); CGContextRestoreGState( rAquaGraphics.mrContext ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/salgdiutils.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit bcc7086ebf447449489edef2adc3b158a0198cff Author: Herbert Dürr Date: Mon Jun 2 11:54:15 2014 + #i125020# allow antialiasing on all update borders for Aqua graphics (cherry picked from commit 513225be9cbadee6d8f7fd4e9910e10fc5ff571b) diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index 639398f..704fef5 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -182,10 +182,13 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh { // update a little more around the designated rectangle // this helps with antialiased rendering +// Rounding down x and width can accumulate a rounding error of up to 2 +// The decrementing of x, the rounding error and the antialiasing border +// require that the width and the height need to be increased by four const Rectangle aVclRect(Point(static_cast(lX-1), static_cast(lY-1) ), - Size( static_cast(lWidth+3), -static_cast(lHeight+3) ) ); + Size( static_cast(lWidth+4), +static_cast(lHeight+4) ) ); mpFrame->maInvalidRect.Union( aVclRect ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/ctlayout.cxx | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) New commits: commit 687f0c9300d499b78deea2890b4c2019adb2d67d Author: Herbert Dürr Date: Tue May 20 12:00:50 2014 + Resolves: #i124935# fix expanded/condensed text breaking... in the CoreText engine the concept of an extra-width per code-unit was obsolete at least since apps supported unicode with its different normalization forms, diacritical marks, surrogate-pairs, non-printing characters such as ZWJ/ZWNJ/RLM, etc. so of course modern engines like CoreText don't aid this typographical crime. The fix here extends the CTLayout::GetTextBreak() method to handle the obsolete semantic of per code-unit extra-widths by successively approximating the number of involved code-units. (cherry picked from commit a9b9ceff86f35be1eeff5f251d24e338db760a1e) Conflicts: vcl/aqua/source/gdi/ctlayout.cxx Change-Id: I52a7f7488a9e8a303ed7271df2a24a3c85098ce3 diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 347cc5e..8c42cc8 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -580,20 +580,39 @@ long CTLayout::FillDXArray( sal_Int32* pDXArray ) const return nPixWidth; } -sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long /*nCharExtra*/, int nFactor ) const +sal_Int32 CTLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const { if( !mpCTLine ) return -1; CTTypesetterRef aCTTypeSetter = CTTypesetterCreateWithAttributedString( mpAttrString ); -const double fCTMaxWidth = (double)nMaxWidth / nFactor; -CFIndex nIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth ); -CFRelease( aCTTypeSetter ); - -if( nIndex >= mnCharCount ) -return -1; +CFIndex nBestGuess = (nCharExtra >= 0) ? 0 : mnCharCount; +for( int i = 1; i <= mnCharCount; i *= 2 ) +{ +// guess the target width considering char-extra expansion/condensation +const double nTargetWidth = nMaxWidth - nBestGuess * nCharExtra; +const double fCTMaxWidth = nTargetWidth / nFactor; +// calculate the breaking index for the guessed target width +const CFIndex nNewIndex = CTTypesetterSuggestClusterBreak( aCTTypeSetter, 0, fCTMaxWidth ); +if( nNewIndex >= mnCharCount ) { +CFRelease( aCTTypeSetter ); +return -1; +} +// check if the original extra-width guess was good +if( !nCharExtra ) +nBestGuess = nNewIndex; +if( nBestGuess == nNewIndex ) +break; +// prepare another round for a different number of characters +CFIndex nNewGuess = (nNewIndex + nBestGuess + 1) / 2; +if( nNewGuess == nBestGuess ) +nNewGuess += (nNewIndex > nBestGuess) ? +1 : -1; +nBestGuess = nNewGuess; +} -nIndex += mnMinCharPos; +// suggest the best fitting cluster break as breaking position +CFRelease( aCTTypeSetter ); +const int nIndex = nBestGuess + mnMinCharPos; return nIndex; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/salgdiutils.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ee9dd6c086f7bda615d5b28d3319a83ce1673607 Author: Herbert Dürr Date: Mon Jun 2 11:47:23 2014 + #i125020# fix rounding error in AquaSalGraphics::RefreshRect() Rounding left and width down can accumulate a rounding error of almost two in the calculation of right. The existing code compensates for this by increasing the width by two, but since left has been decremented by one to accommodate for antialiasing artifacts this compensation is one to few by itself and two to few when accounting for antialiasing artifacts on the right. Y-pos and height have the same problems and get the matching fix. (cherry picked from commit 073ec69fb970830d39c8700317ee74dbbdfd1fda) diff --git a/vcl/quartz/salgdiutils.cxx b/vcl/quartz/salgdiutils.cxx index c251203..639398f 100644 --- a/vcl/quartz/salgdiutils.cxx +++ b/vcl/quartz/salgdiutils.cxx @@ -184,8 +184,8 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh // this helps with antialiased rendering const Rectangle aVclRect(Point(static_cast(lX-1), static_cast(lY-1) ), - Size( static_cast(lWidth+2), -static_cast(lHeight+2) ) ); + Size( static_cast(lWidth+3), +static_cast(lHeight+3) ) ); mpFrame->maInvalidRect.Union( aVclRect ); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 4 commits - configure.in external_deps.lst sal/prj sal/qa set_soenv.in solenv/inc vcl/aqua
configure.in| 16 ++ external_deps.lst |5 sal/prj/build.lst |4 ++- sal/qa/sal/makefile.mk | 32 ++-- sal/qa/sal/test_types.cxx | 26 -- set_soenv.in|3 +- solenv/inc/_tg_app.mk |7 ++ solenv/inc/libs.mk |6 - solenv/inc/target.mk| 41 solenv/inc/tg_app.mk|7 ++ vcl/aqua/source/gdi/ctlayout.cxx| 14 ++-- vcl/aqua/source/gdi/salgdiutils.cxx |7 -- 12 files changed, 124 insertions(+), 44 deletions(-) New commits: commit 513225be9cbadee6d8f7fd4e9910e10fc5ff571b Author: Herbert Dürr Date: Mon Jun 2 11:54:15 2014 + #i125020# allow antialiasing on all update borders for Aqua graphics diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx index bf0d9ee..ca120d0 100644 --- a/vcl/aqua/source/gdi/salgdiutils.cxx +++ b/vcl/aqua/source/gdi/salgdiutils.cxx @@ -243,10 +243,13 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh { // update a little more around the designated rectangle // this helps with antialiased rendering +// Rounding down x and width can accumulate a rounding error of up to 2 +// The decrementing of x, the rounding error and the antialiasing border +// require that the width and the height need to be increased by four const Rectangle aVclRect(Point(static_cast(lX-1), static_cast(lY-1) ), - Size( static_cast(lWidth+3), -static_cast(lHeight+3) ) ); + Size( static_cast(lWidth+4), +static_cast(lHeight+4) ) ); mpFrame->maInvalidRect.Union( aVclRect ); } } commit 073ec69fb970830d39c8700317ee74dbbdfd1fda Author: Herbert Dürr Date: Mon Jun 2 11:47:23 2014 + #i125020# fix rounding error in AquaSalGraphics::RefreshRect() Rounding left and width down can accumulate a rounding error of almost two in the calculation of right. The existing code compensates for this by increasing the width by two, but since left has been decremented by one to accommodate for antialiasing artifacts this compensation is one to few by itself and two to few when accounting for antialiasing artifacts on the right. Y-pos and height have the same problems and get the matching fix. diff --git a/vcl/aqua/source/gdi/salgdiutils.cxx b/vcl/aqua/source/gdi/salgdiutils.cxx index a219609..bf0d9ee 100644 --- a/vcl/aqua/source/gdi/salgdiutils.cxx +++ b/vcl/aqua/source/gdi/salgdiutils.cxx @@ -245,8 +245,8 @@ void AquaSalGraphics::RefreshRect(float lX, float lY, float lWidth, float lHeigh // this helps with antialiased rendering const Rectangle aVclRect(Point(static_cast(lX-1), static_cast(lY-1) ), - Size( static_cast(lWidth+2), -static_cast(lHeight+2) ) ); + Size( static_cast(lWidth+3), +static_cast(lHeight+3) ) ); mpFrame->maInvalidRect.Union( aVclRect ); } } commit ee042661b996fd00d5504caf4f4be60f77bf880f Author: Herbert Dürr Date: Mon Jun 2 11:30:49 2014 + #i125020# fix the calculation of the text-update rectangle in CoreText by doing the calculation before CTLineDraw() updates the text position. Requesting the update early is possible because that update region is not used until AquaSalInstance::Yield(). diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 880caae..aac5e77 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -265,13 +265,7 @@ void CTLayout::DrawText( SalGraphics& rGraphics ) const CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); -// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) -CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); - -// draw the text -CTLineDraw( mpCTLine, rAquaGraphics.mrContext ); - -// request an update of the changed window area +// request an update of the to-be-changed window area if( rAquaGraphics.IsWindowGraphics() ) { const CGRect aInkRect = CTLineGetImageBounds( mpCTLine, rAquaGraphics.mrContext ); @@ -279,6 +273,12 @@ void CTLayout::DrawText( SalGraphics& rGraphics ) const rAquaGraphics.RefreshRect( aRefreshRect ); } +// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) +CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + +// draw the text +CTLineDraw( mpCTLine, rAquaGraphics.mrContext ); + // resto
[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - vcl/inc vcl/quartz vcl/source
vcl/inc/quartz/salgdi.h|2 +- vcl/quartz/ctfonts.cxx | 14 -- vcl/quartz/ctlayout.cxx|9 - vcl/source/outdev/text.cxx |8 4 files changed, 13 insertions(+), 20 deletions(-) New commits: commit 5bc5387669bca8a0b410e295b0992fd2424a1536 Author: Herbert Dürr Date: Mon May 19 12:05:27 2014 + Resolves: #i124922# allow late setting of the font color... for CoreText-layouted text (cherry picked from commit 42f9768f771457c53a9f1e6a3581b2df9856401f) Conflicts: vcl/aqua/source/gdi/ctfonts.cxx vcl/aqua/source/gdi/ctfonts.hxx vcl/aqua/source/gdi/ctlayout.cxx vcl/source/gdi/outdev3.cxx (cherry picked from commit 507efabe8b40e34c2bebfdaa00d4264c5345d3dd) Conflicts: vcl/quartz/ctlayout.cxx Change-Id: Ie2685ab80ca87ea72e25f18d02f883fb36c24a36 diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 7451321..57dec5b 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -106,7 +106,7 @@ public: bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ) const; bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) const; -void SetTextColor( const RGBAColor& ); +void SetTextColor( const RGBAColor& ) {} const CoreTextFontData* mpFontData; /// <1.0: font is squeezed, >1.0 font is stretched, else 1.0 diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index bede546..d2e3d32 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -100,6 +100,10 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) CFDictionarySetValue( mpStyleDict, kCTFontAttributeName, pNewCTFont ); CFRelease( pNewCTFont); +// allow delayed setting the font color, i.e. after the text layout +CFDictionarySetValue( mpStyleDict, kCTForegroundColorFromContextAttributeName, kCFBooleanTrue ); + + #if 0 // LastResort is implicit in CoreText's font cascading const void* aGFBDescriptors[] = { CTFontDescriptorCreateWithNameAndSize( CFSTR("LastResort"), 0) }; // TODO: use the full GFB list const int nGfbCount = sizeof(aGFBDescriptors) / sizeof(*aGFBDescriptors); @@ -218,16 +222,6 @@ bool CoreTextStyle::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolyg return true; } -void CoreTextStyle::SetTextColor( const RGBAColor& rColor ) -{ -CGFloat aColor[] = { rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), rColor.GetAlpha() }; -CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB(); -CGColorRef pCGColor = CGColorCreate( cs, aColor ); -CGColorSpaceRelease( cs ); -CFDictionarySetValue( mpStyleDict, kCTForegroundColorAttributeName, pCGColor ); -CFRelease( pCGColor); -} - PhysicalFontFace* CoreTextFontData::Clone( void ) const { return new CoreTextFontData( *this); diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index 0c317c4..a39f00e 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -106,6 +106,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) m_vRunData.release(); bLayouted = false; +// release an eventual older layout if( mpAttrString ) CFRelease( mpAttrString ); mpAttrString = NULL; @@ -113,6 +114,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) CFRelease( mpCTLine ); mpCTLine = NULL; +// initialize the new layout SalLayout::AdjustLayout( rArgs ); mnCharCount = mnEndCharPos - mnMinCharPos; @@ -328,7 +330,7 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons CGContextScaleCTM( rAquaGraphics.mrContext, 1.0, -1.0 ); CGContextSetShouldAntialias( rAquaGraphics.mrContext, !rAquaGraphics.mbNonAntialiasedText ); -// Draw the text +// set the text transformation (e.g. position) CGPoint aTextPos = GetTextDrawPosition(); if( pStyle->mfFontRotation != 0.0 ) @@ -341,6 +343,11 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons } CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); + +// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) +CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + +// draw the text CTLineDraw( ctline, rAquaGraphics.mrContext ); #ifndef IOS // request an update of the changed window area diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index c5030ad..b7bb028 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1282,14 +1282,6 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray ); -#if defined(MACOSX) || defined(IOS) -// CoreText layouts are immutable and already contain the text color -// so we need to
[Libreoffice-commits] core.git: vcl/inc vcl/quartz vcl/source
vcl/inc/quartz/salgdi.h|2 +- vcl/quartz/ctfonts.cxx | 14 -- vcl/quartz/ctlayout.cxx|9 - vcl/source/outdev/text.cxx |8 4 files changed, 13 insertions(+), 20 deletions(-) New commits: commit 507efabe8b40e34c2bebfdaa00d4264c5345d3dd Author: Herbert Dürr Date: Mon May 19 12:05:27 2014 + Resolves: #i124922# allow late setting of the font color... for CoreText-layouted text (cherry picked from commit 42f9768f771457c53a9f1e6a3581b2df9856401f) Conflicts: vcl/aqua/source/gdi/ctfonts.cxx vcl/aqua/source/gdi/ctfonts.hxx vcl/aqua/source/gdi/ctlayout.cxx vcl/source/gdi/outdev3.cxx Change-Id: Ie2685ab80ca87ea72e25f18d02f883fb36c24a36 diff --git a/vcl/inc/quartz/salgdi.h b/vcl/inc/quartz/salgdi.h index 7451321..57dec5b 100644 --- a/vcl/inc/quartz/salgdi.h +++ b/vcl/inc/quartz/salgdi.h @@ -106,7 +106,7 @@ public: bool GetGlyphBoundRect( sal_GlyphId, Rectangle& ) const; bool GetGlyphOutline( sal_GlyphId, basegfx::B2DPolyPolygon& ) const; -void SetTextColor( const RGBAColor& ); +void SetTextColor( const RGBAColor& ) {} const CoreTextFontData* mpFontData; /// <1.0: font is squeezed, >1.0 font is stretched, else 1.0 diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index bede546..d2e3d32 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -100,6 +100,10 @@ CoreTextStyle::CoreTextStyle( const FontSelectPattern& rFSD ) CFDictionarySetValue( mpStyleDict, kCTFontAttributeName, pNewCTFont ); CFRelease( pNewCTFont); +// allow delayed setting the font color, i.e. after the text layout +CFDictionarySetValue( mpStyleDict, kCTForegroundColorFromContextAttributeName, kCFBooleanTrue ); + + #if 0 // LastResort is implicit in CoreText's font cascading const void* aGFBDescriptors[] = { CTFontDescriptorCreateWithNameAndSize( CFSTR("LastResort"), 0) }; // TODO: use the full GFB list const int nGfbCount = sizeof(aGFBDescriptors) / sizeof(*aGFBDescriptors); @@ -218,16 +222,6 @@ bool CoreTextStyle::GetGlyphOutline( sal_GlyphId aGlyphId, basegfx::B2DPolyPolyg return true; } -void CoreTextStyle::SetTextColor( const RGBAColor& rColor ) -{ -CGFloat aColor[] = { rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue(), rColor.GetAlpha() }; -CGColorSpaceRef cs = CGColorSpaceCreateDeviceRGB(); -CGColorRef pCGColor = CGColorCreate( cs, aColor ); -CGColorSpaceRelease( cs ); -CFDictionarySetValue( mpStyleDict, kCTForegroundColorAttributeName, pCGColor ); -CFRelease( pCGColor); -} - PhysicalFontFace* CoreTextFontData::Clone( void ) const { return new CoreTextFontData( *this); diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx index f74b235..347cc5e 100644 --- a/vcl/quartz/ctlayout.cxx +++ b/vcl/quartz/ctlayout.cxx @@ -108,6 +108,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) m_vRunData.release(); bLayouted = false; +// release an eventual older layout if( mpAttrString ) CFRelease( mpAttrString ); mpAttrString = NULL; @@ -115,6 +116,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) CFRelease( mpCTLine ); mpCTLine = NULL; +// initialize the new layout SalLayout::AdjustLayout( rArgs ); mnCharCount = mnEndCharPos - mnMinCharPos; @@ -338,7 +340,7 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons CGContextScaleCTM( rAquaGraphics.mrContext, 1.0, -1.0 ); CGContextSetShouldAntialias( rAquaGraphics.mrContext, !rAquaGraphics.mbNonAntialiasedText ); -// Draw the text +// set the text transformation (e.g. position) CGPoint aTextPos = GetTextDrawPosition(); if( pStyle->mfFontRotation != 0.0 ) @@ -353,7 +355,12 @@ void CTLayout::drawCTLine(AquaSalGraphics& rAquaGraphics, CTLineRef ctline, cons SAL_INFO( "vcl.ct", "CGContextSetTextPosition(" << rAquaGraphics.mrContext << "," << aTextPos << ")" ); CGContextSetTextPosition( rAquaGraphics.mrContext, aTextPos.x, aTextPos.y ); + +// set the text color as fill color (see kCTForegroundColorFromContextAttributeName) +CGContextSetFillColor( rAquaGraphics.mrContext, rAquaGraphics.maTextColor.AsArray() ); + SAL_INFO( "vcl.ct", "CTLineDraw(" << ctline << "," << rAquaGraphics.mrContext << ")" ); +// draw the text CTLineDraw( ctline, rAquaGraphics.mrContext ); #ifndef IOS // request an update of the changed window area diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index c5030ad..b7bb028 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1282,14 +1282,6 @@ SalLayout* OutputDevice::ImplLayout(const OUString& rOrigStr, ImplLayoutArgs aLayoutArgs = ImplPrepareLayoutArgs( aStr, nMinIndex, nLen, nPixelWidth, pDXArray ); -#if defined(MACOSX) || defined(IOS) -// CoreText layouts are
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/salnativewidgets.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ced067d3d23dcb03f1548707cefe9b0b6498345d Author: Herbert Dürr Date: Wed May 28 11:43:02 2014 + #i98991# remove Aqua Pinstripe background in dialogs Patch-by: Thorsten Wagner Reviewed-by: Herbert Duerr diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx index f49e56b..37d23b5 100644 --- a/vcl/aqua/source/gdi/salnativewidgets.cxx +++ b/vcl/aqua/source/gdi/salnativewidgets.cxx @@ -533,7 +533,7 @@ sal_Bool AquaSalGraphics::drawNativeControl(ControlType nType, HIThemeBackgroundDrawInfo aThemeBackgroundInfo; aThemeBackgroundInfo.version = 0; aThemeBackgroundInfo.state = getState( nState ); -aThemeBackgroundInfo.kind = kThemeBrushDialogBackgroundInactive; +aThemeBackgroundInfo.kind = kThemeBrushDialogBackgroundActive; // FIXME: without this magical offset there is a 2 pixel black border on the right and bottom rc.size.width += 2; rc.size.height += 2; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 9 commits - instsetoo_native/util svtools/source sw/inc sw/source vcl/aqua vcl/source xmloff/source
instsetoo_native/util/openoffice.lst | 48 +++ svtools/source/filter/filter.cxx | 11 ++- sw/inc/ndgrf.hxx | 58 ++ sw/source/core/graphic/ndgrf.cxx | 53 - sw/source/core/unocore/unoframe.cxx| 19 ++ sw/source/filter/xml/xmltexte.cxx |2 sw/source/ui/misc/glossary.cxx |5 + vcl/aqua/source/gdi/ctfonts.cxx| 18 - vcl/aqua/source/gdi/ctfonts.hxx|2 vcl/aqua/source/gdi/ctlayout.cxx | 43 +++-- vcl/aqua/source/window/salframeview.mm | 102 +++-- vcl/source/gdi/font.cxx|6 - vcl/source/gdi/outdev3.cxx |8 -- xmloff/source/draw/shapeexport2.cxx| 73 --- 14 files changed, 215 insertions(+), 233 deletions(-) New commits: commit 8470308050cb5c71262fdf67ec689d628c9558e8 Author: Herbert Dürr Date: Wed May 21 12:56:56 2014 + #i124915# use target device dependent font height again Setting a fixed default font height parameter doesn't make much sense when neither the target device nor its mapping mode nor its target resolution are known. This change reverts revision 1589449 of bug 124686 that has already been solved differently and restores the previous behaviour so that the default height of default constructed fonts is set to 12pt when the target device becomes known. Reviewed-by: Armin Le Grand diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 6972467..1826c92 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -74,12 +74,6 @@ Impl_Font::Impl_Font() : mbVertical = false; mbTransparent = true; mbConfigLookup = false; - -// #124686# the Size is defaulted to (0,0) when default constructed, -// this is not useful for a default font. Init it to a useful default -// so that the Font::Font() constructor which uses a 'naked' static -// Impl_Font instance (aStaticImplFont) creates a useful default font -maSize = Size(0, 16); } // --- commit 4bdef485997f44c1acf786232327ed6901c60f63 Author: Herbert Dürr Date: Wed May 21 11:50:36 2014 + #i124940# update build target product name after the AOO 4.1 release on trunk the 4.1.0 build target product name is obsolete after AOO 4.1 was branched off and released. This change tentatively updates it to 4.2 which is the anticipated name of the next release to be branched of from trunk. Reported-by: Rainer Bielefeld diff --git a/instsetoo_native/util/openoffice.lst b/instsetoo_native/util/openoffice.lst index 4ed8f31..b8125cb 100644 --- a/instsetoo_native/util/openoffice.lst +++ b/instsetoo_native/util/openoffice.lst @@ -5,9 +5,9 @@ Globals variables { APACHEPROJECTNAME Apache OpenOffice -OOOBASEVERSION 4.1 -OOOPACKAGEVERSION 4.1.0 -UREPACKAGEVERSION 4.1.0 +OOOBASEVERSION 4.2 +OOOPACKAGEVERSION 4.2.0 +UREPACKAGEVERSION 4.2.0 URELAYERVERSION 1 BASISROOTNAME OpenOffice UNIXBASISROOTNAME openoffice @@ -39,9 +39,9 @@ Globals OOOXMLFILEFORMATNAME OpenOffice.org XML OOOXMLFILEFORMATVERSION 1.0 WRITERCOMPATIBILITYVERSIONOOO11 OpenOffice.org 1.1 -SERVICETAG_PRODUCTNAME Apache OpenOffice 4.1 -SERVICETAG_PRODUCTVERSION 4.1 -SERVICETAG_PARENTNAME Apache OpenOffice 4.1 +SERVICETAG_PRODUCTNAME Apache OpenOffice 4.2 +SERVICETAG_PRODUCTVERSION 4.2 +SERVICETAG_PARENTNAME Apache OpenOffice 4.2 SERVICETAG_SOURCE {buildsource}{minor}(Build:{buildid}) SERVICETAG_URN urn:uuid:500061aa-5666-11e0-8e00-080020a9ed93 REGISTRATION_HOST https://registration.openoffice.org @@ -59,7 +59,7 @@ Apache_OpenOffice { FULLPRODUCTNAME Apache OpenOffice PRODUCTNAME OpenOffice -PRODUCTVERSION 4.1.0 +PRODUCTVERSION 4.2.0 PRODUCTEXTENSION LONG_PRODUCTEXTENSION SHORT_PRODUCTEXTENSION @@ -67,15 +67,15 @@ Apache_OpenOffice POSTVERSIONEXTENSIONUNIX BRANDPACKAGEVERSION 4 USERDIRPRODUCTVERSION 4 -ABOUTBOXPRODUCTVERSION 4.1.0 -BASEPRODUCTVERSION 4.1 +ABOUTBOXPRODUCTVERSION 4.2.0 +BASEPRODUCTVERSION 4.2 PCPFILENAME openoffice.pcp UPDATEURL https://ooo-updates.apache.org/aoonext/check.Update ADD_INCLUDE_FILES cliureversion.mk,clioootypesversion.mk,userland.txt,version.lst REMOVE_UPGRADE_CODE_FILE upgradecode_remove_ooo.txt ADDSYSTEMINTEGRATION 1 EVAL -PACKAGEVERSION 4.1.0 +
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/osl
sal/osl/w32/module.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 48acb3ebd9403a95b3bbd906d45bb67b4410f3e4 Author: Herbert Dürr Date: Fri May 16 20:11:36 2014 + #i124896# use default allocator for w32 ShortPathName buffer diff --git a/sal/osl/w32/module.cxx b/sal/osl/w32/module.cxx index afbb8b6..2d1c0f3 100644 --- a/sal/osl/w32/module.cxx +++ b/sal/osl/w32/module.cxx @@ -74,7 +74,7 @@ oslModule SAL_CALL osl_loadModule(rtl_uString *strModuleName, sal_Int32 nRtldMod //on Windows XP and ERROR_INSUFFICIENT_BUFFER on Windows 7 (64bit) if (hInstance == NULL && Module->length > 260) { -std::vector > vec(Module->length + 1); +std::vector vec(Module->length + 1); DWORD len = GetShortPathNameW(reinterpret_cast(Module->buffer), &vec[0], Module->length + 1); if (len ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - framework/inc framework/source officecfg/registry sfx2/source
framework/inc/framework/addonmenu.hxx | 15 ++-- framework/source/classes/menumanager.cxx|2 framework/source/dispatch/menudispatcher.cxx|4 - framework/source/fwe/classes/addonmenu.cxx | 78 framework/source/uielement/menubarmanager.cxx | 10 --- officecfg/registry/data/org/openoffice/Inet.xcu | 44 - sfx2/source/menu/virtmenu.cxx | 11 +-- 7 files changed, 58 insertions(+), 106 deletions(-) New commits: commit 70c4adf42a0d7789abc900a0698a2ff4b5314944 Author: Herbert Dürr Date: Fri May 16 12:57:29 2014 + #i124881# drop ill-reputed euroseek search engine Found-by: Rainer Bielefeld diff --git a/officecfg/registry/data/org/openoffice/Inet.xcu b/officecfg/registry/data/org/openoffice/Inet.xcu index 1489697..f779044 100644 --- a/officecfg/registry/data/org/openoffice/Inet.xcu +++ b/officecfg/registry/data/org/openoffice/Inet.xcu @@ -91,50 +91,6 @@ - - - - http://www.euroseek.com/system/search.cgi?mode=internet&string= - - - &language=en - - - 0 - - - + - - - - - http://www.euroseek.com/system/search.cgi?mode=internet&string= - - - &language=en - - - 0 - - - %20 - - - - - http://www.euroseek.com/system/search.cgi?mode=internet&string= - - - &language=en - - - 0 - - - + - - - commit 2aac0070dbef6c1ad7eeccf7d4015cdcbffe067e Author: Tsutomu Uchino Date: Fri May 16 12:48:54 2014 + #i86528# use the module manager to identify the context for addons menu merging diff --git a/framework/inc/framework/addonmenu.hxx b/framework/inc/framework/addonmenu.hxx index 83b7f2b..6768dc7 100644 --- a/framework/inc/framework/addonmenu.hxx +++ b/framework/inc/framework/addonmenu.hxx @@ -30,6 +30,7 @@ #include #include #include +#include //_ // includes of other projects @@ -92,23 +93,25 @@ class FWE_DLLPUBLIC AddonMenuManager static sal_Bool IsAddonMenuId( sal_uInt16 nId ) { return (( nId >= ADDONMENU_ITEMID_START ) && ( nId < ADDONMENU_ITEMID_END )); } // Check if the context string matches the provided xModel context -static sal_Bool IsCorrectContext( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rModel, const rtl::OUString& aContext ); +static sal_Bool IsCorrectContext( const ::rtl::OUString& rModuleIdentifier, const rtl::OUString& aContext ); // Factory method to create different Add-On menu types static PopupMenu* CreatePopupMenuType( MenuType eMenuType, const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame ); // Create the Add-Ons menu -static AddonMenu* CreateAddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame ); +static AddonMenu* CreateAddonMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); // Merge the Add-Ons help menu items into the given menu bar at a defined pos static void MergeAddonHelpMenu( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, - MenuBar* pMergeMenuBar ); + MenuBar* pMergeMenuBar, + const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); // Merge the addon popup menus into the given menu bar at the provided pos. static void MergeAddonPopupMenus( const com::sun::star::uno::Reference< com::sun::star::frame::XFrame >& rFrame, -const com::sun::star::uno::Reference< com::sun::star::frame::XModel >& rModel, sal_uInt16 nMergeAtPos, -MenuBar* pMergeMenuBar ); +MenuBar* pMergeMenuBar, +const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& rServiceManager ); // Returns the next position to insert a menu item/sub menu static sal_uInt16 GetNextPos( sal_uInt16 nPos ); @@ -120,7 +123,7 @@ class FWE_DLLPUBLIC AddonMenuManager
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - cui/source
cui/source/options/optcolor.hrc |8 cui/source/options/optcolor.src |8 2 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 4df4135e32f950925088acd7920af3861c6f3675 Author: Herbert Dürr Date: Thu May 15 15:45:20 2014 + #i124796# fix Preferences->OpenOffice->Appearance tabpage listbox column width Patch-by: Thorsten Wagner diff --git a/cui/source/options/optcolor.hrc b/cui/source/options/optcolor.hrc index 809f04f..0e0cbd5 100644 --- a/cui/source/options/optcolor.hrc +++ b/cui/source/options/optcolor.hrc @@ -187,16 +187,16 @@ #define _FT_WIDTH 120 -#define _LINE_HEIGHT15 +#define _LINE_HEIGHT16 #define _FT_HEIGHT 10 #define _CB_WIDTH 130 #define _FT_XPOS14 #define _CB_XPOS6 -#define _LB_XPOS139 -#define _LB_WIDTH 50 +#define _LB_XPOS119 +#define _LB_WIDTH 70 #define _LB_HEIGHT 50 #define _WN_WIDTH 30 -#define _WN_HEIGHT 12 +#define _WN_HEIGHT 14 #define _WN_XPOS195 #define FT_SMARTTAGS168 diff --git a/cui/source/options/optcolor.src b/cui/source/options/optcolor.src index 4983f1f..04f0c7a 100644 --- a/cui/source/options/optcolor.src +++ b/cui/source/options/optcolor.src @@ -49,7 +49,7 @@ TabPage RID_SVXPAGE_COLORCONFIG ListBox LB_COLORSCHEME { HelpID = "cui:ListBox:RID_SVXPAGE_COLORCONFIG:LB_COLORSCHEME"; -Pos = MAP_APPFONT ( 65 , 14 ) ; +Pos = MAP_APPFONT ( 65 , 13 ) ; Size = MAP_APPFONT ( 77 , 58 ) ; Border = TRUE; Sort = TRUE; @@ -79,14 +79,14 @@ TabPage RID_SVXPAGE_COLORCONFIG Control CT_COLORCONFIG { Pos = MAP_APPFONT ( 12 , 45 ) ; -Size = MAP_APPFONT ( 236 , 134 ) ; +Size = MAP_APPFONT ( 236 , 138 ) ; Border = TRUE; DialogControl = TRUE; OutputSize = TRUE ; ScrollBar VB_VSCROLL { Pos = MAP_APPFONT ( 228 , 10 ) ; -Size = MAP_APPFONT ( 8 , 124 ) ; +Size = MAP_APPFONT ( 8 , 128 ) ; VScroll = TRUE; }; String ST_ON @@ -131,7 +131,7 @@ TabPage RID_SVXPAGE_COLORCONFIG OutputSize = TRUE ; Pos = MAP_APPFONT ( 0 , 10 ) ; -Size = MAP_APPFONT ( 228 , 124 ) ; +Size = MAP_APPFONT ( 228 , 128 ) ; DialogControl = TRUE; FixedText FT_GENERAL ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: avmedia/source
avmedia/source/macavf/player.mm |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 75c804c1be8acf4c3fc9935b81e696918f33fd9d Author: Herbert Dürr Date: Thu May 15 09:46:26 2014 + AOO: #i124875# use AVAsset's best guess duration if AVPlayerItem isn't ready yet in AV Foundation the most accurate media asset duration is available when the AVPlayerItem's status changes to AVPlayerItemStatusReadyToPlay. There already is an observer for this, but the upper layers expect getDuration() to be synchronous and to return within a reasonable time. Since returning an approximation is sufficient using the AVAsset's duration as fallback is fine. diff --git a/avmedia/source/macavf/player.mm b/avmedia/source/macavf/player.mm index 404083b..751dbed 100644 --- a/avmedia/source/macavf/player.mm +++ b/avmedia/source/macavf/player.mm @@ -216,7 +216,10 @@ double SAL_CALL Player::getDuration() if( mpPlayer ) { AVPlayerItem* pItem = [mpPlayer currentItem]; -duration = CMTimeGetSeconds( [pItem duration] ); +if( [pItem status] == AVPlayerItemStatusReadyToPlay ) +duration = CMTimeGetSeconds( [pItem duration] ); +else // fall back to AVAsset's best guess +duration = CMTimeGetSeconds( [[pItem asset] duration] ); } return duration; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - stlport/systemstl
stlport/systemstl/hash_map | 18 -- stlport/systemstl/hash_set | 18 -- stlport/systemstl/slist|6 +++--- 3 files changed, 19 insertions(+), 23 deletions(-) New commits: commit 5d3e7996df43efe1f5fa8e584d60ad0a30775d5d Author: Herbert Dürr Date: Thu May 15 12:16:43 2014 + #i124908# remove custom allocator support in stlport-replacement headers with the sal-internal custom allocator removed AOO no longer needs the stlport-replacement headers to support the complexity of containers with non-default allocators. Xcode>=5.1's libc++ runs into build problems with such custom allocator support in the stlport-replacement headers because of constness mismatches. diff --git a/stlport/systemstl/hash_map b/stlport/systemstl/hash_map index 5c2777f..812a51a 100644 --- a/stlport/systemstl/hash_map +++ b/stlport/systemstl/hash_map @@ -55,40 +55,38 @@ template< typename __K, typename __T, typename __H = hash<__K>, - typename __E = equal_to<__K>, - typename __A = allocator > > + typename __E = equal_to<__K> > class hash_map -: public unordered_map<__K,__T,__H,__E,__A> +: public unordered_map<__K,__T,__H,__E> { public: - typedef unordered_map<__K,__T,__H,__E,__A> _super; + typedef unordered_map<__K,__T,__H,__E> _super; hash_map( void) {} hash_map( size_t n) : _super( n) {} private: // setting the hasher dynamically is not supported in the emulation! - hash_map( size_t, const __H&, const __E& rE=__E(), const __A& rA=__A()); // not implemented + hash_map( size_t, const __H&, const __E& rE=__E()); // not implemented }; template< typename __K, typename __T, typename __H = hash<__K>, - typename __E = equal_to<__K>, - typename __A = allocator > > + typename __E = equal_to<__K> > class hash_multimap -: public unordered_multimap<__K,__T,__H,__E,__A> +: public unordered_multimap<__K,__T,__H,__E> { public: - typedef unordered_multimap<__K,__T,__H,__E,__A> _super; + typedef unordered_multimap<__K,__T,__H,__E> _super; hash_multimap( void) {} hash_multimap( size_t n) : _super( n) {} private: // setting the hasher dynamically is not supported in the emulation! - hash_multimap( size_t, const __H&, const __E& rE=__E(), const __A& rA=__A()); // not implemented + hash_multimap( size_t, const __H&, const __E& rE=__E()); // not implemented }; } // namespace std diff --git a/stlport/systemstl/hash_set b/stlport/systemstl/hash_set index a6bc33c..5435ee9 100644 --- a/stlport/systemstl/hash_set +++ b/stlport/systemstl/hash_set @@ -51,37 +51,35 @@ namespace std template< typename __K, typename __H = hash<__K>, - typename __E = equal_to<__K>, - typename __A = allocator<__K> > + typename __E = equal_to<__K> > class hash_set -: public unordered_set<__K,__H,__E,__A> +: public unordered_set<__K,__H,__E> { - typedef unordered_set<__K,__H,__E,__A> _super; + typedef unordered_set<__K,__H,__E> _super; public: hash_set( void) {} hash_set( size_t n) : _super(n) {} private: // setting the hasher dynamically is not supported in the emulation! - hash_set( size_t, const __H&, const __E& rE=__E(), const __A& rA=__A()); // not implemented + hash_set( size_t, const __H&, const __E& rE=__E()); // not implemented }; template< typename __K, typename __H = hash<__K>, - typename __E = equal_to<__K>, - typename __A = allocator<__K> > + typename __E = equal_to<__K> > class hash_multiset -: public unordered_multiset<__K,__H,__E,__A> +: public unordered_multiset<__K,__H,__E> { - typedef unordered_multiset<__K,__H,__E,__A> _super; + typedef unordered_multiset<__K,__H,__E> _super; public: hash_multiset( void) {} hash_multiset( size_t n) : _super( n) {} private: // setting the hasher dynamically is not supported in the emulation! - hash_multiset( size_t, const __H&, const __E& rE=__E(), const __A& rA=__A()); // not implemented + hash_multiset( size_t, const __H&, const __E& rE=__E()); // not implemented }; } // namespace std diff --git a/stlport/systemstl/slist b/stlport/systemstl/slist index a51fc24..4ff1514 100644 --- a/stlport/systemstl/slist +++ b/stlport/systemstl/slist @@ -57,11 +57,11 @@ namespace std using STLP4_SLIST_EMUBASE; // lame emulation of the pre-C++11 slist using the std::forward_list (or std::list) -template< typename T, class A=allocator > -class slist : public STLP4_SLIST_EMUBASE +template< typename T > +class slist : public STLP4_SLIST_EMUBASE { public: - typedef typename STLP4_SLIST_EMUBASE _super; + typedef typename STLP4_SLIST_EMUBASE _super; typedef typename _super::iterator slist_mit; typedef typename _super:
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - filter/source sc/source sd/source shell/source sw/inc sw/source
filter/source/graphicfilter/ipbm/ipbm.cxx |9 ++--- filter/source/graphicfilter/ipcd/ipcd.cxx |3 ++- filter/source/graphicfilter/ipcx/ipcx.cxx |3 ++- filter/source/graphicfilter/iras/iras.cxx |3 ++- filter/source/graphicfilter/itga/itga.cxx |2 +- sc/source/ui/view/drawview.cxx |2 +- sd/source/ui/view/DocumentRenderer.cxx |2 +- shell/source/backends/macbe/macbackend.cxx |2 +- sw/inc/unotbl.hxx |7 --- sw/inc/viewsh.hxx |5 ++--- sw/source/core/inc/frame.hxx |6 -- sw/source/core/view/vprint.cxx |9 ++--- 12 files changed, 28 insertions(+), 25 deletions(-) New commits: commit 9915536a74bb1a4e821537015a641f88f701e32b Author: Herbert Dürr Date: Thu May 15 11:31:37 2014 + #i124422# fix default arguments in friend declarations chapter 8.3.6.4 of the C++11 standard requests that friend declarations must not specify default unless these declarations are also definitions. Older compilers still tolerate such constructs that were still undecided until http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#136 but clang>=3.4 or xcode>=5.1 now report errors for such code. The errors break the build and so they have to be fixed. Cleaner alternatives to the fixes are possible but for now they are intended to allow the build while being minimally invasive. diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx index 56d0aea..d9fdf8b 100644 --- a/sw/inc/unotbl.hxx +++ b/sw/inc/unotbl.hxx @@ -58,11 +58,12 @@ class SwTableCursor; class SwTableBoxFmt; class SwChartDataProvider; class SwFrmFmt; +class SwXCell; +void lcl_setString( SwXCell&, const rtl::OUString &rTxt, sal_Bool bKeepNumberFmt = sal_True ); -/* -22.09.00 11:10 +// --- - ---*/ class SwChartEventListenerContainer : public SwEventListenerContainer { public: @@ -87,7 +88,7 @@ class SwXCell : public SwXCellBaseClass, public SwClient { friend void lcl_setString( SwXCell &rCell, const rtl::OUString &rTxt, - sal_Bool bKeepNumberFmt = sal_False ); + sal_Bool bKeepNumberFmt ); friend double lcl_getValue( SwXCell &rCell ); friend void lcl_setValue( SwXCell &rCell, double nVal ); diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx index e67b9a0..62ed7e8 100644 --- a/sw/inc/viewsh.hxx +++ b/sw/inc/viewsh.hxx @@ -110,9 +110,8 @@ class SW_DLLPUBLIC ViewShell : public Ring // OD 12.12.2002 #103492# - for setting visible area for page preview paint friend class SwPagePreviewLayout; -//Umsetzen der SwVisArea, damit vor dem Drucken sauber formatiert -//werden kann. -friend void SetSwVisArea( ViewShell *pSh, const SwRect &, sal_Bool bPDFExport = sal_False ); +// setting the SwVisArea is used to get a clean formatting before printing +friend void SetSwVisArea( ViewShell*, const SwRect& /*, sal_Bool bPDFExport = sal_False */ ); // --> PB 2007-05-30 #146850# static BitmapEx*pReplaceBmp;// replaced display of still loaded images diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 861b8d7..7c4d2b0 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -142,6 +142,8 @@ typedef void (SwFrm:: *SwFrmMakePos)( const SwFrm*, const SwFrm*, sal_Bool ); typedef long (*SwOperator)( long, long ); typedef void (SwFrm:: *SwFrmSet)( long, long ); +SwFrm* SaveCntnt( SwLayoutFrm*, SwFrm* pStart = NULL ); + struct SwRectFnCollection { SwRectGet fnGetTop; @@ -279,8 +281,8 @@ class SwFrm: public SwClient, public SfxBroadcaster friend class SwLooping; // LoopControlling (layouter.cxx) //Hebt die Lower waehrend eines Spaltenumbaus auf. -friend SwFrm *SaveCntnt( SwLayoutFrm *, SwFrm* pStart = NULL ); -friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); +friend SwFrm *SaveCntnt( SwLayoutFrm*, SwFrm* pStart ); +friend void RestoreCntnt( SwFrm *, SwLayoutFrm *, SwFrm *pSibling, bool bGrow ); #if OSL_DEBUG_LEVEL > 1 //entfernt leere SwSectionFrms aus einer Kette diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 0f63ebf..83cd7b1 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -190,14 +190,9 @@ void SwPaintQueue::Remove( ViewShell *pSh ) } } -/** - * Methode : void SetSwVisArea( ViewShell *pSh, Point aPrtOffset, ... - * Beschreibung: - * Erstellt: OK 04.11.94 16:27 - * Aenderung : -
[Libreoffice-commits] core.git: vcl/quartz
vcl/quartz/ctfonts.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit f4ea8c2f73034cd43aca4262994e8a9aaa118b0a Author: Herbert Dürr Date: Thu May 15 13:15:37 2014 +0300 AOO: #i124823# fix the calculation of leading metrics for CoreText tml says: As such, for us the sample document from the above AOO issue already gets laid out corectly (according to how the bug reporter says it should be laid out), both in master and 4.2. We already set the external leading field based on what CTFontGetLeading() says. Also, our code around here is a little bit different as we don't have any fFPIY paramter or mfFontScale field, so the change did not apply directly. But I adapted it and applied anyway. Effectively, for us the only change is that the internal leading is now returned as non-zero. No visible change to the sample document's layout. Change-Id: I4f8967723e371fa2b695f726ff2f28c0f6d6ae27 diff --git a/vcl/quartz/ctfonts.cxx b/vcl/quartz/ctfonts.cxx index 4382cae..bede546 100644 --- a/vcl/quartz/ctfonts.cxx +++ b/vcl/quartz/ctfonts.cxx @@ -121,10 +121,13 @@ void CoreTextStyle::GetFontMetric( ImplFontMetricData& rMetric ) const // TODO: is it worth it to cache the CTFontRef in SetFont() and reuse it here? CTFontRef aCTFontRef = (CTFontRef)CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ); -rMetric.mnAscent = CTFontGetAscent( aCTFontRef ); +const CGFloat fAscent = CTFontGetAscent( aCTFontRef ); +const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef ); +rMetric.mnAscent = fAscent; rMetric.mnDescent = CTFontGetDescent( aCTFontRef ); rMetric.mnExtLeading = CTFontGetLeading( aCTFontRef ); -rMetric.mnIntLeading = 0; +rMetric.mnIntLeading = fAscent - fCapHeight; + // since ImplFontMetricData::mnWidth is only used for stretching/squeezing fonts // setting this width to the pixel height of the fontsize is good enough // it also makes the calculation of the stretch factor simple ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - avmedia/source sal/inc sal/osl sal/qa sal/rtl
avmedia/source/macavf/macavf_player.cxx |5 sal/inc/osl/diagnose.hxx| 14 -- sal/inc/rtl/allocator.hxx | 171 sal/osl/all/debugbase.cxx |2 sal/osl/w32/path_helper.hxx |1 sal/osl/w32/procimpl.cxx| 10 - sal/qa/osl/process/osl_process.cxx |4 sal/rtl/source/bootstrap.cxx| 11 -- sal/rtl/source/hash.cxx |5 sal/rtl/source/unload.cxx | 18 +-- 10 files changed, 20 insertions(+), 221 deletions(-) New commits: commit c6e0325df6efce45dbb2616a32b7745c449c6c58 Author: Herbert Dürr Date: Thu May 15 09:59:27 2014 + #i124896# remove obsoleted sal-module-internal custom STL allocator The SAL module avoided the heavy dependency on the stlport4-libraries by using a custom allocator for its internal STL containers. With stlport4 removed these dependencies are gone and the SAL-internal custom allocator is obsoleted. Since the custom allocator results in build problems with clang>=3.4 or xcode>=5.1 it is time to remove it for good. diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx index 9d887aa..5cab379 100644 --- a/sal/inc/osl/diagnose.hxx +++ b/sal/inc/osl/diagnose.hxx @@ -23,21 +23,10 @@ #if ! defined(OSL_DIAGNOSE_HXX_INCLUDED) #define OSL_DIAGNOSE_HXX_INCLUDED -#if ! defined(_OSL_DIAGNOSE_H_) #include "osl/diagnose.h" -#endif -#if ! defined(_OSL_INTERLOCK_H_) #include "osl/interlck.h" -#endif -#if ! defined(_OSL_MUTEX_HXX_) #include "osl/mutex.hxx" -#endif -#if ! defined(INCLUDED_RTL_ALLOCATOR_HXX) -#include "rtl/allocator.hxx" -#endif -#if ! defined(_RTL_INSTANCE_HXX_) #include "rtl/instance.hxx" -#endif #include #include #include @@ -91,8 +80,7 @@ struct VoidPtrHash : ::std::unary_function { } }; -typedef ::std::hash_set, -::rtl::Allocator > VoidPointerSet; +typedef ::std::hash_set > VoidPointerSet; struct ObjectRegistryData { ObjectRegistryData( ::std::type_info const& rTypeInfo ) diff --git a/sal/inc/rtl/allocator.hxx b/sal/inc/rtl/allocator.hxx deleted file mode 100644 index d4c1d47..000 --- a/sal/inc/rtl/allocator.hxx +++ /dev/null @@ -1,171 +0,0 @@ -/** - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - - -#if !defined INCLUDED_RTL_ALLOCATOR_HXX -#define INCLUDED_RTL_ALLOCATOR_HXX - -#if ! defined(_SAL_TYPES_H_) -#include "sal/types.h" -#endif -#if ! defined(_RTL_ALLOC_H_) -#include "rtl/alloc.h" -#endif - -#include - -//## -// This is no general purpose STL allocator but one -// necessary to use STL for some implementation but -// avoid linking sal against the STLPort library!!! -// For more information on when and how to define a -// custom stl allocator have a look at Scott Meyers: -// "Effective STL", Nicolai M. Josuttis: -// "The C++ Standard Library - A Tutorial and Reference" -// and at http://www.josuttis.com/cppcode/allocator.html - -namespace rtl { - -/** @internal */ -template -class Allocator -{ -public: -typedef T value_type; -typedef T* pointer; -typedef const T* const_pointer; -typedef T& reference; -typedef const T& const_reference; -typedef ::std::size_t size_type; -typedef ::std::ptrdiff_t difference_type; - -//- -template -struct rebind -{ -typedef Allocator other; -}; - -//- -pointer address (reference value) const -{ -return &value; -} - -//- -const_pointer address (const_reference value) const -{ -return &value; -} - -//- -Allocator() SAL_THROW(()) -{} - -//- -template -Allocator (const Allocator&) SAL_THROW(()) -{} - -//- -Allocator(const Allocator&) SAL_THROW(()) -{} - -//
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - postprocess/packcomponents
postprocess/packcomponents/makefile.mk |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit c1498d1638bb563017230b324a31a59cea476cb6 Author: Herbert Dürr Date: Tue May 13 12:12:12 2014 + #i124875# pre-register the Mac AVFoundation component diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index d2de088..4ef5f14 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -315,6 +315,7 @@ my_components += \ .IF "$(OS)" == "MACOSX" my_components += \ avmediaQuickTime \ +avmediaMacAVF \ fps_aqua \ macab1 \ macbe1 \ commit a4773fde20d4be3caa815a409a144aa7003cb25d Author: Herbert Dürr Date: Tue May 13 12:10:19 2014 + #i124800# reenable pre-registration of the quicktime component diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk index ebdc907..d2de088 100644 --- a/postprocess/packcomponents/makefile.mk +++ b/postprocess/packcomponents/makefile.mk @@ -314,13 +314,11 @@ my_components += \ .IF "$(OS)" == "MACOSX" my_components += \ +avmediaQuickTime \ fps_aqua \ macab1 \ macbe1 \ MacOSXSpell -.IF "${MACOSX_DEPLOYMENT_TARGET}" == "" -my_components += avmediaQuickTime -.END .END .IF "$(OS)" == "WNT" ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - avmedia/source
avmedia/source/macavf/macavf_framegrabber.cxx | 12 +--- avmedia/source/macavf/macavf_framegrabber.hxx |1 + avmedia/source/macavf/macavf_player.cxx | 23 --- avmedia/source/macavf/macavf_player.hxx |4 +--- 4 files changed, 15 insertions(+), 25 deletions(-) New commits: commit 976e787f6b33389ea9dcd35ff7680dedeace47ac Author: Herbert Dürr Date: Mon May 12 16:07:09 2014 + #i124875# avoid wasteful loading of an AVAsset in MacAVF::Framegrabber FrameGrabber used to load its own copy of a movie. Since multimedia content is often very data-intensive this should and can be avoided by using the movie asset already available in the Player. diff --git a/avmedia/source/macavf/macavf_framegrabber.cxx b/avmedia/source/macavf/macavf_framegrabber.cxx index 1748199..55611af 100644 --- a/avmedia/source/macavf/macavf_framegrabber.cxx +++ b/avmedia/source/macavf/macavf_framegrabber.cxx @@ -51,8 +51,6 @@ FrameGrabber::~FrameGrabber() bool FrameGrabber::create( const ::rtl::OUString& rURL ) { -// TODO: use AVPlayer's movie directly instead of loading it here? - NSString* pNSStr = [NSString stringWithCharacters:rURL.getStr() length:rURL.getLength()]; NSURL* pNSURL = [NSURL URLWithString: [pNSStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; AVAsset* pMovie = [AVURLAsset URLAssetWithURL:pNSURL options:nil]; @@ -61,9 +59,17 @@ bool FrameGrabber::create( const ::rtl::OUString& rURL ) OSL_TRACE( "AVGrabber::create() cannot load url=\"%s\"", [pNSStr UTF8String] ); return false; } + +return create( pMovie ); +} + +// -- + +bool FrameGrabber::create( AVAsset* pMovie ) +{ if( [[pMovie tracksWithMediaType:AVMediaTypeVideo] count] == 0) { -OSL_TRACE( "AVGrabber::create() found no video in url=\"%s\"", [pNSStr UTF8String] ); +OSL_TRACE( "AVGrabber::create() found no video content!" ); return false; } diff --git a/avmedia/source/macavf/macavf_framegrabber.hxx b/avmedia/source/macavf/macavf_framegrabber.hxx index 21d1dad..940e54d 100644 --- a/avmedia/source/macavf/macavf_framegrabber.hxx +++ b/avmedia/source/macavf/macavf_framegrabber.hxx @@ -42,6 +42,7 @@ public: virtual ~FrameGrabber(); boolcreate( const ::rtl::OUString& rURL ); +boolcreate( AVAsset* pMovie ); // XFrameGrabber virtual ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphic > SAL_CALL grabFrame( double fMediaTime ) throw (::com::sun::star::uno::RuntimeException); diff --git a/avmedia/source/macavf/macavf_player.cxx b/avmedia/source/macavf/macavf_player.cxx index 2e15907..26bc07a 100644 --- a/avmedia/source/macavf/macavf_player.cxx +++ b/avmedia/source/macavf/macavf_player.cxx @@ -112,17 +112,6 @@ Player::~Player() // -- -AVAsset* Player::getMovie() -{ -if( !mpPlayer ) -return nil; -AVAsset* pMovie = [[mpPlayer currentItem] asset]; -OSL_ASSERT( pMovie ); -return pMovie; -} - -// -- - bool Player::handleObservation( NSString* pKeyPath ) { OSL_TRACE( "AVPlayer::handleObservation key=\"%s\"", [pKeyPath UTF8String]); @@ -139,8 +128,6 @@ bool Player::handleObservation( NSString* pKeyPath ) bool Player::create( const ::rtl::OUString& rURL ) { -maURL = rURL; - // get the media asset NSString* aNSStr = [NSString stringWithCharacters:rURL.getStr() length:rURL.getLength()]; NSURL* aNSURL = [NSURL URLWithString: [aNSStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; @@ -433,12 +420,10 @@ uno::Reference< media::XFrameGrabber > SAL_CALL Player::createFrameGrabber() uno::Reference< media::XFrameGrabber > xRet; OSL_TRACE ("Player::createFrameGrabber"); -if( !maURL.isEmpty() ) -{ -FrameGrabber* pGrabber = new FrameGrabber( mxMgr ); -if( pGrabber->create( maURL ) ) -xRet = pGrabber; -} +FrameGrabber* pGrabber = new FrameGrabber( mxMgr ); +AVAsset* pMovie = [[mpPlayer currentItem] asset]; +if( pGrabber->create( pMovie ) ) +xRet = pGrabber; return xRet; } diff --git a/avmedia/source/macavf/macavf_player.hxx b/avmedia/source/macavf/macavf_player.hxx index 98c5454..fc99551 100644 --- a/avmedia/source/macavf/macavf_player.hxx +++ b/avmedia/source/macavf/macavf_player.hxx @@ -46,6 +46,7 @@ public: virtual ~Player(); bool create( const ::rtl::OUString& rURL ); +bool create( AVAsset* ); // XPlayer virtual void SAL_CALL start() throw (::com::sun::star::uno::RuntimeException); @@ -72,15 +73,12 @@ public: virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeExcepti
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - set_soenv.in sw/source
set_soenv.in |3 ++- sw/source/ui/utlui/navipi.cxx |1 + 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit a6c044e24a397fa303989f1180c7bc944cbde1f7 Author: Herbert Dürr Date: Thu May 8 08:36:03 2014 + #i124422# adjust include path for libc++ headers to the selected XCode folder While XCode5's xcode-select supports the -p and --print-path options, XCode4 officially only knows -print-path. XCode4 seems to tolerate --print-path though (tested on XCode4.6), so this can be universally used. Patch-by: Thorsten Wagner Review-by: Herbert Duerr diff --git a/set_soenv.in b/set_soenv.in index 2364a60..80fb9d2 100644 --- a/set_soenv.in +++ b/set_soenv.in @@ -1441,7 +1441,8 @@ elsif ($platform =~ m/cygwin/) elsif ($platform =~ m/darwin/) { $FRAMEWORKSHOME = "@MACOSX_SDK_PATH@/System/Library/Frameworks"; -my $STLINC .= $I."/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/"; +chomp( my $TOOLSPATH = `xcode-select --print-path` ); +my $STLINC .= $I."$TOOLSPATH/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/"; $SOLARINC .= $STLINC . $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers"; $GUIBASE = "aqua"; } commit c104272ea1274dea87cd66cfaa61b34806708521 Author: Tsutomu Uchino Date: Thu May 8 08:08:57 2014 + #i27364# set line count of dropdown to 9 for document list of navigator on Writer diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 0ae216d..d3aea70 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -803,6 +803,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetHelpId(HID_NAVIGATOR_TOOLBOX ); aGlobalToolBox.SetHelpId(HID_NAVIGATOR_GLOBAL_TOOLBOX); aDocListBox.SetHelpId(HID_NAVIGATOR_LISTBOX ); +aDocListBox.SetDropDownLineCount(9); nDocLBIniHeight = aDocListBox.GetSizePixel().Height(); nZoomOutInit = nZoomOut = Resource::ReadShortRes(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - avmedia/source scp2/source
avmedia/source/quicktime/framegrabber.cxx|5 --- avmedia/source/quicktime/makefile.mk |2 - avmedia/source/quicktime/player.cxx | 37 --- avmedia/source/quicktime/quicktimecommon.hxx | 13 - scp2/source/ooo/file_library_ooo.scp |2 - 5 files changed, 2 insertions(+), 57 deletions(-) New commits: commit db742b838d3eae07436b27f1619e2b7f2da12f44 Author: Herbert Dürr Date: Tue May 6 11:13:12 2014 + #i124800# switch avmedia's QuickTime component to QTKit for now because the QuickTime API is not available to 64bit clients. The switch to QTKit is temporary only because it has already been deprecated in OSX 10.9. We'll have to switch to OSX's AVFoundation framework instead soon. Suggested by: Ariel Constenla-Haile diff --git a/avmedia/source/quicktime/framegrabber.cxx b/avmedia/source/quicktime/framegrabber.cxx index 612a515..9073ee3 100644 --- a/avmedia/source/quicktime/framegrabber.cxx +++ b/avmedia/source/quicktime/framegrabber.cxx @@ -46,15 +46,10 @@ FrameGrabber::FrameGrabber( const uno::Reference< lang::XMultiServiceFactory >& OSErr result; NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; -// check the version of QuickTime installed -result = Gestalt(gestaltQuickTime,&mnVersion); - if ((result == noErr) && (mnVersion >= QT701)) -{ // we have version 7.01 or later, initialize mpMovie = [QTMovie movie]; [mpMovie retain]; mbInitialized = true; -} [pool release]; } diff --git a/avmedia/source/quicktime/makefile.mk b/avmedia/source/quicktime/makefile.mk index 808360f..07ae749 100644 --- a/avmedia/source/quicktime/makefile.mk +++ b/avmedia/source/quicktime/makefile.mk @@ -26,7 +26,7 @@ PRJNAME=avmedia TARGET=avmediaQuickTime # the QuickTime API has been deprecated since OSX 10.5 and has been removed in the OSX SDK 10.7 -.IF ("$(GUIBASE)" != "aqua") || ("${MACOSX_DEPLOYMENT_TARGET:s/.//}" >= "106") +.IF "$(GUIBASE)" != "aqua" dummy: @echo " Nothing to build for GUIBASE=$(GUIBASE) and OSX$(MACOSX_DEPLOYMENT_TARGET)" .ELSE diff --git a/avmedia/source/quicktime/player.cxx b/avmedia/source/quicktime/player.cxx index e148e4c..f8bd6f1 100644 --- a/avmedia/source/quicktime/player.cxx +++ b/avmedia/source/quicktime/player.cxx @@ -27,37 +27,6 @@ #include "framegrabber.hxx" #include "window.hxx" -// dbg_dump for development -#if OSL_DEBUG_LEVEL > 1 -#include -#include - -const sal_Char *dbg_dump(const rtl::OString &rStr) -{ -static rtl::OStringBuffer aStr; - -aStr = rtl::OStringBuffer(rStr); -aStr.append(static_cast(0)); -return aStr.getStr(); -} - -const sal_Char *dbg_dump(const rtl::OUString &rStr) -{ -return dbg_dump(rtl::OUStringToOString(rStr, RTL_TEXTENCODING_UTF8)); -} - -const sal_Char *dbg_dump(rtl_String *pStr) -{ -return dbg_dump(rtl::OString(pStr)); -} - -const sal_Char *dbg_dump(rtl_uString *pStr) -{ -return dbg_dump(rtl::OUString(pStr)); -} - -#endif - using namespace ::com::sun::star; namespace avmedia { namespace quicktime { @@ -88,13 +57,7 @@ Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : NSApplicationLoad(); NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; -// check the version of QuickTime installed -result = Gestalt(gestaltQuickTime,&mnVersion); -if ((result == noErr) && (mnVersion >= QT701)) -{ - // we have version 7.01 or later, initialize mbInitialized = true; -} [pool release]; } diff --git a/avmedia/source/quicktime/quicktimecommon.hxx b/avmedia/source/quicktime/quicktimecommon.hxx index 7e9e0b5..eac6f24 100644 --- a/avmedia/source/quicktime/quicktimecommon.hxx +++ b/avmedia/source/quicktime/quicktimecommon.hxx @@ -28,13 +28,10 @@ #include #import #import -#import #include #endif #include -#ifndef __RTL_USTRING_ #include -#endif #include #include #include @@ -65,13 +62,5 @@ #define AVMEDIA_QUICKTIME_WINDOW_IMPLEMENTATIONNAME "com.sun.star.comp.avmedia.Window_QuickTime" #define AVMEDIA_QUICKTIME_WINDOW_SERVICENAME "com.sun.star.media.Window_QuickTime" -#define WM_GRAPHNOTIFY (WM_USER + 567) - -// Quicktime 7+ in Mac OS X 10.4 -#define QT701 0x0701 - -// Quicktime 6.4+ in Mac OS X 10.3 -#define QT64 0x0640 - - #endif // _QUICKTIMECOMMOM_HXX + diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp index 4ae6717..2a94bf9 100644 --- a/scp2/source/ooo/file_library_ooo.scp +++ b/scp2/source/ooo/file_library_ooo.scp @@ -609,14 +609,12 @@ File gid_File_Lib_MacOSXSpell Dir = SCP2_OOO_BIN_DIR; End -#if (MACOSX_DEPLOYMENT_TARGET_NUM < 106) File gid_File_Lib_avmediaQuickTime TXT_FILE_BODY; Styles = (PACKED); Name = LIBNAME(avmediaQuickTime); Dir = SCP2_OOO_BIN_DIR; End -#endif // MACOSX_DEPLOYMENT_TARGET_NUM #endif // MACOSX #ifdef OS2 ___
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/ctfonts.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit 0ee124496ac74172f41ed2e116fd554130036824 Author: Herbert Dürr Date: Tue May 6 09:07:50 2014 + #i124823# fix the calculation of leading metrics for CoreText diff --git a/vcl/aqua/source/gdi/ctfonts.cxx b/vcl/aqua/source/gdi/ctfonts.cxx index d7f3a2d..6d4ae40 100644 --- a/vcl/aqua/source/gdi/ctfonts.cxx +++ b/vcl/aqua/source/gdi/ctfonts.cxx @@ -176,10 +176,13 @@ void CTTextStyle::GetFontMetric( float fDPIY, ImplFontMetricData& rMetric ) cons CTFontRef aCTFontRef = (CTFontRef)CFDictionaryGetValue( mpStyleDict, kCTFontAttributeName ); const double fPixelSize = (mfFontScale * fDPIY); -rMetric.mnAscent = lrint( CTFontGetAscent( aCTFontRef ) * fPixelSize); +const CGFloat fAscent = CTFontGetAscent( aCTFontRef ); +const CGFloat fCapHeight = CTFontGetCapHeight( aCTFontRef ); +rMetric.mnAscent = lrint( fAscent * fPixelSize); rMetric.mnDescent = lrint( CTFontGetDescent( aCTFontRef ) * fPixelSize); -rMetric.mnIntLeading = lrint( CTFontGetLeading( aCTFontRef ) * fPixelSize); -rMetric.mnExtLeading = 0; +rMetric.mnExtLeading = lrint( CTFontGetLeading( aCTFontRef ) * fPixelSize); +rMetric.mnIntLeading = lrint( (fAscent - fCapHeight) * fPixelSize); + // since ImplFontMetricData::mnWidth is only used for stretching/squeezing fonts // setting this width to the pixel height of the fontsize is good enough // it also makes the calculation of the stretch factor simple ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - tools/test
tools/test/tests.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 86642be54bf5914da333a4e0784ad939f63d83bc Author: Herbert Dürr Date: Tue Apr 29 09:23:32 2014 + dummy commit for debugging the ASF/AOO-buildbots diff --git a/tools/test/tests.cxx b/tools/test/tests.cxx index dae54bb..0e715f5 100644 --- a/tools/test/tests.cxx +++ b/tools/test/tests.cxx @@ -20,7 +20,6 @@ */ - // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_tools.hxx" // autogenerated file with codegen.pl ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/aqua
vcl/aqua/source/gdi/ctlayout.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8db10217765f523bcc317b76c7f2ded31555bae7 Author: Herbert Dürr Date: Fri Apr 11 06:44:58 2014 + #i124657# #i124617# restore lost comment markers diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 6005b15..8f57ca1 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -67,7 +67,7 @@ private: float mfFontScale; // TODO: does CoreText have a font size limit? CGFloat mfFontRotation; // text direction angle (in radians) -CGFloat mfFontStretch; <1.0: font is squeezed, >1.0 font is stretched +CGFloat mfFontStretch; // <1.0: font gets squeezed, >1.0: font gets stretched // cached details about the resulting layout // mutable members since these details are all lazy initialized ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - solenv/inc vcl/aqua vcl/source
solenv/inc/minor.mk |2 +- vcl/aqua/source/gdi/ctlayout.cxx | 29 - vcl/source/gdi/dibtools.cxx | 11 +++ 3 files changed, 24 insertions(+), 18 deletions(-) New commits: commit 472884c5fd8f6008ca98f88d8a7b14eec5518117 Author: Herbert Dürr Date: Thu Apr 10 09:33:57 2014 + #i124617# make CoreText tolerate PDF-export's unexpected font switches For some documents it was observed that the PDF-export switches the font after text layout and before text drawing/measuring. This use case is quite atrocious and unexpected and crashed our CoreText glue code. The other platforms survive it though; to minimize the risk to them only the CoreText glue gets adapted to survive this scenario. diff --git a/vcl/aqua/source/gdi/ctlayout.cxx b/vcl/aqua/source/gdi/ctlayout.cxx index 4aa5112..6005b15 100644 --- a/vcl/aqua/source/gdi/ctlayout.cxx +++ b/vcl/aqua/source/gdi/ctlayout.cxx @@ -52,9 +52,8 @@ public: virtual voidSimplify( bool bIsBase ); private: -const CTTextStyle* constmpTextStyle; - // CoreText specific objects +CFMutableDictionaryRef mpStyleDict; CFAttributedStringRef mpAttrString; CTLineRef mpCTLine; @@ -67,6 +66,9 @@ private: // in these cases the font scale becomes something bigger than 1.0 float mfFontScale; // TODO: does CoreText have a font size limit? +CGFloat mfFontRotation; // text direction angle (in radians) +CGFloat mfFontStretch; <1.0: font is squeezed, >1.0 font is stretched + // cached details about the resulting layout // mutable members since these details are all lazy initialized mutable double mfCachedWidth; // cached value of resulting typographical width @@ -79,17 +81,19 @@ private: // === CTLayout::CTLayout( const CTTextStyle* pTextStyle ) -: mpTextStyle( pTextStyle ) +: mpStyleDict( pTextStyle->GetStyleDict() ) , mpAttrString( NULL ) , mpCTLine( NULL ) , mnCharCount( 0 ) , mnTrailingSpaceCount( 0 ) , mfTrailingSpaceWidth( 0.0 ) , mfFontScale( pTextStyle->mfFontScale ) +, mfFontRotation( pTextStyle->mfFontRotation ) +, mfFontStretch( pTextStyle->mfFontStretch ) , mfCachedWidth( -1 ) , mnBaseAdv( 0 ) { -CFRetain( mpTextStyle->GetStyleDict() ); +CFRetain( mpStyleDict ); } // --- @@ -100,7 +104,7 @@ CTLayout::~CTLayout() CFRelease( mpCTLine ); if( mpAttrString ) CFRelease( mpAttrString ); -CFRelease( mpTextStyle->GetStyleDict() ); +CFRelease( mpStyleDict ); } // --- @@ -131,7 +135,7 @@ bool CTLayout::LayoutText( ImplLayoutArgs& rArgs ) } // create the CoreText line layout using the requested text style -mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpTextStyle->GetStyleDict() ); +mpAttrString = CFAttributedStringCreate( NULL, aCFText, mpStyleDict ); mpCTLine = CTLineCreateWithAttributedString( mpAttrString ); CFRelease( aCFText); @@ -201,7 +205,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs ) CFRelease( mpCTLine ); CFStringRef aCFText = CFStringCreateWithCharactersNoCopy( NULL, rArgs.mpStr + mnMinCharPos, mnCharCount - mnTrailingSpaceCount, kCFAllocatorNull ); -CFAttributedStringRef pAttrStr = CFAttributedStringCreate( NULL, aCFText, mpTextStyle->GetStyleDict() ); +CFAttributedStringRef pAttrStr = CFAttributedStringCreate( NULL, aCFText, mpStyleDict ); mpCTLine = CTLineCreateWithAttributedString( pAttrStr ); CFRelease( aCFText); CFRelease( pAttrStr ); @@ -249,12 +253,11 @@ void CTLayout::DrawText( SalGraphics& rGraphics ) const const Point aVclPos = GetDrawPosition( Point(mnBaseAdv,0) ); CGPoint aTextPos = { +aVclPos.X()/mfFontScale, -aVclPos.Y()/mfFontScale }; -if( mpTextStyle->mfFontRotation != 0.0 ) +if( mfFontRotation != 0.0 ) { -const CGFloat fRadians = mpTextStyle->mfFontRotation; -CGContextRotateCTM( rAquaGraphics.mrContext, +fRadians ); +CGContextRotateCTM( rAquaGraphics.mrContext, +mfFontRotation ); -const CGAffineTransform aInvMatrix = CGAffineTransformMakeRotation( -fRadians ); +const CGAffineTransform aInvMatrix = CGAffineTransformMakeRotation( -mfFontRotation ); aTextPos = CGPointApplyAffineTransform( aTextPos, aInvMatrix ); } @@ -353,12 +356,12 @@ int CTLayout::GetNextGlyphs( int nLen, sal_GlyphId* pOutGlyphIds, Point& rPos, i // convert glyph details for VCL *(pOutGlyphIds++) = pCGGlyphIdx[ nSubIndex ]; if( pGlyphAdvances ) -*(pGlyphAdvances++) = pCGGlyphAdvs[ nSubIndex ].width; +*(pGlyphAdvances++) = mfFontStretch * pCGGlyphAdvs[