summaryrefslogtreecommitdiff
path: root/xmlsecurity/source/dialogs/resourcemanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmlsecurity/source/dialogs/resourcemanager.cxx')
-rw-r--r--xmlsecurity/source/dialogs/resourcemanager.cxx76
1 files changed, 38 insertions, 38 deletions
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx
index e41cf546f74f..635b8dd3c447 100644
--- a/xmlsecurity/source/dialogs/resourcemanager.cxx
+++ b/xmlsecurity/source/dialogs/resourcemanager.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* 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
@@ -44,17 +44,17 @@ using namespace std;
namespace XmlSec
{
- static ResMgr* pResMgr = 0;
+ static ResMgr* pResMgr = 0;
static SvtSysLocale* pSysLocale = 0;
ResMgr* GetResMgr( void )
{
if( !pResMgr )
{
- ByteString aName( "xmlsec" );
-// pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILanguage() );
-// LanguageType aLang( LANGUAGE_ENGLISH_US );
-// pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), aLang );
+ ByteString aName( "xmlsec" );
+// pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), Application::GetSettings().GetUILanguage() );
+// LanguageType aLang( LANGUAGE_ENGLISH_US );
+// pResMgr = ResMgr::CreateResMgr( aName.GetBuffer(), aLang );
// MT: Change to Locale
pResMgr = ResMgr::CreateResMgr( aName.GetBuffer() );
}
@@ -113,11 +113,11 @@ namespace XmlSec
}
/*
- Creates two strings based on the distinguished name which are displayed in the
+ Creates two strings based on the distinguished name which are displayed in the
certificate details view. The first string contains only the values of the attribute
and valudes pairs, which are separated by commas. All escape characters ('"') are
removed.
- The second string is for the details view at the bottom. It shows the attribute/value
+ The second string is for the details view at the bottom. It shows the attribute/value
pairs on different lines. All escape characters ('"') are removed.
*/
pair< OUString, OUString> GetDNForCertDetailsView( const OUString & rRawString)
@@ -140,11 +140,11 @@ namespace XmlSec
}
return make_pair(s1.makeStringAndClear(), s2.makeStringAndClear());
}
-
+
/*
Whenever the attribute value contains special characters, such as '"' or ',' (without '')
then the value will be enclosed in double quotes by the respective Windows or NSS function
- which we use to retrieve, for example, the subject name. If double quotes appear in the value then
+ which we use to retrieve, for example, the subject name. If double quotes appear in the value then
they are escaped with a double quote. This function removes the escape characters.
*/
#ifdef WNT
@@ -162,7 +162,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
for (sal_Int32 i = 0; i < length; i++)
{
sal_Unicode c = rRawString[i];
-
+
if (c == '=')
{
if (! bInValue)
@@ -180,9 +180,9 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
{
if (!bInEscape)
{
- //If this is the quote is the first of the couple which enclose the
+ //If this is the quote is the first of the couple which enclose the
//whole value, because the value contains special characters
- //then we just drop it. That is, this character must be followed by
+ //then we just drop it. That is, this character must be followed by
//a character which is not '"'.
if ( i + 1 < length && rRawString[i+1] == '"')
bInEscape = true;
@@ -191,7 +191,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
}
else
{
- //This quote is escaped by a preceding quote and therefore is
+ //This quote is escaped by a preceding quote and therefore is
//part of the value
sbufValue.append(c);
bInEscape = false;
@@ -199,8 +199,8 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
}
else if (c == ',' || c == '+')
{
- //The comma separate the attribute value pairs.
- //If the comma is not part of a value (the value would then be enclosed in '"'),
+ //The comma separate the attribute value pairs.
+ //If the comma is not part of a value (the value would then be enclosed in '"'),
//then we have reached the end of the value
if (!bInValue)
{
@@ -214,7 +214,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
else
{
//The whole string is enclosed because it contains special characters.
- //The enclosing '"' are not part of certificate but will be added by
+ //The enclosing '"' are not part of certificate but will be added by
//the function (Windows or NSS) which retrieves DN
sbufValue.append(c);
}
@@ -248,7 +248,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
for (sal_Int32 i = 0; i < length; i++)
{
sal_Unicode c = rRawString[i];
-
+
if (c == '=')
{
if (! bInValue)
@@ -272,7 +272,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
{ // bInEscape is true
sbufValue.append(c);
bInEscape = false;
- }
+ }
}
else if (c == '"')
{
@@ -286,7 +286,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
}
else
{
- //This quote is escaped by a preceding quote and therefore is
+ //This quote is escaped by a preceding quote and therefore is
//part of the value
sbufValue.append(c);
bInEscape = false;
@@ -294,8 +294,8 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
}
else if (c == ',' || c == '+')
{
- //The comma separate the attribute value pairs.
- //If the comma is not part of a value (the value would then be enclosed in '"'),
+ //The comma separate the attribute value pairs.
+ //If the comma is not part of a value (the value would then be enclosed in '"'),
//then we have reached the end of the value
if (!bInValue)
{
@@ -309,7 +309,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
else
{
//The whole string is enclosed because it contains special characters.
- //The enclosing '"' are not part of certificate but will be added by
+ //The enclosing '"' are not part of certificate but will be added by
//the function (Windows or NSS) which retrieves DN
sbufValue.append(c);
}
@@ -359,14 +359,14 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, UINT16 _nLineBreak )
{
- const sal_Int8* pSerNumSeq = _rSeq.getConstArray();
- int nCnt = _rSeq.getLength();
- String aStr;
- const char pHexDigs[ 17 ] = "0123456789ABCDEF";
- char pBuffer[ 3 ] = " ";
- UINT8 nNum;
- UINT16 nBreakStart = _nLineBreak? _nLineBreak : 1;
- UINT16 nBreak = nBreakStart;
+ const sal_Int8* pSerNumSeq = _rSeq.getConstArray();
+ int nCnt = _rSeq.getLength();
+ String aStr;
+ const char pHexDigs[ 17 ] = "0123456789ABCDEF";
+ char pBuffer[ 3 ] = " ";
+ UINT8 nNum;
+ UINT16 nBreakStart = _nLineBreak? _nLineBreak : 1;
+ UINT16 nBreak = nBreakStart;
for( int i = 0 ; i < nCnt ; ++i )
{
nNum = UINT8( pSerNumSeq[ i ] );
@@ -392,8 +392,8 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
long ShrinkToFitWidth( Control& _rCtrl, long _nOffs )
{
- long nWidth = _rCtrl.GetTextWidth( _rCtrl.GetText() );
- Size aSize( _rCtrl.GetSizePixel() );
+ long nWidth = _rCtrl.GetTextWidth( _rCtrl.GetText() );
+ Size aSize( _rCtrl.GetSizePixel() );
nWidth += _nOffs;
aSize.Width() = nWidth;
_rCtrl.SetSizePixel( aSize );
@@ -402,15 +402,15 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString)
void AlignAfterImage( const FixedImage& _rImage, Control& _rCtrl, long _nXOffset )
{
- Point aPos( _rImage.GetPosPixel() );
- Size aSize( _rImage.GetSizePixel() );
- long n = aPos.X();
+ Point aPos( _rImage.GetPosPixel() );
+ Size aSize( _rImage.GetSizePixel() );
+ long n = aPos.X();
n += aSize.Width();
n += _nXOffset;
aPos.X() = n;
n = aPos.Y();
- n += aSize.Height() / 2; // y-position is in the middle of the image
- n -= _rCtrl.GetSizePixel().Height() / 2; // center Control
+ n += aSize.Height() / 2; // y-position is in the middle of the image
+ n -= _rCtrl.GetSizePixel().Height() / 2; // center Control
aPos.Y() = n;
_rCtrl.SetPosPixel( aPos );
}