/* -*- 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 "gConvXrm.hxx" /***************************************************************************** ********************* G C O N X R M W R A P . C X X ********************* ***************************************************************************** * This includes the c code generated by flex *****************************************************************************/ /************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xrm::convert_xrm(l10nMem& crMemory) : convert_gen_impl(crMemory), mbNoCollectingData(true), mbIsTag(false), mbIsLang(false) { } /************ I N T E R F A C E I M P L E M E N T A T I O N ************/ convert_xrm::~convert_xrm() { } /********************** I M P L E M E N T A T I O N **********************/ //namespace XrmWrap //{ //#define IMPLptr convert_gen_impl::mcImpl //#define LOCptr ((convert_xrm *)convert_gen_impl::mcImpl) //#include "gConXrm_yy.c" //} /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::execute() { //// XrmWrap::yylex(); // write last part of file. if (mbMergeMode) writeSourceFile(msCollector); } /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::setId(char *yytext) { std::string& sText = copySource(yytext, mbNoCollectingData); int nL, nE; if (mbIsTag) { nL = sText.find("\""); nE = sText.find("\"", nL+1); if (nL == (int)std::string::npos || nE == (int)std::string::npos) return; msKey = sText.substr(nL+1, nE - nL -1); } } /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::setLang(char *yytext) { std::string& sText = copySource(yytext, mbNoCollectingData); std::string sLang; int nL, nE; if (mbIsTag) { nL = sText.find("\""); nE = sText.find("\"", nL+1); if (nL == (int)std::string::npos || nE == (int)std::string::npos) return; sLang = sText.substr(nL+1, nE - nL -1); if (sLang == "en-US") mbIsLang = true; else l10nMem::showError(sLang + " is no en-US language"); } } /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::setTag(char *yytext) { msTag = copySource(yytext); msKey.clear(); mbIsLang = false; mbIsTag = true; } /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::startCollectData(char *yytext) { copySource(yytext, mbNoCollectingData); if (mbIsTag && mbIsLang && msKey.size()) mbNoCollectingData = false; mbIsTag = mbIsLang = false; } /********************** I M P L E M E N T A T I O N **********************/ void convert_xrm::stopCollectData(char *yytext) { std::string sTagText, sTagEnd, sLang, sText = msCollector; copySource(yytext); if (!mbNoCollectingData) { mcMemory.setSourceKey(miLineNo, msSourceFile, msKey, sText, mbMergeMode); mbNoCollectingData = true; if (mbMergeMode) { sTagEnd = "\n"; msTag += "id=\"" + msKey + "\" xml:lang=\""; // prepare to read all languages mcMemory.prepareMerge(); for (; mcMemory.getMergeLang(sLang, sText);) { // replace \" with " for (int i = 0; (i = sText.find("\\\"", i)) != (int)std::string::npos;) sText.erase(i,1); // Prepare tag start and end sTagText = msTag + sLang + "\">" + sText + sTagEnd; writeSourceFile(sTagText); } } msKey.clear(); } mbIsTag = false; } tro/collabora/lov-6.0.4'>distro/collabora/lov-6.0.4 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/icon-themes/elementary_svg/svx
AgeCommit message (Expand)Author
2023-03-07Resolves tdf#153344 - Resize Save icon in statusbar to 16pxHeiko Tietze
2023-03-04Related tdf#153344 - Resize Selection Mode icon in statusbar to 16pxHeiko Tietze
2023-03-01Related tdf#153344 - Resize Save icon in statusbar to 18pxHeiko Tietze
2023-02-23Revert "Resolves tdf#152947 - Accessibility for save status icon"Heiko Tietze
2023-01-25Resolves tdf#152947 - Accessibility for save status iconHeiko Tietze