/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ #include #include #include #include #if defined ( MACOSX ) #include #include #include #endif #include #include #include #include #include #include #include #include using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Any; using ::com::sun::star::lang::IndexOutOfBoundsException; css::uno::Any VCLXTopWindow::getWindowHandle( const css::uno::Sequence< sal_Int8 >& /*ProcessId*/, sal_Int16 SystemType ) { SolarMutexGuard aGuard; // TODO, check the process id css::uno::Any aRet; vcl::Window* pWindow = VCLXContainer::GetWindow(); if ( pWindow ) { const SystemEnvData* pSysData = static_cast(pWindow)->GetSystemData(); if( pSysData ) { #if defined (_WIN32) if( SystemType == css::lang::SystemDependent::SYSTEM_WIN32 ) { aRet <<= reinterpret_cast(pSysData->hWnd); } #elif defined(MACOSX) if( SystemType == css::lang::SystemDependent::SYSTEM_MAC ) { aRet <<= reinterpret_cast(pSysData->mpNSView); } #elif defined(ANDROID) // Nothing (void) SystemType; #elif defined(IOS) // Nothing (void) SystemType; #elif defined(UNX) if( SystemType == css::lang::SystemDependent::SYSTEM_XWINDOW ) { css::awt::SystemDependentXWindow aSD; aSD.DisplayPointer = sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(pSysData->pDisplay)); aSD.WindowHandle = pSysData->GetWindowHandle(pWindow->ImplGetFrame()); aRet <<= aSD; } #endif } } return aRet; } void VCLXTopWindow::addTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) { SolarMutexGuard aGuard; if (!IsDisposed()) GetTopWindowListeners().addInterface( rxListener ); } void VCLXTopWindow::removeTopWindowListener( const css::uno::Reference< css::awt::XTopWindowListener >& rxListener ) { SolarMutexGuard aGuard; if (!IsDisposed()) GetTopWindowListeners().removeInterface( rxListener ); } void VCLXTopWindow::toFront( ) { SolarMutexGuard aGuard; vcl::Window* pWindow = VCLXContainer::GetWindow(); if (pWindow) pWindow->ToTop( ToTopFlags::RestoreWhenMin ); } void VCLXTopWindow::toBack( ) { } void VCLXTopWindow::setMenuBar( const css::uno::Reference< css::awt::XMenuBar >& rxMenu ) { SolarMutexGuard aGuard; vcl::Window* pWindow = VCLXContainer::GetWindow(); if ( pWindow ) { SystemWindow* pSystemWindow = static_cast( pWindow ); pSystemWindow->SetMenuBar( nullptr ); if ( rxMenu.is() ) { VCLXMenu* pMenu = dynamic_cast( rxMenu.get() ); if ( pMenu && !pMenu->IsPopupMenu() ) pSystemWindow->SetMenuBar( static_cast( pMenu->GetMenu() )); } } } sal_Bool SAL_CALL VCLXTopWindow::getIsMaximized() { SolarMutexGuard aGuard; const WorkWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return false; return pWindow->IsMaximized(); } void SAL_CALL VCLXTopWindow::setIsMaximized( sal_Bool _ismaximized ) { SolarMutexGuard aGuard; WorkWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return; pWindow->Maximize( _ismaximized ); } sal_Bool SAL_CALL VCLXTopWindow::getIsMinimized() { SolarMutexGuard aGuard; const WorkWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return false; return pWindow->IsMinimized(); } void SAL_CALL VCLXTopWindow::setIsMinimized( sal_Bool _isMinimized ) { SolarMutexGuard aGuard; WorkWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return; _isMinimized ? pWindow->Minimize() : pWindow->Restore(); } ::sal_Int32 SAL_CALL VCLXTopWindow::getDisplay() { SolarMutexGuard aGuard; const SystemWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return 0; return pWindow->GetScreenNumber(); } void SAL_CALL VCLXTopWindow::setDisplay( ::sal_Int32 _display ) { SolarMutexGuard aGuard; if ( ( _display < 0 ) || ( o3tl::make_unsigned(_display) >= Application::GetScreenCount() ) ) throw IndexOutOfBoundsException(); SystemWindow* pWindow = VCLXContainer::GetAsDynamic(); if ( !pWindow ) return; pWindow->SetScreenNumber( _display ); } sal_Bool VCLXTopWindow::getFullScreen() { SolarMutexGuard g; if (auto const win = VCLXContainer::GetAsDynamic()) { return win->IsFullScreenMode(); } return false; } void VCLXTopWindow::setFullScreen(sal_Bool value) { SolarMutexGuard g; if (auto const win = VCLXContainer::GetAsDynamic()) { return win->ShowFullScreenMode(value); } } void VCLXTopWindow::ImplGetPropertyIds( std::vector< sal_uInt16 > &rIds ) { VCLXContainer::ImplGetPropertyIds( rIds ); } VCLXTopWindow::VCLXTopWindow() { } VCLXTopWindow::~VCLXTopWindow() { } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ s LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-08-16tdf#162491 tdf#125032 add hyphenation settings to sidebarLászló Németh
Add .uno:NoBreak to the Character sidebar panel to disable automatic hyphenation for selected words. The icon is enabled only on hyphenated words and words with disabled hyphenation. Add .uno:Hyphenate icon to the Character sidebar panel, with tooltip "Insert Soft Hyphen...", which opens the dialog for (semi-)automatic insertion of soft hyphens. Add paragraph-level hyphenation settings to the Paragraph sidebar panel. Only the toggle button icon "Hyphenation" is visible to enable hyphenation, if the paragraph is not hyphenated. If it's enabled, show all paragraph-level settings. These new sidebar controls allow adjusting paragraph layout and hyphenation quickly, like DTP software do. Note: to add icon to .uno:NoBreak, modify "Properties" of officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu. Note: it's possible, that high resolution icon sizes will need extra dispatcher calls (the draft is attached to the issue in the bug tracker). Change-Id: I292527589ed3a38e4400cfd97ea54cbc7ff56a44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171883 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2024-05-03tdf#160349: add .uno:ChangeTheme to notebookbar to toggle dark modeJustin Luth
A temporary (ugly, but appropriate) icon has been assigned. The toggle can be customize-assigned to keyboard, menu, and toolbar, and can be found by searching for "Dark Mode". In the menu, it is checked when in Dark mode, and in the toolbar it is "depressed" or highlighted as active. Dark mode has been added to the view tab of notebookbar.ui. I added it as NOT VISIBLE, for several reasons. - dark mode is rather new and not so stable, so don't over-promote it. - notebookbars cannot be infinitely customized by the end user, so developers have to add all items. Users only enable or disable. - toggling dark mode really ought to be done at the OS level, and typically should be a one-time setting, therefore not appropriate to waste precious toolbar space. The primary benefit of making it available in the menu is for QA testers who want to easily switch back and forth. WARNING: by customizing the notebookbar, you prevent seeing any future NBB changes made to the program (until you reset to defaults or blow away the user profile). Dark Mode can easily be added to a menu, toolbar or keyboard shortcut by the end user, so I didn't bother adding it anywhere else. To avoid completely cluttering up this commit, I only added Dark mode to the main notebookbar. Once this commit has been finalized, the other writer-apps and notebookbars can also gain this command. Change-Id: Ia7594ad81e305ead922abd0ad7b41d6fc0413053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166781 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2023-07-24tdf#156299 Sync Insert Shape & sidebar Shape deckRizal Muttaqin
Change-Id: I2cf0eb6cdd9256c447de5bbb62e0b516e15cd80d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154835 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-07-21tdf#155374 Icons for PageNumberWizardRizal Muttaqin
Change-Id: Iedea46b31a36c7d1d2a3ab539c3ada0b029293c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154675 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-05-30tdf#155374 Icons for PageNumberWizardRizal Muttaqin
Change-Id: Ie0317d6640e2c2a40dc3e5808397dfada6edc55a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152408 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-04-21Colibre tdf#154825 Section editor iconsRizal Muttaqin
Change-Id: Ia5cb61074d519b68416801ba2268dd11c49284f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150748 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-04-04tdf#151338 Rearrange table popup menu in Draw/ImpressRafael Lima
I also added the SplitCell command to the Draw popup menu, since there's no reason for it not to be there. Change-Id: Iec0d51559bf03c0f352aa631bedb794f18e02e2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149700 Tested-by: Jenkins Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-17Colibre: tdf#126689 Jump Up & Jump Down This Level iconsRizal Muttaqin
Change-Id: Iebfbeecf43e139f39a70ca58bd3b30076856c4d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149042 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-09tdf#149144 Icons for sm Formula Editor in Sidebar DeckRizal Muttaqin
Change-Id: I851e0e45df3331012eddcaa3240c6ffb27054e57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148520 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-08-01tdf#142628 Update icons for Field and Field by TypeRizal Muttaqin
Change-Id: I0f369c0d7c426b6f8930f4d34d7e2130c71a06c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137647 Tested-by: Jenkins Tested-by: Rizal Muttaqin <rizmut@libreoffice.org> Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-06-20Colibre: tdf#149008 differentiate Description and Caption iconsRizal Muttaqin
Change-Id: Ie900f53008122f4df6349800fd0762f2671eda59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136111 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2022-04-28tdf#144788 Split up footnotes and endnotes in NavigatorDhiraj Holden
This patch splits the footnotes and endnotes section in Navigator. Before, there was one section for both footnotes and endnotes and now there are two sections, one for footnotes and one for endnotes. Change-Id: Ic0f3af92efa1c0487ee3c407a819bf34138ef4ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132796 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com> Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2022-03-13Colibre: tdf#147952 Fix Media Player iconsRizal Muttaqin
Change-Id: I555d4d5d20d3c1bca03e9fac0354bb0b2d978d95 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131456 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2022-03-12Colibre: tdf#146545 Add dark variantRizal Muttaqin
Change-Id: I041d74336c3f59e0240341acfb7c50d60d64429e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131411 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>