[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2019-05-22 Thread Matthias Seidel (via logerrit)
 vcl/source/app/svdata.cxx |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit e77524cb2eb6e1a6ecdcfc914bbf77a8b084cb53
Author: Matthias Seidel 
AuthorDate: Wed May 22 23:41:32 2019 +
Commit: Matthias Seidel 
CommitDate: Wed May 22 23:41:32 2019 +

Cleaned up whitespace, fixed typos

diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 139c5e689ded..1c3b641a572d 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -56,7 +56,7 @@
 #include "vcl/msgbox.hxx"
 #include "vcl/unohelp.hxx"
 #include "vcl/button.hxx" // for Button::GetStandardText
-#include "vcl/dockwin.hxx"  // for DockingManager
+#include "vcl/dockwin.hxx" // for DockingManager
 
 #include "salinst.hxx"
 #include "salframe.hxx"
@@ -146,11 +146,11 @@ void ImplInitSVData()
 }
 }
 #ifdef WNT
-//Default enable the acc bridge interface
+// Default enable the acc bridge interface
 pImplSVData->maAppData.m_bEnableAccessInterface =true;
 #endif
 
-// mark default layout border as unitialized
+// mark default layout border as uninitialized
 pImplSVData->maAppData.mnDefaultLayoutBorder = -1;
 }
 
@@ -212,7 +212,7 @@ Window* ImplGetDefaultWindow()
 return pSVData->maWinData.mpAppWin;
 
 // First test if we already have a default window.
-// Don't only place a single if..else inside solar mutex lockframe
+// Don't only place a single if...else inside solar mutex lockframe
 // because then we might have to wait for the solar mutex what is not 
necessary
 // if we already have a default window.
 
@@ -346,7 +346,7 @@ com::sun::star::uno::Any 
AccessBridgeCurrentContext::getValueByName( const rtl::
 com::sun::star::uno::Any ret;
 if( Name.equalsAscii( "java-vm.interaction-handler" ) )
 {
-// Currently, for accessbility no interaction handler shall be offered.
+// Currently, for accessibility no interaction handler shall be 
offered.
 // There may be introduced later on a handler using native toolkits
 // jbu->obr: Instantiate here your interaction handler
 }
@@ -448,13 +448,13 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
)
 // if bAllowCancel is sal_True we were called from application startup
 //  where we will disable any Java errorboxes and show our own 
accessibility dialog if Java throws an exception
 // if bAllowCancel is sal_False we were called from Tools->Options
-//  where we will see Java errorboxes, se we do not show our dialogs in 
addition to Java's
+//  where we will see Java errorboxes, so we do not show our dialogs in 
addition to Java's
 
 try
 {
 sal_Bool bSuccess = sal_True;
 
-// No error messages when env var is set ..
+// No error messages when env var is set...
 static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" );
 if( pEnv && *pEnv )
 {
@@ -490,7 +490,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
)
 
 // Disable default java error messages on startup, because 
they were probably unreadable
 // for a disabled user. Use native message boxes which are 
accessible without java support.
-// No need to do this when activated by Tools-Options dialog ..
+// No need to do this when activated by Tools-Options dialog...
 if( bAllowCancel )
 {
 // customize the java-not-available-interaction-handler 
entry within the
@@ -684,7 +684,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
)
 Window* ImplFindWindow( const SalFrame* pFrame, ::Point& rSalFramePos )
 {
 ImplSVData* pSVData = ImplGetSVData();
-Window* pFrameWindow = pSVData->maWinData.mpFirstFrame;
+Window*  pFrameWindow = pSVData->maWinData.mpFirstFrame;
 while ( pFrameWindow )
 {
 if ( pFrameWindow->ImplGetFrame() == pFrame )
@@ -705,4 +705,3 @@ void LocaleConfigurationListener::ConfigurationChanged( 
utl::ConfigurationBroadc
 {
 AllSettings::LocaleSettingsChanged( nHint );
 }
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2019-01-07 Thread Libreoffice Gerrit user
 vcl/source/src/stdtext.src |   36 +++-
 1 file changed, 19 insertions(+), 17 deletions(-)

New commits:
commit a884aab00047174fd62e5dc3b077f239fe96cb4f
Author: Matthias Seidel 
AuthorDate: Mon Jan 7 23:39:45 2019 +
Commit: Matthias Seidel 
CommitDate: Mon Jan 7 23:39:45 2019 +

Cleaned up resource file

diff --git a/vcl/source/src/stdtext.src b/vcl/source/src/stdtext.src
index 11158864f137..1669df256c1d 100644
--- a/vcl/source/src/stdtext.src
+++ b/vcl/source/src/stdtext.src
@@ -27,52 +27,52 @@
 
 String SV_STDTEXT_SERVICENOTAVAILABLE
 {
-Text [ en-US ] = "The component (%s) could not be loaded.\nPlease start 
setup with the repair option.";
+Text [ en-US ] = "The component (%s) could not be loaded.\nPlease start 
setup with the repair option." ;
 };
 
 String SV_STDTEXT_DONTHINTAGAIN
 {
-Text [ en-US ] = "Do not show this information again.";
+Text [ en-US ] = "Do not show this information again." ;
 };
 
 String SV_STDTEXT_DONTASKAGAIN
 {
-Text [ en-US ] = "Do not show this question again.";
+Text [ en-US ] = "Do not show this question again." ;
 };
 
 String SV_STDTEXT_DONTWARNAGAIN
 {
-Text [ en-US ] = "Do not show warning again.";
+Text [ en-US ] = "Do not show this warning again." ;
 };
 
 String SV_ACCESSERROR_WRONG_VERSION
 {
-Text [ en-US ] = "Wrong Version";
+Text [ en-US ] = "Wrong Version" ;
 };
 
 String SV_ACCESSERROR_BRIDGE_MSG
 {
-Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION requires a Java Access 
Bridge 1.0.3 or later version to support accessibility.";
+Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION requires a Java Access 
Bridge 1.0.3 or later version to support accessibility." ;
 };
 
 String SV_ACCESSERROR_OK_CANCEL_MSG
 {
-Text [ en-US ] = "Click '%OK' to start %PRODUCTNAME %PRODUCTVERSION 
without accessibility support, or click '%CANCEL' to exit %PRODUCTNAME 
%PRODUCTVERSION.";
+Text [ en-US ] = "Click '%OK' to start %PRODUCTNAME %PRODUCTVERSION 
without accessibility support, or click '%CANCEL' to exit %PRODUCTNAME 
%PRODUCTVERSION." ;
 };
 
 String SV_ACCESSERROR_MISSING_BRIDGE
 {
-Text [ en-US ] = "No Java Access Bridge";
+Text [ en-US ] = "No Java Access Bridge" ;
 };
 
 String SV_ACCESSERROR_FAULTY_JAVA
 {
-Text [ en-US ] = "Faulty Java Installation";
+Text [ en-US ] = "Faulty Java Installation" ;
 };
 
 String SV_ACCESSERROR_JAVA_MSG
 {
-Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION requires Java 1.4.0_02 or 
later version to support accessibility.";
+Text [ en-US ] = "%PRODUCTNAME %PRODUCTVERSION requires Java 1.4.0_02 or 
later version to support accessibility." ;
 };
 
 String SV_ACCESSERROR_MISSING_JAVA
@@ -97,30 +97,32 @@ String SV_ACCESSERROR_TURNAROUND_MSG
 
 String SV_ACCESSERROR_NO_FONTS
 {
-Text [ en-US ] = "No fonts could be found on the system.";
+Text [ en-US ] = "No fonts could be found on the system." ;
 };
 
 String SV_STDTEXT_ABOUT
 {
-Text [ en-US ] = "About %PRODUCTNAME";
+Text [ en-US ] = "About %PRODUCTNAME" ;
 };
 
 String SV_STDTEXT_PREFERENCES
 {
-Text [ en-US ] = "Preferences...";
+Text [ en-US ] = "Preferences..." ;
 };
 
-WarningBox  SV_EDIT_WARNING_BOX
+WarningBox SV_EDIT_WARNING_BOX
 {
-Message [en-US] = "The inserted text exceeded the maximum length of this 
text field. The text was truncated.";
+Message [en-US] = "The inserted text exceeded the maximum length of this 
text field. The text was truncated." ;
 };
 
 String SV_MAC_SCREENNNAME
 {
-Text [en-US] = "Screen %d";
+Text [en-US] = "Screen %d" ;
 };
 
 String SV_STDTEXT_ALLFILETYPES
 {
-Text [en-US] = "Any type";
+Text [en-US] = "Any type" ;
 };
+
+// ** EOF
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2018-09-13 Thread Libreoffice Gerrit user
 vcl/source/src/throbber.src |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 54d8109b6e7760b715f1edebc535e4fc7efdc0e2
Author: Matthias Seidel 
AuthorDate: Thu Sep 13 21:47:13 2018 +
Commit: Matthias Seidel 
CommitDate: Thu Sep 13 21:47:13 2018 +

Cleaned up resource file for throbber

diff --git a/vcl/source/src/throbber.src b/vcl/source/src/throbber.src
index ad84b91d674c..65e47cff645d 100644
--- a/vcl/source/src/throbber.src
+++ b/vcl/source/src/throbber.src
@@ -349,5 +349,3 @@ Bitmap (THROBBER_64_HC + 12)
 {
 file = "spinner-64-12_h.png";
 };
-
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2018-08-09 Thread Libreoffice Gerrit user
 vcl/source/gdi/sallayout.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 793b66d942edd74e9e0368895575e48527e0793a
Author: Don Lewis 
AuthorDate: Thu Aug 9 23:01:28 2018 +
Commit: Don Lewis 
CommitDate: Thu Aug 9 23:01:28 2018 +

nActiveCharPos can be less than mnMinCharPos if the ScriptItemize() call

in UniscribeLayout::LayoutText() finds a mult-character script item
that starts in the leading context and overlaps into the start of the
run.  UniscribeLayout::LayoutText() drops the glyphs for the context
characters, but does not (yet?) adjust the starting character position
of the item.   Since the text layout direction can't change in the
middle of the offending script item, we can safely use the direction at
the start of the run.

diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 0c59f79c4cc5..50fcf3346735 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1871,7 +1871,15 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs& rArgs 
)
 // get the next codepoint index that needs fallback
 int nActiveCharPos = nCharPos[0];
 // get the end index of the active run
-int nLastRunEndChar = (vRtl[nActiveCharPos - mnMinCharPos])?
+// nActiveCharPos can be less than mnMinCharPos if the ScriptItemize() call
+// in UniscribeLayout::LayoutText() finds a mult-character script item
+// that starts in the leading context and overlaps into the start of the
+// run.  UniscribeLayout::LayoutText() drops the glyphs for the context
+// characters, but does not (yet?) adjust the starting character position
+// of the item.   Since the text layout direction can't change in the
+// middle of the offending script item, we can safely use the direction at
+// the start of the run
+int nLastRunEndChar = (vRtl[nActiveCharPos >= mnMinCharPos ? 
(nActiveCharPos - mnMinCharPos) : 0])?
 rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1;
 int nRunVisibleEndChar = nCharPos[0];
 // merge the fallback levels
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2018-07-11 Thread Matthias Seidel
 vcl/source/gdi/print.cxx |   62 +++
 1 file changed, 31 insertions(+), 31 deletions(-)

New commits:
commit fcd101c81bc4f667349d3b5ba256f7b59c8c8601
Author: Matthias Seidel 
Date:   Wed Jul 11 19:48:07 2018 +

Minor cleanup

diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 2dbfb2a2cdf1..b66cfb81b01c 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -132,16 +132,16 @@ PrinterOptions::~PrinterOptions()
 {
 }
 
-#define PROPERTYNAME_REDUCETRANSPARENCY 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceTransparency"))
-#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedTransparencyMode"))
-#define PROPERTYNAME_REDUCEGRADIENTS
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceGradients"))
-#define PROPERTYNAME_REDUCEDGRADIENTMODE
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientMode"))
-#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT   
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientStepCount"))
-#define PROPERTYNAME_REDUCEBITMAPS  
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceBitmaps"))
-#define PROPERTYNAME_REDUCEDBITMAPMODE  
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapMode"))
-#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapResolution"))
+#define PROPERTYNAME_REDUCETRANSPARENCY 
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceTransparency"))
+#define PROPERTYNAME_REDUCEDTRANSPARENCYMODE
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedTransparencyMode"))
+#define PROPERTYNAME_REDUCEGRADIENTS
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceGradients"))
+#define PROPERTYNAME_REDUCEDGRADIENTMODE
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientMode"))
+#define PROPERTYNAME_REDUCEDGRADIENTSTEPCOUNT   
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedGradientStepCount"))
+#define PROPERTYNAME_REDUCEBITMAPS  
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReduceBitmaps"))
+#define PROPERTYNAME_REDUCEDBITMAPMODE  
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapMode"))
+#define PROPERTYNAME_REDUCEDBITMAPRESOLUTION
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapResolution"))
 #define PROPERTYNAME_REDUCEDBITMAPINCLUDESTRANSPARENCY  
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReducedBitmapIncludesTransparency"))
-#define PROPERTYNAME_CONVERTTOGREYSCALES
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales"))
+#define PROPERTYNAME_CONVERTTOGREYSCALES
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ConvertToGreyscales"))
 
 bool PrinterOptions::ReadFromConfig( bool i_bFile )
 {
@@ -264,7 +264,7 @@ QueueInfo::~QueueInfo()
 bool QueueInfo::operator==( const QueueInfo& rInfo ) const
 {
 return
-maPrinterName   == rInfo.maPrinterName  &&
+maPrinterName   == rInfo.maPrinterName  &&
 maDriver== rInfo.maDriver   &&
 maLocation  == rInfo.maLocation &&
 maComment   == rInfo.maComment  &&
@@ -426,7 +426,7 @@ const QueueInfo* Printer::GetQueueInfo( const String& 
rPrinterName, bool bStatus
 pInfo->mpQueueInfo->maLocation  = 
pInfo->mpSalQueueInfo->maLocation;
 pInfo->mpQueueInfo->maComment   = pInfo->mpSalQueueInfo->maComment;
 pInfo->mpQueueInfo->mnStatus= pInfo->mpSalQueueInfo->mnStatus;
-pInfo->mpQueueInfo->mnJobs  = pInfo->mpSalQueueInfo->mnJobs;
+pInfo->mpQueueInfo->mnJobs  = pInfo->mpSalQueueInfo->mnJobs;
 return pInfo->mpQueueInfo;
 }
 return NULL;
@@ -450,22 +450,22 @@ XubString Printer::GetDefaultPrinterName()
 
 void Printer::ImplInitData()
 {
-mbDevOutput = sal_False;
+mbDevOutput = sal_False;
 meOutDevType= OUTDEV_PRINTER;
 mbDefPrinter= sal_False;
-mnError = 0;
-mnCurPage   = 0;
+mnError = 0;
+mnCurPage   = 0;
 mnCurPrintPage  = 0;
 mnPageQueueSize = 0;
-mnCopyCount = 1;
+mnCopyCount = 1;
 mbCollateCopy   = sal_False;
-mbPrinting  = sal_False;
-mbJobActive = sal_False;
-mbPrintFile = sal_False;
+mbPrinting  = sal_False;
+mbJobActive = sal_False;
+mbPrintFile = sal_False;
 mbInPrintPage   = sal_False;
 mbNewJobSetup   = sal_False;
 mpInfoPrinter   = NULL;
-mpPrinter   = NULL;
+mpPrinter   = NULL;
 mpDisplayDev= NULL;
 mbIsQueuePrinter= sal_False;
 mpPrinterOptions= new PrinterOptions;
@@ -489,7 +489,7 @@ void Printer::ImplInit( SalPrinterQueueInfo* pInfo )
 // #i74084# update info for this specific SalPrinterQueueInfo
 

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2018-07-10 Thread Matthias Seidel
 vcl/source/src/print.src |1 -
 1 file changed, 1 deletion(-)

New commits:
commit f6ed06e8bd5c5263d0c8e190b9a096e77deab72f
Author: Matthias Seidel 
Date:   Tue Jul 10 14:41:13 2018 +

Cleaned up print dialog

diff --git a/vcl/source/src/print.src b/vcl/source/src/print.src
index f457898ff828..44b344c716e3 100644
--- a/vcl/source/src/print.src
+++ b/vcl/source/src/print.src
@@ -539,4 +539,3 @@ StringArray RID_STR_PAPERNAMES
 < "B6 (JIS)"; >;
 };
 };
-
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2018-06-02 Thread Matthias Seidel
 vcl/source/app/settings.cxx|2 +-
 vcl/source/window/toolbox2.cxx |4 ++--
 vcl/source/window/window.cxx   |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 48f33ea9fa4084841e0ac6197f18b2be9dc0c05c
Author: Matthias Seidel 
Date:   Sat Jun 2 11:22:39 2018 +

Fixed typos:

sensisitive -> sensitive

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 7e0d7a461fb9..e394e7e6e8ac 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -1898,7 +1898,7 @@ sal_Bool AllSettings::GetLayoutRTL() const
 nUIMirroring = 0; // ask configuration only once
 utl::OConfigurationNode aNode = 
utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
 vcl::unohelper::GetMultiServiceFactory(),
-OUString::createFromAscii( "org.openoffice.Office.Common/I18N/CTL" 
) );// note: case sensisitive !
+OUString::createFromAscii( "org.openoffice.Office.Common/I18N/CTL" 
) );// note: case sensitive !
 if ( aNode.isValid() )
 {
 sal_Bool bTmp = sal_Bool();
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 424b8d047a6b..72821d3ad0f9 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -2367,7 +2367,7 @@ sal_Bool ToolBox::AlwaysLocked()
 
 utl::OConfigurationNode aNode = 
utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
 vcl::unohelper::GetMultiServiceFactory(),
-OUString::createFromAscii( 
"/org.openoffice.Office.UI.GlobalSettings/Toolbars" ) );// note: case 
sensisitive !
+OUString::createFromAscii( 
"/org.openoffice.Office.UI.GlobalSettings/Toolbars" ) );// note: case 
sensitive !
 if ( aNode.isValid() )
 {
 // feature enabled ?
@@ -2380,7 +2380,7 @@ sal_Bool ToolBox::AlwaysLocked()
 // now read the locking state
 utl::OConfigurationNode aNode2 = 
utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
 vcl::unohelper::GetMultiServiceFactory(),
-OUString::createFromAscii( 
"/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ) );// note: 
case sensisitive !
+OUString::createFromAscii( 
"/org.openoffice.Office.UI.GlobalSettings/Toolbars/States" ) );// note: 
case sensitive !
 
 sal_Bool bLocked = sal_Bool();
 ::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( 
OUString::createFromAscii( "Locked" ) );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 7269794766d8..9ca096e8f6fb 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -630,7 +630,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& 
rSettings, sal_Bool bCallHdl
 sal_Bool bTmp = sal_False, bAutoHCMode = sal_True;
 utl::OConfigurationNode aNode = 
utl::OConfigurationTreeRoot::tryCreateWithServiceFactory(
 vcl::unohelper::GetMultiServiceFactory(),
-OUString::createFromAscii( 
"org.openoffice.Office.Common/Accessibility" ) );// note: case sensisitive !
+OUString::createFromAscii( 
"org.openoffice.Office.Common/Accessibility" ) );// note: case sensitive !
 if ( aNode.isValid() )
 {
 ::com::sun::star::uno::Any aValue = aNode.getNodeValue( 
OUString::createFromAscii( "AutoDetectSystemHC" ) );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2017-11-25 Thread Damjan Jovanovic
 vcl/source/gdi/pngread.cxx |   18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 9819064de0ac29755bbf244fb3115d5b539df85f
Author: Damjan Jovanovic 
Date:   Sat Nov 25 13:21:24 2017 +

Add range checking to PNG palette indexes,

as per OSS-Fuzz issue 574.

Patch by: me

diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index b35db105cfca..e2ec7daa1bb5 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 
 // ---
 // - Defines -
@@ -296,7 +297,7 @@ bool PNGReaderImpl::ReadNextChunk()
 if( mnChunkLen < 0 )
 return false;
 const sal_Size nStreamPos = mrPNGStream.Tell();
-if( nStreamPos + mnChunkLen >= mnStreamSize )
+if( nStreamPos + mnChunkLen + 4 >= mnStreamSize )
 return false;
 
 // calculate chunktype CRC (swap it back to original byte order)
@@ -434,7 +435,16 @@ BitmapEx PNGReaderImpl::GetBitmapEx( const Size& 
rPreviewSizeHint )
 if ( !mpInflateInBuf )  // taking care that the header has 
properly been read
 mbStatus = sal_False;
 else if ( !mbIDAT ) // the gfx is finished, but there may 
be left a zlibCRC of about 4Bytes
-ImplReadIDAT();
+{
+try
+{
+ImplReadIDAT();
+}
+catch (::com::sun::star::lang::IndexOutOfBoundsException&)
+{
+mbStatus = sal_False;
+}
+}
 }
 break;
 
@@ -1644,6 +1654,8 @@ void PNGReaderImpl::ImplSetPixel( sal_uInt32 nY, 
sal_uInt32 nX, sal_uInt8 nPalIn
 return;
 nX >>= mnPreviewShift;
 
+if (nPalIndex >= mpAcc->GetPaletteEntryCount())
+throw ::com::sun::star::lang::IndexOutOfBoundsException();
 mpAcc->SetPixelIndex( nY, nX, nPalIndex );
 }
 
@@ -1674,6 +1686,8 @@ void PNGReaderImpl::ImplSetAlphaPixel( sal_uInt32 nY, 
sal_uInt32 nX,
 return;
 nX >>= mnPreviewShift;
 
+if (nPalIndex >= mpAcc->GetPaletteEntryCount())
+throw ::com::sun::star::lang::IndexOutOfBoundsException();
 mpAcc->SetPixelIndex( nY, nX, nPalIndex );
 mpMaskAcc->SetPixelIndex( nY, nX, ~nAlpha );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2016-10-15 Thread Pedro Giffuni
 vcl/source/fontsubset/cff.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 883a3068fcef1d740972095b8a005c49d39f615a
Author: Pedro Giffuni 
Date:   Sat Oct 15 22:04:47 2016 +

CFF: raise FDArray count limit to 256.

Per spec, the maximum for FDArray elements is 256, something that is not
common but some people like to test the limits [1].

Thanks to Audrey Tang for posting a patch under CC0 Universal declaration
which I found by accident.

[1] http://blogs.adobe.com/CCJKType/2012/05/all-unicode-cfr.html

diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 7670314..0ff9afe 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -417,7 +417,7 @@ private:
 const char**mpCharStringOps;
 const char**mpCharStringEscs;
 
-CffLocalmaCffLocal[16];
+CffLocalmaCffLocal[256];
 CffLocal*   mpCffLocal;
 
 voidreadDictOp( void);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2016-10-15 Thread Pedro Giffuni
 vcl/source/fontsubset/sft.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6367b8ddda53ec44f2bbeb4cb75efa9fb95350ac
Author: Pedro Giffuni 
Date:   Sat Oct 15 15:42:54 2016 +

Adapt TrueType font detection for the Apple specification variant.

From the Microsoft OpenType Specification:
https://www.microsoft.com/typography/otspec/otff.htm

NOTE: The Apple specification for TrueType fonts allows for 'true' and
'typ1' for sfnt version. These version tags should not be used for fonts
which contain OpenType tables.


We are complying with the OpenType usage fine but we were not taking into
account the NOTE so Apple TrueType variants would not be recognized.

Apparently valid values are 0x0001 and 0x0002. Keep it simple and
just assume any value different than zero is valid here.

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index eec3875..141bd1e 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1738,7 +1738,7 @@ static int doOpenTTFont( sal_uInt32 facenum, 
TrueTypeFont* t )
 } else if (version == T_otto) { /* PS-OpenType 
font */
 tdoffset = 0;
 } else if (version == T_ttcf) { /* TrueType 
collection */
-if (GetUInt32(t->ptr, 4, 1) != 0x0001) {
+if (GetUInt32(t->ptr, 4, 1) == 0x) {
 CloseTTFont(t);
 return SF_TTFORMAT;
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2016-06-16 Thread Don Lewis
 vcl/source/glyphs/graphite_layout.cxx |   22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 633d5013b37fd89f5e91bad10b82accc9dfd4775
Author: Don Lewis 
Date:   Thu Jun 16 08:00:20 2016 +

#i126999#: fix vcl/source/glyphs/graphite_layout.cxx compile with libc++ 
3.8.0

Rename local inline function round() to round2long() to avoid ambiguity
with libc++ round() function and better describe its functionality.  This
fixes a compile error when building with libc++ version 3.8.0, which
was first observed with FreeBSD 11.0.

diff --git a/vcl/source/glyphs/graphite_layout.cxx 
b/vcl/source/glyphs/graphite_layout.cxx
index 7ecd164..002dad8 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -107,7 +107,7 @@ namespace
 typedef ext_std::pair   
glyph_range_t;
 typedef ext_std::pair 
glyph_set_range_t;
 
-inline long round(const float n) {
+inline long round2long(const float n) {
 return long(n + (n < 0 ? -0.5 : 0.5));
 }
 
@@ -294,8 +294,8 @@ GraphiteLayout::Glyphs::fill_from(gr::Segment & rSegment, 
ImplLayoutArgs ,
 fMinX = std::min(aBounds.first, fMinX);
 fMaxX = std::max(aBounds.second, fMaxX);
 }
-long nXOffset = round(fMinX * fScaling);
-rWidth = round(fMaxX * fScaling) - nXOffset + nDxOffset;
+long nXOffset = round2long(fMinX * fScaling);
+rWidth = round2long(fMaxX * fScaling) - nXOffset + nDxOffset;
 if (rWidth < 0)
 {
 // This can happen when there was no base inside the range
@@ -406,7 +406,7 @@ std::pair 
GraphiteLayout::Glyphs::appendCluster(gr::Segment& rSeg,
 if (j + nDelta >= nGlyphs || j + nDelta < 0) // at rhs ltr,rtl
 {
 fNextOrigin = fSegmentAdvance;
-nNextOrigin = round(fSegmentAdvance * fScaling + rDXOffset);
+nNextOrigin = round2long(fSegmentAdvance * fScaling + rDXOffset);
 aBounds.second = std::max(fSegmentAdvance, aBounds.second);
 }
 else
@@ -414,7 +414,7 @@ std::pair 
GraphiteLayout::Glyphs::appendCluster(gr::Segment& rSeg,
 gr::GlyphInfo aNextGlyph = *(iGlyphs.first + j + nDelta);
 fNextOrigin = std::max(aNextGlyph.attachedClusterBase()->origin(), 
aNextGlyph.origin());
 aBounds.second = std::max(fNextOrigin, aBounds.second);
-nNextOrigin = round(fNextOrigin * fScaling + rDXOffset);
+nNextOrigin = round2long(fNextOrigin * fScaling + rDXOffset);
 }
 aBounds.first = std::min(aGlyph.origin(), aBounds.first);
 if ((signed)aGlyph.firstChar() < rArgs.mnEndCharPos &&
@@ -432,8 +432,8 @@ std::pair 
GraphiteLayout::Glyphs::appendCluster(gr::Segment& rSeg,
 // the origin of the first glyph of the next cluster ltr
 // rtl it is the origin of the 1st glyph of the cluster
 long nXPos = (bRtl)?
-round(aFirstGlyph.attachedClusterBase()->origin() * fScaling) + 
rDXOffset :
-round(aBounds.second * fScaling) + rDXOffset;
+round2long(aFirstGlyph.attachedClusterBase()->origin() * fScaling) + 
rDXOffset :
+round2long(aBounds.second * fScaling) + rDXOffset;
 // force the last char in range to have the width of the cluster
 if (bRtl)
 {
@@ -474,7 +474,7 @@ GraphiteLayout::Glyphs::append(gr::Segment , 
ImplLayoutArgs , gr::G
 }
 long glyphId = gi.glyphID();
 long deltaOffset = 0;
-int glyphWidth = round(nextOrigin * scaling) - round(gi.origin() * 
scaling);
+int glyphWidth = round2long(nextOrigin * scaling) - round2long(gi.origin() 
* scaling);
 #ifdef GRLAYOUT_DEBUG
 fprintf(grLog(),"c%d g%d gWidth%d x%f ", firstChar, 
(int)gi.logicalIndex(), glyphWidth, nextOrigin);
 #endif
@@ -513,11 +513,11 @@ GraphiteLayout::Glyphs::append(gr::Segment , 
ImplLayoutArgs , gr::G
 nGlyphFlags |= (gi.directionLevel() & 0x1)? GlyphItem::IS_RTL_GLYPH : 0;
 GlyphItem aGlyphItem(size(),//gi.logicalIndex(),
 glyphId,
-Point(round(gi.origin() * scaling + rDXOffset),
-round((-gi.yOffset() * scaling) - segment.AscentOffset()* 
scaling)),
+Point(round2long(gi.origin() * scaling + rDXOffset),
+round2long((-gi.yOffset() * scaling) - segment.AscentOffset()* 
scaling)),
 nGlyphFlags,
 glyphWidth);
-aGlyphItem.mnOrigWidth = round(gi.advanceWidth() * scaling);
+aGlyphItem.mnOrigWidth = round2long(gi.advanceWidth() * scaling);
 push_back(aGlyphItem);
 
 // update the offset if this glyph was dropped
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source

2015-12-25 Thread Tsutomu Uchino
 vcl/source/glyphs/gcach_ftyp.cxx |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9396ecb77711fb7da043f9865f9803a12d830daa
Author: Tsutomu Uchino 
Date:   Fri Dec 25 13:29:02 2015 +

#i126753# fix invalid parse of GSUB table for OpenType fonts

diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx
index 8219bc9..59447ba 100644
--- a/vcl/source/glyphs/gcach_ftyp.cxx
+++ b/vcl/source/glyphs/gcach_ftyp.cxx
@@ -721,8 +721,8 @@ FreetypeServerFont::FreetypeServerFont( const 
ImplFontSelectData& rFSD, FtFontIn
 maFaceFT = pFI->GetFaceFT();
 
 #ifdef HDU_DEBUG
-fprintf( stderr, "FTSF::FTSF(\"%s\", h=%d, w=%d, sy=%d) => %d\n",
-pFI->GetFontFileName()->getStr(), rFSD.mnHeight, rFSD.mnWidth, 
pFI->IsSymbolFont(), maFaceFT!=0 );
+fprintf( stderr, "FTSF::FTSF(\"%s\", h=%d, w=%d, vt=%d, sy=%d) => %d\n",
+pFI->GetFontFileName()->getStr(), rFSD.mnHeight, rFSD.mnWidth, 
rFSD.mbVertical, pFI->IsSymbolFont(), maFaceFT!=0 );
 #endif
 
 if( !maFaceFT )
@@ -2469,6 +2469,7 @@ bool FreetypeServerFont::ApplyGSUB( const 
ImplFontSelectData& rFSD )
 }
 
 const FT_Byte* pFeatureTable = pGsubBase + nOfsFeatureTable + nOffset;
+pFeatureTable += 2; // ignore FeatureParams
 const sal_uInt16 nCntLookups = GetUShort( pFeatureTable+0 );
 pFeatureTable += 2;
 for( sal_uInt16 i = 0; i < nCntLookups; ++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' - vcl/source

2015-12-01 Thread Pedro Giffuni
 vcl/source/gdi/pdfwriter_impl.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 811c746985a72339ad8a1b78dae45738a030ecb9
Author: Pedro Giffuni 
Date:   Tue Dec 1 22:53:35 2015 +

Prevent division by zero

CID:735658, 735659

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx 
b/vcl/source/gdi/pdfwriter_impl.cxx
index a0b135a..bee62eb 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -8929,9 +8929,9 @@ static double calcAngle( const Rectangle& rRect, const 
Point& rPoint )
 double fX = (double)aPoint.X();
 double fY = (double)-aPoint.Y();
 
-if( rRect.GetWidth() > rRect.GetHeight() )
+if((rRect.GetWidth() > rRect.GetHeight()) && (rRect.GetHeight() != 0 ))
 fY = fY*((double)rRect.GetWidth()/(double)rRect.GetHeight());
-else if( rRect.GetHeight() > rRect.GetWidth() )
+else if((rRect.GetHeight() > rRect.GetWidth()) && (rRect.GetWidth() != 0))
 fX = fX*((double)rRect.GetHeight()/(double)rRect.GetWidth());
 return atan2( fY, fX );
 }
___
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

2015-11-29 Thread Pedro Giffuni
 vcl/source/fontsubset/ttcr.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 447564d554092424ea839aad8870aeab65c9a05e
Author: Pedro Giffuni 
Date:   Mon Nov 30 05:50:16 2015 +

Fix mismatch in r1717119

diff --git a/vcl/source/fontsubset/ttcr.cxx b/vcl/source/fontsubset/ttcr.cxx
index 0d22a2e..2c4b564 100644
--- a/vcl/source/fontsubset/ttcr.cxx
+++ b/vcl/source/fontsubset/ttcr.cxx
@@ -394,7 +394,7 @@ int StreamToFile(TrueTypeCreator *_this, const char* fname)
 FILE* fd;
 
 if ((r = StreamToMemory(_this, , )) != SF_OK) return r;
-if ((!fname) || (fd = fopen(fname, "wb")) == NULL)) {
+if ((!fname) || ((fd = fopen(fname, "wb")) == NULL)) {
 free(ptr);
 return SF_BADFILE;
 }
___
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

2014-10-15 Thread Herbert Dürr
 vcl/source/gdi/pdfwriter_impl.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b8186703cb43d2b57460cb23a7a4e3f989e95426
Author: Herbert Dürr h...@apache.org
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
 /Type/Font/Subtype/Type1/BaseFont/ );
 appendName( aInfo.m_aPSName, aLine );
 aLine.append( \n );
-if( !pFont-mbSymbolFlag   pEncoding == 0 )
+if( !pFont-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/unx

2014-06-20 Thread Jürgen Schmidt
 vcl/source/control/scrbar.cxx|   52 +++
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |5 ++
 2 files changed, 44 insertions(+), 13 deletions(-)

New commits:
commit a734be318f82ae1da793702cb8aee50864023b73
Author: Jürgen Schmidt j...@apache.org
Date:   Fri Jun 20 12:05:03 2014 +

#121627# merge fix from aoo410 branch that fixes the geometry calculations 
for scroll bars

diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 4f75b66..d2b7659 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -354,18 +354,33 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate )
 }
 else
 {
-Size aBtnSize( aSize.Height(), aSize.Height() );
-maBtn2Rect.Top()= maBtn1Rect.Top();
-maBtn2Rect.Left()   = aSize.Width()-aSize.Height();
-maBtn1Rect.SetSize( aBtnSize );
-maBtn2Rect.SetSize( aBtnSize );
+if (aBtn1Region.IsEmpty()  aBtn2Region.IsEmpty())
+{
+Size aBtnSize( aSize.Height(), aSize.Height() );
+maBtn2Rect.Top() = maBtn1Rect.Top();
+maBtn2Rect.Left() = aSize.Width()-aSize.Height();
+maBtn1Rect.SetSize( aBtnSize );
+maBtn2Rect.SetSize( aBtnSize );
+}
+else
+{
+maBtn1Rect.SetEmpty();
+maBtn2Rect.SetEmpty();
+}
 }
 
 if ( GetNativeControlRegion( CTRL_SCROLLBAR, PART_TRACK_HORZ_AREA,
  aControlRegion, 0, ImplControlValue(), rtl::OUString(), 
aBoundingRegion, aTrackRegion ) )
+{
 maTrackRect = aTrackRegion;
+}
 else
-maTrackRect = Rectangle( maBtn1Rect.TopRight(), 
maBtn2Rect.BottomLeft() );
+{
+if ( ! maBtn1Rect.IsEmpty())
+maTrackRect = Rectangle( maBtn1Rect.TopRight(), 
maBtn2Rect.BottomLeft() );
+else
+maTrackRect = aControlRegion;
+}
 
 // Check if available space is big enough for thumb ( min thumb 
size = ScrBar width/height )
 mnThumbPixRange = maTrackRect.Right() - maTrackRect.Left();
@@ -395,18 +410,31 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate )
 }
 else
 {
-const Size aBtnSize( aSize.Width(), aSize.Width() );
-maBtn2Rect.Left()   = maBtn1Rect.Left();
-maBtn2Rect.Top()= aSize.Height()-aSize.Width();
-maBtn1Rect.SetSize( aBtnSize );
-maBtn2Rect.SetSize( aBtnSize );
+if (aBtn1Region.IsEmpty()  aBtn2Region.IsEmpty())
+{
+const Size aBtnSize( aSize.Width(), aSize.Width() );
+maBtn2Rect.Left()   = maBtn1Rect.Left();
+maBtn2Rect.Top()= aSize.Height()-aSize.Width();
+maBtn1Rect.SetSize( aBtnSize );
+maBtn2Rect.SetSize( aBtnSize );
+}
+else
+{
+maBtn1Rect.SetEmpty();
+maBtn2Rect.SetEmpty();
+}
 }
 
 if ( GetNativeControlRegion( CTRL_SCROLLBAR, PART_TRACK_VERT_AREA,
  aControlRegion, 0, ImplControlValue(), rtl::OUString(), 
aBoundingRegion, aTrackRegion ) )
 maTrackRect = aTrackRegion;
 else
-maTrackRect = Rectangle( maBtn1Rect.BottomLeft()+Point(0,1), 
maBtn2Rect.TopRight() );
+{
+if ( ! maBtn1Rect.IsEmpty())
+maTrackRect = Rectangle( 
maBtn1Rect.BottomLeft()+Point(0,1), maBtn2Rect.TopRight() );
+else
+maTrackRect = aControlRegion;
+}
 
 // Check if available space is big enough for thumb
 mnThumbPixRange = maTrackRect.Bottom() - maTrackRect.Top();
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index bf5065b..47b8bcd 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -982,7 +982,10 @@ sal_Bool GtkSalGraphics::getNativeControlRegion(  
ControlType nType,
 rNativeBoundingRegion = NWGetScrollButtonRect( m_nScreen, nPart, 
rControlRegion );
 rNativeContentRegion = rNativeBoundingRegion;
 
-returnVal = sal_True;
+if (rNativeBoundingRegion.GetWidth()0  
rNativeBoundingRegion.GetHeight()0)
+returnVal = sal_True;
+else
+returnVal = sal_False;
 }
 if( (nType == CTRL_MENUBAR)  (nPart == PART_ENTIRE_CONTROL) )
 {
___
Libreoffice-commits mailing list

[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/source vcl/win

2014-04-02 Thread Steve Yin
 vcl/source/app/svapp.cxx   |5 +++--
 vcl/source/app/svdata.cxx  |   22 +++---
 vcl/win/source/window/salframe.cxx |2 +-
 3 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit d9f425e86d95d6fc9fbf17f85c445875b5855b57
Author: Steve Yin stev...@apache.org
Date:   Wed Apr 2 06:08:41 2014 +

Issue 124573 - Office does not start when accessibility is activated.

Fixed access bridge initialization issue in vcl.

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index e8eb02f..978fec7 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -2058,12 +2058,13 @@ sal_Bool Application::IsAccessibilityEnabled()
 
 sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool rCancelled )
 {
-sal_Bool bRet = true;
+sal_Bool bRet = sal_True;
+
+rCancelled = sal_False;
 
 // Disable Java bridge on UNIX and OS/2
 #ifndef WNT
 (void) bShowCancel; // unsued
-(void) rCancelled; // unused
 #else
 // Checking HasAtHook() was introduced with IBM's IA2 CWS.
 if( HasAtHook() )
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 7325c09..9d77057 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -442,7 +442,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 {
 rCancelled = sal_False;
 
-bool bErrorMessage = true;
+sal_Bool bErrorMessage = sal_True;
 
 // Note:
 // if bAllowCancel is sal_True we were called from application startup
@@ -452,13 +452,13 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 
 try
 {
-bool bSuccess = true;
+sal_Bool bSuccess = sal_True;
 
 // No error messages when env var is set ..
 static const char* pEnv = getenv(SAL_ACCESSIBILITY_ENABLED );
 if( pEnv  *pEnv )
 {
-bErrorMessage = false;
+bErrorMessage = sal_False;
 }
 
 ImplSVData* pSVData = ImplGetSVData();
@@ -479,7 +479,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 }
 
 if( !pSVData-mxAccessBridge.is() )
-bSuccess = false;
+bSuccess = sal_False;
 return bSuccess;
 #endif
 css::uno::Reference XExtendedToolkit  xToolkit =
@@ -512,7 +512,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 }
 
 if( !pSVData-mxAccessBridge.is() )
-bSuccess = false;
+bSuccess = sal_False;
 }
 }
 
@@ -541,7 +541,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 rCancelled = sal_True;
 }
 
-return false;
+return sal_False;
 }
 
 catch(::com::sun::star::java::JavaVMCreationFailureException)
@@ -566,7 +566,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 rCancelled = sal_True;
 }
 
-return false;
+return sal_False;
 }
 
 catch(::com::sun::star::java::MissingJavaRuntimeException)
@@ -591,7 +591,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 rCancelled = sal_True;
 }
 
-return false;
+return sal_False;
 }
 
 catch(::com::sun::star::java::JavaDisabledException)
@@ -616,7 +616,7 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 rCancelled = sal_True;
 }
 
-return false;
+return sal_False;
 }
 
 
@@ -670,12 +670,12 @@ bool ImplInitAccessBridge(sal_Bool bAllowCancel, sal_Bool 
rCancelled)
 }
 }
 
-return false;
+return sal_False;
 }
 
 catch (...)
 {
-return false;
+return sal_False;
 }
 }
 
diff --git a/vcl/win/source/window/salframe.cxx 
b/vcl/win/source/window/salframe.cxx
index 86ef843..835ea98 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -6211,7 +6211,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, 
WPARAM wParam, LPARAM lP
 // Make sure to launch Accessibiliity only the 
following criterias are satisfied to avoid RFT interrupts regular acc processing
 if (g_acc_manager1 == NULL)
 {
-sal_Bool bCancelled;
+sal_Bool bCancelled(sal_False);
 InitAccessBridge(sal_False,bCancelled);
 if( bCancelled )
 break;
___
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

2014-04-02 Thread Armin Le Grand
 vcl/source/gdi/outdev2.cxx |   15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit d3c4a0c2a87504007a30e6944f52da4654cfa784
Author: Armin Le Grand a...@apache.org
Date:   Wed Apr 2 11:21:46 2014 +

i124580 corrected some conversions of scale values to integer positions

diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx
index bc892a6..975ff2a6 100644
--- a/vcl/source/gdi/outdev2.cxx
+++ b/vcl/source/gdi/outdev2.cxx
@@ -825,8 +825,11 @@ void OutputDevice::DrawTransformedBitmapEx(
 {
 // with no rotation, shear or mirroring it can be mapped to 
DrawBitmapEx
 // do *not* execute the mirroring here, it's done in the fallback
+// #124580# the correct DestSize needs to be calculated based on MaxXY 
values
 const Point aDestPt(basegfx::fround(aTranslate.getX()), 
basegfx::fround(aTranslate.getY()));
-const Size aDestSize(basegfx::fround(aScale.getX()), 
basegfx::fround(aScale.getY()));
+const Size aDestSize(
+basegfx::fround(aScale.getX() + aTranslate.getX()) - aDestPt.X(),
+basegfx::fround(aScale.getY() + aTranslate.getY()) - aDestPt.Y());
 
 DrawBitmapEx(aDestPt, aDestSize, rBitmapEx);
 return;
@@ -879,8 +882,11 @@ void OutputDevice::DrawTransformedBitmapEx(
 {
 // with no rotation or shear it can be mapped to DrawBitmapEx
 // do *not* execute the mirroring here, it's done in the fallback
+// #124580# the correct DestSize needs to be calculated based on 
MaxXY values
 const Point aDestPt(basegfx::fround(aTranslate.getX()), 
basegfx::fround(aTranslate.getY()));
-const Size aDestSize(basegfx::fround(aScale.getX()), 
basegfx::fround(aScale.getY()));
+const Size aDestSize(
+basegfx::fround(aScale.getX() + aTranslate.getX()) - 
aDestPt.X(),
+basegfx::fround(aScale.getY() + aTranslate.getY()) - 
aDestPt.Y());
 
 DrawBitmapEx(aDestPt, aDestSize, rBitmapEx);
 return;
@@ -1016,8 +1022,11 @@ void OutputDevice::DrawTransformedBitmapEx(
 aTargetRange.getMinimum()));
 
 // extract point and size; do not remove size, the bitmap may have 
been prepared reduced by purpose
+// #124580# the correct DestSize needs to be calculated based on 
MaxXY values
 const Point aDestPt(basegfx::fround(aVisibleRange.getMinX()), 
basegfx::fround(aVisibleRange.getMinY()));
-const Size aDestSize(basegfx::fround(aVisibleRange.getWidth()), 
basegfx::fround(aVisibleRange.getHeight()));
+const Size aDestSize(
+basegfx::fround(aVisibleRange.getMaxX()) - aDestPt.X(),
+basegfx::fround(aVisibleRange.getMaxY()) - aDestPt.Y());
 
 DrawBitmapEx(aDestPt, aDestSize, aTransformed);
 }
___
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

2014-03-31 Thread Oliver-Rainer Wittmann
 vcl/source/gdi/dibtools.cxx |   13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 61efddf5ab8cd318e022ca1ac817ba0879a55e23
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Mon Mar 31 14:37:21 2014 +

124555: restore stream position after Seek to end of stream

diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 3aa5df4..d4ea127 100755
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -775,17 +775,18 @@ bool ImplReadDIBBody( SvStream rIStm, Bitmap rBmp, 
Bitmap* pBmpAlpha, sal_uLon
 
 bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong rOffset )
 {
-sal_uInt32  nTmp32;
-sal_uInt16  nTmp16 = 0;
-boolbRet = false;
+bool bRet = false;
 
-const sal_Int64 nStreamLength (rIStm.Seek(STREAM_SEEK_TO_END));
-rIStm.Seek(STREAM_SEEK_TO_BEGIN);
+const sal_Int64 nSavedStreamPos( rIStm.Tell() );
+const sal_Int64 nStreamLength( rIStm.Seek( STREAM_SEEK_TO_END ) );
+rIStm.Seek( nSavedStreamPos );
 
+sal_uInt16 nTmp16 = 0;
 rIStm  nTmp16;
 
 if ( ( 0x4D42 == nTmp16 ) || ( 0x4142 == nTmp16 ) )
 {
+sal_uInt32 nTmp32;
 if ( 0x4142 == nTmp16 )
 {
 rIStm.SeekRel( 12L );
@@ -803,7 +804,7 @@ bool ImplReadDIBFileHeader( SvStream rIStm, sal_uLong 
rOffset )
 bRet = ( rIStm.GetError() == 0UL );
 }
 
-if (rOffset = nStreamLength)
+if ( rOffset = nStreamLength )
 {
 // Offset claims that image starts past the end of the
 // stream.  Unlikely.
___
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

2014-03-11 Thread Herbert Dürr
 vcl/source/glyphs/graphite_adaptors.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit fbf086027e3595a2803a1489db80fb81c0b8f15a
Author: Herbert Dürr h...@apache.org
Date:   Tue Mar 11 07:49:24 2014 +

#i124394# fix inclusion of freetype's ftsynth.h header

the location of this header file changed with freetype 2.51 so we had to 
adapt.
On the other hand the header is not actually needed because we load the 
symbols
for synthetization of outlines dynamically to be compatible with freetype 
libs
that don't support them. So we can remove the header inclusion.

Found-by: Ariel Costenla-Haile ar...@apache.org
Patch-by: Herbert Duerr h...@apache.org

diff --git a/vcl/source/glyphs/graphite_adaptors.cxx 
b/vcl/source/glyphs/graphite_adaptors.cxx
index 279d8fb..dcdac7b 100644
--- a/vcl/source/glyphs/graphite_adaptors.cxx
+++ b/vcl/source/glyphs/graphite_adaptors.cxx
@@ -42,14 +42,10 @@
 // Platform
 #ifndef WNT
 #include unx/saldisp.hxx
-
 #include salgdi.hxx
 
-#include freetype2/ftsynth.h
-
 // Module
 #include gcach_ftyp.hxx
-
 #include graphite_features.hxx
 #include graphite_adaptors.hxx
 
___
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

2014-02-15 Thread Yuri Dario
 vcl/source/app/svapp.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9c8dbca600bcb32f2d9888e1a15f7d415ac5526d
Author: Yuri Dario yda...@apache.org
Date:   Sat Feb 15 12:26:49 2014 +

#i107914# also OS/2 is a non-Windows platform, fix build break.

diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 3d4f1bf..e8eb02f 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -2060,8 +2060,8 @@ sal_Bool InitAccessBridge( sal_Bool bShowCancel, sal_Bool 
rCancelled )
 {
 sal_Bool bRet = true;
 
-// Disable Java bridge on UNIX
-#if defined UNX
+// Disable Java bridge on UNIX and OS/2
+#ifndef WNT
 (void) bShowCancel; // unsued
 (void) rCancelled; // unused
 #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/source

2014-01-22 Thread Armin Le Grand
 vcl/source/gdi/impgraph.cxx |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

New commits:
commit b5797deea72476fbcec4315f1f18249fd39bbaea
Author: Armin Le Grand a...@apache.org
Date:   Wed Jan 22 20:25:16 2014 +

i123983 Corrected Graphic Metafile fallback creator

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index afa97e5..d427e96 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -710,22 +710,21 @@ const GDIMetaFile ImpGraphic::ImplGetGDIMetaFile() const
 pThat-maEx = maSvgData-getReplacement();
 }
 
-VirtualDevice aVirDev;
-const Size aSizePixel(maEx.GetSizePixel());
-
-pThat-maMetaFile.Record(aVirDev);
-
+// #123983# directly create a metafile with the same PrefSize and 
PrefMapMode
+// the bitmap has, this will be an always correct metafile
 if(maEx.IsTransparent())
 {
-aVirDev.DrawBitmapEx(Point(), maEx);
+pThat-maMetaFile.AddAction(new MetaBmpExScaleAction(Point(), 
maEx.GetPrefSize(), maEx));
 }
 else
 {
-aVirDev.DrawBitmap(Point(), maEx.GetBitmap());
+pThat-maMetaFile.AddAction(new MetaBmpScaleAction(Point(), 
maEx.GetPrefSize(), maEx.GetBitmap()));
 }
 
 pThat-maMetaFile.Stop();
-pThat-maMetaFile.SetPrefSize(aSizePixel);
+pThat-maMetaFile.WindStart();
+pThat-maMetaFile.SetPrefSize(maEx.GetPrefSize());
+pThat-maMetaFile.SetPrefMapMode(maEx.GetPrefMapMode());
 }
 
 return maMetaFile;
___
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

2013-10-04 Thread Herbert Dürr
 vcl/source/fontsubset/sft.cxx |7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit d519b07ecd4b67cedf1fe3e1860ef33a48a01ae4
Author: Herbert Dürr h...@apache.org
Date:   Fri Oct 4 15:14:22 2013 +

#i123417# handle subsetting of empty ttf compound glyphs gracefully

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index d40cbda..cc69585 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -799,7 +799,10 @@ static int GetCompoundTTOutline(TrueTypeFont *ttf, 
sal_uInt32 glyphID, ControlPo
 
 } while (flags  MORE_COMPONENTS);
 
-
+// #i123417# some fonts like IFAOGrec have no outline points in some 
compound glyphs
+// so this unlikely but possible scenario should be handled gracefully
+if( myPoints.empty() )
+return 0;
 
 np = myPoints.size();
 
@@ -2787,7 +2790,7 @@ GlyphData *GetTTRawGlyphData(TrueTypeFont *ttf, 
sal_uInt32 glyphID)
 /* now calculate npoints and ncontours */
 ControlPoint *cp;
 n = GetTTGlyphPoints(ttf, glyphID, cp);
-if (n != -1) {
+if( n  0) {
 m = 0;
 for (i = 0; i  n; i++) {
 if (cp[i].flags  0x8000) m++;
___
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

2013-09-10 Thread Herbert Dürr
 vcl/source/gdi/pngread.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 9bab8d99eab92b6ea0e171ac18d45e2283b86e19
Author: Herbert Dürr h...@apache.org
Date:   Tue Sep 10 13:55:38 2013 +

#i122985# fix compile error in pngreader.cxx for product build with debug 
enabled

diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx
index 62a424c..43d3545 100644
--- a/vcl/source/gdi/pngread.cxx
+++ b/vcl/source/gdi/pngread.cxx
@@ -1414,8 +1414,10 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 
nXStart, sal_uInt32 nXAdd )
 {
 OSL_ENSURE(mpScanline, No Scanline allocated (!));
 OSL_ENSURE(mpScanlineAlpha, No ScanlineAlpha allocated 
(!));
+#ifdef DBG_UTIL
 OSL_ENSURE(mnAllocSizeScanline = maOrigSize.Width() * 3, 
Allocated Scanline too small (!));
 OSL_ENSURE(mnAllocSizeScanlineAlpha = maOrigSize.Width(), 
Allocated ScanlineAlpha too small (!));
+#endif
 sal_uInt8* pScanline(mpScanline);
 sal_uInt8* pScanlineAlpha(mpScanlineAlpha);
 
@@ -1549,7 +1551,9 @@ void PNGReaderImpl::ImplDrawScanline( sal_uInt32 nXStart, 
sal_uInt32 nXAdd )
 if(bDoDirectScanline)
 {
 OSL_ENSURE(mpScanline, No Scanline allocated (!));
+#ifdef DBG_UTIL
 OSL_ENSURE(mnAllocSizeScanline = maOrigSize.Width() * 3, 
Allocated Scanline too small (!));
+#endif
 sal_uInt8* pScanline(mpScanline);
 
 for(sal_uInt32 nX(0); nX  maOrigSize.Width(); nX++, pTmp 
+= 3)
___
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

2013-07-22 Thread Herbert Dürr
 vcl/source/gdi/salmisc.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit ec3d48418f1cbad40153b3e4fdc2497ebf0e7d59
Author: Herbert Dürr h...@apache.org
Date:   Mon Jul 22 09:50:08 2013 +

#i122796# fix half-pixel offset in StretchAndConvert() image scaling

diff --git a/vcl/source/gdi/salmisc.cxx b/vcl/source/gdi/salmisc.cxx
index 817aa90..7b93189 100644
--- a/vcl/source/gdi/salmisc.cxx
+++ b/vcl/source/gdi/salmisc.cxx
@@ -429,12 +429,12 @@ BitmapBuffer* StretchAndConvert(
 }
 
 // horizontal mapping table
-if( nDstDX != nSrcDX )
+if( (nDstDX != nSrcDX)  (nDstDX != 0) )
 {
-const double fFactorX = ( nDstDX  1 ) ? (double) ( nSrcDX - 1 ) / ( 
nDstDX - 1 ) : 0.0;
+const double fFactorX = (double)nSrcDX / nDstDX;
 
 for( i = 0L; i  nDstDX; i++ )
-pMapX[ i ] = nSrcX + FRound( i * fFactorX );
+pMapX[ i ] = nSrcX + static_castint( i * fFactorX );
 }
 else
 {
@@ -443,12 +443,12 @@ BitmapBuffer* StretchAndConvert(
 }
 
 // vertical mapping table
-if( nDstDY != nSrcDY )
+if( (nDstDY != nSrcDY)  (nDstDY != 0) )
 {
-const double fFactorY = ( nDstDY  1 ) ? (double) ( nSrcDY - 1 ) / ( 
nDstDY - 1 ) : 0.0;
+const double fFactorY = (double)nSrcDY / nDstDY;
 
 for( i = 0L; i  nDstDY; i++ )
-pMapY[ i ] = nSrcY + FRound( i * fFactorY );
+pMapY[ i ] = nSrcY + static_castint( i * fFactorY );
 }
 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/source

2013-07-02 Thread Armin Le Grand
 vcl/source/gdi/bitmapex.cxx |   16 
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit bd94c69a0fb806a030778544f47114338d9b342c
Author: Armin Le Grand a...@apache.org
Date:   Tue Jul 2 12:56:06 2013 +

corrected some dumb self-assignments found by CovertyScan, thanks for 
detection

diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx
index f86ebe0..6925142 100644
--- a/vcl/source/gdi/bitmapex.cxx
+++ b/vcl/source/gdi/bitmapex.cxx
@@ -1244,20 +1244,20 @@ BitmapEx VCL_DLLPUBLIC createBlendFrame(
 
 if(aLastSize == rSize
  nLastAlpha == nAlpha
- aLastColorTopLeft == aLastColorTopLeft
- aLastColorTopRight == aLastColorTopRight
- aLastColorBottomRight == aLastColorBottomRight
- aLastColorBottomLeft == aLastColorBottomLeft)
+ aLastColorTopLeft == aColorTopLeft
+ aLastColorTopRight == aColorTopRight
+ aLastColorBottomRight == aColorBottomRight
+ aLastColorBottomLeft == aColorBottomLeft)
 {
 return aLastResult;
 }
 
 aLastSize = rSize;
 nLastAlpha = nAlpha;
-aLastColorTopLeft = aLastColorTopLeft;
-aLastColorTopRight = aLastColorTopRight;
-aLastColorBottomRight = aLastColorBottomRight;
-aLastColorBottomLeft = aLastColorBottomLeft;
+aLastColorTopLeft = aColorTopLeft;
+aLastColorTopRight = aColorTopRight;
+aLastColorBottomRight = aColorBottomRight;
+aLastColorBottomLeft = aColorBottomLeft;
 aLastResult.Clear();
 
 const long nW(rSize.Width());
___
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

2013-06-11 Thread Oliver-Rainer Wittmann
 vcl/source/gdi/sallayout.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 6115cd0bf8ef8d7e063615636175e148c8d57da1
Author: Oliver-Rainer Wittmann o...@apache.org
Date:   Tue Jun 11 10:02:35 2013 +

method MultiSalLayout::AdjustLayout(..) - limit next codepoint index to 
the minindex..endindex bounds

Patch by: hdu

diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index c800403..b858517 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1863,15 +1863,23 @@ void MultiSalLayout::AdjustLayout( ImplLayoutArgs 
rArgs )
 }
 mnLevel = nLevel;
 
-// merge the fallback levels
+// prepare merge the fallback levels
 long nXPos = 0;
 double fUnitMul = 1.0;
 for( n = 0; n  nLevel; ++n )
 maFallbackRuns[n].ResetPos();
+// get the next codepoint index that needs fallback
+// and limit it to the minindex..endindex bounds
 int nActiveCharPos = nCharPos[0];
+if( nActiveCharPos  mnMinCharPos)
+nActiveCharPos = mnMinCharPos;
+else if( nActiveCharPos = rArgs.mnEndCharPos )
+nActiveCharPos = rArgs.mnEndCharPos - 1;
+// get the end index of the active run
 int nLastRunEndChar = (vRtl[nActiveCharPos - mnMinCharPos])?
 rArgs.mnEndCharPos : rArgs.mnMinCharPos - 1;
 int nRunVisibleEndChar = nCharPos[0];
+// merge the fallback levels
 while( nValid[0]  (nLevel  0))
 {
 // find best fallback level
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits