summaryrefslogtreecommitdiff
path: root/vcl/inc/vcl/ppdparser.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc/vcl/ppdparser.hxx')
-rw-r--r--vcl/inc/vcl/ppdparser.hxx23
1 files changed, 18 insertions, 5 deletions
diff --git a/vcl/inc/vcl/ppdparser.hxx b/vcl/inc/vcl/ppdparser.hxx
index ed9f91b97d99..ba5bc5004362 100644
--- a/vcl/inc/vcl/ppdparser.hxx
+++ b/vcl/inc/vcl/ppdparser.hxx
@@ -37,11 +37,14 @@
#include "tools/string.hxx"
#include "tools/stream.hxx"
+#include "com/sun/star/lang/Locale.hpp"
+
#define PRINTER_PPDDIR "driver"
namespace psp {
class PPDParser;
+class PPDTranslator;
enum PPDValueType { eInvocation, eQuoted, eSymbol, eString, eNo };
@@ -49,9 +52,7 @@ struct PPDValue
{
PPDValueType m_eType;
String m_aOption;
- String m_aOptionTranslation;
String m_aValue;
- String m_aValueTranslation;
};
// ----------------------------------------------------------------------
@@ -80,7 +81,6 @@ public:
private:
bool m_bUIOption;
- String m_aUITranslation;
UIType m_eUIType;
int m_nOrderDependency;
SetupType m_eSetupType;
@@ -102,7 +102,6 @@ public:
const String& getKey() const { return m_aKey; }
bool isUIKey() const { return m_bUIOption; }
- const String& getUITranslation() const { return m_aUITranslation; }
UIType getUIType() const { return m_eUIType; }
SetupType getSetupType() const { return m_eSetupType; }
int getOrderDependency() const { return m_nOrderDependency; }
@@ -185,6 +184,9 @@ private:
// fonts
const PPDKey* m_pFontList;
+ // translations
+ PPDTranslator* m_pTranslator;
+
PPDParser( const String& rFile );
~PPDParser();
@@ -193,7 +195,7 @@ private:
void parseConstraint( const ByteString& rLine );
void parse( std::list< ByteString >& rLines );
- String handleTranslation( const ByteString& rString );
+ String handleTranslation( const ByteString& i_rString, bool i_bIsGlobalized );
static void scanPPDDir( const String& rDir );
static void initPPDFiles();
@@ -277,6 +279,17 @@ public:
String& rEncoding,
String& rCharset ) const;
const String& getFont( int ) const;
+
+
+ rtl::OUString translateKey( const rtl::OUString& i_rKey,
+ 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;
+ 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;
};
// ----------------------------------------------------------------------