summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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--svl/inc/svl/nfkeytab.hxx14
-rw-r--r--svl/source/numbers/zforlist.cxx14
-rw-r--r--svl/source/numbers/zformat.cxx20
-rw-r--r--svl/source/numbers/zforscan.cxx22
-rw-r--r--svl/source/numbers/zforscan.hxx2
-rw-r--r--svl/source/undo/undo.cxx2
-rw-r--r--toolkit/inc/toolkit/controls/dialogcontrol.hxx26
-rw-r--r--toolkit/source/controls/dialogcontrol.cxx41
-rw-r--r--tools/inc/tools/debug.hxx8
-rw-r--r--tools/source/debug/debug.cxx50
-rw-r--r--vcl/aqua/source/gdi/salprn.cxx22
-rw-r--r--vcl/source/app/dbggui.cxx20
-rwxr-xr-xvcl/source/gdi/print3.cxx23
-rwxr-xr-xvcl/source/window/printdlg.cxx1
-rw-r--r--vcl/source/window/winproc.cxx8
-rw-r--r--vcl/unx/inc/saldisp.hxx2
-rw-r--r--vcl/unx/source/app/saldisp.cxx32
-rw-r--r--vcl/unx/source/gdi/salgdi.cxx24
23 files changed, 236 insertions, 157 deletions
diff --git a/i18npool/source/paper/paper.cxx b/i18npool/source/paper/paper.cxx
index 0d9235747fd6..aaac0e83a4eb 100644
--- a/i18npool/source/paper/paper.cxx
+++ b/i18npool/source/paper/paper.cxx
@@ -159,7 +159,7 @@ static PageDesc aDinTab[] =
static const size_t nTabSize = sizeof(aDinTab) / sizeof(aDinTab[0]);
-#define MAXSLOPPY 11
+#define MAXSLOPPY 21
bool PaperInfo::doSloppyFit()
{
diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx
index e300fe26f16d..8ce6098d21a9 100644..100755
--- a/l10ntools/source/help/HelpCompiler.hxx
+++ b/l10ntools/source/help/HelpCompiler.hxx
@@ -102,6 +102,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 4e3a4cedbe6f..036208520ede 100644..100755
--- a/l10ntools/source/help/HelpLinker.cxx
+++ b/l10ntools/source/help/HelpLinker.cxx
@@ -118,7 +118,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 );
@@ -135,8 +141,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 );
@@ -226,9 +237,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;
@@ -430,9 +445,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"));
@@ -442,8 +463,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);
@@ -692,7 +719,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 b8f90ab4f7ed..04d715f35351 100644
--- a/rsc/source/rscpp/cpp4.c
+++ b/rsc/source/rscpp/cpp4.c
@@ -629,7 +629,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/svl/inc/svl/nfkeytab.hxx b/svl/inc/svl/nfkeytab.hxx
index 7c3fef4b88cc..34d483ab4d86 100644
--- a/svl/inc/svl/nfkeytab.hxx
+++ b/svl/inc/svl/nfkeytab.hxx
@@ -28,6 +28,7 @@
#ifndef INCLUDED_SVTOOLS_NFKEYTAB_HXX
#define INCLUDED_SVTOOLS_NFKEYTAB_HXX
+#include <vector>
#include <tools/string.hxx>
//! For ImpSvNumberformatScan: first the short symbols, then the long symbols!
@@ -111,7 +112,18 @@ enum NfKeywordIndex
NF_KEYWORD_ENTRIES_COUNT
};
-typedef String NfKeywordTable [NF_KEYWORD_ENTRIES_COUNT];
+class NfKeywordTable
+{
+ typedef ::std::vector<String> Keywords_t;
+ Keywords_t m_keywords;
+
+public:
+ NfKeywordTable() : m_keywords(NF_KEYWORD_ENTRIES_COUNT) {};
+ virtual ~NfKeywordTable() {}
+
+ String & operator[] (Keywords_t::size_type n) { return m_keywords[n]; }
+ const String & operator[] (Keywords_t::size_type n) const { return m_keywords[n]; }
+};
#endif // INCLUDED_SVTOOLS_NFKEYTAB_HXX
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index ebc1fa673fe2..d4d0f8550907 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -939,10 +939,10 @@ void SvNumberFormatter::FillKeywordTable( NfKeywordTable& rKeywords,
LanguageType eLang )
{
ChangeIntl( eLang );
- const String* pTable = pFormatScanner->GetKeywords();
+ const NfKeywordTable & rTable = pFormatScanner->GetKeywords();
for ( sal_uInt16 i = 0; i < NF_KEYWORD_ENTRIES_COUNT; ++i )
{
- rKeywords[i] = pTable[i];
+ rKeywords[i] = rTable[i];
}
}
@@ -950,9 +950,9 @@ void SvNumberFormatter::FillKeywordTable( NfKeywordTable& rKeywords,
String SvNumberFormatter::GetKeyword( LanguageType eLnge, sal_uInt16 nIndex )
{
ChangeIntl(eLnge);
- const String* pTable = pFormatScanner->GetKeywords();
- if ( pTable && nIndex < NF_KEYWORD_ENTRIES_COUNT )
- return pTable[nIndex];
+ const NfKeywordTable & rTable = pFormatScanner->GetKeywords();
+ if ( nIndex < NF_KEYWORD_ENTRIES_COUNT )
+ return rTable[nIndex];
DBG_ERROR("GetKeyword: invalid index");
return String();
@@ -2589,8 +2589,8 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, sal_Bool bLoadi
CLOffset + SetIndexTable( NF_FRACTION_2, ZF_STANDARD_FRACTION+1 ));
// Week of year must be appended here because of nNewExtended
- const String* pKeyword = pFormatScanner->GetKeywords();
- aSingleFormatCode.Code = pKeyword[NF_KEY_WW];
+ const NfKeywordTable & rKeyword = pFormatScanner->GetKeywords();
+ aSingleFormatCode.Code = rKeyword[NF_KEY_WW];
ImpInsertNewStandardFormat( aSingleFormatCode,
CLOffset + SetIndexTable( NF_DATE_WW, nNewExtended++ ),
SV_NUMBERFORMATTER_VERSION_NF_DATE_WW );
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 92398792077d..9b01c2ee91be 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1149,7 +1149,7 @@ short SvNumberformat::ImpNextSymbol(String& rString,
xub_StrLen nLen = rString.Len();
ScanState eState = SsStart;
sSymbol.Erase();
- const String* pKeywords = rScan.GetKeywords();
+ const NfKeywordTable & rKeywords = rScan.GetKeywords();
while (nPos < nLen && eState != SsStop)
{
cToken = rString.GetChar(nPos);
@@ -1267,9 +1267,9 @@ short SvNumberformat::ImpNextSymbol(String& rString,
BRACKET_SYMBOLTYPE_DBNUM1 - (cDBNum - '1'));
eState = SsGetPrefix;
}
- else if (cUpper == pKeywords[NF_KEY_H].GetChar(0) || // H
- cUpper == pKeywords[NF_KEY_MI].GetChar(0) || // M
- cUpper == pKeywords[NF_KEY_S].GetChar(0) ) // S
+ else if (cUpper == rKeywords[NF_KEY_H].GetChar(0) || // H
+ cUpper == rKeywords[NF_KEY_MI].GetChar(0) || // M
+ cUpper == rKeywords[NF_KEY_S].GetChar(0) ) // S
{
sSymbol += cToken;
eState = SsGetTime;
@@ -1306,9 +1306,9 @@ short SvNumberformat::ImpNextSymbol(String& rString,
else
{
sal_Unicode cUpper = rChrCls().toUpper( rString, nPos-1, 1 ).GetChar(0);
- if (cUpper == pKeywords[NF_KEY_H].GetChar(0) || // H
- cUpper == pKeywords[NF_KEY_MI].GetChar(0) || // M
- cUpper == pKeywords[NF_KEY_S].GetChar(0) ) // S
+ if (cUpper == rKeywords[NF_KEY_H].GetChar(0) || // H
+ cUpper == rKeywords[NF_KEY_MI].GetChar(0) || // M
+ cUpper == rKeywords[NF_KEY_S].GetChar(0) ) // S
{
if (cLetter == cToken)
{
@@ -4230,10 +4230,10 @@ String SvNumberformat::GetMappedFormatstring(
const String& rColorName = NumFor[n].GetColorName();
if ( rColorName.Len() )
{
- const String* pKey = rScan.GetKeywords() + NF_KEY_FIRSTCOLOR;
- for ( int j=NF_KEY_FIRSTCOLOR; j<=NF_KEY_LASTCOLOR; j++, pKey++ )
+ const NfKeywordTable & rKey = rScan.GetKeywords();
+ for ( int j=NF_KEY_FIRSTCOLOR; j<=NF_KEY_LASTCOLOR; j++ )
{
- if ( *pKey == rColorName )
+ if ( rKey[j] == rColorName )
{
aPrefix += '[';
aPrefix += rKeywords[j];
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 000649a6de80..83dbd512a4e2 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -473,10 +473,10 @@ void ImpSvNumberformatScan::ChangeStandardPrec(sal_uInt16 nPrec)
Color* ImpSvNumberformatScan::GetColor(String& sStr)
{
String sString = pFormatter->GetCharClass()->upper(sStr);
- const String* pKeyword = GetKeywords();
+ const NfKeywordTable & rKeyword = GetKeywords();
size_t i = 0;
while (i < NF_MAX_DEFAULT_COLORS &&
- sString != pKeyword[NF_KEY_FIRSTCOLOR+i] )
+ sString != rKeyword[NF_KEY_FIRSTCOLOR+i] )
i++;
if ( i >= NF_MAX_DEFAULT_COLORS )
{
@@ -492,7 +492,7 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
Color* pResult = NULL;
if (i >= NF_MAX_DEFAULT_COLORS)
{
- const String& rColorWord = pKeyword[NF_KEY_COLOR];
+ const String& rColorWord = rKeyword[NF_KEY_COLOR];
xub_StrLen nPos = sString.Match(rColorWord);
if (nPos > 0)
{
@@ -529,7 +529,7 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
pFormatter->ChangeIntl(eTmpLnge);
}
else
- sStr = pKeyword[NF_KEY_FIRSTCOLOR+i];
+ sStr = rKeyword[NF_KEY_FIRSTCOLOR+i];
pResult = &(StandardColor[i]);
}
@@ -540,16 +540,16 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos )
{
String sString = pFormatter->GetCharClass()->toUpper( sSymbol, nPos, sSymbol.Len() - nPos );
- const String* pKeyword = GetKeywords();
+ const NfKeywordTable & rKeyword = GetKeywords();
// #77026# for the Xcl perverts: the GENERAL keyword is recognized anywhere
- if ( sString.Search( pKeyword[NF_KEY_GENERAL] ) == 0 )
+ if ( sString.Search( rKeyword[NF_KEY_GENERAL] ) == 0 )
return NF_KEY_GENERAL;
//! MUST be a reverse search to find longer strings first
short i = NF_KEYWORD_ENTRIES_COUNT-1;
sal_Bool bFound = sal_False;
for ( ; i > NF_KEY_LASTKEYWORD_SO5; --i )
{
- bFound = sString.Search(pKeyword[i]) == 0;
+ bFound = sString.Search(rKeyword[i]) == 0;
if ( bFound )
{
break;
@@ -559,15 +559,15 @@ short ImpSvNumberformatScan::GetKeyWord( const String& sSymbol, xub_StrLen nPos
if ( !bFound )
{ // skip the gap of colors et al between new and old keywords and search on
i = NF_KEY_LASTKEYWORD;
- while ( i > 0 && sString.Search(pKeyword[i]) != 0 )
+ while ( i > 0 && sString.Search(rKeyword[i]) != 0 )
i--;
- if ( i > NF_KEY_LASTOLDKEYWORD && sString != pKeyword[i] )
+ if ( i > NF_KEY_LASTOLDKEYWORD && sString != rKeyword[i] )
{ // found something, but maybe it's something else?
// e.g. new NNN is found in NNNN, for NNNN we must search on
short j = i - 1;
- while ( j > 0 && sString.Search(pKeyword[j]) != 0 )
+ while ( j > 0 && sString.Search(rKeyword[j]) != 0 )
j--;
- if ( j && pKeyword[j].Len() > pKeyword[i].Len() )
+ if ( j && rKeyword[j].Len() > rKeyword[i].Len() )
return j;
}
}
diff --git a/svl/source/numbers/zforscan.hxx b/svl/source/numbers/zforscan.hxx
index 9b04921cb7f4..a1372866a46e 100644
--- a/svl/source/numbers/zforscan.hxx
+++ b/svl/source/numbers/zforscan.hxx
@@ -66,7 +66,7 @@ public:
const LocaleDataWrapper& GetLoc() const { return *pFormatter->GetLocaleData(); }
CalendarWrapper& GetCal() const { return *pFormatter->GetCalendar(); }
- const String* GetKeywords() const
+ const NfKeywordTable & GetKeywords() const
{
if ( bKeywordsNeedInit )
InitKeywords();
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index d784d1bd19f8..5e1e49f397b2 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -706,7 +706,7 @@ sal_uInt16 SfxUndoManager::GetUndoActionId() const
DBG_ASSERT( m_pData->pActUndoArray->nCurUndoAction > 0, "svl::SfxUndoManager::GetUndoActionId(), illegal id!" );
if ( m_pData->pActUndoArray->nCurUndoAction == 0 )
- return NULL;
+ return 0;
return m_pData->pActUndoArray->aUndoActions[m_pData->pActUndoArray->nCurUndoAction-1].pAction->GetId();
}
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/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 8f400ff1945c..556acbf5d0d2 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)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
@@ -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)
{
vos::OGuard aSolarGuard( Application::GetSolarMutex() );
diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx
index 4d640642c69d..63a94555a8c1 100644
--- a/tools/inc/tools/debug.hxx
+++ b/tools/inc/tools/debug.hxx
@@ -80,7 +80,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
@@ -137,6 +137,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 );
@@ -180,6 +181,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/source/debug/debug.cxx b/tools/source/debug/debug.cxx
index fd6f499b4036..bbde4efe6d9e 100644
--- a/tools/source/debug/debug.cxx
+++ b/tools/source/debug/debug.cxx
@@ -152,6 +152,7 @@ struct DebugData
DbgPrintLine pDbgPrintMsgBox;
DbgPrintLine pDbgPrintWindow;
DbgPrintLine pDbgPrintTestTool;
+ DbgPrintLine pDbgAbort;
::std::vector< DbgPrintLine >
aDbgPrintUserChannels;
PointerList* pProfList;
@@ -163,9 +164,10 @@ struct DebugData
DebugData()
:bInit( sal_False )
- ,pDbgPrintMsgBox( sal_False )
+ ,pDbgPrintMsgBox( NULL )
,pDbgPrintWindow( NULL )
,pDbgPrintTestTool( NULL )
+ ,pDbgAbort( NULL )
,pProfList( NULL )
,pXtorList( NULL )
,pDbgTestSolarMutex( NULL )
@@ -420,7 +422,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 ] );
}
@@ -471,26 +473,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 ( sal_uIntPtr name = 0; name < sizeof( names ) / sizeof( names[0] ); ++name )
{
- for ( sal_uIntPtr name = 0; name < sizeof( names ) / sizeof( names[0] ); ++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];
@@ -811,6 +817,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 ) );
@@ -1199,6 +1212,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 );
@@ -1706,10 +1723,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/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index a1d51376aa0b..ed80110cacc6 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -834,12 +834,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/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx
index a50c8aeec149..6649f19e0030 100644
--- a/vcl/source/app/dbggui.cxx
+++ b/vcl/source/app/dbggui.cxx
@@ -346,8 +346,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",
@@ -1083,7 +1083,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();
@@ -1106,7 +1106,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();
@@ -1135,7 +1135,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();
@@ -1962,6 +1962,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()
@@ -1977,6 +1985,7 @@ void DbgGUIInit()
DbgSetPrintMsgBox( DbgPrintMsgBox );
DbgSetPrintWindow( DbgPrintWindow );
DbgSetTestSolarMutex( ImplDbgTestSolarMutex );
+ DbgSetAbort( DbgAbort );
}
// -----------------------------------------------------------------------
@@ -1986,6 +1995,7 @@ void DbgGUIDeInit()
DbgSetPrintMsgBox( NULL );
DbgSetPrintWindow( NULL );
DbgSetTestSolarMutex( NULL );
+ DbgSetAbort( NULL );
DbgWindow* pDbgWindow = ImplGetSVData()->maWinData.mpDbgWin;
if ( pDbgWindow )
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index c917ea8aa718..3873cdc6cb14 100755
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -333,30 +333,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() );
- bool bSetJobSetup = true;
- 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" ) ) );
- bSetJobSetup = false;
- }
-
boost::shared_ptr<Printer> pPrinter( new Printer( aPrinterName ) );
- if( bSetJobSetup )
- pPrinter->SetJobSetup( i_rInitSetup );
+ pPrinter->SetJobSetup( i_rInitSetup );
pController->setPrinter( pPrinter );
}
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 98e93e748737..d38128e04f1e 100755
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -2107,6 +2107,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/winproc.cxx b/vcl/source/window/winproc.cxx
index 9cb38756e770..795bea17a3b9 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1646,7 +1646,13 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight )
// #i42750# presentation wants to be informed about resize
// as early as possible
WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow->ImplGetWindowImpl()->mpClientWindow);
- if( pWorkWindow && pWorkWindow->IsPresentationMode() )
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
+ bStartTimer = false;
+ }
+ else
+ {
+ WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pWindow);
+ if( ! pWorkWindow || pWorkWindow->IsPresentationMode() )
bStartTimer = false;
}
}
diff --git a/vcl/unx/inc/saldisp.hxx b/vcl/unx/inc/saldisp.hxx
index 42d1f820acff..3333dc3faef4 100644
--- a/vcl/unx/inc/saldisp.hxx
+++ b/vcl/unx/inc/saldisp.hxx
@@ -127,7 +127,7 @@ enum SalRGB { RGB, RBG,
RGBA, RBGA,
GBRA, GRBA,
BGRA, BRGA,
- other };
+ otherSalRGB };
// -=-= SalVisual =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
class SalVisual : public XVisualInfo
diff --git a/vcl/unx/source/app/saldisp.cxx b/vcl/unx/source/app/saldisp.cxx
index 91f6934f27f0..39d2803720c8 100644
--- a/vcl/unx/source/app/saldisp.cxx
+++ b/vcl/unx/source/app/saldisp.cxx
@@ -912,7 +912,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; // ???
@@ -2790,44 +2790,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;
}
}
@@ -2851,7 +2851,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;
@@ -2886,7 +2886,7 @@ sal_Bool SalVisual::Convert( int &n0, int &n1, int &n2 )
switch( GetMode() )
{
- case other:
+ case otherSalRGB:
return sal_False;
case SALCOLOR:
break;
@@ -2939,7 +2939,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_ );
@@ -2970,7 +2970,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 dc1ec968d859..df23220ea6d5 100644
--- a/vcl/unx/source/gdi/salgdi.cxx
+++ b/vcl/unx/source/gdi/salgdi.cxx
@@ -1217,6 +1217,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
@@ -1225,17 +1226,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
@@ -1258,19 +1255,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;
}
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=