summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brinkmann <hbrinkm@openoffice.org>2010-09-20 17:13:53 +0200
committerHenning Brinkmann <hbrinkm@openoffice.org>2010-09-20 17:13:53 +0200
commitfb62a5cca0903fe7672c5e78c604f53de51869b6 (patch)
tree919c3c2a4923f833f5a2a64c6d8cc7bd3543727d
parentbc73a488abfcec302ec8a8c8251a8eb775f812de (diff)
parentbdab146f1c8d8a873fdddff203a6b2ef29022eaf (diff)
merged OOO330_m8
-rw-r--r--l10ntools/java/jpropex/java/JPropEx.java10
-rw-r--r--l10ntools/prj/build.lst3
-rw-r--r--l10ntools/prj/d.lst16
-rw-r--r--l10ntools/scripts/makefile.mk59
-rw-r--r--l10ntools/scripts/tool/xhtex.py2
-rwxr-xr-xl10ntools/scripts/xhtex8
-rwxr-xr-xl10ntools/scripts/xtxex8
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java24
-rw-r--r--l10ntools/source/help/HelpLinker.cxx117
-rw-r--r--svtools/inc/svtools/table/tabledatawindow.hxx1
-rw-r--r--svtools/source/contnr/svimpbox.cxx8
-rw-r--r--svtools/source/table/defaultinputhandler.cxx1
-rw-r--r--svtools/source/table/tabledatawindow.cxx7
-rw-r--r--toolkit/inc/toolkit/helper/solarrelease.hxx27
-rw-r--r--toolkit/source/awt/vclxwindow.cxx3
-rw-r--r--vcl/aqua/source/a11y/aqua11yselectionwrapper.mm25
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx12
-rw-r--r--vcl/aqua/source/gdi/salnativewidgets.cxx8
-rw-r--r--vcl/source/window/syswin.cxx2
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx10
-rwxr-xr-xvcl/win/source/gdi/winlayout.cxx4
21 files changed, 257 insertions, 98 deletions
diff --git a/l10ntools/java/jpropex/java/JPropEx.java b/l10ntools/java/jpropex/java/JPropEx.java
index ceeeb5083982..f068f93ad18b 100644
--- a/l10ntools/java/jpropex/java/JPropEx.java
+++ b/l10ntools/java/jpropex/java/JPropEx.java
@@ -126,8 +126,8 @@ public class JPropEx
{
key = (String) e.nextElement();
currentStr = (SdfEntity) dolly.clone();
- // Set the new LID and the string text
- currentStr.setLid( key );
+ // Set the new GID and the string text
+ currentStr.setGid( key );
value = prop.getProperty( key , "" );
//if( value.equals("") ) System.err.println("Warning: in file "+inputFileArg+" the string with the key "+key+" has a empty string!");
str = (prop.getProperty( key )).replaceAll("\t" , " " ); // remove tab
@@ -211,7 +211,7 @@ public class JPropEx
key = (String) e.nextElement();
sourceString = sourceProp.getProperty( key );
curStr = (SdfEntity) dolly.clone();
- curStr.setLid( key );
+ curStr.setGid( key );
for( Enumeration lang = langs.elements(); lang.hasMoreElements(); ) // merge in every language
{
curEntity = (SdfEntity) curStr.clone();
@@ -221,12 +221,12 @@ public class JPropEx
if( mergedEntity == null )
{
// in case there is no translation then fallback to the en-US source string
- ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getLid() , sourceString );
+ ( (java.util.Properties) props.get( curLang )).setProperty( curEntity.getGid() , sourceString );
}
else
{
// Set the merged text from the sdf file
- ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getLid() , mergedEntity.getText() ); // TODO: Quoting ???
+ ( (java.util.Properties) props.get( curLang )).setProperty( mergedEntity.getGid() , mergedEntity.getText() ); // TODO: Quoting ???
}
}
diff --git a/l10ntools/prj/build.lst b/l10ntools/prj/build.lst
index 8387154897b3..d8a2e8c00649 100644
--- a/l10ntools/prj/build.lst
+++ b/l10ntools/prj/build.lst
@@ -1,6 +1,7 @@
-tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene NULL
+tr l10ntools : tools LIBXSLT:libxslt BERKELEYDB:berkeleydb LUCENE:lucene PYTHON:python NULL
tr l10ntools usr1 - all tr_mkout NULL
tr l10ntools\inc nmake - all tr_inc NULL
+tr l10ntools\scripts nmake - all tr_scripts NULL
tr l10ntools\source nmake - all tr_src tr_inc NULL
tr l10ntools\layout nmake - all rt_layout tr_src tr_inc NULL
tr l10ntools\java\jpropex nmake - all tr_blah NULL
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index 53c846832fca..9d493e1e9673 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,14 +47,18 @@ mkdir: %_DEST%\bin%_EXT%\help\com\sun\star\help
..\scripts\localize %_DEST%\bin%_EXT%\localize
..\scripts\fast_merge.pl %_DEST%\bin%_EXT%\fast_merge.pl
..\scripts\keyidGen.pl %_DEST%\bin%_EXT%\keyidGen.pl
-..\scripts\tool\const.py %_DEST%\bin%_EXT%\const.py
-..\scripts\tool\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
-..\scripts\tool\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
-..\scripts\tool\sdf.py %_DEST%\bin%_EXT%\sdf.py
-..\scripts\tool\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
-..\scripts\tool\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
..\scripts\xtxex %_DEST%\bin%_EXT%\xtxex
..\scripts\xhtex %_DEST%\bin%_EXT%\xhtex
+..\%__SRC%\bin\const.py %_DEST%\bin%_EXT%\const.py
+..\%__SRC%\bin\l10ntool.py %_DEST%\bin%_EXT%\l10ntool.py
+..\%__SRC%\bin\pseudo.py %_DEST%\bin%_EXT%\pseudo.py
+..\%__SRC%\bin\sdf.py %_DEST%\bin%_EXT%\sdf.py
+..\%__SRC%\bin\const.pyc %_DEST%\bin%_EXT%\const.pyc
+..\%__SRC%\bin\l10ntool.pyc %_DEST%\bin%_EXT%\l10ntool.pyc
+..\%__SRC%\bin\pseudo.pyc %_DEST%\bin%_EXT%\pseudo.pyc
+..\%__SRC%\bin\sdf.pyc %_DEST%\bin%_EXT%\sdf.pyc
+..\%__SRC%\bin\xhtex.py %_DEST%\bin%_EXT%\xhtex.py
+..\%__SRC%\bin\xtxex.py %_DEST%\bin%_EXT%\xtxex.py
..\inc\export.hxx %_DEST%\inc%_EXT%\l10ntools\export.hxx
..\inc\l10ntools\directory.hxx %_DEST%\inc%_EXT%\l10ntools\directory.hxx
diff --git a/l10ntools/scripts/makefile.mk b/l10ntools/scripts/makefile.mk
new file mode 100644
index 000000000000..8bfa64e3fbad
--- /dev/null
+++ b/l10ntools/scripts/makefile.mk
@@ -0,0 +1,59 @@
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2000, 2010 Oracle and/or its affiliates.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# Copy *.py files into output tree and call a script once to
+# force python to create the *.pyc files.
+
+PRJ=..
+TARGET = l10ntools_dummy_pyc
+
+.INCLUDE: settings.mk
+
+.IF "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) $(SOLARBINDIR)/python
+.ELSE # "$(SYSTEM_PYTHON)"!="YES"
+PYTHON=$(AUGMENT_LIBRARY_PATH) $(WRAPCMD) python
+.ENDIF # "$(SYSTEM_PYTHON)"!="YES"
+
+PYFILES = $(BIN)$/const.py \
+ $(BIN)$/l10ntool.py \
+ $(BIN)$/pseudo.py \
+ $(BIN)$/sdf.py \
+ $(BIN)$/xhtex.py \
+ $(BIN)$/xtxex.py
+
+.INCLUDE: target.mk
+
+.IGNORE : create_pyc
+ALLTAR : create_pyc
+create_pyc : $(PYFILES)
+ @$(PYTHON) $(BIN)/xtxex.py >& /dev/null
+
+$(BIN)$/%.py : tool/%.py
+ @$(COPY) $< $@
+
+
diff --git a/l10ntools/scripts/tool/xhtex.py b/l10ntools/scripts/tool/xhtex.py
index c427a7feccdd..ae973aacc555 100644
--- a/l10ntools/scripts/tool/xhtex.py
+++ b/l10ntools/scripts/tool/xhtex.py
@@ -108,7 +108,7 @@ class Xhtex(AbstractL10nTool):
def parse_file(self, filename):
document = ""
try:
- f = open(filename,"r+")
+ f = open(filename,"r")
document = f.read()
except IOError:
print "ERROR: Can not read file " + filename
diff --git a/l10ntools/scripts/xhtex b/l10ntools/scripts/xhtex
index ca307cf2d4a4..d337694c589b 100755
--- a/l10ntools/scripts/xhtex
+++ b/l10ntools/scripts/xhtex
@@ -31,16 +31,8 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
-if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
fi
-else
-if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xhtex.py "$@"
-else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xhtex.py "$@"
-fi
-fi
diff --git a/l10ntools/scripts/xtxex b/l10ntools/scripts/xtxex
index fb54c1aee36c..01a70ae57d80 100755
--- a/l10ntools/scripts/xtxex
+++ b/l10ntools/scripts/xtxex
@@ -31,17 +31,9 @@ if [ x${SOLARENV}x = xx ]; then
exit 1
fi
-if [ ${GUI} = "WNT" ]; then
if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
exec python $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
else
exec python $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
fi
-else
-if [ x${SOLARVER}x = xx -o x${UPDMINOREXT}x = xx ]; then
- exec python -B $SOLARVERSION/$INPATH/bin/xtxex.py "$@"
-else
- exec python -B $SOLARVERSION/$INPATH/bin$UPDMINOREXT/xtxex.py "$@"
-fi
-fi
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index 2a49f964d48f..a39b5399e38d 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -72,6 +72,9 @@ public class HelpIndexerTool
String aSegmentName = "";
// Scan arguments
+ //If this tool is invoked in the build process for extensions help,
+ //then -extension must be set.
+ boolean bExtension = false;
boolean bLang = false;
boolean bMod = false;
boolean bZipDir = false;
@@ -83,7 +86,11 @@ public class HelpIndexerTool
int nArgCount = args.length;
for( int i = 0 ; i < nArgCount ; i++ )
{
- if( "-lang".equals(args[i]) )
+ if( "-extension".equals(args[i]) )
+ {
+ bExtension = true;
+ }
+ else if( "-lang".equals(args[i]) )
{
if( i + 1 < nArgCount )
{
@@ -142,20 +149,21 @@ public class HelpIndexerTool
bSegmentName = true;
}
i++;
- if (!(bCfsName && bSegmentName))
- {
- System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
- System.exit( -1 );
- }
+ if (!(bCfsName && bSegmentName))
+ {
+ System.out.println("Usage: HelpIndexer -checkcfsandsegname _0 _3 (2 arguments needed)");
+ System.exit( -1 );
+ }
}
}
- if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode) )
+ if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode && !bExtension) )
{
if( bExtensionMode )
return;
System.out.println("Usage: HelpIndexer -lang ISOLangCode -mod HelpModule -zipdir TempZipDir -o OutputZipFile");
+ System.out.println("Usage: HelpIndexer -extension -lang ISOLangCode -mod HelpModule -zipdir PathToLangDir");
System.exit( -1 );
}
@@ -199,7 +207,7 @@ public class HelpIndexerTool
System.out.println( "Checking segment file " + aSegmentName+ ": " + (bSegmentFileOk ? "Found" : "Not found") );
}
- if( bExtensionMode )
+ if( bExtensionMode || bExtension)
{
if( !bSrcDir )
{
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 94139f89de1e..411859bfe994 100644
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -269,6 +269,8 @@ private:
fs::path idxContentStylesheet;
fs::path zipdir;
fs::path outputFile;
+ std::string extsource;
+ std::string extdestination;
std::string module;
std::string lang;
std::string hid;
@@ -762,18 +764,9 @@ void HelpLinker::main( std::vector<std::string> &args,
const rtl::OUString* pOfficeHelpPath )
throw( HelpProcessingException )
{
- rtl::OUString aOfficeHelpPath;
-
bExtensionMode = false;
- if( pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath )
- {
- helpFiles.clear();
- bExtensionMode = true;
- extensionPath = *pExtensionPath;
- sourceRoot = fs::path(extensionPath);
- extensionDestination = *pDestination;
- aOfficeHelpPath = *pOfficeHelpPath;
- }
+ helpFiles.clear();
+
if (args.size() > 0 && args[0][0] == '@')
{
std::vector<std::string> stringList;
@@ -793,10 +786,34 @@ void HelpLinker::main( std::vector<std::string> &args,
}
size_t i = 0;
-
+ bool bSrcOption = false;
while (i < args.size())
{
- if (args[i].compare("-src") == 0)
+ if (args[i].compare("-extlangsrc") == 0)
+ {
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension source missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extsource = args[i];
+ }
+ else if (args[i].compare("-extlangdest") == 0)
+ {
+ //If this argument is not provided then the location provided in -extsource will
+ //also be the destination
+ ++i;
+ if (i >= args.size())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "extension destination missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ extdestination = args[i];
+ }
+ else if (args[i].compare("-src") == 0)
{
++i;
if (i >= args.size())
@@ -805,9 +822,8 @@ void HelpLinker::main( std::vector<std::string> &args,
aStrStream << "sourceroot missing" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
-
- if( !bExtensionMode )
- sourceRoot = fs::path(args[i], fs::native);
+ bSrcOption = true;
+ sourceRoot = fs::path(args[i], fs::native);
}
else if (args[i].compare("-sty") == 0)
{
@@ -933,21 +949,70 @@ void HelpLinker::main( std::vector<std::string> &args,
++i;
}
+ //We can be called from the helplinker executable or the extension manager
+ //In the latter case extsource is not used.
+ if( (pExtensionPath && pExtensionPath->length() > 0 && pOfficeHelpPath)
+ || !extsource.empty())
+ {
+ bExtensionMode = true;
+ if (!extsource.empty())
+ {
+ //called from helplinker.exe, pExtensionPath and pOfficeHelpPath
+ //should be NULL
+ sourceRoot = fs::path(extsource, fs::native);
+ extensionPath = sourceRoot.toUTF8();
+
+ if (extdestination.empty())
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-extlangdest is missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ else
+ {
+ //Convert from system path to file URL!!!
+ fs::path p(extdestination, fs::native);
+ extensionDestination = p.toUTF8();
+ }
+ }
+ else
+ { //called from extension manager
+ extensionPath = *pExtensionPath;
+ sourceRoot = fs::path(extensionPath);
+ extensionDestination = *pDestination;
+ }
+ //check if -src option was used. This option must not be used
+ //when extension help is compiled.
+ if (bSrcOption)
+ {
+ std::stringstream aStrStream;
+ aStrStream << "-src must not be used together with -extsource missing" << std::endl;
+ throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
+ }
+ }
+
if (!bExtensionMode && zipdir.empty())
{
std::stringstream aStrStream;
aStrStream << "no index dir given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- if (!bExtensionMode && idxCaptionStylesheet.empty())
+
+ if (!bExtensionMode && idxCaptionStylesheet.empty()
+ || !extsource.empty() && idxCaptionStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcaption paramter is required
std::stringstream aStrStream;
aStrStream << "no index caption stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxCaptionPathFileURL( aOfficeHelpPath );
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ //If extension help is compiled using helplinker in the build process
+ rtl::OUString aIdxCaptionPathFileURL( *pOfficeHelpPath );
aIdxCaptionPathFileURL += rtl::OUString::createFromAscii( "/idxcaption.xsl" );
rtl::OString aOStr_IdxCaptionPathFileURL( rtl::OUStringToOString
@@ -956,15 +1021,23 @@ void HelpLinker::main( std::vector<std::string> &args,
idxCaptionStylesheet = fs::path( aStdStr_IdxCaptionPathFileURL );
}
- if (!bExtensionMode && idxContentStylesheet.empty())
+
+ if (!bExtensionMode && idxContentStylesheet.empty()
+ || !extsource.empty() && idxContentStylesheet.empty())
{
+ //No extension mode and extension mode using commandline
+ //!extsource.empty indicates extension mode using commandline
+ // -idxcontent paramter is required
std::stringstream aStrStream;
aStrStream << "no index content stylesheet given" << std::endl;
throw HelpProcessingException( HELPPROCESSING_GENERAL_ERROR, aStrStream.str() );
}
- else if ( bExtensionMode )
+ else if ( bExtensionMode && extsource.empty())
{
- rtl::OUString aIdxContentPathFileURL( aOfficeHelpPath );
+ //If extension help is compiled using helplinker in the build process
+ //then -idxcontent must be supplied
+ //This part is used when compileExtensionHelp is called from the extensions manager.
+ rtl::OUString aIdxContentPathFileURL( *pOfficeHelpPath );
aIdxContentPathFileURL += rtl::OUString::createFromAscii( "/idxcontent.xsl" );
rtl::OString aOStr_IdxContentPathFileURL( rtl::OUStringToOString
diff --git a/svtools/inc/svtools/table/tabledatawindow.hxx b/svtools/inc/svtools/table/tabledatawindow.hxx
index 9a6ece489119..829feecd5836 100644
--- a/svtools/inc/svtools/table/tabledatawindow.hxx
+++ b/svtools/inc/svtools/table/tabledatawindow.hxx
@@ -55,7 +55,6 @@ namespace svt { namespace table
Link m_aMouseButtonDownHdl;
Link m_aMouseButtonUpHdl;
Link m_aSelectHdl;
- RowPos m_nRowAlreadySelected;
public:
TableDataWindow( TableControl_Impl& _rTableControl );
inline void SetMouseButtonDownHdl( const Link& rLink ) { m_aMouseButtonDownHdl = rLink; }
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 484584828b9f..35324d551858 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -2172,14 +2172,6 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt )
SelAllDestrAnch( FALSE, TRUE ); // DeselectAll();
SetCursor( pEntry );
- DBG_ERROR( "Please report what you did to get this assertion to FS!" );
- // The entry which has been double-clicked changed - and we select it, again.
- // I have situations where this behaviour does not make any sense at all - even more, it
- // leads to hacks to revert it's results.
- // So I'm not sure if this behaviour here is nonsense (which I believe at the moment),
- // or if there are really scenarious where it dones make sense ....
- // 07.12.2001 - 95727 - fs@openoffice.org
-
return;
}
if( pEntry->HasChilds() || pEntry->HasChildsOnDemand() )
diff --git a/svtools/source/table/defaultinputhandler.cxx b/svtools/source/table/defaultinputhandler.cxx
index ad8f7a7562d3..f6a58ad17efe 100644
--- a/svtools/source/table/defaultinputhandler.cxx
+++ b/svtools/source/table/defaultinputhandler.cxx
@@ -173,6 +173,7 @@ namespace svt { namespace table
if ( ( pActions->nKeyCode == nKeyCode ) && ( pActions->nKeyModifier == rKeyCode.GetAllModifier() ) )
{
bHandled = _rControl.dispatchAction( pActions->eAction );
+ bHandled = true; // always handled issue #i114340
break;
}
}
diff --git a/svtools/source/table/tabledatawindow.cxx b/svtools/source/table/tabledatawindow.cxx
index e2e1ce5353fe..bbd7f6829369 100644
--- a/svtools/source/table/tabledatawindow.cxx
+++ b/svtools/source/table/tabledatawindow.cxx
@@ -45,7 +45,6 @@ namespace svt { namespace table
TableDataWindow::TableDataWindow( TableControl_Impl& _rTableControl )
:Window( &_rTableControl.getAntiImpl() )
,m_rTableControl ( _rTableControl )
- ,m_nRowAlreadySelected( -1 )
{
// by default, use the background as determined by the style settings
const Color aWindowColor( GetSettings().GetStyleSettings().GetFieldColor() );
@@ -110,15 +109,17 @@ namespace svt { namespace table
{
Point aPoint = rMEvt.GetPosPixel();
RowPos nCurRow = m_rTableControl.getCurrentRow(aPoint);
+ std::vector<RowPos> selectedRows(m_rTableControl.getSelectedRows());
if ( !m_rTableControl.getInputHandler()->MouseButtonDown( m_rTableControl, rMEvt ) )
Window::MouseButtonDown( rMEvt );
else
{
if(nCurRow >= 0 && m_rTableControl.getSelEngine()->GetSelectionMode() != NO_SELECTION)
{
- if( m_nRowAlreadySelected != nCurRow )
+ bool found = std::find(selectedRows.begin(),selectedRows.end(), nCurRow) != selectedRows.end();
+
+ if( !found )
{
- m_nRowAlreadySelected = nCurRow;
m_aSelectHdl.Call( NULL );
}
}
diff --git a/toolkit/inc/toolkit/helper/solarrelease.hxx b/toolkit/inc/toolkit/helper/solarrelease.hxx
index d8938b41c220..e45a1b6ee2c3 100644
--- a/toolkit/inc/toolkit/helper/solarrelease.hxx
+++ b/toolkit/inc/toolkit/helper/solarrelease.hxx
@@ -41,15 +41,36 @@ namespace toolkit
class ReleaseSolarMutex
{
sal_uInt32 mnLockCount;
+ const bool mbRescheduleDuringAcquire;
+
public:
- ReleaseSolarMutex()
+ enum
{
- mnLockCount = Application::ReleaseSolarMutex();
+ RescheduleDuringAcquire = true
+ };
+
+ public:
+ ReleaseSolarMutex( const bool i_rescheduleDuringAcquire = false )
+ :mnLockCount( Application::ReleaseSolarMutex() )
+ ,mbRescheduleDuringAcquire( i_rescheduleDuringAcquire )
+ {
+
}
~ReleaseSolarMutex()
{
- Application::AcquireSolarMutex( mnLockCount );
+ if ( mnLockCount > 0 )
+ {
+ if ( mbRescheduleDuringAcquire )
+ {
+ while ( !Application::GetSolarMutex().tryToAcquire() )
+ {
+ Application::Reschedule();
+ }
+ --mnLockCount;
+ }
+ Application::AcquireSolarMutex( mnLockCount );
+ }
}
};
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index efc2c40c6baa..1022d78a43ed 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -92,6 +92,7 @@ using ::com::sun::star::style::VerticalAlignment_MAKE_FIXED_SIZE;
namespace WritingMode2 = ::com::sun::star::text::WritingMode2;
namespace MouseWheelBehavior = ::com::sun::star::awt::MouseWheelBehavior;
+using ::toolkit::ReleaseSolarMutex;
//====================================================================
//= misc helpers
@@ -339,7 +340,7 @@ IMPL_LINK( VCLXWindowImpl, OnProcessCallbacks, void*, EMPTYARG )
}
{
- ::toolkit::ReleaseSolarMutex aReleaseSolar;
+ ReleaseSolarMutex aReleaseSolar( ReleaseSolarMutex::RescheduleDuringAcquire );
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
++loop
diff --git a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
index 53ab6dd36128..804cf108dba8 100644
--- a/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11yselectionwrapper.mm
@@ -40,20 +40,23 @@ using namespace ::com::sun::star::uno;
+(id)selectedChildrenAttributeForElement:(AquaA11yWrapper *)wrapper
{
Reference< XAccessibleSelection > xAccessibleSelection = [ wrapper accessibleSelection ];
- NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
-
- try {
- sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
- for ( sal_Int32 i=0 ; i < n ; ++i ) {
- [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ if( xAccessibleSelection.is() )
+ {
+ NSMutableArray * children = [ [ NSMutableArray alloc ] init ];
+ try {
+ sal_Int32 n = xAccessibleSelection -> getSelectedAccessibleChildCount();
+ for ( sal_Int32 i=0 ; i < n ; ++i ) {
+ [ children addObject: [ AquaA11yFactory wrapperForAccessible: xAccessibleSelection -> getSelectedAccessibleChild( i ) ] ];
+ }
+
+ return children;
+
+ } catch ( Exception& e)
+ {
}
-
- return children;
-
- } catch ( Exception& e) {
- return nil;
}
+ return nil;
}
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index 8a4744d1efcd..ca3fcc04769a 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -1453,16 +1453,24 @@ BOOL AquaSalGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight,
// prepare the target context
NSGraphicsContext* pOrigNSCtx = [NSGraphicsContext currentContext];
+ [pOrigNSCtx retain];
+
+ // create new context
NSGraphicsContext* pDrawNSCtx = [NSGraphicsContext graphicsContextWithGraphicsPort: mrContext flipped: IsFlipped()];
+ // set it, setCurrentContext also releases the prviously set one
[NSGraphicsContext setCurrentContext: pDrawNSCtx];
+
// draw the EPS
const NSRect aDstRect = {{nX,nY},{nWidth,nHeight}};
const BOOL bOK = [xEpsImage drawInRect: aDstRect];
+
+ // restore the NSGraphicsContext
+ [NSGraphicsContext setCurrentContext: pOrigNSCtx];
+ [pOrigNSCtx release]; // restore the original retain count
+
CGContextRestoreGState( mrContext );
// mark the destination rectangle as updated
RefreshRect( aDstRect );
- // restore the NSGraphicsContext, TODO: do we need this?
- [NSGraphicsContext setCurrentContext: pOrigNSCtx];
return bOK;
}
diff --git a/vcl/aqua/source/gdi/salnativewidgets.cxx b/vcl/aqua/source/gdi/salnativewidgets.cxx
index 6e206977b5c4..9ce2b8a5a518 100644
--- a/vcl/aqua/source/gdi/salnativewidgets.cxx
+++ b/vcl/aqua/source/gdi/salnativewidgets.cxx
@@ -1366,10 +1366,12 @@ BOOL AquaSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPa
w = aCtrlBoundRect.GetWidth();
if( w < 3+2*FOCUS_RING_WIDTH )
w = 3+2*FOCUS_RING_WIDTH;
- h = TEXT_EDIT_HEIGHT_NORMAL;
+ h = TEXT_EDIT_HEIGHT_NORMAL+2*FOCUS_RING_WIDTH;
+ if( h < aCtrlBoundRect.GetHeight() )
+ h = aCtrlBoundRect.GetHeight();
- rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*FOCUS_RING_WIDTH-2, h-2 ) );
- rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h+2*FOCUS_RING_WIDTH ) );
+ rNativeContentRegion = Rectangle( Point( x+FOCUS_RING_WIDTH, y+FOCUS_RING_WIDTH ), Size( w-2*(FOCUS_RING_WIDTH+1), h-2*(FOCUS_RING_WIDTH+1) ) );
+ rNativeBoundingRegion = Rectangle( Point( x, y ), Size( w, h ) );
toReturn = TRUE;
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index f3624ef56f59..f6a37658b79f 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -773,7 +773,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
BOOL bWrapped = FALSE;
while( pWin )
{
- if( !pWin->ImplIsRealParentPath( this ) &&
+ if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) &&
pWin->ImplGetWindow()->IsTopWindow() && pWin->mpWindowImpl->mbReallyVisible )
{
SalFrameGeometry g = pWin->mpWindowImpl->mpFrame->GetGeometry();
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 9d3ce6b137cd..ec92c20b54b5 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -1102,8 +1102,9 @@ BOOL GtkSalGraphics::getNativeControlRegion( ControlType nType,
GtkRequisition aReq;
gtk_widget_size_request( widget, &aReq );
Rectangle aEditRect = rControlRegion;
+ long nHeight = (aEditRect.GetHeight() > aReq.height+1) ? aEditRect.GetHeight() : aReq.height+1;
aEditRect = Rectangle( aEditRect.TopLeft(),
- Size( aEditRect.GetWidth(), aReq.height+1 ) );
+ Size( aEditRect.GetWidth(), nHeight ) );
rNativeBoundingRegion = aEditRect;
rNativeContentRegion = rNativeBoundingRegion;
returnVal = TRUE;
@@ -2291,11 +2292,10 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
const ImplControlValue& aValue,
const OUString& )
{
- OSL_ASSERT( aValue.getType() == CTRL_TAB_ITEM );
+ OSL_ASSERT( nType != CTRL_TAB_ITEM || aValue.getType() == CTRL_TAB_ITEM );
GdkPixmap * pixmap;
Rectangle pixmapRect;
Rectangle tabRect;
- const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
GtkStateType stateType;
GtkShadowType shadowType;
if( ! gWidgetData[ m_nScreen ].gCacheTabItems )
@@ -2311,9 +2311,8 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
if( !aCachePage.GetSize() )
aCachePage.SetSize( 1 );
- if ( !pTabitemValue && (nType==CTRL_TAB_ITEM) )
+ if ( (nType == CTRL_TAB_ITEM) && (aValue.getType() != CTRL_TAB_ITEM) )
{
- std::fprintf( stderr, "NWPaintGTKTabItem() received a NULL TabitemValue. Cannot draw native tab\n" );
return( false );
}
@@ -2326,6 +2325,7 @@ BOOL GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart,
pixmapRect = rControlRectangle;
if ( nType == CTRL_TAB_ITEM )
{
+ const TabitemValue * pTabitemValue = static_cast<const TabitemValue *>(&aValue);
if ( !pTabitemValue->isFirst() )
{
// GTK+ tabs overlap on the right edge (the top tab obscures the
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 806d3b420b33..bc80cbf94fb8 100755
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -2203,7 +2203,9 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ )
const int k = mpGlyphs2Chars[ i ];
mpGlyphs2Chars[ j ] = k;
const int nRelGlyphPos = (j++) - rVI.mnMinGlyphPos;
- mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
+ if( k < 0) // extra glyphs are already mapped
+ continue;
+ mpLogClusters[ k ] = static_cast<WORD>(nRelGlyphPos);
}
rVI.mnEndGlyphPos = j;