diff options
Diffstat (limited to 'vcl')
47 files changed, 1004 insertions, 40 deletions
diff --git a/vcl/CppunitTest_vcl_app_test.mk b/vcl/CppunitTest_vcl_app_test.mk index 22b3104919c5..9ee43d5a3b09 100644 --- a/vcl/CppunitTest_vcl_app_test.mk +++ b/vcl/CppunitTest_vcl_app_test.mk @@ -15,6 +15,11 @@ $(eval $(call gb_CppunitTest_add_exception_objects,vcl_app_test, \ vcl/qa/cppunit/app/test_IconThemeSelector \ )) +$(eval $(call gb_CppunitTest_set_include,vcl_app_test,\ + $$(INCLUDE) \ + -I$(SRCDIR)/vcl/inc \ +)) + $(eval $(call gb_CppunitTest_use_libraries,vcl_app_test, \ sal \ vcl \ diff --git a/vcl/inc/IconThemeScanner.hxx b/vcl/inc/IconThemeScanner.hxx new file mode 100644 index 000000000000..3cbca74a4683 --- /dev/null +++ b/vcl/inc/IconThemeScanner.hxx @@ -0,0 +1,92 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_VCL_ICONTHEMESCANNER_HXX +#define INCLUDED_VCL_ICONTHEMESCANNER_HXX + +#include <vcl/dllapi.h> + +#include <rtl/ustring.hxx> +#include <vcl/IconThemeInfo.hxx> + +#include <memory> +#include <vector> + +// forward declaration of unit test class. Required for friend relationship. +class IconThemeScannerTest; + +namespace vcl { + +/** This class scans a folder for icon themes and provides the results. + */ +class VCL_DLLPUBLIC IconThemeScanner +{ +public: + /** Factory method to create the object. + * Provide a path to search for IconThemes. + */ + static std::shared_ptr<IconThemeScanner> Create(const OUString &path); + + /** This method will return the standard path where icon themes are located. + */ + static OUString + GetStandardIconThemePath(); + + const std::vector<IconThemeInfo>& + GetFoundIconThemes() const {return mFoundIconThemes;} + + /** Get the IconThemeInfo for a theme. + * If the theme id is not among the found themes, a std::runtime_error will be thrown. + * Use IconThemeIsInstalled() to check whether it is available. + */ + const IconThemeInfo& GetIconThemeInfo(const OUString& themeId); + + /** Checks whether the theme with the provided name has been found in the + * scanned directory. + */ + bool + IconThemeIsInstalled(const OUString& themeId) const; + +private: + IconThemeScanner(); + + /** Scan a directory for icon themes. + * + * @return + * There are several cases when this method will fail: + * - The directory does not exist + * - There are no files which match the pattern images_xxx.zip + */ + void ScanDirectoryForIconThemes(const OUString &path); + + /** Adds the provided icon theme by path. + */ + bool + AddIconThemeByPath(const OUString &path); + + /** Scans the provided directory for icon themes. + * The returned strings will contain the URLs to the icon themes. + */ + static std::vector<OUString> + ReadIconThemesFromPath(const OUString& dir); + + /** Check whether a single file is valid */ + static bool + FileIsValidIconTheme(const OUString&); + + std::vector<IconThemeInfo> mFoundIconThemes; + + friend class ::IconThemeScannerTest; +}; + +} // end namespace vcl + +#endif // INCLUDED_VCL_ICONTHEMESCANNER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/IconThemeSelector.hxx b/vcl/inc/IconThemeSelector.hxx new file mode 100644 index 000000000000..0fcd66d1f263 --- /dev/null +++ b/vcl/inc/IconThemeSelector.hxx @@ -0,0 +1,97 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_VCL_ICONTHEMESELECTOR_HXX +#define INCLUDED_VCL_ICONTHEMESELECTOR_HXX + +#include <rtl/ustring.hxx> + +#include <vcl/dllapi.h> + +#include <vector> + +// forward declaration of unit test class. Required for friend relationship. +class IconThemeSelectorTest; + +namespace vcl { +class IconThemeInfo; + +/** This class helps to choose an icon theme from a list of installed themes. + * + * The following factors influence the selection: + * -# When high contrast mode is enabled, the high contrast icon theme is selected (if it is installed). + * -# When a preferred theme has been set (e.g., in the gnome desktop settings), that theme is selected. + */ +class VCL_DLLPUBLIC IconThemeSelector { +public: + IconThemeSelector(); + + /** Select an icon theme from the list of installed themes. + * + * If high contrast mode has been enabled, the highcontrast theme will be selected (if it is available). + * + * @pre + * @p installedThemes must not be empty + */ + OUString + SelectIconTheme( + const std::vector<IconThemeInfo>& installedThemes, + const OUString& theme + ) const; + + /** Select the standard icon theme for a desktop environment from a list of installed themes. + * + * If a preferred theme has been set, this one will take precedence. + * + * The same logic as in SelectIconTheme() will apply. + * + * @pre + * @p installedThemes must not be empty + */ + OUString + SelectIconThemeForDesktopEnvironment( + const std::vector<IconThemeInfo>& installedThemes, + const OUString& desktopEnvironment) const; + + void + SetUseHighContrastTheme(bool); + + void + SetPreferredIconTheme(const OUString&, bool bDarkIconTheme); + + bool + operator==(const vcl::IconThemeSelector&) const; + + bool + operator!=(const vcl::IconThemeSelector&) const; + +private: + /** Return the first element of the themes, or the fallback if the vector is empty */ + static OUString + ReturnFallback(const std::vector<IconThemeInfo>& installedThemes); + + /** The name of the icon theme which is used as fallback */ + static const OUStringLiteral FALLBACK_ICON_THEME_ID; + + + static OUString + GetIconThemeForDesktopEnvironment(const OUString& desktopEnvironment); + + OUString mPreferredIconTheme; + bool mUseHighContrastTheme; + bool mPreferDarkIconTheme; + + friend class ::IconThemeSelectorTest; +}; + +} /* namespace vcl */ + +#endif // INCLUDED_VCL_ICONTHEMESELECTOR_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/OptionalBox.hxx b/vcl/inc/OptionalBox.hxx new file mode 100644 index 000000000000..326fc7536c2d --- /dev/null +++ b/vcl/inc/OptionalBox.hxx @@ -0,0 +1,42 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_VCL_OPTIONALBOX_HXX +#define INCLUDED_VCL_OPTIONALBOX_HXX + +#include <vcl/IPrioritable.hxx> +#include <vcl/layout.hxx> + +class OptionalBox final : public VclHBox, public vcl::IPrioritable +{ +private: + bool m_bInFullView; + +public: + explicit OptionalBox(vcl::Window* pParent); + virtual ~OptionalBox() override; + + void HideContent() override; + void ShowContent() override; + bool IsHidden() override; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/configsettings.hxx b/vcl/inc/configsettings.hxx new file mode 100644 index 000000000000..967387499b9d --- /dev/null +++ b/vcl/inc/configsettings.hxx @@ -0,0 +1,66 @@ +/* -*- 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 . + */ +#ifndef INCLUDED_VCL_CONFIGSETTINGS_HXX +#define INCLUDED_VCL_CONFIGSETTINGS_HXX + +#include <rtl/ustring.hxx> +#include <unotools/configitem.hxx> +#include <vcl/dllapi.h> + +#include <unordered_map> + +namespace com { namespace sun { namespace star { namespace uno { template <typename > class Sequence; } } } } + +namespace vcl +{ + typedef std::unordered_map< OUString, OUString > OUStrMap; + class SmallOUStrMap : public OUStrMap { public: SmallOUStrMap() : OUStrMap(1) {} }; + + + //= SettingsConfigItem + + class VCL_DLLPUBLIC SettingsConfigItem final : public ::utl::ConfigItem + { + private: + std::unordered_map< OUString, SmallOUStrMap > m_aSettings; + + virtual void Notify( const css::uno::Sequence< OUString >& rPropertyNames ) override; + + void getValues(); + SettingsConfigItem(); + + virtual void ImplCommit() override; + + public: + virtual ~SettingsConfigItem() override; + + static SettingsConfigItem* get(); + + OUString getValue( const OUString& rGroup, const OUString& rKey ) const; + void setValue( const OUString& rGroup, const OUString& rKey, const OUString& rValue ); + + }; + + +} // namespace vcl + + +#endif // INCLUDED_VCL_CONFIGSETTINGS_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/debugevent.hxx b/vcl/inc/debugevent.hxx new file mode 100644 index 000000000000..a6f458265cbb --- /dev/null +++ b/vcl/inc/debugevent.hxx @@ -0,0 +1,36 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_VCL_DEBUGEVENT_HXX +#define INCLUDED_VCL_DEBUGEVENT_HXX + +#include <vcl/dllapi.h> +#include <vcl/timer.hxx> +#include <sal/types.h> + +namespace vcl { class Window; } + +class DebugEventInjector final : private Timer { + sal_uInt32 mnEventsLeft; + DebugEventInjector( sal_uInt32 nMaxEvents ); + + static vcl::Window *ChooseWindow(); + static void InjectTextEvent(); + static void InjectMenuEvent(); + static void InjectEvent(); + static void InjectKeyNavEdit(); + virtual void Invoke() override; + + public: + static DebugEventInjector *getCreate(); +}; + +#endif // INCLUDED_VCL_DEBUGEVENT_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/imagerepository.hxx b/vcl/inc/imagerepository.hxx new file mode 100644 index 000000000000..a1a28d3fa241 --- /dev/null +++ b/vcl/inc/imagerepository.hxx @@ -0,0 +1,59 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_VCL_IMAGEREPOSITORY_HXX +#define INCLUDED_VCL_IMAGEREPOSITORY_HXX + +#include <vcl/dllapi.h> +#include <rtl/ustring.hxx> + +class BitmapEx; + + +namespace vcl +{ + + + //= ImageRepository + + // provides access to the application's image repository (image.zip) + class ImageRepository + { + public: + /** loads an image from the application's image repository + @param _rName + the name of the image to load. + @param _out_rImage + will take the image upon successful return. + @return + whether or not the image could be loaded successfully. + */ + static bool loadImage( + const OUString& _rName, + BitmapEx& _out_rImage + ); + }; + + +} // namespace vcl + + +#endif // INCLUDED_VCL_IMAGEREPOSITORY_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/jobdata.hxx b/vcl/inc/jobdata.hxx new file mode 100644 index 000000000000..714bcb38137a --- /dev/null +++ b/vcl/inc/jobdata.hxx @@ -0,0 +1,87 @@ +/* -*- 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 . + */ + +#ifndef INCLUDED_VCL_JOBDATA_HXX +#define INCLUDED_VCL_JOBDATA_HXX + +#include "ppdparser.hxx" + +namespace psp { + +enum class orientation { + Portrait, + Landscape +}; + +struct VCL_DLLPUBLIC JobData +{ + int m_nCopies; + bool m_bCollate; + int m_nLeftMarginAdjust; + int m_nRightMarginAdjust; + int m_nTopMarginAdjust; + int m_nBottomMarginAdjust; + // user overrides for PPD + int m_nColorDepth; + int m_nPSLevel; // 0: no override, else languagelevel to use + int m_nColorDevice; // 0: no override, -1 grey scale, +1 color + int m_nPDFDevice; // 0: no override, -1 PostScript, +1: Automatically PDF, +2: Explicitly PDF + orientation m_eOrientation; + OUString m_aPrinterName; + bool m_bPapersizeFromSetup; + const PPDParser* m_pParser; + PPDContext m_aContext; + + JobData() : + m_nCopies( 1 ), + m_bCollate(false), + m_nLeftMarginAdjust( 0 ), + m_nRightMarginAdjust( 0 ), + m_nTopMarginAdjust( 0 ), + m_nBottomMarginAdjust( 0 ), + m_nColorDepth( 24 ), + m_nPSLevel( 0 ), + m_nColorDevice( 0 ), + m_nPDFDevice( 0 ), + m_eOrientation( orientation::Portrait ), + m_bPapersizeFromSetup( false ), + m_pParser( nullptr ) {} + + JobData& operator=(const psp::JobData& rRight); + + JobData( const JobData& rData ) { *this = rData; } + + void setCollate( bool bCollate ); + void setPaper( int nWidth, int nHeight ); // dimensions in pt + void setPaperBin( int nPaperBin ); + void resolveDefaultBackend(); + void setDefaultBackend(bool bUsePDF); + + // creates a new buffer using new + // it is up to the user to delete it again + bool getStreamBuffer( void*& pData, sal_uInt32& bytes ); + static bool constructFromStreamBuffer( const void* pData, sal_uInt32 bytes, JobData& rJobData ); +}; + +} // namespace + + +#endif // PSPRINT_JOBDATA_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index 01b514eb1d88..81dc449fbafb 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -271,7 +271,7 @@ #include <vcl/canvastools.hxx> #include <vcl/commandevent.hxx> #include <vcl/commandinfoprovider.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/ctrl.hxx> #include <vcl/cursor.hxx> #include <vcl/cvtgrf.hxx> diff --git a/vcl/inc/ppdparser.hxx b/vcl/inc/ppdparser.hxx new file mode 100644 index 000000000000..a0a59c4a8d80 --- /dev/null +++ b/vcl/inc/ppdparser.hxx @@ -0,0 +1,274 @@ +/* -*- 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 . + */ +#ifndef INCLUDED_VCL_PPDPARSER_HXX +#define INCLUDED_VCL_PPDPARSER_HXX + +#include <sal/config.h> + +#include <cstddef> +#include <memory> +#include <unordered_map> +#include <vector> + +#include <rtl/string.hxx> +#include <rtl/ustring.hxx> +#include <tools/solar.h> +#include <vcl/dllapi.h> + +#define PRINTER_PPDDIR "driver" + +namespace psp { + +class PPDCache; +class PPDTranslator; + +enum PPDValueType { eInvocation, eQuoted, eSymbol, eString, eNo }; + +struct VCL_DLLPUBLIC PPDValue +{ + PPDValueType m_eType; + //CustomOption stuff for fdo#43049 + //see http://www.cups.org/documentation.php/spec-ppd.html#OPTIONS + //for full specs, only the basics are implemented here + bool m_bCustomOption; + mutable OUString m_aCustomOption; + OUString m_aOption; + OUString m_aValue; +}; + + +/* + * PPDKey - a container for the available options (=values) of a PPD keyword + */ + +class PPDKey +{ + friend class PPDParser; + friend class CPDManager; + + typedef std::unordered_map< OUString, PPDValue > hash_type; + typedef std::vector< PPDValue* > value_type; + + OUString const m_aKey; + hash_type m_aValues; + value_type m_aOrderedValues; + const PPDValue* m_pDefaultValue; + bool m_bQueryValue; + OUString m_aGroup; + +public: + enum class SetupType { ExitServer, Prolog, DocumentSetup, PageSetup, JCLSetup, AnySetup }; +private: + + bool m_bUIOption; + int m_nOrderDependency; + SetupType m_eSetupType; + + void eraseValue( const OUString& rOption ); +public: + PPDKey( const OUString& rKey ); + ~PPDKey(); + + PPDValue* insertValue(const OUString& rOption, PPDValueType eType, bool bCustomOption = false); + int countValues() const + { return m_aValues.size(); } + // neither getValue will return the query option + const PPDValue* getValue( int n ) const; + const PPDValue* getValue( const OUString& rOption ) const; + const PPDValue* getValueCaseInsensitive( const OUString& rOption ) const; + const PPDValue* getDefaultValue() const { return m_pDefaultValue; } + const OUString& getGroup() const { return m_aGroup; } + + const OUString& getKey() const { return m_aKey; } + bool isUIKey() const { return m_bUIOption; } + SetupType getSetupType() const { return m_eSetupType; } + int getOrderDependency() const { return m_nOrderDependency; } +}; + +// define a hash for PPDKey +struct PPDKeyhash +{ + size_t operator()( const PPDKey * pKey) const + { return reinterpret_cast<size_t>(pKey); } +}; + + +/* + * PPDParser - parses a PPD file and contains all available keys from it + */ + +class PPDParser +{ + friend class PPDContext; + friend class CUPSManager; + friend class CPDManager; + friend class PPDCache; + + typedef std::unordered_map< OUString, std::unique_ptr<PPDKey> > hash_type; + typedef std::vector< PPDKey* > value_type; + + void insertKey( std::unique_ptr<PPDKey> pKey ); +public: + struct PPDConstraint + { + const PPDKey* m_pKey1; + const PPDValue* m_pOption1; + const PPDKey* m_pKey2; + const PPDValue* m_pOption2; + + PPDConstraint() : m_pKey1( nullptr ), m_pOption1( nullptr ), m_pKey2( nullptr ), m_pOption2( nullptr ) {} + }; +private: + hash_type m_aKeys; + value_type m_aOrderedKeys; + ::std::vector< PPDConstraint > m_aConstraints; + + // the full path of the PPD file + OUString m_aFile; + // some basic attributes + bool m_bColorDevice; + bool m_bType42Capable; + sal_uLong m_nLanguageLevel; + rtl_TextEncoding m_aFileEncoding; + + + // shortcuts to important keys and their default values + // imageable area + const PPDKey* m_pImageableAreas; + // paper dimensions + const PPDValue* m_pDefaultPaperDimension; + const PPDKey* m_pPaperDimensions; + // paper trays + const PPDValue* m_pDefaultInputSlot; + // resolutions + const PPDValue* m_pDefaultResolution; + + // translations + std::unique_ptr<PPDTranslator> m_pTranslator; + + PPDParser( const OUString& rFile ); + PPDParser(const OUString& rFile, const std::vector<PPDKey*>& keys); + + void parseOrderDependency(const OString& rLine); + void parseOpenUI(const OString& rLine, const OString& rPPDGroup); + void parseConstraint(const OString& rLine); + void parse( std::vector< OString >& rLines ); + + OUString handleTranslation(const OString& i_rString, bool i_bIsGlobalized); + + static void scanPPDDir( const OUString& rDir ); + static void initPPDFiles(PPDCache &rPPDCache); + static OUString getPPDFile( const OUString& rFile ); +public: + ~PPDParser(); + static const PPDParser* getParser( const OUString& rFile ); + + const PPDKey* getKey( int n ) const; + const PPDKey* getKey( const OUString& rKey ) const; + int getKeys() const { return m_aKeys.size(); } + bool hasKey( const PPDKey* ) const; + + const ::std::vector< PPDConstraint >& getConstraints() const { return m_aConstraints; } + + bool isColorDevice() const { return m_bColorDevice; } + bool isType42Capable() const { return m_bType42Capable; } + sal_uLong getLanguageLevel() const { return m_nLanguageLevel; } + + OUString getDefaultPaperDimension() const; + void getDefaultPaperDimension( int& rWidth, int& rHeight ) const + { getPaperDimension( getDefaultPaperDimension(), rWidth, rHeight ); } + bool getPaperDimension( const OUString& rPaperName, + int& rWidth, int& rHeight ) const; + // width and height in pt + // returns false if paper not found + + // match the best paper for width and height + OUString matchPaper( int nWidth, int nHeight ) const; + + bool getMargins( const OUString& rPaperName, + int &rLeft, int& rRight, + int &rUpper, int& rLower ) const; + // values in pt + // returns true if paper found + + // values int pt + + OUString getDefaultInputSlot() const; + + void getDefaultResolution( int& rXRes, int& rYRes ) const; + // values in dpi + static void getResolutionFromString( const OUString&, int&, int& ); + // helper function + + OUString translateKey( const OUString& i_rKey ) const; + OUString translateOption( const OUString& i_rKey, + const OUString& i_rOption ) const; +}; + + +/* + * PPDContext - a class to manage user definable states based on the + * contents of a PPDParser. + */ + +class PPDContext +{ + typedef std::unordered_map< const PPDKey*, const PPDValue*, PPDKeyhash > hash_type; + hash_type m_aCurrentValues; + const PPDParser* m_pParser; + + // returns false: check failed, new value is constrained + // true: check succeeded, new value can be set + bool checkConstraints( const PPDKey*, const PPDValue*, bool bDoReset ); + bool resetValue( const PPDKey*, bool bDefaultable = false ); +public: + PPDContext(); + PPDContext( const PPDContext& rContext ) { operator=( rContext ); } + PPDContext& operator=( const PPDContext& rContext ) = default; + PPDContext& operator=( PPDContext&& rContext ); + + void setParser( const PPDParser* ); + const PPDParser* getParser() const { return m_pParser; } + + const PPDValue* getValue( const PPDKey* ) const; + const PPDValue* setValue( const PPDKey*, const PPDValue*, bool bDontCareForConstraints = false ); + + std::size_t countValuesModified() const { return m_aCurrentValues.size(); } + const PPDKey* getModifiedKey( std::size_t n ) const; + + // public wrapper for the private method + bool checkConstraints( const PPDKey*, const PPDValue* ); + + // for printer setup + char* getStreamableBuffer( sal_uLong& rBytes ) const; + void rebuildFromStreamBuffer(const std::vector<char> &rBuffer); + + // convenience + int getRenderResolution() const; + + // width, height in points, paper will contain the name of the selected + // paper after the call + void getPageSize( OUString& rPaper, int& rWidth, int& rHeight ) const; +}; + +} // namespace + +#endif // INCLUDED_VCL_PPDPARSER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/printerinfomanager.hxx b/vcl/inc/printerinfomanager.hxx index 3ac76a91dde5..020365b8be0a 100644 --- a/vcl/inc/printerinfomanager.hxx +++ b/vcl/inc/printerinfomanager.hxx @@ -26,12 +26,13 @@ #include <unordered_set> #include <vcl/dllapi.h> -#include <vcl/jobdata.hxx> #include <vcl/prntypes.hxx> #include <osl/time.h> #include <cstdio> +#include "jobdata.hxx" + namespace psp { diff --git a/vcl/inc/strhelper.hxx b/vcl/inc/strhelper.hxx new file mode 100644 index 000000000000..be2f5467861f --- /dev/null +++ b/vcl/inc/strhelper.hxx @@ -0,0 +1,72 @@ +/* -*- 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 . + */ +#ifndef INCLUDED_VCL_STRHELPER_HXX +#define INCLUDED_VCL_STRHELPER_HXX + +#include <cstring> +#include <rtl/math.hxx> +#include <rtl/ustring.hxx> +#include <vcl/dllapi.h> + +namespace psp +{ + OUString GetCommandLineToken( int, const OUString& ); + OString GetCommandLineToken(int, const OString&); + // gets one token of a unix command line style string + // doublequote, singlequote and singleleftquote protect their respective + // contents + + int GetCommandLineTokenCount(const OUString&); + // returns number of tokens (zero if empty or whitespace only) + + OUString WhitespaceToSpace( const OUString&, bool bProtect = true ); + OString WhitespaceToSpace(const OString&); + // returns a string with multiple adjacent occurrences of whitespace + // converted to a single space. if bProtect is sal_True (nonzero), then + // doublequote, singlequote and singleleftquote protect their respective + // contents + + + // parses the first double in the string; decimal is '.' only + inline double StringToDouble( const OUString& rStr ) + { + return rtl::math::stringToDouble(rStr, u'.', u'\0'); + } + + inline double StringToDouble(const OString& rStr) + { + return rtl::math::stringToDouble(rStr, '.', static_cast<char>(0)); + } + + // fills a character buffer with the string representation of a double + // the buffer has to be long enough (e.g. 128 bytes) + // returns the string len + inline int getValueOfDouble( char* pBuffer, double f, int nPrecision = 0) + { + OString aStr( rtl::math::doubleToString( f, rtl_math_StringFormat_G, nPrecision, '.', true ) ); + int nLen = aStr.getLength(); + std::strncpy( pBuffer, aStr.getStr(), nLen+1 ); // copy string including terminating zero + return nLen; + } + +} // namespace + +#endif // INCLUDED_VCL_STRHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/inc/unx/genprn.h b/vcl/inc/unx/genprn.h index 00e174932851..14917cf72ef5 100644 --- a/vcl/inc/unx/genprn.h +++ b/vcl/inc/unx/genprn.h @@ -20,7 +20,7 @@ #ifndef INCLUDED_VCL_INC_GENERIC_GENPRN_H #define INCLUDED_VCL_INC_GENERIC_GENPRN_H -#include <vcl/jobdata.hxx> +#include <jobdata.hxx> #include <unx/printergfx.hxx> #include <unx/printerjob.hxx> #include <salprn.hxx> diff --git a/vcl/inc/unx/printerjob.hxx b/vcl/inc/unx/printerjob.hxx index 9fe4a3db4945..33f92abc7be8 100644 --- a/vcl/inc/unx/printerjob.hxx +++ b/vcl/inc/unx/printerjob.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_VCL_INC_GENERIC_PRINTERJOB_HXX #define INCLUDED_VCL_INC_GENERIC_PRINTERJOB_HXX -#include <vcl/jobdata.hxx> +#include <jobdata.hxx> #include <osl/file.hxx> #include <vector> diff --git a/vcl/inc/vclstatuslistener.hxx b/vcl/inc/vclstatuslistener.hxx new file mode 100644 index 000000000000..2652befcd4cc --- /dev/null +++ b/vcl/inc/vclstatuslistener.hxx @@ -0,0 +1,108 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_VCL_VCLSTATUSLISTENER_HXX +#define INCLUDED_VCL_VCLSTATUSLISTENER_HXX + +#include <cppuhelper/implbase.hxx> +#include <comphelper/processfactory.hxx> +#include <vcl/vclptr.hxx> + +#include <com/sun/star/frame/Desktop.hpp> +#include <com/sun/star/frame/XStatusListener.hpp> +#include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/frame/XDispatchProvider.hpp> +#include <com/sun/star/util/URL.hpp> +#include <com/sun/star/util/URLTransformer.hpp> + +template <class T> class VclStatusListener final : public cppu::WeakImplHelper < css::frame::XStatusListener> +{ +public: + VclStatusListener<T>(T* widget, const OUString& aCommand); + +private: + VclPtr<T> mWidget; /** The widget on which actions are performed */ + + /** Dispatcher. Need to keep a reference to it as long as this StatusListener exists. */ + css::uno::Reference<css::frame::XDispatch> mxDispatch; + css::util::URL maCommandURL; + css::uno::Reference<css::frame::XFrame> mxFrame; + +public: + void SAL_CALL statusChanged(const css::frame::FeatureStateEvent& rEvent) override; + + void SAL_CALL disposing(const css::lang::EventObject& /*Source*/) override; + + const css::uno::Reference<css::frame::XFrame>& getFrame() { return mxFrame; } + + void startListening(); + + void dispose(); +}; + +template<class T> +VclStatusListener<T>::VclStatusListener(T* widget, const OUString& aCommand) { + mWidget = widget; + + css::uno::Reference<css::uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext(); + css::uno::Reference<css::frame::XDesktop2> xDesktop = css::frame::Desktop::create(xContext); + + css::uno::Reference<css::frame::XFrame> xFrame(xDesktop->getActiveFrame()); + if (!xFrame.is()) + xFrame = xDesktop; + + mxFrame = xFrame; + + maCommandURL.Complete = aCommand; + css::uno::Reference<css::util::XURLTransformer> xParser = css::util::URLTransformer::create(xContext); + xParser->parseStrict(maCommandURL); +} + +template<class T> +void VclStatusListener<T>::startListening() +{ + if (mxDispatch.is()) + mxDispatch->removeStatusListener(this, maCommandURL); + + css::uno::Reference<css::frame::XDispatchProvider> xDispatchProvider(mxFrame, css::uno::UNO_QUERY); + if (!xDispatchProvider.is()) + return; + + mxDispatch = xDispatchProvider->queryDispatch(maCommandURL, "", 0); + if (mxDispatch.is()) + mxDispatch->addStatusListener(this, maCommandURL); +} + +template<class T> +void VclStatusListener<T>::statusChanged(const css::frame::FeatureStateEvent& rEvent) +{ + mWidget->statusChanged(rEvent); +} + +template<class T> +void VclStatusListener<T>::disposing(const css::lang::EventObject& /*Source*/) +{ + mxDispatch.clear(); +} + +template<class T> +void VclStatusListener<T>::dispose() +{ + if (mxDispatch.is()) { + mxDispatch->removeStatusListener(this, maCommandURL); + mxDispatch.clear(); + } + mxFrame.clear(); + mWidget.clear(); +} + + +#endif // INCLUDED_VCL_VCLSTATUSLISTENER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx index 5b3231cd7022..f65e70bc6bdd 100644 --- a/vcl/qa/cppunit/app/test_IconThemeScanner.cxx +++ b/vcl/qa/cppunit/app/test_IconThemeScanner.cxx @@ -10,7 +10,7 @@ #include <stdexcept> #include <rtl/ustring.hxx> -#include <vcl/IconThemeScanner.hxx> +#include <IconThemeScanner.hxx> #include <vcl/IconThemeInfo.hxx> #include <cppunit/TestAssert.h> diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx index cff9641cd033..69f61c79e381 100644 --- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx +++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <vcl/IconThemeSelector.hxx> +#include <IconThemeSelector.hxx> #include <vcl/IconThemeInfo.hxx> diff --git a/vcl/source/app/IconThemeScanner.cxx b/vcl/source/app/IconThemeScanner.cxx index 0eba21837245..a9163af3c690 100644 --- a/vcl/source/app/IconThemeScanner.cxx +++ b/vcl/source/app/IconThemeScanner.cxx @@ -12,7 +12,7 @@ #include <deque> -#include <vcl/IconThemeScanner.hxx> +#include <IconThemeScanner.hxx> #include <osl/file.hxx> #include <salhelper/linkhelper.hxx> diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index 225414fcc8b7..90a927a67481 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -9,7 +9,7 @@ #include <comphelper/lok.hxx> -#include <vcl/IconThemeSelector.hxx> +#include <IconThemeSelector.hxx> #include <vcl/IconThemeInfo.hxx> #include <config_mpl.h> diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 59962b2bdd30..ee17e42f3a1d 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -34,14 +34,14 @@ #include <comphelper/lok.hxx> #include <vcl/graphicfilter.hxx> -#include <vcl/IconThemeScanner.hxx> -#include <vcl/IconThemeSelector.hxx> +#include <IconThemeScanner.hxx> +#include <IconThemeSelector.hxx> #include <vcl/IconThemeInfo.hxx> #include <vcl/svapp.hxx> #include <vcl/event.hxx> #include <vcl/settings.hxx> #include <vcl/i18nhelp.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/outdev.hxx> #include <unotools/fontcfg.hxx> diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 82321c295be4..70db9440f6a4 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -25,7 +25,7 @@ #include <unotools/resmgr.hxx> #include <sal/log.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/dockwin.hxx> #include <vcl/menu.hxx> #include <vcl/print.hxx> diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 23663c56ad9d..b8c97d08d9c8 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -40,14 +40,14 @@ #include <vcl/ImageTree.hxx> #include <vcl/settings.hxx> #include <vcl/toolkit/unowrap.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/lazydelete.hxx> #include <vcl/embeddedfontshelper.hxx> -#include <vcl/debugevent.hxx> #include <vcl/dialog.hxx> #include <vcl/menu.hxx> #include <vcl/virdev.hxx> #include <vcl/print.hxx> +#include <debugevent.hxx> #include <scrwnd.hxx> #ifdef _WIN32 diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 125060a7660c..6408709e393c 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -32,13 +32,13 @@ #include <vcl/edit.hxx> #include <vcl/layout.hxx> #include <vcl/stdtext.hxx> -#include <vcl/vclstatuslistener.hxx> #include <vcl/uitest/uiobject.hxx> #include <bitmaps.hlst> #include <svdata.hxx> #include <window.h> #include <controldata.hxx> +#include <vclstatuslistener.hxx> #include <osl/diagnose.h> #include <comphelper/dispatchcommand.hxx> diff --git a/vcl/source/fontsubset/cff.cxx b/vcl/source/fontsubset/cff.cxx index 959b59668f62..962f54b7bf70 100644 --- a/vcl/source/fontsubset/cff.cxx +++ b/vcl/source/fontsubset/cff.cxx @@ -25,7 +25,7 @@ #include <fontsubset.hxx> #include <o3tl/safeint.hxx> -#include <vcl/strhelper.hxx> +#include <strhelper.hxx> #include <sal/log.hxx> typedef sal_uInt8 U8; diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx index f8b9edb7c50c..8d477ec37227 100644 --- a/vcl/source/gdi/configsettings.cxx +++ b/vcl/source/gdi/configsettings.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <svdata.hxx> diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 31daa05a73bd..ec148b2159d8 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -61,7 +61,7 @@ #include <vcl/lineinfo.hxx> #include <vcl/metric.hxx> #include <vcl/settings.hxx> -#include <vcl/strhelper.hxx> +#include <strhelper.hxx> #include <vcl/svapp.hxx> #include <vcl/virdev.hxx> #include <vcl/filter/pdfdocument.hxx> diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 6a07ca13c04a..7c3a1ec5056a 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -21,7 +21,7 @@ #include <vcl/print.hxx> #include <vcl/svapp.hxx> #include <vcl/metaact.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <tools/urlobj.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/sequence.hxx> diff --git a/vcl/source/graphic/UnoGraphicProvider.cxx b/vcl/source/graphic/UnoGraphicProvider.cxx index 338c5b3ad51c..9c7173158184 100644 --- a/vcl/source/graphic/UnoGraphicProvider.cxx +++ b/vcl/source/graphic/UnoGraphicProvider.cxx @@ -20,7 +20,7 @@ #include <vcl/svapp.hxx> #include <vcl/image.hxx> #include <vcl/metaact.hxx> -#include <vcl/imagerepository.hxx> +#include <imagerepository.hxx> #include <tools/fract.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/graphicfilter.hxx> diff --git a/vcl/source/helper/strhelper.cxx b/vcl/source/helper/strhelper.cxx index 1153c6b520cf..96e10b4865e8 100644 --- a/vcl/source/helper/strhelper.cxx +++ b/vcl/source/helper/strhelper.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <vcl/strhelper.hxx> +#include <strhelper.hxx> namespace { diff --git a/vcl/source/image/ImageRepository.cxx b/vcl/source/image/ImageRepository.cxx index 59b9563549e9..6bf57e699419 100644 --- a/vcl/source/image/ImageRepository.cxx +++ b/vcl/source/image/ImageRepository.cxx @@ -18,7 +18,7 @@ */ #include <vcl/bitmapex.hxx> -#include <vcl/imagerepository.hxx> +#include <imagerepository.hxx> #include <vcl/ImageTree.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index af91c8fe31fa..f08f1973c785 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -49,7 +49,7 @@ #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/BitmapTools.hxx> -#include <vcl/IconThemeScanner.hxx> +#include <IconThemeScanner.hxx> #include <vcl/filter/PngImageReader.hxx> #include <vcl/outdev.hxx> #include <vcl/pngwrite.hxx> diff --git a/vcl/source/opengl/GLMHelper.hxx b/vcl/source/opengl/GLMHelper.hxx new file mode 100644 index 000000000000..9f4cd20f9e7c --- /dev/null +++ b/vcl/source/opengl/GLMHelper.hxx @@ -0,0 +1,24 @@ +/* -*- 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/. + */ + +#ifndef INCLUDED_VCL_GLM_GLMHELPER_HXX +#define INCLUDED_VCL_GLM_GLMHELPER_HXX + +#include <glm/glm.hpp> +#include <vcl/dllapi.h> + +#include <ostream> + +std::ostream& operator<<(std::ostream& rStrm, const glm::mat4& rMatrix); +std::ostream& operator<<(std::ostream& rStrm, const glm::vec4& rPos); +std::ostream& operator<<(std::ostream& rStrm, const glm::vec3& rPos); + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx index 13e7c4fb7615..1c9fa66436c8 100644 --- a/vcl/source/opengl/OpenGLHelper.cxx +++ b/vcl/source/opengl/OpenGLHelper.cxx @@ -7,7 +7,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include <vcl/opengl/GLMHelper.hxx> #include <vcl/opengl/OpenGLHelper.hxx> #include <osl/file.hxx> @@ -43,6 +42,8 @@ #include <opengl/win/WinDeviceInfo.hxx> #endif +#include "GLMHelper.hxx" + static bool volatile gbInShaderCompile = false; OpenGLZone::AtomicCounter OpenGLZone::gnEnterCount = 0; OpenGLZone::AtomicCounter OpenGLZone::gnLeaveCount = 0; diff --git a/vcl/source/window/NotebookBarAddonsMerger.cxx b/vcl/source/window/NotebookBarAddonsMerger.cxx index 814c0b6161c5..689f26dbaf6d 100644 --- a/vcl/source/window/NotebookBarAddonsMerger.cxx +++ b/vcl/source/window/NotebookBarAddonsMerger.cxx @@ -25,8 +25,8 @@ #include <vcl/commandinfoprovider.hxx> #include <vcl/vclenum.hxx> #include <vcl/toolbox.hxx> -#include <vcl/OptionalBox.hxx> #include <vcl/IPrioritable.hxx> +#include <OptionalBox.hxx> static const char STYLE_TEXT[] = "Text"; static const char STYLE_ICON[] = "Icon"; diff --git a/vcl/source/window/OptionalBox.cxx b/vcl/source/window/OptionalBox.cxx index 6f47b468f194..f81d246cf2b9 100644 --- a/vcl/source/window/OptionalBox.cxx +++ b/vcl/source/window/OptionalBox.cxx @@ -19,7 +19,7 @@ #include <vcl/builderfactory.hxx> #include <vcl/layout.hxx> -#include <vcl/OptionalBox.hxx> +#include <OptionalBox.hxx> /* * OptionalBox - shows or hides the content. To use with PriorityHBox diff --git a/vcl/source/window/debugevent.cxx b/vcl/source/window/debugevent.cxx index bb0d54b1150e..f6fa5d8c0882 100644 --- a/vcl/source/window/debugevent.cxx +++ b/vcl/source/window/debugevent.cxx @@ -12,9 +12,9 @@ #include <sal/log.hxx> #include <vcl/keycodes.hxx> #include <vcl/svapp.hxx> -#include <vcl/debugevent.hxx> #include <vcl/wrkwin.hxx> #include <vcl/menu.hxx> +#include <debugevent.hxx> #include <window.h> #include <salwtype.hxx> diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index e2a617270af2..e2d2d91347b5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -50,7 +50,7 @@ #include <com/sun/star/accessibility/XAccessible.hpp> #include <vcl/toolkit/unowrap.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <map> #include <string_view> diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index cbba1ac3f562..1f88e9d2140e 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -27,7 +27,7 @@ #include <vcl/print.hxx> #include <vcl/wall.hxx> #include <vcl/decoview.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/help.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 339c81130d92..c11d7285d5b9 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -29,7 +29,7 @@ #include <vcl/layout.hxx> #include <vcl/menu.hxx> #include <vcl/settings.hxx> -#include <vcl/vclstatuslistener.hxx> +#include <vclstatuslistener.hxx> #include <vcl/ptrstyle.hxx> #include <bitmaps.hlst> diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 02659996768c..e39285c4ac6d 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -26,7 +26,7 @@ #include <osl/thread.h> #include <osl/process.h> #include <sal/macros.h> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <unx/wmadaptor.hxx> #include <unx/saldisp.hxx> diff --git a/vcl/unx/generic/print/common_gfx.cxx b/vcl/unx/generic/print/common_gfx.cxx index 669064ae31d8..1d318249528d 100644 --- a/vcl/unx/generic/print/common_gfx.cxx +++ b/vcl/unx/generic/print/common_gfx.cxx @@ -25,7 +25,7 @@ #include <unx/printergfx.hxx> #include <unx/printerjob.hxx> #include <unx/fontmanager.hxx> -#include <vcl/strhelper.hxx> +#include <strhelper.hxx> #include <printerinfomanager.hxx> #include <tools/color.hxx> diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 221525514b34..901edb5c0f49 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -31,7 +31,7 @@ #include <i18nlangtag/mslangid.hxx> #include <vcl/bitmapaccess.hxx> -#include <vcl/jobdata.hxx> +#include <jobdata.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> #include <vcl/sysdata.hxx> diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx index 8269b8d4be01..de598f1f656d 100644 --- a/vcl/unx/generic/print/printerjob.cxx +++ b/vcl/unx/generic/print/printerjob.cxx @@ -26,8 +26,8 @@ #include <unx/printerjob.hxx> #include <unx/printergfx.hxx> -#include <vcl/ppdparser.hxx> -#include <vcl/strhelper.hxx> +#include <ppdparser.hxx> +#include <strhelper.hxx> #include <printerinfomanager.hxx> #include <rtl/ustring.hxx> diff --git a/vcl/unx/generic/print/prtsetup.hxx b/vcl/unx/generic/print/prtsetup.hxx index d5de649ddd81..e5d88c7e1668 100644 --- a/vcl/unx/generic/print/prtsetup.hxx +++ b/vcl/unx/generic/print/prtsetup.hxx @@ -21,8 +21,8 @@ #define INCLUDED_VCL_GENERIC_PRINT_PRTSETUP_HXX #include <vcl/idle.hxx> -#include <vcl/ppdparser.hxx> #include <vcl/weld.hxx> +#include <ppdparser.hxx> #include <printerinfomanager.hxx> class RTSPaperPage; diff --git a/vcl/unx/generic/printer/jobdata.cxx b/vcl/unx/generic/printer/jobdata.cxx index e95263e29c49..362305beac11 100644 --- a/vcl/unx/generic/printer/jobdata.cxx +++ b/vcl/unx/generic/printer/jobdata.cxx @@ -18,7 +18,7 @@ */ #include <officecfg/Office/Common.hxx> -#include <vcl/jobdata.hxx> +#include <jobdata.hxx> #include <printerinfomanager.hxx> #include <tools/stream.hxx> diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index ffa6c873c13f..d949441db608 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -23,8 +23,8 @@ #include <comphelper/string.hxx> #include <i18nlangtag/languagetag.hxx> -#include <vcl/ppdparser.hxx> -#include <vcl/strhelper.hxx> +#include <ppdparser.hxx> +#include <strhelper.hxx> #include <vcl/svapp.hxx> #include <vcl/settings.hxx> diff --git a/vcl/unx/gtk3/gtk3salprn-gtk.cxx b/vcl/unx/gtk3/gtk3salprn-gtk.cxx index 56f2173b119f..24083dcbba46 100644 --- a/vcl/unx/gtk3/gtk3salprn-gtk.cxx +++ b/vcl/unx/gtk3/gtk3salprn-gtk.cxx @@ -14,7 +14,7 @@ #include <unx/gtk/gtkinst.hxx> #include <unx/gtk/gtkprn.hxx> -#include <vcl/configsettings.hxx> +#include <configsettings.hxx> #include <vcl/help.hxx> #include <vcl/print.hxx> #include <vcl/svapp.hxx> |