summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:33 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-23 16:59:33 +0100
commit932fb7b958f8e7204275cb709965b30e390c76ad (patch)
tree75f695663a97693416f8a84e140fa61805cf5bd2
parentbb54b94e5f48c4f6dce72f59dc6bc83f17d2c590 (diff)
parent78f80b020fe009bc48e9e5f8b7862de51f1f8381 (diff)
Merge commit 'ooo/DEV300_m103'
Conflicts: cppcanvas/source/mtfrenderer/implrenderer.cxx dtrans/source/win32/dtobj/XTDataObject.cxx dtrans/source/win32/dtobj/XTDataObject.hxx sot/source/sdstor/stgio.cxx tools/source/debug/debug.cxx vcl/source/gdi/jobset.cxx vcl/unx/kde4/KDEData.cxx vcl/unx/kde4/KDEData.hxx vcl/unx/kde4/KDESalDisplay.cxx vcl/unx/kde4/KDESalFrame.cxx vcl/unx/kde4/KDESalFrame.hxx vcl/unx/kde4/KDESalGraphics.cxx vcl/unx/kde4/KDESalGraphics.hxx vcl/unx/kde4/KDESalInstance.cxx vcl/unx/kde4/KDESalInstance.hxx vcl/unx/kde4/KDEXLib.cxx vcl/unx/kde4/VCLKDEApplication.cxx vcl/unx/kde4/VCLKDEApplication.hxx
-rw-r--r--canvas/source/directx/dx_textlayout_drawhelper.cxx1
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx2
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.hxx2
-rw-r--r--i18npool/source/paper/paper.cxx2
-rwxr-xr-x[-rw-r--r--]l10ntools/source/help/HelpCompiler.hxx8
-rw-r--r--l10ntools/source/help/HelpIndexerTool.java9
-rwxr-xr-x[-rw-r--r--]l10ntools/source/help/HelpLinker.cxx41
-rw-r--r--rsc/source/rscpp/cpp4.c2
-rw-r--r--rsc/source/tools/rscchar.cxx16
-rw-r--r--sot/source/sdstor/stgio.cxx4
-rw-r--r--svl/qa/complex/passwordcontainer/makefile.mk134
-rw-r--r--svtools/qa/unoapi/makefile.mk48
-rw-r--r--svtools/source/contnr/svlbox.cxx1
-rwxr-xr-x[-rw-r--r--]svtools/source/filter.vcl/filter/FilterConfigItem.cxx0
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx26
-rw-r--r--toolkit/qa/unoapi/makefile.mk48
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx41
-rw-r--r--tools/inc/tools/debug.hxx8
-rw-r--r--tools/inc/tools/mempool.hxx17
-rw-r--r--tools/source/debug/debug.cxx50
-rwxr-xr-xtools/source/memtools/mempool.cxx14
-rw-r--r--tools/workben/makefile.mk68
-rw-r--r--tools/workben/mempooltest.cxx18
-rw-r--r--vcl/aqua/inc/salframeview.h1
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.cxx43
-rw-r--r--vcl/aqua/source/dtrans/DropTarget.hxx2
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx22
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm5
-rw-r--r--vcl/inc/vcl/cursor.hxx4
-rw-r--r--vcl/source/app/dbggui.cxx20
-rw-r--r--vcl/source/control/ilstbox.cxx2
-rw-r--r--vcl/source/gdi/jobset.cxx7
-rw-r--r--vcl/source/gdi/print3.cxx43
-rw-r--r--vcl/source/window/cursor.cxx20
-rwxr-xr-x[-rw-r--r--]vcl/source/window/printdlg.cxx12
-rw-r--r--vcl/source/window/window.cxx7
-rw-r--r--vcl/unx/inc/saldisp.hxx2
-rw-r--r--vcl/unx/kde4/KDESalFrame.cxx10
-rw-r--r--vcl/unx/source/app/saldisp.cxx32
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx24
-rw-r--r--vcl/win/source/gdi/salgdi.cxx4
41 files changed, 628 insertions, 192 deletions
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index f52243d8a9e9..0d2991bcdaff 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -40,6 +40,7 @@
#include <boost/scoped_array.hpp>
#include <boost/bind.hpp>
#include <com/sun/star/rendering/FontRequest.hpp>
+#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <com/sun/star/rendering/XCanvasFont.hpp>
#include <com/sun/star/rendering/PanoseProportion.hpp>
#include <comphelper/sequence.hxx>
diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 6d59f9a7445a..e263f7e58292 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -35,7 +35,7 @@
#include <osl/diagnose.h>
#include "XTDataObject.hxx"
-#include <com/sun/star/datatransfer/dataflavor.hpp>
+#include <com/sun/star/datatransfer/DataFlavor.hpp>
#include "..\misc\ImplHelper.hxx"
#include "DTransHelper.hxx"
#include "TxtCnvtHlp.hxx"
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index 1958be4afcbe..f817d602b0ed 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -40,7 +40,7 @@
#include "DataFmtTransl.hxx"
-#include "FEtcList.hxx"
+#include "FetcList.hxx"
#if defined _MSC_VER
#pragma warning(push,1)
diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index 9d9ac886a22e..937db353e6c5 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -161,7 +161,7 @@ static PageDesc aDinTab[] =
static const size_t nTabSize = SAL_N_ELEMENTS(aDinTab);
-#define MAXSLOPPY 11
+#define MAXSLOPPY 21
bool PaperInfo::doSloppyFit()
{
diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx
index 03296d97db2f..8b063509a699 100644..100755
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -103,6 +103,14 @@ namespace fs
HCDBG(std::cerr << "native_file_string is " << tmp.getStr() << std::endl);
return std::string(tmp.getStr());
}
+#ifdef WNT
+ wchar_t const * native_file_string_w() const
+ {
+ ::rtl::OUString ustrSystemPath;
+ osl::File::getSystemPathFromFileURL(data, ustrSystemPath);
+ return ustrSystemPath.getStr();
+ }
+#endif
std::string native_directory_string() const { return native_file_string(); }
std::string toUTF8() const
{
diff --git a/l10ntools/source/help/HelpIndexerTool.java b/l10ntools/source/help/HelpIndexerTool.java
index a39b5399e38d..c20d9f108ced 100644
--- a/l10ntools/source/help/HelpIndexerTool.java
+++ b/l10ntools/source/help/HelpIndexerTool.java
@@ -45,6 +45,15 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Date;
+
+/**
+ When this tool is used with long path names on Windows, that is paths which start
+ with \\?\, then the caller must make sure that the path is unique. This is achieved
+ by removing '.' and '..' from the path. Paths which are created by
+ osl_getSystemPathFromFileURL fulfill this requirement. This is necessary because
+ lucene is patched to not use File.getCanonicalPath. See long_path.patch in the lucene
+ module.
+ */
public class HelpIndexerTool
{
public HelpIndexerTool()
diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx
index 32de3cc5efeb..8dfb47303fd1 100644..100755
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -123,7 +123,13 @@ void IndexerPreProcessor::processDocument
{
fs::path fsCaptionPureTextFile_docURL = m_fsCaptionFilesDirName / aStdStr_EncodedDocPathURL;
std::string aCaptionPureTextFileStr_docURL = fsCaptionPureTextFile_docURL.native_file_string();
- FILE* pFile_docURL = fopen( aCaptionPureTextFileStr_docURL.c_str(), "w" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile_docURL = _wfopen(
+ fsCaptionPureTextFile_docURL.native_file_string_w(), L"w" );
+#else
+ FILE* pFile_docURL = fopen(
+ fsCaptionPureTextFile_docURL.native_file_string().c_str(), "w" );
+#endif
if( pFile_docURL )
{
fprintf( pFile_docURL, "%s\n", pResNodeCaption->content );
@@ -140,8 +146,13 @@ void IndexerPreProcessor::processDocument
if( pResNodeContent )
{
fs::path fsContentPureTextFile_docURL = m_fsContentFilesDirName / aStdStr_EncodedDocPathURL;
- std::string aContentPureTextFileStr_docURL = fsContentPureTextFile_docURL.native_file_string();
- FILE* pFile_docURL = fopen( aContentPureTextFileStr_docURL.c_str(), "w" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile_docURL = _wfopen(
+ fsContentPureTextFile_docURL.native_file_string_w(), L"w" );
+#else
+ FILE* pFile_docURL = fopen(
+ fsContentPureTextFile_docURL.native_file_string().c_str(), "w" );
+#endif
if( pFile_docURL )
{
fprintf( pFile_docURL, "%s\n", pResNodeContent->content );
@@ -231,9 +242,13 @@ public:
}
}
- void dump_DBHelp( const std::string& rFileName )
+ void dump_DBHelp( const fs::path& rFileName )
{
- FILE* pFile = fopen( rFileName.c_str(), "wb" );
+#ifdef WNT //We need _wfopen to support long file paths on Windows XP
+ FILE* pFile = _wfopen( rFileName.native_file_string_w(), L"wb" );
+#else
+ FILE* pFile = fopen( rFileName.native_file_string().c_str(), "wb" );
+#endif
if( pFile == NULL )
return;
@@ -422,9 +437,15 @@ void HelpLinker::link() throw( HelpProcessingException )
#endif
fs::path helpTextFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".ht_" : ".ht")));
+#ifdef WNT
+ //We need _wfopen to support long file paths on Windows XP
+ FILE* pFileHelpText_DBHelp = _wfopen
+ ( helpTextFileName_DBHelp.native_file_string_w(), L"wb" );
+#else
+
FILE* pFileHelpText_DBHelp = fopen
( helpTextFileName_DBHelp.native_file_string().c_str(), "wb" );
-
+#endif
DB* dbBase(0);
#ifndef DBHELP_ONLY
fs::path dbBaseFileName(indexDirParentName / (mod + ".db"));
@@ -434,8 +455,14 @@ void HelpLinker::link() throw( HelpProcessingException )
#endif
fs::path dbBaseFileName_DBHelp(indexDirParentName / (mod + (bUse_ ? ".db_" : ".db")));
+#ifdef WNT
+ //We need _wfopen to support long file paths on Windows XP
+ FILE* pFileDbBase_DBHelp = _wfopen
+ ( dbBaseFileName_DBHelp.native_file_string_w(), L"wb" );
+#else
FILE* pFileDbBase_DBHelp = fopen
( dbBaseFileName_DBHelp.native_file_string().c_str(), "wb" );
+#endif
#ifndef DBHELP_ONLY
DB* keyWord(0);
@@ -677,7 +704,7 @@ void HelpLinker::link() throw( HelpProcessingException )
if( pFileDbBase_DBHelp != NULL )
fclose( pFileDbBase_DBHelp );
- helpKeyword.dump_DBHelp( keyWordFileName_DBHelp.native_file_string() );
+ helpKeyword.dump_DBHelp( keyWordFileName_DBHelp);
if( !bExtensionMode )
{
diff --git a/rsc/source/rscpp/cpp4.c b/rsc/source/rscpp/cpp4.c
index fe7de9156cb6..3f5e03a0b5b7 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -626,7 +626,7 @@ void dumpparm(char* why)
nargs, parmp - parm, why);
for (i = 0; i < nargs; i++) {
fprintf( pCppOut, "parm[%d] (%d) = \"%s\"\n",
- i + 1, strlen(parlist[i]), parlist[i]);
+ i + 1, (int)strlen(parlist[i]), parlist[i]);
}
}
#endif
diff --git a/rsc/source/tools/rscchar.cxx b/rsc/source/tools/rscchar.cxx
index 3031ff668bb8..f110a260de27 100644
--- a/rsc/source/tools/rscchar.cxx
+++ b/rsc/source/tools/rscchar.cxx
@@ -52,13 +52,13 @@
*************************************************************************/
char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
{
- sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1;
- char * pOrgStr = new char[ nMaxUniCodeBuf ];
- sal_uInt32 nOrgLen = 0;
-
+ sal_Size nMaxUniCodeBuf = strlen( pStr ) + 1;
if( nMaxUniCodeBuf * 6 > 0x0FFFFF )
RscExit( 10 );
+ char * pOrgStr = new char[ nMaxUniCodeBuf ];
+ sal_uInt32 nOrgLen = 0;
+
char cOld = '1';
while( cOld != 0 )
{
@@ -116,9 +116,8 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
}
if( nChar > 255 )
{
- rtl_freeMemory( pOrgStr );
-
// Wert zu gross, oder kein 3 Ziffern
+ delete [] pOrgStr;
return( NULL );
}
c = (char)nChar;
@@ -171,6 +170,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
&nSrcCvtBytes );
rtl_destroyTextToUnicodeConverter( hConv );
+ delete[] pOrgStr, pOrgStr = 0;
hConv = rtl_createUnicodeToTextConverter( RTL_TEXTENCODING_UTF8 );
// factor fo 6 is the maximum size of an UNICODE character as utf8
@@ -185,9 +185,7 @@ char * RscChar::MakeUTF8( char * pStr, sal_uInt16 nTextEncoding )
&nSrcCvtBytes );
rtl_destroyTextToUnicodeConverter( hConv );
-
- delete[] pUniCode;
- delete[] pOrgStr;
+ delete[] pUniCode, pUniCode = 0;
return pUtf8;
};
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 654f456c5e10..db861fb93911 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -160,6 +160,7 @@ class EasyFat
public:
EasyFat( StgIo & rIo, StgStrm *pFatStream, sal_Int32 nPSize );
~EasyFat() { delete[] pFat; delete[] pFree; }
+
sal_Int32 GetPageSize() { return nPageSize; }
sal_Int32 Count() { return nPages; }
sal_Int32 operator[]( sal_Int32 nOffset ) { return pFat[ nOffset ]; }
@@ -387,5 +388,4 @@ sal_uLong StgIo::ValidateFATs()
return FAT_OK;
}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ \ No newline at end of file
diff --git a/svl/qa/complex/passwordcontainer/makefile.mk b/svl/qa/complex/passwordcontainer/makefile.mk
new file mode 100644
index 000000000000..625404682761
--- /dev/null
+++ b/svl/qa/complex/passwordcontainer/makefile.mk
@@ -0,0 +1,134 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../../..
+PRJNAME = svl
+TARGET = qa_complex_passwordcontainer
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/passwordcontainer
+
+# here store only Files which contain a @Test
+JAVATESTFILES = \
+ PasswordContainerUnitTest.java
+
+
+# put here all other files
+JAVAFILES = $(JAVATESTFILES) \
+ PasswordContainerTest.java\
+ Test01.java\
+ Test02.java\
+ Test03.java\
+ TestHelper.java\
+ MasterPasswdHandler.java
+
+
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+
+# Sample how to debug
+# JAVAIFLAGS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=9003,suspend=y
+
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
+
+
+#
+#
+#
+#
+# PRJ = ..$/..$/..
+# TARGET = PasswordContainerUnitTest
+# PRJNAME=svl
+# PACKAGE = complex$/passwordcontainer
+#
+# # --- Settings -----------------------------------------------------
+# .INCLUDE: settings.mk
+#
+#
+# #----- compile .java files -----------------------------------------
+#
+# JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
+#
+# JAVAFILES =\
+# PasswordContainerUnitTest.java\
+# PasswordContainerTest.java\
+# TestHelper.java\
+# Test01.java\
+# Test02.java\
+# Test03.java\
+# MasterPasswdHandler.java
+#
+# JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
+#
+# #----- make a jar from compiled files ------------------------------
+#
+# MAXLINELENGTH = 100000
+#
+# JARCLASSDIRS = $(PACKAGE)
+# JARTARGET = $(TARGET).jar
+# JARCOMPRESS = TRUE
+#
+# # --- Parameters for the test --------------------------------------
+#
+# # start an office if the parameter is set for the makefile
+# .IF "$(OFFICE)" == ""
+# CT_APPEXECCOMMAND =
+# .ELSE
+# CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
+# .ENDIF
+#
+# # test base is java complex
+# CT_TESTBASE = -TestBase java_complex
+#
+# # test looks something like the.full.package.TestName
+# CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+#
+# # start the runner application
+# CT_APP = org.openoffice.Runner
+#
+# # --- Targets ------------------------------------------------------
+#
+# .INCLUDE: target.mk
+#
+# RUN: run
+#
+# run:
+# +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
+#
+#
diff --git a/svtools/qa/unoapi/makefile.mk b/svtools/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..e3afb77e637a
--- /dev/null
+++ b/svtools/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# 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.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = svtools
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/svtools/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 94e26128bb22..a543343ed59e 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -682,6 +682,7 @@ SvViewDataEntry::~SvViewDataEntry()
SvLBox_Impl::SvLBox_Impl( SvLBox& _rBox )
:m_bIsEmptyTextAllowed( true )
,m_bEntryMnemonicsEnabled( false )
+ ,m_bDoingQuickSelection( false )
,m_pLink( NULL )
,m_aMnemonicEngine( _rBox )
,m_aQuickSelectionEngine( _rBox )
diff --git a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
index fddeec1f0482..fddeec1f0482 100644..100755
--- a/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
+++ b/svtools/source/filter.vcl/filter/FilterConfigItem.cxx
diff --git a/toolkit/inc/toolkit/controls/dialogcontrol.hxx b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
index 17b958aeace9..9c0ffa3b78fb 100644
--- a/toolkit/inc/toolkit/controls/dialogcontrol.hxx
+++ b/toolkit/inc/toolkit/controls/dialogcontrol.hxx
@@ -30,12 +30,13 @@
#include <toolkit/controls/controlmodelcontainerbase.hxx>
#include <com/sun/star/awt/XTopWindow.hpp>
-#include <com/sun/star/awt/XDialog.hpp>
+#include <com/sun/star/awt/XDialog2.hpp>
#include <com/sun/star/resource/XStringResourceResolver.hpp>
#include "toolkit/helper/servicenames.hxx"
#include "toolkit/helper/macros.hxx"
#include <toolkit/controls/unocontrolcontainer.hxx>
#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/implbase3.hxx>
#include <list>
// ----------------------------------------------------
@@ -64,10 +65,12 @@ public:
};
-class UnoDialogControl :public ControlContainerBase,
- public ::com::sun::star::awt::XTopWindow,
- public ::com::sun::star::awt::XDialog,
- public ::com::sun::star::awt::XWindowListener
+typedef ::cppu::AggImplInheritanceHelper3 < ControlContainerBase
+ , ::com::sun::star::awt::XTopWindow
+ , ::com::sun::star::awt::XDialog2
+ , ::com::sun::star::awt::XWindowListener
+ > UnoDialogControl_Base;
+class UnoDialogControl : public UnoDialogControl_Base
{
private:
::com::sun::star::uno::Reference< ::com::sun::star::awt::XMenuBar > mxMenuBar;
@@ -80,11 +83,6 @@ public:
~UnoDialogControl();
::rtl::OUString GetComponentServiceName();
- ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { return UnoControlContainer::queryInterface(rType); }
- ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
- void SAL_CALL acquire() throw() { OWeakAggObject::acquire(); }
- void SAL_CALL release() throw() { OWeakAggObject::release(); }
-
void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
@@ -102,16 +100,16 @@ public:
virtual void SAL_CALL windowShown( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL windowHidden( const ::com::sun::star::lang::EventObject& e ) throw (::com::sun::star::uno::RuntimeException);
+ // ::com::sun::star::awt::XDialog2
+ virtual void SAL_CALL endDialog( ::sal_Int32 Result ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setHelpId( const rtl::OUString& Id ) throw (::com::sun::star::uno::RuntimeException);
+
// ::com::sun::star::awt::XDialog
void SAL_CALL setTitle( const ::rtl::OUString& Title ) throw(::com::sun::star::uno::RuntimeException);
::rtl::OUString SAL_CALL getTitle() throw(::com::sun::star::uno::RuntimeException);
sal_Int16 SAL_CALL execute() throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL endExecute() throw(::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XTypeProvider
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw(::com::sun::star::uno::RuntimeException);
- ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(::com::sun::star::uno::RuntimeException);
-
// ::com::sun::star::awt::XControl
sal_Bool SAL_CALL setModel( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& Model ) throw(::com::sun::star::uno::RuntimeException);
diff --git a/toolkit/qa/unoapi/makefile.mk b/toolkit/qa/unoapi/makefile.mk
new file mode 100644
index 000000000000..9517601c3917
--- /dev/null
+++ b/toolkit/qa/unoapi/makefile.mk
@@ -0,0 +1,48 @@
+#*************************************************************************
+# 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.
+#***********************************************************************/
+
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
+.ELSE
+
+PRJ = ../..
+PRJNAME = toolkit
+TARGET = qa_unoapi
+
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = org/openoffice/toolkit/qa/unoapi
+JAVATESTFILES = Test.java
+JAVAFILES = $(JAVATESTFILES)
+JARFILES = OOoRunner.jar ridl.jar test.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+
+.INCLUDE: settings.mk
+.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
+
+ALLTAR : javatest
+
+.END
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 85bcf95062eb..307e1b61bfb2 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -165,7 +165,7 @@ Reference< XPropertySetInfo > UnoControlDialogModel::getPropertySetInfo( ) thro
// ============================================================================
UnoDialogControl::UnoDialogControl( const uno::Reference< lang::XMultiServiceFactory >& i_factory )
- :ControlContainerBase( i_factory )
+ :UnoDialogControl_Base( i_factory )
,maTopWindowListeners( *this )
,mbWindowListener(false)
{
@@ -188,25 +188,6 @@ UnoDialogControl::~UnoDialogControl()
return ::rtl::OUString::createFromAscii( "TabPage" );
}
-// XInterface
-Any UnoDialogControl::queryAggregation( const Type & rType ) throw(RuntimeException)
-{
- uno::Any aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XTopWindow*, this ) );
- if ( !aRet.hasValue() )
- aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XDialog*, this ) );
- if ( !aRet.hasValue() )
- aRet = ::cppu::queryInterface( rType, SAL_STATIC_CAST( awt::XWindowListener*, this ) );
- return (aRet.hasValue() ? aRet : ControlContainerBase::queryAggregation( rType ));
-}
-
- //lang::XTypeProvider
-IMPL_XTYPEPROVIDER_START( UnoDialogControl)
- getCppuType( ( uno::Reference< awt::XTopWindow>* ) NULL ),
- getCppuType( ( uno::Reference< awt::XDialog>* ) NULL ),
- getCppuType( ( uno::Reference< awt::XWindowListener>* ) NULL ),
- ControlContainerBase::getTypes()
-IMPL_XTYPEPROVIDER_END
-
void UnoDialogControl::dispose() throw(RuntimeException)
{
SolarMutexGuard aGuard;
@@ -409,18 +390,30 @@ throw (::com::sun::star::uno::RuntimeException)
}
}
-void SAL_CALL UnoDialogControl::windowShown( const ::com::sun::star::lang::EventObject& e )
-throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL UnoDialogControl::windowShown( const EventObject& e ) throw (RuntimeException)
{
(void)e;
}
-void SAL_CALL UnoDialogControl::windowHidden( const ::com::sun::star::lang::EventObject& e )
-throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL UnoDialogControl::windowHidden( const EventObject& e ) throw (RuntimeException)
{
(void)e;
}
+void SAL_CALL UnoDialogControl::endDialog( ::sal_Int32 i_result ) throw (RuntimeException)
+{
+ Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
+ if ( xPeerDialog.is() )
+ xPeerDialog->endDialog( i_result );
+}
+
+void SAL_CALL UnoDialogControl::setHelpId( const rtl::OUString& i_id ) throw (RuntimeException)
+{
+ Reference< XDialog2 > xPeerDialog( getPeer(), UNO_QUERY );
+ if ( xPeerDialog.is() )
+ xPeerDialog->setHelpId( i_id );
+}
+
void UnoDialogControl::setTitle( const ::rtl::OUString& Title ) throw(RuntimeException)
{
SolarMutexGuard aGuard;
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index 6626a984abec..3d75f94437cd 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -79,7 +79,7 @@ typedef void (*DbgTestSolarMutexProc)();
#define DBG_OUT_MSGBOX 4
#define DBG_OUT_TESTTOOL 5
#define DBG_OUT_DEBUGGER 6
-#define DBG_OUT_COREDUMP 7
+#define DBG_OUT_ABORT 7
#define DBG_OUT_COUNT 8
@@ -136,6 +136,7 @@ struct DbgDataType
#define DBG_FUNC_GETPRINTMSGBOX 17
#define DBG_FUNC_FILTERMESSAGE 18 // new for #i38967
#define DBG_FUNC_UPDATEOSLHOOK 19
+#define DBG_FUNC_SET_ABORT 20
TOOLS_DLLPUBLIC void* DbgFunc( sal_uInt16 nAction, void* pData = NULL );
@@ -179,6 +180,11 @@ inline void DbgSetPrintTestTool( DbgPrintLine pProc )
DbgFunc( DBG_FUNC_SETPRINTTESTTOOL, (void*)(long)pProc );
}
+inline void DbgSetAbort( DbgPrintLine pProc )
+{
+ DbgFunc( DBG_FUNC_SET_ABORT, (void*)(long)pProc );
+}
+
typedef sal_uInt16 DbgChannelId;
/** registers a user-defined channel for emitting the diagnostic messages
diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx
index 6bd13859c80f..0d8187882416 100644
--- a/tools/inc/tools/mempool.hxx
+++ b/tools/inc/tools/mempool.hxx
@@ -29,7 +29,7 @@
#define _SVMEMPOOL_HXX
#include "tools/toolsdllapi.h"
-#include <tools/solar.h>
+#include "tools/solar.h"
// ----------------
// - FixedMemPool -
@@ -40,9 +40,11 @@ struct FixedMemPool_Impl;
class TOOLS_DLLPUBLIC FixedMemPool
{
FixedMemPool_Impl * m_pImpl;
+ char const * m_pTypeName;
public:
- FixedMemPool( sal_uInt16 nTypeSize,
+ FixedMemPool( char const * pTypeName,
+ sal_uInt16 nTypeSize,
sal_uInt16 nInitSize = 512,
sal_uInt16 nGrowSize = 256 );
~FixedMemPool();
@@ -98,8 +100,11 @@ IMPL_FIXEDMEMPOOL_DEL_BODY( Class, aPool )
DECL_FIXEDMEMPOOL_NEW_INLINE( Class, aPool ) \
DECL_FIXEDMEMPOOL_DEL_INLINE( Class, aPool )
+#define IMPL_FIXEDMEMPOOL_STRING(x) IMPL_FIXEDMEMPOOL_MAKESTRING(x)
+#define IMPL_FIXEDMEMPOOL_MAKESTRING(x) #x
+
#define IMPL_FIXEDMEMPOOL_NEWDEL( Class, InitSize, GrowSize) \
- FixedMemPool Class::aPool( sizeof( Class ), (InitSize), (GrowSize) );
+ FixedMemPool Class::aPool( IMPL_FIXEDMEMPOOL_STRING( Class ), sizeof( Class ), (InitSize), (GrowSize) );
#define DECL_FIXEDMEMPOOL_NEWDEL_DLL( Class ) \
private: \
@@ -109,14 +114,14 @@ IMPL_FIXEDMEMPOOL_DEL_BODY( Class, aPool )
DECL_FIXEDMEMPOOL_DEL_DECL();
#define IMPL_FIXEDMEMPOOL_NEWDEL_DLL( Class, InitSize, GrowSize) \
- FixedMemPool Class::aPool( sizeof( Class ), (InitSize), (GrowSize) ); \
+ FixedMemPool Class::aPool( IMPL_FIXEDMEMPOOL_STRING( Class ), sizeof( Class ), (InitSize), (GrowSize) ); \
DECL_FIXEDMEMPOOL_NEW_IMPL( Class ) \
IMPL_FIXEDMEMPOOL_NEW_BODY( Class, aPool ) \
DECL_FIXEDMEMPOOL_DEL_IMPL( Class ) \
IMPL_FIXEDMEMPOOL_DEL_BODY( Class, aPool )
-#define INIT_FIXEDMEMPOOL_NEWDEL_DLL( class, aPool, InitSize, GrowSize ) \
- aPool( sizeof( class ), InitSize, GrowSize )
+#define INIT_FIXEDMEMPOOL_NEWDEL_DLL( Class, aPool, InitSize, GrowSize ) \
+ aPool( IMPL_FIXEDMEMPOOL_STRING( Class ), sizeof( Class ), (InitSize), (GrowSize) )
#endif // _SVMEMPOOL_HXX
diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index c65745e65be0..7f28c58a5390 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -154,6 +154,7 @@ struct DebugData
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool;
+ DbgPrintLine pDbgAbort;
::std::vector< DbgPrintLine >
aDbgPrintUserChannels;
PointerList* pProfList;
@@ -165,9 +166,10 @@ struct DebugData
DebugData()
:bInit( sal_False )
- ,pDbgPrintMsgBox( sal_False )
+ ,pDbgPrintMsgBox( NULL )
,pDbgPrintWindow( NULL )
,pDbgPrintTestTool( NULL )
+ ,pDbgAbort( NULL )
,pProfList( NULL )
,pXtorList( NULL )
,pDbgTestSolarMutex( NULL )
@@ -426,7 +428,7 @@ namespace
{
const sal_Char* names[ DBG_OUT_COUNT ] =
{
- "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "coredump"
+ "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "abort"
};
lcl_writeConfigString( _pFile, _pKeyName, names[ _nValue ] );
}
@@ -477,26 +479,30 @@ namespace
if ( nValueLen )
*_out_pnValue = strcmp( aBuf, "1" ) == 0 ? sal_True : sal_False;
}
- void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
+ void lcl_matchOutputChannel( sal_Char const * i_buffer, sal_uIntPtr* o_value )
{
+ if ( i_buffer == NULL )
+ return;
const sal_Char* names[ DBG_OUT_COUNT ] =
{
- "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "coredump"
+ "dev/null", "file", "window", "shell", "messagebox", "testtool", "debugger", "abort"
};
- sal_Char aBuf[20];
- size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
- if ( nValueLen )
+ for ( size_t name = 0; name < SAL_N_ELEMENTS( names ); ++name )
{
- for ( size_t name = 0; name < SAL_N_ELEMENTS( names ); ++name )
+ if ( strcmp( i_buffer, names[ name ] ) == 0 )
{
- if ( strcmp( aBuf, names[ name ] ) == 0 )
- {
- *_out_pnValue = name;
- return;
- }
+ *o_value = name;
+ return;
}
}
}
+ void lcl_tryReadOutputChannel( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnValue )
+ {
+ sal_Char aBuf[20];
+ size_t nValueLen = lcl_tryReadConfigString( _pLine, _nLineLen, _pKeyName, aBuf, sizeof( aBuf ) );
+ if ( nValueLen )
+ lcl_matchOutputChannel( aBuf, _out_pnValue );
+ }
void lcl_tryReadConfigFlag( const sal_Char* _pLine, size_t _nLineLen, const sal_Char* _pKeyName, sal_uIntPtr* _out_pnAllFlags, sal_uIntPtr _nCheckFlag )
{
sal_Char aBuf[2];
@@ -819,6 +825,13 @@ static DebugData* GetDebugData()
FileClose( pIniFile );
}
+ else
+ {
+ lcl_matchOutputChannel( getenv( "DBGSV_TRACE_OUT" ), &aDebugData.aDbgData.nTraceOut );
+ lcl_matchOutputChannel( getenv( "DBGSV_WARNING_OUT" ), &aDebugData.aDbgData.nWarningOut );
+ lcl_matchOutputChannel( getenv( "DBGSV_ERROR_OUT" ), &aDebugData.aDbgData.nErrorOut );
+
+ }
getcwd( aCurPath, sizeof( aCurPath ) );
@@ -1207,6 +1220,10 @@ void* DbgFunc( sal_uInt16 nAction, void* pParam )
pDebugData->pDbgPrintTestTool = (DbgPrintLine)(long)pParam;
break;
+ case DBG_FUNC_SET_ABORT:
+ pDebugData->pDbgAbort = (DbgPrintLine)(long)pParam;
+ break;
+
case DBG_FUNC_SAVEDATA:
{
const DbgData* pData = static_cast< const DbgData* >( pParam );
@@ -1714,10 +1731,11 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa
nOut = DBG_OUT_DEBUGGER;
}
- if ( nOut == DBG_OUT_COREDUMP )
+ if ( nOut == DBG_OUT_ABORT )
{
- if ( !ImplCoreDump() )
- nOut = DBG_OUT_DEBUGGER;
+ if ( pData->pDbgAbort != NULL )
+ pData->pDbgAbort( aBufOut );
+ abort();
}
if ( nOut == DBG_OUT_DEBUGGER )
diff --git a/tools/source/memtools/mempool.cxx b/tools/source/memtools/mempool.cxx
index 006c5de7b6e0..55856d90bc0f 100755
--- a/tools/source/memtools/mempool.cxx
+++ b/tools/source/memtools/mempool.cxx
@@ -29,7 +29,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_tools.hxx"
-#include <tools/mempool.hxx>
+#include "tools/mempool.hxx"
+#include "osl/diagnose.h"
#include "rtl/alloc.h"
#include <stdio.h>
@@ -41,11 +42,13 @@
*************************************************************************/
FixedMemPool::FixedMemPool (
- sal_uInt16 _nTypeSize, sal_uInt16, sal_uInt16)
+ char const * pTypeName, sal_uInt16 nTypeSize, sal_uInt16, sal_uInt16)
+ : m_pTypeName (pTypeName)
{
char name[RTL_CACHE_NAME_LENGTH + 1];
- snprintf (name, sizeof(name), "FixedMemPool_%d", (int)_nTypeSize);
- m_pImpl = (FixedMemPool_Impl*)rtl_cache_create (name, _nTypeSize, 0, NULL, NULL, NULL, 0, NULL, 0);
+ snprintf (name, sizeof(name), "FixedMemPool_%d", (int)nTypeSize);
+ m_pImpl = (FixedMemPool_Impl*)rtl_cache_create (name, nTypeSize, 0, NULL, NULL, NULL, 0, NULL, 0);
+ OSL_TRACE("FixedMemPool::ctor(\"%s\"): %p", m_pTypeName, m_pImpl);
}
/*************************************************************************
@@ -56,7 +59,8 @@ FixedMemPool::FixedMemPool (
FixedMemPool::~FixedMemPool()
{
- rtl_cache_destroy ((rtl_cache_type*)(m_pImpl));
+ OSL_TRACE("FixedMemPool::dtor(\"%s\"): %p", m_pTypeName, m_pImpl);
+ rtl_cache_destroy ((rtl_cache_type*)(m_pImpl)), m_pImpl = 0;
}
/*************************************************************************
diff --git a/tools/workben/makefile.mk b/tools/workben/makefile.mk
new file mode 100644
index 000000000000..d97156c7f66c
--- /dev/null
+++ b/tools/workben/makefile.mk
@@ -0,0 +1,68 @@
+#*************************************************************************
+#
+# 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.
+#
+#*************************************************************************
+
+PRJ = ..
+PRJNAME = tools
+TARGET = workben
+LIBTARGET = NO
+TARGETTYPE = CUI
+ENABLE_EXCEPTIONS=TRUE
+
+.INCLUDE: settings.mk
+
+OBJFILES = \
+ $(OBJ)$/solar.obj \
+ $(OBJ)$/urltest.obj \
+ $(OBJ)$/inetmimetest.obj \
+ $(OBJ)$/mempooltest.obj
+
+APP1TARGET = solar
+APP1OBJS = $(OBJ)$/solar.obj
+.IF "$(GUI)" == "UNX" || "$(GUI)" == "OS2"
+APP1STDLIBS = $(TOOLSLIB)
+.ELSE
+APP1LIBS = $(LB)$/itools.lib
+.ENDIF
+
+APP2TARGET = urltest
+APP2OBJS = $(OBJ)$/urltest.obj
+.IF "$(GUI)" == "UNX" || "$(GUI)" == "OS2"
+APP2STDLIBS = $(TOOLSLIB) $(VOSLIB) $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB)
+.ELSE
+APP2STDLIBS = $(LB)$/itools.lib $(VOSLIB) $(SALLIB) $(CPPULIB) $(CPPUHELPERLIB)
+.ENDIF
+
+APP3TARGET = inetmimetest
+APP3OBJS = $(OBJ)$/inetmimetest.obj
+APP3STDLIBS = $(SALLIB) $(TOOLSLIB)
+
+APP4TARGET = mempooltest
+APP4OBJS = $(OBJ)$/mempooltest.obj
+APP4STDLIBS = $(TOOLSLIB)
+APP4RPATH = UREBIN
+
+.INCLUDE: target.mk
diff --git a/tools/workben/mempooltest.cxx b/tools/workben/mempooltest.cxx
new file mode 100644
index 000000000000..bf00343bc9d6
--- /dev/null
+++ b/tools/workben/mempooltest.cxx
@@ -0,0 +1,18 @@
+#include "tools/mempool.hxx"
+
+struct MempoolTest
+{
+ int m_int;
+
+ DECL_FIXEDMEMPOOL_NEWDEL(MempoolTest);
+};
+
+IMPL_FIXEDMEMPOOL_NEWDEL(MempoolTest, 0, 0);
+
+int main()
+{
+ MempoolTest * p = new MempoolTest();
+ if (p != 0)
+ delete p;
+ return 1;
+}
diff --git a/vcl/aqua/inc/salframeview.h b/vcl/aqua/inc/salframeview.h
index 1df070829fc7..f28eb17f4e10 100644
--- a/vcl/aqua/inc/salframeview.h
+++ b/vcl/aqua/inc/salframeview.h
@@ -86,6 +86,7 @@
}
+(void)unsetMouseFrame: (AquaSalFrame*)pFrame;
-(id)initWithSalFrame: (AquaSalFrame*)pFrame;
+-(AquaSalFrame*)getSalFrame;
-(BOOL)acceptsFirstResponder;
-(BOOL)acceptsFirstMouse: (NSEvent *)pEvent;
-(BOOL)isOpaque;
diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx
index 1fb6b9bb2d53..e0318b405163 100644
--- a/vcl/aqua/source/dtrans/DropTarget.cxx
+++ b/vcl/aqua/source/dtrans/DropTarget.cxx
@@ -49,6 +49,8 @@
#include <Carbon/Carbon.h>
#include <postmac.h>
+#include <salframe.h>
+#include <salframeview.h>
using namespace cppu;
using namespace osl;
@@ -58,6 +60,7 @@ using namespace com::sun::star::datatransfer::dnd::DNDConstants;
using namespace com::sun::star::datatransfer::clipboard;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
+using namespace com::sun::star;
using namespace comphelper;
using ::rtl::OUString;
@@ -149,6 +152,8 @@ namespace /* private */
DropTarget::DropTarget() :
WeakComponentImplHelper5<XInitialization, XDropTarget, XDropTargetDragContext, XDropTargetDropContext, XServiceInfo>(m_aMutex),
+ mView(nil),
+ mpFrame(NULL),
mDropTargetHelper(nil),
mbActive(false),
mDragSourceSupportedActions(DNDConstants::ACTION_NONE),
@@ -161,8 +166,9 @@ DropTarget::DropTarget() :
DropTarget::~DropTarget()
{
- [(id <DraggingDestinationHandler>)mView unregisterDraggingDestinationHandler:mDropTargetHelper];
- [mDropTargetHelper release];
+ if( AquaSalFrame::isAlive( mpFrame ) )
+ [(id <DraggingDestinationHandler>)mView unregisterDraggingDestinationHandler:mDropTargetHelper];
+ [mDropTargetHelper release];
}
@@ -243,7 +249,7 @@ NSDragOperation DropTarget::draggingEntered(id sender)
NSPasteboard* dragPboard = [sender draggingPasteboard];
mXCurrentDragClipboard = new AquaClipboard(dragPboard, false);
- Reference<XTransferable> xTransferable = DragSource::g_XTransferable.is() ?
+ uno::Reference<XTransferable> xTransferable = DragSource::g_XTransferable.is() ?
DragSource::g_XTransferable : mXCurrentDragClipboard->getContents();
DropTargetDragEnterEvent dtdee(static_cast<OWeakObject*>(this),
@@ -333,7 +339,7 @@ BOOL DropTarget::performDragOperation(id sender)
if (mSelectedDropAction != DNDConstants::ACTION_NONE)
{
- Reference<XTransferable> xTransferable = DragSource::g_XTransferable;
+ uno::Reference<XTransferable> xTransferable = DragSource::g_XTransferable;
if (!DragSource::g_XTransferable.is())
{
@@ -370,7 +376,7 @@ BOOL DropTarget::performDragOperation(id sender)
{
mDragSourceSupportedActions = DNDConstants::ACTION_NONE;
mSelectedDropAction = DNDConstants::ACTION_NONE;
- mXCurrentDragClipboard = Reference<XClipboard>();
+ mXCurrentDragClipboard = uno::Reference<XClipboard>();
SetThemeCursor(kThemeArrowCursor);
}
@@ -396,6 +402,7 @@ BOOL DropTarget::performDragOperation(id sender)
sal_uInt64 tmp = 0;
pNSView >>= tmp;
mView = (id)tmp;
+ mpFrame = [(SalFrameView*)mView getSalFrame];
mDropTargetHelper = [[DropTargetHelper alloc] initWithDropTarget: this];
@@ -415,14 +422,14 @@ BOOL DropTarget::performDragOperation(id sender)
}
- void SAL_CALL DropTarget::addDropTargetListener(const Reference<XDropTargetListener>& dtl)
+ void SAL_CALL DropTarget::addDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException)
{
rBHelper.addListener(::getCppuType(&dtl), dtl);
}
- void SAL_CALL DropTarget::removeDropTargetListener(const Reference<XDropTargetListener>& dtl)
+ void SAL_CALL DropTarget::removeDropTargetListener(const uno::Reference<XDropTargetListener>& dtl)
throw(RuntimeException)
{
rBHelper.removeListener(::getCppuType(&dtl), dtl);
@@ -486,7 +493,7 @@ BOOL DropTarget::performDragOperation(id sender)
{
// Reset the internal transferable used as shortcut in case this is
// an internal D&D operation
- DragSource::g_XTransferable = Reference<XTransferable>();
+ DragSource::g_XTransferable = uno::Reference<XTransferable>();
DragSource::g_DropSuccessSet = true;
DragSource::g_DropSuccess = success;
}
@@ -494,13 +501,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_drop( const DropTargetDropEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->drop( dte); }
catch(RuntimeException&) {}
@@ -511,13 +518,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragEnter(const DropTargetDragEnterEvent& e)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragEnter( e); }
catch (RuntimeException&) {}
@@ -528,14 +535,14 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragExit(const DropTargetEvent& dte)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragExit( dte); }
catch (RuntimeException&) {}
@@ -546,13 +553,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dragOver(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer );
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dragOver( dtde); }
catch (RuntimeException&) {}
@@ -563,13 +570,13 @@ BOOL DropTarget::performDragOperation(id sender)
void DropTarget::fire_dropActionChanged(const DropTargetDragEvent& dtde)
{
- OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (Reference<XDropTargetListener>* )0 ) );
+ OInterfaceContainerHelper* pContainer= rBHelper.getContainer( getCppuType( (uno::Reference<XDropTargetListener>* )0 ) );
if( pContainer)
{
OInterfaceIteratorHelper iter( *pContainer);
while( iter.hasMoreElements())
{
- Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
+ uno::Reference<XDropTargetListener> listener( static_cast<XDropTargetListener*>( iter.next()));
try { listener->dropActionChanged( dtde); }
catch (RuntimeException&) {}
diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx
index 293db4d4eb39..2ec1674a13df 100644
--- a/vcl/aqua/source/dtrans/DropTarget.hxx
+++ b/vcl/aqua/source/dtrans/DropTarget.hxx
@@ -50,6 +50,7 @@
#include <postmac.h>
class DropTarget;
+class AquaSalFrame;
/* The functions declared in this protocol are actually
declared in vcl/aqua/inc/salframe.h. Because we want
@@ -158,6 +159,7 @@ private:
com::sun::star::uno::Reference< com::sun::star::datatransfer::clipboard::XClipboard > mXCurrentDragClipboard;
DataFlavorMapperPtr_t mDataFlavorMapper;
id mView;
+ AquaSalFrame* mpFrame;
DropTargetHelper* mDropTargetHelper;
bool mbActive;
sal_Int8 mDragSourceSupportedActions;
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 3e25d9eb111d..18377308c91d 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -832,12 +832,24 @@ void AquaSalInfoPrinter::InitPaperFormats( const ImplJobSetup* i_pSetupData )
for( unsigned int i = 0; i < nPapers; i++ )
{
NSString* pPaper = [pPaperNames objectAtIndex: i];
- NSSize aPaperSize = [mpPrinter pageSizeForPaper: pPaper];
- if( aPaperSize.width > 0 && aPaperSize.height > 0 )
+ // first try to match the name
+ rtl::OString aPaperName( [pPaper UTF8String] );
+ Paper ePaper = PaperInfo::fromPSName( aPaperName );
+ if( ePaper != PAPER_USER )
{
- PaperInfo aInfo( PtTo10Mu( aPaperSize.width ),
- PtTo10Mu( aPaperSize.height ) );
- m_aPaperFormats.push_back( aInfo );
+ m_aPaperFormats.push_back( PaperInfo( ePaper ) );
+ }
+ else
+ {
+ NSSize aPaperSize = [mpPrinter pageSizeForPaper: pPaper];
+ if( aPaperSize.width > 0 && aPaperSize.height > 0 )
+ {
+ PaperInfo aInfo( PtTo10Mu( aPaperSize.width ),
+ PtTo10Mu( aPaperSize.height ) );
+ if( aInfo.getPaper() == PAPER_USER )
+ aInfo.doSloppyFit();
+ m_aPaperFormats.push_back( aInfo );
+ }
}
}
}
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index a72810986c76..57d605bed1ce 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -399,6 +399,11 @@ static AquaSalFrame* getMouseContainerFrame()
return self;
}
+-(AquaSalFrame*)getSalFrame
+{
+ return mpFrame;
+}
+
-(void)resetCursorRects
{
if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
diff --git a/vcl/inc/vcl/cursor.hxx b/vcl/inc/vcl/cursor.hxx
index 8a6ecf482413..46f17b367412 100644
--- a/vcl/inc/vcl/cursor.hxx
+++ b/vcl/inc/vcl/cursor.hxx
@@ -69,8 +69,8 @@ public:
SAL_DLLPRIVATE void ImplDraw();
SAL_DLLPRIVATE void ImplRestore();
DECL_DLLPRIVATE_LINK( ImplTimerHdl, AutoTimer* );
- SAL_DLLPRIVATE void ImplShow( sal_Bool bDrawDirect = sal_True );
- SAL_DLLPRIVATE void ImplHide();
+ SAL_DLLPRIVATE void ImplShow( bool bDrawDirect = true, bool bRestore = false );
+ SAL_DLLPRIVATE bool ImplHide();
SAL_DLLPRIVATE void ImplNew();
public:
diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index 727911db36bd..0380e9e58044 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -347,8 +347,8 @@ static const sal_Char* pDbgHelpText[] =
"Attempt to activate the debugger and produce the message there, in order to "
"always obtain the corresponding stack trace in the debugger.\n",
"\n",
-"CoreDump\n",
-"Causes a crash\n",
+"Abort\n",
+"Aborts the application\n",
"\n",
"\n",
"Reroute osl messages - Checkbox\n",
@@ -1084,7 +1084,7 @@ DbgDialog::DbgDialog() :
maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) );
maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) );
maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) );
- maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) );
+ maTraceBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) );
ImplAppendUserDefinedChannels( maTraceBox );
ImplSelectChannel( maTraceBox, pData->nTraceOut, 0 );
maTraceBox.Show();
@@ -1107,7 +1107,7 @@ DbgDialog::DbgDialog() :
maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) );
maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) );
maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) );
- maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) );
+ maWarningBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) );
ImplAppendUserDefinedChannels( maWarningBox );
ImplSelectChannel( maWarningBox, pData->nWarningOut, 0 );
maWarningBox.Show();
@@ -1136,7 +1136,7 @@ DbgDialog::DbgDialog() :
maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "MessageBox" ) ) );
maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "TestTool" ) ) );
maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Debugger" ) ) );
- maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "CoreDump" ) ) );
+ maErrorBox.InsertEntry( XubString( RTL_CONSTASCII_USTRINGPARAM( "Abort" ) ) );
ImplAppendUserDefinedChannels( maErrorBox );
ImplSelectChannel( maErrorBox, pData->nErrorOut, mnErrorOff );
maErrorBox.Show();
@@ -1963,6 +1963,14 @@ void DbgPrintWindow( const char* pLine )
bIn = sal_False;
}
+// -----------------------------------------------------------------------
+
+void DbgAbort( char const * i_message )
+{
+ ::rtl::OUString const message( i_message, strlen( i_message ), osl_getThreadTextEncoding() );
+ Application::Abort( message );
+}
+
// =======================================================================
void ImplDbgTestSolarMutex()
@@ -1978,6 +1986,7 @@ void DbgGUIInit()
DbgSetPrintMsgBox( DbgPrintMsgBox );
DbgSetPrintWindow( DbgPrintWindow );
DbgSetTestSolarMutex( ImplDbgTestSolarMutex );
+ DbgSetAbort( DbgAbort );
}
// -----------------------------------------------------------------------
@@ -1987,6 +1996,7 @@ void DbgGUIDeInit()
DbgSetPrintMsgBox( NULL );
DbgSetPrintWindow( NULL );
DbgSetTestSolarMutex( NULL );
+ DbgSetAbort( NULL );
DbgWindow* pDbgWindow = ImplGetSVData()->maWinData.mpDbgWin;
if ( pDbgWindow )
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index a288c3656317..55e2d0ae0a3a 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2076,8 +2076,6 @@ void ImplListBoxWindow::SetTopEntry( sal_uInt16 nTop )
mnTop = nTop;
Scroll( 0, nDiff );
Update();
- maFocusRect.Top() += nDiff;
- maFocusRect.Bottom() += nDiff;
if( HasFocus() )
ImplShowFocusRect();
maScrollHdl.Call( this );
diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx
index 34cd27b270cd..bcf7986c70b2 100644
--- a/vcl/source/gdi/jobset.cxx
+++ b/vcl/source/gdi/jobset.cxx
@@ -296,13 +296,16 @@ SvStream& operator>>( SvStream& rIStream, JobSetup& rJobSetup )
DBG_ASSERTWARNING( rIStream.GetVersion(), "JobSetup::>> - Solar-Version not set on rOStream" );
{
- sal_uInt16 nLen(0);
- sal_uInt16 nSystem;
sal_Size nFirstPos = rIStream.Tell();
+
+ sal_uInt16 nLen = 0;
rIStream >> nLen;
if ( !nLen )
return rIStream;
+
+ sal_uInt16 nSystem = 0;
rIStream >> nSystem;
+
char* pTempBuf = new char[nLen];
rIStream.Read( pTempBuf, nLen - sizeof( nLen ) - sizeof( nSystem ) );
if ( nLen >= sizeof(ImplOldJobSetupData)+4 )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index c277d16305e7..4fd2f1c6d6c6 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -329,26 +329,13 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
// setup printer
- // if no specific printer is already set, create one
-
- // #i108686#
- // in case of a UI (platform independent or system dialog) print job, make the printer persistent over jobs
- // however if no printer was already set by the print job's originator,
- // and this is an API job, then use the system default location (because
- // this is the only sensible default available if the user has no means of changing
- // the destination
+ // #i114306# changed behavior back from persistence
+ // if no specific printer is already set, create the default printer
if( ! pController->getPrinter() )
{
rtl::OUString aPrinterName( i_rInitSetup.GetPrinterName() );
- if( ! aPrinterName.getLength() && pController->isShowDialogs() && ! pController->isDirectPrint() )
- {
- // get printer name from configuration
- SettingsConfigItem* pItem = SettingsConfigItem::get();
- aPrinterName = pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPrinterUsed" ) ) );
- }
-
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
+ pPrinter->SetJobSetup( i_rInitSetup );
pController->setPrinter( pPrinter );
}
@@ -395,17 +382,25 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr
{
if( nContent == 0 )
{
- sal_Int32 nPages = i_pController->getPageCount();
- if( nPages > 0 )
+ // do not overwrite PageRange if it is already set
+ beans::PropertyValue* pRangeVal = i_pController->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ) );
+ rtl::OUString aRange;
+ if( pRangeVal )
+ pRangeVal->Value >>= aRange;
+ if( aRange.getLength() == 0 )
{
- rtl::OUStringBuffer aBuf( 32 );
- aBuf.appendAscii( "1" );
- if( nPages > 1 )
+ sal_Int32 nPages = i_pController->getPageCount();
+ if( nPages > 0 )
{
- aBuf.appendAscii( "-" );
- aBuf.append( nPages );
+ rtl::OUStringBuffer aBuf( 32 );
+ aBuf.appendAscii( "1" );
+ if( nPages > 1 )
+ {
+ aBuf.appendAscii( "-" );
+ aBuf.append( nPages );
+ }
+ i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), makeAny( aBuf.makeStringAndClear() ) );
}
- i_pController->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), makeAny( aBuf.makeStringAndClear() ) );
}
}
}
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index 318529dcc7d9..659f7df31fa7 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -172,7 +172,7 @@ void Cursor::ImplRestore()
// -----------------------------------------------------------------------
-void Cursor::ImplShow( sal_Bool bDrawDirect )
+void Cursor::ImplShow( bool bDrawDirect, bool bRestore )
{
if ( mbVisible )
{
@@ -200,10 +200,10 @@ void Cursor::ImplShow( sal_Bool bDrawDirect )
mpData->mpWindow = pWindow;
mpData->mnStyle = mnStyle;
- if ( bDrawDirect )
+ if ( bDrawDirect || bRestore )
ImplDraw();
- if ( !mpWindow )
+ if ( !mpWindow && ! ( ! bDrawDirect && mpData->maTimer.IsActive()) )
{
mpData->maTimer.SetTimeout( pWindow->GetSettings().GetStyleSettings().GetCursorBlinkTime() );
if ( mpData->maTimer.GetTimeout() != STYLE_CURSOR_NOBLINKTIME )
@@ -217,16 +217,16 @@ void Cursor::ImplShow( sal_Bool bDrawDirect )
// -----------------------------------------------------------------------
-void Cursor::ImplHide()
+bool Cursor::ImplHide()
{
+ bool bWasCurVisible = false;
if ( mpData && mpData->mpWindow )
{
+ bWasCurVisible = mpData->mbCurVisible;
if ( mpData->mbCurVisible )
ImplRestore();
-
- mpData->maTimer.Stop();
- mpData->mpWindow = NULL;
}
+ return bWasCurVisible;
}
// -----------------------------------------------------------------------
@@ -330,6 +330,12 @@ void Cursor::Hide()
{
mbVisible = sal_False;
ImplHide();
+
+ if( mpData )
+ {
+ mpData->maTimer.Stop();
+ mpData->mpWindow = NULL;
+ }
}
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index a150b7a6656c..a433a57faefb 100644..100755
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -973,6 +973,13 @@ void PrintDialog::readFromSettings()
}
}
maOKButton.SetText( maOptionsPage.maToFileBox.IsChecked() ? maPrintToFileText : maPrintText );
+
+ // persistent window state
+ rtl::OUString aWinState( pItem->getValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ) ) );
+ if( aWinState.getLength() )
+ SetWindowState( rtl::OUStringToOString( aWinState, RTL_TEXTENCODING_UTF8 ) );
+
if( maOptionsPage.maToFileBox.IsChecked() )
{
maPController->resetPrinterOptions( true );
@@ -995,6 +1002,10 @@ void PrintDialog::storeToSettings()
pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LastPage" ) ),
maTabCtrl.GetPageText( maTabCtrl.GetCurPageId() ) );
+ pItem->setValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintDialog" ) ),
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "WindowState" ) ),
+ rtl::OStringToOUString( GetWindowState(), RTL_TEXTENCODING_UTF8 )
+ );
pItem->Commit();
}
@@ -1996,6 +2007,7 @@ IMPL_LINK( PrintDialog, SelectHdl, ListBox*, pBox )
maPController->resetPrinterOptions( maOptionsPage.maToFileBox.IsChecked() );
// update text fields
updatePrinterText();
+ preparePreview( true, false );
}
else if( pBox == &maNUpPage.maNupOrientationBox || pBox == &maNUpPage.maNupOrderBox )
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 5a5379da2ffa..fdb86cb07303 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2402,8 +2402,9 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
mpWindowImpl->mnPaintFlags = 0;
if ( !mpWindowImpl->maInvalidateRegion.IsEmpty() )
{
+ bool bRestoreCursor = false;
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplHide();
+ bRestoreCursor = mpWindowImpl->mpCursor->ImplHide();
mbInitClipRegion = sal_True;
mpWindowImpl->mbInPaint = sal_True;
@@ -2450,7 +2451,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags )
mbInitClipRegion = sal_True;
mpWindowImpl->mpPaintRegion = NULL;
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( sal_False );
+ mpWindowImpl->mpCursor->ImplShow( false, bRestoreCursor );
}
}
else
@@ -3039,7 +3040,7 @@ void Window::ImplScroll( const Rectangle& rRect,
Update();
if ( mpWindowImpl->mpCursor )
- mpWindowImpl->mpCursor->ImplShow( sal_False );
+ mpWindowImpl->mpCursor->ImplShow( false );
}
// -----------------------------------------------------------------------
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 895f4513800e..630e665c9def 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -124,7 +124,7 @@ enum SalRGB { RGB, RBG,
RGBA, RBGA,
GBRA, GRBA,
BGRA, BRGA,
- other };
+ otherSalRGB };
// -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class SalVisual : public XVisualInfo
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 55d78b81e0fc..a11749b8995c 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -87,6 +87,8 @@ static OUString readEntryUntranslated( KConfigGroup *pGroup, const char *pKey )
return OUString::createFromAscii( (const char *) pGroup->readEntryUntranslated( pKey ).toAscii() );
}
+#if 0
+#endif
/** Helper function to add information to Font from QFont.
Mostly grabbed from the Gtk+ vclplug (salnativewidgets-gtk.cxx).
@@ -173,7 +175,7 @@ static Font toFont( const QFont &rQFont, const ::com::sun::star::lang::Locale& r
void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
StyleSettings style( rSettings.GetStyleSettings() );
- sal_Bool bSetTitleFont = false;
+ bool bSetTitleFont = false;
// General settings
QPalette pal = kapp->palette();
@@ -268,9 +270,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
{
Color aColor2 = style.GetLightColor();
style.
- SetCheckedColor( Color( (((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
- (((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
- (((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
+ SetCheckedColor( Color( (sal_uInt8)(((sal_uInt16)aBack.GetRed()+(sal_uInt16)aColor2.GetRed())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetGreen()+(sal_uInt16)aColor2.GetGreen())/2),
+ (sal_uInt8)(((sal_uInt16)aBack.GetBlue()+(sal_uInt16)aColor2.GetBlue())/2)
) );
}
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 3ba82446c13e..f3527ff3cead 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -918,7 +918,7 @@ void SalDisplay::Init()
// carefully. if we are running linux (i.e. not netbsd) on an xfree
// display, fvwm is most probable the wm to choose, confusing with mwm
// doesn't harm. #57791# start maximized if possible
- if( (otherwm == eWindowManager_)
+ if( (otherwm == eWindowManager_)
|| (olwm == eWindowManager_ ))
{
eWindowManager_ = fvwm; // ???
@@ -2894,44 +2894,44 @@ SalVisual::SalVisual( const XVisualInfo* pXVI )
if( blue_mask == 0xFF )
eRGBMode_ = RGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF00 )
if( green_mask == 0xFF )
eRGBMode_ = RBG;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( green_mask == 0xFF0000 )
if( red_mask == 0xFF00 )
if( blue_mask == 0xFF )
eRGBMode_ = GRB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF00 )
if( red_mask == 0xFF )
eRGBMode_ = GBR;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( blue_mask == 0xFF0000 )
if( red_mask == 0xFF00 )
if( green_mask == 0xFF )
eRGBMode_ = BRG;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else if( green_mask == 0xFF00 )
if( red_mask == 0xFF )
eRGBMode_ = BGR;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
else
- eRGBMode_ = other;
+ eRGBMode_ = otherSalRGB;
}
}
@@ -2955,7 +2955,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2, int &n3 )
switch( GetMode() )
{
- case other:
+ case otherSalRGB:
return sal_False;
case SALCOLOR:
break;
@@ -2990,7 +2990,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 )
switch( GetMode() )
{
- case other:
+ case otherSalRGB:
return sal_False;
case SALCOLOR:
break;
@@ -3043,7 +3043,7 @@ SalColor SalVisual::GetTCColor( Pixel nPixel ) const
Pixel g = nPixel & green_mask;
Pixel b = nPixel & blue_mask;
- if( other != eRGBMode_ ) // 8+8+8=24
+ if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
return MAKE_SALCOLOR( r >> nRedShift_,
g >> nGreenShift_,
b >> nBlueShift_ );
@@ -3074,7 +3074,7 @@ Pixel SalVisual::GetTCPixel( SalColor nSalColor ) const
if( SALCOLORREVERSE == eRGBMode_ )
return (b << 16) | (g << 8) | (r);
- if( other != eRGBMode_ ) // 8+8+8=24
+ if( otherSalRGB != eRGBMode_ ) // 8+8+8=24
return (r << nRedShift_) | (g << nGreenShift_) | (b << nBlueShift_);
if( nRedShift_ > 0 ) r <<= nRedShift_; else r >>= -nRedShift_;
diff --git a/vcl/unx/source/gdi/salgdi.cxx b/vcl/unx/source/gdi/salgdi.cxx
index 4d3141fc9ded..044c5b950d54 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1190,6 +1190,7 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
aPolygon.transform( basegfx::tools::createTranslateB2DHomMatrix(+fHalfWidth,+fHalfWidth) );
// shortcut for hairline drawing to improve performance
+ bool bDrawnOk = true;
if( bIsHairline )
{
// hairlines can benefit from a simplified tesselation
@@ -1198,17 +1199,13 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
basegfx::tools::createLineTrapezoidFromB2DPolygon( aB2DTrapVector, aPolygon, rLineWidth.getX() );
// draw tesselation result
- if( ! aB2DTrapVector.empty() )
- {
- const int nTrapCount = aB2DTrapVector.size();
- const bool bDrawOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
+ const int nTrapCount = aB2DTrapVector.size();
+ if( nTrapCount > 0 )
+ bDrawnOk = drawFilledTrapezoids( &aB2DTrapVector[0], nTrapCount, fTransparency );
- // restore the original brush GC
- nBrushColor_ = aKeepBrushColor;
- return bDrawOk;
- }
- else
- return true;
+ // restore the original brush GC
+ nBrushColor_ = aKeepBrushColor;
+ return bDrawnOk;
}
// get the area polygon for the line polygon
@@ -1231,19 +1228,18 @@ bool X11SalGraphics::drawPolyLine(const ::basegfx::B2DPolygon& rPolygon, double
// draw each area polypolygon component individually
// to emulate the polypolygon winding rule "non-zero"
- bool bDrawOk = true;
const int nPolyCount = aAreaPolyPoly.count();
for( int nPolyIdx = 0; nPolyIdx < nPolyCount; ++nPolyIdx )
{
const ::basegfx::B2DPolyPolygon aOnePoly( aAreaPolyPoly.getB2DPolygon( nPolyIdx ) );
- bDrawOk = drawPolyPolygon( aOnePoly, fTransparency );
- if( !bDrawOk )
+ bDrawnOk = drawPolyPolygon( aOnePoly, fTransparency );
+ if( !bDrawnOk )
break;
}
// restore the original brush GC
nBrushColor_ = aKeepBrushColor;
- return bDrawOk;
+ return bDrawnOk;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx
index 1e5a4c49eba2..14eeb89046a7 100644
--- a/vcl/win/source/gdi/salgdi.cxx
+++ b/vcl/win/source/gdi/salgdi.cxx
@@ -538,7 +538,9 @@ void ImplSalInitGraphics( WinSalGraphics* pData )
void ImplSalDeInitGraphics( WinSalGraphics* pData )
{
- // Default Objekte selektieren
+ // clear clip region
+ SelectClipRgn( pData->mhDC, 0 );
+ // select default objects
if ( pData->mhDefPen )
SelectPen( pData->mhDC, pData->mhDefPen );
if ( pData->mhDefBrush )