include/vcl/window.hxx | 10 ++++++++++ sc/source/ui/dbgui/scuiimoptdlg.cxx | 10 ++++++++-- sc/source/ui/inc/scuiimoptdlg.hxx | 3 +++ vcl/source/window/window2.cxx | 5 +++++ 4 files changed, 26 insertions(+), 2 deletions(-)
New commits: commit 697eaa91bd008e992b325e05ce3f20853ad965f7 Author: Katarina Behrens <katarina.behr...@cib.de> Date: Wed May 25 16:10:23 2016 +0200 tdf#100068: Initial implementation of ScreenshotId it's the same as HelpId in default implementation and extended with '=?config=foo' string otherwise, depending on different configurations the dialog/tabpage can have (e.g. different widgets hidden/shown) Change-Id: I01312a5a88ef7ba784bca315b336420cdb63c8dc Reviewed-on: https://gerrit.libreoffice.org/25455 Reviewed-by: Katarina Behrens <katarina.behr...@cib.de> Tested-by: Katarina Behrens <katarina.behr...@cib.de> diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 62e8c64..e93870c 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -1180,6 +1180,16 @@ public: void SetHelpId( const OString& ); const OString& GetHelpId() const; + /** String ID of this window for the purpose of creating a screenshot + + In default implementation this ID is the same as HelpId. Override this method + in windows (dialogs,tabpages) that need different IDs for different configurations + they can be in + + @return screenshot ID of this window + */ + virtual OString GetScreenshotId() const; + vcl::Window* FindWindow( const Point& rPos ) const; sal_uInt16 GetChildCount() const; diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 114ec3c..a32b361 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -107,7 +107,8 @@ ScImportOptionsDlg::ScImportOptionsDlg( bool bOnlyDbtoolsEncodings, bool bImport ) : ModalDialog ( pParent, "ImOptDialog", - "modules/scalc/ui/imoptdialog.ui" ) + "modules/scalc/ui/imoptdialog.ui" ), + m_bIsAsciiImport( bAscii ) { get(m_pFieldFrame, "fieldframe"); get(m_pFtCharset, "charsetft"); @@ -291,7 +292,7 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const if ( aStr.isEmpty() ) { - nCode = 0; // kein Trennzeichen + nCode = 0; // no separator } else { @@ -304,6 +305,11 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const return nCode; } +OString ScImportOptionsDlg::GetScreenshotId() const +{ + return (m_bIsAsciiImport) ? GetHelpId() : GetHelpId() + "?config=NonTextImport"; +} + IMPL_LINK_TYPED( ScImportOptionsDlg, FixedWidthHdl, Button*, pCheckBox, void ) { if (pCheckBox == m_pCbFixed) diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index 9848e33..f4a29ca 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -40,6 +40,7 @@ public: virtual void dispose() override; void GetImportOptions( ScImportOptions& rOptions ) const; + virtual OString GetScreenshotId() const override; private: VclPtr<VclFrame> m_pFieldFrame; @@ -60,6 +61,8 @@ private: ScDelimiterTable* pFieldSepTab; ScDelimiterTable* pTextSepTab; + bool m_bIsAsciiImport; + private: sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 00475f1..801943b 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -909,6 +909,11 @@ const OString& Window::GetHelpId() const return mpWindowImpl->maHelpId; } +OString Window::GetScreenshotId() const +{ + return GetHelpId(); +} + // --------- old inline methods --------------- vcl::Window* Window::ImplGetWindow() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits