[ooo-build-commit] Branch 'ooo/master' - 9 commits - canvas/source comphelper/source i18npool/inc i18npool/source padmin/source svtools/inc svtools/source toolkit/source transex3/source ucbhelper/inc ucbhelper/source vcl/aqua vcl/inc vcl/prj vcl/source vcl/unx vcl/win
Jan Holesovsky
kendy at kemper.freedesktop.org
Thu Sep 17 18:34:40 PDT 2009
canvas/source/directx/dx_winstuff.hxx | 25
comphelper/source/property/genericpropertyset.cxx | 3
i18npool/inc/i18npool/mslangid.hxx | 10
i18npool/source/isolang/mslangid.cxx | 55 +
padmin/source/adddlg.cxx | 34 -
padmin/source/adddlg.hxx | 2
padmin/source/newppdlg.cxx | 4
padmin/source/newppdlg.hxx | 5
svtools/inc/sfxecode.hxx | 1
svtools/source/config/lingucfg.cxx | 56 -
svtools/source/control/roadmap.cxx | 19
svtools/source/inc/passwordcontainer.hxx | 30
svtools/source/misc/errtxt.src | 4
svtools/source/misc1/makefile.mk | 1
svtools/source/numbers/numfmuno.cxx | 2
svtools/source/numbers/zforscan.cxx | 13
svtools/source/passwordcontainer/makefile.mk | 3
svtools/source/passwordcontainer/passwordcontainer.cxx | 155 ++--
svtools/source/uno/unoiface.cxx | 2
toolkit/source/controls/roadmapcontrol.cxx | 1
transex3/source/help/HelpIndexerTool.java | 28
ucbhelper/inc/ucbhelper/interactionrequest.hxx | 40 -
ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx | 49 +
ucbhelper/source/provider/interactionrequest.cxx | 32
ucbhelper/source/provider/simpleauthenticationrequest.cxx | 127 ++-
vcl/aqua/inc/vclnsapp.h | 6
vcl/aqua/source/a11y/aqua11yfactory.mm | 13
vcl/aqua/source/a11y/aqua11ywrapper.mm | 13
vcl/aqua/source/app/vclnsapp.mm | 96 ++
vcl/inc/vcl/lazydelete.hxx | 4
vcl/inc/vcl/ppdparser.hxx | 2
vcl/inc/vcl/vclevent.hxx | 1
vcl/prj/d.lst | 1
vcl/source/control/combobox.cxx | 3
vcl/source/control/lstbox.cxx | 3
vcl/source/fontsubset/cff.cxx | 476 +++++++-------
vcl/source/helper/lazydelete.cxx | 3
vcl/unx/gtk/a11y/atktext.cxx | 65 +
vcl/unx/gtk/a11y/atktextattributes.cxx | 13
vcl/unx/gtk/a11y/atktextattributes.hxx | 1
vcl/unx/gtk/a11y/atkwrapper.cxx | 2
vcl/unx/gtk/a11y/atkwrapper.hxx | 2
vcl/unx/gtk/window/gtkframe.cxx | 3
vcl/unx/source/printer/ppdparser.cxx | 8
vcl/unx/source/window/salframe.cxx | 7
vcl/win/source/gdi/winlayout.cxx | 2
46 files changed, 978 insertions(+), 447 deletions(-)
New commits:
commit 64f2a312dadbf560861a59272768f1a2cd935141
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 17:24:45 2009 +0000
CWS-TOOLING: integrate CWS a11y32
2009-09-08 11:46:26 +0200 tl r275921 : #i74816# use hi-contrast for all but for printer; namely use it for virtual devices as well
2009-08-25 10:14:46 +0200 tl r275337 : CWS-TOOLING: rebase CWS a11y32 to trunk at 274622 (milestone: DEV300:m54)
2009-08-17 11:13:19 +0200 ab r275036 : #i71360# Added attribute support for misspelled
2009-07-24 14:28:11 +0200 tl r274306 : #i48354# fixed hierarchy order in SvHeaderTabListBox
2009-07-24 13:47:40 +0200 mav r274305 : #i102870# let roadmap control behave as a monolite tabstop control
2009-07-24 13:47:06 +0200 mav r274304 : #i102870# let roadmap control behave as a monolite tabstop control
2009-07-24 13:46:33 +0200 mav r274303 : #i102870# let roadmap control behave as a monolite tabstop control
2009-07-24 09:41:16 +0200 tl r274289 : #i74816# fixed evaluation of high-contrast-mode
2009-07-22 15:46:50 +0200 tl r274246 : warning-free-code fix when build with debug=t
2009-07-22 15:28:59 +0200 tl r274243 : #i74816# fixed evaluation of high-contrast-mode
diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx
index c68ad3c..d053b22 100644
--- a/svtools/source/control/roadmap.cxx
+++ b/svtools/source/control/roadmap.cxx
@@ -201,6 +201,17 @@ namespace svt
m_pImpl->InCompleteHyperLabel = NULL;
m_pImpl->setCurItemID(-1 );
m_pImpl->setComplete( sal_True );
+
+ // Roadmap control should be reachable as one unit with a Tab key
+ // the next Tab key should spring out of the control.
+ // To reach it the control itself should get focus and set it
+ // on entries. The entries themself should not be reachable with
+ // the Tab key directly. So each entry should have WB_NOTABSTOP.
+ //
+ // In other words the creator should create the control with the following
+ // flags:
+ // SetStyle( ( GetStyle() | WB_TABSTOP ) & ~WB_DIALOGCONTROL );
+
// TODO: if somebody sets a new font from outside (OutputDevice::SetFont), we would have to react
// on this with calculating a new bold font.
// Unfortunately, the OutputDevice does not offer a notify mechanism for a changed font.
@@ -725,11 +736,9 @@ namespace svt
//---------------------------------------------------------------------
IMPL_LINK(ORoadmap, ImplClickHdl, HyperLabel*, _CurHyperLabel)
{
- return SelectRoadmapItemByID( _CurHyperLabel->GetID() );
+ return SelectRoadmapItemByID( _CurHyperLabel->GetID() );
}
-
-
void ORoadmap::DataChanged( const DataChangedEvent& rDCEvt )
{
if ((( rDCEvt.GetType() == DATACHANGED_SETTINGS ) ||
@@ -753,7 +762,7 @@ namespace svt
ORoadmapHyperLabel::ORoadmapHyperLabel( Window* _pParent, const ResId& )
{
mpIDLabel = new ORoadmapIDHyperLabel(_pParent, WB_WORDBREAK);
- mpDescHyperLabel = new HyperLabel(_pParent, WB_TABSTOP | WB_WORDBREAK);
+ mpDescHyperLabel = new HyperLabel(_pParent, WB_NOTABSTOP | WB_WORDBREAK);
}
@@ -761,7 +770,7 @@ namespace svt
{
mpIDLabel = new ORoadmapIDHyperLabel(_pParent, WB_WORDBREAK);
mpIDLabel->SetTextColor( mpIDLabel->GetSettings().GetStyleSettings().GetFieldTextColor( ) );
- mpDescHyperLabel = new HyperLabel(_pParent, WB_TABSTOP | WB_WORDBREAK);
+ mpDescHyperLabel = new HyperLabel(_pParent, WB_NOTABSTOP | WB_WORDBREAK);
}
//---------------------------------------------------------------------
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 04734a3..ee62412 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -133,7 +133,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com::
}
else if (aServiceName.EqualsIgnoreCaseAscii("roadmap") )
{
- pWindow = new ::svt::ORoadmap( pParent, WB_DIALOGCONTROL);
+ pWindow = new ::svt::ORoadmap( pParent, WB_TABSTOP );
*ppNewComp = new SVTXRoadmap;
}
else if ( aServiceName.EqualsIgnoreCaseAscii( "ProgressBar" ) )
diff --git a/toolkit/source/controls/roadmapcontrol.cxx b/toolkit/source/controls/roadmapcontrol.cxx
index b128a1a..a9ebc4e 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -104,6 +104,7 @@ static void lcl_throwIndexOutOfBoundsException( )
ImplRegisterProperty( BASEPROPERTY_COMPLETE );
ImplRegisterProperty( BASEPROPERTY_ACTIVATED );
ImplRegisterProperty( BASEPROPERTY_CURRENTITEMID );
+ ImplRegisterProperty( BASEPROPERTY_TABSTOP );
ImplRegisterProperty( BASEPROPERTY_TEXT );
}
diff --git a/vcl/unx/gtk/a11y/atktext.cxx b/vcl/unx/gtk/a11y/atktext.cxx
index 8bdfe17..201c651 100644
--- a/vcl/unx/gtk/a11y/atktext.cxx
+++ b/vcl/unx/gtk/a11y/atktext.cxx
@@ -33,12 +33,15 @@
#include "atkwrapper.hxx"
#include "atktextattributes.hxx"
+#include <algorithm>
#include <com/sun/star/accessibility/AccessibleTextType.hpp>
#include <com/sun/star/accessibility/TextSegment.hpp>
#include <com/sun/star/accessibility/XAccessibleMultiLineText.hpp>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
+#include <com/sun/star/text/TextMarkupType.hpp>
// #define ENABLE_TRACING
@@ -175,6 +178,27 @@ static accessibility::XAccessibleText*
/*****************************************************************************/
+static accessibility::XAccessibleTextMarkup*
+ getTextMarkup( AtkText *pText ) throw (uno::RuntimeException)
+{
+ AtkObjectWrapper *pWrap = ATK_OBJECT_WRAPPER( pText );
+ if( pWrap )
+ {
+ if( !pWrap->mpTextMarkup && pWrap->mpContext )
+ {
+ uno::Any any = pWrap->mpContext->queryInterface( accessibility::XAccessibleTextMarkup::static_type(NULL) );
+ pWrap->mpTextMarkup = reinterpret_cast< accessibility::XAccessibleTextMarkup * > (any.pReserved);
+ pWrap->mpTextMarkup->acquire();
+ }
+
+ return pWrap->mpTextMarkup;
+ }
+
+ return NULL;
+}
+
+/*****************************************************************************/
+
static accessibility::XAccessibleTextAttributes*
getTextAttributes( AtkText *pText ) throw (uno::RuntimeException)
{
@@ -434,6 +458,8 @@ text_wrapper_get_run_attributes( AtkText *text,
AtkAttributeSet *pSet = NULL;
try {
+ bool bOffsetsAreValid = false;
+
accessibility::XAccessibleText* pText = getText( text );
accessibility::XAccessibleTextAttributes* pTextAttributes = getTextAttributes( text );
if( pText && pTextAttributes )
@@ -456,10 +482,47 @@ text_wrapper_get_run_attributes( AtkText *text,
// *end_offset = aTextSegment.SegmentEnd + 1; // FIXME: TESTME
*end_offset = aTextSegment.SegmentEnd;
// <--
+ bOffsetsAreValid = true;
+ }
+ }
+
+ // Special handling for missspelled
+ accessibility::XAccessibleTextMarkup* pTextMarkup = getTextMarkup( text );
+ if( pTextMarkup )
+ {
+ uno::Sequence< accessibility::TextSegment > aTextSegmentSeq =
+ pTextMarkup->getTextMarkupAtIndex( offset, com::sun::star::text::TextMarkupType::SPELLCHECK );
+ if( aTextSegmentSeq.getLength() > 0 )
+ {
+ accessibility::TextSegment aTextSegment = aTextSegmentSeq[0];
+ gint nStartOffsetMisspelled = aTextSegment.SegmentStart;
+ gint nEndOffsetMisspelled = aTextSegment.SegmentEnd;
+
+ // Get attribute run here if it hasn't been done before
+ if( !bOffsetsAreValid )
+ {
+ accessibility::TextSegment aAttributeTextSegment =
+ pText->getTextAtIndex(offset, accessibility::AccessibleTextType::ATTRIBUTE_RUN);
+ *start_offset = aAttributeTextSegment.SegmentStart;
+ *end_offset = aAttributeTextSegment.SegmentEnd;
+ }
+
+ if( nEndOffsetMisspelled <= offset )
+ *start_offset = ::std::max( *start_offset, nEndOffsetMisspelled );
+ else if( nStartOffsetMisspelled <= offset )
+ *start_offset = ::std::max( *start_offset, nStartOffsetMisspelled );
+
+ if( nStartOffsetMisspelled > offset )
+ *end_offset = ::std::min( *end_offset, nStartOffsetMisspelled );
+ else if( nEndOffsetMisspelled > offset )
+ *end_offset = ::std::min( *end_offset, nEndOffsetMisspelled );
+
+ if( nStartOffsetMisspelled <= offset && nEndOffsetMisspelled > offset )
+ pSet = attribute_set_prepend_misspelled( pSet );
}
}
}
- catch(const uno::Exception& e) {
+ catch(const uno::Exception& e){
g_warning( "Exception in get_run_attributes()" );
diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx
index d6a119c..d3b85f2 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.cxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.cxx
@@ -76,6 +76,7 @@ static AtkTextAttribute atk_text_attribute_tab_interval = ATK_TEXT_ATTR_INVALID;
static AtkTextAttribute atk_text_attribute_tab_stops = ATK_TEXT_ATTR_INVALID;
static AtkTextAttribute atk_text_attribute_writing_mode = ATK_TEXT_ATTR_INVALID;
static AtkTextAttribute atk_text_attribute_vertical_align = ATK_TEXT_ATTR_INVALID;
+static AtkTextAttribute atk_text_attribute_misspelled = ATK_TEXT_ATTR_INVALID;
/*****************************************************************************/
@@ -1299,6 +1300,18 @@ attribute_set_new_from_property_values(
}
+AtkAttributeSet* attribute_set_prepend_misspelled( AtkAttributeSet* attribute_set )
+{
+ if( ATK_TEXT_ATTR_INVALID == atk_text_attribute_misspelled )
+ atk_text_attribute_misspelled = atk_text_attribute_register( "text-spelling" );
+
+ attribute_set = attribute_set_prepend( attribute_set, atk_text_attribute_misspelled,
+ g_strdup_printf( "misspelled" ) );
+
+ return attribute_set;
+}
+
+
/*****************************************************************************/
struct AtkTextAttrMapping
diff --git a/vcl/unx/gtk/a11y/atktextattributes.hxx b/vcl/unx/gtk/a11y/atktextattributes.hxx
index 49ec5c6..1e13680 100644
--- a/vcl/unx/gtk/a11y/atktextattributes.hxx
+++ b/vcl/unx/gtk/a11y/atktextattributes.hxx
@@ -47,5 +47,6 @@ attribute_set_map_to_property_values(
AtkAttributeSet* attribute_set,
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& rValueList );
+AtkAttributeSet* attribute_set_prepend_misspelled( AtkAttributeSet* attribute_set );
#endif
diff --git a/vcl/unx/gtk/a11y/atkwrapper.cxx b/vcl/unx/gtk/a11y/atkwrapper.cxx
index 599f283..67ec595 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.cxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.cxx
@@ -40,6 +40,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/XAccessible.hpp>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
+#include <com/sun/star/accessibility/XAccessibleTextMarkup.hpp>
#include <com/sun/star/accessibility/XAccessibleTextAttributes.hpp>
#include <com/sun/star/accessibility/XAccessibleValue.hpp>
#include <com/sun/star/accessibility/XAccessibleAction.hpp>
@@ -893,6 +894,7 @@ void atk_object_wrapper_dispose(AtkObjectWrapper* wrapper)
RELEASE( wrapper->mpMultiLineText )
RELEASE( wrapper->mpTable )
RELEASE( wrapper->mpText )
+ RELEASE( wrapper->mpTextMarkup )
RELEASE( wrapper->mpTextAttributes )
RELEASE( wrapper->mpValue )
}
diff --git a/vcl/unx/gtk/a11y/atkwrapper.hxx b/vcl/unx/gtk/a11y/atkwrapper.hxx
index b3d5aca..092de6e 100644
--- a/vcl/unx/gtk/a11y/atkwrapper.hxx
+++ b/vcl/unx/gtk/a11y/atkwrapper.hxx
@@ -49,6 +49,7 @@ namespace com { namespace sun { namespace star { namespace accessibility {
class XAccessibleSelection;
class XAccessibleTable;
class XAccessibleText;
+ class XAccessibleTextMarkup;
class XAccessibleTextAttributes;
class XAccessibleValue;
} } } }
@@ -69,6 +70,7 @@ struct _AtkObjectWrapper
::com::sun::star::accessibility::XAccessibleSelection *mpSelection;
::com::sun::star::accessibility::XAccessibleTable *mpTable;
::com::sun::star::accessibility::XAccessibleText *mpText;
+ ::com::sun::star::accessibility::XAccessibleTextMarkup *mpTextMarkup;
::com::sun::star::accessibility::XAccessibleTextAttributes *mpTextAttributes;
::com::sun::star::accessibility::XAccessibleValue *mpValue;
commit 62d793e2595b69d299cb192dd8cc03d2fa496f64
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Thu Sep 17 16:34:35 2009 +0000
CWS-TOOLING: integrate CWS vcl105
2009-09-07 Philipp Lohmann fix path issues
2009-09-07 hdu #i104525# Aqua: workaround OSX problem in RecentlyUsed list
2009-09-07 Philipp Lohmann add missing dollar sign
2009-09-07 Philipp Lohmann remove warnings
2009-09-07 hdu #i104011# need to use real-vals in cff-subsetter for some fonts
2009-09-05 Philipp Lohmann #i103674# less noise
2009-09-05 Philipp Lohmann #i103674# add garmin communicator to list of crashing plugins
2009-09-05 Philipp Lohmann #i103674# confiuration option to disable plugin support
2009-09-05 Philipp Lohmann merge #i102735#
2009-09-05 Philipp Lohmann #i88802# enable transparency resolution for PDF/A
2009-09-04 Philipp Lohmann rebase to DEV300m57
2009-09-03 Philipp Lohmann #i90083# fix a typo
2009-09-03 Philipp Lohmann merge
2009-09-03 Philipp Lohmann #i90083# workaround for application frame switching
2009-09-03 hdu #i104720# better description for --without-fonts configure option
2009-09-02 hdu #i104723# update third-party fonts
2009-09-02 hdu #i104723# update default-installed Liberation fonts from 1.04->1.05.1.20090721
2009-09-02 hdu #i104720# update default-installed DejaVu fonts from 2.21->2.30
2009-09-02 hdu #i89682# add Gentium fonts to default installation
2009-09-02 hdu #i89682# add Gentium fonts to default installation
2009-09-01 hdu #i104011# fix vertical offset in PDF-export of USP-layouted text
2009-08-27 Philipp Lohmann #i102033# ignore transients
2009-08-27 Philipp Lohmann merge
2009-08-27 Philipp Lohmann fix warning, remove crappy early exits
2009-08-26 Philipp Lohmann #i63494# user event time for generic plugin always regotten to work around metacity
2009-08-26 Philipp Lohmann merge
2009-08-26 Philipp Lohmann #i104526# fix string conversion
2009-08-25 Philipp Lohmann #b6855541# show newly added driver, repair remove driver
2009-08-25 Philipp Lohmann #i104469# maximizing issue (thanks haggai)
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index 2f8f7b4..1f95d4e 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -147,27 +147,31 @@ void APChooseDriverPage::fill( PrinterInfo& rInfo )
}
}
-void APChooseDriverPage::updateDrivers()
+void APChooseDriverPage::updateDrivers( bool bRefresh, const rtl::OUString& rSelectDriver )
{
for( int k = 0; k < m_aDriverBox.GetEntryCount(); k++ )
delete (String*)m_aDriverBox.GetEntryData( k );
m_aDriverBox.Clear();
std::list< rtl::OUString > aDrivers;
- psp::PPDParser::getKnownPPDDrivers( aDrivers );
+ psp::PPDParser::getKnownPPDDrivers( aDrivers, bRefresh );
+
+ rtl::OUString aSelectDriver( psp::PPDParser::getPPDPrinterName( rSelectDriver ) );
+ rtl::OUString aSelectedEntry;
for( std::list< rtl::OUString >::const_iterator it = aDrivers.begin(); it != aDrivers.end(); ++it )
{
- String aDriver( ::psp::PPDParser::getPPDPrinterName( *it ) );
- if( aDriver.Len() )
+ rtl::OUString aDriver( psp::PPDParser::getPPDPrinterName( *it ) );
+ if( aDriver.getLength() )
{
int nPos = m_aDriverBox.InsertEntry( aDriver );
m_aDriverBox.SetEntryData( nPos, new String( *it ) );
- if( it->equalsAscii( "SGENPRT" ) )
- m_aDriverBox.SelectEntryPos( nPos );
+ if( aDriver == aSelectDriver )
+ aSelectedEntry = aDriver;
}
}
+ m_aDriverBox.SelectEntry( aSelectedEntry );
m_aRemBtn.Enable( m_aDriverBox.GetEntryCount() > 0 );
}
@@ -185,7 +189,13 @@ IMPL_LINK( APChooseDriverPage, ClickBtnHdl, PushButton*, pButton )
{
PPDImportDialog aDlg( this );
if( aDlg.Execute() )
- updateDrivers();
+ {
+ const std::list< rtl::OUString >& rImported( aDlg.getImportedFiles() );
+ if( rImported.empty() )
+ updateDrivers( true );
+ else
+ updateDrivers( true, rImported.front() );
+ }
}
else if( pButton == &m_aRemBtn )
{
@@ -259,11 +269,10 @@ IMPL_LINK( APChooseDriverPage, ClickBtnHdl, PushButton*, pButton )
rPIManager.removePrinter( *it );
}
- ::std::list< rtl::OUString > aDirs;
+ std::list< rtl::OUString > aDirs;
// get only psprint's directories, not eventual system dirs
psp::getPrinterPathList( aDirs, NULL );
- ::std::list< rtl::OUString >::iterator dir;
-
+ std::list< rtl::OUString >::iterator dir;
for( dir = aDirs.begin(); dir != aDirs.end(); ++dir )
{
::std::list< String > aFiles;
@@ -271,10 +280,11 @@ IMPL_LINK( APChooseDriverPage, ClickBtnHdl, PushButton*, pButton )
OUStringBuffer aDir( *dir );
aDir.append( sal_Unicode( '/' ) );
aDir.appendAscii( PRINTER_PPDDIR );
- FindFiles( aDir.makeStringAndClear(), aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PS;PPD;PS.GZ;PPD.GZ" ) ), true );
+ rtl::OUString aPPDDir( aDir.makeStringAndClear() );
+ FindFiles( aPPDDir, aFiles, String( RTL_CONSTASCII_USTRINGPARAM( "PS;PPD;PS.GZ;PPD.GZ" ) ), true );
for( file = aFiles.begin(); file != aFiles.end(); ++file )
{
- String aFile( *dir );
+ String aFile( aPPDDir );
if( aFile.GetChar( aFile.Len() ) != '/' )
aFile.AppendAscii( "/" );
aFile.Append( *file );
diff --git a/padmin/source/adddlg.hxx b/padmin/source/adddlg.hxx
index 7ae6324..1924622 100644
--- a/padmin/source/adddlg.hxx
+++ b/padmin/source/adddlg.hxx
@@ -96,7 +96,7 @@ class APChooseDriverPage : public APTabPage
DECL_LINK( ClickBtnHdl, PushButton* );
DECL_LINK( DelPressedHdl, ListBox* );
- void updateDrivers();
+ void updateDrivers( bool bRefresh = false, const rtl::OUString& rSelectDriver = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "SGENPRT" ) ) );
public:
APChooseDriverPage( AddPrinterDialog* pParent );
~APChooseDriverPage();
diff --git a/padmin/source/newppdlg.cxx b/padmin/source/newppdlg.cxx
index c37bd29..1ef313c 100644
--- a/padmin/source/newppdlg.cxx
+++ b/padmin/source/newppdlg.cxx
@@ -172,6 +172,7 @@ IMPL_LINK( PPDImportDialog, ClickBtnHdl, PushButton*, pButton )
::std::list< rtl::OUString > aToDirs;
psp::getPrinterPathList( aToDirs, PRINTER_PPDDIR );
::std::list< rtl::OUString >::iterator writeDir = aToDirs.begin();
+ m_aImportedFiles.clear();
for( int i = 0; i < m_aDriverLB.GetSelectEntryCount(); i++ )
{
@@ -186,7 +187,10 @@ IMPL_LINK( PPDImportDialog, ClickBtnHdl, PushButton*, pButton )
aToFile.Append( aFile.GetName() );
OUString aToUni( aToFile.GetMainURL(INetURLObject::DECODE_TO_IURI) );
if( ! File::copy( aFromUni, aToUni ) )
+ {
+ m_aImportedFiles.push_back( aToUni );
break;
+ }
++writeDir;
} while( writeDir != aToDirs.end() );
}
diff --git a/padmin/source/newppdlg.hxx b/padmin/source/newppdlg.hxx
index 3b1011b..1cd7c77 100644
--- a/padmin/source/newppdlg.hxx
+++ b/padmin/source/newppdlg.hxx
@@ -64,9 +64,14 @@ namespace padmin {
DECL_LINK( ModifyHdl, ComboBox* );
void Import();
+
+ std::list< rtl::OUString > m_aImportedFiles;
public:
PPDImportDialog( Window* pParent );
~PPDImportDialog();
+
+ const std::list< rtl::OUString >& getImportedFiles() const
+ { return m_aImportedFiles; }
};
} // namespace
diff --git a/svtools/source/numbers/zforscan.cxx b/svtools/source/numbers/zforscan.cxx
index 44fe8a0..ab780cd 100644
--- a/svtools/source/numbers/zforscan.cxx
+++ b/svtools/source/numbers/zforscan.cxx
@@ -491,6 +491,8 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
if ( j < NF_MAX_DEFAULT_COLORS )
i = j;
}
+
+ Color* pResult = NULL;
if (i >= NF_MAX_DEFAULT_COLORS)
{
const String& rColorWord = pKeyword[NF_KEY_COLOR];
@@ -516,15 +518,9 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
{
long nIndex = sString.ToInt32();
if (nIndex > 0 && nIndex <= 64)
- return pFormatter->GetUserDefColor((USHORT)nIndex-1);
- else
- return NULL;
+ pResult = pFormatter->GetUserDefColor((USHORT)nIndex-1);
}
- else
- return NULL;
}
- else
- return NULL;
}
else
{
@@ -538,8 +534,9 @@ Color* ImpSvNumberformatScan::GetColor(String& sStr)
else
sStr = pKeyword[NF_KEY_FIRSTCOLOR+i];
- return &(StandardColor[i]);
+ pResult = &(StandardColor[i]);
}
+ return pResult;
}
diff --git a/vcl/aqua/inc/vclnsapp.h b/vcl/aqua/inc/vclnsapp.h
index 589aaa9..15a7658 100755
--- a/vcl/aqua/inc/vclnsapp.h
+++ b/vcl/aqua/inc/vclnsapp.h
@@ -34,7 +34,9 @@
#include "premac.h"
#include "Cocoa/Cocoa.h"
#include "postmac.h"
-
+
+class AquaSalFrame;
+
@interface CocoaThreadEnabler : NSObject
{
}
@@ -64,6 +66,8 @@
-(void)applicationWillResignActive: (NSNotification *)pNotification;
-(MacOSBOOL)applicationShouldHandleReopen: (NSApplication*)pApp hasVisibleWindows: (MacOSBOOL)bWinVisible;
-(void)setDockIconClickHandler: (NSObject*)pHandler;
+-(void)cycleFrameForward: (AquaSalFrame*)pCurFrame;
+-(void)cycleFrameBackward: (AquaSalFrame*)pCurFrame;
@end
#endif
diff --git a/vcl/aqua/source/a11y/aqua11yfactory.mm b/vcl/aqua/source/a11y/aqua11yfactory.mm
index b660472..a49bce9 100644
--- a/vcl/aqua/source/a11y/aqua11yfactory.mm
+++ b/vcl/aqua/source/a11y/aqua11yfactory.mm
@@ -151,7 +151,18 @@ static bool enabled = false;
}
[ nativeRole release ];
[ aWrapper setActsAsRadioGroup: asRadioGroup ];
- if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) ) {
+ #if 0
+ /* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
+ That means we need to cache this, else e.g. tree list boxes are not accessible (moreover
+ it crashes by notifying dead objects - which would seemt o be another bug)
+
+ FIXME:
+ Unfortunately this can increase memory consumption drastically until the non transient parent
+ is destroyed an finally all the transients are released.
+ */
+ if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) )
+ #endif
+ {
[ dAllWrapper setObject: aWrapper forKey: nKey ];
}
}
diff --git a/vcl/aqua/source/a11y/aqua11ywrapper.mm b/vcl/aqua/source/a11y/aqua11ywrapper.mm
index 99bcbd2..64e0e9e 100644
--- a/vcl/aqua/source/a11y/aqua11ywrapper.mm
+++ b/vcl/aqua/source/a11y/aqua11ywrapper.mm
@@ -109,7 +109,18 @@ static MacOSBOOL isPopupMenuOpen = NO;
// XAccessibleMultiLineText
mpReferenceWrapper -> rAccessibleMultiLineText = Reference < XAccessibleMultiLineText > ( rxAccessibleContext, UNO_QUERY );
// XAccessibleEventBroadcaster
- if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) ) {
+ #if 0
+ /* #i102033# NSAccessibility does not seemt to know an equivalent for transient children.
+ That means we need to cache this, else e.g. tree list boxes are not accessible (moreover
+ it crashes by notifying dead objects - which would seemt o be another bug)
+
+ FIXME:
+ Unfortunately this can increase memory consumption drastically until the non transient parent
+ is destroyed an finally all the transients are released.
+ */
+ if ( ! rxAccessibleContext -> getAccessibleStateSet() -> contains ( AccessibleStateType::TRANSIENT ) )
+ #endif
+ {
Reference< XAccessibleEventBroadcaster > xBroadcaster(rxAccessibleContext, UNO_QUERY);
if( xBroadcaster.is() ) {
/*
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm
index 43d44c7..5a295b5 100755
--- a/vcl/aqua/source/app/vclnsapp.mm
+++ b/vcl/aqua/source/app/vclnsapp.mm
@@ -104,6 +104,24 @@
return;
}
}
+
+ // #i90083# handle frame switching
+ // FIXME: lousy workaround
+ if( (nModMask & (NSControlKeyMask|NSAlternateKeyMask)) == 0 )
+ {
+ if( [[pEvent characters] isEqualToString: @"<"] ||
+ [[pEvent characters] isEqualToString: @"~"] )
+ {
+ [self cycleFrameForward: pFrame];
+ return;
+ }
+ else if( [[pEvent characters] isEqualToString: @">"] ||
+ [[pEvent characters] isEqualToString: @"`"] )
+ {
+ [self cycleFrameBackward: pFrame];
+ return;
+ }
+ }
// get information whether the event was handled; keyDown returns nothing
GetSalData()->maKeyEventAnswer[ pEvent ] = false;
@@ -186,6 +204,84 @@
{
[super sendEvent: pEvent];
}
+
+-(void)cycleFrameForward: (AquaSalFrame*)pCurFrame
+{
+ // find current frame in list
+ std::list< AquaSalFrame* >& rFrames( GetSalData()->maFrames );
+ std::list< AquaSalFrame* >::iterator it = rFrames.begin();
+ for( ; it != rFrames.end() && *it != pCurFrame; ++it )
+ ;
+ if( it != rFrames.end() )
+ {
+ // now find the next frame (or end)
+ do
+ {
+ ++it;
+ if( it != rFrames.end() )
+ {
+ if( (*it)->mpDockMenuEntry != NULL &&
+ (*it)->mbShown )
+ {
+ [(*it)->getWindow() makeKeyAndOrderFront: NSApp];
+ return;
+ }
+ }
+ } while( it != rFrames.end() );
+ // cycle around, find the next up to pCurFrame
+ it = rFrames.begin();
+ while( *it != pCurFrame )
+ {
+ if( (*it)->mpDockMenuEntry != NULL &&
+ (*it)->mbShown )
+ {
+ [(*it)->getWindow() makeKeyAndOrderFront: NSApp];
+ return;
+ }
+ ++it;
+ }
+ }
+}
+
+-(void)cycleFrameBackward: (AquaSalFrame*)pCurFrame
+{
+ // do the same as cycleFrameForward only with a reverse iterator
+
+ // find current frame in list
+ std::list< AquaSalFrame* >& rFrames( GetSalData()->maFrames );
+ std::list< AquaSalFrame* >::reverse_iterator it = rFrames.rbegin();
+ for( ; it != rFrames.rend() && *it != pCurFrame; ++it )
+ ;
+ if( it != rFrames.rend() )
+ {
+ // now find the next frame (or end)
+ do
+ {
+ ++it;
+ if( it != rFrames.rend() )
+ {
+ if( (*it)->mpDockMenuEntry != NULL &&
+ (*it)->mbShown )
+ {
+ [(*it)->getWindow() makeKeyAndOrderFront: NSApp];
+ return;
+ }
+ }
+ } while( it != rFrames.rend() );
+ // cycle around, find the next up to pCurFrame
+ it = rFrames.rbegin();
+ while( *it != pCurFrame )
+ {
+ if( (*it)->mpDockMenuEntry != NULL &&
+ (*it)->mbShown )
+ {
+ [(*it)->getWindow() makeKeyAndOrderFront: NSApp];
+ return;
+ }
+ ++it;
+ }
+ }
+}
-(NSMenu*)applicationDockMenu:(NSApplication *)sender
{
diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index b0e502b..0759bc4 100644
--- a/vcl/inc/vcl/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -202,7 +202,7 @@ public:
static const PPDParser* getParser( const String& rFile );
static String getPPDPrinterName( const String& rFile );
static void freeAll();
- static void getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers );
+ static void getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool bRefresh = false );
const String& getFilename() const { return m_aFile; }
diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx
index 912dee9..281262b 100644
--- a/vcl/source/fontsubset/cff.cxx
+++ b/vcl/source/fontsubset/cff.cxx
@@ -42,8 +42,10 @@ typedef long long S64;
typedef sal_Int32 GlyphWidth;
+typedef float RealType;
+typedef RealType ValType;
#include <vector>
-typedef std::vector<int> IntVector;
+typedef std::vector<ValType> ValVector;
// ====================================================================
@@ -310,8 +312,8 @@ struct CffGlobal
int mnFontDictBase;
int mnFDAryCount;
- IntVector maFontBBox;
- //FloatVector maFontMatrix;
+ ValVector maFontBBox;
+ ValVector maFontMatrix;
int mnFontNameSID;
int mnFullNameSID;
@@ -336,16 +338,16 @@ struct CffLocal
// ATM hinting related values
int mnStemStdHW;
int mnStemStdVW;
- IntVector maStemSnapH;
- IntVector maStemSnapV;
- IntVector maBlueValues;
- IntVector maOtherBlues;
- IntVector maFamilyBlues;
- IntVector maFamilyOtherBlues;
- double mfBlueScale;
- double mfBlueShift;
- double mfBlueFuzz;
- double mfExpFactor;
+ ValVector maStemSnapH;
+ ValVector maStemSnapV;
+ ValVector maBlueValues;
+ ValVector maOtherBlues;
+ ValVector maFamilyBlues;
+ ValVector maFamilyOtherBlues;
+ RealType mfBlueScale;
+ RealType mfBlueShift;
+ RealType mfBlueFuzz;
+ RealType mfExpFactor;
int mnLangGroup;
bool mbForceBold;
};
@@ -422,7 +424,7 @@ private:
CffLocal* mpCffLocal;
void readDictOp( void);
- double readRealVal( void);
+ RealType readRealVal( void);
const char* getString( int nStringID);
int getFDSelect( int nGlyphIndex) const;
int getGlyphSID( int nGlyphIndex) const;
@@ -431,7 +433,7 @@ private:
void readTypeOp( void);
void read2push( void);
void pop2write( void);
- void writeType1Val( int/*TODO: double*/ nVal);
+ void writeType1Val( ValType);
void writeTypeOp( int nTypeOp);
void writeTypeEsc( int nTypeOp);
void writeCurveTo( int nStackPos, int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3);
@@ -441,10 +443,13 @@ private:
public: // TODO: is public really needed?
// accessing the value stack
// TODO: add more checks
- void push( int nVal) { mnValStack[ mnStackIdx++] = nVal;}
- int pop( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
- int peek( void) { return ((mnStackIdx>0) ? mnValStack[ mnStackIdx-1] : 0);}
- int get( int nIndex) { return mnValStack[ nIndex];}
+ void push( ValType nVal) { mnValStack[ mnStackIdx++] = nVal;}
+ ValType popVal( void) { return ((mnStackIdx>0) ? mnValStack[ --mnStackIdx] : 0);}
+ ValType peekVal( void) const { return ((mnStackIdx>0) ? mnValStack[ mnStackIdx-1] : 0);}
+ ValType getVal( int nIndex) const { return mnValStack[ nIndex];}
+ int popInt( void);
+ int peekInt( void) const;
+ int getInt( int nIndex) const;
int size( void) const { return mnStackIdx;}
bool empty( void) const { return !mnStackIdx;}
void clear( void) { mnStackIdx = 0;}
@@ -453,7 +458,7 @@ public: // TODO: is public really needed?
void addHints( bool bVerticalHints);
int getHorzHintCount( void) const { return (mnHorzHintSize/2);}
int getVertHintCount( void) const { return (mnHintSize-mnHorzHintSize)/2;}
- void getHintPair( int nIndex, int* nMin, int* nEnd) const;
+ void getHintPair( int nIndex, ValType* nMin, ValType* nEnd) const;
// accessing other charstring specifics
bool hasCharWidth( void) const { return (mnCharWidth != -1);}
@@ -465,12 +470,12 @@ public: // TODO: is public really needed?
private:
// typeop exceution context
int mnStackIdx;
- int mnValStack[ NMAXSTACK];
- int mnTransVals[ NMAXTRANS];
+ ValType mnValStack[ NMAXSTACK];
+ ValType mnTransVals[ NMAXTRANS];
int mnHintSize;
int mnHorzHintSize;
- int mnHintStack[ NMAXHINTS];
+ ValType mnHintStack[ NMAXHINTS];
int mnCharWidth;
};
@@ -499,6 +504,36 @@ CffSubsetterContext::~CffSubsetterContext( void)
// --------------------------------------------------------------------
+inline int CffSubsetterContext::popInt( void)
+{
+ const ValType aVal = popVal();
+ const int nInt = static_cast<int>(aVal);
+ assert( nInt == aVal);
+ return nInt;
+}
+
+// --------------------------------------------------------------------
+
+inline int CffSubsetterContext::peekInt( void) const
+{
+ const ValType aVal = peekVal();
+ const int nInt = static_cast<int>(aVal);
+ assert( nInt == aVal);
+ return nInt;
+}
+
+// --------------------------------------------------------------------
+
+inline int CffSubsetterContext::getInt( int nIndex) const
+{
+ const ValType aVal = getVal( nIndex);
+ const int nInt = static_cast<int>(aVal);
+ assert( nInt == aVal);
+ return nInt;
+}
+
+// --------------------------------------------------------------------
+
inline void CffSubsetterContext::updateWidth( bool bUseFirstVal)
{
#if 1 // TODO: is this still needed?
@@ -507,7 +542,7 @@ inline void CffSubsetterContext::updateWidth( bool bUseFirstVal)
return;
#endif
if( bUseFirstVal) {
- mnCharWidth = mpCffLocal->mnNominalWidth + mnValStack[0];
+ mnCharWidth = static_cast<int>(mpCffLocal->mnNominalWidth + mnValStack[0]);
// remove bottom stack entry
--mnStackIdx;
for( int i = 0; i < mnStackIdx; ++i)
@@ -535,16 +570,16 @@ void CffSubsetterContext::addHints( bool bVerticalHints)
assert( (mnHintSize + mnStackIdx) <= 2*NMAXHINTS);
#ifdef IGNORE_HINTS
- mnHorzHintSize += mnStackIdx;
+ mnHintSize += mnStackIdx;
#else
- int nHintOfs = 0;
+ ValType nHintOfs = 0;
for( int i = 0; i < mnStackIdx; ++i) {
- nHintOfs += mnValStack[ i];
+ nHintOfs += mnValStack[ i ];
mnHintStack[ mnHintSize++] = nHintOfs;
}
+#endif // IGNORE_HINTS
if( !bVerticalHints)
mnHorzHintSize = mnHintSize;
-#endif // IGNORE_HINTS
// clear all values from the stack
mnStackIdx = 0;
@@ -552,12 +587,12 @@ void CffSubsetterContext::addHints( bool bVerticalHints)
// --------------------------------------------------------------------
-void CffSubsetterContext::getHintPair( int nIndex, int* pMin, int* pEnd) const
+void CffSubsetterContext::getHintPair( int nIndex, ValType* pMin, ValType* pEnd) const
{
nIndex *= 2;
assert( nIndex < mnHintSize);
assert( nIndex >= 0);
- const int* pHint = &mnHintStack[ nIndex];
+ const ValType* pHint = &mnHintStack[ nIndex ];
*pMin = pHint[0];
*pEnd = pHint[1];
}
@@ -596,7 +631,8 @@ void CffSubsetterContext::readCharString( const U8* pTypeOps, int nTypeLen)
void CffSubsetterContext::readDictOp( void)
{
- int nVal = 0;
+ ValType nVal = 0;
+ int nInt = 0;
const U8 c = *mpReadPtr;
if( c <= 21 ) {
int nOpId = *(mpReadPtr++);
@@ -613,41 +649,45 @@ void CffSubsetterContext::readDictOp( void)
switch( *pCmdName) {
default: fprintf( stderr, "unsupported DictOp.type=\'%c\'\n", *pCmdName); break;
case 'b': // bool
- nVal = pop();
+ nInt = popInt();
switch( nOpId) {
- case 915: mpCffLocal->mbForceBold = nVal; break; // "ForceBold"
+ case 915: mpCffLocal->mbForceBold = nInt; break; // "ForceBold"
default: break; // TODO: handle more boolean dictops?
}
break;
case 'n': // dict-op number
- nVal = pop();
+ nVal = popVal();
+ nInt = static_cast<int>(nVal);
switch( nOpId) {
- case 10: mpCffLocal->mnStemStdHW = nVal; break; // "StdHW"
- case 11: mpCffLocal->mnStemStdVW = nVal; break; // "StdVW"
- case 15: mnCharsetBase = nVal; break; // "charset"
- case 16: mnEncodingBase = nVal; break; // "nEncoding"
- case 17: mnCharStrBase = nVal; break; // "nCharStrings"
- case 19: mpCffLocal->mnLocalSubrOffs = nVal; break;// "nSubrs"
- case 20: setDefaultWidth( nVal); break; // "defaultWidthX"
- case 21: setNominalWidth( nVal); break; // "nominalWidthX"
+ case 10: mpCffLocal->mnStemStdHW = nInt; break; // "StdHW"
+ case 11: mpCffLocal->mnStemStdVW = nInt; break; // "StdVW"
+ case 15: mnCharsetBase = nInt; break; // "charset"
+ case 16: mnEncodingBase = nInt; break; // "nEncoding"
+ case 17: mnCharStrBase = nInt; break; // "nCharStrings"
+ case 19: mpCffLocal->mnLocalSubrOffs = nInt; break;// "nSubrs"
+ case 20: setDefaultWidth( nInt ); break; // "defaultWidthX"
+ case 21: setNominalWidth( nInt ); break; // "nominalWidthX"
case 909: mpCffLocal->mfBlueScale = nVal; break; // "BlueScale"
case 910: mpCffLocal->mfBlueShift = nVal; break; // "BlueShift"
case 911: mpCffLocal->mfBlueFuzz = nVal; break; // "BlueFuzz"
case 912: mpCffLocal->mfExpFactor = nVal; break; // "ExpansionFactor"
- case 917: mpCffLocal->mnLangGroup = nVal; break; // "LanguageGroup"
- case 936: mnFontDictBase = nVal; break; // "nFDArray"
- case 937: mnFDSelectBase = nVal; break; // "nFDSelect"
+ case 917: mpCffLocal->mnLangGroup = nInt; break; // "LanguageGroup"
+ case 936: mnFontDictBase = nInt; break; // "nFDArray"
+ case 937: mnFDSelectBase = nInt; break; // "nFDSelect"
default: break; // TODO: handle more numeric dictops?
}
break;
case 'a': { // array
+ switch( nOpId) {
+ case 5: maFontBBox.clear(); break; // "FontBBox"
+ case 907: maFontMatrix.clear(); break; // "FontMatrix"
+ default: break; // TODO: reset other arrays?
+ }
for( int i = 0; i < size(); ++i ) {
- nVal = get(i);
+ nVal = getVal(i);
switch( nOpId) {
case 5: maFontBBox.push_back( nVal); break; // "FontBBox"
-#if 0 // TODO
case 907: maFontMatrix.push_back( nVal); break; // "FontMatrix"
-#endif
default: break; // TODO: handle more array dictops?
}
}
@@ -656,7 +696,7 @@ void CffSubsetterContext::readDictOp( void)
case 'd': { // delta array
nVal = 0;
for( int i = 0; i < size(); ++i ) {
- nVal += get(i);
+ nVal += getVal(i);
switch( nOpId) {
case 6: mpCffLocal->maBlueValues.push_back( nVal); break; // "BlueValues"
case 7: mpCffLocal->maOtherBlues.push_back( nVal); break; // "OtherBlues"
@@ -670,39 +710,39 @@ void CffSubsetterContext::readDictOp( void)
clear();
} break;
case 's': // stringid (SID)
- nVal = pop();
- switch( nOpId) {
- case 2: mnFullNameSID = nVal; break; // "FullName"
- case 3: mnFamilyNameSID = nVal; break; // "FamilyName"
- case 938: mnFontNameSID = nVal; break; // "FontName"
+ nInt = popInt();
+ switch( nOpId ) {
+ case 2: mnFullNameSID = nInt; break; // "FullName"
+ case 3: mnFamilyNameSID = nInt; break; // "FamilyName"
+ case 938: mnFontNameSID = nInt; break; // "FontName"
default: break; // TODO: handle more string dictops?
}
break;
case 'P': // private dict
- mpCffLocal->mnPrivDictBase = pop();
- mpCffLocal->mnPrivDictSize = pop();
+ mpCffLocal->mnPrivDictBase = popInt();
+ mpCffLocal->mnPrivDictSize = popInt();
break;
case 'r': { // ROS operands
- int nSid1 = pop();
- int nSid2 = pop();
+ int nSid1 = popInt();
+ int nSid2 = popInt();
(void)nSid1; // TODO: use
(void)nSid2; // TODO: use
- nVal = pop();
+ nVal = popVal();
mbCIDFont = true;
} break;
case 't': // CharstringType
- nVal = pop();
- setCharStringType( nVal);
+ nInt = popInt();
+ setCharStringType( nInt );
break;
}
- return;
+ return;
}
- if( (c >= 32) || (c == 28)) {
+ if( (c >= 32) || (c == 28) ) {
// --mpReadPtr;
read2push();
- } else if( c == 29) { // longint
+ } else if( c == 29 ) { // longint
++mpReadPtr; // skip 29
int nS32 = mpReadPtr[0] << 24;
nS32 += mpReadPtr[1] << 16;
@@ -711,13 +751,13 @@ void CffSubsetterContext::readDictOp( void)
if( (sizeof(nS32) != 4) && (nS32 & (1<<31)))
nS32 |= (~0U) << 31; // assuming 2s complement
mpReadPtr += 4;
- nVal = nS32;
- push( nVal);
+ nVal = static_cast<ValType>(nS32);
+ push( nVal );
} else if( c == 30) { // real number
++mpReadPtr; // skip 30
- const double fReal = readRealVal();
+ const RealType fReal = readRealVal();
// push value onto stack
- nVal = static_cast<int>(fReal+0.5); //TODO!!! allow float on operand stack!
+ nVal = fReal;
push( nVal);
}
}
@@ -759,12 +799,12 @@ void CffSubsetterContext::readTypeOp( void)
case 'C': nMinStack = 6; nMaxStack = 999; break;
case 'E': nMinStack = 1; nMaxStack = 999; break;
case 'G': nMinStack = 1; nMaxStack = 999; // global subr
- nVal = peek();
+ nVal = peekInt();
// TODO global subr
break;
case 'L': // local subr
nMinStack = 1; nMaxStack = 999;
- nVal = peek();
+ nVal = peekInt();
// TODO local subr
break;
case 'I': // operands for "index"
@@ -830,57 +870,70 @@ void CffSubsetterContext::readTypeOp( void)
// --------------------------------------------------------------------
-void CffSubsetterContext::read2push( void)
+void CffSubsetterContext::read2push()
{
- int nVal = 0;
+ ValType aVal = 0;
const U8*& p = mpReadPtr;
const U8 c = *p;
- if( c == 28) {
+ if( c == 28 ) {
short nS16 = (p[1] << 8) + p[2];
if( (sizeof(nS16) != 2) && (nS16 & (1<<15)))
nS16 |= (~0U) << 15; // assuming 2s complement
- nVal = nS16;
+ aVal = nS16;
p += 3;
- } else if( c <= 246) { // -107..+107
- nVal = p[0] - 139;
+ } else if( c <= 246 ) { // -107..+107
+ aVal = static_cast<ValType>(p[0] - 139);
p += 1;
- } else if( c <= 250) { // +108..+1131
- nVal = ((p[0] << 8) + p[1]) - 63124;
+ } else if( c <= 250 ) { // +108..+1131
+ aVal = static_cast<ValType>(((p[0] << 8) + p[1]) - 63124);
p += 2;
- } else if( c <= 254) { // -108..-1131
- nVal = 64148 - ((p[0] << 8) + p[1]);
+ } else if( c <= 254 ) { // -108..-1131
+ aVal = static_cast<ValType>(64148 - ((p[0] << 8) + p[1]));
p += 2;
} else /*if( c == 255)*/ { // Fixed16.16
- nVal = (p[1] << 8) + p[2];
- // TODO: read non-integer part
+ int nS32 = (p[1] << 24) + (p[2] << 16) + (p[3] << 8) + p[4];
+ if( (sizeof(nS32) != 2) && (nS32 & (1<<31)))
+ nS32 |= (~0U) << 31; // assuming 2s complement
+ aVal = static_cast<ValType>(nS32 * (1.0 / 0x10000));
p += 5;
}
- push( nVal);
+ push( aVal);
}
// --------------------------------------------------------------------
-void CffSubsetterContext::writeType1Val( int/*TODO: double*/ nVal)
+void CffSubsetterContext::writeType1Val( ValType aVal)
{
U8* pOut = mpWritePtr;
- if( (nVal >= -107) && (nVal <= +107)) {
- *(pOut++) = static_cast<U8>(nVal + 139); // -107..+107
- } else if( (nVal >= -1131) && (nVal <= +1131)) {
- if( nVal >= 0)
- nVal += 63124; // +108..+1131
+
+ int nInt = static_cast<int>(aVal);
+ static const int nOutCharstrType = 1;
+ if( (nInt != aVal) && (nOutCharstrType == 2)) {
+ // numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
+ *(pOut++) = 255; // Fixed 16.16
+ *(pOut++) = static_cast<U8>(nInt >> 8);
+ *(pOut++) = static_cast<U8>(nInt);
+ nInt = static_cast<int>(aVal * 0x10000) & 0xFFFF;
+ *(pOut++) = static_cast<U8>(nInt >> 8);
+ *(pOut++) = static_cast<U8>(nInt);
+ } else if( (nInt >= -107) && (nInt <= +107)) {
+ *(pOut++) = static_cast<U8>(nInt + 139); // -107..+107
+ } else if( (nInt >= -1131) && (nInt <= +1131)) {
+ if( nInt >= 0)
+ nInt += 63124; // +108..+1131
else
- nVal = 64148 - nVal; // -108..-1131
- *(pOut++) = static_cast<U8>(nVal >> 8);
- *(pOut++) = static_cast<U8>(nVal);
- } else {
+ nInt = 64148 - nInt; // -108..-1131
+ *(pOut++) = static_cast<U8>(nInt >> 8);
+ *(pOut++) = static_cast<U8>(nInt);
+ } else if( nOutCharstrType == 1) {
// numtype==255 means int32 for Type1, but 16.16 for Type2 charstrings!!!
*(pOut++) = 255;
- *(pOut++) = static_cast<U8>(nVal >> 24);
- *(pOut++) = static_cast<U8>(nVal >> 16);
- *(pOut++) = static_cast<U8>(nVal >> 8);
- *(pOut++) = static_cast<U8>(nVal);
+ *(pOut++) = static_cast<U8>(nInt >> 24);
+ *(pOut++) = static_cast<U8>(nInt >> 16);
+ *(pOut++) = static_cast<U8>(nInt >> 8);
+ *(pOut++) = static_cast<U8>(nInt);
}
mpWritePtr = pOut;
@@ -890,8 +943,8 @@ void CffSubsetterContext::writeType1Val( int/*TODO: double*/ nVal)
inline void CffSubsetterContext::pop2write( void)
{
- int nVal = pop();
- writeType1Val( nVal);
+ const ValType aVal = popVal();
+ writeType1Val( aVal);
}
// --------------------------------------------------------------------
@@ -915,8 +968,8 @@ void CffSubsetterContext::pop2MultiWrite( int nArgsPerTypo, int nTypeOp, int nTy
{
for( int i = 0; i < mnStackIdx;) {
for( int j = 0; j < nArgsPerTypo; ++j) {
- int nVal = mnValStack[i+j];
- writeType1Val( nVal);
+ const ValType aVal = mnValStack[i+j];
+ writeType1Val( aVal);
}
i += nArgsPerTypo;
writeTypeOp( nTypeOp);
@@ -931,8 +984,8 @@ void CffSubsetterContext::popAll2Write( int nTypeOp)
{
// pop in reverse order, then write
for( int i = 0; i < mnStackIdx; ++i) {
- int nVal = mnValStack[i];
- writeType1Val( nVal);
+ const ValType aVal = mnValStack[i];
+ writeType1Val( aVal);
}
clear();
writeTypeOp( nTypeOp);
@@ -944,23 +997,23 @@ void CffSubsetterContext::writeCurveTo( int nStackPos,
int nIX1, int nIY1, int nIX2, int nIY2, int nIX3, int nIY3)
{
// get the values from the stack
- const int nDX1 = nIX1 ? mnValStack[ nStackPos+nIX1] : 0;
- const int nDY1 = nIY1 ? mnValStack[ nStackPos+nIY1] : 0;
- const int nDX2 = nIX2 ? mnValStack[ nStackPos+nIX2] : 0;
- const int nDY2 = nIY2 ? mnValStack[ nStackPos+nIY2] : 0;
- const int nDX3 = nIX3 ? mnValStack[ nStackPos+nIX3] : 0;
- const int nDY3 = nIY3 ? mnValStack[ nStackPos+nIY3] : 0;
+ const ValType nDX1 = nIX1 ? mnValStack[ nStackPos+nIX1 ] : 0;
+ const ValType nDY1 = nIY1 ? mnValStack[ nStackPos+nIY1 ] : 0;
+ const ValType nDX2 = nIX2 ? mnValStack[ nStackPos+nIX2 ] : 0;
+ const ValType nDY2 = nIY2 ? mnValStack[ nStackPos+nIY2 ] : 0;
+ const ValType nDX3 = nIX3 ? mnValStack[ nStackPos+nIX3 ] : 0;
+ const ValType nDY3 = nIY3 ? mnValStack[ nStackPos+nIY3 ] : 0;
// emit the curveto operator and operands
// TODO: determine the most efficient curveto operator
// TODO: depending on type1op or type2op target
- writeType1Val( nDX1);
- writeType1Val( nDY1);
- writeType1Val( nDX2);
- writeType1Val( nDY2);
- writeType1Val( nDX3);
- writeType1Val( nDY3);
- writeTypeOp( TYPE1OP::RCURVETO);
+ writeType1Val( nDX1 );
+ writeType1Val( nDY1 );
+ writeType1Val( nDX2 );
+ writeType1Val( nDY2 );
+ writeType1Val( nDX3 );
+ writeType1Val( nDY3 );
+ writeTypeOp( TYPE1OP::RCURVETO );
}
// --------------------------------------------------------------------
@@ -969,7 +1022,7 @@ void CffSubsetterContext::convertOneTypeOp( void)
{
const int nType2Op = *(mpReadPtr++);
- int i, nVal; // prevent WAE for declarations inside switch cases
+ int i, nInt; // prevent WAE for declarations inside switch cases
// convert each T2op
switch( nType2Op) {
case TYPE2OP::T2ESC:
@@ -977,12 +1030,12 @@ void CffSubsetterContext::convertOneTypeOp( void)
break;
case TYPE2OP::HSTEM:
case TYPE2OP::VSTEM:
- addHints( nType2Op == TYPE2OP::VSTEM);
+ addHints( nType2Op == TYPE2OP::VSTEM );
#ifndef IGNORE_HINTS
- for( i = 0; i < mnHintSize; i+=2) {
+ for( i = 0; i < mnHintSize; i+=2 ) {
writeType1Val( mnHintStack[i]);
writeType1Val( mnHintStack[i+1] - mnHintStack[i]);
- writeTypeOp( nType2Op);
+ writeTypeOp( nType2Op );
}
#endif // IGNORE_HINTS
break;
@@ -1063,9 +1116,9 @@ void CffSubsetterContext::convertOneTypeOp( void)
case TYPE2OP::CALLSUBR:
case TYPE2OP::CALLGSUBR:
{
- nVal = pop();
+ nInt = popInt();
const bool bGlobal = (nType2Op == TYPE2OP::CALLGSUBR);
- callType2Subr( bGlobal, nVal);
+ callType2Subr( bGlobal, nInt);
}
break;
case TYPE2OP::RETURN:
@@ -1131,19 +1184,19 @@ void CffSubsetterContext::convertOneTypeOp( void)
{
bool bVert = (nType2Op == TYPE2OP::VHCURVETO);
i = 0;
- nVal = 0;
- if( mnStackIdx & 1)
- nVal = mnValStack[ --mnStackIdx];
+ nInt = 0;
+ if( mnStackIdx & 1 )
+ nInt = static_cast<int>(mnValStack[ --mnStackIdx ]);
while( (i += 4) <= mnStackIdx) {
// TODO: use writeCurveTo()
- if( bVert) writeType1Val( 0);
- writeType1Val( mnValStack[i-4]);
- if( !bVert) writeType1Val( 0);
- writeType1Val( mnValStack[i-3]);
- writeType1Val( mnValStack[i-2]);
- if( !bVert) writeType1Val( (i==mnStackIdx) ? nVal : 0);
- writeType1Val( mnValStack[i-1]);
- if( bVert) writeType1Val( (i==mnStackIdx) ? nVal : 0 );
+ if( bVert ) writeType1Val( 0 );
+ writeType1Val( mnValStack[i-4] );
+ if( !bVert ) writeType1Val( 0);
+ writeType1Val( mnValStack[i-3] );
+ writeType1Val( mnValStack[i-2] );
+ if( !bVert ) writeType1Val( static_cast<ValType>((i==mnStackIdx) ? nInt : 0) );
+ writeType1Val( mnValStack[i-1] );
+ if( bVert ) writeType1Val( static_cast<ValType>((i==mnStackIdx) ? nInt : 0) );
bVert = !bVert;
writeTypeOp( TYPE2OP::RCURVETO);
}
@@ -1195,83 +1248,83 @@ void CffSubsetterContext::convertOneTypeOp( void)
void CffSubsetterContext::convertOneTypeEsc( void)
{
const int nType2Esc = *(mpReadPtr++);
- int* pTop = &mnValStack[ mnStackIdx-1];
+ ValType* pTop = &mnValStack[ mnStackIdx-1];
// convert each T2op
switch( nType2Esc) {
case TYPE2OP::AND:
- assert( mnStackIdx >= 2);
- pTop[0] &= pTop[-1];
+ assert( mnStackIdx >= 2 );
+ pTop[0] = static_cast<ValType>(static_cast<int>(pTop[0]) & static_cast<int>(pTop[-1]));
--mnStackIdx;
break;
case TYPE2OP::OR:
- assert( mnStackIdx >= 2);
- pTop[0] |= pTop[-1];
+ assert( mnStackIdx >= 2 );
+ pTop[0] = static_cast<ValType>(static_cast<int>(pTop[0]) | static_cast<int>(pTop[-1]));
--mnStackIdx;
break;
case TYPE2OP::NOT:
- assert( mnStackIdx >= 1);
- pTop[0] = !pTop[0];
+ assert( mnStackIdx >= 1 );
+ pTop[0] = (pTop[0] == 0);
break;
case TYPE2OP::ABS:
- assert( mnStackIdx >= 1);
+ assert( mnStackIdx >= 1 );
if( pTop[0] >= 0)
break;
// fall through
case TYPE2OP::NEG:
- assert( mnStackIdx >= 1);
+ assert( mnStackIdx >= 1 );
pTop[0] = -pTop[0];
break;
case TYPE2OP::ADD:
- assert( mnStackIdx >= 2);
+ assert( mnStackIdx >= 2 );
pTop[0] += pTop[-1];
--mnStackIdx;
break;
case TYPE2OP::SUB:
- assert( mnStackIdx >= 2);
+ assert( mnStackIdx >= 2 );
pTop[0] -= pTop[-1];
--mnStackIdx;
break;
case TYPE2OP::MUL:
- assert( mnStackIdx >= 2);
+ assert( mnStackIdx >= 2 );
if( pTop[-1])
pTop[0] *= pTop[-1];
--mnStackIdx;
break;
case TYPE2OP::DIV:
- assert( mnStackIdx >= 2);
+ assert( mnStackIdx >= 2 );
if( pTop[-1])
pTop[0] /= pTop[-1];
--mnStackIdx;
break;
case TYPE2OP::EQ:
- assert( mnStackIdx >= 2);
+ assert( mnStackIdx >= 2 );
pTop[0] = (pTop[0] == pTop[-1]);
--mnStackIdx;
break;
case TYPE2OP::DROP:
- assert( mnStackIdx >= 1);
+ assert( mnStackIdx >= 1 );
--mnStackIdx;
break;
case TYPE2OP::PUT: {
- assert( mnStackIdx >= 2);
- const int nIdx = pTop[0];
- assert( nIdx >= 0);
- assert( nIdx < NMAXTRANS);
+ assert( mnStackIdx >= 2 );
+ const int nIdx = static_cast<int>(pTop[0]);
+ assert( nIdx >= 0 );
+ assert( nIdx < NMAXTRANS );
mnTransVals[ nIdx] = pTop[-1];
mnStackIdx -= 2;
break;
}
case TYPE2OP::GET: {
- assert( mnStackIdx >= 1);
- const int nIdx = pTop[0];
- assert( nIdx >= 0);
- assert( nIdx < NMAXTRANS);
- pTop[0] = mnTransVals[ nIdx];
+ assert( mnStackIdx >= 1 );
+ const int nIdx = static_cast<int>(pTop[0]);
+ assert( nIdx >= 0 );
+ assert( nIdx < NMAXTRANS );
+ pTop[0] = mnTransVals[ nIdx ];
break;
}
case TYPE2OP::IFELSE: {
- assert( mnStackIdx >= 4);
- if( pTop[-1] > pTop[0])
+ assert( mnStackIdx >= 4 );
+ if( pTop[-1] > pTop[0] )
pTop[-3] = pTop[-2];
mnStackIdx -= 3;
break;
@@ -1284,69 +1337,69 @@ void CffSubsetterContext::convertOneTypeEsc( void)
// TODO: implement
break;
case TYPE2OP::DUP:
- assert( mnStackIdx >= 1);
+ assert( mnStackIdx >= 1 );
pTop[+1] = pTop[0];
++mnStackIdx;
break;
case TYPE2OP::EXCH: {
- assert( mnStackIdx >= 2);
- const int nVal = pTop[0];
+ assert( mnStackIdx >= 2 );
+ const ValType nVal = pTop[0];
pTop[0] = pTop[-1];
pTop[-1] = nVal;
break;
}
case TYPE2OP::INDEX: {
- assert( mnStackIdx >= 1);
- const int nVal = pTop[0];
- assert( nVal >= 0);
- assert( nVal < mnStackIdx-1);
+ assert( mnStackIdx >= 1 );
+ const int nVal = static_cast<int>(pTop[0]);
+ assert( nVal >= 0 );
+ assert( nVal < mnStackIdx-1 );
pTop[0] = pTop[-1-nVal];
break;
}
case TYPE2OP::ROLL: {
- assert( mnStackIdx >= 1);
- const int nNum = pTop[0];
+ assert( mnStackIdx >= 1 );
+ const int nNum = static_cast<int>(pTop[0]);
assert( nNum >= 0);
- assert( nNum < mnStackIdx-2);
+ assert( nNum < mnStackIdx-2 );
(void)nNum; // TODO: implement
- const int nOfs = pTop[-1];
+ const int nOfs = static_cast<int>(pTop[-1]);
mnStackIdx -= 2;
(void)nOfs;// TODO: implement
break;
}
case TYPE2OP::HFLEX1: {
- assert( mnStackIdx == 9);
- writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, -6);
- writeCurveTo( mnStackIdx, -4, -6, -3, -2, -1, -8);
+ assert( mnStackIdx == 9 );
+ writeCurveTo( mnStackIdx, -9, -8, -7, -6, -5, -6 );
+ writeCurveTo( mnStackIdx, -4, -6, -3, -2, -1, -8 );
mnStackIdx -= 9;
}
break;
case TYPE2OP::HFLEX: {
- assert( mnStackIdx == 7);
- writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, -5);
- writeCurveTo( mnStackIdx, -3, -5, -2, 0, -1, 0);
+ assert( mnStackIdx == 7 );
+ writeCurveTo( mnStackIdx, -7, 0, -6, -5, -4, -5 );
+ writeCurveTo( mnStackIdx, -3, -5, -2, 0, -1, 0 );
mnStackIdx -= 7;
}
break;
case TYPE2OP::FLEX: {
- assert( mnStackIdx == 13);
- writeCurveTo( mnStackIdx, -13, -12, -11, -10, -9, -8);
- writeCurveTo( mnStackIdx, -7, -6, -5, -4, -3, -2);
- const int nFlexDepth = mnValStack[ mnStackIdx-1];
+ assert( mnStackIdx == 13 );
+ writeCurveTo( mnStackIdx, -13, -12, -11, -10, -9, -8 );
+ writeCurveTo( mnStackIdx, -7, -6, -5, -4, -3, -2 );
+ const ValType nFlexDepth = mnValStack[ mnStackIdx-1 ];
(void)nFlexDepth; // ignoring nFlexDepth
mnStackIdx -= 13;
}
break;
case TYPE2OP::FLEX1: {
- assert( mnStackIdx == 11);
+ assert( mnStackIdx == 11 );
// write the first part of the flex1-hinted curve
- writeCurveTo( mnStackIdx, -11, -10, -9, -8, -7, -6);
+ writeCurveTo( mnStackIdx, -11, -10, -9, -8, -7, -6 );
// determine if nD6 is horizontal or vertical
const int i = mnStackIdx;
- int nDeltaX = mnValStack[i-11] + mnValStack[i-9] + mnValStack[i-7] + mnValStack[i-5] + mnValStack[i-3];
+ ValType nDeltaX = mnValStack[i-11] + mnValStack[i-9] + mnValStack[i-7] + mnValStack[i-5] + mnValStack[i-3];
if( nDeltaX < 0 ) nDeltaX = -nDeltaX;
- int nDeltaY = mnValStack[i-10] + mnValStack[i-8] + mnValStack[i-6] + mnValStack[i-4] + mnValStack[i-2];
+ ValType nDeltaY = mnValStack[i-10] + mnValStack[i-8] + mnValStack[i-6] + mnValStack[i-4] + mnValStack[i-2];
if( nDeltaY < 0 ) nDeltaY = -nDeltaY;
const bool bVertD6 = (nDeltaY > nDeltaX);
@@ -1473,14 +1526,14 @@ if( mbSawError) {
// --------------------------------------------------------------------
-double CffSubsetterContext::readRealVal()
+RealType CffSubsetterContext::readRealVal()
{
// TODO: more thorough number validity test
bool bComma = false;
int nExpVal = 0;
int nExpSign = 0;
S64 nNumber = 0;
- double fReal = +1.0;
+ RealType fReal = +1.0;
for(;;){
const U8 c = *(mpReadPtr++); // read nibbles
// parse high nibble
@@ -1548,6 +1601,7 @@ double CffSubsetterContext::readRealVal()
// prepare to access an element inside a CFF/CID index table
int CffSubsetterContext::seekIndexData( int nIndexBase, int nDataIndex)
{
+ assert( (nIndexBase > 0) && (mpBasePtr + nIndexBase + 3 <= mpBaseEnd));
if( nDataIndex < 0)
return -1;
mpReadPtr = mpBasePtr + nIndexBase;
@@ -1578,6 +1632,7 @@ int CffSubsetterContext::seekIndexData( int nIndexBase, int nDataIndex)
mpReadEnd = mpReadPtr + (nOfs2 - nOfs1);
assert( nOfs1 >= 0);
assert( nOfs2 >= nOfs1);
+ assert( mpReadPtr <= mpBaseEnd);
assert( mpReadEnd <= mpBaseEnd);
return (nOfs2 - nOfs1);
}
@@ -1587,10 +1642,12 @@ int CffSubsetterContext::seekIndexData( int nIndexBase, int nDataIndex)
// skip over a CFF/CID index table
void CffSubsetterContext::seekIndexEnd( int nIndexBase)
{
+ assert( (nIndexBase > 0) && (mpBasePtr + nIndexBase + 3 <= mpBaseEnd));
mpReadPtr = mpBasePtr + nIndexBase;
const int nDataCount = (mpReadPtr[0]<<8) + mpReadPtr[1];
const int nDataOfsSz = mpReadPtr[2];
mpReadPtr += 3 + nDataOfsSz * nDataCount;
+ assert( mpReadPtr <= mpBaseEnd);
int nEndOfs = 0;
switch( nDataOfsSz) {
default: fprintf( stderr, "\tINVALID nDataOfsSz=%d\n\n", nDataOfsSz); return;
@@ -1602,6 +1659,8 @@ void CffSubsetterContext::seekIndexEnd( int nIndexBase)
mpReadPtr += nDataOfsSz;
mpReadPtr += nEndOfs - 1;
mpReadEnd = mpBaseEnd;
+ assert( nEndOfs >= 0);
+ assert( mpReadEnd <= mpBaseEnd);
}
// ====================================================================
@@ -1944,7 +2003,7 @@ public:
void emitAllCrypted( void);
int tellPos( void) const;
void updateLen( int nTellPos, int nLength);
- void emitIntVector( const char* pLineHead, const char* pLineTail, const IntVector&);
+ void emitValVector( const char* pLineHead, const char* pLineTail, const ValVector&);
private:
FILE* mpFileOut;
bool mbCloseOutfile;
@@ -2095,8 +2154,8 @@ void Type1Emitter::emitAllCrypted( void)
// --------------------------------------------------------------------
-void Type1Emitter::emitIntVector( const char* pLineHead, const char* pLineTail,
- const IntVector& rVector)
+void Type1Emitter::emitValVector( const char* pLineHead, const char* pLineTail,
+ const ValVector& rVector)
{
// ignore empty vectors
if( rVector.empty())
@@ -2105,15 +2164,15 @@ void Type1Emitter::emitIntVector( const char* pLineHead, const char* pLineTail,
// emit the line head
mpPtr += sprintf( mpPtr, pLineHead);
// emit the vector values
- IntVector::value_type nVal = 0;
- for( IntVector::const_iterator it = rVector.begin();;) {
- nVal = *it;
+ ValVector::value_type aVal = 0;
+ for( ValVector::const_iterator it = rVector.begin();;) {
+ aVal = *it;
if( ++it == rVector.end() )
break;
- mpPtr += sprintf( mpPtr, "%d ", nVal);
+ mpPtr += sprintf( mpPtr, "%g ", aVal);
}
// emit the last value
- mpPtr += sprintf( mpPtr, "%d", nVal);
+ mpPtr += sprintf( mpPtr, "%g", aVal);
// emit the line tail
mpPtr += sprintf( mpPtr, pLineTail);
}
@@ -2178,12 +2237,16 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
"/PaintType 0 def\n");
pOut += sprintf( pOut, "/FontName /%s def\n", rEmitter.maSubsetName);
pOut += sprintf( pOut, "/UniqueID %d def\n", nUniqueId);
- pOut += sprintf( pOut, "/FontMatrix [0.001 0 0 0.001 0 0 ]readonly def\n");
+ // emit FontMatrix
+ if( maFontMatrix.size() == 6)
+ rEmitter.emitValVector( "/FontMatrix [", "]readonly def\n", maFontMatrix);
+ else // emit default FontMatrix if needed
+ pOut += sprintf( pOut, "/FontMatrix [0.001 0 0 0.001 0 0]readonly def\n");
+ // emit FontBBox
if( maFontBBox.size() == 4)
- pOut += sprintf( pOut, "/FontBBox [%d %d %d %d ]readonly def\n",
- maFontBBox[0], maFontBBox[1], maFontBBox[2], maFontBBox[3]);
- else
- pOut += sprintf( pOut, "/FontBBox [0 0 999 999]readonly def\n");
+ rEmitter.emitValVector( "/FontBBox {", "}readonly def\n", maFontBBox);
+ else // emit default FontBBox if needed
+ pOut += sprintf( pOut, "/FontBBox {0 0 999 999}readonly def\n");
// emit FONTINFO into TOPDICT
pOut += sprintf( pOut,
"/FontInfo 2 dict dup begin\n" // TODO: check fontinfo entry count
@@ -2259,12 +2322,12 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
#else
// emit blue hint related privdict entries
if( !mpCffLocal->maBlueValues.empty())
- rEmitter.emitIntVector( "/BlueValues [", "]ND\n", mpCffLocal->maBlueValues);
+ rEmitter.emitValVector( "/BlueValues [", "]ND\n", mpCffLocal->maBlueValues);
else
pOut += sprintf( pOut, "/BlueValues []ND\n"); // default to empty BlueValues
- rEmitter.emitIntVector( "/OtherBlues [", "]ND\n", mpCffLocal->maOtherBlues);
- rEmitter.emitIntVector( "/FamilyBlues [", "]ND\n", mpCffLocal->maFamilyBlues);
- rEmitter.emitIntVector( "/FamilyOtherBlues [", "]ND\n", mpCffLocal->maFamilyOtherBlues);
+ rEmitter.emitValVector( "/OtherBlues [", "]ND\n", mpCffLocal->maOtherBlues);
+ rEmitter.emitValVector( "/FamilyBlues [", "]ND\n", mpCffLocal->maFamilyBlues);
+ rEmitter.emitValVector( "/FamilyOtherBlues [", "]ND\n", mpCffLocal->maFamilyOtherBlues);
if( mpCffLocal->mfBlueScale)
pOut += sprintf( pOut, "/BlueScale %.6f def\n", mpCffLocal->mfBlueScale);
@@ -2278,8 +2341,8 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
pOut += sprintf( pOut, "/StdHW [%d] def\n", mpCffLocal->mnStemStdHW);
if( mpCffLocal->mnStemStdVW)
pOut += sprintf( pOut, "/StdVW [%d] def\n", mpCffLocal->mnStemStdVW);
- rEmitter.emitIntVector( "/StemSnapH [", "]ND\n", mpCffLocal->maStemSnapH);
- rEmitter.emitIntVector( "/StemSnapV [", "]ND\n", mpCffLocal->maStemSnapV);
+ rEmitter.emitValVector( "/StemSnapH [", "]ND\n", mpCffLocal->maStemSnapH);
+ rEmitter.emitValVector( "/StemSnapV [", "]ND\n", mpCffLocal->maStemSnapV);
// emit other hints
if( mpCffLocal->mbForceBold)
@@ -2383,7 +2446,8 @@ bool CffSubsetterContext::emitAsType1( Type1Emitter& rEmitter,
// provide details to the subset requesters, TODO: move into own method?
// note: Top and Bottom are flipped between Type1 and VCL
- rFSInfo.m_aFontBBox = Rectangle( Point( maFontBBox[0], maFontBBox[1] ), Point( maFontBBox[2], maFontBBox[3] ) );
+ rFSInfo.m_aFontBBox = Rectangle( Point( static_cast<long>(maFontBBox[0]), static_cast<long>(maFontBBox[1]) ),
+ Point( static_cast<long>(maFontBBox[2]), static_cast<long>(maFontBBox[3]) ) );
// PDF-Spec says the values below mean the ink bounds!
// TODO: use better approximations for these ink bounds
rFSInfo.m_nAscent = +rFSInfo.m_aFontBBox.Bottom(); // for capital letters
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index d34bf2d..5097643 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1506,7 +1506,7 @@ void GtkSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, USHOR
if( isChild( false, true ) )
gtk_widget_set_size_request( m_pWindow, nWidth, nHeight );
- else
+ else if( ! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) )
gtk_window_resize( GTK_WINDOW(m_pWindow), nWidth, nHeight );
setMinMaxSize();
}
@@ -1608,6 +1608,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState )
SAL_FRAMESTATE_MASK_MAXIMIZED_WIDTH | SAL_FRAMESTATE_MASK_MAXIMIZED_HEIGHT;
if( (pState->mnMask & SAL_FRAMESTATE_MASK_STATE) &&
+ ! ( m_nState & GDK_WINDOW_STATE_MAXIMIZED ) &&
(pState->mnState & SAL_FRAMESTATE_MAXIMIZED) &&
(pState->mnMask & nMaxGeometryMask) == nMaxGeometryMask )
{
diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index 5c73c08..c37ac0d 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -293,8 +293,14 @@ void PPDParser::initPPDFiles()
}
}
-void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers )
+void PPDParser::getKnownPPDDrivers( std::list< rtl::OUString >& o_rDrivers, bool bRefresh )
{
+ if( bRefresh )
+ {
+ delete pAllPPDFiles;
+ pAllPPDFiles = NULL;
+ }
+
initPPDFiles();
o_rDrivers.clear();
diff --git a/vcl/unx/source/window/salframe.cxx b/vcl/unx/source/window/salframe.cxx
index c3bbc74..3a064ab 100644
--- a/vcl/unx/source/window/salframe.cxx
+++ b/vcl/unx/source/window/salframe.cxx
@@ -1212,7 +1212,12 @@ void X11SalFrame::Show( BOOL bVisible, BOOL bNoActivate )
XLIB_Time nUserTime = 0;
if( ! bNoActivate && (nStyle_ & (SAL_FRAME_STYLE_OWNERDRAWDECORATION|SAL_FRAME_STYLE_TOOLWINDOW)) == 0 )
- nUserTime = pDisplay_->GetLastUserEventTime();
+ {
+ if( GetDisplay()->getWMAdaptor()->getWindowManagerName().EqualsAscii("Metacity") )
+ nUserTime = pDisplay_->GetLastUserEventTime( true );
+ else
+ nUserTime = pDisplay_->GetLastUserEventTime();
+ }
GetDisplay()->getWMAdaptor()->setUserTime( this, nUserTime );
// actually map the window
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index c4cf83b..8650bfe 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -1920,7 +1920,7 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos,
// calculate the absolute position of the first result glyph in pixel units
const GOFFSET aGOffset = mpGlyphOffsets[ nStart ];
- Point aRelativePos( nXOffset + aGOffset.du, aGOffset.dv );
+ Point aRelativePos( nXOffset + aGOffset.du, -aGOffset.dv );
rPos = GetDrawPosition( aRelativePos );
// fill the result arrays
commit f12aa08bce80c647a925006180f48adfe074c926
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Thu Sep 17 14:41:33 2009 +0000
CWS-TOOLING: integrate CWS kso32fixes2
2009-09-14 kso #i104767# - 64 bit build breaker
2009-09-14 kso #i14767# - compiler warning
2009-09-08 kso i104767# - Removed obsolete header.
2009-09-08 kso i104767# - Removed obsolete header include.
2009-09-08 kso #i104767# - Fixed build breaker.
2009-09-07 kso #i104767# - merged in dev300 m57.
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 kso #i104767# - support for system credentials usage
2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage
2009-09-07 Kai Sommerfeld #i104767# - support for system credentials usage
2009-09-07 ks93798 #i104767# - adaptions for NTLM SSO
diff --git a/svtools/source/inc/passwordcontainer.hxx b/svtools/source/inc/passwordcontainer.hxx
index c2fca28..d341765 100644
--- a/svtools/source/inc/passwordcontainer.hxx
+++ b/svtools/source/inc/passwordcontainer.hxx
@@ -34,13 +34,14 @@
#include <vector>
#include <map>
#include <com/sun/star/task/XPasswordContainer.hpp>
+#include <com/sun/star/task/XUrlContainer.hpp>
#include <com/sun/star/task/PasswordRequestMode.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/task/XMasterPasswordHandling2.hpp>
-#include <cppuhelper/implbase4.hxx>
+#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <cppuhelper/factory.hxx>
@@ -51,7 +52,9 @@
#include <rtl/ref.hxx>
#include <osl/mutex.hxx>
-
+
+#include "syscreds.hxx"
+
#define MEMORY_RECORD 0
#define PERSISTENT_RECORD 1
@@ -241,9 +244,10 @@ enum PasswordState {
cancelled
};
-class PasswordContainer : public ::cppu::WeakImplHelper4<
+class PasswordContainer : public ::cppu::WeakImplHelper5<
::com::sun::star::task::XPasswordContainer,
::com::sun::star::task::XMasterPasswordHandling2,
+ ::com::sun::star::task::XUrlContainer,
::com::sun::star::lang::XServiceInfo,
::com::sun::star::lang::XEventListener >
{
@@ -253,6 +257,7 @@ private:
::osl::Mutex mMutex;
::rtl::OUString m_aMasterPasswd; // master password is set when the string is not empty
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > mComponent;
+ SysCredentialsConfig mUrlContainer;
::com::sun::star::uno::Sequence< ::com::sun::star::task::UserRecord > CopyToUserRecordSequence(
const ::std::list< NamePassRecord >& original,
@@ -269,6 +274,19 @@ private:
const ::rtl::OUString& name,
const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& Handler )
throw(::com::sun::star::uno::RuntimeException);
+bool createUrlRecord(
+ const PassMap::iterator & rIter,
+ bool bName,
+ const ::rtl::OUString & aName,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler,
+ ::com::sun::star::task::UrlRecord & rRec )
+ throw( ::com::sun::star::uno::RuntimeException );
+
+::com::sun::star::task::UrlRecord find(
+ const ::rtl::OUString& aURL,
+ const ::rtl::OUString& aName,
+ bool bName, // only needed to support empty user names
+ const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& aHandler ) throw(::com::sun::star::uno::RuntimeException);
::rtl::OUString GetDefaultMasterPassword();
@@ -369,6 +387,12 @@ public:
virtual ::sal_Bool SAL_CALL useDefaultMasterPassword( const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL isDefaultMasterPasswordUsed( ) throw (::com::sun::star::uno::RuntimeException);
+ // XUrlContainer
+ virtual void SAL_CALL addUrl( const ::rtl::OUString& Url, ::sal_Bool MakePersistent ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL findUrl( const ::rtl::OUString& Url ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeUrl( const ::rtl::OUString& Url ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getUrls( ::sal_Bool OnlyPersistent ) throw (::com::sun::star::uno::RuntimeException);
+
void Notify();
};
diff --git a/svtools/source/misc1/makefile.mk b/svtools/source/misc1/makefile.mk
index e74afd8..dd143ea 100644
--- a/svtools/source/misc1/makefile.mk
+++ b/svtools/source/misc1/makefile.mk
@@ -54,7 +54,6 @@ SLOFILES=\
$(SLO)$/inettype.obj \
$(SLO)$/iniadrtk.obj \
$(SLO)$/lngmisc.obj \
- $(SLO)$/loginerr.obj \
$(SLO)$/PasswordHelper.obj
SRS1NAME=$(TARGET)
diff --git a/svtools/source/passwordcontainer/makefile.mk b/svtools/source/passwordcontainer/makefile.mk
index 70692ec..31e1336 100644
--- a/svtools/source/passwordcontainer/makefile.mk
+++ b/svtools/source/passwordcontainer/makefile.mk
@@ -43,7 +43,8 @@ DLLPRE=
# --- Files -------------------------------------
SLOFILES= \
- $(SLO)$/passwordcontainer.obj
+ $(SLO)$/passwordcontainer.obj\
+ $(SLO)$/syscreds.obj
SHL1TARGET= $(TARGET)
SHL1IMPLIB= i$(TARGET)
diff --git a/svtools/source/passwordcontainer/passwordcontainer.cxx b/svtools/source/passwordcontainer/passwordcontainer.cxx
index 3656d0b..ebf68c9 100644
--- a/svtools/source/passwordcontainer/passwordcontainer.cxx
+++ b/svtools/source/passwordcontainer/passwordcontainer.cxx
@@ -152,10 +152,17 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd )
static sal_Bool shorterUrl( ::rtl::OUString& aURL )
{
sal_Int32 aInd = aURL.lastIndexOf( sal_Unicode( '/' ) );
- if( aInd > 0 && aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) ) != aInd-2 )
+
+ if( aInd > 0 )
{
- aURL = aURL.copy( 0, aInd );
- return sal_True;
+ sal_Int32 aPrevInd = aURL.lastIndexOf( sal_Unicode( '/' ), aInd );
+ if ( aURL.indexOf( ::rtl::OUString::createFromAscii( "://" ) )
+ != aPrevInd - 2 ||
+ aInd != aURL.getLength() - 1 )
+ {
+ aURL = aURL.copy( 0, aInd );
+ return sal_True;
+ }
}
return sal_False;
@@ -753,37 +760,14 @@ void PasswordContainer::PrivateAdd( const ::rtl::OUString& Url, const ::rtl::OUS
UrlRecord SAL_CALL PasswordContainer::find( const ::rtl::OUString& aURL, const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException)
{
- ::osl::MutexGuard aGuard( mMutex );
-
- if( !m_aContainer.empty() )
- {
- ::rtl::OUString aUrl( aURL );
- PassMap::iterator aIter = m_aContainer.find( aUrl );
-
- if( aIter != m_aContainer.end() )
- return UrlRecord( aIter->first, CopyToUserRecordSequence( aIter->second, aHandler ) );
-
- // each iteration remove last '/...' section from the aUrl
- // while it's possible, up to the most left '://'
- while( shorterUrl( aUrl ) )
- {
- // first look for <url>/somename and then look for <url>/somename/...
- aIter = m_aContainer.find( aUrl );
- if( aIter != m_aContainer.end() )
- return UrlRecord( aIter->first, CopyToUserRecordSequence( aIter->second, aHandler ) );
- else
- {
- ::rtl::OUString tmpUrl( aUrl );
- tmpUrl += ::rtl::OUString::createFromAscii( "/" );
+ return find( aURL, rtl::OUString(), false, aHandler );
+}
- aIter = m_aContainer.lower_bound( aUrl );
- if( aIter != m_aContainer.end() )
- return UrlRecord( aIter->first, CopyToUserRecordSequence( aIter->second, aHandler ) );
- }
- }
- }
+//-------------------------------------------------------------------------
- return UrlRecord();
+UrlRecord SAL_CALL PasswordContainer::findForName( const ::rtl::OUString& aURL, const ::rtl::OUString& aName, const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException)
+{
+ return find( aURL, aName, true, aHandler );
}
//-------------------------------------------------------------------------
@@ -810,48 +794,76 @@ Sequence< UserRecord > PasswordContainer::FindUsr( const list< NamePassRecord >&
//-------------------------------------------------------------------------
-UrlRecord SAL_CALL PasswordContainer::findForName( const ::rtl::OUString& aURL, const ::rtl::OUString& aName, const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException)
+bool PasswordContainer::createUrlRecord(
+ const PassMap::iterator & rIter,
+ bool bName,
+ const ::rtl::OUString & aName,
+ const Reference< XInteractionHandler >& aHandler,
+ UrlRecord & rRec )
+ throw( RuntimeException )
{
+ if ( bName )
+ {
+ Sequence< UserRecord > aUsrRec
+ = FindUsr( rIter->second, aName, aHandler );
+ if( aUsrRec.getLength() )
+ {
+ rRec = UrlRecord( rIter->first, aUsrRec );
+ return true;
+ }
+ }
+ else
+ {
+ rRec = UrlRecord(
+ rIter->first,
+ CopyToUserRecordSequence( rIter->second, aHandler ) );
+ return true;
+ }
+ return false;
+}
+//-------------------------------------------------------------------------
+
+UrlRecord PasswordContainer::find(
+ const ::rtl::OUString& aURL,
+ const ::rtl::OUString& aName,
+ bool bName, // only needed to support empty user names
+ const Reference< XInteractionHandler >& aHandler ) throw(RuntimeException)
+{
::osl::MutexGuard aGuard( mMutex );
- if( !m_aContainer.empty() )
+
+ if( !m_aContainer.empty() && aURL.getLength() )
{
::rtl::OUString aUrl( aURL );
- PassMap::iterator aIter = m_aContainer.find( aUrl );
-
- if( aIter != m_aContainer.end() )
- {
- Sequence< UserRecord > aUsrRec = FindUsr( aIter->second, aName, aHandler );
- if( aUsrRec.getLength() )
- return UrlRecord( aIter->first, aUsrRec );
- }
// each iteration remove last '/...' section from the aUrl
// while it's possible, up to the most left '://'
- while( shorterUrl( aUrl ) )
+ do
{
// first look for <url>/somename and then look for <url>/somename/...
- aIter = m_aContainer.find( aUrl );
- if( aIter != m_aContainer.end() )
+ PassMap::iterator aIter = m_aContainer.find( aUrl );
+ if( aIter != m_aContainer.end() )
{
- Sequence< UserRecord > aUsrRec = FindUsr( aIter->second, aName, aHandler );
- if( aUsrRec.getLength() )
- return UrlRecord( aIter->first, aUsrRec );
+ UrlRecord aRec;
+ if ( createUrlRecord( aIter, bName, aName, aHandler, aRec ) )
+ return aRec;
}
- else
+ else
{
::rtl::OUString tmpUrl( aUrl );
- tmpUrl += ::rtl::OUString::createFromAscii( "/" );
+ if ( tmpUrl.getStr()[tmpUrl.getLength() - 1] != (sal_Unicode)'/' )
+ tmpUrl += ::rtl::OUString::createFromAscii( "/" );
- aIter = m_aContainer.lower_bound( aUrl );
- if( aIter != m_aContainer.end() )
+ aIter = m_aContainer.lower_bound( tmpUrl );
+ if( aIter != m_aContainer.end() && aIter->first.match( tmpUrl ) )
{
- Sequence< UserRecord > aUsrRec = FindUsr( aIter->second, aName, aHandler );
- if( aUsrRec.getLength() )
- return UrlRecord( aIter->first, aUsrRec );
+ UrlRecord aRec;
+ if ( createUrlRecord( aIter, bName, aName, aHandler, aRec ) )
+ return aRec;
}
}
}
+ while( shorterUrl( aUrl ) && aUrl.getLength() );
}
return UrlRecord();
@@ -1355,6 +1367,35 @@ void SAL_CALL PasswordContainer::removeMasterPassword()
return ( m_pStorageFile->useStorage() && m_pStorageFile->getEncodedMP( aEncodedMP ) && !aEncodedMP.getLength() );
}
+
+//-------------------------------------------------------------------------
+void SAL_CALL PasswordContainer::addUrl( const ::rtl::OUString& Url, ::sal_Bool MakePersistent )
+ throw (uno::RuntimeException)
+{
+ mUrlContainer.add( Url, MakePersistent );
+}
+
+//-------------------------------------------------------------------------
+::rtl::OUString SAL_CALL PasswordContainer::findUrl( const ::rtl::OUString& Url )
+ throw (uno::RuntimeException)
+{
+ return mUrlContainer.find( Url );
+}
+
+//-------------------------------------------------------------------------
+void SAL_CALL PasswordContainer::removeUrl( const ::rtl::OUString& Url )
+ throw (uno::RuntimeException)
+{
+ mUrlContainer.remove( Url );
+}
+
+//-------------------------------------------------------------------------
+uno::Sequence< ::rtl::OUString > SAL_CALL PasswordContainer::getUrls( ::sal_Bool OnlyPersistent )
+ throw (uno::RuntimeException)
+{
+ return mUrlContainer.list( OnlyPersistent );
+}
+
//-------------------------------------------------------------------------
void PasswordContainer::Notify()
@@ -1487,7 +1528,9 @@ MasterPasswordRequest_Impl::MasterPasswordRequest_Impl( PasswordRequestMode Mode
aRememberModes, // rRememberPasswordModes
RememberAuthentication_NO, // eDefaultRememberPasswordMode
aRememberModes, // rRememberAccountModes
- RememberAuthentication_NO // eDefaultRememberAccountMode
+ RememberAuthentication_NO, // eDefaultRememberAccountMode
+ sal_False, // bCanUseSystemCredentials
+ sal_False // bDefaultUseSystemCredentials
);
Sequence<
diff --git a/ucbhelper/inc/ucbhelper/interactionrequest.hxx b/ucbhelper/inc/ucbhelper/interactionrequest.hxx
index bb818bc..3a7d3b2 100644
--- a/ucbhelper/inc/ucbhelper/interactionrequest.hxx
+++ b/ucbhelper/inc/ucbhelper/interactionrequest.hxx
@@ -38,7 +38,7 @@
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/task/XInteractionDisapprove.hpp>
#include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
-#include <com/sun/star/ucb/XInteractionSupplyAuthentication.hpp>
+#include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
#include <com/sun/star/ucb/XInteractionSupplyName.hpp>
#include <rtl/ref.hxx>
#include <cppuhelper/weak.hxx>
@@ -342,7 +342,7 @@ public:
class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication :
public InteractionContinuation,
public com::sun::star::lang::XTypeProvider,
- public com::sun::star::ucb::XInteractionSupplyAuthentication
+ public com::sun::star::ucb::XInteractionSupplyAuthentication2
{
com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication >
m_aRememberPasswordModes;
@@ -360,6 +360,9 @@ class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication :
unsigned m_bCanSetUserName : 1;
unsigned m_bCanSetPassword : 1;
unsigned m_bCanSetAccount : 1;
+ unsigned m_bCanUseSystemCredentials : 1;
+ unsigned m_bDefaultUseSystemCredentials : 1;
+ unsigned m_bUseSystemCredentials : 1;
public:
/**
@@ -382,7 +385,7 @@ public:
sal_Bool bCanSetRealm,
sal_Bool bCanSetUserName,
sal_Bool bCanSetPassword,
- sal_Bool bCanSetAccount );
+ sal_Bool bCanSetAccount);
/**
* Constructor.
*
@@ -408,6 +411,11 @@ public:
* @param eDefaultRememberAccountMode specifies the default
* authentication-remember-mode for accounts preferred by the
* requesting client.
+ * @param bCanUseSystemCredentials indicates whether issuer of the
+ * authetication request can obtain and use system credentials
+ * for authentication.
+ * @param bDefaultUseSystemCredentials specifies the default system
+ * credentials usage preferred by the requesting client
*
* @see com::sun::star::ucb::AuthenticationRequest
* @see com::sun::star::ucb::RememberAuthentication
@@ -427,7 +435,9 @@ public:
com::sun::star::ucb::RememberAuthentication > &
rRememberAccountModes,
const com::sun::star::ucb::RememberAuthentication
- eDefaultRememberAccountMode );
+ eDefaultRememberAccountMode,
+ sal_Bool bCanUseSystemCredentials,
+ sal_Bool bDefaultUseSystemCredentials );
// XInterface
virtual com::sun::star::uno::Any SAL_CALL
@@ -497,6 +507,12 @@ public:
setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember )
throw( com::sun::star::uno::RuntimeException );
+ // XInteractionSupplyAuthentication2
+ virtual ::sal_Bool SAL_CALL canUseSystemCredentials( ::sal_Bool& Default )
+ throw ( ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL setUseSystemCredentials( ::sal_Bool UseSystemCredentials )
+ throw ( ::com::sun::star::uno::RuntimeException );
+
// Non-interface methods.
/**
@@ -548,6 +564,8 @@ public:
*/
const com::sun::star::ucb::RememberAuthentication &
getRememberAccountMode() const { return m_eRememberAccountMode; }
+
+ sal_Bool getUseSystemCredentials() const { return m_bUseSystemCredentials; }
};
//============================================================================
@@ -571,7 +589,10 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
m_bCanSetRealm( bCanSetRealm ),
m_bCanSetUserName( bCanSetUserName ),
m_bCanSetPassword( bCanSetPassword ),
- m_bCanSetAccount( bCanSetAccount )
+ m_bCanSetAccount( bCanSetAccount ),
+ m_bCanUseSystemCredentials( sal_False ),
+ m_bDefaultUseSystemCredentials( sal_False ),
+ m_bUseSystemCredentials( sal_False )
{
m_aRememberPasswordModes[ 0 ]
= com::sun::star::ucb::RememberAuthentication_NO;
@@ -593,7 +614,9 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
const com::sun::star::uno::Sequence<
com::sun::star::ucb::RememberAuthentication > & rRememberAccountModes,
const com::sun::star::ucb::RememberAuthentication
- eDefaultRememberAccountMode )
+ eDefaultRememberAccountMode,
+ sal_Bool bCanUseSystemCredentials,
+ sal_Bool bDefaultUseSystemCredentials )
: InteractionContinuation( pRequest ),
m_aRememberPasswordModes( rRememberPasswordModes ),
m_aRememberAccountModes( rRememberAccountModes ),
@@ -604,7 +627,10 @@ inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
m_bCanSetRealm( bCanSetRealm ),
m_bCanSetUserName( bCanSetUserName ),
m_bCanSetPassword( bCanSetPassword ),
- m_bCanSetAccount( bCanSetAccount )
+ m_bCanSetAccount( bCanSetAccount ),
+ m_bCanUseSystemCredentials( bCanUseSystemCredentials ),
+ m_bDefaultUseSystemCredentials( bDefaultUseSystemCredentials ),
+ m_bUseSystemCredentials( bDefaultUseSystemCredentials & bCanUseSystemCredentials )
{
}
diff --git a/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx b/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx
index e84588f..d608254 100644
--- a/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx
+++ b/ucbhelper/inc/ucbhelper/simpleauthenticationrequest.hxx
@@ -33,9 +33,12 @@
#include <rtl/ref.hxx>
#include <ucbhelper/interactionrequest.hxx>
-#include <com/sun/star/ucb/AuthenticationRequest.hpp>
#include "ucbhelper/ucbhelperdllapi.h"
+namespace com { namespace sun { namespace star { namespace ucb {
+ class URLAuthenticationRequest;
+} } } }
+
namespace ucbhelper {
/**
@@ -63,12 +66,13 @@ class UCBHELPER_DLLPUBLIC SimpleAuthenticationRequest : public ucbhelper::Intera
ucbhelper::InteractionSupplyAuthentication > m_xAuthSupplier;
private:
- void initialize( ::com::sun::star::ucb::AuthenticationRequest aRequest,
- const sal_Bool & bCanSetRealm,
- const sal_Bool & bCanSetUserName,
- const sal_Bool & bCanSetPassword,
- const sal_Bool & bCanSetAccount,
- const sal_Bool & bAllowPersistentStoring );
+ void initialize( const ::com::sun::star::ucb::URLAuthenticationRequest & rRequest,
+ sal_Bool bCanSetRealm,
+ sal_Bool bCanSetUserName,
+ sal_Bool bCanSetPassword,
+ sal_Bool bCanSetAccount,
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials );
public:
/** Specification whether some entity (realm, username, password, account)
@@ -84,6 +88,7 @@ public:
/**
* Constructor.
*
+ * @param rURL contains a URL for which authentication is requested.
* @param rServerName contains a server name.
* @param rRealm contains a realm, if applicable.
* @param rUserName contains a username, if available (for instance from
@@ -92,7 +97,8 @@ public:
* a previous try).
* @param rAccount contains an account, if applicable.
*/
- SimpleAuthenticationRequest( const rtl::OUString & rServerName,
+ SimpleAuthenticationRequest( const rtl::OUString & rURL,
+ const rtl::OUString & rServerName,
const rtl::OUString & rRealm,
const rtl::OUString & rUserName,
const rtl::OUString & rPassword,
@@ -102,6 +108,7 @@ public:
/**
* Constructor.
*
+ * @param rURL contains a URL for which authentication is requested.
* @param rServerName contains a server name.
* @param rRealm contains a realm, if applicable.
* @param rUserName contains a username, if available (for instance from
@@ -109,14 +116,19 @@ public:
* @param rPassword contains a password, if available (for instance from
* a previous try).
* @param rAccount contains an account, if applicable.
- * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently
+ * @param bAllowPersistentStoring specifies if the credentials should
+ * be stored in the passowrd container persistently
+ * @param bAllowUseSystemCredntials specifies if requesting client is
+ * able to obtain and use system credentials for authentication
*/
- SimpleAuthenticationRequest( const rtl::OUString & rServerName,
+ SimpleAuthenticationRequest( const rtl::OUString & rURL,
+ const rtl::OUString & rServerName,
const rtl::OUString & rRealm,
const rtl::OUString & rUserName,
const rtl::OUString & rPassword,
const rtl::OUString & rAccount,
- const sal_Bool & bAllowPersistentStoring);
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials );
/**
@@ -138,7 +150,8 @@ public:
modifiable.
* @param rAccount contains an account, if applicable.
*/
- SimpleAuthenticationRequest( const rtl::OUString & rServerName,
+ SimpleAuthenticationRequest( const rtl::OUString & rURL,
+ const rtl::OUString & rServerName,
EntityType eRealmType,
const rtl::OUString & rRealm,
EntityType eUserNameType,
@@ -152,6 +165,7 @@ public:
/**
* Constructor.
*
+ * @param rURL contains a URL for which authentication is requested.
* @param rServerName contains a server name.
* @param eRealmType specifies whether a realm is applicable and
modifiable.
@@ -167,9 +181,13 @@ public:
* @param eAccountType specifies whether an account is applicable and
modifiable.
* @param rAccount contains an account, if applicable.
- * @param bAllowPersistentStoring specifies if the credentials should stored in the passowrd container persistently
+ * @param bAllowPersistentStoring specifies if the credentials should
+ * be stored in the passowrd container persistently
+ * @param bAllowUseSystemCredntials specifies if requesting client is
+ * able to obtain and use system credentials for authentication
*/
- SimpleAuthenticationRequest( const rtl::OUString & rServerName,
+ SimpleAuthenticationRequest( const rtl::OUString & rURL,
+ const rtl::OUString & rServerName,
EntityType eRealmType,
const rtl::OUString & rRealm,
EntityType eUserNameType,
@@ -178,7 +196,8 @@ public:
const rtl::OUString & rPassword,
EntityType eAccountType,
const rtl::OUString & rAccount,
- const sal_Bool & bAllowPersistentStoring);
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials );
/**
* This method returns the supplier for the missing authentication data,
diff --git a/ucbhelper/source/provider/interactionrequest.cxx b/ucbhelper/source/provider/interactionrequest.cxx
index 4eaf9f9..02b14a0 100644
--- a/ucbhelper/source/provider/interactionrequest.cxx
+++ b/ucbhelper/source/provider/interactionrequest.cxx
@@ -704,7 +704,8 @@ InteractionSupplyAuthentication::queryInterface( const uno::Type & rType )
uno::Any aRet = cppu::queryInterface( rType,
static_cast< lang::XTypeProvider * >( this ),
static_cast< task::XInteractionContinuation * >( this ),
- static_cast< ucb::XInteractionSupplyAuthentication * >( this ) );
+ static_cast< ucb::XInteractionSupplyAuthentication * >( this ),
+ static_cast< ucb::XInteractionSupplyAuthentication2 * >( this ));
return aRet.hasValue()
? aRet : InteractionContinuation::queryInterface( rType );
@@ -750,7 +751,7 @@ uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
uno::Reference< lang::XTypeProvider > * >( 0 ) ),
getCppuType( static_cast<
uno::Reference<
- ucb::XInteractionSupplyAuthentication > * >( 0 ) ) );
+ ucb::XInteractionSupplyAuthentication2 > * >( 0 ) ) );
pCollection = &collection;
}
}
@@ -905,6 +906,33 @@ void SAL_CALL InteractionSupplyAuthentication::setRememberAccount(
}
//=========================================================================
+//
+// XInteractionSupplyAuthentication2 methods.
+//
+//=========================================================================
+
+// virtual
+::sal_Bool SAL_CALL
+InteractionSupplyAuthentication::canUseSystemCredentials(
+ ::sal_Bool& Default )
+ throw ( uno::RuntimeException )
+{
+ Default = m_bDefaultUseSystemCredentials;
+ return m_bCanUseSystemCredentials;
+}
+
+//=========================================================================
+// virtual
+void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
+ ::sal_Bool UseSystemCredentials )
+ throw ( uno::RuntimeException )
+{
+ if ( m_bCanUseSystemCredentials )
+ m_bUseSystemCredentials = UseSystemCredentials;
+}
+
+
+//=========================================================================
//=========================================================================
//
// InteractionSupplyName Implementation.
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index 53b0b5c..163a6c4 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -31,6 +31,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_ucbhelper.hxx"
#include <com/sun/star/task/XMasterPasswordHandling.hpp>
+#include <com/sun/star/ucb/URLAuthenticationRequest.hpp>
#include <ucbhelper/simpleauthenticationrequest.hxx>
using namespace com::sun::star;
@@ -38,14 +39,15 @@ using namespace ucbhelper;
//=========================================================================
SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+ const rtl::OUString & rURL,
const rtl::OUString & rServerName,
const rtl::OUString & rRealm,
const rtl::OUString & rUserName,
const rtl::OUString & rPassword,
const rtl::OUString & rAccount )
{
- // Fill request...
- ucb::AuthenticationRequest aRequest;
+ // Fill request...
+ ucb::URLAuthenticationRequest aRequest;
// aRequest.Message = // OUString
// aRequest.Context = // XInterface
aRequest.Classification = task::InteractionClassification_ERROR;
@@ -61,26 +63,30 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
aRequest.HasAccount = ( rAccount.getLength() > 0 );
if ( aRequest.HasAccount )
aRequest.Account = rAccount;
-
- initialize(aRequest,
+ aRequest.URL = rURL;
+
+ initialize(aRequest,
sal_False,
sal_True,
sal_True,
aRequest.HasAccount,
- sal_False);
+ sal_False,
+ sal_False );
}
//=========================================================================
SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+ const rtl::OUString & rURL,
const rtl::OUString & rServerName,
const rtl::OUString & rRealm,
const rtl::OUString & rUserName,
const rtl::OUString & rPassword,
const rtl::OUString & rAccount,
- const sal_Bool & bAllowPersistentStoring )
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials )
{
- // Fill request...
- ucb::AuthenticationRequest aRequest;
+ // Fill request...
+ ucb::URLAuthenticationRequest aRequest;
// aRequest.Message = // OUString
// aRequest.Context = // XInterface
aRequest.Classification = task::InteractionClassification_ERROR;
@@ -96,56 +102,20 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
aRequest.HasAccount = ( rAccount.getLength() > 0 );
if ( aRequest.HasAccount )
aRequest.Account = rAccount;
+ aRequest.URL = rURL;
- initialize(aRequest,
+ initialize(aRequest,
sal_False,
sal_True,
sal_True,
aRequest.HasAccount,
- bAllowPersistentStoring);
-}
-
-void SimpleAuthenticationRequest::initialize(
- ucb::AuthenticationRequest aRequest,
- const sal_Bool & bCanSetRealm,
- const sal_Bool & bCanSetUserName,
- const sal_Bool & bCanSetPassword,
- const sal_Bool & bCanSetAccount,
- const sal_Bool & bAllowPersistentStoring )
-{
- setRequest( uno::makeAny( aRequest ) );
-
- // Fill continuations...
- uno::Sequence< ucb::RememberAuthentication > aRememberModes( bAllowPersistentStoring ? 3 : 2 );
- aRememberModes[ 0 ] = ucb::RememberAuthentication_NO;
- aRememberModes[ 1 ] = ucb::RememberAuthentication_SESSION;
- if (bAllowPersistentStoring)
- aRememberModes[ 1 ] = ucb::RememberAuthentication_PERSISTENT;
-
- m_xAuthSupplier
- = new InteractionSupplyAuthentication(
- this,
- bCanSetRealm,
- bCanSetUserName,
- bCanSetPassword,
- bCanSetAccount,
- aRememberModes, // rRememberPasswordModes
- ucb::RememberAuthentication_SESSION, // eDefaultRememberPasswordMode
- aRememberModes, // rRememberAccountModes
- ucb::RememberAuthentication_SESSION // eDefaultRememberAccountMode
- );
-
- uno::Sequence<
- uno::Reference< task::XInteractionContinuation > > aContinuations( 3 );
- aContinuations[ 0 ] = new InteractionAbort( this );
- aContinuations[ 1 ] = new InteractionRetry( this );
- aContinuations[ 2 ] = m_xAuthSupplier.get();
-
- setContinuations( aContinuations );
+ bAllowPersistentStoring,
+ bAllowUseSystemCredentials );
}
//=========================================================================
SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+ const rtl::OUString & rURL,
const rtl::OUString & rServerName,
EntityType eRealmType,
const rtl::OUString & rRealm,
@@ -157,7 +127,7 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
const rtl::OUString & rAccount )
{
// Fill request...
- ucb::AuthenticationRequest aRequest;
+ ucb::URLAuthenticationRequest aRequest;
// aRequest.Message = // OUString
// aRequest.Context = // XInterface
aRequest.Classification = task::InteractionClassification_ERROR;
@@ -175,17 +145,20 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
aRequest.HasAccount = eAccountType != ENTITY_NA;
if ( aRequest.HasAccount )
aRequest.Account = rAccount;
+ aRequest.URL = rURL;
initialize(aRequest,
eRealmType == ENTITY_MODIFY,
eUserNameType == ENTITY_MODIFY,
ePasswordType == ENTITY_MODIFY,
eAccountType == ENTITY_MODIFY,
- sal_False);
+ sal_False,
+ sal_False );
}
//=========================================================================
SimpleAuthenticationRequest::SimpleAuthenticationRequest(
+ const rtl::OUString & rURL,
const rtl::OUString & rServerName,
EntityType eRealmType,
const rtl::OUString & rRealm,
@@ -195,10 +168,11 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
const rtl::OUString & rPassword,
EntityType eAccountType,
const rtl::OUString & rAccount,
- const sal_Bool & bAllowPersistentStoring )
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials )
{
// Fill request...
- ucb::AuthenticationRequest aRequest;
+ ucb::URLAuthenticationRequest aRequest;
// aRequest.Message = // OUString
// aRequest.Context = // XInterface
aRequest.Classification = task::InteractionClassification_ERROR;
@@ -216,11 +190,56 @@ SimpleAuthenticationRequest::SimpleAuthenticationRequest(
aRequest.HasAccount = eAccountType != ENTITY_NA;
if ( aRequest.HasAccount )
aRequest.Account = rAccount;
+ aRequest.URL = rURL;
initialize(aRequest,
eRealmType == ENTITY_MODIFY,
eUserNameType == ENTITY_MODIFY,
ePasswordType == ENTITY_MODIFY,
eAccountType == ENTITY_MODIFY,
- bAllowPersistentStoring);
+ bAllowPersistentStoring,
+ bAllowUseSystemCredentials );
+}
+
+//=========================================================================
+void SimpleAuthenticationRequest::initialize(
+ const ucb::URLAuthenticationRequest & rRequest,
+ sal_Bool bCanSetRealm,
+ sal_Bool bCanSetUserName,
+ sal_Bool bCanSetPassword,
+ sal_Bool bCanSetAccount,
+ sal_Bool bAllowPersistentStoring,
+ sal_Bool bAllowUseSystemCredentials )
+{
+ setRequest( uno::makeAny( rRequest ) );
+
+ // Fill continuations...
+ uno::Sequence< ucb::RememberAuthentication > aRememberModes( bAllowPersistentStoring ? 3 : 2 );
+ aRememberModes[ 0 ] = ucb::RememberAuthentication_NO;
+ aRememberModes[ 1 ] = ucb::RememberAuthentication_SESSION;
+ if (bAllowPersistentStoring)
+ aRememberModes[ 1 ] = ucb::RememberAuthentication_PERSISTENT;
+
+ m_xAuthSupplier
+ = new InteractionSupplyAuthentication(
+ this,
+ bCanSetRealm,
+ bCanSetUserName,
+ bCanSetPassword,
+ bCanSetAccount,
+ aRememberModes, // rRememberPasswordModes
+ ucb::RememberAuthentication_SESSION, // eDefaultRememberPasswordMode
+ aRememberModes, // rRememberAccountModes
+ ucb::RememberAuthentication_SESSION, // eDefaultRememberAccountMode
+ bAllowUseSystemCredentials, // bCanUseSystemCredentials,
+ false // bDefaultUseSystemCredentials
+ );
+
+ uno::Sequence<
+ uno::Reference< task::XInteractionContinuation > > aContinuations( 3 );
+ aContinuations[ 0 ] = new InteractionAbort( this );
+ aContinuations[ 1 ] = new InteractionRetry( this );
+ aContinuations[ 2 ] = m_xAuthSupplier.get();
+
+ setContinuations( aContinuations );
}
commit 5b406c6493462095fed35b135be06ebdb8e2198b
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 14:37:24 2009 +0000
CWS-TOOLING: integrate CWS os136
2009-09-08 08:51:21 +0200 os r275915 : #i104757# dropdown events also for key events
2009-09-04 13:13:14 +0200 os r275798 : #i104757# send event before opening a drop down list
2009-09-04 13:11:48 +0200 os r275797 : #i104757# dynamically load sub-regions in format/sections dialog
diff --git a/vcl/inc/vcl/vclevent.hxx b/vcl/inc/vcl/vclevent.hxx
index 8d84666..71b895f 100644
--- a/vcl/inc/vcl/vclevent.hxx
+++ b/vcl/inc/vcl/vclevent.hxx
@@ -150,6 +150,7 @@ class Menu;
#define VCLEVENT_LISTBOX_ENTRY_EXPANDED 1174
#define VCLEVENT_LISTBOX_ENTRY_COLLAPSED 1175
// <--
+#define VCLEVENT_DROPDOWN_PRE_OPEN 1176
// VclMenuEvent
#define VCLEVENT_MENU_ACTIVATE 1200
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 10961bc..ab222e5 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -287,6 +287,7 @@ BOOL ComboBox::IsAutocompleteEnabled() const
IMPL_LINK( ComboBox, ImplClickBtnHdl, void*, EMPTYARG )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpSubEdit->GrabFocus();
if ( !mpImplLB->GetEntryList()->GetMRUCount() )
ImplUpdateFloatSelection();
@@ -523,6 +524,7 @@ void ComboBox::ToggleDropDown()
ImplUpdateFloatSelection();
else
mpImplLB->SelectEntry( 0 , TRUE );
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpBtn->SetPressed( TRUE );
SetSelection( Selection( 0, SELECTION_MAX ) );
mpFloatWin->StartFloat( TRUE );
@@ -824,6 +826,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
ImplUpdateFloatSelection();
if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpBtn->SetPressed( TRUE );
if ( mpImplLB->GetEntryList()->GetMRUCount() )
mpImplLB->SelectEntry( 0 , TRUE );
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 9f50be1..62822ab 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -303,6 +303,7 @@ IMPL_LINK( ListBox, ImplClickBtnHdl, void*, EMPTYARG )
{
if( !mpFloatWin->IsInPopupMode() )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
mpBtn->SetPressed( TRUE );
mpFloatWin->StartFloat( TRUE );
@@ -363,6 +364,7 @@ void ListBox::ToggleDropDown()
mpFloatWin->EndPopupMode();
else
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpImplWin->GrabFocus();
mpBtn->SetPressed( TRUE );
mpFloatWin->StartFloat( TRUE );
@@ -919,6 +921,7 @@ long ListBox::PreNotify( NotifyEvent& rNEvt )
if( mpFloatWin && !mpFloatWin->IsInPopupMode() &&
aKeyEvt.GetKeyCode().IsMod2() )
{
+ ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN );
mpBtn->SetPressed( TRUE );
mpFloatWin->StartFloat( FALSE );
ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN );
commit 5f6c00655332d9327d0eda5e16249916c716bb97
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 14:29:05 2009 +0000
CWS-TOOLING: integrate CWS ab74
2009-09-10 10:13:43 +0200 jsk r276023 : Test Cases for #i103691, #i103697, #i103990
2009-09-03 15:42:36 +0200 ab r275754 : #i103990# Removed warning
2009-09-03 09:02:32 +0200 ab r275744 : CWS-TOOLING: rebase CWS ab74 to trunk at 275331 (milestone: DEV300:m56)
2009-09-02 17:14:42 +0200 ab r275724 : #i103697# Applied patch
2009-08-27 15:11:50 +0200 ab r275488 : #i103354# Check Lucene index file to be named _0.cfs, fail otherwise
2009-08-26 08:57:21 +0200 ab r275393 : #i104354# Changed loop variable type to avoid Solaris Intel compiler optimizer bug
2009-08-17 14:17:32 +0200 ab r275053 : #i73263# Adapted breakpoint dialog to longer strings
2009-08-13 17:09:30 +0200 ab r274951 : #i103691# Fix empty comparison behaviour
2009-08-13 13:03:28 +0200 ab r274935 : #i103948# Applied patch
2009-08-13 12:31:15 +0200 ab r274931 : #i103134# Patch: Always set default property
2009-08-13 11:02:50 +0200 ab r274926 : #i103990# Support arrays in user types
2009-07-21 11:16:54 +0200 ab r274171 : #i102816# Make sure LocaleItem is loaded before copying from it
2009-07-20 14:56:35 +0200 ab r274139 : #i102816# Use default language as final fallback in service implementation
diff --git a/transex3/source/help/HelpIndexerTool.java b/transex3/source/help/HelpIndexerTool.java
index 3705e8f..ee45fe0 100644
--- a/transex3/source/help/HelpIndexerTool.java
+++ b/transex3/source/help/HelpIndexerTool.java
@@ -71,6 +71,7 @@ public class HelpIndexerTool
String aLanguageStr = "";
String aModule = "";
String aTargetZipFileStr = "";
+ String aCfsName = "";
// Scan arguments
boolean bLang = false;
@@ -78,6 +79,7 @@ public class HelpIndexerTool
boolean bZipDir = false;
boolean bSrcDir = false;
boolean bOutput = false;
+ boolean bCfsName = false;
int nArgCount = args.length;
for( int i = 0 ; i < nArgCount ; i++ )
@@ -127,6 +129,15 @@ public class HelpIndexerTool
}
i++;
}
+ else if( "-checkcfsname".equals(args[i]) )
+ {
+ if( i + 1 < nArgCount )
+ {
+ aCfsName = args[i + 1] + ".cfs";
+ bCfsName = true;
+ }
+ i++;
+ }
}
if( !bLang || !bMod || !bZipDir || (!bOutput && !bExtensionMode) )
@@ -164,6 +175,15 @@ public class HelpIndexerTool
}
writer.close();
+ boolean bCfsFileOk = true;
+ if( bCfsName && !bExtensionMode && nRet != -1 )
+ {
+ String aCompleteCfsFileName = aDirToZipStr + File.separator + aIndexDirName + File.separator + aCfsName;
+ File aCfsFile = new File( aCompleteCfsFileName );
+ bCfsFileOk = aCfsFile.exists();
+ System.out.println( "Checking cfs file " + aCfsName+ ": " + (bCfsFileOk ? "Found" : "Not found") );
+ }
+
if( bExtensionMode )
{
if( !bSrcDir )
@@ -177,13 +197,19 @@ public class HelpIndexerTool
if( nRet == -1 )
deleteRecursively( aIndexDir );
- if( !bExtensionMode )
+ if( bCfsFileOk )
System.out.println( "Zipping ..." );
File aDirToZipFile = new File( aDirToZipStr );
createZipFile( aDirToZipFile, aTargetZipFileStr );
deleteRecursively( aDirToZipFile );
}
+ if( !bCfsFileOk )
+ {
+ System.out.println( "cfs file check failed, terminating..." );
+ System.exit( -1 );
+ }
+
Date end = new Date();
if( !bExtensionMode )
System.out.println(end.getTime() - start.getTime() + " total milliseconds");
commit 332f285c33b5e2ee25676a66affc9041c646752e
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 13:53:54 2009 +0000
CWS-TOOLING: integrate CWS encsig09
2009-09-14 15:11:29 +0200 oc r276125 : #i105049# MacroSignatur needs Macro
2009-09-09 17:09:46 +0200 jl r276005 : #i103989# could not signe encrypted doc containing a formular object
2009-09-09 13:11:24 +0200 jl r275985 : #i103989# could not signe encrypted doc containing a formular object
2009-09-08 15:54:02 +0200 mav r275934 : #i103906# fix the automation test scenario ( tempfile should be writable for the user )
2009-09-07 14:01:39 +0200 mav r275895 : #i103906# fix the problem with reload
2009-09-07 09:34:48 +0200 mav r275871 : #i104786# do the ODF version check only for ODF documents
2009-09-07 08:19:06 +0200 mav r275870 : #i104389# fix text
2009-09-06 22:24:21 +0200 mav r275867 : #i104786# check the consistency of ODF version
2009-09-06 22:23:24 +0200 mav r275866 : #i104786# check the consistency of ODF version
2009-09-06 22:23:00 +0200 mav r275865 : #i104786# check the consistency of ODF version
2009-09-06 22:22:36 +0200 mav r275864 : #i104786# check the consistency of ODF version
2009-09-06 22:22:03 +0200 mav r275863 : #i104786# check the consistency of ODF version
2009-09-02 17:09:30 +0200 mav r275722 : #i104715# let repairing mechanics use the streams correctly
2009-09-01 16:52:49 +0200 mav r275670 : #i104389# notify user not to trust the corrupted document
2009-09-01 16:31:37 +0200 mav r275668 : #i104389# use vnd.sun.star.zip: protocol to access zip files
2009-09-01 16:30:32 +0200 mav r275667 : #i104389# use vnd.sun.star.zip: protocol to access zip files
2009-09-01 16:22:13 +0200 jl r275666 : #i104339# small content change
2009-09-01 14:20:42 +0200 jl r275660 : #i103519# remove some debug output
2009-09-01 13:51:52 +0200 jl r275659 : #i103519# NSS uses '\' for escaping in distinguished names
2009-09-01 12:49:47 +0200 mav r275655 : #i104389# use zip-mode to read from jar files
2009-09-01 12:40:22 +0200 mav r275653 : #i104389# use zip-mode to read from jar files
2009-09-01 12:32:29 +0200 mav r275652 : #i104389# use constants
2009-08-31 21:58:00 +0200 mav r275637 : #i10000# fix warning
2009-08-31 21:11:17 +0200 mav r275636 : #i104227# adding of scripting signature removes the document signature
2009-08-31 20:55:05 +0200 mav r275635 : #i103905# ZipStorage supports Compressed property
2009-08-31 20:53:55 +0200 mav r275634 : #i103905# adjust macro signature transfer to usage of ZipStorage
2009-08-31 15:30:49 +0200 jl r275609 : #i103989# warning is shown as long the user does not click 'OK'
2009-08-31 14:36:10 +0200 jl r275608 : #i103989# changed warning text when signing macro and there is a document signature. This warning is only displayed once
2009-08-31 13:34:41 +0200 mav r275603 : #i104452# disable macros in repaired documents
2009-08-31 13:33:42 +0200 mav r275602 : #i104452# disable macros in repaired documents
2009-08-31 13:03:56 +0200 jl r275600 : #i45212# signature dialog could not be started when using read-only documents
2009-08-31 09:26:13 +0200 mav r275583 : #i104578# store the additional entry as the last one to workaround parsing problem in OOo3.1 and later
2009-08-30 20:54:25 +0200 mav r275562 : #i10000# adopt for unix
2009-08-30 10:56:00 +0200 mav r275561 : CWS-TOOLING: rebase CWS encsig09 to trunk at 275331 (milestone: DEV300:m56)
2009-08-28 16:34:00 +0200 mav r275539 : #i104578# write necessary info in manifest.xml for ODF1.2 encrypted document
2009-08-28 14:04:22 +0200 mav r275533 : #104587# fix handling of readonly streams
2009-08-28 13:58:10 +0200 mav r275531 : #i104389# fix the broken document handling
2009-08-28 11:40:39 +0200 mav r275522 : #i104389# fix the signature streams check
2009-08-27 21:48:12 +0200 mav r275509 : #i103927# show the warning
2009-08-27 21:47:48 +0200 mav r275508 : #i103927# show the warning
2009-08-27 16:45:59 +0200 jl r275495 : #i45212# remove unused variable
2009-08-27 16:34:00 +0200 jl r275494 : #i103989#
2009-08-27 13:54:28 +0200 jl r275482 : #i103519# fixed replacement of 'S' by 'ST'
2009-08-27 12:32:21 +0200 mav r275472 : #i10000# fix warning
2009-08-27 11:58:11 +0200 mav r275467 : #i104389# handle the entry path correctly
2009-08-26 17:18:35 +0200 jl r275438 : #i103519# subject and issuer distinguished names were not properly displayed. The strings were obtained by system functions (Windows, NSS), which use quotes to escape the values, when they contain special characters
2009-08-26 11:00:20 +0200 mav r275403 : #i10000# fix warnings
2009-08-26 08:25:45 +0200 mav r275392 : #i10000# fix warning
2009-08-26 08:02:22 +0200 mav r275391 : #i10000# adopt for linux
2009-08-26 07:40:30 +0200 mav r275390 : #i10000# fix warning
2009-08-26 07:35:28 +0200 mav r275389 : #i10000# use correct include file name
2009-08-25 15:01:41 +0200 jl r275356 : #i103989# better check for mimetype of streams
2009-08-25 09:07:09 +0200 mav r275335 : CWS-TOOLING: rebase CWS encsig09 to trunk at 274622 (milestone: DEV300:m54)
2009-08-24 18:17:02 +0200 mav r275329 : #i103927# check the nonencrypted streams
2009-08-24 18:14:14 +0200 mav r275328 : #i103927# check the nonencrypted streams
2009-08-24 17:59:34 +0200 mav r275327 : #i103927#,#i104389# check the package consistency and nonencrypted streams
2009-08-24 16:18:28 +0200 jl r275323 : #i103989# added comment
2009-08-24 13:08:47 +0200 jl r275305 : #i45212# #i66276# only write the X509Certificate element once and allow to add remove several certificates at a time
2009-08-21 12:57:28 +0200 ufi r275239 : 104339
2009-08-21 08:39:05 +0200 jl r275213 : #i10398# comparing URIs of signed files with the 'element list'
2009-08-20 13:39:47 +0200 jl r275178 : #i10398# displaying 'new partially signed' status in the status bar
2009-08-20 13:35:39 +0200 jl r275177 : #i10398# displaying 'new partially signed' status in the status bar
2009-08-20 13:29:06 +0200 jl r275176 : #i10398# displaying 'new partially signed' status in the status bar
2009-08-20 13:26:21 +0200 jl r275175 : #i10398# displaying 'new partially signed' status in the status bar
2009-08-20 12:05:09 +0200 ufi r275170 : i104339
2009-08-19 12:24:54 +0200 jl r275146 : #i10398# displaying 'old signature' icon and status in signature dialog
2009-08-18 15:18:48 +0200 jl r275111 : #i103989# document signatures containing manifest.xml are now validated according to the final ODF1.2 spec
2009-08-18 11:41:06 +0200 mav r275087 : #i103927# detect if encrypted ODF1.2 document contains nonencrypted streams
2009-08-18 11:35:13 +0200 mav r275085 : #i103927# detect if encrypted ODF1.2 document contains nonencrypted streams
2009-08-14 17:32:41 +0200 jl r274999 : #i103989# using c14n tranformation for XML streams
2009-08-14 15:27:43 +0200 jl r274987 : #i103989# remove special handling for encrypted document streams in UriBindingHelper::OpenInputStream, since we use zip storage this is not necessary anymore
2009-08-14 15:08:10 +0200 jl r274983 : #i103989# Showing a message when adding or removing a macro signature, that the document signature will be removed
2009-08-14 14:57:27 +0200 jl r274982 : #i103989# accesing Sequence at invalid index
2009-08-11 08:55:02 +0200 mav r274846 : #i103905# let signing service know if there is already a valid document signature
2009-08-10 11:33:37 +0200 jl r274799 : #i103905# do not truncate the stream
2009-08-10 10:43:47 +0200 mav r274797 : #i103905# provide the storage version
2009-08-07 16:58:46 +0200 jl r274780 : #i103989#
2009-08-07 16:56:19 +0200 jl r274779 : #i103989# using odf version string etc.
2009-08-07 15:20:53 +0200 mav r274771 : #i103905# provide the storage version
2009-08-07 15:19:12 +0200 mav r274770 : #i103905# provide the storage version
2009-08-07 12:41:45 +0200 mav r274758 : #103930# do not store thumbnail in case of encrypted document
2009-08-07 12:36:52 +0200 mav r274757 : #i103905# provide the storage version
2009-08-07 12:15:54 +0200 mav r274754 : #i103760# the signed state is not lost on saving
2009-08-07 12:06:19 +0200 mav r274753 : #i103760# avoid warning regarding signature removal on export
2009-08-07 12:06:01 +0200 mav r274752 : #i103760# avoid warning regarding signature removal on export
2009-08-06 08:47:34 +0200 mav r274703 : #i103905# allow to transport ODF version to the signing component
2009-08-05 21:34:42 +0200 mav r274701 : #i103905# allow to transport ODF version to the signing component
2009-08-05 15:48:17 +0200 mav r274683 : #i103905# allow to transport ODF version to the signing component
2009-08-05 14:58:12 +0200 jl r274673 : #i103989# documentsignature now signes all streams except documentsignatures.xml, all streams are processed as binary files
2009-08-05 12:00:32 +0200 mav r274648 : #i103905# allow to transport ODF version to the signing component
2009-08-04 10:57:04 +0200 jl r274612 : #i103989# added XInitialization
2009-07-31 10:32:27 +0200 mav r274516 : #i103905# use zip storage to sign documents
2009-07-30 14:01:33 +0200 mav r274489 : #i103906# optimize the usage of temporary medium
2009-07-30 14:00:28 +0200 mav r274488 : #i103906# optimize the usage of temporary medium
2009-07-30 13:59:09 +0200 mav r274487 : #i103906# optimize the usage of temporary medium
2009-07-30 13:50:44 +0200 mav r274485 : #i103906# optimize the usage of temporary medium
2009-07-30 13:49:53 +0200 mav r274484 : #i103906# optimize the usage of temporary medium
2009-07-30 13:49:13 +0200 mav r274483 : #i103906# optimize the usage of temporary medium
2009-07-30 13:47:09 +0200 mav r274482 : #i103905#,#i103906# let the signing process use zip-storage; optimize the usage of temporary medium
2009-07-21 09:10:31 +0200 mav r274159 : CWS-TOOLING: rebase CWS encsig09 to trunk at 273468 (milestone: DEV300:m51)
2009-05-05 08:39:01 +0200 mav r271496 : #i100832# allow to sign macros only when there are any
diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/sfxecode.hxx
index 078e1b4..c41a719 100644
--- a/svtools/inc/sfxecode.hxx
+++ b/svtools/inc/sfxecode.hxx
@@ -85,6 +85,7 @@
#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 52)
#define ERRCODE_SFX_BROKENSIGNATURE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 53)
#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 54)
+#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 55)
diff --git a/svtools/source/misc/errtxt.src b/svtools/source/misc/errtxt.src
index 47c402c..6c076d5 100644
--- a/svtools/source/misc/errtxt.src
+++ b/svtools/source/misc/errtxt.src
@@ -478,6 +478,10 @@ Resource RID_ERRHDL
{
Text [ en-US ] = "The digitally signed document content and/or macros do not match the current document signature.\n\nThis could be the result of document manipulation or of structural document damage due to data transmission.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ;
};
+ String ERRCODE_SFX_INCOMPLETE_ENCRYPTION
+ {
+ Text [ en-US ] = "The encrypted document contains unexpected non-encrypted streams.\n\nThis could be the result of document manipulation.\n\nWe recommend that you do not trust the content of the current document.\nExecution of macros is disabled for this document.\n " ;
+ };
String ERRCODE_IO_INVALIDLENGTH
{
commit a41209db3214290f8c21aea7a5294e75a73ff196
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 11:26:03 2009 +0000
CWS-TOOLING: integrate CWS defaultdoclang
2009-08-21 14:44:21 +0200 cmc r275260 : CWS-TOOLING: rebase CWS defaultdoclang to trunk at 275001 (milestone: DEV300:m55)
2009-08-10 17:43:32 +0200 cmc r274833 : CWS-TOOLING: rebase CWS defaultdoclang to trunk at 274622 (milestone: DEV300:m54)
2009-07-24 11:46:58 +0200 cmc r274297 : CWS-TOOLING: rebase CWS defaultdoclang to trunk at 274203 (milestone: DEV300:m53)
2009-07-10 12:22:16 +0200 cmc r273884 : #i99577# tweak the widths a bit
2009-07-08 15:17:58 +0200 cmc r273834 : #i99577 tidy up indentation
2009-07-04 16:09:18 +0200 cmc r273721 : #i99577# a "default" document language that reflects what the locale language is
diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx
index c9c4441..107e8b6 100644
--- a/i18npool/inc/i18npool/mslangid.hxx
+++ b/i18npool/inc/i18npool/mslangid.hxx
@@ -216,6 +216,9 @@ public:
static LanguageType getRealLanguageWithoutConfig( LanguageType nLang );
+ static LanguageType resolveSystemLanguageByScriptType( LanguageType nLang, sal_Int16 nType );
+
+
/** Whether locale has a Right-To-Left orientation. */
static bool isRightToLeft( LanguageType nLang );
@@ -246,6 +249,9 @@ public:
configuration! */
static void setConfiguredSystemLanguage( LanguageType nLang );
static void setConfiguredSystemUILanguage( LanguageType nLang );
+ static void setConfiguredWesternFallback( LanguageType nLang );
+ static void setConfiguredComplexFallback( LanguageType nLang );
+ static void setConfiguredAsianFallback( LanguageType nLang );
// ---------------------------------------------------------------------------
@@ -274,6 +280,10 @@ private:
static LanguageType nConfiguredSystemLanguage;
static LanguageType nConfiguredSystemUILanguage;
+ static LanguageType nConfiguredWesternFallback;
+ static LanguageType nConfiguredAsianFallback;
+ static LanguageType nConfiguredComplexFallback;
+
static LanguageType getPlatformSystemLanguage();
static LanguageType getPlatformSystemUILanguage();
diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx
index effb5cf..4dce2d5 100644
--- a/i18npool/source/isolang/mslangid.cxx
+++ b/i18npool/source/isolang/mslangid.cxx
@@ -41,6 +41,9 @@
LanguageType MsLangId::nConfiguredSystemLanguage = LANGUAGE_SYSTEM;
LanguageType MsLangId::nConfiguredSystemUILanguage = LANGUAGE_SYSTEM;
+LanguageType MsLangId::nConfiguredWesternFallback = LANGUAGE_SYSTEM;
+LanguageType MsLangId::nConfiguredAsianFallback = LANGUAGE_SYSTEM;
+LanguageType MsLangId::nConfiguredComplexFallback = LANGUAGE_SYSTEM;
// static
void MsLangId::setConfiguredSystemLanguage( LanguageType nLang )
@@ -55,6 +58,23 @@ void MsLangId::setConfiguredSystemUILanguage( LanguageType nLang )
nConfiguredSystemUILanguage = nLang;
}
+// static
+void MsLangId::setConfiguredWesternFallback( LanguageType nLang )
+{
+ nConfiguredWesternFallback = nLang;
+}
+
+// static
+void MsLangId::setConfiguredAsianFallback( LanguageType nLang )
+{
+ nConfiguredAsianFallback = nLang;
+}
+
+// static
+void MsLangId::setConfiguredComplexFallback( LanguageType nLang )
+{
+ nConfiguredComplexFallback = nLang;
+}
// static
inline LanguageType MsLangId::simplifySystemLanguages( LanguageType nLang )
@@ -120,6 +140,41 @@ LanguageType MsLangId::getRealLanguage( LanguageType nLang )
// static
+LanguageType MsLangId::resolveSystemLanguageByScriptType( LanguageType nLang, sal_Int16 nType )
+{
+ if (nLang == LANGUAGE_NONE)
+ return nLang;
+
+ nLang = getRealLanguage(nLang);
+ if (nType != ::com::sun::star::i18n::ScriptType::WEAK && getScriptType(nLang) != nType)
+ {
+ switch(nType)
+ {
+ case ::com::sun::star::i18n::ScriptType::ASIAN:
+ if (nConfiguredAsianFallback == LANGUAGE_SYSTEM)
+ nLang = LANGUAGE_CHINESE_SIMPLIFIED;
+ else
+ nLang = nConfiguredComplexFallback;
+ break;
+ case ::com::sun::star::i18n::ScriptType::COMPLEX:
+ if (nConfiguredComplexFallback == LANGUAGE_SYSTEM)
+ nLang = LANGUAGE_HINDI;
+ else
+ nLang = nConfiguredComplexFallback;
+ break;
+ default:
+ if (nConfiguredWesternFallback == LANGUAGE_SYSTEM)
+ nLang = LANGUAGE_ENGLISH_US;
+ else
+ nLang = nConfiguredWesternFallback;
+ break;
+ break;
+ }
+ }
+ return nLang;
+}
+
+// static
void MsLangId::convertLanguageToLocale( LanguageType nLang,
::com::sun::star::lang::Locale & rLocale )
{
diff --git a/svtools/source/config/lingucfg.cxx b/svtools/source/config/lingucfg.cxx
index 5f65caf..555f03b 100644
--- a/svtools/source/config/lingucfg.cxx
+++ b/svtools/source/config/lingucfg.cxx
@@ -72,27 +72,6 @@ static osl::Mutex & GetOwnMutex()
///////////////////////////////////////////////////////////////////////////
-static lang::Locale lcl_CreateLocale( LanguageType eLang )
-{
- lang::Locale aLocale;
- if ( eLang != LANGUAGE_NONE )
- MsLangId::convertLanguageToLocale( eLang, aLocale );
-
- return aLocale;
-}
-
-
-static INT16 lcl_LocaleToLanguage( const lang::Locale& rLocale )
-{
- // empty Locale -> LANGUAGE_NONE
- if ( rLocale.Language.getLength() == 0 )
- return LANGUAGE_NONE;
-
- // Variant of Locale is ignored
- return MsLangId::convertLocaleToLanguage( rLocale );
-}
-
-
static BOOL lcl_SetLocale( INT16 &rLanguage, const uno::Any &rVal )
{
BOOL bSucc = FALSE;
@@ -100,41 +79,31 @@ static BOOL lcl_SetLocale( INT16 &rLanguage, const uno::Any &rVal )
lang::Locale aNew;
if (rVal >>= aNew) // conversion successful?
{
- INT16 nNew = lcl_LocaleToLanguage( aNew );
+ INT16 nNew = MsLangId::convertLocaleToLanguage( aNew );
if (nNew != rLanguage)
{
rLanguage = nNew;
bSucc = TRUE;
}
}
-
return bSucc;
}
-static inline INT16 lcl_CfgLocaleStrToLanguage( const OUString &rCfgLocaleStr )
-{
- INT16 nRes = LANGUAGE_NONE;
- if (0 != rCfgLocaleStr.getLength())
- nRes = MsLangId::convertIsoStringToLanguage( rCfgLocaleStr );
- return nRes;
-}
-
-
static inline const OUString lcl_LanguageToCfgLocaleStr( INT16 nLanguage )
{
OUString aRes;
- if (LANGUAGE_NONE != nLanguage)
+ if (LANGUAGE_SYSTEM != nLanguage)
aRes = MsLangId::convertLanguageToIsoString( nLanguage );
return aRes;
}
-static void lcl_CfgAnyToLanguage( const uno::Any &rVal, INT16& rLanguage )
+static INT16 lcl_CfgAnyToLanguage( const uno::Any &rVal )
{
OUString aTmp;
- if ((rVal >>= aTmp) && 0 != aTmp.getLength())
- rLanguage = MsLangId::convertIsoStringToLanguage( aTmp );
+ rVal >>= aTmp;
+ return (aTmp.getLength() == 0) ? LANGUAGE_SYSTEM : MsLangId::convertIsoStringToLanguage( aTmp );
}
@@ -143,10 +112,9 @@ static void lcl_CfgAnyToLanguage( const uno::Any &rVal, INT16& rLanguage )
SvtLinguOptions::SvtLinguOptions()
{
nDefaultLanguage = LANGUAGE_NONE;
-
nDefaultLanguage_CJK = LANGUAGE_NONE;
nDefaultLanguage_CTL = LANGUAGE_NONE;
-
+
// general options
bIsUseDictionaryList =
bIsIgnoreControlCharacters = TRUE;
@@ -428,19 +396,19 @@ uno::Any SvtLinguConfigItem::GetProperty( INT32 nPropertyHandle ) const
}
case UPH_DEFAULT_LOCALE :
{
- lang::Locale aLocale( lcl_CreateLocale( rOpt.nDefaultLanguage ) );
+ lang::Locale aLocale( MsLangId::convertLanguageToLocale( rOpt.nDefaultLanguage, false ) );
aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 ));
break;
}
case UPH_DEFAULT_LOCALE_CJK :
{
- lang::Locale aLocale( lcl_CreateLocale( rOpt.nDefaultLanguage_CJK ) );
+ lang::Locale aLocale( MsLangId::convertLanguageToLocale( rOpt.nDefaultLanguage_CJK, false ) );
aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 ));
break;
}
case UPH_DEFAULT_LOCALE_CTL :
{
- lang::Locale aLocale( lcl_CreateLocale( rOpt.nDefaultLanguage_CTL ) );
+ lang::Locale aLocale( MsLangId::convertLanguageToLocale( rOpt.nDefaultLanguage_CTL, false ) );
aRes.setValue( &aLocale, ::getCppuType((lang::Locale*)0 ));
break;
}
@@ -654,7 +622,7 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
switch ( nPropertyHandle )
{
case UPH_DEFAULT_LOCALE :
- { rOpt.bRODefaultLanguage = pROStates[i]; lcl_CfgAnyToLanguage( rVal, rOpt.nDefaultLanguage ); } break;
+ { rOpt.bRODefaultLanguage = pROStates[i]; rOpt.nDefaultLanguage = lcl_CfgAnyToLanguage( rVal ); } break;
case UPH_ACTIVE_DICTIONARIES :
{ rOpt.bROActiveDics = pROStates[i]; rVal >>= rOpt.aActiveDics; } break;
case UPH_IS_USE_DICTIONARY_LIST :
@@ -662,9 +630,9 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
case UPH_IS_IGNORE_CONTROL_CHARACTERS :
{ rOpt.bROIsIgnoreControlCharacters = pROStates[i]; rVal >>= rOpt.bIsIgnoreControlCharacters; } break;
case UPH_DEFAULT_LOCALE_CJK :
- { rOpt.bRODefaultLanguage_CJK = pROStates[i]; lcl_CfgAnyToLanguage( rVal, rOpt.nDefaultLanguage_CJK ); } break;
+ { rOpt.bRODefaultLanguage_CJK = pROStates[i]; rOpt.nDefaultLanguage_CJK = lcl_CfgAnyToLanguage( rVal ); } break;
case UPH_DEFAULT_LOCALE_CTL :
- { rOpt.bRODefaultLanguage_CTL = pROStates[i]; lcl_CfgAnyToLanguage( rVal, rOpt.nDefaultLanguage_CTL ); } break;
+ { rOpt.bRODefaultLanguage_CTL = pROStates[i]; rOpt.nDefaultLanguage_CTL = lcl_CfgAnyToLanguage( rVal ); } break;
case UPH_IS_SPELL_UPPER_CASE :
{ rOpt.bROIsSpellUpperCase = pROStates[i]; rVal >>= rOpt.bIsSpellUpperCase; } break;
diff --git a/svtools/source/numbers/numfmuno.cxx b/svtools/source/numbers/numfmuno.cxx
index edbdbe1..cf2b012 100644
--- a/svtools/source/numbers/numfmuno.cxx
+++ b/svtools/source/numbers/numfmuno.cxx
@@ -774,7 +774,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const rtl::OUString& aPro
else if (aString.EqualsAscii( PROPERTYNAME_LOCALE ))
{
lang::Locale aLocale( MsLangId::convertLanguageToLocale(
- pFormat->GetLanguage()));
+ pFormat->GetLanguage()));
aRet <<= aLocale;
}
else if (aString.EqualsAscii( PROPERTYNAME_TYPE ))
commit b4f008ac6f8daf9ae94345726e3824a94827b358
Author: Jens-Heiner Rechtien <hr at openoffice.org>
Date: Thu Sep 17 10:29:02 2009 +0000
CWS-TOOLING: integrate CWS aw077
2009-09-17 Armin Le Grand #resolved conflicts for integration
2009-09-07 Armin Le Grand #i103058# re-added handling of StatusBar texts for DrawObject creation, added FullDrag for circle-similar shapes (all in the ellipse toolbar)
2009-09-03 Armin Le Grand #i100514# extended TextAttributes and handling, adapted for super/subscript, adapted WordBreaking (again)
2009-09-02 Armin Le Grand #i104432# secured TextLayouterDevice::getTextBoundRect implementation and usage
2009-09-02 Armin Le Grand #i104232#, #i100514# Mainly solved 1st one, no more local SpellCheck remembering, but adding to compare op's where needed
2009-08-19 Armin Le Grand #i100514# commited in-between version due to 2week holiday
2009-08-13 Armin Le Grand #i99157# applied changes to BitmapEx and SdrHdlBitmapSet
2009-08-06 Armin Le Grand #i100357# added clipping for too big MetaFiles
diff --git a/vcl/inc/vcl/lazydelete.hxx b/vcl/inc/vcl/lazydelete.hxx
index fadde3a..175103c 100644
--- a/vcl/inc/vcl/lazydelete.hxx
+++ b/vcl/inc/vcl/lazydelete.hxx
@@ -225,7 +225,7 @@ namespace vcl
SomeWindow::Paint()
{
- static vcl::DeleteOnDeinitBase< BitmapEx > aBmp( new BitmapEx( ResId( 1000, myResMgr ) ) );
+ static vcl::DeleteOnDeinit< BitmapEx > aBmp( new BitmapEx( ResId( 1000, myResMgr ) ) );
if( aBmp.get() ) // check whether DeInitVCL has been called already
DrawBitmapEx( Point( 10, 10 ), *aBmp.get() );
@@ -244,7 +244,7 @@ namespace vcl
};
template < typename T >
- class VCL_DLLPUBLIC DeleteOnDeinit : public DeleteOnDeinitBase
+ class DeleteOnDeinit : public DeleteOnDeinitBase
{
T* m_pT;
virtual void doCleanup() { delete m_pT; m_pT = NULL; }
diff --git a/vcl/prj/d.lst b/vcl/prj/d.lst
index d9c14f4..b49b047 100644
--- a/vcl/prj/d.lst
+++ b/vcl/prj/d.lst
@@ -153,3 +153,4 @@ mkdir: %_DEST%\inc%_EXT%\vcl\plug\vcl
..\inc\vcl\ppdparser.hxx %_DEST%\inc%_EXT%\vcl\ppdparser.hxx
..\inc\vcl\helper.hxx %_DEST%\inc%_EXT%\vcl\helper.hxx
..\inc\vcl\strhelper.hxx %_DEST%\inc%_EXT%\vcl\strhelper.hxx
+..\inc\vcl\lazydelete.hxx %_DEST%\inc%_EXT%\vcl\lazydelete.hxx
\ No newline at end of file
diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx
index 81055a5..ee01c33 100644
--- a/vcl/source/helper/lazydelete.cxx
+++ b/vcl/source/helper/lazydelete.cxx
@@ -84,6 +84,9 @@ template<> bool LazyDeletor<Menu>::is_less( Menu* left, Menu* right )
DeleteOnDeinitBase::~DeleteOnDeinitBase()
{
+ ImplSVData* pSVData = ImplGetSVData();
+ if( pSVData && pSVData->mpDeinitDeleteList != NULL )
+ pSVData->mpDeinitDeleteList->remove( this );
}
void DeleteOnDeinitBase::addDeinitContainer( DeleteOnDeinitBase* i_pContainer )
commit 4b6b18b8619de3acdd4b34f18c59396771813425
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date: Thu Sep 17 10:11:42 2009 +0000
CWS-TOOLING: integrate CWS boost134
2009-09-09 10:30:24 +0200 fs r275970 : #i100127# provided by rene: check whether system-boost's function.hpp compiles without exception support
2009-09-04 21:58:00 +0200 fs r275832 : indention
2009-09-04 21:57:10 +0200 fs r275831 : #i10000# type in boost/spirit check. Thanks to thb
2009-09-04 10:58:54 +0200 fs r275787 : #i100127# provided by tono at openoffice.org: mingw needs using directives for std::min/max
2009-09-04 10:31:54 +0200 fs r275782 : #i100127# (approved by hjs) on Solaris, set GNUTAR to /usr/sfw/bin/gtar, this is available on baseline machines (Solaris 10.x), but not necessarily available in LD_LIBRARY_PATH
2009-08-19 21:47:55 +0200 rene r275161 : #i10000# check for the header actually used now
2009-08-17 21:55:31 +0200 fs r275073 : CWS-TOOLING: rebase CWS boost134 to trunk at 275001 (milestone: DEV300:m55)
2009-07-16 09:39:25 +0200 fs r274031 : #i100127# extract download/% with GNUTAR instead of TAR
2009-07-14 09:18:15 +0200 fs r273960 : CWS-TOOLING: rebase CWS boost134 to trunk at 273858 (milestone: DEV300:m52)
2009-07-13 09:55:14 +0200 fs r273919 : #i100127# use boost 1.39, not 1.34
2009-07-13 09:45:57 +0200 fs r273918 : use GNUTAR when extracting download/%.tar.gz, not TAR (necessary with boost 1.39 tarball)
2009-07-10 21:10:52 +0200 fs r273905 : #i100127# spirit now part of boost
2009-07-06 12:12:13 +0200 fs r273732 : #i10000# lngconvex, used in src/wizards, is built in shell => added missing module dependency
2009-07-02 15:34:51 +0200 fs r273660 : #i100127#
2009-07-02 13:35:24 +0200 fs r273645 : #i100127# MSVC needs some hinting when using boost::bind on (some) member functions
2009-07-02 10:33:59 +0200 fs r273625 : removed unused include (lead to an internal compiler error with MSVC and boost 1.34+)
2009-07-02 09:44:35 +0200 fs r273619 : change some include orders, prevents 'internal compiler errors' with MSVC
2009-07-01 09:19:25 +0200 fs r273547 : #i100127# who the heck is defining max as something unusable?
2009-07-01 09:17:28 +0200 fs r273546 : #i100127# defining min/max is causing trouble now
2009-07-01 09:15:40 +0200 fs r273545 : #i100127# reverted previous patch, and properly fixed the problem by defining BOOST_MEM_FN_ENABLE_CDECL, and disabling warning 4180
2009-07-01 09:14:23 +0200 fs r273544 : #i100127# re-disable warning 4180, still needed for some files
2009-07-01 09:07:33 +0200 fs r273543 : #i100127# reverted previous patch, and properly fixed the problem by defining BOOST_MEM_FN_ENABLE_CDECL
2009-06-24 11:00:32 +0200 fs r273319 : oops, re-introduced some inc locations
2009-06-23 22:10:02 +0200 fs r273304 : #i100127# disable warning C4180
2009-06-23 22:08:36 +0200 fs r273303 : #i100127# disable warning C4180
2009-06-16 12:26:49 +0200 fs r273015 : #i10000# (provided by mst at openoffice.org)
2009-06-15 09:10:27 +0200 fs r272962 : #i10000# use -r instead of -a when copying the include files, this prevents the spurious 'failed to preserve ownership' errors
2009-06-11 23:55:06 +0200 fs r272902 : #i100127#
2009-06-11 23:54:47 +0200 fs r272901 : #i100127#
2009-06-11 23:54:05 +0200 fs r272900 : make compile on unxsol[i|s]4
2009-06-10 10:12:22 +0200 fs r272798 : #i100127# don't deliver from within unxlngi6/misc/build/boost, but from a 'normalized' location unxlngi6/inc
2009-06-10 09:48:00 +0200 fs r272795 : #i100127# use 1.34.1 unconditionally on all platforms
diff --git a/canvas/source/directx/dx_winstuff.hxx b/canvas/source/directx/dx_winstuff.hxx
index 4673f6d..df8b020 100755
--- a/canvas/source/directx/dx_winstuff.hxx
+++ b/canvas/source/directx/dx_winstuff.hxx
@@ -97,25 +97,18 @@
#undef DrawText
-// Needed for #?$&/@ gdiplus header
-#ifndef max
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-#define __WORKAROUND_MAX_DEFINED__
-#endif
-
-#ifndef min
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-#define __WORKAROUND_MIN_DEFINED__
-#endif
-
+#ifdef __MINGW32__
+using ::std::max;
+using ::std::min;
+#endif
+
#include <gdiplus.h>
-#ifdef __WORKAROUND_MAX_DEFINED__
-#undef max
+#ifdef min
+# undef min
#endif
-
-#ifdef __WORKAROUND_MIN_DEFINED__
-#undef min
+#ifdef max
+# undef max
#endif
namespace dxcanvas
diff --git a/comphelper/source/property/genericpropertyset.cxx b/comphelper/source/property/genericpropertyset.cxx
index 11bfe93..f09cda2 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -180,8 +180,7 @@ void GenericPropertySet::_setPropertyValues( const PropertyMapEntry** ppEntries,
aEvt.PropertyName = aPropertyName;
aEvt.NewValue = *pValues;
aGuard.clear();
- pHelper->forEach<XPropertyChangeListener>(
- ::boost::bind(&XPropertyChangeListener::propertyChange,_1,boost::cref(aEvt)));
+ pHelper->notifyEach( &XPropertyChangeListener::propertyChange, aEvt );
aGuard.reset();
}
More information about the ooo-build-commit
mailing list