[Libreoffice-commits] .: Branch 'integration/dev300_m98' - svl/inc svl/Library_svl.mk svl/prj tools/Executable_so_checksum.mk vcl/inc vcl/source vcl/unx
Michael Meeks
mmeeks at kemper.freedesktop.org
Wed Feb 16 10:53:25 PST 2011
svl/Library_svl.mk | 1
svl/inc/pch/precompiled_svl.hxx | 1
svl/inc/svl/nfsymbol.hxx | 3
svl/prj/build.lst | 2
tools/Executable_so_checksum.mk | 2
vcl/inc/vcl/popupmenuwindow.hxx | 50 +++++
vcl/inc/vcl/svdata.hxx | 1
vcl/source/app/help.cxx | 14 -
vcl/source/app/svdata.cxx | 5
vcl/source/control/field.cxx | 8
vcl/source/control/makefile.mk | 5
vcl/source/control/tabctrl.cxx | 42 ----
vcl/source/gdi/outdev3.cxx | 1
vcl/source/gdi/pdfwriter_impl.cxx | 265 -------------------------------
vcl/source/gdi/print3.cxx | 2
vcl/source/src/images.src | 10 -
vcl/source/window/introwin.cxx | 18 --
vcl/source/window/menu.cxx | 25 --
vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 5
vcl/unx/headless/svpinst.cxx | 6
vcl/unx/source/gdi/salgdi3.cxx | 20 --
vcl/unx/source/printer/ppdparser.cxx | 196 ----------------------
22 files changed, 65 insertions(+), 617 deletions(-)
New commits:
commit 23694ea88126a8d50877141e816e29e8b04c6ea2
Author: Michael Meeks <michael.meeks at novell.com>
Date: Wed Feb 16 18:24:35 2011 +0000
misc merge and build cleanups
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 5c2c17c..25738f8 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -63,7 +63,6 @@ $(eval $(call gb_Library_add_linked_libs,svl,\
tl \
ucbhelper \
utl \
- vos3 \
))
$(eval $(call gb_Library_add_linked_system_libs,svl,\
diff --git a/svl/inc/pch/precompiled_svl.hxx b/svl/inc/pch/precompiled_svl.hxx
index 9f7e56a..b96fa0c 100644
--- a/svl/inc/pch/precompiled_svl.hxx
+++ b/svl/inc/pch/precompiled_svl.hxx
@@ -385,7 +385,6 @@
#include <rtl/logfile.hxx>
#include <rtl/math.hxx>
#include <rtl/memory.h>
-#include <rtl/ref.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
#include <rtl/tencinfo.h>
diff --git a/svl/inc/svl/nfsymbol.hxx b/svl/inc/svl/nfsymbol.hxx
index e31c5b9..2beb4c0 100644
--- a/svl/inc/svl/nfsymbol.hxx
+++ b/svl/inc/svl/nfsymbol.hxx
@@ -61,7 +61,8 @@ enum NfSymbolType
NF_SYMBOLTYPE_DATESEP = -18, // date separator
NF_SYMBOLTYPE_TIMESEP = -19, // time separator
NF_SYMBOLTYPE_TIME100SECSEP = -20, // time 100th seconds separator
- NF_SYMBOLTYPE_PERCENT = -21 // percent %
+ NF_SYMBOLTYPE_PERCENT = -21, // percent %
+ NF_SYMBOLTYPE_FRAC_FDIV = -22 // forced divisors
};
} // namespace svt
diff --git a/svl/prj/build.lst b/svl/prj/build.lst
index 8bc2dcb..af02116 100644
--- a/svl/prj/build.lst
+++ b/svl/prj/build.lst
@@ -1,4 +1,4 @@
sl svl : l10n rsc offuh ucbhelper unotools cppu cppuhelper comphelper sal sot NULL
sl svl usr1 - all svl_mkout NULL
sl svl\prj nmake - all svl_prj NULL
-sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL
+# sl svl\qa\complex\passwordcontainer nmake - all svl_qa_complex_passwordcontainer NULL
diff --git a/tools/Executable_so_checksum.mk b/tools/Executable_so_checksum.mk
index 45ce8eb..dd4bded 100644
--- a/tools/Executable_so_checksum.mk
+++ b/tools/Executable_so_checksum.mk
@@ -43,7 +43,7 @@ $(eval $(call gb_Executable_add_linked_libs,so_checksum,\
sal \
tl \
))
-# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 vos3gcc3 - seems to be superficial
+# used to link against basegfxlx comphelp4gcc3 i18nisolang1gcc3 ucbhelper4gcc3 uno_cppu uno_cppuhelpergcc3 uno_salhelpergcc3 - seems to be superficial
$(eval $(call gb_Executable_add_exception_objects,so_checksum,\
tools/bootstrp/md5 \
diff --git a/vcl/inc/vcl/popupmenuwindow.hxx b/vcl/inc/vcl/popupmenuwindow.hxx
new file mode 100644
index 0000000..9759ab4
--- /dev/null
+++ b/vcl/inc/vcl/popupmenuwindow.hxx
@@ -0,0 +1,50 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef __POPUPMENUWINDOW_HXX__
+#define __POPUPMENUWINDOW_HXX__
+
+#include "vcl/floatwin.hxx"
+
+class VCL_DLLPUBLIC PopupMenuFloatingWindow : public FloatingWindow
+{
+private:
+ struct ImplData;
+ ImplData* mpImplData;
+public:
+ PopupMenuFloatingWindow( Window* pParent, WinBits nStyle = (WB_SYSTEMFLOATWIN|WB_SYSTEMWINDOW|WB_NOBORDER) );
+ ~PopupMenuFloatingWindow();
+
+ sal_uInt16 GetMenuStackLevel() const;
+ void SetMenuStackLevel( sal_uInt16 nLevel );
+ bool IsPopupMenu() const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index f6afd58..745e115 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -34,6 +34,7 @@
#include <tools/gen.hxx>
#include <tools/shl.hxx>
#include <tools/link.hxx>
+#include <tools/fldunit.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/sv.h>
#include <tools/color.hxx>
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 5c04627..febc7a0 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -63,20 +63,6 @@ Help::~Help()
// -----------------------------------------------------------------------
-void Help::OpenHelpAgent( const rtl::OString& )
-{
-}
-
-void Help::OpenHelpAgent( ULONG )
-{
-}
-
-void Help::OpenHelpAgent( ULONG )
-{
-}
-
-// -----------------------------------------------------------------------
-
BOOL Help::Start( const XubString&, const Window* )
{
return FALSE;
diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index aeb0999..c55c636 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -55,14 +55,9 @@
#include "vcl/salimestatus.hxx"
#include "vcl/salsys.hxx"
#include "vcl/svids.hrc"
-
#include "unotools/fontcfg.hxx"
-
-#include "vos/mutex.hxx"
-
#include "cppuhelper/implbase1.hxx"
#include "uno/current_context.hxx"
-
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
#include "com/sun/star/lang/XComponent.hpp"
#include "com/sun/star/awt/XExtendedToolkit.hpp"
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 864e990..af4eb07 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1167,14 +1167,6 @@ static FieldUnit ImplStringToMetric( const String &rMetricString )
}
}
- // Amelia : about character unit
- if (aStr.EqualsIgnoreCaseAscii("cm"))
- return FUNIT_CM;
-
- // Amelia : about character unit
- if (aStr.EqualsIgnoreCaseAscii("cm"))
- return FUNIT_CM;
-
return FUNIT_NONE;
}
diff --git a/vcl/source/control/makefile.mk b/vcl/source/control/makefile.mk
index 75111b2..b651582 100644
--- a/vcl/source/control/makefile.mk
+++ b/vcl/source/control/makefile.mk
@@ -62,7 +62,7 @@ SLOFILES= $(SLO)$/button.obj \
$(SLO)$/slider.obj \
$(SLO)$/spinbtn.obj \
$(SLO)$/spinfld.obj \
- $(SLO)$/tabctrl.obj
+ $(SLO)$/tabctrl.obj \
$(SLO)$/quickselectionengine.obj
EXCEPTIONSFILES= \
@@ -85,7 +85,8 @@ EXCEPTIONSFILES= \
$(SLO)$/slider.obj \
$(SLO)$/spinbtn.obj \
$(SLO)$/spinfld.obj \
- $(SLO)$/tabctrl.obj
+ $(SLO)$/tabctrl.obj \
+ $(SLO)$/quickselectionengine.obj
# --- Targets ------------------------------------------------------
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 11df535..f695afd 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -640,11 +640,6 @@ void TabControl::ImplChangeTabPage( USHORT nId, USHORT nOldId )
mbRestoreUnqId = TRUE;
pCtrlParent->SetUniqueId( pPage->GetUniqueId() );
}
- if( ! GetSmartHelpId().HasAny() )
- {
- mbRestoreSmartId = TRUE;
- pCtrlParent->SetSmartHelpId( pPage->GetSmartHelpId() );
- }
pPage->ActivatePage();
@@ -1017,16 +1012,6 @@ long TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent )
return nRet;
}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( TabControl, ImplScrollBtnHdl, PushButton*, EMPTYARG )
-{
- ImplSetScrollBtnsState();
- return 0;
-}
-
-
// -----------------------------------------------------------------------
IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG )
@@ -1052,33 +1037,6 @@ IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent )
return 0;
}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( TabControl, ImplListBoxSelectHdl, ListBox*, EMPTYARG )
-{
- SelectTabPage( GetPageId( mpTabCtrlData->mpListBox->GetSelectEntryPos() ) );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( TabControl, ImplWindowEventListener, VclSimpleEvent*, pEvent )
-{
- if ( pEvent && pEvent->ISA( VclWindowEvent ) && (pEvent->GetId() == VCLEVENT_WINDOW_KEYINPUT) )
- {
- VclWindowEvent* pWindowEvent = static_cast< VclWindowEvent* >(pEvent);
- // Do not handle events from TabControl or it's children, which is done in Notify(), where the events can be consumed.
- if ( !IsWindowOrChild( pWindowEvent->GetWindow() ) )
- {
- KeyEvent* pKeyEvent = static_cast< KeyEvent* >(pWindowEvent->GetData());
- ImplHandleKeyEvent( *pKeyEvent );
- }
- }
- return 0;
-}
-
-
// -----------------------------------------------------------------------
void TabControl::MouseButtonDown( const MouseEvent& rMEvt )
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d693ea5..99df79e 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -29,6 +29,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_vcl.hxx"
+#include "i18npool/mslangid.hxx"
#include "svsys.h"
#include "vcl/salgdi.hxx"
#include "vcl/sallayout.hxx"
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index afa9d35..d74ae65 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -12060,269 +12060,4 @@ void PDFWriterImpl::addStream( const String& rMimeType, PDFOutputStream* pStream
}
}
-/*************************************************************
-begin i12626 methods
-
-Implements Algorithm 3.2, step 1 only
-*/
-void PDFWriterImpl::padPassword( rtl::OUString aPassword, sal_uInt8 *paPasswordTarget )
-{
-// get ansi-1252 version of the password string CHECKIT ! i12626
- rtl::OString aString = rtl::OUStringToOString( aPassword, RTL_TEXTENCODING_MS_1252 );
-
-//copy the string to the target
- sal_Int32 nToCopy = ( aString.getLength() < 32 ) ? aString.getLength() : 32;
- sal_Int32 nCurrentChar;
-
- for( nCurrentChar = 0; nCurrentChar < nToCopy; nCurrentChar++ )
- paPasswordTarget[nCurrentChar] = (sal_uInt8)( aString.getStr()[nCurrentChar] );
-
-//pad it
- if( nCurrentChar < 32 )
- {//fill with standard byte string
- sal_Int32 i,y;
- for( i = nCurrentChar, y = 0 ; i < 32; i++, y++ )
- paPasswordTarget[i] = m_nPadString[y];
- }
-}
-
-/**********************************
-Algorithm 3.2 Compute the encryption key used
-
-step 1 should already be done before calling, the paThePaddedPassword parameter should contain
-the padded password and must be 32 byte long, the encryption key is returned into the paEncryptionKey parameter,
-it will be 16 byte long for 128 bit security; for 40 bit security only the first 5 bytes are used
-
-TODO: in pdf ver 1.5 and 1.6 the step 6 is different, should be implemented. See spec.
-
-*/
-void PDFWriterImpl::computeEncryptionKey(sal_uInt8 *paThePaddedPassword, sal_uInt8 *paEncryptionKey )
-{
-//step 2
- if( m_aDigest )
- {
- rtlDigestError nError = rtl_digest_updateMD5( m_aDigest, paThePaddedPassword, ENCRYPTED_PWD_SIZE );
-//step 3
- if( nError == rtl_Digest_E_None )
- nError = rtl_digest_updateMD5( m_aDigest, m_nEncryptedOwnerPassword , sizeof( m_nEncryptedOwnerPassword ) );
-//Step 4
- sal_uInt8 nPerm[4];
-
- nPerm[0] = (sal_uInt8)m_nAccessPermissions;
- nPerm[1] = (sal_uInt8)( m_nAccessPermissions >> 8 );
- nPerm[2] = (sal_uInt8)( m_nAccessPermissions >> 16 );
- nPerm[3] = (sal_uInt8)( m_nAccessPermissions >> 24 );
-
- if( nError == rtl_Digest_E_None )
- nError = rtl_digest_updateMD5( m_aDigest, nPerm , sizeof( nPerm ) );
-
-//step 5, get the document ID, binary form
- if( nError == rtl_Digest_E_None )
- nError = rtl_digest_updateMD5( m_aDigest, m_nDocID , sizeof( m_nDocID ) );
-//get the digest
- sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ] = {0};
- if( nError == rtl_Digest_E_None )
- {
- rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof( nMD5Sum ) );
-
-//step 6, only if 128 bit
- if( m_aContext.Security128bit )
- {
- for( sal_Int32 i = 0; i < 50; i++ )
- {
- nError = rtl_digest_updateMD5( m_aDigest, &nMD5Sum, sizeof( nMD5Sum ) );
- if( nError != rtl_Digest_E_None )
- break;
- rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof( nMD5Sum ) );
- }
- }
- }
-//Step 7
- for( sal_Int32 i = 0; i < MD5_DIGEST_SIZE; i++ )
- paEncryptionKey[i] = nMD5Sum[i];
- }
-}
-
-/**********************************
-Algorithm 3.3 Compute the encryption dictionary /O value, save into the class data member
-the step numbers down here correspond to the ones in PDF v.1.4 specfication
-*/
-void PDFWriterImpl::computeODictionaryValue()
-{
-//step 1 already done, data is in m_nPaddedOwnerPassword
-//step 2
- if( m_aDigest )
- {
- rtlDigestError nError = rtl_digest_updateMD5( m_aDigest, &m_nPaddedOwnerPassword, sizeof( m_nPaddedOwnerPassword ) );
- if( nError == rtl_Digest_E_None )
- {
- sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
-
- rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof(nMD5Sum) );
-//step 3, only if 128 bit
- if( m_aContext.Security128bit )
- {
- sal_Int32 i;
- for( i = 0; i < 50; i++ )
- {
- nError = rtl_digest_updateMD5( m_aDigest, nMD5Sum, sizeof( nMD5Sum ) );
- if( nError != rtl_Digest_E_None )
- break;
- rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof( nMD5Sum ) );
- }
- }
-//Step 4, the key is in nMD5Sum
-//step 5 already done, data is in m_nPaddedUserPassword
-//step 6
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode,
- nMD5Sum, m_nKeyLength , NULL, 0 );
-// encrypt the user password using the key set above
- rtl_cipher_encodeARCFOUR( m_aCipher, m_nPaddedUserPassword, sizeof( m_nPaddedUserPassword ), // the data to be encrypted
- m_nEncryptedOwnerPassword, sizeof( m_nEncryptedOwnerPassword ) ); //encrypted data, stored in class data member
-//Step 7, only if 128 bit
- if( m_aContext.Security128bit )
- {
- sal_uInt32 i, y;
- sal_uInt8 nLocalKey[ SECUR_128BIT_KEY ]; // 16 = 128 bit key
-
- for( i = 1; i <= 19; i++ ) // do it 19 times, start with 1
- {
- for( y = 0; y < sizeof( nLocalKey ); y++ )
- nLocalKey[y] = (sal_uInt8)( nMD5Sum[y] ^ i );
-
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode,
- nLocalKey, SECUR_128BIT_KEY, NULL, 0 ); //destination data area, on init can be NULL
- rtl_cipher_encodeARCFOUR( m_aCipher, m_nEncryptedOwnerPassword, sizeof( m_nEncryptedOwnerPassword ), // the data to be encrypted
- m_nEncryptedOwnerPassword, sizeof( m_nEncryptedOwnerPassword ) ); // encrypted data, can be the same as the input, encrypt "in place"
-//step 8, store in class data member
- }
- }
- }
- }
-}
-
-/**********************************
-Algorithms 3.4 and 3.5 Compute the encryption dictionary /U value, save into the class data member, revision 2 (40 bit) or 3 (128 bit)
-*/
-void PDFWriterImpl::computeUDictionaryValue()
-{
-//step 1, common to both 3.4 and 3.5
- computeEncryptionKey( m_nPaddedUserPassword , m_nEncryptionKey );
-
- if( m_aContext.Security128bit == false )
- {
-//3.4
-//step 2 and 3
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode,
- m_nEncryptionKey, 5 , // key and key length
- NULL, 0 ); //destination data area
-// encrypt the user password using the key set above, save for later use
- rtl_cipher_encodeARCFOUR( m_aCipher, m_nPadString, sizeof( m_nPadString ), // the data to be encrypted
- m_nEncryptedUserPassword, sizeof( m_nEncryptedUserPassword ) ); //encrypted data, stored in class data member
- }
- else
- {
-//or 3.5, for 128 bit security
-//step6, initilize the last 16 bytes of the encrypted user password to 0
- for(sal_uInt32 i = MD5_DIGEST_SIZE; i < sizeof( m_nEncryptedUserPassword ); i++)
- m_nEncryptedUserPassword[i] = 0;
-//step 2
- if( m_aDigest )
- {
- rtlDigestError nError = rtl_digest_updateMD5( m_aDigest, m_nPadString, sizeof( m_nPadString ) );
-//step 3
- if( nError == rtl_Digest_E_None )
- nError = rtl_digest_updateMD5( m_aDigest, m_nDocID , sizeof(m_nDocID) );
-
- sal_uInt8 nMD5Sum[ RTL_DIGEST_LENGTH_MD5 ];
- rtl_digest_getMD5( m_aDigest, nMD5Sum, sizeof(nMD5Sum) );
-//Step 4
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode,
- m_nEncryptionKey, SECUR_128BIT_KEY, NULL, 0 ); //destination data area
- rtl_cipher_encodeARCFOUR( m_aCipher, nMD5Sum, sizeof( nMD5Sum ), // the data to be encrypted
- m_nEncryptedUserPassword, sizeof( nMD5Sum ) ); //encrypted data, stored in class data member
-//step 5
- sal_uInt32 i, y;
- sal_uInt8 nLocalKey[SECUR_128BIT_KEY];
-
- for( i = 1; i <= 19; i++ ) // do it 19 times, start with 1
- {
- for( y = 0; y < sizeof( nLocalKey ) ; y++ )
- nLocalKey[y] = (sal_uInt8)( m_nEncryptionKey[y] ^ i );
-
- rtl_cipher_initARCFOUR( m_aCipher, rtl_Cipher_DirectionEncode,
- nLocalKey, SECUR_128BIT_KEY, // key and key length
- NULL, 0 ); //destination data area, on init can be NULL
- rtl_cipher_encodeARCFOUR( m_aCipher, m_nEncryptedUserPassword, SECUR_128BIT_KEY, // the data to be encrypted
- m_nEncryptedUserPassword, SECUR_128BIT_KEY ); // encrypted data, can be the same as the input, encrypt "in place"
- }
- }
- }
-}
-
-/* init the encryption engine
-1. init the document id, used both for building the document id and for building the encryption key(s)
-2. build the encryption key following algorithms described in the PDF specification
- */
-void PDFWriterImpl::initEncryption()
-{
- m_aOwnerPassword = m_aContext.OwnerPassword;
- m_aUserPassword = m_aContext.UserPassword;
-/* password stuff computing, before sending out anything */
- DBG_ASSERT( m_aCipher != NULL, "PDFWriterImpl::initEncryption: a cipher (ARCFOUR) object is not available !" );
- DBG_ASSERT( m_aDigest != NULL, "PDFWriterImpl::initEncryption: a digest (MD5) object is not available !" );
-
- if( m_aCipher && m_aDigest )
- {
-//if there is no owner password, force it to the user password
- if( m_aOwnerPassword.getLength() == 0 )
- m_aOwnerPassword = m_aUserPassword;
-
- initPadString();
-/*
-1) pad passwords
-*/
- padPassword( m_aOwnerPassword, m_nPaddedOwnerPassword );
- padPassword( m_aUserPassword, m_nPaddedUserPassword );
-/*
-2) compute the access permissions, in numerical form
-
-the default value depends on the revision 2 (40 bit) or 3 (128 bit security):
-- for 40 bit security the unused bit must be set to 1, since they are not used
-- for 128 bit security the same bit must be preset to 0 and set later if needed
-according to the table 3.15, pdf v 1.4 */
- m_nAccessPermissions = ( m_aContext.Security128bit ) ? 0xfffff0c0 : 0xffffffc0 ;
-
-/* check permissions for 40 bit security case */
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanPrintTheDocument ) ? 1 << 2 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanModifyTheContent ) ? 1 << 3 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanCopyOrExtract ) ? 1 << 4 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanAddOrModify ) ? 1 << 5 : 0;
- m_nKeyLength = SECUR_40BIT_KEY;
- m_nRC4KeyLength = SECUR_40BIT_KEY+5; // for this value see PDF spec v 1.4, algorithm 3.1 step 4, where n is 5
-
- if( m_aContext.Security128bit )
- {
- m_nKeyLength = SECUR_128BIT_KEY;
- m_nRC4KeyLength = 16; // for this value see PDF spec v 1.4, algorithm 3.1 step 4, where n is 16, thus maximum
- // permitted value is 16
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanFillInteractive ) ? 1 << 8 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanExtractForAccessibility ) ? 1 << 9 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanAssemble ) ? 1 << 10 : 0;
- m_nAccessPermissions |= ( m_aContext.AccessPermissions.CanPrintFull ) ? 1 << 11 : 0;
- }
- computeODictionaryValue();
- computeUDictionaryValue();
-
-//clear out exceding key values, prepares for generation number default to 0 as well
-// see checkAndEnableStreamEncryption in pdfwriter_impl.hxx
- sal_Int32 i, y;
- for( i = m_nKeyLength, y = 0; y < 5 ; y++ )
- m_nEncryptionKey[i++] = 0;
- }
- else //either no cipher or no digest or both, something is wrong with memory or something else
- m_aContext.Encrypt = false; //then turn the encryption off
-}
-/* end i12626 methods */
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx
index 2c6a826..b55f915 100644
--- a/vcl/source/gdi/print3.cxx
+++ b/vcl/source/gdi/print3.cxx
@@ -1380,7 +1380,7 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_
{
rEntry.Value >>= aDep.mnDependsOnEntry;
}
- else if( rEntry.Name.equalsAscii( RTL_CONSTASCII_STRINGPARAM( "ChoicesDisabled" ) ) )
+ else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ChoicesDisabled" ) ) )
{
rEntry.Value >>= aChoicesDisabled;
}
diff --git a/vcl/source/src/images.src b/vcl/source/src/images.src
index aca54cc..659cc09 100644
--- a/vcl/source/src/images.src
+++ b/vcl/source/src/images.src
@@ -36,6 +36,7 @@
Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_STDOFFSET)
{
File = "check.png";
+};
Bitmap (SV_RESID_BITMAP_CHECK + SV_RESID_MONOOFFSET)
{
@@ -587,12 +588,3 @@ Bitmap SV_DISCLOSURE_MINUS
File = "minus.png";
};
-Bitmap SV_DISCLOSURE_PLUS
-{
- File = "plus.png";
-};
-
-Bitmap SV_DISCLOSURE_MINUS
-{
- File = "minus.png";
-};
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 5f50b48..30f0af9 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -77,22 +77,4 @@ void IntroWindow::SetBackgroundBitmap( const Bitmap& rBitmap )
}
}
-void IntroWindow::SetBackgroundBitmap( const BitmapEx& rBitmapEx )
-{
- if( ! rBitmapEx.IsEmpty() )
- {
- SalBitmap* pBmp = rBitmapEx.ImplGetBitmapImpBitmap()->ImplGetSalBitmap();
- ImplGetFrame()->SetBackgroundBitmap( pBmp );
- }
-}
-
-void IntroWindow::SetBackgroundBitmap( const BitmapEx& rBitmapEx )
-{
- if( ! rBitmapEx.IsEmpty() )
- {
- SalBitmap* pBmp = rBitmapEx.ImplGetBitmapImpBitmap()->ImplGetSalBitmap();
- ImplGetFrame()->SetBackgroundBitmap( pBmp );
- }
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ea7e7e8..aee50dd 100755
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -5738,17 +5738,6 @@ BOOL MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, BOOL bFromMenu
else
n = pMenu->GetItemCount()-1;
}
-
- // handling gtk like (aka mbOpenMenuOnF10)
- // do not highlight an item when opening a sub menu
- // unless there already was a higlighted sub menu item
- bool bWasHighlight = false;
- if( pActivePopup )
- {
- MenuFloatingWindow* pSubWindow = dynamic_cast<MenuFloatingWindow*>(pActivePopup->ImplGetWindow());
- if( pSubWindow )
- bWasHighlight = (pSubWindow->GetHighlightedItem() != ITEMPOS_INVALID);
- }
// handling gtk like (aka mbOpenMenuOnF10)
// do not highlight an item when opening a sub menu
@@ -6173,18 +6162,4 @@ ImplMenuDelData::~ImplMenuDelData()
const_cast< Menu* >( mpMenu )->ImplRemoveDel( *this );
}
-ImplMenuDelData::ImplMenuDelData( const Menu* pMenu )
-: mpNext( 0 )
-, mpMenu( 0 )
-{
- if( pMenu )
- const_cast< Menu* >( pMenu )->ImplAddDel( *this );
-}
-
-ImplMenuDelData::~ImplMenuDelData()
-{
- if( mpMenu )
- const_cast< Menu* >( mpMenu )->ImplRemoveDel( *this );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 2ed2fd5..51a4fd6 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -746,8 +746,7 @@ BOOL GtkSalGraphics::drawNativeControl( ControlType nType,
}
BOOL returnVal = FALSE;
- // get a GC with current clipping region set
- SelectFont();
+ GetFontGC();
// theme changed ?
if( GtkSalGraphics::bThemeChanged )
@@ -916,7 +915,7 @@ BOOL GtkSalGraphics::drawNativeMixedStateCheck( ControlType nType,
Rectangle aCtrlRect = rControlRegion;
BOOL returnVal = FALSE;
- SelectFont();
+ GetFontGC();
// draw upper half in off state
const_cast<ImplControlValue&>(aValue).setTristateVal( BUTTONVALUE_OFF );
diff --git a/vcl/unx/headless/svpinst.cxx b/vcl/unx/headless/svpinst.cxx
index ae3ccb7..e976f35 100644
--- a/vcl/unx/headless/svpinst.cxx
+++ b/vcl/unx/headless/svpinst.cxx
@@ -333,11 +333,9 @@ bool SvpSalInstance::CheckYieldMutex()
{
bool bRet = true;
- if ( mnThreadId != osl::Thread::getCurrentIdentifier() )
- {
+ if ( m_aYieldMutex.GetThreadId() != osl::Thread::getCurrentIdentifier() )
bRet = false;
- }
-
+
return bRet;
}
diff --git a/vcl/unx/source/gdi/salgdi3.cxx b/vcl/unx/source/gdi/salgdi3.cxx
index 2bc5c6c..2efa0d9 100644
--- a/vcl/unx/source/gdi/salgdi3.cxx
+++ b/vcl/unx/source/gdi/salgdi3.cxx
@@ -264,26 +264,6 @@ void ImplServerFontEntry::HandleFontOptions( void )
//--------------------------------------------------------------------------
-inline sal_Unicode SwapBytes( const sal_Unicode nIn )
-{
- bool GetFCFontOptions( const ImplFontAttributes&, int nSize, ImplFontOptions& );
-
- if( !mpServerFont )
- return;
- if( !mbGotFontOptions )
- {
- // get and cache the font options
- mbGotFontOptions = true;
- mbValidFontOptions = GetFCFontOptions( *maFontSelData.mpFontData,
- maFontSelData.mnHeight, maFontOptions );
- }
- // apply the font options
- if( mbValidFontOptions )
- mpServerFont->SetFontOptions( maFontOptions );
-}
-
-//--------------------------------------------------------------------------
-
namespace {
class CairoWrapper
diff --git a/vcl/unx/source/printer/ppdparser.cxx b/vcl/unx/source/printer/ppdparser.cxx
index 1cb0aa2..6ad1b1b 100644
--- a/vcl/unx/source/printer/ppdparser.cxx
+++ b/vcl/unx/source/printer/ppdparser.cxx
@@ -268,202 +268,6 @@ namespace psp
};
}
-#include "com/sun/star/lang/Locale.hpp"
-
-namespace psp
-{
- class PPDTranslator
- {
- struct LocaleEqual
- {
- bool operator()(const com::sun::star::lang::Locale& i_rLeft,
- const com::sun::star::lang::Locale& i_rRight) const
- {
- return i_rLeft.Language.equals( i_rRight.Language ) &&
- i_rLeft.Country.equals( i_rRight.Country ) &&
- i_rLeft.Variant.equals( i_rRight.Variant );
- }
- };
-
- struct LocaleHash
- {
- size_t operator()(const com::sun::star::lang::Locale& rLocale) const
- { return
- (size_t)rLocale.Language.hashCode()
- ^ (size_t)rLocale.Country.hashCode()
- ^ (size_t)rLocale.Variant.hashCode()
- ;
- }
- };
-
- typedef std::hash_map< com::sun::star::lang::Locale, rtl::OUString, LocaleHash, LocaleEqual > translation_map;
- typedef std::hash_map< rtl::OUString, translation_map, rtl::OUStringHash > key_translation_map;
-
- key_translation_map m_aTranslations;
- public:
- PPDTranslator() {}
- ~PPDTranslator() {}
-
-
- void insertValue(
- const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rValue,
- const rtl::OUString& i_rTranslation,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale()
- );
-
- void insertOption( const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rTranslation,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() )
- {
- insertValue( i_rKey, i_rOption, rtl::OUString(), i_rTranslation, i_rLocale );
- }
-
- void insertKey( const rtl::OUString& i_rKey,
- const rtl::OUString& i_rTranslation,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() )
- {
- insertValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rTranslation, i_rLocale );
- }
-
- rtl::OUString translateValue(
- const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rValue,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale()
- ) const;
-
- rtl::OUString translateOption( const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const
- {
- return translateValue( i_rKey, i_rOption, rtl::OUString(), i_rLocale );
- }
-
- rtl::OUString translateKey( const rtl::OUString& i_rKey,
- const com::sun::star::lang::Locale& i_rLocale = com::sun::star::lang::Locale() ) const
- {
- return translateValue( i_rKey, rtl::OUString(), rtl::OUString(), i_rLocale );
- }
- };
-
- static com::sun::star::lang::Locale normalizeInputLocale(
- const com::sun::star::lang::Locale& i_rLocale,
- bool bInsertDefault = false
- )
- {
- com::sun::star::lang::Locale aLoc( i_rLocale );
- if( bInsertDefault && aLoc.Language.getLength() == 0 )
- {
- // empty locale requested, fill in application UI locale
- aLoc = Application::GetSettings().GetUILocale();
-
- #if OSL_DEBUG_LEVEL > 1
- static const char* pEnvLocale = getenv( "SAL_PPDPARSER_LOCALE" );
- if( pEnvLocale && *pEnvLocale )
- {
- rtl::OString aStr( pEnvLocale );
- sal_Int32 nLen = aStr.getLength();
- aLoc.Language = rtl::OStringToOUString( aStr.copy( 0, nLen > 2 ? 2 : nLen ), RTL_TEXTENCODING_MS_1252 );
- if( nLen >=5 && aStr.getStr()[2] == '_' )
- aLoc.Country = rtl::OStringToOUString( aStr.copy( 3, 2 ), RTL_TEXTENCODING_MS_1252 );
- else
- aLoc.Country = rtl::OUString();
- aLoc.Variant = rtl::OUString();
- }
- #endif
- }
- aLoc.Language = aLoc.Language.toAsciiLowerCase();
- aLoc.Country = aLoc.Country.toAsciiUpperCase();
- aLoc.Variant = aLoc.Variant.toAsciiUpperCase();
-
- return aLoc;
- }
-
- void PPDTranslator::insertValue(
- const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rValue,
- const rtl::OUString& i_rTranslation,
- const com::sun::star::lang::Locale& i_rLocale
- )
- {
- rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
- aKey.append( i_rKey );
- if( i_rOption.getLength() || i_rValue.getLength() )
- {
- aKey.append( sal_Unicode( ':' ) );
- aKey.append( i_rOption );
- }
- if( i_rValue.getLength() )
- {
- aKey.append( sal_Unicode( ':' ) );
- aKey.append( i_rValue );
- }
- if( aKey.getLength() && i_rTranslation.getLength() )
- {
- rtl::OUString aK( aKey.makeStringAndClear() );
- com::sun::star::lang::Locale aLoc;
- aLoc.Language = i_rLocale.Language.toAsciiLowerCase();
- aLoc.Country = i_rLocale.Country.toAsciiUpperCase();
- aLoc.Variant = i_rLocale.Variant.toAsciiUpperCase();
- m_aTranslations[ aK ][ aLoc ] = i_rTranslation;
- }
- }
-
- rtl::OUString PPDTranslator::translateValue(
- const rtl::OUString& i_rKey,
- const rtl::OUString& i_rOption,
- const rtl::OUString& i_rValue,
- const com::sun::star::lang::Locale& i_rLocale
- ) const
- {
- rtl::OUString aResult;
-
- rtl::OUStringBuffer aKey( i_rKey.getLength() + i_rOption.getLength() + i_rValue.getLength() + 2 );
- aKey.append( i_rKey );
- if( i_rOption.getLength() || i_rValue.getLength() )
- {
- aKey.append( sal_Unicode( ':' ) );
- aKey.append( i_rOption );
- }
- if( i_rValue.getLength() )
- {
- aKey.append( sal_Unicode( ':' ) );
- aKey.append( i_rValue );
- }
- if( aKey.getLength() )
- {
- rtl::OUString aK( aKey.makeStringAndClear() );
- key_translation_map::const_iterator it = m_aTranslations.find( aK );
- if( it != m_aTranslations.end() )
- {
- const translation_map& rMap( it->second );
-
- com::sun::star::lang::Locale aLoc( normalizeInputLocale( i_rLocale, true ) );
- for( int nTry = 0; nTry < 4; nTry++ )
- {
- translation_map::const_iterator tr = rMap.find( aLoc );
- if( tr != rMap.end() )
- {
- aResult = tr->second;
- break;
- }
- switch( nTry )
- {
- case 0: aLoc.Variant = rtl::OUString();break;
- case 1: aLoc.Country = rtl::OUString();break;
- case 2: aLoc.Language = rtl::OUString();break;
- }
- }
- }
- }
- return aResult;
- }
-}
-
using namespace psp;
using namespace rtl;
More information about the Libreoffice-commits
mailing list