[Libreoffice-commits] core.git: 3 commits - include/vcl oox/source vcl/source
Gary Houston
ghouston at arglist.com
Mon Dec 15 06:26:31 PST 2014
include/vcl/svapp.hxx | 12 --
oox/source/drawingml/diagram/diagramdefinitioncontext.cxx | 4
vcl/source/app/svapp.cxx | 15 --
vcl/source/window/settings.cxx | 80 --------------
4 files changed, 3 insertions(+), 108 deletions(-)
New commits:
commit de41a2038ac44f71a9adef97e6ccea83c99dd1c2
Author: Gary Houston <ghouston at arglist.com>
Date: Mon Dec 15 14:25:31 2014 +0000
Resolves: fdo#87281 Crash on importing diagram in .docx file
Change-Id: Ic2c7326ab83258e2e9dcbac88aa9f76f771a9b12
diff --git a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
index 7f43761..88b69f2 100644
--- a/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
+++ b/oox/source/drawingml/diagram/diagramdefinitioncontext.cxx
@@ -48,7 +48,9 @@ DiagramDefinitionContext::DiagramDefinitionContext( ContextHandler2Helper& rPare
DiagramDefinitionContext::~DiagramDefinitionContext()
{
- mpLayout->getNode()->dump(0);
+ LayoutNodePtr node = mpLayout->getNode();
+ if (node)
+ node->dump(0);
}
ContextHandlerRef
commit e2a41b4415f59c2c6a75f40775a19c8ce4cbdb42
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 15 14:04:08 2014 +0000
don't screw around with the system font selection
Change-Id: I491a6410f70b063fd74834d5837be34e4b9552d7
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 6525240..862626e 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -154,86 +154,6 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
rSettings.SetStyleSettings( aTmpSt );
ImplGetFrame()->UpdateSettings( rSettings );
- // Verify availability of the configured UI font, otherwise choose "Andale Sans UI"
-
- // WTF, what makes Andale Sans UI a suitable cross-platform fallback font?
-
- OUString aUserInterfaceFont;
- bool bUseSystemFont = rSettings.GetStyleSettings().GetUseSystemUIFonts();
-
- // check whether system UI font can display a typical UI text
- if( bUseSystemFont )
- bUseSystemFont = ImplCheckUIFont( rSettings.GetStyleSettings().GetAppFont() );
-
- if ( !bUseSystemFont )
- {
- OutputDevice *pOutDev = GetOutDev();
- pOutDev->ImplInitFontList();
- OUString aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILanguageTag() );
- sal_Int32 nIndex = 0;
- while( nIndex != -1 )
- {
- OUString aName( aConfigFont.getToken( 0, ';', nIndex ) );
- if ( !aName.isEmpty() && mpWindowImpl->mpFrameData->mpFontCollection->FindFontFamily( aName ) )
- {
- aUserInterfaceFont = aConfigFont;
- break;
- }
- }
-
- if ( aUserInterfaceFont.isEmpty() )
- {
- OUString aFallbackFont ("Andale Sans UI" );
- if ( mpWindowImpl->mpFrameData->mpFontCollection->FindFontFamily( aFallbackFont ) )
- aUserInterfaceFont = aFallbackFont;
- }
- }
-
- if ( !bUseSystemFont && !aUserInterfaceFont.isEmpty() )
- {
- StyleSettings aStyleSettings = rSettings.GetStyleSettings();
- vcl::Font aFont = aStyleSettings.GetAppFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetAppFont( aFont );
- aFont = aStyleSettings.GetHelpFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetHelpFont( aFont );
- aFont = aStyleSettings.GetTitleFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetTitleFont( aFont );
- aFont = aStyleSettings.GetFloatTitleFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetFloatTitleFont( aFont );
- aFont = aStyleSettings.GetMenuFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetMenuFont( aFont );
- aFont = aStyleSettings.GetToolFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetToolFont( aFont );
- aFont = aStyleSettings.GetLabelFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetLabelFont( aFont );
- aFont = aStyleSettings.GetInfoFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetInfoFont( aFont );
- aFont = aStyleSettings.GetRadioCheckFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetRadioCheckFont( aFont );
- aFont = aStyleSettings.GetPushButtonFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetPushButtonFont( aFont );
- aFont = aStyleSettings.GetFieldFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetFieldFont( aFont );
- aFont = aStyleSettings.GetIconFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetIconFont( aFont );
- aFont = aStyleSettings.GetGroupFont();
- aFont.SetName( aUserInterfaceFont );
- aStyleSettings.SetGroupFont( aFont );
- rSettings.SetStyleSettings( aStyleSettings );
- }
-
StyleSettings aStyleSettings = rSettings.GetStyleSettings();
// #97047: Force all fonts except Menu and Help to a fixed height
// to avoid UI scaling due to large fonts
commit 8bf07e7f8636a2cd49c8c8955a31f500844aad9d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Dec 15 14:02:44 2014 +0000
drop newly unused Application::ValidateSystemFont
Change-Id: Iffe850d99f2dcd9e955a4ba1190e010be905434b
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index fbc42ab..227f683 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -724,18 +724,6 @@ public:
*/
static const AllSettings& GetSettings();
- /** Validate that the currently selected system UI font is suitable
- to display the application's UI.
-
- A localized test string will be checked if it can be displayed in the currently
- selected system UI font. If no glyphs are missing it can be assumed that the font
- is proper for display of the application's UI.
-
- @returns true if the system font is suitable for our UI and false if the test
- string could not be displayed with the system font.
- */
- static bool ValidateSystemFont();
-
/** Get the application's locale data wrapper.
@returns reference to a LocaleDataWrapper object
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f7a696f..eb3c00b 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -497,21 +497,6 @@ void Application::MergeSystemSettings( AllSettings& rSettings )
}
}
-bool Application::ValidateSystemFont()
-{
- vcl::Window* pWindow = ImplGetSVData()->maWinData.mpFirstFrame;
- if( ! pWindow )
- pWindow = ImplGetDefaultWindow();
-
- if( pWindow )
- {
- AllSettings aSettings;
- pWindow->ImplGetFrame()->UpdateSettings( aSettings );
- return pWindow->ImplCheckUIFont( aSettings.GetStyleSettings().GetAppFont() );
- }
- return false;
-}
-
void Application::SetSettings( const AllSettings& rSettings )
{
const SolarMutexGuard aGuard;
More information about the Libreoffice-commits
mailing list