ditch the multiply dialog width * X where X is based on language thing

Which should be unnecessary since the vcl layout work and optimal size widgets,
and its a small and arbitary set of languages for which its set.

Change-Id: Ifa397218510ade251f795cdd9360d6bdccb115b7
This commit is contained in:
Caolán McNamara 2016-07-10 16:28:23 +01:00
parent ec950f8ebb
commit 4bc99ab1ac
10 changed files with 2 additions and 131 deletions

View File

@ -56,25 +56,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtLocalisationOptions : public utl::de
bool IsAutoMnemonic ( ) const;
/*-****************************************************************************************************
@short interface methods to get and set value of config key "org.openoffice.Office.Common/View/Localisation/DialogScale"
@descr These value specifies the factor for increasing controls.
Value from [0..100] are allowed.
@ATTENTION These methods don't check for valid or invalid values!
Our configuration server can do it ... but these implementation don't get any notifications
about wrong commits ...!
=> If you set an invalid value - nothing will be changed. The information will lost.
@seealso baseclass ConfigItem
@param "nScale" new value to set it in configuration.
@return The value which represent current state of internal variable.
@onerror No error should occur!
*//*-*****************************************************************************************************/
sal_Int32 GetDialogScale( ) const;
private:
/*-****************************************************************************************************

View File

@ -1216,13 +1216,6 @@ public:
*/
static SystemWindowFlags GetSystemWindowMode();
/** Set a dialog scaling factor. Used for localization.
@param nScale Scaling factor
*/
static void SetDialogScaleX( short nScale );
///@}
/** @name VCL Toolkit and UNO Wrapper

View File

@ -601,8 +601,6 @@ bool l10nMem::convFilterWarning(const string& sSourceFile,
sKey == "WriterCommands.UserInterface.Commands..uno:FlipHorizontal.Label") ||
(sSourceFile == "registry/data/org/openoffice/Office/Common.xcu" &&
sKey == "Common.View.Localisation.AutoMnemonic") ||
(sSourceFile == "registry/data/org/openoffice/Office/Common.xcu" &&
sKey == "Common.View.Localisation.DialogScale") ||
(sSourceFile == "registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu" &&
sKey == "ImpressWindowState.UIElements.States.private:resource/toolpanel/DrawingFramework/SlideTransitions.UIName") ||
(sSourceFile == "registry/data/org/openoffice/Office/UI/ImpressWindowState.xcu" &&

View File

@ -63,38 +63,6 @@
<value xml:lang="zh-CN">true</value>
<value xml:lang="zh-TW">true</value>
</prop>
<prop oor:name="DialogScale">
<value xml:lang="x-no-translate">10</value>
<value xml:lang="en-US">10</value>
<value xml:lang="de">0</value>
<value xml:lang="ar">13</value>
<value xml:lang="ca">10</value>
<value xml:lang="cs">10</value>
<value xml:lang="da">10</value>
<value xml:lang="el">10</value>
<value xml:lang="es">10</value>
<value xml:lang="et">10</value>
<value xml:lang="fi">10</value>
<value xml:lang="fr">10</value>
<value xml:lang="he">10</value>
<value xml:lang="hi-IN">10</value>
<value xml:lang="hu">10</value>
<value xml:lang="it">10</value>
<value xml:lang="ja">13</value>
<value xml:lang="ko">13</value>
<value xml:lang="nl">10</value>
<value xml:lang="pl">13</value>
<value xml:lang="pt">10</value>
<value xml:lang="pt-BR">10</value>
<value xml:lang="ru">13</value>
<value xml:lang="sk">10</value>
<value xml:lang="sl">10</value>
<value xml:lang="sv">10</value>
<value xml:lang="th">10</value>
<value xml:lang="tr">13</value>
<value xml:lang="zh-CN">13</value>
<value xml:lang="zh-TW">13</value>
</prop>
</node>
</node>
<node oor:name="Help">

View File

@ -2769,27 +2769,6 @@
<desc>Specifies if shortcuts are assigned automatically.</desc>
</info>
</prop>
<prop oor:name="DialogScale" oor:type="xs:int" oor:localized="true">
<!-- OldPath: International/DialogScaleX -->
<!-- OldLocation: soffice.ini -->
<info>
<desc>Specifies the percentage for enlarging controls.</desc>
</info>
<constraints>
<minInclusive oor:value="0">
<info>
<desc>Specifies the upper limit for enlarging the controls is
100%.</desc>
</info>
</minInclusive>
<maxInclusive oor:value="100">
<info>
<desc>Specifies the upper limit for enlarging the controls is
100%.</desc>
</info>
</maxInclusive>
</constraints>
</prop>
</group>
<group oor:name="Menu">
<info>

View File

@ -219,7 +219,6 @@ void SfxApplication::Initialize_Impl()
{
SvtLocalisationOptions aLocalisation;
Application::EnableAutoMnemonic ( aLocalisation.IsAutoMnemonic() );
Application::SetDialogScaleX ( (short)(aLocalisation.GetDialogScale()) );
}
pImpl->m_pToolsErrorHdl = new SfxErrorHandler(

View File

@ -32,15 +32,12 @@ using namespace ::com::sun::star::uno;
#define ROOTNODE_LOCALISATION OUString("Office.Common/View/Localisation")
#define DEFAULT_AUTOMNEMONIC false
#define DEFAULT_DIALOGSCALE 0
#define PROPERTYNAME_AUTOMNEMONIC "AutoMnemonic"
#define PROPERTYNAME_DIALOGSCALE "DialogScale"
#define PROPERTYHANDLE_AUTOMNEMONIC 0
#define PROPERTYHANDLE_DIALOGSCALE 1
#define PROPERTYCOUNT 2
#define PROPERTYCOUNT 1
class SvtLocalisationOptions_Impl : public ConfigItem
{
@ -69,7 +66,6 @@ class SvtLocalisationOptions_Impl : public ConfigItem
*//*-*****************************************************************************************************/
bool IsAutoMnemonic ( ) const { return m_bAutoMnemonic;}
sal_Int32 GetDialogScale ( ) const { return m_nDialogScale;}
private:
@ -87,7 +83,6 @@ class SvtLocalisationOptions_Impl : public ConfigItem
private:
bool m_bAutoMnemonic;
sal_Int32 m_nDialogScale;
};
// constructor
@ -97,7 +92,6 @@ SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()
: ConfigItem ( ROOTNODE_LOCALISATION )
// Init member then.
, m_bAutoMnemonic ( DEFAULT_AUTOMNEMONIC )
, m_nDialogScale ( DEFAULT_DIALOGSCALE )
{
// Use our static list of configuration keys to get his values.
Sequence< OUString > seqNames = GetPropertyNames ( );
@ -121,12 +115,6 @@ SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()
seqValues[nProperty] >>= m_bAutoMnemonic;
}
break;
case PROPERTYHANDLE_DIALOGSCALE : {
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Localisation\\DialogScale\"?" );
seqValues[nProperty] >>= m_nDialogScale;
}
break;
}
}
@ -160,12 +148,6 @@ void SvtLocalisationOptions_Impl::Notify( const Sequence< OUString >& seqPropert
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_BOOLEAN), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Localisation\\AutoMnemonic\"?" );
seqValues[nProperty] >>= m_bAutoMnemonic;
}
else
if( seqPropertyNames[nProperty] == PROPERTYNAME_DIALOGSCALE )
{
DBG_ASSERT(!(seqValues[nProperty].getValueTypeClass()!=TypeClass_LONG), "SvtLocalisationOptions_Impl::SvtLocalisationOptions_Impl()\nWho has changed the value type of \"Office.Common\\View\\Localisation\\DialogScale\"?" );
seqValues[nProperty] >>= m_nDialogScale;
}
#if OSL_DEBUG_LEVEL > 0
else assert(false && "SvtLocalisationOptions_Impl::Notify()\nUnknown property detected ... I can't handle these!\n");
#endif
@ -190,11 +172,6 @@ void SvtLocalisationOptions_Impl::ImplCommit()
seqValues[nProperty] <<= m_bAutoMnemonic;
}
break;
case PROPERTYHANDLE_DIALOGSCALE : {
seqValues[nProperty] <<= m_nDialogScale;
}
break;
}
}
// Set properties in configuration.
@ -210,7 +187,6 @@ Sequence< OUString > SvtLocalisationOptions_Impl::GetPropertyNames()
const OUString aProperties[] =
{
OUString(PROPERTYNAME_AUTOMNEMONIC) ,
OUString(PROPERTYNAME_DIALOGSCALE) ,
};
// Initialize return sequence with these list ...
Sequence< OUString > seqPropertyNames(aProperties, PROPERTYCOUNT);
@ -254,14 +230,6 @@ bool SvtLocalisationOptions::IsAutoMnemonic() const
return m_pImpl->IsAutoMnemonic();
}
// public method
sal_Int32 SvtLocalisationOptions::GetDialogScale() const
{
MutexGuard aGuard( GetOwnStaticMutex() );
return m_pImpl->GetDialogScale();
}
namespace
{
class theLocalisationOptionsMutex : public rtl::Static<osl::Mutex, theLocalisationOptionsMutex>{};

View File

@ -125,7 +125,6 @@ struct ImplSVAppData
sal_uInt16 mnDispatchLevel; // DispatchLevel
sal_uInt16 mnModalMode; // ModalMode Count
SystemWindowFlags mnSysWinMode; // Mode, when SystemWindows should be created
short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs
bool mbInAppMain; // is Application::Main() on stack
bool mbInAppExecute; // is Application::Execute() on stack
bool mbAppQuit; // is Application::Quit() called
@ -172,8 +171,7 @@ struct ImplSVGDIData
ImplFontCache* mpScreenFontCache; // Screen-Font-Cache
ImplDirectFontSubstitution* mpDirectFontSubst; // Font-Substitutons defined in Tools->Options->Fonts
GraphicConverter* mpGrfConverter; // Converter for graphics
long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width
long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX
long mnAppFontX; // AppFont X-Numenator for 40/tel Width
long mnAppFontY; // AppFont Y-Numenator for 80/tel Height
bool mbFontSubChanged; // true: FontSubstitution was changed between Begin/End
bool mbNativeFontConfig; // true: do not override UI font

View File

@ -1413,15 +1413,6 @@ bool Application::IsAutoMnemonicEnabled()
return GetSettings().GetStyleSettings().GetAutoMnemonic();
}
void Application::SetDialogScaleX( short nScale )
{
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mnDialogScaleX = nScale;
pSVData->maGDIData.mnAppFontX = pSVData->maGDIData.mnRealAppFontX;
if ( nScale )
pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*nScale)/100;
}
OUString Application::GetToolkitName()
{
ImplSVData* pSVData = ImplGetSVData();

View File

@ -1214,10 +1214,6 @@ void Window::ImplInitAppFontData( vcl::Window* pWindow )
}
}
#endif
pSVData->maGDIData.mnRealAppFontX = pSVData->maGDIData.mnAppFontX;
if ( pSVData->maAppData.mnDialogScaleX )
pSVData->maGDIData.mnAppFontX += (pSVData->maGDIData.mnAppFontX*pSVData->maAppData.mnDialogScaleX)/100;
}
ImplWinData* Window::ImplGetWinData() const